--
--  Copyright (C) 2014-2022, AdaCore
--  SPDX-License-Identifier: Apache-2.0
--

with Ada.Containers;                  use Ada.Containers;
with Ada.Containers.Hashed_Maps;
with Ada.Containers.Vectors;
with Ada.Directories;
with Ada.Exceptions;
with Ada.Finalization;
with Ada.Strings.Unbounded;           use Ada.Strings.Unbounded;
with Ada.Strings.Wide_Wide_Unbounded; use Ada.Strings.Wide_Wide_Unbounded;
pragma Warnings (Off, "internal");
with Ada.Strings.Wide_Wide_Unbounded.Aux;
use Ada.Strings.Wide_Wide_Unbounded.Aux;
pragma Warnings (On, "internal");
with Ada.Text_IO;                     use Ada.Text_IO;
with Ada.Unchecked_Conversion;
with Ada.Unchecked_Deallocation;
with System;
with GNAT.Task_Lock;
with GNAT.Traceback.Symbolic;
with GNATCOLL.Traces;
with Langkit_Support.Adalog.Debug;
with Langkit_Support.Generic_API.Analysis;
with Langkit_Support.Generic_API.Introspection;
with Langkit_Support.Hashes; use Langkit_Support.Hashes;
with Langkit_Support.Images; use Langkit_Support.Images;
with Langkit_Support.Names;  use Langkit_Support.Names;
with Langkit_Support.Relative_Get;
with Libadalang.Private_Converters;
use Libadalang.Private_Converters;
pragma Warnings (Off, "referenced");
          with Ada.Containers.Hashed_Sets;
          with Libadalang.Env_Hooks;
            use Libadalang.Env_Hooks;
          with Libadalang.Implementation.Extensions;
          with Libadalang.Implementation.Extensions;
            use Libadalang.Implementation.Extensions;
          with Libadalang.Internal_Default_Provider;
          with Libadalang.Sources;
pragma Warnings (On, "referenced");
package body Libadalang.Implementation is
   use Precomputed_Symbols;
   pragma Warnings (Off, "has no effect");
   use Solver;
   pragma Warnings (On, "has no effect");
   package Context_Vectors is new Ada.Containers.Vectors
     (Index_Type   => Positive,
      Element_Type => Internal_Context);
   type Contexts_Destructor is limited
      new Ada.Finalization.Limited_Controlled with null record;
   overriding procedure Finalize (CD : in out Contexts_Destructor);
   --  Helper to destroy all contexts when terminating the process
   package Context_Pool is
      procedure Acquire (Context : out Internal_Context)
         with Post => Context /= null;
      --  If a context is free for reuse, increment its serial number and
      --  return it. Otherwise, allocate a new one. In any case, this does not
      --  initialize it, except for the Serial_Number field.
      procedure Release (Context : in out Internal_Context)
         with Pre  => Context /= null,
              Post => Context = null;
      --  Tag Context as free for reuse and set it to null
      procedure Free;
      --  Free all contexts in this pool. Intended to be called only when the
      --  process is terminating, to avoid reported memory leaks.
   private
      Available : Context_Vectors.Vector;
      --  List of allocated contexts that can be re-used right now
      CD : Contexts_Destructor with Unreferenced;
      --  Singleton whose only purpose is to free all contexts in Available
      --  when finalized.
   end Context_Pool;
   procedure Register_Destroyable_Helper
     (Unit    : Internal_Unit;
      Object  : System.Address;
      Destroy : Destroy_Procedure);
   --  Common underlying implementation for Register_Destroyable_Gen
   pragma Warnings (Off, "referenced");
   function Construct_Entity_Array
     (V : AST_Envs.Entity_Vectors.Vector) return Internal_Entity_Array_Access;
   pragma Warnings (On, "referenced");
   procedure Reset_Envs_Caches (Unit : Internal_Unit);
   --  Reset the env caches of all lexical environments created for ``Unit``
   procedure Destroy (Env : in out Lexical_Env_Access);
   function Snaps_At_Start (Self : Bare_Ada_Node) return Boolean;
   function Snaps_At_End (Self : Bare_Ada_Node) return Boolean;
   --  Those maps are used to give unique ids to lexical envs while pretty
   --  printing them.
   package Address_To_Id_Maps is new Ada.Containers.Hashed_Maps
     (Lexical_Env, Integer, Hash, "=");
   type Dump_Lexical_Env_State is record
      Env_Ids : Address_To_Id_Maps.Map;
      --  Mapping: Lexical_Env -> Integer, used to remember which unique Ids we
      --  assigned to the lexical environments we found.
      Next_Id : Positive := 1;
      --  Id to assign to the next unknown lexical environment
      Root_Env : Lexical_Env;
      --  Lexical environment we consider a root (this is the Root_Scope from
      --  the current analysis context), or null if unknown.
   end record;
   --  Holder for the state of lexical environment dumpers
   function Get_Env_Id
     (E : Lexical_Env; State : in out Dump_Lexical_Env_State) return String;
   --  If E is known, return its unique Id from State. Otherwise, assign it a
   --  new unique Id and return it.
   procedure Print
     (Node        : Langkit_Support.Generic_API.Analysis.Lk_Node;
      Show_Slocs  : Boolean;
      Line_Prefix : String := "");
   --  Helper for the public overload, but working on the generic API node type
   ------------------------
   -- Precomputed_Symbol --
   ------------------------
   pragma Warnings (Off, "referenced");
   function Precomputed_Symbol
     (Index : Precomputed_Symbol_Index) return Text_Type is
   pragma Warnings (On, "referenced");
   begin
         declare
            Raw_Text : constant Text_Type := (case Index is
               when Precomputed_Sym => """&""",
               when Precomputed_Sym_1 => """&""""+""",
               when Precomputed_Sym_10 => """=""",
               when Precomputed_Sym_11 => """>""",
               when Precomputed_Sym_12 => """>=""",
               when Precomputed_Sym_2 => """*""",
               when Precomputed_Sym_20 => "<<>>",
               when Precomputed_Sym_3 => """**""",
               when Precomputed_Sym_4 => """+""",
               when Precomputed_Sym_5 => """-""",
               when Precomputed_Sym_6 => """/""",
               when Precomputed_Sym_7 => """/=""",
               when Precomputed_Sym_8 => """<""",
               when Precomputed_Sym_9 => """<=""",
               when Precomputed_Sym_Abort => "abort",
               when Precomputed_Sym_Abort_Signal => "Abort_Signal",
               when Precomputed_Sym_Abort_Signal_315 => "abort_signal_",
               when Precomputed_Sym_Abs => """abs""",
               when Precomputed_Sym_Abs_316 => "abs",
               when Precomputed_Sym_Abstract => "abstract",
               when Precomputed_Sym_Abstract_State => "Abstract_State",
               when Precomputed_Sym_Accept => "accept",
               when Precomputed_Sym_Access => "Access",
               when Precomputed_Sym_Access_319 => "access",
               when Precomputed_Sym_Ada => "Ada",
               when Precomputed_Sym_Ada_320 => "ada",
               when Precomputed_Sym_Add_Named => "Add_Named",
               when Precomputed_Sym_Add_Unnamed => "Add_Unnamed",
               when Precomputed_Sym_Address => "Address",
               when Precomputed_Sym_Address_Size => "Address_Size",
               when Precomputed_Sym_Adjacent => "Adjacent",
               when Precomputed_Sym_Adjacent_321 => "adjacent",
               when Precomputed_Sym_Aft => "Aft",
               when Precomputed_Sym_Aggregate => "Aggregate",
               when Precomputed_Sym_Aliased => "aliased",
               when Precomputed_Sym_Alignment => "Alignment",
               when Precomputed_Sym_All => "all",
               when Precomputed_Sym_And => """and""",
               when Precomputed_Sym_And_324 => "and",
               when Precomputed_Sym_Annotate => "Annotate",
               when Precomputed_Sym_Array => "array",
               when Precomputed_Sym_Asm_Input => "Asm_Input",
               when Precomputed_Sym_Asm_Input_326 => "asm_input",
               when Precomputed_Sym_Asm_Input_Operand => "Asm_Input_Operand",
               when Precomputed_Sym_Asm_Output => "Asm_Output",
               when Precomputed_Sym_Asm_Output_327 => "asm_output",
               when Precomputed_Sym_Asm_Output_Operand => "Asm_Output_Operand",
               when Precomputed_Sym_Assert => "Assert",
               when Precomputed_Sym_Assert_And_Cut => "Assert_And_Cut",
               when Precomputed_Sym_Assume => "Assume",
               when Precomputed_Sym_Asynchronous => "Asynchronous",
               when Precomputed_Sym_At => "at",
               when Precomputed_Sym_Atomic => "Atomic",
               when Precomputed_Sym_Atomic_Components => "Atomic_Components",
               when Precomputed_Sym_Attach_Handler => "Attach_Handler",
               when Precomputed_Sym_Aux_Dec => "Aux_DEC",
               when Precomputed_Sym_Base => "Base",
               when Precomputed_Sym_Begin => "begin",
               when Precomputed_Sym_Big_Integer => "Big_Integer",
               when Precomputed_Sym_Big_Integers => "Big_Integers",
               when Precomputed_Sym_Big_Numbers => "Big_Numbers",
               when Precomputed_Sym_Bit_Order => "Bit_Order",
               when Precomputed_Sym_Body => "body",
               when Precomputed_Sym_Boolean => "Boolean",
               when Precomputed_Sym_Buffer => "Buffer",
               when Precomputed_Sym_By_Entry => "By_Entry",
               when Precomputed_Sym_Callable => "Callable",
               when Precomputed_Sym_Caller => "Caller",
               when Precomputed_Sym_Case => "case",
               when Precomputed_Sym_Ceiling => "Ceiling",
               when Precomputed_Sym_Ceiling_332 => "ceiling",
               when Precomputed_Sym_Character => "Character",
               when Precomputed_Sym_Class => "Class",
               when Precomputed_Sym_Code_Address => "Code_Address",
               when Precomputed_Sym_Compile_Time_Error => "Compile_Time_Error",
               when Precomputed_Sym_Compile_Time_Warning => "Compile_Time_Warning",
               when Precomputed_Sym_Component_Size => "Component_Size",
               when Precomputed_Sym_Compose => "Compose",
               when Precomputed_Sym_Compose_333 => "compose",
               when Precomputed_Sym_Constant => "constant",
               when Precomputed_Sym_Constant_Indexing => "Constant_Indexing",
               when Precomputed_Sym_Constrained => "Constrained",
               when Precomputed_Sym_Contract_Cases => "Contract_Cases",
               when Precomputed_Sym_Convention => "Convention",
               when Precomputed_Sym_Copy_Sign => "Copy_Sign",
               when Precomputed_Sym_Copy_Sign_335 => "copy_sign",
               when Precomputed_Sym_Count => "Count",
               when Precomputed_Sym_Cursor => "Cursor",
               when Precomputed_Sym_Debug => "Debug",
               when Precomputed_Sym_Declare => "declare",
               when Precomputed_Sym_Decreases => "Decreases",
               when Precomputed_Sym_Default_Bit_Order => "Default_Bit_Order",
               when Precomputed_Sym_Default_Initial_Condition => "Default_Initial_Condition",
               when Precomputed_Sym_Default_Iterator => "Default_Iterator",
               when Precomputed_Sym_Default_Scalar_Storage_Order => "Default_Scalar_Storage_Order",
               when Precomputed_Sym_Definite => "Definite",
               when Precomputed_Sym_Delay => "delay",
               when Precomputed_Sym_Delta => "Delta",
               when Precomputed_Sym_Delta_338 => "delta",
               when Precomputed_Sym_Denorm => "Denorm",
               when Precomputed_Sym_Depends => "Depends",
               when Precomputed_Sym_Deref => "Deref",
               when Precomputed_Sym_Descriptor_Size => "Descriptor_Size",
               when Precomputed_Sym_Digits => "Digits",
               when Precomputed_Sym_Digits_339 => "digits",
               when Precomputed_Sym_Discard_Names => "Discard_Names",
               when Precomputed_Sym_Do => "do",
               when Precomputed_Sym_Dummy => "__dummy",
               when Precomputed_Sym_Duration => "Duration",
               when Precomputed_Sym_Dynamic_Predicate => "Dynamic_Predicate",
               when Precomputed_Sym_Elaborate_Body => "Elaborate_Body",
               when Precomputed_Sym_Element => "Element",
               when Precomputed_Sym_Else => "else",
               when Precomputed_Sym_Elsif => "elsif",
               when Precomputed_Sym_Enabled => "Enabled",
               when Precomputed_Sym_End => "end",
               when Precomputed_Sym_Ensures => "Ensures",
               when Precomputed_Sym_Entity => "Entity",
               when Precomputed_Sym_Entry => "entry",
               when Precomputed_Sym_Enum_Rep => "Enum_Rep",
               when Precomputed_Sym_Enum_Rep_345 => "enum_rep",
               when Precomputed_Sym_Enum_Val => "Enum_Val",
               when Precomputed_Sym_Enum_Val_346 => "enum_val",
               when Precomputed_Sym_Epsilon => "Epsilon",
               when Precomputed_Sym_Exception => "exception",
               when Precomputed_Sym_Exception_Id => "Exception_Id",
               when Precomputed_Sym_Exception_Occurrence => "Exception_Occurrence",
               when Precomputed_Sym_Exceptions => "Exceptions",
               when Precomputed_Sym_Exit => "exit",
               when Precomputed_Sym_Exponent => "Exponent",
               when Precomputed_Sym_Exponent_349 => "exponent",
               when Precomputed_Sym_Export => "Export",
               when Precomputed_Sym_External_Tag => "External_Tag",
               when Precomputed_Sym_Fast_Math => "Fast_Math",
               when Precomputed_Sym_Finalization_Size => "Finalization_Size",
               when Precomputed_Sym_First => "First",
               when Precomputed_Sym_First_Bit => "First_Bit",
               when Precomputed_Sym_First_Valid => "First_Valid",
               when Precomputed_Sym_Fixed_Value => "Fixed_Value",
               when Precomputed_Sym_Fixed_Value_350 => "fixed_value",
               when Precomputed_Sym_Floor => "Floor",
               when Precomputed_Sym_Floor_351 => "floor",
               when Precomputed_Sym_For => "for",
               when Precomputed_Sym_Fore => "Fore",
               when Precomputed_Sym_Fraction => "Fraction",
               when Precomputed_Sym_Fraction_353 => "fraction",
               when Precomputed_Sym_Function => "function",
               when Precomputed_Sym_Generic => "generic",
               when Precomputed_Sym_Ghost => "Ghost",
               when Precomputed_Sym_Global => "Global",
               when Precomputed_Sym_Gnat => "GNAT",
               when Precomputed_Sym_Gnatprove => "GNATprove",
               when Precomputed_Sym_Goto => "goto",
               when Precomputed_Sym_Has_Access_Values => "Has_Access_Values",
               when Precomputed_Sym_Has_Discriminants => "Has_Discriminants",
               when Precomputed_Sym_Has_Same_Storage => "Has_Same_Storage",
               when Precomputed_Sym_Has_Tagged_Values => "Has_Tagged_Values",
               when Precomputed_Sym_Identity => "Identity",
               when Precomputed_Sym_If => "if",
               when Precomputed_Sym_Image => "Image",
               when Precomputed_Sym_Image_358 => "image",
               when Precomputed_Sym_Img => "Img",
               when Precomputed_Sym_Implicit_Dereference => "Implicit_Dereference",
               when Precomputed_Sym_Import => "Import",
               when Precomputed_Sym_Import_Function => "Import_Function",
               when Precomputed_Sym_Import_Procedure => "Import_Procedure",
               when Precomputed_Sym_In => "in",
               when Precomputed_Sym_Increases => "Increases",
               when Precomputed_Sym_Independent => "Independent",
               when Precomputed_Sym_Independent_Components => "Independent_Components",
               when Precomputed_Sym_Index => "Index",
               when Precomputed_Sym_Initial_Condition => "Initial_Condition",
               when Precomputed_Sym_Initialized => "Initialized",
               when Precomputed_Sym_Inline => "Inline",
               when Precomputed_Sym_Input => "Input",
               when Precomputed_Sym_Input_360 => "input",
               when Precomputed_Sym_Integer => "Integer",
               when Precomputed_Sym_Integer_Literal => "Integer_Literal",
               when Precomputed_Sym_Integer_Value => "Integer_Value",
               when Precomputed_Sym_Integer_Value_361 => "integer_value",
               when Precomputed_Sym_Interface => "Interface",
               when Precomputed_Sym_Interface_362 => "interface",
               when Precomputed_Sym_Interrupt_Handler => "Interrupt_Handler",
               when Precomputed_Sym_Invalid_Value => "Invalid_Value",
               when Precomputed_Sym_Invariant => "Invariant",
               when Precomputed_Sym_Invariant_Class => "Invariant'Class",
               when Precomputed_Sym_Is => "is",
               when Precomputed_Sym_Iterable => "Iterable",
               when Precomputed_Sym_Iterator_Element => "Iterator_Element",
               when Precomputed_Sym_Iterator_Interfaces => "Iterator_Interfaces",
               when Precomputed_Sym_Large => "Large",
               when Precomputed_Sym_Last => "Last",
               when Precomputed_Sym_Last_Bit => "Last_Bit",
               when Precomputed_Sym_Last_Valid => "Last_Valid",
               when Precomputed_Sym_Leading_Part => "Leading_Part",
               when Precomputed_Sym_Leading_Part_364 => "leading_part",
               when Precomputed_Sym_Left => "left",
               when Precomputed_Sym_Length => "Length",
               when Precomputed_Sym_Library_Level => "Library_Level",
               when Precomputed_Sym_Limited => "limited",
               when Precomputed_Sym_Loop => "loop",
               when Precomputed_Sym_Loop_Entry => "Loop_Entry",
               when Precomputed_Sym_Loop_Invariant => "Loop_Invariant",
               when Precomputed_Sym_Machine => "Machine",
               when Precomputed_Sym_Machine_368 => "machine",
               when Precomputed_Sym_Machine_Code => "Machine_Code",
               when Precomputed_Sym_Machine_Emax => "Machine_Emax",
               when Precomputed_Sym_Machine_Emin => "Machine_Emin",
               when Precomputed_Sym_Machine_Mantissa => "Machine_Mantissa",
               when Precomputed_Sym_Machine_Overflows => "Machine_Overflows",
               when Precomputed_Sym_Machine_Radix => "Machine_Radix",
               when Precomputed_Sym_Machine_Rounding => "Machine_Rounding",
               when Precomputed_Sym_Machine_Rounding_369 => "machine_rounding",
               when Precomputed_Sym_Machine_Rounds => "Machine_Rounds",
               when Precomputed_Sym_Mantissa => "Mantissa",
               when Precomputed_Sym_Max => "Max",
               when Precomputed_Sym_Max_370 => "max",
               when Precomputed_Sym_Max_Alignment_For_Allocation => "Max_Alignment_For_Allocation",
               when Precomputed_Sym_Max_Integer_Size => "Max_Integer_Size",
               when Precomputed_Sym_Max_Size_In_Storage_Elements => "Max_Size_In_Storage_Elements",
               when Precomputed_Sym_Maximum_Alignment => "Maximum_Alignment",
               when Precomputed_Sym_Mechanism_Code => "Mechanism_Code",
               when Precomputed_Sym_Min => "Min",
               when Precomputed_Sym_Min_371 => "min",
               when Precomputed_Sym_Mod => """mod""",
               when Precomputed_Sym_Mod_170 => "Mod",
               when Precomputed_Sym_Mod_372 => "mod",
               when Precomputed_Sym_Model => "Model",
               when Precomputed_Sym_Model_373 => "model",
               when Precomputed_Sym_Model_Emin => "Model_Emin",
               when Precomputed_Sym_Model_Epsilon => "Model_Epsilon",
               when Precomputed_Sym_Model_Mantissa => "Model_Mantissa",
               when Precomputed_Sym_Model_Of => "Model_Of",
               when Precomputed_Sym_Model_Small => "Model_Small",
               when Precomputed_Sym_Modulus => "Modulus",
               when Precomputed_Sym_New => "new",
               when Precomputed_Sym_Nextpart => "__nextpart",
               when Precomputed_Sym_No_Elaboration_Code => "No_Elaboration_Code",
               when Precomputed_Sym_No_Elaboration_Code_All => "No_Elaboration_Code_All",
               when Precomputed_Sym_No_Return => "No_Return",
               when Precomputed_Sym_Not => """not""",
               when Precomputed_Sym_Not_375 => "not",
               when Precomputed_Sym_Null => "null",
               when Precomputed_Sym_Numerics => "Numerics",
               when Precomputed_Sym_Object_Size => "Object_Size",
               when Precomputed_Sym_Obsolescent => "Obsolescent",
               when Precomputed_Sym_Of => "of",
               when Precomputed_Sym_Off => "Off",
               when Precomputed_Sym_Old => "Old",
               when Precomputed_Sym_On => "On",
               when Precomputed_Sym_Or => """or""",
               when Precomputed_Sym_Or_378 => "or",
               when Precomputed_Sym_Others => "others",
               when Precomputed_Sym_Out => "out",
               when Precomputed_Sym_Output => "Output",
               when Precomputed_Sym_Output_381 => "output",
               when Precomputed_Sym_Overlaps_Storage => "Overlaps_Storage",
               when Precomputed_Sym_Overriding => "overriding",
               when Precomputed_Sym_Pack => "Pack",
               when Precomputed_Sym_Package => "package",
               when Precomputed_Sym_Passed_By_Reference => "Passed_By_Reference",
               when Precomputed_Sym_Pos => "Pos",
               when Precomputed_Sym_Pos_384 => "pos",
               when Precomputed_Sym_Position => "Position",
               when Precomputed_Sym_Post => "Post",
               when Precomputed_Sym_Post_Class => "Post'Class",
               when Precomputed_Sym_Postcondition => "Postcondition",
               when Precomputed_Sym_Postcondition_Class => "Postcondition'Class",
               when Precomputed_Sym_Pragma => "pragma",
               when Precomputed_Sym_Pre => "Pre",
               when Precomputed_Sym_Pre_Class => "Pre'Class",
               when Precomputed_Sym_Precondition => "Precondition",
               when Precomputed_Sym_Precondition_Class => "Precondition'Class",
               when Precomputed_Sym_Pred => "Pred",
               when Precomputed_Sym_Pred_386 => "pred",
               when Precomputed_Sym_Predicate => "Predicate",
               when Precomputed_Sym_Predicate_Failure => "Predicate_Failure",
               when Precomputed_Sym_Preelaborable_Initialization => "Preelaborable_Initialization",
               when Precomputed_Sym_Preelaborate => "Preelaborate",
               when Precomputed_Sym_Private => "private",
               when Precomputed_Sym_Privatepart => "__privatepart",
               when Precomputed_Sym_Procedure => "procedure",
               when Precomputed_Sym_Protected => "protected",
               when Precomputed_Sym_Pure => "Pure",
               when Precomputed_Sym_Put_Image => "Put_Image",
               when Precomputed_Sym_Put_Image_390 => "put_image",
               when Precomputed_Sym_Raise => "raise",
               when Precomputed_Sym_Range => "Range",
               when Precomputed_Sym_Range_392 => "range",
               when Precomputed_Sym_Range_Length => "Range_Length",
               when Precomputed_Sym_Read => "Read",
               when Precomputed_Sym_Read_393 => "read",
               when Precomputed_Sym_Real_Literal => "Real_Literal",
               when Precomputed_Sym_Record => "record",
               when Precomputed_Sym_Reduce => "Reduce",
               when Precomputed_Sym_Refined_Depends => "Refined_Depends",
               when Precomputed_Sym_Refined_Global => "Refined_Global",
               when Precomputed_Sym_Refined_Post => "Refined_Post",
               when Precomputed_Sym_Refined_State => "Refined_State",
               when Precomputed_Sym_Rem => """rem""",
               when Precomputed_Sym_Rem_395 => "rem",
               when Precomputed_Sym_Remainder => "Remainder",
               when Precomputed_Sym_Remainder_396 => "remainder",
               when Precomputed_Sym_Remote_Call_Interface => "Remote_Call_Interface",
               when Precomputed_Sym_Remote_Types => "Remote_Types",
               when Precomputed_Sym_Renames => "renames",
               when Precomputed_Sym_Requeue => "requeue",
               when Precomputed_Sym_Requires => "Requires",
               when Precomputed_Sym_Restrictions => "Restrictions",
               when Precomputed_Sym_Result => "Result",
               when Precomputed_Sym_Return => "return",
               when Precomputed_Sym_Reverse => "reverse",
               when Precomputed_Sym_Right => "right",
               when Precomputed_Sym_Root_Buffer_Type => "Root_Buffer_Type",
               when Precomputed_Sym_Root_Integer => "root_integer",
               when Precomputed_Sym_Root_Real => "root_real",
               when Precomputed_Sym_Root_Storage_Pool => "Root_Storage_Pool",
               when Precomputed_Sym_Root_Stream_Type => "Root_Stream_Type",
               when Precomputed_Sym_Root_Types => "root_types_",
               when Precomputed_Sym_Round => "Round",
               when Precomputed_Sym_Round_405 => "round",
               when Precomputed_Sym_Rounding => "Rounding",
               when Precomputed_Sym_Rounding_406 => "rounding",
               when Precomputed_Sym_S => "S",
               when Precomputed_Sym_Safe_First => "Safe_First",
               when Precomputed_Sym_Safe_Large => "Safe_Large",
               when Precomputed_Sym_Safe_Last => "Safe_Last",
               when Precomputed_Sym_Safe_Small => "Safe_Small",
               when Precomputed_Sym_Scalar_Storage_Order => "Scalar_Storage_Order",
               when Precomputed_Sym_Scale => "Scale",
               when Precomputed_Sym_Scaling => "Scaling",
               when Precomputed_Sym_Scaling_407 => "scaling",
               when Precomputed_Sym_Select => "select",
               when Precomputed_Sym_Separate => "separate",
               when Precomputed_Sym_Shared_Passive => "Shared_Passive",
               when Precomputed_Sym_Signed_Zeros => "Signed_Zeros",
               when Precomputed_Sym_Size => "Size",
               when Precomputed_Sym_Skip_Flow_And_Proof => "Skip_Flow_And_Proof",
               when Precomputed_Sym_Skip_Proof => "Skip_Proof",
               when Precomputed_Sym_Small => "Small",
               when Precomputed_Sym_Small_Denominator => "Small_Denominator",
               when Precomputed_Sym_Small_Numerator => "Small_Numerator",
               when Precomputed_Sym_Some => "some",
               when Precomputed_Sym_Spark_Mode => "SPARK_Mode",
               when Precomputed_Sym_Stable_Properties => "Stable_Properties",
               when Precomputed_Sym_Standard => "Standard",
               when Precomputed_Sym_Standard_411 => "standard",
               when Precomputed_Sym_Static_Predicate => "Static_Predicate",
               when Precomputed_Sym_Storage_Elements => "Storage_Elements",
               when Precomputed_Sym_Storage_Pool => "Storage_Pool",
               when Precomputed_Sym_Storage_Pools => "Storage_Pools",
               when Precomputed_Sym_Storage_Size => "Storage_Size",
               when Precomputed_Sym_Storage_Unit => "Storage_Unit",
               when Precomputed_Sym_Stream_Size => "Stream_Size",
               when Precomputed_Sym_Streams => "Streams",
               when Precomputed_Sym_String => "String",
               when Precomputed_Sym_String_Literal => "String_Literal",
               when Precomputed_Sym_Strings => "Strings",
               when Precomputed_Sym_Structural => "Structural",
               when Precomputed_Sym_Style_Checks => "Style_Checks",
               when Precomputed_Sym_Subprogram_Variant => "Subprogram_Variant",
               when Precomputed_Sym_Subtype => "subtype",
               when Precomputed_Sym_Succ => "Succ",
               when Precomputed_Sym_Succ_413 => "succ",
               when Precomputed_Sym_Synchronization => "Synchronization",
               when Precomputed_Sym_Synchronized => "synchronized",
               when Precomputed_Sym_System => "System",
               when Precomputed_Sym_System_Allocator_Alignment => "System_Allocator_Alignment",
               when Precomputed_Sym_Tag => "Tag",
               when Precomputed_Sym_Tagged => "tagged",
               when Precomputed_Sym_Tags => "Tags",
               when Precomputed_Sym_Target_Name => "Target_Name",
               when Precomputed_Sym_Task => "task",
               when Precomputed_Sym_Task_Id => "Task_Id",
               when Precomputed_Sym_Task_Identification => "Task_Identification",
               when Precomputed_Sym_Terminate => "terminate",
               when Precomputed_Sym_Terminated => "Terminated",
               when Precomputed_Sym_Test_Case => "Test_Case",
               when Precomputed_Sym_Text_Buffers => "Text_Buffers",
               when Precomputed_Sym_Text_Io => "text_io",
               when Precomputed_Sym_Then => "then",
               when Precomputed_Sym_To_Address => "To_Address",
               when Precomputed_Sym_Truncation => "Truncation",
               when Precomputed_Sym_Truncation_420 => "truncation",
               when Precomputed_Sym_Type => "type",
               when Precomputed_Sym_Type_Class => "Type_Class",
               when Precomputed_Sym_Type_Invariant => "Type_Invariant",
               when Precomputed_Sym_Type_Invariant_Class => "Type_Invariant'Class",
               when Precomputed_Sym_Type_Key => "Type_Key",
               when Precomputed_Sym_Unbiased_Rounding => "Unbiased_Rounding",
               when Precomputed_Sym_Unbiased_Rounding_422 => "unbiased_rounding",
               when Precomputed_Sym_Unchecked_Access => "Unchecked_Access",
               when Precomputed_Sym_Unchecked_Union => "Unchecked_Union",
               when Precomputed_Sym_Unconstrained_Array => "Unconstrained_Array",
               when Precomputed_Sym_Universal_Fixed_Type => "Universal_Fixed_Type_",
               when Precomputed_Sym_Universal_Int_Type => "Universal_Int_Type_",
               when Precomputed_Sym_Universal_Real_Type => "Universal_Real_Type_",
               when Precomputed_Sym_Unreferenced => "Unreferenced",
               when Precomputed_Sym_Unrestricted_Access => "Unrestricted_Access",
               when Precomputed_Sym_Until => "until",
               when Precomputed_Sym_Update => "Update",
               when Precomputed_Sym_Use => "use",
               when Precomputed_Sym_Vads_Size => "VADS_Size",
               when Precomputed_Sym_Val => "Val",
               when Precomputed_Sym_Val_425 => "val",
               when Precomputed_Sym_Valid => "Valid",
               when Precomputed_Sym_Valid_Scalars => "Valid_Scalars",
               when Precomputed_Sym_Value => "Value",
               when Precomputed_Sym_Value_426 => "value",
               when Precomputed_Sym_Value_Size => "Value_Size",
               when Precomputed_Sym_Variable_Indexing => "Variable_Indexing",
               when Precomputed_Sym_Volatile => "Volatile",
               when Precomputed_Sym_Volatile_Components => "Volatile_Components",
               when Precomputed_Sym_Warnings => "Warnings",
               when Precomputed_Sym_Wchar_T_Size => "Wchar_T_Size",
               when Precomputed_Sym_When => "when",
               when Precomputed_Sym_While => "while",
               when Precomputed_Sym_Wide_Character => "Wide_Character",
               when Precomputed_Sym_Wide_Image => "Wide_Image",
               when Precomputed_Sym_Wide_Image_429 => "wide_image",
               when Precomputed_Sym_Wide_String => "Wide_String",
               when Precomputed_Sym_Wide_Text_Io => "wide_text_io",
               when Precomputed_Sym_Wide_Value => "Wide_Value",
               when Precomputed_Sym_Wide_Value_431 => "wide_value",
               when Precomputed_Sym_Wide_Wide_Character => "Wide_Wide_Character",
               when Precomputed_Sym_Wide_Wide_Image => "Wide_Wide_Image",
               when Precomputed_Sym_Wide_Wide_Image_432 => "wide_wide_image",
               when Precomputed_Sym_Wide_Wide_String => "Wide_Wide_String",
               when Precomputed_Sym_Wide_Wide_Text_Io => "wide_wide_text_io",
               when Precomputed_Sym_Wide_Wide_Value => "Wide_Wide_Value",
               when Precomputed_Sym_Wide_Wide_Value_434 => "wide_wide_value",
               when Precomputed_Sym_Width => "Width",
               when Precomputed_Sym_With => "with",
               when Precomputed_Sym_Word_Size => "Word_Size",
               when Precomputed_Sym_Write => "Write",
               when Precomputed_Sym_Write_436 => "write",
               when Precomputed_Sym_Xor => """xor""",
               when Precomputed_Sym_Xor_437 => "xor"
            );
            Symbol : constant Symbolization_Result :=
                  Libadalang.Sources.Canonicalize (Raw_Text)
            ;
         begin
            if Symbol.Success then
               return Symbol.Symbol;
            else
               raise Program_Error with
                 "Cannot canonicalize symbol literal: " & Image (Raw_Text);
            end if;
         end;
   end Precomputed_Symbol;
   ----------------------------
   -- Construct_Entity_Array --
   ----------------------------
   function Construct_Entity_Array
     (V : AST_Envs.Entity_Vectors.Vector) return Internal_Entity_Array_Access
   is
      Ret : Internal_Entity_Array_Access :=
        Create_Internal_Entity_Array (V.Length);
   begin
      for J in V.First_Index .. V.Last_Index loop
         Ret.Items (J) := V.Get (J);
      end loop;
      declare
         Tmp : AST_Envs.Entity_Vectors.Vector := V;
      begin
         Tmp.Destroy;
      end;
      return Ret;
   end Construct_Entity_Array;
   -----------
   -- Image --
   -----------
   function Image (Self : Symbol_Type) return String_Type is
   begin
      return Create_String (Image (Self));
   end Image;
   ------------------
   -- Context_Pool --
   ------------------
   package body Context_Pool is
      -------------
      -- Acquire --
      -------------
      procedure Acquire (Context : out Internal_Context) is
      begin
         GNAT.Task_Lock.Lock;
         if Available.Is_Empty then
            Context := new Analysis_Context_Type;
            Context.Serial_Number := 1;
         else
            Context := Available.Last_Element;
            Available.Delete_Last;
         end if;
         GNAT.Task_Lock.Unlock;
         Context.Initialized := False;
         Context.Ref_Count := 1;
      exception
         when others =>
            GNAT.Task_Lock.Unlock;
            raise;
      end Acquire;
      -------------
      -- Release --
      -------------
      procedure Release (Context : in out Internal_Context) is
      begin
         GNAT.Task_Lock.Lock;
         Available.Append (Context);
         Context.Serial_Number := Context.Serial_Number + 1;
         Context := null;
         GNAT.Task_Lock.Unlock;
      exception
         when others =>
            GNAT.Task_Lock.Unlock;
            raise;
      end Release;
      ----------
      -- Free --
      ----------
      procedure Free is
      begin
         GNAT.Task_Lock.Lock;
         for C of Available loop
            Free (C);
         end loop;
         GNAT.Task_Lock.Unlock;
      exception
         when others =>
            GNAT.Task_Lock.Unlock;
            raise;
      end Free;
   end Context_Pool;
   --------------
   -- Finalize --
   --------------
   overriding procedure Finalize (CD : in out Contexts_Destructor) is
      pragma Unreferenced (CD);
   begin
      Context_Pool.Free;
   end Finalize;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (File_Reader : in out Internal_File_Reader_Access) is
      procedure Destroy is new Ada.Unchecked_Deallocation
        (Internal_File_Reader'Class, Internal_File_Reader_Access);
   begin
      if File_Reader /= null and then File_Reader.all.Dec_Ref then
         Destroy (File_Reader);
      end if;
   end Dec_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (Self : in out Internal_Event_Handler_Access) is
      procedure Destroy is new Ada.Unchecked_Deallocation
        (Internal_Event_Handler'Class, Internal_Event_Handler_Access);
   begin
      if Self /= null and then Self.all.Dec_Ref then
         Destroy (Self);
      end if;
   end Dec_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (Provider : in out Internal_Unit_Provider_Access) is
      procedure Destroy is new Ada.Unchecked_Deallocation
        (Internal_Unit_Provider'Class, Internal_Unit_Provider_Access);
   begin
      if Provider /= null and then Provider.all.Dec_Ref then
         Destroy (Provider);
      end if;
   end Dec_Ref;
   ----------------
   -- Get_Env_Id --
   ----------------
   function Get_Env_Id
     (E : Lexical_Env; State : in out Dump_Lexical_Env_State) return String
   is
      C        : Address_To_Id_Maps.Cursor;
      Inserted : Boolean;
   begin
      if E = Null_Lexical_Env then
         return "$null";
      elsif E = State.Root_Env then
         --  Insert root env with a special Id so that we only print it once
         State.Env_Ids.Insert (E, -1, C, Inserted);
         return "$root";
      end if;
      State.Env_Ids.Insert (E, State.Next_Id, C, Inserted);
      if Inserted then
         State.Next_Id := State.Next_Id + 1;
      end if;
      return '@' & Stripped_Image (Address_To_Id_Maps.Element (C));
   end Get_Env_Id;
   pragma Warnings (Off, "referenced");
   function To_Lookup_Kind_Type (K : Lookup_Kind) return Lookup_Kind_Type
   is
     (Lookup_Kind_Type'Val (Lookup_Kind'Pos (K)));
   pragma Warnings (On, "referenced");
   ----------------------
   -- Allocate_Context --
   ----------------------
   function Allocate_Context return Internal_Context is
   begin
      return Context : Internal_Context do
         Context_Pool.Acquire (Context);
      end return;
   end Allocate_Context;
   ------------------------
   -- Initialize_Context --
   ------------------------
   procedure Initialize_Context
     (Context        : Internal_Context;
      Charset        : String;
      File_Reader    : Internal_File_Reader_Access;
      Unit_Provider  : Internal_Unit_Provider_Access;
      Event_Handler  : Internal_Event_Handler_Access;
      With_Trivia    : Boolean;
      Tab_Stop       : Positive)
   is
      Actual_Charset : constant String :=
        (if Charset = "" then Default_Charset else Charset);
      Symbols        : constant Precomputed_Symbol_Table
        := Create_Symbol_Table;
   begin
      Context.Initialized := True;
      Context.Symbols := Symbol_Table (Symbols);
      Context.Charset := To_Unbounded_String (Actual_Charset);
      Context.Tab_Stop := Tab_Stop;
      Context.With_Trivia := With_Trivia;
      Context.Root_Scope := Create_Static_Lexical_Env
        (Parent    => Null_Lexical_Env,
         Node      => null,
         Sym_Table => Context.Symbols);
      --  Create a new ownership share for Event_Handler so that it lives at
      --  least as long as this analysis context.
      Context.Event_Handler := Event_Handler;
      if Context.Event_Handler /= null then
         Context.Event_Handler.Inc_Ref;
      end if;
      --  Create a new ownership share for File_Reader so that it lives at
      --  least as long as this analysis context.
      Context.File_Reader := File_Reader;
      if Context.File_Reader /= null then
         Context.File_Reader.Inc_Ref;
      end if;
      --  Create a new ownership share for Unit_Provider so that it lives at
      --  least as long as this analysis context.
      Context.Unit_Provider := Unit_Provider;
      if Context.Unit_Provider /= null then
         Context.Unit_Provider.Inc_Ref;
      end if;
         if Context.Unit_Provider = null then
            Context.Unit_Provider := Libadalang.Internal_Default_Provider.Create;
         end if;
      Initialize (Context.Parser);
      Context.Discard_Errors_In_Populate_Lexical_Env := True;
      Context.Logic_Resolution_Timeout :=
        Langkit_Support.Adalog.Default_Timeout_Ticks_Number;
      Context.In_Populate_Lexical_Env := False;
      Context.Cache_Version := 0;
      Context.Reparse_Cache_Version := 0;
      Context.Rewriting_Handle := No_Rewriting_Handle_Pointer;
      Context.Templates_Unit := No_Analysis_Unit;
      Context.Available_Rebindings := Env_Rebindings_Vectors.Empty_Vector;
Context.Target_Info := Placeholder_Target_Info;
Fetch_Standard (Context);
   end Initialize_Context;
   -----------------
   -- Create_Unit --
   -----------------
   function Create_Unit
     (Context             : Internal_Context;
      Normalized_Filename : Virtual_File;
      Charset             : String;
      Rule                : Grammar_Rule) return Internal_Unit
   is
      use Units_Maps;
      Unit : Internal_Unit;
   begin
      Unit := Create_Special_Unit
        (Context, Normalized_Filename, Charset, Rule);
      Context.Units.Insert (Normalized_Filename, Unit);
      return Unit;
   end Create_Unit;
   --------------
   -- Get_Unit --
   --------------
   function Get_Unit
     (Context           : Internal_Context;
      Filename, Charset : String;
      Reparse           : Boolean;
      Input             : Internal_Lexer_Input;
      Rule              : Grammar_Rule;
      Is_Internal       : Boolean := False) return Internal_Unit
   is
      use Units_Maps;
      Normalized_Filename : constant GNATCOLL.VFS.Virtual_File :=
         Normalized_Unit_Filename (Context, Filename);
      Cur     : constant Cursor :=
         Context.Units.Find (Normalized_Filename);
      Created : constant Boolean := Cur = No_Element;
      Unit    : Internal_Unit;
      Actual_Charset : Unbounded_String;
      Refined_Input  : Internal_Lexer_Input := Input;
   begin
      --  Determine which encoding to use. Use the Charset parameter (if
      --  provided), otherwise use the context-wide default.
      Actual_Charset := (if Charset'Length /= 0
                         then To_Unbounded_String (Charset)
                         else Context.Charset);
      if Refined_Input.Kind = File then
         Refined_Input.Filename := Normalized_Filename;
      end if;
      if Refined_Input.Kind in File | Bytes_Buffer then
         Refined_Input.Charset := Actual_Charset;
         --  Unless the caller requested a specific charset for this unit,
         --  allow the lexer to automatically discover the source file encoding
         --  before defaulting to the context-specific one. We do this trying
         --  to match a byte order mark.
         Refined_Input.Read_BOM := Charset'Length = 0;
      end if;
      --  Create the Internal_Unit if needed
      Unit :=
        (if Created
         then Create_Unit (Context, Normalized_Filename,
                           To_String (Actual_Charset), Rule)
         else Element (Cur));
      --  If an internal unit is requested, set the corresponding flag.
      --  Otherwise, make sure that the unit we return isn't internal.
      if Is_Internal then
         Unit.Is_Internal := True;
      end if;
      --  (Re)parse it if needed
      if Created or else Reparse then
         --  It is illegal to reparse an internal unit for public API users.
         --  Since public APIs do not allow to pass True to Is_Internal, we can
         --  check here that only the implementation can ask to reparse an
         --  internal unit.
         if Unit.Is_Internal and then not Is_Internal then
            raise Precondition_Failure with "cannot reparse an internal unit";
         end if;
         declare
            Reparsed : Reparsed_Unit;
         begin
            Do_Parsing (Unit, Refined_Input, Reparsed);
            Update_After_Reparse (Unit, Reparsed);
         end;
         --  Now that we have removed reparsed the unit, update its current
         --  charset.
         Unit.Charset := Actual_Charset;
      end if;
      if Context.Event_Handler /= null then
         Context.Event_Handler.Unit_Parsed_Callback
           (Context  => Context,
            Unit     => Unit,
            Reparsed => not Created and then Reparse);
      end if;
      return Unit;
   end Get_Unit;
   --------------
   -- Has_Unit --
   --------------
   function Has_Unit
     (Context : Internal_Context; Unit_Filename : String) return Boolean is
   begin
      return Context.Units.Contains
        (Normalized_Unit_Filename (Context, Unit_Filename));
   end Has_Unit;
   -------------------
   -- Get_From_File --
   -------------------
   function Get_From_File
     (Context  : Internal_Context;
      Filename : String;
      Charset  : String;
      Reparse  : Boolean;
      Rule     : Grammar_Rule) return Internal_Unit
   is
      Input : constant Internal_Lexer_Input :=
        (Kind     => File,
         Charset  => <>,
         Read_BOM => False,
         Filename => <>);
   begin
      if Reparse and then Has_Rewriting_Handle (Context) then
         raise Precondition_Failure with
            "cannot reparse during tree rewriting";
      end if;
      return Get_Unit (Context, Filename, Charset, Reparse, Input, Rule);
   end Get_From_File;
   ---------------------
   -- Get_From_Buffer --
   ---------------------
   function Get_From_Buffer
     (Context  : Internal_Context;
      Filename : String;
      Charset  : String;
      Buffer   : String;
      Rule     : Grammar_Rule) return Internal_Unit
   is
      Input : constant Internal_Lexer_Input :=
        (Kind        => Bytes_Buffer,
         Charset     => <>,
         Read_BOM    => False,
         Bytes       => Buffer'Address,
         Bytes_Count => Buffer'Length);
   begin
      if Has_Rewriting_Handle (Context) then
         raise Precondition_Failure with
            "cannot parse from buffer during tree rewriting";
      elsif Context.File_Reader /= null then
         raise Precondition_Failure with
            "cannot parse from buffer with a file reader";
      end if;
      return Get_Unit (Context, Filename, Charset, True, Input, Rule);
   end Get_From_Buffer;
   --------------------
   -- Get_With_Error --
   --------------------
   function Get_With_Error
     (Context  : Internal_Context;
      Filename : String;
      Error    : Text_Type;
      Charset  : String;
      Rule     : Grammar_Rule) return Internal_Unit
   is
      use Units_Maps;
      Normalized_Filename : constant Virtual_File :=
         Normalized_Unit_Filename (Context, Filename);
      Cur                 : constant Cursor :=
         Context.Units.Find (Normalized_Filename);
   begin
      if Cur = No_Element then
         declare
            Unit : constant Internal_Unit := Create_Unit
              (Context, Normalized_Filename, Charset, Rule);
         begin
            Append (Unit.Diagnostics, No_Source_Location_Range, Error);
            return Unit;
         end;
      else
         return Element (Cur);
      end if;
   end Get_With_Error;
   -----------------------
   -- Get_From_Provider --
   -----------------------
   function Get_From_Provider
     (Context : Internal_Context;
      Name    : Text_Type;
      Kind    : Analysis_Unit_Kind;
      Charset : String;
      Reparse : Boolean) return Internal_Unit is
   begin
      if Reparse and then Has_Rewriting_Handle (Context) then
         raise Precondition_Failure with
            "cannot reparse during tree rewriting";
      end if;
      declare
         Result      : Internal_Unit;
         Dummy_Index : Positive;
      begin
         Context.Unit_Provider.Get_Unit_And_PLE_Root
           (Context, Name, Kind, Charset, Reparse, Result, Dummy_Index);
         return Result;
      exception
         when Precondition_Failure | Property_Error =>
            raise Invalid_Unit_Name_Error with
               "Invalid unit name: " & Image (Name, With_Quotes => True)
               & " (" & Analysis_Unit_Kind'Image (Kind) & ")";
      end;
   end Get_From_Provider;
   -------------------
   -- Unit_Provider --
   -------------------
   function Unit_Provider
     (Context : Internal_Context) return Internal_Unit_Provider_Access
   is (Context.Unit_Provider);
   ------------------
   -- Resolve_Unit --
   ------------------
   procedure Resolve_Unit
     (Context : Internal_Context;
      Name    : Text_Type;
      Kind    : Analysis_Unit_Kind;
      Unit    : out Resolved_Unit)
   is
      --  Look for the cache entry corresponding to Unit; create one if needed
      Dummy    : Resolved_Unit_Array;
      Key      : constant Symbol_Type := Find (Context.Symbols, Name);
      Pos      : Unit_Provider_Cache_Maps.Cursor;
      Inserted : Boolean;
   begin
      Context.Unit_Provider_Cache.Insert (Key, Dummy, Pos, Inserted);
      declare
         Units : Resolved_Unit_Array renames
           Context.Unit_Provider_Cache.Reference (Pos);
         U     : Resolved_Unit renames Units (Kind);
      begin
         --  If the cache entry is not populated for the requested kind, run
         --  the query and save the result for later requests.
         if U.Filename = null then
            declare
               Provider : Internal_Unit_Provider'Class renames
                 Context.Unit_Provider.all;
               Filename : Unbounded_String;
            begin
               Provider.Get_Unit_Location
                 (Name           => Name,
                  Kind           => Kind,
                  Filename       => Filename,
                  PLE_Root_Index => U.PLE_Root_Index);
               Provider.Get_Unit_And_PLE_Root
                 (Context        => Context,
                  Name           => Name,
                  Kind           => Kind,
                  Unit           => U.Unit,
                  PLE_Root_Index => U.PLE_Root_Index);
               U.Filename := new String'(To_String (Filename));
            end;
         end if;
         Unit := U;
      end;
   end Resolve_Unit;
   -----------------------
   -- Get_Unit_Location --
   -----------------------
   procedure Get_Unit_Location
     (Context        : Internal_Context;
      Name           : Text_Type;
      Kind           : Analysis_Unit_Kind;
      Filename       : out String_Access;
      PLE_Root_Index : out Positive)
   is
      U : Resolved_Unit;
   begin
      Resolve_Unit (Context, Name, Kind, U);
      Filename := U.Filename;
      PLE_Root_Index := U.PLE_Root_Index;
   end Get_Unit_Location;
   ---------------------------
   -- Get_Unit_And_PLE_Root --
   ---------------------------
   procedure Get_Unit_And_PLE_Root
     (Context        : Internal_Context;
      Name           : Text_Type;
      Kind           : Analysis_Unit_Kind;
      Unit           : out Internal_Unit;
      PLE_Root_Index : out Positive)
   is
      U : Resolved_Unit;
   begin
      Resolve_Unit (Context, Name, Kind, U);
      Unit := U.Unit;
      PLE_Root_Index := U.PLE_Root_Index;
   end Get_Unit_And_PLE_Root;
   ----------
   -- Hash --
   ----------
   function Hash (Context : Internal_Context) return Hash_Type is
      function H is new Hash_Access (Analysis_Context_Type, Internal_Context);
   begin
      return H (Context);
   end Hash;
   ---------------------
   -- Has_With_Trivia --
   ---------------------
   function Has_With_Trivia (Context : Internal_Context) return Boolean is
   begin
      return Context.With_Trivia;
   end Has_With_Trivia;
   --------------------------------------------
   -- Discard_Errors_In_Populate_Lexical_Env --
   --------------------------------------------
   procedure Discard_Errors_In_Populate_Lexical_Env
     (Context : Internal_Context; Discard : Boolean) is
   begin
      Context.Discard_Errors_In_Populate_Lexical_Env := Discard;
   end Discard_Errors_In_Populate_Lexical_Env;
   ----------------------------------
   -- Set_Logic_Resolution_Timeout --
   ----------------------------------
   procedure Set_Logic_Resolution_Timeout
     (Context : Internal_Context; Timeout : Natural) is
   begin
      Context.Logic_Resolution_Timeout := Timeout;
   end Set_Logic_Resolution_Timeout;
   --------------------------
   -- Has_Rewriting_Handle --
   --------------------------
   function Has_Rewriting_Handle (Context : Internal_Context) return Boolean is
   begin
      return Context.Rewriting_Handle /= No_Rewriting_Handle_Pointer;
   end Has_Rewriting_Handle;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (Context : Internal_Context) is
   begin
      if Context /= null then
         Context.Ref_Count := Context.Ref_Count + 1;
      end if;
   end Inc_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (Context : in out Internal_Context) is
   begin
      if Context /= null then
         Context.Ref_Count := Context.Ref_Count - 1;
         if Context.Ref_Count = 0 then
            --  If this context was not completely initialized, just release
            --  the allocated object. Do the full destruction otherwise.
            if Context.Initialized then
               Destroy (Context);
            end if;
            Context_Pool.Release (Context);
         end if;
      end if;
   end Dec_Ref;
   -------------
   -- Destroy --
   -------------
   procedure Destroy (Context : Internal_Context) is
   begin
      --  Destroy all named environment data structures
      for Desc of Context.Named_Envs loop
         for V of Desc.Foreign_Nodes loop
            V.Destroy;
         end loop;
         Destroy (Desc);
      end loop;
      Context.Named_Envs.Clear;
      --  If we are asked to free this context, it means that no one else have
      --  references to its analysis units, so it's safe to destroy these.
      for Unit of Context.Units loop
         Destroy (Unit);
      end loop;
      Context.Units := Units_Maps.Empty_Map;
      Context.Filenames := Virtual_File_Maps.Empty_Map;
      declare
         procedure Destroy is new Ada.Unchecked_Deallocation
           (Env_Rebindings_Type, Env_Rebindings);
         AR : Env_Rebindings_Vectors.Vector renames
            Context.Available_Rebindings;
         R  : Env_Rebindings;
      begin
         for I in AR.First_Index .. AR.Last_Index loop
            R := AR.Get (I);
            Destroy (R);
         end loop;
         AR.Destroy;
      end;
      for Pos in Context.Unit_Provider_Cache.Iterate loop
         declare
            Units : Resolved_Unit_Array renames
              Context.Unit_Provider_Cache.Reference (Pos);
         begin
            for U of Units loop
               Free (U.Filename);
            end loop;
         end;
      end loop;
      Context.Unit_Provider_Cache.Clear;
      Destroy (Context.Templates_Unit);
      AST_Envs.Destroy (Context.Root_Scope);
      Destroy (Context.Symbols);
      Destroy (Context.Parser);
      Dec_Ref (Context.File_Reader);
      Dec_Ref (Context.Unit_Provider);
      Dec_Ref (Context.Event_Handler);
   end Destroy;
   -------------
   -- Context --
   -------------
   function Context (Unit : Internal_Unit) return Internal_Context is
   begin
      return Unit.Context;
   end Context;
   ----------
   -- Hash --
   ----------
   function Hash (Unit : Internal_Unit) return Hash_Type is
      function H is new Hash_Access (Analysis_Unit_Type, Internal_Unit);
   begin
      return H (Unit);
   end Hash;
   -------------
   -- Reparse --
   -------------
   procedure Reparse (Unit : Internal_Unit; Charset : String) is
      Dummy : constant Internal_Unit := Get_From_File
        (Unit.Context, +Unit.Filename.Full_Name, Charset,
         Reparse => True,
         Rule    => Unit.Rule);
   begin
      null;
   end Reparse;
   -------------
   -- Reparse --
   -------------
   procedure Reparse (Unit : Internal_Unit; Charset : String; Buffer : String)
   is
      Dummy : constant Internal_Unit := Get_From_Buffer
        (Unit.Context, +Unit.Filename.Full_Name, Charset, Buffer, Unit.Rule);
   begin
      null;
   end Reparse;
   -----------------------
   -- Reset_Envs_Caches --
   -----------------------
   procedure Reset_Envs_Caches (Unit : Internal_Unit) is
      procedure Internal (Node : Bare_Ada_Node);
      --  Reset env caches in ``Node`` and then in its children recursively
      Generic_Unit : constant Generic_Unit_Ptr := Convert_Unit (Unit);
      --------------
      -- Internal --
      --------------
      procedure Internal (Node : Bare_Ada_Node) is
      begin
         if Node = null then
            return;
         end if;
         --  Make sure to only reset caches of envs belonging to this unit
         if Node.Self_Env.Owner = Generic_Unit then
            Reset_Caches (Node.Self_Env);
         end if;
         for I in 1 .. Children_Count (Node) loop
            Internal (Child (Node, I));
         end loop;
      end Internal;
   begin
      Internal (Unit.Ast_Root);
   end Reset_Envs_Caches;
   --------------------------
   -- Populate_Lexical_Env --
   --------------------------
   procedure Populate_Lexical_Env
     (Unit           : Internal_Unit;
      PLE_Root_Index : Positive
   ) is
      Context : constant Internal_Context := Unit.Context;
      Saved_In_Populate_Lexical_Env : constant Boolean :=
        Context.In_Populate_Lexical_Env;
      Has_Errors : Boolean := False;
      --  Whether at least one Property_Error occurred during this PLE pass
   begin
      --  TODO??? Handle env invalidation when reparsing a unit and when a
      --  previous call raised a Property_Error.
      --  If we have already run PLE on this root, there is nothing to do.
      --  Otherwise, keep track of the fact that PLE was requested for it,
      --  possibly extending the vector if needed.
      if Unit.Env_Populated_Roots.Last_Index >= PLE_Root_Index
         and then Unit.Env_Populated_Roots.Get (PLE_Root_Index)
      then
         return;
      end if;
      for Dummy in Unit.Env_Populated_Roots.Last_Index + 1 .. PLE_Root_Index
      loop
         Unit.Env_Populated_Roots.Append (False);
      end loop;
      Unit.Env_Populated_Roots.Set (PLE_Root_Index, True);
      --  Create context for the PLE run: all exit points must call the Cleanup
      --  procedure above first to clean this context.
      Context.In_Populate_Lexical_Env := True;
      if Main_Trace.Active then
         Main_Trace.Trace
           ("Populating lexical envs for"
            & " root" & PLE_Root_Index'Image & " of"
            & " unit: " & Basename (Unit));
         Main_Trace.Increase_Indent;
      end if;
      --  Fetch the node on which to run PLE: it's the unit root node, or one
      --  of its children if PLE roots are enabled and the unit has a list of
      --  PLE roots. Then run PLE itself.
      declare
         PLE_Root : Bare_Ada_Node := Unit.Ast_Root;
      begin
            if Unit.Ast_Root /= null
               and then Unit.Ast_Root.Kind
                        = Ada_Compilation_Unit_List
            then
               PLE_Root := Child (Unit.Ast_Root, PLE_Root_Index);
            end if;
         if PLE_Root /= null then
            Has_Errors := Populate_Lexical_Env (PLE_Root);
         end if;
      end;
      --  Restore the context for PLE run (undo what was done above)
      Context.In_Populate_Lexical_Env := Saved_In_Populate_Lexical_Env;
      if Main_Trace.Active then
         Main_Trace.Decrease_Indent;
         Main_Trace.Trace
           ("Finished populating lexical envs for"
            & " root" & PLE_Root_Index'Image & " of"
            & " unit: " & Basename (Unit));
      end if;
      Reset_Envs_Caches (Unit);
      if Has_Errors and then not Context.Discard_Errors_In_Populate_Lexical_Env
      then
         raise Property_Error with
            "errors occurred in Populate_Lexical_Env";
      end if;
   end Populate_Lexical_Env;
   -----------------------------------
   -- Populate_Lexical_Env_For_Unit --
   -----------------------------------
   procedure Populate_Lexical_Env_For_Unit (Node : Bare_Ada_Node) is
      Root  : Bare_Ada_Node;
      Index : Natural;
   begin
      Lookup_PLE_Root (Node, Root, Index);
      if Index = 0 then
         Index := 1;
      end if;
      Populate_Lexical_Env (Node.Unit, Index);
   end Populate_Lexical_Env_For_Unit;
   ------------------
   -- Get_Filename --
   ------------------
   function Get_Filename (Unit : Internal_Unit) return String is
     (+Unit.Filename.Full_Name);
   -----------------
   -- Get_Charset --
   -----------------
   function Get_Charset (Unit : Internal_Unit) return String is
   begin
      return To_String (Unit.Charset);
   end Get_Charset;
   ---------------------
   -- Has_Diagnostics --
   ---------------------
   function Has_Diagnostics (Unit : Internal_Unit) return Boolean is
   begin
      return not Unit.Diagnostics.Is_Empty;
   end Has_Diagnostics;
   -----------------
   -- Diagnostics --
   -----------------
   function Diagnostics (Unit : Internal_Unit) return Diagnostics_Array is
      Result : Diagnostics_Array (1 .. Natural (Unit.Diagnostics.Length));
      I      : Natural := 1;
   begin
      for D of Unit.Diagnostics loop
         Result (I) := D;
         I := I + 1;
      end loop;
      return Result;
   end Diagnostics;
   ---------------------------
   -- Format_GNU_Diagnostic --
   ---------------------------
   function Format_GNU_Diagnostic
     (Unit : Internal_Unit; D : Diagnostic) return String
   is
      Filename : constant String := Basename (Unit);
      Sloc     : constant Source_Location := Start_Sloc (D.Sloc_Range);
      Msg      : constant String :=
         Image
           (Ada.Strings.Wide_Wide_Unbounded.To_Wide_Wide_String (D.Message));
   begin
      return (Filename
              & (if Sloc = No_Source_Location then "" else ":" & Image (Sloc))
              & ": " & Msg);
   end Format_GNU_Diagnostic;
   ----------
   -- Root --
   ----------
   function Root (Unit : Internal_Unit) return Bare_Ada_Node is
     (Unit.Ast_Root);
   -----------------
   -- First_Token --
   -----------------
   function First_Token (Unit : Internal_Unit) return Token_Reference is
     (Wrap_Token_Reference (Unit.Context,
                            Unit.TDH'Access,
                            First_Token_Or_Trivia (Unit.TDH)));
   ----------------
   -- Last_Token --
   ----------------
   function Last_Token (Unit : Internal_Unit) return Token_Reference is
     (Wrap_Token_Reference (Unit.Context,
                            Unit.TDH'Access,
                            Last_Token_Or_Trivia (Unit.TDH)));
   -----------------
   -- Token_Count --
   -----------------
   function Token_Count (Unit : Internal_Unit) return Natural is
     (Unit.TDH.Tokens.Length);
   ------------------
   -- Trivia_Count --
   ------------------
   function Trivia_Count (Unit : Internal_Unit) return Natural is
     (Unit.TDH.Trivias.Length);
   ----------
   -- Text --
   ----------
   function Text (Unit : Internal_Unit) return Text_Type is
   begin
      return Text (First_Token (Unit), Last_Token (Unit));
   end Text;
   ------------------
   -- Lookup_Token --
   ------------------
   function Lookup_Token
     (Unit : Internal_Unit; Sloc : Source_Location) return Token_Reference
   is
      Result : constant Token_Or_Trivia_Index := Lookup_Token (Unit.TDH, Sloc);
   begin
      return Wrap_Token_Reference (Unit.Context, Unit.TDH'Access, Result);
   end Lookup_Token;
   ---------------------
   -- Lookup_PLE_Root --
   ---------------------
   procedure Lookup_PLE_Root
     (Node  : Bare_Ada_Node;
      Root  : out Bare_Ada_Node;
      Index : out Natural)
   is
      Unit : constant Internal_Unit := Node.Unit;
   begin
      --  If this unit does not contain a list of PLE roots, just return the
      --  unit root node.
      if Unit.PLE_Roots_Starting_Token.Is_Empty then
         Root := Unit.Ast_Root;
         Index := 0;
         return;
      end if;
      --  Otherwise, look for the last PLE root whose first token (in
      --  Unit.PLE_Roots_Starting_Token) appears before Node's (T). This vector
      --  is sorted by construction, so we can perform a binary search.
      declare
         T      : constant Token_Index := Node.Token_Start_Index;
         Tokens : Token_Index_Vectors.Vector renames
           Unit.PLE_Roots_Starting_Token;
         First : Positive := Tokens.First_Index;
         Last  : Positive := Tokens.Last_Index;
         I     : Positive;
      begin
         while First < Last loop
            --  Because we look for the "floor" (last element that is <= T), we
            --  need to look at the value in Last when there are only two
            --  elements left to look at. If we did not do that, then we would
            --  go into an infinite loop when Tokens[First] < T.
            I := (if First + 1 = Last
                  then Last
                  else (First + Last) / 2);
            declare
               I_T : constant Token_Index := Tokens.Get (I);
            begin
               if I_T <= T then
                  First := I;
               else
                  Last := I - 1;
               end if;
            end;
         end loop;
         Root := Child (Unit.Ast_Root, First);
         Index := First;
      end;
   end Lookup_PLE_Root;
   --------------
   -- Ple_Root --
   --------------
   function Ple_Root
     (Node : Bare_Ada_Node) return Bare_Ada_Node
   is
      Root        : Bare_Ada_Node;
      Dummy_Index : Natural;
   begin
      if Node = null then
         raise Property_Error with "null node dereference";
      end if;
      Lookup_PLE_Root (Node, Root, Dummy_Index);
      return Root;
   end Ple_Root;
   ----------------------
   -- Dump_Lexical_Env --
   ----------------------
   procedure Dump_Lexical_Env (Unit : Internal_Unit) is
      Node     : constant Bare_Ada_Node := Unit.Ast_Root;
      Root_Env : constant Lexical_Env := Unit.Context.Root_Scope;
      State    : Dump_Lexical_Env_State := (Root_Env => Root_Env, others => <>);
      function Get_Parent (Env : Lexical_Env) return Lexical_Env
      is (Unwrap (Env).Parent);
      --------------------------
      -- Explore_Parent_Chain --
      --------------------------
      procedure Explore_Parent_Chain (Env : Lexical_Env) is
         P : Lexical_Env;
      begin
         if Env /= Null_Lexical_Env then
            P := Get_Parent (Env);
            Dump_One_Lexical_Env
              (Env, Get_Env_Id (Env, State), Get_Env_Id (P, State));
            Explore_Parent_Chain (P);
         end if;
      end Explore_Parent_Chain;
      --------------
      -- Internal --
      --------------
      procedure Internal (Current : Bare_Ada_Node) is
         Explore_Parent : Boolean := False;
         Env, Parent    : Lexical_Env;
      begin
         if Current = null then
            return;
         end if;
         --  We only dump environments that we haven't dumped before. This way
         --  we'll only dump environments at the site of their creation, and
         --  not in any subsequent link. We use the Env_Ids map to check which
         --  envs we have already seen or not.
         if not State.Env_Ids.Contains (Current.Self_Env) then
            Env := Current.Self_Env;
            Parent := Get_Parent (Env);
            Explore_Parent := not State.Env_Ids.Contains (Parent);
            Dump_One_Lexical_Env
              (Env, Get_Env_Id (Env, State), Get_Env_Id (Parent, State));
            if Explore_Parent then
               Explore_Parent_Chain (Parent);
            end if;
         end if;
         for Child of Internal_Bare_Ada_Node_Array'(Children (Current))
         loop
            Internal (Child);
         end loop;
      end Internal;
      --  This procedure implements the main recursive logic of dumping the
      --  environments.
   begin
      Internal (Bare_Ada_Node (Node));
   end Dump_Lexical_Env;
   --------------
   -- Get_Line --
   --------------
   function Get_Line
     (Unit : Internal_Unit; Line_Number : Positive) return Text_Type
   is
   begin
      return Get_Line (Unit.TDH, Line_Number);
   end Get_Line;
   -----------
   -- Print --
   -----------
   procedure Print (Unit : Internal_Unit; Show_Slocs : Boolean) is
   begin
      if Unit.Ast_Root = null then
         Put_Line ("<empty analysis unit>");
      else
         Print (Unit.Ast_Root, Show_Slocs);
      end if;
   end Print;
   ---------------
   -- PP_Trivia --
   ---------------
   procedure PP_Trivia (Unit : Internal_Unit) is
      procedure Process (Trivia : Token_Index) is
         Data : constant Stored_Token_Data :=
            Unit.TDH.Trivias.Get (Natural (Trivia)).T;
      begin
         Put_Line (Image (Text (Unit.TDH, Data)));
      end Process;
      Last_Token : constant Token_Index :=
         Token_Index (Token_Vectors.Last_Index (Unit.TDH.Tokens) - 1);
      --  Index for the last token in Unit excluding the Termination token
      --  (hence the -1).
   begin
      for Tok of Get_Leading_Trivias (Unit.TDH) loop
         Process (Tok);
      end loop;
      PP_Trivia (Unit.Ast_Root);
      for Tok of Get_Trivias (Unit.TDH, Last_Token) loop
         Process (Tok);
      end loop;
   end PP_Trivia;
   -------------
   -- Destroy --
   -------------
   procedure Destroy (Unit : in out Internal_Unit) is
   begin
      if Unit = No_Analysis_Unit then
         return;
      end if;
      --  Clear the env caches while the unit is still fully alive to make sure
      --  that what is accessed in ``Lexical_Env_Cache_Updated`` is still
      --  valid, as it will be called back by lexical envs that are being
      --  destroyed.
      Reset_Envs_Caches (Unit);
      Unit.PLE_Roots_Starting_Token.Destroy;
      Unit.Env_Populated_Roots.Destroy;
      Unit.Exiled_Entries.Destroy;
      Unit.Foreign_Nodes.Destroy;
      Unit.Exiled_Entries_In_NED.Destroy;
      Unit.Exiled_Envs.Destroy;
      Unit.Named_Envs.Destroy;
      Analysis_Unit_Sets.Destroy (Unit.Referenced_Units);
         Destroy (Unit.Memoization_Map);
      Destroy_Rebindings (Unit.Rebindings'Access);
      Unit.Rebindings.Destroy;
      if Unit.Ast_Root /= null then
         Destroy (Unit.Ast_Root);
      end if;
      Free (Unit.TDH);
      Free (Unit.Ast_Mem_Pool);
      Destroy_Unit_Destroyables (Unit);
      Destroyable_Vectors.Destroy (Unit.Destroyables);
for Cur in Unit.Nodes_Nameres.Iterate loop
   declare
      V : Resolution_Val renames Unit.Nodes_Nameres.Reference (Cur);
   begin
      Free_Memoized_Error (V.Exc_Id, V.Exc_Msg);
      Dec_Ref (V.Return_Value);
   end;
end loop;
      Free (Unit);
   end Destroy;
   -------------------
   -- Is_Token_Node --
   -------------------
   function Is_Token_Node (Node : Bare_Ada_Node) return Boolean is
   begin
      return Is_Token_Node (Node.Kind);
   end Is_Token_Node;
   ------------------
   -- Is_Synthetic --
   ------------------
   function Is_Synthetic (Node : Bare_Ada_Node) return Boolean is
   begin
      return Node.Kind in Synthetic_Nodes;
   end Is_Synthetic;
   ------------------------------
   -- Raise_Property_Exception --
   ------------------------------
   procedure Raise_Property_Exception
     (Node    : Bare_Ada_Node;
      Exc     : Ada.Exceptions.Exception_Id;
      Message : String)
   is
      Sloc_Prefix : constant String :=
        (if Node = null
         then ""
         else Ada.Directories.Simple_Name (Get_Filename (Unit (Node)))
              & ":" & Image (Sloc_Range (Node)) & ": ");
   begin
      Ada.Exceptions.Raise_Exception (Exc, Sloc_Prefix & Message);
   end Raise_Property_Exception;
   ------------------------------
   -- Register_Destroyable_Gen --
   ------------------------------
   procedure Register_Destroyable_Gen
     (Unit : Internal_Unit; Object : T_Access)
   is
      function Convert is new Ada.Unchecked_Conversion
        (System.Address, Destroy_Procedure);
      procedure Destroy_Procedure (Object : in out T_Access) renames Destroy;
   begin
      Register_Destroyable_Helper
        (Unit,
         Object.all'Address,
         Convert (Destroy_Procedure'Address));
   end Register_Destroyable_Gen;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Bare_Ada_Node_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Bare_Ada_Node
   is
      function Absolute_Get
        (T : Bare_Ada_Node_Array_Access; Index : Integer)
         return Bare_Ada_Node
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Bare_Ada_Node,
         Sequence_Type => Bare_Ada_Node_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Bare_Ada_Node;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Bare_Ada_Node;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Bare_Ada_Node_Array_Access) return Bare_Ada_Node_Array_Access is
      Ret : Bare_Ada_Node_Array_Access := Create_Bare_Ada_Node_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Bare_Ada_Node_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Bare_Ada_Node_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Bare_Ada_Node_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Bare_Ada_Node_Array (Items_Count : Natural) return Bare_Ada_Node_Array_Access
   is (if Items_Count = 0
       then No_Bare_Ada_Node_Array_Type
       else new Bare_Ada_Node_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Bare_Ada_Node_Array
     (Items : Internal_Bare_Ada_Node_Array) return Bare_Ada_Node_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Bare_Ada_Node_Array_Type;
      end if;
      return new Bare_Ada_Node_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Bare_Ada_Node_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Bare_Ada_Node_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Bare_Anonymous_Expr_Decl_Vectors is new Langkit_Support.Vectors (Bare_Anonymous_Expr_Decl);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Bare_Anonymous_Expr_Decl_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Bare_Anonymous_Expr_Decl
   is
      function Absolute_Get
        (T : Bare_Anonymous_Expr_Decl_Array_Access; Index : Integer)
         return Bare_Anonymous_Expr_Decl
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Bare_Anonymous_Expr_Decl,
         Sequence_Type => Bare_Anonymous_Expr_Decl_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Bare_Anonymous_Expr_Decl;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Bare_Ada_Node;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Bare_Anonymous_Expr_Decl_Array_Access) return Bare_Anonymous_Expr_Decl_Array_Access is
      Ret : Bare_Anonymous_Expr_Decl_Array_Access := Create_Bare_Anonymous_Expr_Decl_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Bare_Anonymous_Expr_Decl_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Bare_Anonymous_Expr_Decl_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Bare_Anonymous_Expr_Decl_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Bare_Anonymous_Expr_Decl_Array (Items_Count : Natural) return Bare_Anonymous_Expr_Decl_Array_Access
   is (if Items_Count = 0
       then No_Bare_Anonymous_Expr_Decl_Array_Type
       else new Bare_Anonymous_Expr_Decl_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Bare_Anonymous_Expr_Decl_Array
     (Items : Internal_Bare_Anonymous_Expr_Decl_Array) return Bare_Anonymous_Expr_Decl_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Bare_Anonymous_Expr_Decl_Array_Type;
      end if;
      return new Bare_Anonymous_Expr_Decl_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Bare_Anonymous_Expr_Decl_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Bare_Anonymous_Expr_Decl_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Bare_Compilation_Unit_Vectors is new Langkit_Support.Vectors (Bare_Compilation_Unit);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Bare_Compilation_Unit_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Bare_Compilation_Unit
   is
      function Absolute_Get
        (T : Bare_Compilation_Unit_Array_Access; Index : Integer)
         return Bare_Compilation_Unit
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Bare_Compilation_Unit,
         Sequence_Type => Bare_Compilation_Unit_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Bare_Compilation_Unit;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Bare_Ada_Node;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Bare_Compilation_Unit_Array_Access) return Bare_Compilation_Unit_Array_Access is
      Ret : Bare_Compilation_Unit_Array_Access := Create_Bare_Compilation_Unit_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Bare_Compilation_Unit_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Bare_Compilation_Unit_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Bare_Compilation_Unit_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Bare_Compilation_Unit_Array (Items_Count : Natural) return Bare_Compilation_Unit_Array_Access
   is (if Items_Count = 0
       then No_Bare_Compilation_Unit_Array_Type
       else new Bare_Compilation_Unit_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Bare_Compilation_Unit_Array
     (Items : Internal_Bare_Compilation_Unit_Array) return Bare_Compilation_Unit_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Bare_Compilation_Unit_Array_Type;
      end if;
      return new Bare_Compilation_Unit_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Bare_Compilation_Unit_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Bare_Compilation_Unit_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Bare_Name_Vectors is new Langkit_Support.Vectors (Bare_Name);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Bare_Name_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Bare_Name
   is
      function Absolute_Get
        (T : Bare_Name_Array_Access; Index : Integer)
         return Bare_Name
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Bare_Name,
         Sequence_Type => Bare_Name_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Bare_Name;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Bare_Ada_Node;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Bare_Name_Array_Access) return Bare_Name_Array_Access is
      Ret : Bare_Name_Array_Access := Create_Bare_Name_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Bare_Name_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Bare_Name_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Bare_Name_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Bare_Name_Array (Items_Count : Natural) return Bare_Name_Array_Access
   is (if Items_Count = 0
       then No_Bare_Name_Array_Type
       else new Bare_Name_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Bare_Name_Array
     (Items : Internal_Bare_Name_Array) return Bare_Name_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Bare_Name_Array_Type;
      end if;
      return new Bare_Name_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Bare_Name_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Bare_Name_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Bare_Pragma_Node_Vectors is new Langkit_Support.Vectors (Bare_Pragma_Node);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Bare_Pragma_Node_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Bare_Pragma_Node
   is
      function Absolute_Get
        (T : Bare_Pragma_Node_Array_Access; Index : Integer)
         return Bare_Pragma_Node
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Bare_Pragma_Node,
         Sequence_Type => Bare_Pragma_Node_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Bare_Pragma_Node;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Bare_Ada_Node;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Bare_Pragma_Node_Array_Access) return Bare_Pragma_Node_Array_Access is
      Ret : Bare_Pragma_Node_Array_Access := Create_Bare_Pragma_Node_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Bare_Pragma_Node_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Bare_Pragma_Node_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Bare_Pragma_Node_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Bare_Pragma_Node_Array (Items_Count : Natural) return Bare_Pragma_Node_Array_Access
   is (if Items_Count = 0
       then No_Bare_Pragma_Node_Array_Type
       else new Bare_Pragma_Node_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Bare_Pragma_Node_Array
     (Items : Internal_Bare_Pragma_Node_Array) return Bare_Pragma_Node_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Bare_Pragma_Node_Array_Type;
      end if;
      return new Bare_Pragma_Node_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Bare_Pragma_Node_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Bare_Pragma_Node_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Bare_Single_Tok_Node_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Bare_Single_Tok_Node
   is
      function Absolute_Get
        (T : Bare_Single_Tok_Node_Array_Access; Index : Integer)
         return Bare_Single_Tok_Node
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Bare_Single_Tok_Node,
         Sequence_Type => Bare_Single_Tok_Node_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Bare_Single_Tok_Node;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Bare_Ada_Node;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Bare_Single_Tok_Node_Array_Access) return Bare_Single_Tok_Node_Array_Access is
      Ret : Bare_Single_Tok_Node_Array_Access := Create_Bare_Single_Tok_Node_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Bare_Single_Tok_Node_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Bare_Single_Tok_Node_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Bare_Single_Tok_Node_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Bare_Single_Tok_Node_Array (Items_Count : Natural) return Bare_Single_Tok_Node_Array_Access
   is (if Items_Count = 0
       then No_Bare_Single_Tok_Node_Array_Type
       else new Bare_Single_Tok_Node_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Bare_Single_Tok_Node_Array
     (Items : Internal_Bare_Single_Tok_Node_Array) return Bare_Single_Tok_Node_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Bare_Single_Tok_Node_Array_Type;
      end if;
      return new Bare_Single_Tok_Node_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Bare_Single_Tok_Node_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Bare_Single_Tok_Node_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Bare_Use_Clause_Vectors is new Langkit_Support.Vectors (Bare_Use_Clause);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Bare_Use_Clause_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Bare_Use_Clause
   is
      function Absolute_Get
        (T : Bare_Use_Clause_Array_Access; Index : Integer)
         return Bare_Use_Clause
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Bare_Use_Clause,
         Sequence_Type => Bare_Use_Clause_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Bare_Use_Clause;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Bare_Ada_Node;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Bare_Use_Clause_Array_Access) return Bare_Use_Clause_Array_Access is
      Ret : Bare_Use_Clause_Array_Access := Create_Bare_Use_Clause_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Bare_Use_Clause_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Bare_Use_Clause_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Bare_Use_Clause_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Bare_Use_Clause_Array (Items_Count : Natural) return Bare_Use_Clause_Array_Access
   is (if Items_Count = 0
       then No_Bare_Use_Clause_Array_Type
       else new Bare_Use_Clause_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Bare_Use_Clause_Array
     (Items : Internal_Bare_Use_Clause_Array) return Bare_Use_Clause_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Bare_Use_Clause_Array_Type;
      end if;
      return new Bare_Use_Clause_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Bare_Use_Clause_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Bare_Use_Clause_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Aspect_Vectors is new Langkit_Support.Vectors (Internal_Aspect);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Aspect_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Aspect
   is
      function Absolute_Get
        (T : Internal_Aspect_Array_Access; Index : Integer)
         return Internal_Aspect
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Aspect,
         Sequence_Type => Internal_Aspect_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Aspect;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Aspect;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Aspect_Array_Access) return Internal_Aspect_Array_Access is
      Ret : Internal_Aspect_Array_Access := Create_Internal_Aspect_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Aspect_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Aspect_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Aspect_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Aspect_Array (Items_Count : Natural) return Internal_Aspect_Array_Access
   is (if Items_Count = 0
       then No_Internal_Aspect_Array_Type
       else new Internal_Aspect_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Aspect_Array
     (Items : Internal_Internal_Aspect_Array) return Internal_Aspect_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Aspect_Array_Type;
      end if;
      return new Internal_Aspect_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Aspect_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Aspect_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      function Make_Unique (A : Internal_Aspect_Array_Access) return Internal_Aspect_Array_Access is
         --  To keep the order of the result deterministic, this function works
         --  in two steps. First, determine for each item in A whether it
         --  duplicate a previous item. Only then, go through all items in A
         --  and add only non-duplicated ones to the result.
         Duplicates : array (A.Items'Range) of Boolean := (others => False);
         --  For each item in A, indicate whether the value is a duplicate of a
         --  previous one in the array.
         Unique_Elements : Natural;
         --  Number of unique elements in A
      begin
         --  Step 1: compute Duplicates
         declare
            package Sets is new Ada.Containers.Hashed_Sets
              (Element_Type        => Internal_Aspect,
               "="                 => "=",
               Equivalent_Elements => "=",
               Hash                => Hash);
            Set : Sets.Set;
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Aspect renames A.Items (I);
               begin
                  if Set.Contains (Item) then
                     Duplicates (I) := True;
                  else
                     Set.Insert (Item);
                  end if;
               end;
            end loop;
            Unique_Elements := Natural (Set.Length);
         end;
         --  Step 2: create the result
         declare
            Next   : Positive := 1;
            Result : constant Internal_Aspect_Array_Access :=
               Create_Internal_Aspect_Array (Unique_Elements);
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Aspect renames A.Items (I);
               begin
                  if not Duplicates (I) then
                     Result.Items (Next) := Item;
                     Next := Next + 1;
                  end if;
               end;
            end loop;
            pragma Assert (Next = Result.N + 1);
            return Result;
         end;
      end Make_Unique;
      package Internal_Completion_Item_Vectors is new Langkit_Support.Vectors (Internal_Completion_Item);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Completion_Item_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Completion_Item
   is
      function Absolute_Get
        (T : Internal_Completion_Item_Array_Access; Index : Integer)
         return Internal_Completion_Item
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Completion_Item,
         Sequence_Type => Internal_Completion_Item_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Completion_Item;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Completion_Item;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Completion_Item_Array_Access) return Internal_Completion_Item_Array_Access is
      Ret : Internal_Completion_Item_Array_Access := Create_Internal_Completion_Item_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Completion_Item_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Completion_Item_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Completion_Item_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Completion_Item_Array (Items_Count : Natural) return Internal_Completion_Item_Array_Access
   is (if Items_Count = 0
       then No_Internal_Completion_Item_Array_Type
       else new Internal_Completion_Item_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Completion_Item_Array
     (Items : Internal_Internal_Completion_Item_Array) return Internal_Completion_Item_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Completion_Item_Array_Type;
      end if;
      return new Internal_Completion_Item_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Completion_Item_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- To_Iterator --
      -----------------
      function To_Iterator
        (Self    : Internal_Completion_Item_Array_Access;
         Context : Internal_Context) return Internal_Completion_Item_Iterator_Access
      is
      begin
         Inc_Ref (Self);
         return new Internal_Internal_Completion_Item_Iterator'
           (Ref_Count  => 1,
            Safety_Net => Create_Safety_Net (Context),
            Elements   => Self,
            Index      => 1);
      end To_Iterator;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Completion_Item_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Discriminant_Values_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Discriminant_Values
   is
      function Absolute_Get
        (T : Internal_Discriminant_Values_Array_Access; Index : Integer)
         return Internal_Discriminant_Values
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Discriminant_Values,
         Sequence_Type => Internal_Discriminant_Values_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Discriminant_Values;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Discriminant_Values;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Discriminant_Values_Array_Access) return Internal_Discriminant_Values_Array_Access is
      Ret : Internal_Discriminant_Values_Array_Access := Create_Internal_Discriminant_Values_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Discriminant_Values_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Discriminant_Values_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Discriminant_Values_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Discriminant_Values_Array (Items_Count : Natural) return Internal_Discriminant_Values_Array_Access
   is (if Items_Count = 0
       then No_Internal_Discriminant_Values_Array_Type
       else new Internal_Discriminant_Values_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Discriminant_Values_Array
     (Items : Internal_Internal_Discriminant_Values_Array) return Internal_Discriminant_Values_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Discriminant_Values_Array_Type;
      end if;
      return new Internal_Discriminant_Values_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Discriminant_Values_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Discriminant_Values_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Doc_Annotation_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Doc_Annotation
   is
      function Absolute_Get
        (T : Internal_Doc_Annotation_Array_Access; Index : Integer)
         return Internal_Doc_Annotation
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Doc_Annotation,
         Sequence_Type => Internal_Doc_Annotation_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Doc_Annotation;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return No_Doc_Annotation;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Doc_Annotation_Array_Access) return Internal_Doc_Annotation_Array_Access is
      Ret : Internal_Doc_Annotation_Array_Access := Create_Internal_Doc_Annotation_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Doc_Annotation_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Doc_Annotation_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Doc_Annotation_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Doc_Annotation_Array (Items_Count : Natural) return Internal_Doc_Annotation_Array_Access
   is (if Items_Count = 0
       then No_Internal_Doc_Annotation_Array_Type
       else new Internal_Doc_Annotation_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Doc_Annotation_Array
     (Items : Internal_Internal_Doc_Annotation_Array) return Internal_Doc_Annotation_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Doc_Annotation_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new Internal_Doc_Annotation_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Doc_Annotation_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               not Equivalent (L.Items (I), R.Items (I))
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Doc_Annotation_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Accept_Stmt_Vectors is new Langkit_Support.Vectors (Internal_Entity_Accept_Stmt);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Accept_Stmt_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Accept_Stmt
   is
      function Absolute_Get
        (T : Internal_Entity_Accept_Stmt_Array_Access; Index : Integer)
         return Internal_Entity_Accept_Stmt
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Accept_Stmt,
         Sequence_Type => Internal_Entity_Accept_Stmt_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Accept_Stmt;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Accept_Stmt;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Accept_Stmt_Array_Access) return Internal_Entity_Accept_Stmt_Array_Access is
      Ret : Internal_Entity_Accept_Stmt_Array_Access := Create_Internal_Entity_Accept_Stmt_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Accept_Stmt_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Accept_Stmt_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Accept_Stmt_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Accept_Stmt_Array (Items_Count : Natural) return Internal_Entity_Accept_Stmt_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Accept_Stmt_Array_Type
       else new Internal_Entity_Accept_Stmt_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Accept_Stmt_Array
     (Items : Internal_Internal_Entity_Accept_Stmt_Array) return Internal_Entity_Accept_Stmt_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Accept_Stmt_Array_Type;
      end if;
      return new Internal_Entity_Accept_Stmt_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Accept_Stmt_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Accept_Stmt_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Ada_Node_List_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Ada_Node_List
   is
      function Absolute_Get
        (T : Internal_Entity_Ada_Node_List_Array_Access; Index : Integer)
         return Internal_Entity_Ada_Node_List
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Ada_Node_List,
         Sequence_Type => Internal_Entity_Ada_Node_List_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Ada_Node_List;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Ada_Node_List;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Ada_Node_List_Array_Access) return Internal_Entity_Ada_Node_List_Array_Access is
      Ret : Internal_Entity_Ada_Node_List_Array_Access := Create_Internal_Entity_Ada_Node_List_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Ada_Node_List_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Ada_Node_List_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Ada_Node_List_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Ada_Node_List_Array (Items_Count : Natural) return Internal_Entity_Ada_Node_List_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Ada_Node_List_Array_Type
       else new Internal_Entity_Ada_Node_List_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Ada_Node_List_Array
     (Items : Internal_Internal_Entity_Ada_Node_List_Array) return Internal_Entity_Ada_Node_List_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Ada_Node_List_Array_Type;
      end if;
      return new Internal_Entity_Ada_Node_List_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Ada_Node_List_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Ada_Node_List_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Vectors is new Langkit_Support.Vectors (Internal_Entity);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity
   is
      function Absolute_Get
        (T : Internal_Entity_Array_Access; Index : Integer)
         return Internal_Entity
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity,
         Sequence_Type => Internal_Entity_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Array_Access) return Internal_Entity_Array_Access is
      Ret : Internal_Entity_Array_Access := Create_Internal_Entity_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Array (Items_Count : Natural) return Internal_Entity_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Array_Type
       else new Internal_Entity_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Array
     (Items : AST_Envs.Entity_Array) return Internal_Entity_Array_Access
   is (if Items'Length = 0
       then No_Internal_Entity_Array_Type
       else new Internal_Entity_Array_Record'
         (N         => Items'Length,
          Items     => Implementation.Internal_Internal_Entity_Array (Items),
          Ref_Count => 1));
   function Create_Internal_Entity_Array
     (Items : Internal_Internal_Entity_Array) return Internal_Entity_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Array_Type;
      end if;
      return new Internal_Entity_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Base_Assoc_Vectors is new Langkit_Support.Vectors (Internal_Entity_Base_Assoc);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Base_Assoc_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Base_Assoc
   is
      function Absolute_Get
        (T : Internal_Entity_Base_Assoc_Array_Access; Index : Integer)
         return Internal_Entity_Base_Assoc
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Base_Assoc,
         Sequence_Type => Internal_Entity_Base_Assoc_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Base_Assoc;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Base_Assoc;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Base_Assoc_Array_Access) return Internal_Entity_Base_Assoc_Array_Access is
      Ret : Internal_Entity_Base_Assoc_Array_Access := Create_Internal_Entity_Base_Assoc_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Base_Assoc_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Base_Assoc_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Base_Assoc_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Base_Assoc_Array (Items_Count : Natural) return Internal_Entity_Base_Assoc_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Base_Assoc_Array_Type
       else new Internal_Entity_Base_Assoc_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Base_Assoc_Array
     (Items : Internal_Internal_Entity_Base_Assoc_Array) return Internal_Entity_Base_Assoc_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Base_Assoc_Array_Type;
      end if;
      return new Internal_Entity_Base_Assoc_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Base_Assoc_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Base_Assoc_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Base_Formal_Param_Decl_Vectors is new Langkit_Support.Vectors (Internal_Entity_Base_Formal_Param_Decl);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Base_Formal_Param_Decl
   is
      function Absolute_Get
        (T : Internal_Entity_Base_Formal_Param_Decl_Array_Access; Index : Integer)
         return Internal_Entity_Base_Formal_Param_Decl
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Base_Formal_Param_Decl,
         Sequence_Type => Internal_Entity_Base_Formal_Param_Decl_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Base_Formal_Param_Decl;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Base_Formal_Param_Decl;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Base_Formal_Param_Decl_Array_Access) return Internal_Entity_Base_Formal_Param_Decl_Array_Access is
      Ret : Internal_Entity_Base_Formal_Param_Decl_Array_Access := Create_Internal_Entity_Base_Formal_Param_Decl_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Base_Formal_Param_Decl_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Base_Formal_Param_Decl_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Base_Formal_Param_Decl_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Base_Formal_Param_Decl_Array (Items_Count : Natural) return Internal_Entity_Base_Formal_Param_Decl_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Base_Formal_Param_Decl_Array_Type
       else new Internal_Entity_Base_Formal_Param_Decl_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Base_Formal_Param_Decl_Array
     (Items : Internal_Internal_Entity_Base_Formal_Param_Decl_Array) return Internal_Entity_Base_Formal_Param_Decl_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
      end if;
      return new Internal_Entity_Base_Formal_Param_Decl_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Base_Formal_Param_Decl_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Base_Formal_Param_Decl_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Base_Type_Decl_Vectors is new Langkit_Support.Vectors (Internal_Entity_Base_Type_Decl);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Base_Type_Decl_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Base_Type_Decl
   is
      function Absolute_Get
        (T : Internal_Entity_Base_Type_Decl_Array_Access; Index : Integer)
         return Internal_Entity_Base_Type_Decl
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Base_Type_Decl,
         Sequence_Type => Internal_Entity_Base_Type_Decl_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Base_Type_Decl;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Base_Type_Decl;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Base_Type_Decl_Array_Access) return Internal_Entity_Base_Type_Decl_Array_Access is
      Ret : Internal_Entity_Base_Type_Decl_Array_Access := Create_Internal_Entity_Base_Type_Decl_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Base_Type_Decl_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Base_Type_Decl_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Base_Type_Decl_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Base_Type_Decl_Array (Items_Count : Natural) return Internal_Entity_Base_Type_Decl_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Base_Type_Decl_Array_Type
       else new Internal_Entity_Base_Type_Decl_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Base_Type_Decl_Array
     (Items : Internal_Internal_Entity_Base_Type_Decl_Array) return Internal_Entity_Base_Type_Decl_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Base_Type_Decl_Array_Type;
      end if;
      return new Internal_Entity_Base_Type_Decl_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Base_Type_Decl_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Base_Type_Decl_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      function Make_Unique (A : Internal_Entity_Base_Type_Decl_Array_Access) return Internal_Entity_Base_Type_Decl_Array_Access is
         --  To keep the order of the result deterministic, this function works
         --  in two steps. First, determine for each item in A whether it
         --  duplicate a previous item. Only then, go through all items in A
         --  and add only non-duplicated ones to the result.
         Duplicates : array (A.Items'Range) of Boolean := (others => False);
         --  For each item in A, indicate whether the value is a duplicate of a
         --  previous one in the array.
         Unique_Elements : Natural;
         --  Number of unique elements in A
      begin
         --  Step 1: compute Duplicates
         declare
            package Sets is new Ada.Containers.Hashed_Sets
              (Element_Type        => Internal_Entity_Base_Type_Decl,
               "="                 => "=",
               Equivalent_Elements => "=",
               Hash                => Hash);
            Set : Sets.Set;
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Entity_Base_Type_Decl renames A.Items (I);
               begin
                  if Set.Contains (Item) then
                     Duplicates (I) := True;
                  else
                     Set.Insert (Item);
                  end if;
               end;
            end loop;
            Unique_Elements := Natural (Set.Length);
         end;
         --  Step 2: create the result
         declare
            Next   : Positive := 1;
            Result : constant Internal_Entity_Base_Type_Decl_Array_Access :=
               Create_Internal_Entity_Base_Type_Decl_Array (Unique_Elements);
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Entity_Base_Type_Decl renames A.Items (I);
               begin
                  if not Duplicates (I) then
                     Result.Items (Next) := Item;
                     Next := Next + 1;
                  end if;
               end;
            end loop;
            pragma Assert (Next = Result.N + 1);
            return Result;
         end;
      end Make_Unique;
      ----------
      -- Hash --
      ----------
      function Hash (R : Internal_Entity_Base_Type_Decl_Array_Access) return Hash_Type is
         Result : Hash_Type := Initial_Hash;
      begin
         for I in R.Items'Range loop
            Result := Combine (Result, Hash (R.Items (I)));
         end loop;
         return Result;
      end Hash;
      package Internal_Entity_Basic_Decl_Vectors is new Langkit_Support.Vectors (Internal_Entity_Basic_Decl);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Basic_Decl_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Basic_Decl
   is
      function Absolute_Get
        (T : Internal_Entity_Basic_Decl_Array_Access; Index : Integer)
         return Internal_Entity_Basic_Decl
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Basic_Decl,
         Sequence_Type => Internal_Entity_Basic_Decl_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Basic_Decl;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Basic_Decl;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Basic_Decl_Array_Access) return Internal_Entity_Basic_Decl_Array_Access is
      Ret : Internal_Entity_Basic_Decl_Array_Access := Create_Internal_Entity_Basic_Decl_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Basic_Decl_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Basic_Decl_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Basic_Decl_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Basic_Decl_Array (Items_Count : Natural) return Internal_Entity_Basic_Decl_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Basic_Decl_Array_Type
       else new Internal_Entity_Basic_Decl_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Basic_Decl_Array
     (Items : Internal_Internal_Entity_Basic_Decl_Array) return Internal_Entity_Basic_Decl_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Basic_Decl_Array_Type;
      end if;
      return new Internal_Entity_Basic_Decl_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Basic_Decl_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Basic_Decl_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      function Make_Unique (A : Internal_Entity_Basic_Decl_Array_Access) return Internal_Entity_Basic_Decl_Array_Access is
         --  To keep the order of the result deterministic, this function works
         --  in two steps. First, determine for each item in A whether it
         --  duplicate a previous item. Only then, go through all items in A
         --  and add only non-duplicated ones to the result.
         Duplicates : array (A.Items'Range) of Boolean := (others => False);
         --  For each item in A, indicate whether the value is a duplicate of a
         --  previous one in the array.
         Unique_Elements : Natural;
         --  Number of unique elements in A
      begin
         --  Step 1: compute Duplicates
         declare
            package Sets is new Ada.Containers.Hashed_Sets
              (Element_Type        => Internal_Entity_Basic_Decl,
               "="                 => "=",
               Equivalent_Elements => "=",
               Hash                => Hash);
            Set : Sets.Set;
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Entity_Basic_Decl renames A.Items (I);
               begin
                  if Set.Contains (Item) then
                     Duplicates (I) := True;
                  else
                     Set.Insert (Item);
                  end if;
               end;
            end loop;
            Unique_Elements := Natural (Set.Length);
         end;
         --  Step 2: create the result
         declare
            Next   : Positive := 1;
            Result : constant Internal_Entity_Basic_Decl_Array_Access :=
               Create_Internal_Entity_Basic_Decl_Array (Unique_Elements);
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Entity_Basic_Decl renames A.Items (I);
               begin
                  if not Duplicates (I) then
                     Result.Items (Next) := Item;
                     Next := Next + 1;
                  end if;
               end;
            end loop;
            pragma Assert (Next = Result.N + 1);
            return Result;
         end;
      end Make_Unique;
      package Internal_Entity_Compilation_Unit_Vectors is new Langkit_Support.Vectors (Internal_Entity_Compilation_Unit);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Compilation_Unit_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Compilation_Unit
   is
      function Absolute_Get
        (T : Internal_Entity_Compilation_Unit_Array_Access; Index : Integer)
         return Internal_Entity_Compilation_Unit
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Compilation_Unit,
         Sequence_Type => Internal_Entity_Compilation_Unit_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Compilation_Unit;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Compilation_Unit;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Compilation_Unit_Array_Access) return Internal_Entity_Compilation_Unit_Array_Access is
      Ret : Internal_Entity_Compilation_Unit_Array_Access := Create_Internal_Entity_Compilation_Unit_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Compilation_Unit_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Compilation_Unit_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Compilation_Unit_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Compilation_Unit_Array (Items_Count : Natural) return Internal_Entity_Compilation_Unit_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Compilation_Unit_Array_Type
       else new Internal_Entity_Compilation_Unit_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Compilation_Unit_Array
     (Items : Internal_Internal_Entity_Compilation_Unit_Array) return Internal_Entity_Compilation_Unit_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Compilation_Unit_Array_Type;
      end if;
      return new Internal_Entity_Compilation_Unit_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Compilation_Unit_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Compilation_Unit_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      function Make_Unique (A : Internal_Entity_Compilation_Unit_Array_Access) return Internal_Entity_Compilation_Unit_Array_Access is
         --  To keep the order of the result deterministic, this function works
         --  in two steps. First, determine for each item in A whether it
         --  duplicate a previous item. Only then, go through all items in A
         --  and add only non-duplicated ones to the result.
         Duplicates : array (A.Items'Range) of Boolean := (others => False);
         --  For each item in A, indicate whether the value is a duplicate of a
         --  previous one in the array.
         Unique_Elements : Natural;
         --  Number of unique elements in A
      begin
         --  Step 1: compute Duplicates
         declare
            package Sets is new Ada.Containers.Hashed_Sets
              (Element_Type        => Internal_Entity_Compilation_Unit,
               "="                 => "=",
               Equivalent_Elements => "=",
               Hash                => Hash);
            Set : Sets.Set;
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Entity_Compilation_Unit renames A.Items (I);
               begin
                  if Set.Contains (Item) then
                     Duplicates (I) := True;
                  else
                     Set.Insert (Item);
                  end if;
               end;
            end loop;
            Unique_Elements := Natural (Set.Length);
         end;
         --  Step 2: create the result
         declare
            Next   : Positive := 1;
            Result : constant Internal_Entity_Compilation_Unit_Array_Access :=
               Create_Internal_Entity_Compilation_Unit_Array (Unique_Elements);
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Entity_Compilation_Unit renames A.Items (I);
               begin
                  if not Duplicates (I) then
                     Result.Items (Next) := Item;
                     Next := Next + 1;
                  end if;
               end;
            end loop;
            pragma Assert (Next = Result.N + 1);
            return Result;
         end;
      end Make_Unique;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Declarative_Part_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Declarative_Part
   is
      function Absolute_Get
        (T : Internal_Entity_Declarative_Part_Array_Access; Index : Integer)
         return Internal_Entity_Declarative_Part
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Declarative_Part,
         Sequence_Type => Internal_Entity_Declarative_Part_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Declarative_Part;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Declarative_Part;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Declarative_Part_Array_Access) return Internal_Entity_Declarative_Part_Array_Access is
      Ret : Internal_Entity_Declarative_Part_Array_Access := Create_Internal_Entity_Declarative_Part_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Declarative_Part_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Declarative_Part_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Declarative_Part_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Declarative_Part_Array (Items_Count : Natural) return Internal_Entity_Declarative_Part_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Declarative_Part_Array_Type
       else new Internal_Entity_Declarative_Part_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Declarative_Part_Array
     (Items : Internal_Internal_Entity_Declarative_Part_Array) return Internal_Entity_Declarative_Part_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Declarative_Part_Array_Type;
      end if;
      return new Internal_Entity_Declarative_Part_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Declarative_Part_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Declarative_Part_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Defining_Name_Vectors is new Langkit_Support.Vectors (Internal_Entity_Defining_Name);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Defining_Name_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Defining_Name
   is
      function Absolute_Get
        (T : Internal_Entity_Defining_Name_Array_Access; Index : Integer)
         return Internal_Entity_Defining_Name
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Defining_Name,
         Sequence_Type => Internal_Entity_Defining_Name_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Defining_Name;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Defining_Name;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Defining_Name_Array_Access) return Internal_Entity_Defining_Name_Array_Access is
      Ret : Internal_Entity_Defining_Name_Array_Access := Create_Internal_Entity_Defining_Name_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Defining_Name_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Defining_Name_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Defining_Name_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Defining_Name_Array (Items_Count : Natural) return Internal_Entity_Defining_Name_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Defining_Name_Array_Type
       else new Internal_Entity_Defining_Name_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Defining_Name_Array
     (Items : Internal_Internal_Entity_Defining_Name_Array) return Internal_Entity_Defining_Name_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Defining_Name_Array_Type;
      end if;
      return new Internal_Entity_Defining_Name_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Defining_Name_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Defining_Name_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Expr_Vectors is new Langkit_Support.Vectors (Internal_Entity_Expr);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Expr_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Expr
   is
      function Absolute_Get
        (T : Internal_Entity_Expr_Array_Access; Index : Integer)
         return Internal_Entity_Expr
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Expr,
         Sequence_Type => Internal_Entity_Expr_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Expr;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Expr;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Expr_Array_Access) return Internal_Entity_Expr_Array_Access is
      Ret : Internal_Entity_Expr_Array_Access := Create_Internal_Entity_Expr_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Expr_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Expr_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Expr_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Expr_Array (Items_Count : Natural) return Internal_Entity_Expr_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Expr_Array_Type
       else new Internal_Entity_Expr_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Expr_Array
     (Items : Internal_Internal_Entity_Expr_Array) return Internal_Entity_Expr_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Expr_Array_Type;
      end if;
      return new Internal_Entity_Expr_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Expr_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Expr_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Generic_Instantiation_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Generic_Instantiation
   is
      function Absolute_Get
        (T : Internal_Entity_Generic_Instantiation_Array_Access; Index : Integer)
         return Internal_Entity_Generic_Instantiation
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Generic_Instantiation,
         Sequence_Type => Internal_Entity_Generic_Instantiation_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Generic_Instantiation;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Generic_Instantiation;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Generic_Instantiation_Array_Access) return Internal_Entity_Generic_Instantiation_Array_Access is
      Ret : Internal_Entity_Generic_Instantiation_Array_Access := Create_Internal_Entity_Generic_Instantiation_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Generic_Instantiation_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Generic_Instantiation_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Generic_Instantiation_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Generic_Instantiation_Array (Items_Count : Natural) return Internal_Entity_Generic_Instantiation_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Generic_Instantiation_Array_Type
       else new Internal_Entity_Generic_Instantiation_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Generic_Instantiation_Array
     (Items : Internal_Internal_Entity_Generic_Instantiation_Array) return Internal_Entity_Generic_Instantiation_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Generic_Instantiation_Array_Type;
      end if;
      return new Internal_Entity_Generic_Instantiation_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Generic_Instantiation_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Generic_Instantiation_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Identifier_Vectors is new Langkit_Support.Vectors (Internal_Entity_Identifier);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Identifier_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Identifier
   is
      function Absolute_Get
        (T : Internal_Entity_Identifier_Array_Access; Index : Integer)
         return Internal_Entity_Identifier
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Identifier,
         Sequence_Type => Internal_Entity_Identifier_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Identifier;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Identifier;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Identifier_Array_Access) return Internal_Entity_Identifier_Array_Access is
      Ret : Internal_Entity_Identifier_Array_Access := Create_Internal_Entity_Identifier_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Identifier_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Identifier_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Identifier_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Identifier_Array (Items_Count : Natural) return Internal_Entity_Identifier_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Identifier_Array_Type
       else new Internal_Entity_Identifier_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Identifier_Array
     (Items : Internal_Internal_Entity_Identifier_Array) return Internal_Entity_Identifier_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Identifier_Array_Type;
      end if;
      return new Internal_Entity_Identifier_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Identifier_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Identifier_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Mode_Vectors is new Langkit_Support.Vectors (Internal_Entity_Mode);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Mode_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Mode
   is
      function Absolute_Get
        (T : Internal_Entity_Mode_Array_Access; Index : Integer)
         return Internal_Entity_Mode
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Mode,
         Sequence_Type => Internal_Entity_Mode_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Mode;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Mode;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Mode_Array_Access) return Internal_Entity_Mode_Array_Access is
      Ret : Internal_Entity_Mode_Array_Access := Create_Internal_Entity_Mode_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Mode_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Mode_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Mode_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Mode_Array (Items_Count : Natural) return Internal_Entity_Mode_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Mode_Array_Type
       else new Internal_Entity_Mode_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Mode_Array
     (Items : Internal_Internal_Entity_Mode_Array) return Internal_Entity_Mode_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Mode_Array_Type;
      end if;
      return new Internal_Entity_Mode_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Mode_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Mode_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Name_Vectors is new Langkit_Support.Vectors (Internal_Entity_Name);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Name_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Name
   is
      function Absolute_Get
        (T : Internal_Entity_Name_Array_Access; Index : Integer)
         return Internal_Entity_Name
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Name,
         Sequence_Type => Internal_Entity_Name_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Name;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Name;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Name_Array_Access) return Internal_Entity_Name_Array_Access is
      Ret : Internal_Entity_Name_Array_Access := Create_Internal_Entity_Name_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Name_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Name_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Name_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Name_Array (Items_Count : Natural) return Internal_Entity_Name_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Name_Array_Type
       else new Internal_Entity_Name_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Name_Array
     (Items : Internal_Internal_Entity_Name_Array) return Internal_Entity_Name_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Name_Array_Type;
      end if;
      return new Internal_Entity_Name_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Name_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Name_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Param_Spec_Vectors is new Langkit_Support.Vectors (Internal_Entity_Param_Spec);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Param_Spec_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Param_Spec
   is
      function Absolute_Get
        (T : Internal_Entity_Param_Spec_Array_Access; Index : Integer)
         return Internal_Entity_Param_Spec
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Param_Spec,
         Sequence_Type => Internal_Entity_Param_Spec_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Param_Spec;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Param_Spec;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Param_Spec_Array_Access) return Internal_Entity_Param_Spec_Array_Access is
      Ret : Internal_Entity_Param_Spec_Array_Access := Create_Internal_Entity_Param_Spec_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Param_Spec_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Param_Spec_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Param_Spec_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Param_Spec_Array (Items_Count : Natural) return Internal_Entity_Param_Spec_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Param_Spec_Array_Type
       else new Internal_Entity_Param_Spec_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Param_Spec_Array
     (Items : Internal_Internal_Entity_Param_Spec_Array) return Internal_Entity_Param_Spec_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Param_Spec_Array_Type;
      end if;
      return new Internal_Entity_Param_Spec_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Param_Spec_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Param_Spec_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Pragma_Node_Vectors is new Langkit_Support.Vectors (Internal_Entity_Pragma_Node);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Pragma_Node_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Pragma_Node
   is
      function Absolute_Get
        (T : Internal_Entity_Pragma_Node_Array_Access; Index : Integer)
         return Internal_Entity_Pragma_Node
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Pragma_Node,
         Sequence_Type => Internal_Entity_Pragma_Node_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Pragma_Node;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Pragma_Node;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Pragma_Node_Array_Access) return Internal_Entity_Pragma_Node_Array_Access is
      Ret : Internal_Entity_Pragma_Node_Array_Access := Create_Internal_Entity_Pragma_Node_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Pragma_Node_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Pragma_Node_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Pragma_Node_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Pragma_Node_Array (Items_Count : Natural) return Internal_Entity_Pragma_Node_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Pragma_Node_Array_Type
       else new Internal_Entity_Pragma_Node_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Pragma_Node_Array
     (Items : Internal_Internal_Entity_Pragma_Node_Array) return Internal_Entity_Pragma_Node_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Pragma_Node_Array_Type;
      end if;
      return new Internal_Entity_Pragma_Node_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Pragma_Node_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Pragma_Node_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Type_Decl_Vectors is new Langkit_Support.Vectors (Internal_Entity_Type_Decl);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Type_Decl_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Type_Decl
   is
      function Absolute_Get
        (T : Internal_Entity_Type_Decl_Array_Access; Index : Integer)
         return Internal_Entity_Type_Decl
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Type_Decl,
         Sequence_Type => Internal_Entity_Type_Decl_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Type_Decl;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Type_Decl;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Type_Decl_Array_Access) return Internal_Entity_Type_Decl_Array_Access is
      Ret : Internal_Entity_Type_Decl_Array_Access := Create_Internal_Entity_Type_Decl_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Type_Decl_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Type_Decl_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Type_Decl_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Type_Decl_Array (Items_Count : Natural) return Internal_Entity_Type_Decl_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Type_Decl_Array_Type
       else new Internal_Entity_Type_Decl_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Type_Decl_Array
     (Items : Internal_Internal_Entity_Type_Decl_Array) return Internal_Entity_Type_Decl_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Type_Decl_Array_Type;
      end if;
      return new Internal_Entity_Type_Decl_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Type_Decl_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Type_Decl_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Entity_Type_Expr_Vectors is new Langkit_Support.Vectors (Internal_Entity_Type_Expr);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Entity_Type_Expr_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Entity_Type_Expr
   is
      function Absolute_Get
        (T : Internal_Entity_Type_Expr_Array_Access; Index : Integer)
         return Internal_Entity_Type_Expr
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Entity_Type_Expr,
         Sequence_Type => Internal_Entity_Type_Expr_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Entity_Type_Expr;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Entity_Type_Expr;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Entity_Type_Expr_Array_Access) return Internal_Entity_Type_Expr_Array_Access is
      Ret : Internal_Entity_Type_Expr_Array_Access := Create_Internal_Entity_Type_Expr_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Type_Expr_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Entity_Type_Expr_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Type_Expr_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Entity_Type_Expr_Array (Items_Count : Natural) return Internal_Entity_Type_Expr_Array_Access
   is (if Items_Count = 0
       then No_Internal_Entity_Type_Expr_Array_Type
       else new Internal_Entity_Type_Expr_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Entity_Type_Expr_Array
     (Items : Internal_Internal_Entity_Type_Expr_Array) return Internal_Entity_Type_Expr_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Entity_Type_Expr_Array_Type;
      end if;
      return new Internal_Entity_Type_Expr_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Entity_Type_Expr_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Type_Expr_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Env_Assoc_Vectors is new Langkit_Support.Vectors (Internal_Env_Assoc);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Env_Assoc_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Env_Assoc
   is
      function Absolute_Get
        (T : Internal_Env_Assoc_Array_Access; Index : Integer)
         return Internal_Env_Assoc
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Env_Assoc,
         Sequence_Type => Internal_Env_Assoc_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Env_Assoc;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return No_Env_Assoc;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Env_Assoc_Array_Access) return Internal_Env_Assoc_Array_Access is
      Ret : Internal_Env_Assoc_Array_Access := Create_Internal_Env_Assoc_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Env_Assoc_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Env_Assoc_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Env_Assoc_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Env_Assoc_Array (Items_Count : Natural) return Internal_Env_Assoc_Array_Access
   is (if Items_Count = 0
       then No_Internal_Env_Assoc_Array_Type
       else new Internal_Env_Assoc_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Env_Assoc_Array
     (Items : Internal_Internal_Env_Assoc_Array) return Internal_Env_Assoc_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Env_Assoc_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new Internal_Env_Assoc_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Env_Assoc_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               not Equivalent (L.Items (I), R.Items (I))
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Env_Assoc_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Expected_Type_For_Expr_Vectors is new Langkit_Support.Vectors (Internal_Expected_Type_For_Expr);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Expected_Type_For_Expr_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Expected_Type_For_Expr
   is
      function Absolute_Get
        (T : Internal_Expected_Type_For_Expr_Array_Access; Index : Integer)
         return Internal_Expected_Type_For_Expr
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Expected_Type_For_Expr,
         Sequence_Type => Internal_Expected_Type_For_Expr_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Expected_Type_For_Expr;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Expected_Type_For_Expr;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Expected_Type_For_Expr_Array_Access) return Internal_Expected_Type_For_Expr_Array_Access is
      Ret : Internal_Expected_Type_For_Expr_Array_Access := Create_Internal_Expected_Type_For_Expr_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Expected_Type_For_Expr_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Expected_Type_For_Expr_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Expected_Type_For_Expr_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Expected_Type_For_Expr_Array (Items_Count : Natural) return Internal_Expected_Type_For_Expr_Array_Access
   is (if Items_Count = 0
       then No_Internal_Expected_Type_For_Expr_Array_Type
       else new Internal_Expected_Type_For_Expr_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Expected_Type_For_Expr_Array
     (Items : Internal_Internal_Expected_Type_For_Expr_Array) return Internal_Expected_Type_For_Expr_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Expected_Type_For_Expr_Array_Type;
      end if;
      return new Internal_Expected_Type_For_Expr_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Expected_Type_For_Expr_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Expected_Type_For_Expr_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Inner_Env_Assoc_Vectors is new Langkit_Support.Vectors (Internal_Inner_Env_Assoc);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Inner_Env_Assoc_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Inner_Env_Assoc
   is
      function Absolute_Get
        (T : Internal_Inner_Env_Assoc_Array_Access; Index : Integer)
         return Internal_Inner_Env_Assoc
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Inner_Env_Assoc,
         Sequence_Type => Internal_Inner_Env_Assoc_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Inner_Env_Assoc;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Inner_Env_Assoc;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Inner_Env_Assoc_Array_Access) return Internal_Inner_Env_Assoc_Array_Access is
      Ret : Internal_Inner_Env_Assoc_Array_Access := Create_Internal_Inner_Env_Assoc_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Inner_Env_Assoc_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Inner_Env_Assoc_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Inner_Env_Assoc_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Inner_Env_Assoc_Array (Items_Count : Natural) return Internal_Inner_Env_Assoc_Array_Access
   is (if Items_Count = 0
       then No_Internal_Inner_Env_Assoc_Array_Type
       else new Internal_Inner_Env_Assoc_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Inner_Env_Assoc_Array
     (Items : Internal_Internal_Inner_Env_Assoc_Array) return Internal_Inner_Env_Assoc_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Inner_Env_Assoc_Array_Type;
      end if;
      return new Internal_Inner_Env_Assoc_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Inner_Env_Assoc_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Inner_Env_Assoc_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Logic_Context_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Logic_Context
   is
      function Absolute_Get
        (T : Internal_Logic_Context_Array_Access; Index : Integer)
         return Internal_Logic_Context
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Logic_Context,
         Sequence_Type => Internal_Logic_Context_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Logic_Context;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Logic_Context;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Logic_Context_Array_Access) return Internal_Logic_Context_Array_Access is
      Ret : Internal_Logic_Context_Array_Access := Create_Internal_Logic_Context_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Logic_Context_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Logic_Context_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Logic_Context_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Logic_Context_Array (Items_Count : Natural) return Internal_Logic_Context_Array_Access
   is (if Items_Count = 0
       then No_Internal_Logic_Context_Array_Type
       else new Internal_Logic_Context_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Logic_Context_Array
     (Items : Internal_Internal_Logic_Context_Array) return Internal_Logic_Context_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Logic_Context_Array_Type;
      end if;
      return new Internal_Logic_Context_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Logic_Context_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Logic_Context_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Param_Actual_Vectors is new Langkit_Support.Vectors (Internal_Param_Actual);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Param_Actual_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Param_Actual
   is
      function Absolute_Get
        (T : Internal_Param_Actual_Array_Access; Index : Integer)
         return Internal_Param_Actual
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Param_Actual,
         Sequence_Type => Internal_Param_Actual_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Param_Actual;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Param_Actual;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Param_Actual_Array_Access) return Internal_Param_Actual_Array_Access is
      Ret : Internal_Param_Actual_Array_Access := Create_Internal_Param_Actual_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Param_Actual_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Param_Actual_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Param_Actual_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Param_Actual_Array (Items_Count : Natural) return Internal_Param_Actual_Array_Access
   is (if Items_Count = 0
       then No_Internal_Param_Actual_Array_Type
       else new Internal_Param_Actual_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Param_Actual_Array
     (Items : Internal_Internal_Param_Actual_Array) return Internal_Param_Actual_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Param_Actual_Array_Type;
      end if;
      return new Internal_Param_Actual_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Param_Actual_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Param_Actual_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Param_Match_Vectors is new Langkit_Support.Vectors (Internal_Param_Match);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Param_Match_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Param_Match
   is
      function Absolute_Get
        (T : Internal_Param_Match_Array_Access; Index : Integer)
         return Internal_Param_Match
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Param_Match,
         Sequence_Type => Internal_Param_Match_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Param_Match;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Param_Match;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Param_Match_Array_Access) return Internal_Param_Match_Array_Access is
      Ret : Internal_Param_Match_Array_Access := Create_Internal_Param_Match_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Param_Match_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Param_Match_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Param_Match_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Param_Match_Array (Items_Count : Natural) return Internal_Param_Match_Array_Access
   is (if Items_Count = 0
       then No_Internal_Param_Match_Array_Type
       else new Internal_Param_Match_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Param_Match_Array
     (Items : Internal_Internal_Param_Match_Array) return Internal_Param_Match_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Param_Match_Array_Type;
      end if;
      return new Internal_Param_Match_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Param_Match_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Param_Match_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Ref_Result_Vectors is new Langkit_Support.Vectors (Internal_Ref_Result);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Ref_Result_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Ref_Result
   is
      function Absolute_Get
        (T : Internal_Ref_Result_Array_Access; Index : Integer)
         return Internal_Ref_Result
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Ref_Result,
         Sequence_Type => Internal_Ref_Result_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Ref_Result;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Ref_Result;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Ref_Result_Array_Access) return Internal_Ref_Result_Array_Access is
      Ret : Internal_Ref_Result_Array_Access := Create_Internal_Ref_Result_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Ref_Result_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Ref_Result_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Ref_Result_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Ref_Result_Array (Items_Count : Natural) return Internal_Ref_Result_Array_Access
   is (if Items_Count = 0
       then No_Internal_Ref_Result_Array_Type
       else new Internal_Ref_Result_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Ref_Result_Array
     (Items : Internal_Internal_Ref_Result_Array) return Internal_Ref_Result_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Ref_Result_Array_Type;
      end if;
      return new Internal_Ref_Result_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Ref_Result_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Ref_Result_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Shape_Vectors is new Langkit_Support.Vectors (Internal_Shape);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Shape_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Shape
   is
      function Absolute_Get
        (T : Internal_Shape_Array_Access; Index : Integer)
         return Internal_Shape
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Shape,
         Sequence_Type => Internal_Shape_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Shape;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return No_Shape;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Shape_Array_Access) return Internal_Shape_Array_Access is
      Ret : Internal_Shape_Array_Access := Create_Internal_Shape_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Shape_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Shape_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Shape_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Shape_Array (Items_Count : Natural) return Internal_Shape_Array_Access
   is (if Items_Count = 0
       then No_Internal_Shape_Array_Type
       else new Internal_Shape_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Shape_Array
     (Items : Internal_Internal_Shape_Array) return Internal_Shape_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Shape_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new Internal_Shape_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Shape_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               not Equivalent (L.Items (I), R.Items (I))
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Shape_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Single_Actual_Vectors is new Langkit_Support.Vectors (Internal_Single_Actual);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Single_Actual_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Single_Actual
   is
      function Absolute_Get
        (T : Internal_Single_Actual_Array_Access; Index : Integer)
         return Internal_Single_Actual
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Single_Actual,
         Sequence_Type => Internal_Single_Actual_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Single_Actual;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Single_Actual;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Single_Actual_Array_Access) return Internal_Single_Actual_Array_Access is
      Ret : Internal_Single_Actual_Array_Access := Create_Internal_Single_Actual_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Single_Actual_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Single_Actual_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Single_Actual_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Single_Actual_Array (Items_Count : Natural) return Internal_Single_Actual_Array_Access
   is (if Items_Count = 0
       then No_Internal_Single_Actual_Array_Type
       else new Internal_Single_Actual_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Single_Actual_Array
     (Items : Internal_Internal_Single_Actual_Array) return Internal_Single_Actual_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Single_Actual_Array_Type;
      end if;
      return new Internal_Single_Actual_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Single_Actual_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Single_Actual_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Solver_Diagnostic_Vectors is new Langkit_Support.Vectors (Internal_Solver_Diagnostic);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Solver_Diagnostic_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Solver_Diagnostic
   is
      function Absolute_Get
        (T : Internal_Solver_Diagnostic_Array_Access; Index : Integer)
         return Internal_Solver_Diagnostic
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Solver_Diagnostic,
         Sequence_Type => Internal_Solver_Diagnostic_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Solver_Diagnostic;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return No_Solver_Diagnostic;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Solver_Diagnostic_Array_Access) return Internal_Solver_Diagnostic_Array_Access is
      Ret : Internal_Solver_Diagnostic_Array_Access := Create_Internal_Solver_Diagnostic_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Solver_Diagnostic_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Solver_Diagnostic_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Solver_Diagnostic_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Solver_Diagnostic_Array (Items_Count : Natural) return Internal_Solver_Diagnostic_Array_Access
   is (if Items_Count = 0
       then No_Internal_Solver_Diagnostic_Array_Type
       else new Internal_Solver_Diagnostic_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Solver_Diagnostic_Array
     (Items : Internal_Internal_Solver_Diagnostic_Array) return Internal_Solver_Diagnostic_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Solver_Diagnostic_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new Internal_Solver_Diagnostic_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Solver_Diagnostic_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               not Equivalent (L.Items (I), R.Items (I))
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Solver_Diagnostic_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Substitution_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Substitution
   is
      function Absolute_Get
        (T : Internal_Substitution_Array_Access; Index : Integer)
         return Internal_Substitution
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Substitution,
         Sequence_Type => Internal_Substitution_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Substitution;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return No_Substitution;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Substitution_Array_Access) return Internal_Substitution_Array_Access is
      Ret : Internal_Substitution_Array_Access := Create_Internal_Substitution_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Substitution_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Substitution_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Substitution_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Substitution_Array (Items_Count : Natural) return Internal_Substitution_Array_Access
   is (if Items_Count = 0
       then No_Internal_Substitution_Array_Type
       else new Internal_Substitution_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Substitution_Array
     (Items : Internal_Internal_Substitution_Array) return Internal_Substitution_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Substitution_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new Internal_Substitution_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Substitution_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               not Equivalent (L.Items (I), R.Items (I))
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Substitution_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Internal_Unit_Vectors is new Langkit_Support.Vectors (Internal_Unit);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_Unit_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_Unit
   is
      function Absolute_Get
        (T : Internal_Unit_Array_Access; Index : Integer)
         return Internal_Unit
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_Unit,
         Sequence_Type => Internal_Unit_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_Unit;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return null;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_Unit_Array_Access) return Internal_Unit_Array_Access is
      Ret : Internal_Unit_Array_Access := Create_Internal_Unit_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Unit_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_Unit_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Unit_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_Unit_Array (Items_Count : Natural) return Internal_Unit_Array_Access
   is (if Items_Count = 0
       then No_Internal_Unit_Array_Type
       else new Internal_Unit_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_Unit_Array
     (Items : Internal_Internal_Unit_Array) return Internal_Unit_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_Unit_Array_Type;
      end if;
      return new Internal_Unit_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_Unit_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Unit_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      function Make_Unique (A : Internal_Unit_Array_Access) return Internal_Unit_Array_Access is
         --  To keep the order of the result deterministic, this function works
         --  in two steps. First, determine for each item in A whether it
         --  duplicate a previous item. Only then, go through all items in A
         --  and add only non-duplicated ones to the result.
         Duplicates : array (A.Items'Range) of Boolean := (others => False);
         --  For each item in A, indicate whether the value is a duplicate of a
         --  previous one in the array.
         Unique_Elements : Natural;
         --  Number of unique elements in A
      begin
         --  Step 1: compute Duplicates
         declare
            package Sets is new Ada.Containers.Hashed_Sets
              (Element_Type        => Internal_Unit,
               "="                 => "=",
               Equivalent_Elements => "=",
               Hash                => Hash);
            Set : Sets.Set;
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Unit renames A.Items (I);
               begin
                  if Set.Contains (Item) then
                     Duplicates (I) := True;
                  else
                     Set.Insert (Item);
                  end if;
               end;
            end loop;
            Unique_Elements := Natural (Set.Length);
         end;
         --  Step 2: create the result
         declare
            Next   : Positive := 1;
            Result : constant Internal_Unit_Array_Access :=
               Create_Internal_Unit_Array (Unique_Elements);
         begin
            for I in A.Items'Range loop
               declare
                  Item : Internal_Unit renames A.Items (I);
               begin
                  if not Duplicates (I) then
                     Result.Items (Next) := Item;
                     Next := Next + 1;
                  end if;
               end;
            end loop;
            pragma Assert (Next = Result.N + 1);
            return Result;
         end;
      end Make_Unique;
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Internal_User_Defined_Function_Subp_Spec_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Internal_User_Defined_Function_Subp_Spec
   is
      function Absolute_Get
        (T : Internal_User_Defined_Function_Subp_Spec_Array_Access; Index : Integer)
         return Internal_User_Defined_Function_Subp_Spec
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Internal_User_Defined_Function_Subp_Spec,
         Sequence_Type => Internal_User_Defined_Function_Subp_Spec_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Internal_User_Defined_Function_Subp_Spec;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return No_User_Defined_Function_Subp_Spec;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Internal_User_Defined_Function_Subp_Spec_Array_Access) return Internal_User_Defined_Function_Subp_Spec_Array_Access is
      Ret : Internal_User_Defined_Function_Subp_Spec_Array_Access := Create_Internal_User_Defined_Function_Subp_Spec_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_User_Defined_Function_Subp_Spec_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Internal_User_Defined_Function_Subp_Spec_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_User_Defined_Function_Subp_Spec_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Internal_User_Defined_Function_Subp_Spec_Array (Items_Count : Natural) return Internal_User_Defined_Function_Subp_Spec_Array_Access
   is (if Items_Count = 0
       then No_Internal_User_Defined_Function_Subp_Spec_Array_Type
       else new Internal_User_Defined_Function_Subp_Spec_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Internal_User_Defined_Function_Subp_Spec_Array
     (Items : Internal_Internal_User_Defined_Function_Subp_Spec_Array) return Internal_User_Defined_Function_Subp_Spec_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Internal_User_Defined_Function_Subp_Spec_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new Internal_User_Defined_Function_Subp_Spec_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Internal_User_Defined_Function_Subp_Spec_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               not Equivalent (L.Items (I), R.Items (I))
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_User_Defined_Function_Subp_Spec_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Lexical_Env_Vectors is new Langkit_Support.Vectors (Lexical_Env);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Lexical_Env_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Lexical_Env
   is
      function Absolute_Get
        (T : Lexical_Env_Array_Access; Index : Integer)
         return Lexical_Env
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Lexical_Env,
         Sequence_Type => Lexical_Env_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Lexical_Env;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return Empty_Env;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Lexical_Env_Array_Access) return Lexical_Env_Array_Access is
      Ret : Lexical_Env_Array_Access := Create_Lexical_Env_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Lexical_Env_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Lexical_Env_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Lexical_Env_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Lexical_Env_Array (Items_Count : Natural) return Lexical_Env_Array_Access
   is (if Items_Count = 0
       then No_Lexical_Env_Array_Type
       else new Lexical_Env_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Lexical_Env_Array
     (Items : Internal_Lexical_Env_Array) return Lexical_Env_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Lexical_Env_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new Lexical_Env_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Lexical_Env_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               not Equivalent (L.Items (I), R.Items (I))
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Lexical_Env_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Logic_Equation_Vectors is new Langkit_Support.Vectors (Logic_Equation);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Logic_Equation_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Logic_Equation
   is
      function Absolute_Get
        (T : Logic_Equation_Array_Access; Index : Integer)
         return Logic_Equation
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Logic_Equation,
         Sequence_Type => Logic_Equation_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Logic_Equation;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return Null_Logic_Equation;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Logic_Equation_Array_Access) return Logic_Equation_Array_Access is
      Ret : Logic_Equation_Array_Access := Create_Logic_Equation_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Logic_Equation_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Logic_Equation_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Logic_Equation_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Logic_Equation_Array (Items_Count : Natural) return Logic_Equation_Array_Access
   is (if Items_Count = 0
       then No_Logic_Equation_Array_Type
       else new Logic_Equation_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Logic_Equation_Array
     (Items : Internal_Logic_Equation_Array) return Logic_Equation_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Logic_Equation_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new Logic_Equation_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Logic_Equation_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Logic_Equation_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package String_Type_Vectors is new Langkit_Support.Vectors (String_Type);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : String_Type_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return String_Type
   is
      function Absolute_Get
        (T : String_Type_Array_Access; Index : Integer)
         return String_Type
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => String_Type,
         Sequence_Type => String_Type_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : String_Type;
   begin
      if Relative_Get (T, Index, Result) then
            Inc_Ref (Result);
         return Result;
      elsif Or_Null then
         return Empty_String;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : String_Type_Array_Access) return String_Type_Array_Access is
      Ret : String_Type_Array_Access := Create_String_Type_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
         for Item of Ret.Items loop
            Inc_Ref (Item);
         end loop;
      return Ret;
   end Concat;
      ------------------
      -- Join_Strings --
      ------------------
      function Join_Strings
        (Separator : String_Type;
         Strings   : String_Type_Array_Access) return String_Type
      is
         Separator_Length : constant Natural := Separator.Length;
         Length           : Natural := 0;
         First            : Boolean;
      begin
         --  First, compute the length of the result: the sum of all string
         --  lengths in Strings.
         First := True;
         for S of Strings.Items loop
            if First then
               First := False;
            else
               Length := Length + Separator_Length;
            end if;
            Length := Length + S.Length;
         end loop;
         --  Create the result string with the correct length. Do not use our
         --  constructor and initialize the content in-place, to avoid extra
         --  copies.
         return Result : constant String_Type :=
            new String_Record (Length)
         do
            Result.Ref_Count := 1;
            --  Now copy the content of all strings into the result
            declare
               Last : Natural := 0;
            begin
               First := True;
               for S of Strings.Items loop
                  if First then
                     First := False;
                  else
                     Result.Content (Last + 1 .. Last + Separator_Length) :=
                        Separator.Content;
                     Last := Last + Separator_Length;
                  end if;
                  Result.Content (Last + 1 .. Last + S.Length) := S.Content;
                  Last := Last + S.Length;
               end loop;
            end;
         end return;
      end Join_Strings;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : String_Type_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : String_Type_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out String_Type_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
            for Item of T.Items loop
               Dec_Ref (Item);
            end loop;
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_String_Type_Array (Items_Count : Natural) return String_Type_Array_Access
   is (if Items_Count = 0
       then No_String_Type_Array_Type
       else new String_Type_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_String_Type_Array
     (Items : Internal_String_Type_Array) return String_Type_Array_Access is
   begin
      if Items'Length = 0 then
         return No_String_Type_Array_Type;
      end if;
         for El of Items loop
            Inc_Ref (El);
         end loop;
      return new String_Type_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : String_Type_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               not Equivalent (L.Items (I), R.Items (I))
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : String_Type_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      package Symbol_Type_Vectors is new Langkit_Support.Vectors (Symbol_Type);
   ---------
   -- Get --
   ---------
   function Get
     (Node    : Bare_Ada_Node;
      T       : Symbol_Type_Array_Access;
      Index   : Integer;
      Or_Null : Boolean := False) return Symbol_Type
   is
      function Absolute_Get
        (T : Symbol_Type_Array_Access; Index : Integer)
         return Symbol_Type
      is
        (T.Items (Index + 1)); --  T.Items is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Symbol_Type,
         Sequence_Type => Symbol_Type_Array_Access,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Symbol_Type;
   begin
      if Relative_Get (T, Index, Result) then
         return Result;
      elsif Or_Null then
         return No_Symbol;
      else
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "out-of-bounds array access");
      end if;
   end Get;
   ------------
   -- Concat --
   ------------
   function Concat (L, R : Symbol_Type_Array_Access) return Symbol_Type_Array_Access is
      Ret : Symbol_Type_Array_Access := Create_Symbol_Type_Array (Length (L) + Length (R));
   begin
      Ret.Items := L.Items & R.Items;
      return Ret;
   end Concat;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Symbol_Type_Array_Access) is
   begin
      if T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   ------------
   -- Length --
   ------------
   function Length (T : Symbol_Type_Array_Access) return Natural is (T.N);
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Symbol_Type_Array_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
   function Create_Symbol_Type_Array (Items_Count : Natural) return Symbol_Type_Array_Access
   is (if Items_Count = 0
       then No_Symbol_Type_Array_Type
       else new Symbol_Type_Array_Record'(N => Items_Count, Ref_Count => 1, Items => <>));
   function Create_Symbol_Type_Array
     (Items : Internal_Symbol_Type_Array) return Symbol_Type_Array_Access is
   begin
      if Items'Length = 0 then
         return No_Symbol_Type_Array_Type;
      end if;
      return new Symbol_Type_Array_Record'
        (N => Items'Length, Ref_Count => 1, Items => Items);
   end;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (L, R : Symbol_Type_Array_Access) return Boolean is
   begin
      if L.N /= R.N then
         return False;
      end if;
      for I in L.Items'Range loop
         if
               L.Items (I) /= R.Items (I)
         then
            return False;
         end if;
      end loop;
      return True;
   end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Symbol_Type_Array_Access) return String is
         Result : Unbounded_String;
      begin
         Append (Result, "[");
         for I in A.Items'Range loop
            if I > A.Items'First then
               Append (Result, ", ");
            end if;
            Append (Result, Trace_Image (A.Items (I)));
         end loop;
         Append (Result, "]");
         return To_String (Result);
      end Trace_Image;
      function Make_Unique (A : Symbol_Type_Array_Access) return Symbol_Type_Array_Access is
         --  To keep the order of the result deterministic, this function works
         --  in two steps. First, determine for each item in A whether it
         --  duplicate a previous item. Only then, go through all items in A
         --  and add only non-duplicated ones to the result.
         Duplicates : array (A.Items'Range) of Boolean := (others => False);
         --  For each item in A, indicate whether the value is a duplicate of a
         --  previous one in the array.
         Unique_Elements : Natural;
         --  Number of unique elements in A
      begin
         --  Step 1: compute Duplicates
         declare
            package Sets is new Ada.Containers.Hashed_Sets
              (Element_Type        => Symbol_Type,
               "="                 => "=",
               Equivalent_Elements => "=",
               Hash                => Hash);
            Set : Sets.Set;
         begin
            for I in A.Items'Range loop
               declare
                  Item : Symbol_Type renames A.Items (I);
               begin
                  if Set.Contains (Item) then
                     Duplicates (I) := True;
                  else
                     Set.Insert (Item);
                  end if;
               end;
            end loop;
            Unique_Elements := Natural (Set.Length);
         end;
         --  Step 2: create the result
         declare
            Next   : Positive := 1;
            Result : constant Symbol_Type_Array_Access :=
               Create_Symbol_Type_Array (Unique_Elements);
         begin
            for I in A.Items'Range loop
               declare
                  Item : Symbol_Type renames A.Items (I);
               begin
                  if not Duplicates (I) then
                     Result.Items (Next) := Item;
                     Next := Next + 1;
                  end if;
               end;
            end loop;
            pragma Assert (Next = Result.N + 1);
            return Result;
         end;
      end Make_Unique;
   ----------
   -- Next --
   ----------
   function Next
     (T       : Bare_Ada_Node_Iterator_Access;
      Element : out Bare_Ada_Node) return Boolean is
   begin
      if T = null then
         raise Property_Error with "null access dereference";
      end if;
      Check_Safety_Net (T.Safety_Net);
      if T.Index > T.Elements.Items'Last then
         return False;
      else
         Element := T.Elements.Items (T.Index);
         T.Index := T.Index + 1;
         return True;
      end if;
   end Next;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Bare_Ada_Node_Iterator_Access) is
   begin
      if T /= null and then T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Bare_Ada_Node_Iterator_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Dec_Ref (T.Elements);
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Bare_Ada_Node_Iterator_Access) return String is
      begin
         return "<Iterator of AdaNode, index="
                & A.Index'Image & ">";
      end Trace_Image;
   ----------
   -- Next --
   ----------
   function Next
     (T       : Internal_Completion_Item_Iterator_Access;
      Element : out Internal_Completion_Item) return Boolean is
   begin
      if T = null then
         raise Property_Error with "null access dereference";
      end if;
      Check_Safety_Net (T.Safety_Net);
      if T.Index > T.Elements.Items'Last then
         return False;
      else
         Element := T.Elements.Items (T.Index);
         T.Index := T.Index + 1;
         return True;
      end if;
   end Next;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Completion_Item_Iterator_Access) is
   begin
      if T /= null and then T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Completion_Item_Iterator_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Dec_Ref (T.Elements);
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Completion_Item_Iterator_Access) return String is
      begin
         return "<Iterator of CompletionItem, index="
                & A.Index'Image & ">";
      end Trace_Image;
   ----------
   -- Next --
   ----------
   function Next
     (T       : Internal_Entity_Iterator_Access;
      Element : out Internal_Entity) return Boolean is
   begin
      if T = null then
         raise Property_Error with "null access dereference";
      end if;
      Check_Safety_Net (T.Safety_Net);
      if T.Index > T.Elements.Items'Last then
         return False;
      else
         Element := T.Elements.Items (T.Index);
         T.Index := T.Index + 1;
         return True;
      end if;
   end Next;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Entity_Iterator_Access) is
   begin
      if T /= null and then T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Entity_Iterator_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Dec_Ref (T.Elements);
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Entity_Iterator_Access) return String is
      begin
         return "<Iterator of AdaNode.entity, index="
                & A.Index'Image & ">";
      end Trace_Image;
   ----------
   -- Next --
   ----------
   function Next
     (T       : Internal_Inner_Env_Assoc_Iterator_Access;
      Element : out Internal_Inner_Env_Assoc) return Boolean is
   begin
      if T = null then
         raise Property_Error with "null access dereference";
      end if;
      Check_Safety_Net (T.Safety_Net);
      if T.Index > T.Elements.Items'Last then
         return False;
      else
         Element := T.Elements.Items (T.Index);
         T.Index := T.Index + 1;
         return True;
      end if;
   end Next;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (T : Internal_Inner_Env_Assoc_Iterator_Access) is
   begin
      if T /= null and then T.Ref_Count >= 0 then
         T.Ref_Count := T.Ref_Count + 1;
      end if;
   end Inc_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (T : in out Internal_Inner_Env_Assoc_Iterator_Access) is
   begin
      if T = null or else T.Ref_Count < 0 then
         return;
      end if;
      if T.Ref_Count = 1 then
         Dec_Ref (T.Elements);
         Free (T);
      else
         T.Ref_Count := T.Ref_Count - 1;
         T := null;
      end if;
   end Dec_Ref;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (A : Internal_Inner_Env_Assoc_Iterator_Access) return String is
      begin
         return "<Iterator of InnerEnvAssoc, index="
                & A.Index'Image & ">";
      end Trace_Image;
   ---------
   -- "<" --
   ---------
   function "<" (Left, Right : Internal_Unit) return Boolean is
   begin
      return Left.Filename < Right.Filename;
   end "<";
function Hash (Key : Mmz_Key_Item) return Hash_Type;
function Equivalent (L, R : Mmz_Key_Item) return Boolean;
procedure Destroy (Key : in out Mmz_Key_Array_Access);
----------------
-- Equivalent --
----------------
function Equivalent (L, R : Mmz_Key_Item) return Boolean is
begin
   if L.Kind /= R.Kind then
      return False;
   end if;
   case L.Kind is
         when Mmz_Bare_Access_Def =>
               return L.As_Bare_Access_Def = R.As_Bare_Access_Def;
         when Mmz_Bare_Ada_Node =>
               return L.As_Bare_Ada_Node = R.As_Bare_Ada_Node;
         when Mmz_Bare_Anonymous_Expr_Decl =>
               return L.As_Bare_Anonymous_Expr_Decl = R.As_Bare_Anonymous_Expr_Decl;
         when Mmz_Bare_Array_Subcomponent_Choice_Name =>
               return L.As_Bare_Array_Subcomponent_Choice_Name = R.As_Bare_Array_Subcomponent_Choice_Name;
         when Mmz_Bare_Array_Type_Def =>
               return L.As_Bare_Array_Type_Def = R.As_Bare_Array_Type_Def;
         when Mmz_Bare_Assoc_List =>
               return L.As_Bare_Assoc_List = R.As_Bare_Assoc_List;
         when Mmz_Bare_Base_Aggregate =>
               return L.As_Bare_Base_Aggregate = R.As_Bare_Base_Aggregate;
         when Mmz_Bare_Base_Id =>
               return L.As_Bare_Base_Id = R.As_Bare_Base_Id;
         when Mmz_Bare_Base_Subp_Spec =>
               return L.As_Bare_Base_Subp_Spec = R.As_Bare_Base_Subp_Spec;
         when Mmz_Bare_Base_Type_Decl =>
               return L.As_Bare_Base_Type_Decl = R.As_Bare_Base_Type_Decl;
         when Mmz_Bare_Basic_Decl =>
               return L.As_Bare_Basic_Decl = R.As_Bare_Basic_Decl;
         when Mmz_Bare_Body_Node =>
               return L.As_Bare_Body_Node = R.As_Bare_Body_Node;
         when Mmz_Bare_Compilation_Unit =>
               return L.As_Bare_Compilation_Unit = R.As_Bare_Compilation_Unit;
         when Mmz_Bare_Decimal_Fixed_Point_Def =>
               return L.As_Bare_Decimal_Fixed_Point_Def = R.As_Bare_Decimal_Fixed_Point_Def;
         when Mmz_Bare_Defining_Name =>
               return L.As_Bare_Defining_Name = R.As_Bare_Defining_Name;
         when Mmz_Bare_End_Name =>
               return L.As_Bare_End_Name = R.As_Bare_End_Name;
         when Mmz_Bare_Enum_Literal_Decl =>
               return L.As_Bare_Enum_Literal_Decl = R.As_Bare_Enum_Literal_Decl;
         when Mmz_Bare_Enum_Type_Def =>
               return L.As_Bare_Enum_Type_Def = R.As_Bare_Enum_Type_Def;
         when Mmz_Bare_Expr =>
               return L.As_Bare_Expr = R.As_Bare_Expr;
         when Mmz_Bare_For_Loop_Var_Decl =>
               return L.As_Bare_For_Loop_Var_Decl = R.As_Bare_For_Loop_Var_Decl;
         when Mmz_Bare_Formal_Discrete_Type_Def =>
               return L.As_Bare_Formal_Discrete_Type_Def = R.As_Bare_Formal_Discrete_Type_Def;
         when Mmz_Bare_Formal_Subp_Decl =>
               return L.As_Bare_Formal_Subp_Decl = R.As_Bare_Formal_Subp_Decl;
         when Mmz_Bare_Generic_Instantiation =>
               return L.As_Bare_Generic_Instantiation = R.As_Bare_Generic_Instantiation;
         when Mmz_Bare_Mod_Int_Type_Def =>
               return L.As_Bare_Mod_Int_Type_Def = R.As_Bare_Mod_Int_Type_Def;
         when Mmz_Bare_Name =>
               return L.As_Bare_Name = R.As_Bare_Name;
         when Mmz_Bare_Ordinary_Fixed_Point_Def =>
               return L.As_Bare_Ordinary_Fixed_Point_Def = R.As_Bare_Ordinary_Fixed_Point_Def;
         when Mmz_Bare_Private_Type_Def =>
               return L.As_Bare_Private_Type_Def = R.As_Bare_Private_Type_Def;
         when Mmz_Bare_Real_Type_Def =>
               return L.As_Bare_Real_Type_Def = R.As_Bare_Real_Type_Def;
         when Mmz_Bare_Record_Type_Def =>
               return L.As_Bare_Record_Type_Def = R.As_Bare_Record_Type_Def;
         when Mmz_Bare_Signed_Int_Type_Def =>
               return L.As_Bare_Signed_Int_Type_Def = R.As_Bare_Signed_Int_Type_Def;
         when Mmz_Bare_Subtype_Decl =>
               return L.As_Bare_Subtype_Decl = R.As_Bare_Subtype_Decl;
         when Mmz_Bare_Subunit =>
               return L.As_Bare_Subunit = R.As_Bare_Subunit;
         when Mmz_Bare_Task_Type_Decl =>
               return L.As_Bare_Task_Type_Decl = R.As_Bare_Task_Type_Decl;
         when Mmz_Bare_Type_Decl =>
               return L.As_Bare_Type_Decl = R.As_Bare_Type_Decl;
         when Mmz_Bare_Type_Expr =>
               return L.As_Bare_Type_Expr = R.As_Bare_Type_Expr;
         when Mmz_Boolean =>
               return L.As_Boolean = R.As_Boolean;
         when Mmz_Env_Rebindings =>
               return L.As_Env_Rebindings = R.As_Env_Rebindings;
         when Mmz_Integer =>
               return L.As_Integer = R.As_Integer;
         when Mmz_Internal_Entity_Base_Type_Decl_Array_Access =>
               return Equivalent (L.As_Internal_Entity_Base_Type_Decl_Array_Access, R.As_Internal_Entity_Base_Type_Decl_Array_Access);
         when Mmz_Internal_Entity_Expr =>
               return L.As_Internal_Entity_Expr = R.As_Internal_Entity_Expr;
         when Mmz_Internal_Entity_Info =>
               return L.As_Internal_Entity_Info = R.As_Internal_Entity_Info;
         when Mmz_Internal_Metadata =>
               return L.As_Internal_Metadata = R.As_Internal_Metadata;
         when Mmz_Lexical_Env =>
               return Equivalent (L.As_Lexical_Env, R.As_Lexical_Env);
         when Mmz_Symbol_Type =>
               return L.As_Symbol_Type = R.As_Symbol_Type;
   end case;
end Equivalent;
----------
-- Hash --
----------
function Hash (Key : Mmz_Key_Item) return Hash_Type is
begin
   case Key.Kind is
         when Mmz_Bare_Access_Def =>
            return Hash (Key.As_Bare_Access_Def);
         when Mmz_Bare_Ada_Node =>
            return Hash (Key.As_Bare_Ada_Node);
         when Mmz_Bare_Anonymous_Expr_Decl =>
            return Hash (Key.As_Bare_Anonymous_Expr_Decl);
         when Mmz_Bare_Array_Subcomponent_Choice_Name =>
            return Hash (Key.As_Bare_Array_Subcomponent_Choice_Name);
         when Mmz_Bare_Array_Type_Def =>
            return Hash (Key.As_Bare_Array_Type_Def);
         when Mmz_Bare_Assoc_List =>
            return Hash (Key.As_Bare_Assoc_List);
         when Mmz_Bare_Base_Aggregate =>
            return Hash (Key.As_Bare_Base_Aggregate);
         when Mmz_Bare_Base_Id =>
            return Hash (Key.As_Bare_Base_Id);
         when Mmz_Bare_Base_Subp_Spec =>
            return Hash (Key.As_Bare_Base_Subp_Spec);
         when Mmz_Bare_Base_Type_Decl =>
            return Hash (Key.As_Bare_Base_Type_Decl);
         when Mmz_Bare_Basic_Decl =>
            return Hash (Key.As_Bare_Basic_Decl);
         when Mmz_Bare_Body_Node =>
            return Hash (Key.As_Bare_Body_Node);
         when Mmz_Bare_Compilation_Unit =>
            return Hash (Key.As_Bare_Compilation_Unit);
         when Mmz_Bare_Decimal_Fixed_Point_Def =>
            return Hash (Key.As_Bare_Decimal_Fixed_Point_Def);
         when Mmz_Bare_Defining_Name =>
            return Hash (Key.As_Bare_Defining_Name);
         when Mmz_Bare_End_Name =>
            return Hash (Key.As_Bare_End_Name);
         when Mmz_Bare_Enum_Literal_Decl =>
            return Hash (Key.As_Bare_Enum_Literal_Decl);
         when Mmz_Bare_Enum_Type_Def =>
            return Hash (Key.As_Bare_Enum_Type_Def);
         when Mmz_Bare_Expr =>
            return Hash (Key.As_Bare_Expr);
         when Mmz_Bare_For_Loop_Var_Decl =>
            return Hash (Key.As_Bare_For_Loop_Var_Decl);
         when Mmz_Bare_Formal_Discrete_Type_Def =>
            return Hash (Key.As_Bare_Formal_Discrete_Type_Def);
         when Mmz_Bare_Formal_Subp_Decl =>
            return Hash (Key.As_Bare_Formal_Subp_Decl);
         when Mmz_Bare_Generic_Instantiation =>
            return Hash (Key.As_Bare_Generic_Instantiation);
         when Mmz_Bare_Mod_Int_Type_Def =>
            return Hash (Key.As_Bare_Mod_Int_Type_Def);
         when Mmz_Bare_Name =>
            return Hash (Key.As_Bare_Name);
         when Mmz_Bare_Ordinary_Fixed_Point_Def =>
            return Hash (Key.As_Bare_Ordinary_Fixed_Point_Def);
         when Mmz_Bare_Private_Type_Def =>
            return Hash (Key.As_Bare_Private_Type_Def);
         when Mmz_Bare_Real_Type_Def =>
            return Hash (Key.As_Bare_Real_Type_Def);
         when Mmz_Bare_Record_Type_Def =>
            return Hash (Key.As_Bare_Record_Type_Def);
         when Mmz_Bare_Signed_Int_Type_Def =>
            return Hash (Key.As_Bare_Signed_Int_Type_Def);
         when Mmz_Bare_Subtype_Decl =>
            return Hash (Key.As_Bare_Subtype_Decl);
         when Mmz_Bare_Subunit =>
            return Hash (Key.As_Bare_Subunit);
         when Mmz_Bare_Task_Type_Decl =>
            return Hash (Key.As_Bare_Task_Type_Decl);
         when Mmz_Bare_Type_Decl =>
            return Hash (Key.As_Bare_Type_Decl);
         when Mmz_Bare_Type_Expr =>
            return Hash (Key.As_Bare_Type_Expr);
         when Mmz_Boolean =>
            return Hash (Key.As_Boolean);
         when Mmz_Env_Rebindings =>
            return Hash (Key.As_Env_Rebindings);
         when Mmz_Integer =>
            return Hash (Key.As_Integer);
         when Mmz_Internal_Entity_Base_Type_Decl_Array_Access =>
            return Hash (Key.As_Internal_Entity_Base_Type_Decl_Array_Access);
         when Mmz_Internal_Entity_Expr =>
            return Hash (Key.As_Internal_Entity_Expr);
         when Mmz_Internal_Entity_Info =>
            return Hash (Key.As_Internal_Entity_Info);
         when Mmz_Internal_Metadata =>
            return Hash (Key.As_Internal_Metadata);
         when Mmz_Lexical_Env =>
            return Hash (Key.As_Lexical_Env);
         when Mmz_Symbol_Type =>
            return Hash (Key.As_Symbol_Type);
   end case;
end Hash;
----------
-- Hash --
----------
function Hash (Key : Mmz_Key) return Hash_Type is
   Result : Hash_Type := Mmz_Property'Pos (Key.Property);
begin
   for K of Key.Items.all loop
      Result := Combine (Result, Hash (K));
   end loop;
   return Result;
end Hash;
----------------
-- Equivalent --
----------------
function Equivalent (L, R : Mmz_Key) return Boolean is
   L_Items : Mmz_Key_Array renames L.Items.all;
   R_Items : Mmz_Key_Array renames R.Items.all;
begin
   if L.Property /= R.Property or else L_Items'Length /= R_Items'Length then
      return False;
   end if;
   for I in L_Items'Range loop
      if not Equivalent (L_Items (I), R_Items (I)) then
         return False;
      end if;
   end loop;
   return True;
end Equivalent;
-------------
-- Destroy --
-------------
procedure Destroy (Map : in out Memoization_Maps.Map) is
   use Memoization_Maps;
   --  We need keys and values to be valid when clearing the memoization map,
   --  but on the other hand we need to free keys and values as well. To
   --  achieve both goals, we first copy key and values into arrays, then we
   --  clear the map, and then we free keys/values in the arrays. Allocate both
   --  arrays on the heap to avoid stack overflow, as they can be quite big.
   Length : constant Natural := Natural (Map.Length);
   type Key_Array is array (1 .. Length) of Mmz_Key_Array_Access;
   type Key_Array_Access is access Key_Array;
   procedure Free is new Ada.Unchecked_Deallocation
     (Key_Array, Key_Array_Access);
   type Value_Array is array (1 .. Length) of Mmz_Value;
   type Value_Array_Access is access Value_Array;
   procedure Free is new Ada.Unchecked_Deallocation
     (Value_Array, Value_Array_Access);
   Keys   : Key_Array_Access := new Key_Array;
   Values : Value_Array_Access := new Value_Array;
   I      : Positive := 1;
begin
   for Cur in Map.Iterate loop
      Keys (I) := Key (Cur).Items;
      Values (I) := Element (Cur);
      I := I + 1;
   end loop;
   Map.Clear;
   for K_Array of Keys.all loop
      Destroy (K_Array);
   end loop;
   for V of Values.all loop
      case V.Kind is
         when Mmz_Error =>
            Free_Memoized_Error (V.Exc_Id, V.Exc_Msg);
            when Mmz_Internal_Entity_Array_Access =>
               Dec_Ref (V.As_Internal_Entity_Array_Access);
            when Mmz_Internal_Entity_Base_Formal_Param_Decl_Array_Access =>
               Dec_Ref (V.As_Internal_Entity_Base_Formal_Param_Decl_Array_Access);
            when Mmz_Internal_Entity_Base_Type_Decl_Array_Access =>
               Dec_Ref (V.As_Internal_Entity_Base_Type_Decl_Array_Access);
            when Mmz_Internal_Entity_Basic_Decl_Array_Access =>
               Dec_Ref (V.As_Internal_Entity_Basic_Decl_Array_Access);
            when Mmz_Internal_Entity_Compilation_Unit_Array_Access =>
               Dec_Ref (V.As_Internal_Entity_Compilation_Unit_Array_Access);
            when Mmz_Internal_Entity_Expr_Array_Access =>
               Dec_Ref (V.As_Internal_Entity_Expr_Array_Access);
            when Mmz_Internal_Env_Assoc =>
               Dec_Ref (V.As_Internal_Env_Assoc);
            when Mmz_Internal_Env_Assoc_Array_Access =>
               Dec_Ref (V.As_Internal_Env_Assoc_Array_Access);
            when Mmz_Internal_Inner_Env_Assoc_Array_Access =>
               Dec_Ref (V.As_Internal_Inner_Env_Assoc_Array_Access);
            when Mmz_Internal_Param_Match_Array_Access =>
               Dec_Ref (V.As_Internal_Param_Match_Array_Access);
            when Mmz_Internal_Single_Actual_Array_Access =>
               Dec_Ref (V.As_Internal_Single_Actual_Array_Access);
            when Mmz_Internal_Unit_Array_Access =>
               Dec_Ref (V.As_Internal_Unit_Array_Access);
            when Mmz_Lexical_Env =>
               Dec_Ref (V.As_Lexical_Env);
         when others => null;
      end case;
   end loop;
   Free (Keys);
   Free (Values);
end Destroy;
-------------
-- Destroy --
-------------
procedure Destroy (Key : in out Mmz_Key_Array_Access) is
   procedure Free is new Ada.Unchecked_Deallocation
     (Mmz_Key_Array, Mmz_Key_Array_Access);
begin
      for K of Key.all loop
         case K.Kind is
               when Mmz_Internal_Entity_Base_Type_Decl_Array_Access =>
                  Dec_Ref (K.As_Internal_Entity_Base_Type_Decl_Array_Access);
               when Mmz_Lexical_Env =>
                  Dec_Ref (K.As_Lexical_Env);
            when others => null;
         end case;
      end loop;
   Free (Key);
end Destroy;
-------------------------
-- Find_Memoized_Value --
-------------------------
function Find_Memoized_Value
  (Unit       : Internal_Unit;
   Handle     : out Memoization_Handle;
   Value      : out Mmz_Value;
   Create_Key : access function return Mmz_Key) return Boolean
is
   Inserted : Boolean;
begin
   --  Make sure that we don't lookup stale caches
   Reset_Caches (Unit);
   --  Initialize handle: create the key and create a cursor pointing to an
   --  existing entry.
   Handle.Key := Create_Key.all;
   Handle.Cache_Version := Unit.Cache_Version;
   Value := (Kind => Mmz_Evaluating);
   Unit.Memoization_Map.Insert (Handle.Key, Value, Handle.Cur, Inserted);
   --  No existing entry yet? The above just created one. Otherwise, destroy
   --  our key and reuse the existing entry's.
   if not Inserted then
      Destroy (Handle.Key.Items);
      Handle.Key := Memoization_Maps.Key (Handle.Cur);
      Value := Memoization_Maps.Element (Handle.Cur);
   end if;
   return not Inserted;
end Find_Memoized_Value;
------------------------
-- Add_Memoized_Value --
------------------------
procedure Add_Memoized_Value
  (Unit   : Internal_Unit;
   Handle : in out Memoization_Handle;
   Value  : Mmz_Value;
   Stored : out Boolean) is
begin
   --  If Handle was created using a memoization map that has been since then
   --  reset, do nothing: the result can be partly stale due to the event that
   --  triggered the memoization tables reset.
   Stored := Unit.Cache_Version <= Handle.Cache_Version;
   if Stored then
      Unit.Memoization_Map.Replace_Element (Handle.Cur, Value);
   end if;
end Add_Memoized_Value;
------------------------
-- Add_Memoized_Error --
------------------------
procedure Add_Memoized_Error
  (Unit   : Internal_Unit;
   Handle : in out Memoization_Handle;
   Exc    : Ada.Exceptions.Exception_Occurrence;
   Stored : out Boolean)
is
   Value : Mmz_Value (Kind => Mmz_Error);
begin
   Store_Memoized_Error (Exc, Value.Exc_Id, Value.Exc_Msg);
   Add_Memoized_Value (Unit, Handle, Value, Stored);
   if not Stored then
      Free_Memoized_Error (Value.Exc_Id, Value.Exc_Msg);
   end if;
end Add_Memoized_Error;
----------------------------
-- Reraise_Memoized_Error --
----------------------------
procedure Reraise_Memoized_Error (Value : Mmz_Value) is
begin
   Reraise_Memoized_Error (Value.Exc_Id, Value.Exc_Msg);
end Reraise_Memoized_Error;
--------------------------
-- Store_Memoized_Error --
--------------------------
procedure Store_Memoized_Error
  (Exc     : Ada.Exceptions.Exception_Occurrence;
   Exc_Id  : out Ada.Exceptions.Exception_Id;
   Exc_Msg : out String_Access) is
begin
   Exc_Id := Ada.Exceptions.Exception_Identity (Exc);
   Exc_Msg := new String'(Ada.Exceptions.Exception_Message (Exc));
end Store_Memoized_Error;
-------------------------
-- Free_Memoized_Error --
-------------------------
procedure Free_Memoized_Error
  (Exc_Id  : in out Ada.Exceptions.Exception_Id;
   Exc_Msg : in out String_Access)
is
   pragma Unreferenced (Exc_Id);
begin
   Free (Exc_Msg);
end Free_Memoized_Error;
----------------------------
-- Reraise_Memoized_Error --
----------------------------
procedure Reraise_Memoized_Error
  (Exc_Id  : Ada.Exceptions.Exception_Id;
   Exc_Msg : String_Access) is
begin
   Ada.Exceptions.Raise_Exception (Exc_Id, Exc_Msg.all & " (memoized)");
end Reraise_Memoized_Error;
   package Solver_Diagnostic_Vectors is new Langkit_Support.Vectors
     (Internal_Solver_Diagnostic);
   ----------------------------
   -- Allocate_Logic_Context --
   ----------------------------
   function Allocate_Logic_Context
     (Ctx : Internal_Logic_Context) return Internal_Logic_Context_Access
   is ((if Ctx.Ref_Node = No_Entity
           and then Ctx.Decl_Node = No_Entity
        then null
        else new Internal_Logic_Context'(Ctx)));
   -------------------------
   -- Trace_Logic_Context --
   -------------------------
   function Trace_Logic_Context
     (Ctx : Internal_Logic_Context_Access) return String
   is (Trace_Image (Ctx.all));
   -----------------
   -- Deep_Equals --
   -----------------
   function Deep_Equals
     (X, Y : Internal_Logic_Context_Access) return Boolean
   is (X.all = Y.all);
   ------------------------
   -- Free_Logic_Context --
   ------------------------
   procedure Free_Logic_Context
     (Ctx : in out Internal_Logic_Context_Access)
   is
      procedure Free is new Ada.Unchecked_Deallocation
        (Internal_Logic_Context, Internal_Logic_Context_Access);
   begin
      Free (Ctx);
   end Free_Logic_Context;
   -------------------
   -- Solve_Wrapper --
   -------------------
   function Solve_Wrapper
     (R            : Solver.Relation;
      Context_Node : Bare_Ada_Node) return Boolean is
   begin
      if Context_Node /= null and then Langkit_Support.Adalog.Debug.Debug then
         Assign_Names_To_Logic_Vars (Context_Node);
      end if;
      begin
         return Solver.Solve_First
           (R, Timeout => Context_Node.Unit.Context.Logic_Resolution_Timeout);
      exception
         when Langkit_Support.Adalog.Early_Binding_Error =>
            Raise_Property_Exception
              (Context_Node,
               Property_Error'Identity,
               "invalid equation for logic resolution");
         when Langkit_Support.Adalog.Timeout_Error =>
            Raise_Property_Exception
              (Context_Node,
               Property_Error'Identity,
               "logic resolution timed out");
      end;
   end Solve_Wrapper;
   ----------------------------
   -- Solve_With_Diagnostics --
   ----------------------------
   function Solve_With_Diagnostics
     (R            : Solver.Relation;
      Context_Node : Bare_Ada_Node) return Internal_Solver_Result
   is
      Ret : Internal_Solver_Result :=
        (True, No_Internal_Solver_Diagnostic_Array_Type);
      Acc : Solver_Diagnostic_Vectors.Vector;
      --  Vectors that will accumulate diagnostic emitted during resolution
      procedure Emit_Diagnostic (Diag : Internal_Solver_Diagnostic) is
      begin
         Acc.Append (Diag);
      end Emit_Diagnostic;
   begin
      Ret.Success := Solve_Wrapper (R, Context_Node);
      if not Ret.Success then
         Ret.Success := Solver.Solve_First
           (R,
            Solve_Options => (Report_Errors => True),
            Diag_Emitter => Emit_Diagnostic'Unrestricted_Access,
            Timeout => Context_Node.Unit.Context.Logic_Resolution_Timeout);
         Ret.Diagnostics := Create_Internal_Solver_Diagnostic_Array
           (Acc.Length);
         for I in 1 .. Acc.Length loop
            Ret.Diagnostics.Items (I) := Acc.Get (I);
         end loop;
         Acc.Destroy;
      end if;
      return Ret;
   end Solve_With_Diagnostics;
   -------------
   -- Destroy --
   -------------
   procedure Destroy (Env : in out Lexical_Env_Access) is
      Mutable_Env : Lexical_Env :=
        (Wrap (Env), 0, Env.Kind, No_Generic_Unit, 0);
   begin
      Destroy (Mutable_Env);
      Env := null;
   end Destroy;
   ----------------
   -- Initialize --
   ----------------
   procedure Initialize
     (Self              : Bare_Ada_Node;
      Kind              : Ada_Node_Kind_Type;
      Unit              : Internal_Unit;
      Token_Start_Index : Token_Index;
      Token_End_Index   : Token_Index;
      Parent            : Bare_Ada_Node := null;
      Self_Env          : Lexical_Env := AST_Envs.Empty_Env) is
   begin
      pragma Unreferenced (Kind);
      Self.Parent := Parent;
      Self.Unit := Unit;
      Self.Token_Start_Index := Token_Start_Index;
      Self.Token_End_Index := Token_End_Index;
      Self.Self_Env := Self_Env;
      Self.Last_Attempted_Child := -1;
   end Initialize;
   --------------------
   -- Use_Direct_Env --
   --------------------
   procedure Use_Direct_Env (State : in out PLE_Node_State; Env : Lexical_Env)
   is
   begin
      State.Current_Env := Env;
      State.Current_NED := null;
   end Use_Direct_Env;
   -------------------
   -- Use_Named_Env --
   -------------------
   procedure Use_Named_Env
     (State   : in out PLE_Node_State;
      Context : Internal_Context;
      Name    : Symbol_Type) is
   begin
      State.Current_NED := Get_Named_Env_Descriptor (Context, Name);
      State.Current_Env := State.Current_NED.Env_With_Precedence;
   end Use_Named_Env;
   ---------------------
   -- Set_Initial_Env --
   ---------------------
   procedure Set_Initial_Env
     (Self         : Bare_Ada_Node;
      State        : in out PLE_Node_State;
      Env          : Internal_Designated_Env;
      DSL_Location : String) is
   begin
      case Env.Kind is
         when None =>
            Use_Direct_Env (State, Empty_Env);
         when Current_Env =>
            null;
         when Named_Env =>
            Use_Named_Env (State, Self.Unit.Context, Env.Env_Name);
         when Direct_Env =>
            --  Sanitize this environment value: make sure it's a non-foreign
            --  and primary environment.
            if Env.Direct_Env.Kind /= Static_Primary then
               Raise_Property_Exception
                 (Self,
                  Property_Error'Identity,
                  "Cannot set an env that is not static-primary as the"
                  & " initial env");
            elsif Is_Foreign_Strict (Env.Direct_Env, Self) then
               Raise_Property_Exception
                 (Self,
                  Property_Error'Identity,
                  "unsound foreign environment in SetInitialEnv ("
                  & DSL_Location & ")");
            end if;
            Use_Direct_Env (State, Env.Direct_Env);
      end case;
   end Set_Initial_Env;
   ----------------
   -- Add_To_Env --
   ----------------
   procedure Add_To_Env
     (Self         : Bare_Ada_Node;
      State        : PLE_Node_State;
      Key          : Symbol_Type;
      Value        : Bare_Ada_Node;
      Md           : Internal_Metadata;
      Resolver     : Entity_Resolver;
      Dest_Env     : Internal_Designated_Env;
      DSL_Location : String)
   is
      Context    : constant Internal_Context := Self.Unit.Context;
      Root_Scope : Lexical_Env renames Context.Root_Scope;
      --  Shortcuts
      Actual_Dest_Env : Lexical_Env;
      Dest_NED        : Named_Env_Descriptor_Access;
      --  Description for the destination environment
   begin
      --  Skip the env addition if explicitly requested
      if Key = No_Symbol
         or else Value = null
         or else (case Dest_Env.Kind is
                  when None        => True,
                  when Current_Env => False,
                  when Named_Env   => Dest_Env.Env_Name = No_Symbol,
                  when Direct_Env  => Dest_Env.Direct_Env = Empty_Env)
      then
         return;
      end if;
      if Value.Unit /= Self.Unit then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "Cannot add_to_env an AST node that comes from another analysis"
            & " unit");
      end if;
         --  Make sure metadata does not contain any foreign node
         if (Md.Primitive /= null and then Md.Primitive.Unit /= Self.Unit) or else (Md.Primitive_Real_Type /= null and then Md.Primitive_Real_Type.Unit /= Self.Unit)
         then
            Raise_Property_Exception
              (Self,
               Property_Error'Identity,
               "Cannot add metadata that contains foreign nodes");
         end if;
      --  Then determine the destination environment
      case Dest_Env.Kind is
         when None =>
            raise Program_Error with "unreachable code";
         when Current_Env =>
            --  Just use the current environment
            Dest_NED := State.Current_NED;
            Actual_Dest_Env := State.Current_Env;
         when Named_Env =>
            --  There is an environment name: just lookup the corresponding
            --  NED/env.
            Dest_NED := Get_Named_Env_Descriptor (Context, Dest_Env.Env_Name);
            Actual_Dest_Env := Dest_NED.Env_With_Precedence;
         when Direct_Env =>
            --  There is an explicit destination environment
            Dest_NED := null;
            Actual_Dest_Env := Dest_Env.Direct_Env;
      end case;
      --  Sanitize it
      if Actual_Dest_Env.Kind /= Static_Primary then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "Cannot add elements to a lexical env that is not static-primary");
      elsif
         --  Since lexical envs need to sort the foreign nodes they contain,
         --  and that the total order on nodes is not defined for synthetic
         --  nodes, it is not possible to add a synthetic node to a foreign
         --  lexical environment.
         --
         --  This reasoning applies to environments that belong to foreign
         --  units, but also to the root environment.
         Is_Foreign (Actual_Dest_Env, Self) and then Is_Synthetic (Value)
      then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "Cannot add a synthetic node to a lexical env from another"
            & " analysis unit");
      elsif
         --  Reject direct references to foreign destination environments.
         --
         --  This is an attempt at identifying uses of the unsound relocation
         --  mechanism (as opposed to named environments), so this applies to
         --  all foreign environments (root scope included).
         DSL_Location'Length > 0
         and then Dest_Env.Kind = Direct_Env
         and then Is_Foreign_Strict (Actual_Dest_Env, Self)
      then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "unsound foreign environment in AddToEnv (" & DSL_Location & ")");
      end if;
      --  Now that everything is sanitized, we can proceed with the actual
      --  key/value pair addition. Note that this does nothing if
      --  Actual_Dest_Env ended up empty.
      Add (Actual_Dest_Env, Thin (Key), Value, Md, Resolver);
      --  If we're adding the element to an environment by env name, we must
      --  register this association in two places: in the target named env
      --  entry, and in Value's unit.
      if Dest_NED /= null then
         declare
            use NED_Assoc_Maps;
            FN    : Map renames Dest_NED.Foreign_Nodes;
            Dummy : Boolean;
            Cur   : Cursor;
         begin
            FN.Insert (Key      => Key,
                       New_Item => Internal_Map_Node_Vectors.Empty_Vector,
                       Position => Cur,
                       Inserted => Dummy);
            declare
               V : Internal_Map_Node_Vectors.Vector renames
                  FN.Reference (Cur);
            begin
               V.Append ((Value, null, Md, Resolver));
               --  Note that the rebindings field is unused by the relocation
               --  mechanism (since we don't even allow adding env entries
               --  with custom rebindings), hence we simply leave it to null.
            end;
         end;
         Value.Unit.Exiled_Entries_In_NED.Append ((Dest_NED, Key, Value));
      --  Otherwise, if we're adding the element to an environment that belongs
      --  to a different unit, or to the root scope, then...
      elsif Is_Foreign_Not_Empty (Actual_Dest_Env, Self) then
         --  Add the Key/Value association to the list of entries contained in
         --  other units, so we can remove them when reparsing Value's unit.
         Value.Unit.Exiled_Entries.Append ((Actual_Dest_Env, Key, Value));
         if Actual_Dest_Env /= Root_Scope then
            --  Add Val to the list of foreign nodes that Actual_Dest_Env's
            --  unit contains, so that when that unit is reparsed, we can call
            --  Add_To_Env again on those nodes.
            Convert_Unit (Actual_Dest_Env.Owner).Foreign_Nodes.Append
              ((Value, Self.Unit));
         end if;
      end if;
   end Add_To_Env;
   -------------
   -- Ref_Env --
   -------------
   procedure Ref_Env
     (Self                : Bare_Ada_Node;
      Dest_Env            : Lexical_Env;
      Ref_Env_Nodes       : in out Bare_Ada_Node_Array_Access;
      Resolver            : Lexical_Env_Resolver;
      Kind                : Ref_Kind;
      Cats                : Ref_Categories;
      Shed_Rebindings     : Boolean) is
   begin
      for N of Ref_Env_Nodes.Items loop
         if N /= null then
            if N.Unit /= Self.Unit then
               Raise_Property_Exception
                 (Self,
                  Property_Error'Identity,
                  "attempt to add a referenced environment to a foreign unit");
            end if;
            Reference (Dest_Env, N, Resolver, Kind, Cats, Shed_Rebindings);
         end if;
      end loop;
      Dec_Ref (Ref_Env_Nodes);
   end Ref_Env;
   -------------
   -- Add_Env --
   -------------
   procedure Add_Env
     (Self              : Bare_Ada_Node;
      State             : in out PLE_Node_State;
      No_Parent         : Boolean;
      Transitive_Parent : Boolean;
      Names             : in out Symbol_Type_Array_Access)
   is
      Parent_From_Name : constant Boolean := State.Current_NED /= null;
      --  Does the parent environment comes from a named environment lookup?
      --  Determine the parent of this new environment:
      --
      --  (1) no parent if requested;
      --  (2) the current environment as the static parent if it comes from a
      --      named env lookup or if it is not foreign (or is the empty/root
      --      environment).
      Parent : constant Lexical_Env :=
        (if No_Parent
         then Null_Lexical_Env
         else State.Current_Env);
   begin
      --  Create the environment itself
      Self.Self_Env := Create_Static_Lexical_Env
        (Parent            => Parent,
         Node              => Self,
         Transitive_Parent => Transitive_Parent,
         Sym_Table         => Self.Unit.Context.Symbols);
      --  If the parent of this new environment comes from a named environment
      --  lookup, register this new environment so that its parent is updated
      --  when the precence for this named environment changes.
      if Parent_From_Name then
         declare
            NED : constant Named_Env_Descriptor_Access := State.Current_NED;
         begin
            Self.Unit.Exiled_Envs.Append ((NED, Self.Self_Env));
            NED.Foreign_Envs.Insert (Self, Self.Self_Env);
         end;
      end if;
      --  From now on, the current environment is Self.Self_Env, with a direct
      --  access to it. It does not go through the env naming scheme, since
      --  only this node and its children (i.e. non-foreign nodes) will access
      --  it as a "current" environment during PLE.
      Use_Direct_Env (State, Self.Self_Env);
      --  Register the environment we just created on all the requested names
      if Names /= null then
         declare
            Context   : constant Internal_Context := Self.Unit.Context;
            Env       : constant Lexical_Env := Self.Self_Env;
            NENU      : NED_Maps.Map renames
               State.Unit_State.Named_Envs_Needing_Update;
         begin
            for N of Names.Items loop
               Register_Named_Env (Context, N, Env, NENU);
            end loop;
            Dec_Ref (Names);
         end;
      end if;
   end Add_Env;
   ---------------------
   -- Pre_Env_Actions --
   ---------------------
   procedure Pre_Env_Actions
     (Self            : Bare_Ada_Node;
      State           : in out PLE_Node_State;
      Add_To_Env_Only : Boolean := False) is
   begin
   case Self.Kind is
            when Ada_With_Clause =>
            With_Clause_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Use_Type_Clause =>
            Use_Type_Clause_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Use_Package_Clause =>
            Use_Package_Clause_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Access_To_Subp_Def =>
            Access_To_Subp_Def_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Named_Stmt =>
            Named_Stmt_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Extended_Return_Stmt =>
            Extended_Return_Stmt_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Begin_Block .. Ada_Decl_Block =>
            Block_Stmt_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_For_Loop_Stmt =>
            For_Loop_Stmt_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Accept_Stmt .. Ada_Accept_Stmt_With_Stmts =>
            Accept_Stmt_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Pragma_Node =>
            Pragma_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Quantified_Expr =>
            Quantified_Expr_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Decl_Expr =>
            Decl_Expr_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Private_Part =>
            Private_Part_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Single_Task_Decl =>
            Single_Task_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Single_Protected_Decl =>
            Single_Protected_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Package_Renaming_Decl =>
            Package_Renaming_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
            Object_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Number_Decl =>
            Number_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Label_Decl =>
            Label_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Generic_Subp_Renaming_Decl =>
            Generic_Subp_Renaming_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Generic_Package_Renaming_Decl =>
            Generic_Package_Renaming_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Generic_Package_Instantiation .. Ada_Generic_Subp_Instantiation =>
            Generic_Instantiation_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Generic_Subp_Decl =>
            Generic_Subp_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Generic_Package_Decl =>
            Generic_Package_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_For_Loop_Var_Decl =>
            For_Loop_Var_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Exception_Handler =>
            Exception_Handler_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Exception_Decl =>
            Exception_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Entry_Index_Spec =>
            Entry_Index_Spec_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Task_Body =>
            Task_Body_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Protected_Body =>
            Protected_Body_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Package_Body =>
            Package_Body_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Entry_Body =>
            Entry_Body_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Task_Body_Stub =>
            Task_Body_Stub_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Subp_Body_Stub =>
            Subp_Body_Stub_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Protected_Body_Stub =>
            Protected_Body_Stub_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Package_Body_Stub =>
            Package_Body_Stub_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
            Base_Subp_Body_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Generic_Subp_Internal =>
            Generic_Subp_Internal_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Enum_Literal_Decl .. Ada_Synthetic_Char_Enum_Lit =>
            Enum_Literal_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Entry_Decl =>
            Entry_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Abstract_Subp_Decl .. Ada_Subp_Decl | Ada_Synthetic_Subp_Decl =>
            Basic_Subp_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Anonymous_Type_Decl .. Ada_Synth_Anonymous_Type_Decl =>
            null;
            when Ada_Concrete_Type_Decl .. Ada_Formal_Type_Decl =>
            Type_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Single_Task_Type_Decl =>
            Single_Task_Type_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Task_Type_Decl =>
            Task_Type_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Protected_Type_Decl =>
            Protected_Type_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Incomplete_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl =>
            Incomplete_Type_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Classwide_Type_Decl =>
            null;
            when Ada_Subtype_Decl =>
            Subtype_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Discrete_Base_Subtype_Decl =>
            Base_Type_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Package_Decl =>
            Package_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Generic_Package_Internal =>
            Generic_Package_Internal_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Param_Spec =>
            Param_Spec_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Discriminant_Spec =>
            Discriminant_Spec_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Component_Decl =>
            Component_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
            when Ada_Abstract_State_Decl =>
            Abstract_State_Decl_Pre_Env_Actions (Self, State, Add_To_Env_Only);
      when others =>  null; 
   end case;
   end Pre_Env_Actions;
   ----------------------
   -- Post_Env_Actions --
   ----------------------
   procedure Post_Env_Actions
     (Self : Bare_Ada_Node; State : in out PLE_Node_State) is
   begin
   case Self.Kind is
            when Ada_With_Clause =>
            null;
            when Ada_Use_Type_Clause =>
            Use_Type_Clause_Post_Env_Actions (Self, State);
            when Ada_Use_Package_Clause =>
            Use_Package_Clause_Post_Env_Actions (Self, State);
            when Ada_Access_To_Subp_Def =>
            null;
            when Ada_Named_Stmt =>
            null;
            when Ada_Extended_Return_Stmt =>
            null;
            when Ada_Begin_Block .. Ada_Decl_Block =>
            null;
            when Ada_For_Loop_Stmt =>
            null;
            when Ada_Accept_Stmt .. Ada_Accept_Stmt_With_Stmts =>
            null;
            when Ada_Pragma_Node =>
            null;
            when Ada_Quantified_Expr =>
            null;
            when Ada_Decl_Expr =>
            null;
            when Ada_Private_Part =>
            null;
            when Ada_Single_Task_Decl =>
            null;
            when Ada_Single_Protected_Decl =>
            null;
            when Ada_Package_Renaming_Decl =>
            null;
            when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
            null;
            when Ada_Number_Decl =>
            null;
            when Ada_Label_Decl =>
            null;
            when Ada_Generic_Subp_Renaming_Decl =>
            null;
            when Ada_Generic_Package_Renaming_Decl =>
            null;
            when Ada_Generic_Package_Instantiation .. Ada_Generic_Subp_Instantiation =>
            null;
            when Ada_Generic_Subp_Decl =>
            Generic_Subp_Decl_Post_Env_Actions (Self, State);
            when Ada_Generic_Package_Decl =>
            null;
            when Ada_For_Loop_Var_Decl =>
            null;
            when Ada_Exception_Handler =>
            null;
            when Ada_Exception_Decl =>
            null;
            when Ada_Entry_Index_Spec =>
            null;
            when Ada_Task_Body =>
            null;
            when Ada_Protected_Body =>
            null;
            when Ada_Package_Body =>
            null;
            when Ada_Entry_Body =>
            null;
            when Ada_Task_Body_Stub =>
            null;
            when Ada_Subp_Body_Stub =>
            null;
            when Ada_Protected_Body_Stub =>
            null;
            when Ada_Package_Body_Stub =>
            null;
            when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
            null;
            when Ada_Generic_Subp_Internal =>
            null;
            when Ada_Enum_Literal_Decl .. Ada_Synthetic_Char_Enum_Lit =>
            null;
            when Ada_Entry_Decl =>
            null;
            when Ada_Abstract_Subp_Decl .. Ada_Subp_Decl | Ada_Synthetic_Subp_Decl =>
            Basic_Subp_Decl_Post_Env_Actions (Self, State);
            when Ada_Anonymous_Type_Decl .. Ada_Synth_Anonymous_Type_Decl =>
            null;
            when Ada_Concrete_Type_Decl .. Ada_Formal_Type_Decl =>
            Type_Decl_Post_Env_Actions (Self, State);
            when Ada_Single_Task_Type_Decl =>
            null;
            when Ada_Task_Type_Decl =>
            null;
            when Ada_Protected_Type_Decl =>
            null;
            when Ada_Incomplete_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl =>
            null;
            when Ada_Classwide_Type_Decl =>
            null;
            when Ada_Subtype_Decl =>
            null;
            when Ada_Discrete_Base_Subtype_Decl =>
            null;
            when Ada_Package_Decl =>
            null;
            when Ada_Generic_Package_Internal =>
            null;
            when Ada_Param_Spec =>
            null;
            when Ada_Discriminant_Spec =>
            null;
            when Ada_Component_Decl =>
            null;
            when Ada_Abstract_State_Decl =>
            null;
      when others =>  null; 
   end case;
   end Post_Env_Actions;
   ----------------
   -- Get_Symbol --
   ----------------
   function Get_Symbol
     (Node : Bare_Ada_Node) return Symbol_Type is
   begin
      if Node = null then
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "cannot get the symbol of a null node");
      end if;
      return Get_Symbol (Token (Node, Node.Token_Start_Index));
   end Get_Symbol;
   ----------
   -- Text --
   ----------
   function Text
     (Node : Bare_Ada_Node) return Text_Type
   is
   begin
      if Node = null then
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "cannot get the text of a null node");
      end if;
      declare
         Start_T : constant Token_Reference :=
            Token (Node, Node.Token_Start_Index);
         End_T   : constant Token_Reference :=
            Token (Node, Node.Token_End_Index);
      begin
         --  No text is associated to synthetic and ghost nodes
         if Is_Synthetic (Node) then
            return "";
         end if;
         if Is_Ghost (Node) then
            return "";
         end if;
         return Text (Start_T, End_T);
      end;
   end Text;
   ---------------------
   -- Is_Visible_From --
   ---------------------
   function Is_Visible_From
     (Self                     : Bare_Ada_Node;
      Referenced_Env, Base_Env : Lexical_Env) return Boolean
   is
      Referenced_Unit : constant Internal_Unit :=
         Convert_Unit (Referenced_Env.Owner);
      Base_Unit       : constant Internal_Unit :=
         Convert_Unit (Base_Env.Owner);
   begin
      if Referenced_Unit = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "referenced environment does not belong to any analysis unit");
      elsif Base_Unit = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "base environment does not belong to any analysis unit");
      end if;
      return Is_Referenced_From (Referenced_Unit, Base_Unit);
   end Is_Visible_From;
   ----------
   -- Unit --
   ----------
   function Unit (Node : Bare_Ada_Node) return Internal_Unit is
   begin
      return Node.Unit;
   end Unit;
   function Lookup_Internal
     (Node : Bare_Ada_Node;
      Sloc : Source_Location) return Bare_Ada_Node;
   procedure Lookup_Relative
     (Node       : Bare_Ada_Node;
      Sloc       : Source_Location;
      Position   : out Relative_Position;
      Node_Found : out Bare_Ada_Node);
   --  Implementation helpers for the looking up process
   -----------------
   -- Set_Parents --
   -----------------
   procedure Set_Parents
     (Node, Parent : Bare_Ada_Node)
   is
   begin
      if Node = null then
         return;
      end if;
      Node.Parent := Bare_Ada_Node (Parent);
      for I in 1 .. Children_Count (Node) loop
         Set_Parents (Child (Node, I), Node);
      end loop;
   end Set_Parents;
   -------------
   -- Destroy --
   -------------
   procedure Destroy (Node : Bare_Ada_Node) is
   begin
      if Node = null then
         return;
      end if;
      Free_User_Fields (Node);
      for I in 1 .. Children_Count (Node) loop
         Destroy (Child (Node, I));
      end loop;
   end Destroy;
   -----------
   -- Child --
   -----------
   function Child (Node  : Bare_Ada_Node;
                   Index : Positive) return Bare_Ada_Node
   is
      Result          : Bare_Ada_Node;
      Index_In_Bounds : Boolean;
   begin
      Get_Child (Node, Index, Index_In_Bounds, Result);
      return Result;
   end Child;
   --------------
   -- Traverse --
   --------------
   function Traverse
     (Node  : Bare_Ada_Node;
      Visit : access function (Node : Bare_Ada_Node)
              return Visit_Status)
     return Visit_Status
   is
      Status : Visit_Status := Into;
   begin
      if Node /= null then
         Status := Visit (Node);
         --  Skip processing the child nodes if the returned status is Over
         --  or Stop. In the former case the previous call to Visit has taken
         --  care of processing the needed childs, and in the latter case we
         --  must immediately stop processing the tree.
         if Status = Into then
            for I in 1 .. Children_Count (Node) loop
               declare
                  Cur_Child : constant Bare_Ada_Node :=
                     Child (Node, I);
               begin
                  if Cur_Child /= null then
                     Status := Traverse (Cur_Child, Visit);
                     exit when Status /= Into;
                  end if;
               end;
            end loop;
         end if;
      end if;
      if Status = Stop then
         return Stop;
      --  At this stage the Over status has no sense and we just continue
      --  processing the tree.
      else
         return Into;
      end if;
   end Traverse;
   --------------
   -- Traverse --
   --------------
   procedure Traverse
     (Node  : Bare_Ada_Node;
      Visit : access function (Node : Bare_Ada_Node)
                               return Visit_Status)
   is
      Result_Status : Visit_Status;
      pragma Unreferenced (Result_Status);
   begin
      Result_Status := Traverse (Node, Visit);
   end Traverse;
   ------------------------
   -- Traverse_With_Data --
   ------------------------
   function Traverse_With_Data
     (Node  : Bare_Ada_Node;
      Visit : access function (Node : Bare_Ada_Node;
                               Data : in out Data_Type)
                               return Visit_Status;
      Data  : in out Data_Type)
      return Visit_Status
   is
      function Helper (Node : Bare_Ada_Node) return Visit_Status;
      ------------
      -- Helper --
      ------------
      function Helper (Node : Bare_Ada_Node) return Visit_Status is
      begin
         return Visit (Node, Data);
      end Helper;
      Saved_Data : Data_Type;
      Result     : Visit_Status;
   begin
      if Reset_After_Traversal then
         Saved_Data := Data;
      end if;
      Result := Traverse (Node, Helper'Access);
      if Reset_After_Traversal then
         Data := Saved_Data;
      end if;
      return Result;
   end Traverse_With_Data;
   ----------------
   -- Sloc_Range --
   ----------------
   function Sloc_Range
     (Node : Bare_Ada_Node) return Source_Location_Range
   is
      type Token_Anchor is (T_Start, T_End);
      type Token_Pos is record
         Pos    : Token_Index;
         Anchor : Token_Anchor;
      end record;
      TDH                    : Token_Data_Handler renames Node.Unit.TDH;
      Token_Start, Token_End : Token_Pos;
      function Get (Index : Token_Index) return Stored_Token_Data is
        (Get_Token (TDH, Index));
      function Sloc (T : Token_Pos) return Source_Location is
        (if T.Anchor = T_Start
         then Sloc_Start (TDH, Get (T.Pos))
         else Sloc_End (TDH, Get (T.Pos)));
   begin
      if Is_Synthetic (Node) then
         return (if Node.Parent = null
                 then No_Source_Location_Range
                 else Sloc_Range (Node.Parent));
      end if;
      if Is_Ghost (Node) then
         Token_Start := (if Node.Token_Start_Index = 1
                         then (1, T_Start)
                         else (Node.Token_Start_Index - 1, T_End));
         Token_End := Token_Start;
      else
         Token_Start := (Node.Token_Start_Index, T_Start);
         Token_End := (Node.Token_End_Index, T_End);
      end if;
      if Snaps_At_Start (Node)
         and then not Is_Ghost (Node)
         and then Token_Start.Pos /= 1
      then
         Token_Start := (Token_Start.Pos - 1, T_End);
      end if;
      if Snaps_At_End (Node) and then Token_End.Pos /= Last_Token (TDH) then
         Token_End := (Token_End.Pos + 1, T_Start);
      end if;
      return Make_Range (Sloc (Token_Start), Sloc (Token_End));
   end Sloc_Range;
   ------------
   -- Lookup --
   ------------
   function Lookup
     (Node : Bare_Ada_Node;
      Sloc : Source_Location) return Bare_Ada_Node
   is
      Position : Relative_Position;
      Result   : Bare_Ada_Node;
   begin
      if Sloc = No_Source_Location then
         return null;
      end if;
      Lookup_Relative
        (Bare_Ada_Node (Node), Sloc, Position, Result);
      return Result;
   end Lookup;
   ---------------------
   -- Lookup_Internal --
   ---------------------
   function Lookup_Internal
     (Node : Bare_Ada_Node;
      Sloc : Source_Location) return Bare_Ada_Node
   is
      --  For this implementation helper (i.e. internal primitive), we can
      --  assume that all lookups fall into this node's sloc range.
      pragma Assert (Compare (Sloc_Range (Node), Sloc) = Inside);
      Children : constant Internal_Bare_Ada_Node_Array :=
         Implementation.Children (Node);
      Pos      : Relative_Position;
      Result   : Bare_Ada_Node;
   begin
      --  Look for a child node that contains Sloc (i.e. return the most
      --  precise result).
      for Child of Children loop
         --  Note that we assume here that child nodes are ordered so that the
         --  first one has a sloc range that is before the sloc range of the
         --  second child node, etc.
         if Child /= null then
            Lookup_Relative (Child, Sloc, Pos, Result);
            case Pos is
               when Before =>
                   --  If this is the first node, Sloc is before it, so we can
                   --  stop here.  Otherwise, Sloc is between the previous
                   --  child node and the next one...  so we can stop here,
                   --  too.
                   return Node;
               when Inside =>
                   return Result;
               when After =>
                   --  Sloc is after the current child node, so see with the
                   --  next one.
                   null;
            end case;
         end if;
      end loop;
      --  If we reach this point, we found no children that covers Sloc, but
      --  Node still covers it (see the assertion).
      return Node;
   end Lookup_Internal;
   -------------
   -- Compare --
   -------------
   function Compare
     (Node : Bare_Ada_Node;
      Sloc : Source_Location) return Relative_Position is
   begin
      return Compare (Sloc_Range (Node), Sloc);
   end Compare;
   ---------------------
   -- Lookup_Relative --
   ---------------------
   procedure Lookup_Relative
     (Node       : Bare_Ada_Node;
      Sloc       : Source_Location;
      Position   : out Relative_Position;
      Node_Found : out Bare_Ada_Node)
   is
      Result : constant Relative_Position :=
        Compare (Node, Sloc);
   begin
      Position := Result;
      Node_Found := (if Result = Inside
                     then Lookup_Internal (Node, Sloc)
                     else null);
   end Lookup_Relative;
   -------------
   -- Compare --
   -------------
   function Compare
     (Self, Left, Right : Bare_Ada_Node;
      Relation          : Comparison_Relation) return Boolean
   is
      LS, RS : Source_Location;
   begin
      if Left = null or else Right = null or else Left.Unit /= Right.Unit then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "invalid node comparison");
      end if;
      LS := Start_Sloc (Sloc_Range (Left));
      RS := Start_Sloc (Sloc_Range (Right));
      return (case Relation is
              when Langkit_Support.Types.Less_Than        => LS < RS,
              when Langkit_Support.Types.Less_Or_Equal    => LS <= RS,
              when Langkit_Support.Types.Greater_Than     => LS > RS,
              when Langkit_Support.Types.Greater_Or_Equal => LS >= RS);
   end Compare;
   --------------
   -- Children --
   --------------
   function Children
     (Node : Bare_Ada_Node) return Internal_Bare_Ada_Node_Array
   is
      First : constant Integer := Bare_Ada_Node_Vectors.Index_Type'First;
      Last  : constant Integer := First + Children_Count (Node) - 1;
   begin
      return A : Internal_Bare_Ada_Node_Array (First .. Last)
      do
         for I in First .. Last loop
            A (I) := Child (Node, I);
         end loop;
      end return;
   end Children;
   function Children
     (Node : Bare_Ada_Node) return Bare_Ada_Node_Array_Access
   is
      C : Internal_Bare_Ada_Node_Array := Children (Node);
   begin
      return Ret : Bare_Ada_Node_Array_Access :=
         Create_Bare_Ada_Node_Array (C'Length)
      do
         Ret.Items := C;
      end return;
   end Children;
   ---------
   -- Get --
   ---------
   function Get
     (Self    : Bare_Ada_Node;
      Node    : Bare_Ada_List;
      Index   : Integer;
      Or_Null : Boolean := False) return Bare_Ada_Node
   is
      function Length (Node : Bare_Ada_List) return Natural
      is (Node.Count);
      --  Wrapper around the Length primitive to get the compiler happy for the
      --  the package instantiation below.
      function Absolute_Get
        (L     : Bare_Ada_List;
         Index : Integer) return Bare_Ada_Node
      is (L.Nodes.all (Index + 1));
      --  L.Nodes is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Bare_Ada_Node,
         Sequence_Type => Bare_Ada_List,
         Length        => Length,
         Get           => Absolute_Get);
      Result : Bare_Ada_Node;
   begin
      if Node = null and then Or_Null then
         return null;
      elsif Relative_Get (Node, Index, Result) then
         return Result;
      elsif Or_Null then
         return null;
      else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "out-of-bounds AST list access");
      end if;
   end Get;
   ---------------
   -- PP_Trivia --
   ---------------
   procedure PP_Trivia
     (Node        : Bare_Ada_Node;
      Line_Prefix : String := "")
   is
      Children_Prefix : constant String := Line_Prefix & "|  ";
   begin
      if Node = null then
         Put_Line (Line_Prefix & "None");
         return;
      end if;
      Put_Line (Line_Prefix & Kind_Name (Node));
      for C of Children_And_Trivia (Node) loop
         case C.Kind is
            when Trivia =>
               Put_Line (Children_Prefix & Image (Text (C.Trivia)));
            when Child =>
               PP_Trivia (C.Node, Children_Prefix);
         end case;
      end loop;
   end PP_Trivia;
   --------------------------
   -- Populate_Lexical_Env --
   --------------------------
   function Populate_Lexical_Env (Node : Bare_Ada_Node) return Boolean is
      Context    : constant Internal_Context := Node.Unit.Context;
      Unit_State : aliased PLE_Unit_State := (Named_Envs_Needing_Update => <>);
      Root_State : constant PLE_Node_State :=
        (Unit_State  => Unit_State'Unchecked_Access,
         Current_Env => Context.Root_Scope,
         Current_NED => null);
      function Populate_Internal
        (Node         : Bare_Ada_Node;
         Parent_State : PLE_Node_State) return Boolean;
      --  Do the lexical env population on Node and recurse on its children
      procedure Register_Foreign_Env
        (Node : Bare_Ada_Node; State : PLE_Node_State);
      --  Given a node and its PLE state, register Node.Self_Env as being
      --  initialized through the named environment mechanism, if that's indeed
      --  the case. Do nothing otherwise.
      -----------------------
      -- Populate_Internal --
      -----------------------
      function Populate_Internal
        (Node         : Bare_Ada_Node;
         Parent_State : PLE_Node_State) return Boolean
      is
         Result : Boolean := False;
         State  : PLE_Node_State := Parent_State;
      begin
         if Node = null then
            return Result;
         end if;
         --  By default (i.e. unless env actions add a new env), the
         --  environment we store in Node is the current one.
         Node.Self_Env := State.Current_Env;
         --  Run pre/post actions, and run PLE on children in between. Make
         --  sure we register the potential foreign Node.Self_Env environment
         --  at the end, even when an exception interrupts PLE to keep the
         --  state consistent.
         begin
            Pre_Env_Actions (Node, State);
            if State.Current_Env /= Null_Lexical_Env then
               Node.Self_Env := State.Current_Env;
               Register_Foreign_Env (Node, State);
            end if;
            --  Call recursively on children
            for I in First_Child_Index (Node) .. Last_Child_Index (Node) loop
               Result := Populate_Internal
                 (Child (Node, I), State) or else Result;
            end loop;
            Post_Env_Actions (Node, State);
         exception
            when Exc : Precondition_Failure | Property_Error =>
               if PLE_Errors_Trace.Is_Active then
                   GNATCOLL.Traces.Trace
                     (PLE_Errors_Trace,
                      "Exception raised during PLE "
                      & Ada.Exceptions.Exception_Name (Exc) & " : "
                      & Ada.Exceptions.Exception_Message (Exc));
                   GNATCOLL.Traces.Trace
                     (PLE_Errors_Trace,
                      GNAT.Traceback.Symbolic.Symbolic_Traceback (Exc));
               end if;
               Register_Foreign_Env (Node, State);
               return True;
         end;
         return Result;
      end Populate_Internal;
      --------------------------
      -- Register_Foreign_Env --
      --------------------------
      procedure Register_Foreign_Env
        (Node : Bare_Ada_Node; State : PLE_Node_State) is
      begin
         if State.Current_NED /= null then
            State.Current_NED.Nodes_With_Foreign_Env.Insert (Node);
            Node.Unit.Nodes_With_Foreign_Env.Insert (Node, State.Current_NED);
         end if;
      end Register_Foreign_Env;
   begin
      --  This is intended to be called on the root node only (when there is no
      --  PLE root) or on a PLE root (child of the root node with a specific
      --  kind).
      if
         Node.Parent /= null
            and then Node.Kind /= Ada_Compilation_Unit
      then
         raise Program_Error;
      end if;
      return Result : constant Boolean :=
         Populate_Internal (Node, Root_State)
      do
         Update_Named_Envs (Context, Unit_State.Named_Envs_Needing_Update);
      end return;
   end Populate_Lexical_Env;
   ------------------------------
   -- AST_Envs_Node_Text_Image --
   ------------------------------
   function AST_Envs_Node_Text_Image
     (Node  : Bare_Ada_Node;
      Short : Boolean := True) return Text_Type is
   begin
      if Short then
         if Node = null then
            return "null";
         end if;
         return To_Text (Basename (Node.Unit))
           & ":" & To_Text (Image (Start_Sloc (Sloc_Range (Node))));
      else
         return Short_Text_Image (Node);
      end if;
   end AST_Envs_Node_Text_Image;
   -------------------
   -- Is_Rebindable --
   -------------------
   function Is_Rebindable (Node : Bare_Ada_Node) return Boolean is
   begin
         return Node.Kind in Ada_Generic_Package_Decl .. Ada_Generic_Subp_Decl;
   end Is_Rebindable;
   -----------------------
   -- Acquire_Rebinding --
   -----------------------
   function Acquire_Rebinding
     (Node             : Bare_Ada_Node;
      Parent           : Env_Rebindings;
      Old_Env, New_Env : Lexical_Env) return Env_Rebindings
   is
      Result    : Env_Rebindings;
      Available : Env_Rebindings_Vectors.Vector renames
         Node.Unit.Context.Available_Rebindings;
   begin
      --  Use an existing and available Env_Rebindings_Type record for Node's
      --  Context, otherwise allocate a new rebinding.
      Result := (if Available.Is_Empty
                 then new Env_Rebindings_Type'(Version => 0, others => <>)
                 else Available.Pop);
      Result.Parent := Parent;
      Result.Old_Env := Old_Env;
      Result.New_Env := New_Env;
      Result.Children := Env_Rebindings_Vectors.Empty_Vector;
      return Result;
   end Acquire_Rebinding;
   -----------------------
   -- Release_Rebinding --
   -----------------------
   procedure Release_Rebinding (Self : in out Env_Rebindings) is
      Available : Env_Rebindings_Vectors.Vector renames
         Unwrap (Self.Old_Env).Node.Unit.Context.Available_Rebindings;
   begin
      --  Bumping the version number, to invalidate existing references to
      --  Self.
      Self.Version := Self.Version + 1;
      Self.Children.Destroy;
      Available.Append (Self);
      Self := null;
   end Release_Rebinding;
   ------------------------
   -- Register_Rebinding --
   ------------------------
   procedure Register_Rebinding
     (Node : Bare_Ada_Node; Rebinding : Env_Rebindings) is
   begin
      Node.Unit.Rebindings.Append (Rebinding);
   end Register_Rebinding;
      -------------------------------
      -- Lexical_Env_Cache_Updated --
      -------------------------------
      procedure Lexical_Env_Cache_Updated
        (Node         : Bare_Ada_Node;
         Delta_Amount : Long_Long_Integer)
      is
         Ctx : constant Internal_Context := Node.Unit.Context;
         Ctx_Stats : Context_Env_Caches_Stats renames Ctx.Env_Caches_Stats;
         All_Env_Caches_Entry_Count : constant Long_Long_Integer :=
           Ctx_Stats.Entry_Count;
         --  Snapshot of the total number of entries before any collection is
         --  attempted. This is needed because if a collection happens,
         --  ``Ctx.Env_Caches_Stats.Entry_Count`` will be updated on the go.
      begin
         Ctx_Stats.Entry_Count :=
           All_Env_Caches_Entry_Count + Delta_Amount;
         Node.Unit.Env_Caches_Stats.Entry_Count :=
           Node.Unit.Env_Caches_Stats.Entry_Count + Delta_Amount;
         --  If the number of entries exceeds the threshold we had set, attempt
         --  to invalidate caches. Don't do anything if this notification was
         --  for removed entries (i.e. if ``Delta_Amount`` is negative) as it
         --  could mean that we are already in the middle of a collection.
         if Delta_Amount > 0 and then
            Ctx_Stats.Entry_Count > Ctx.Env_Caches_Collection_Threshold
         then
            if Cache_Invalidation_Trace.Is_Active then
               Cache_Invalidation_Trace.Trace
                 ("Attempting cache collection because number of entries"
                  & " reached" & All_Env_Caches_Entry_Count'Image);
               Cache_Invalidation_Trace.Increase_Indent;
            end if;
            for Unit of Ctx.Units loop
               if Libadalang.Implementation.Extensions.Should_Collect_Env_Caches
                 (Ctx, Unit, All_Env_Caches_Entry_Count)
               then
                  --  Clear all caches and set counters that are meant to
                  --  track events since the unit's last collection.
                  Reset_Envs_Caches (Unit);
                  Unit.Env_Caches_Stats.Lookup_Count := 0;
                  Unit.Env_Caches_Stats.Hit_Count := 0;
                  Unit.Env_Caches_Stats.Last_Overall_Lookup_Count :=
                    Ctx_Stats.Lookup_Count;
               end if;
               Unit.Env_Caches_Stats.Previous_Lookup_Count :=
                 Unit.Env_Caches_Stats.Lookup_Count;
            end loop;
            Ctx_Stats.Previous_Lookup_Count := Ctx_Stats.Lookup_Count;
            --  Setup the threshold so that the next collection is triggered
            --  when we reach the current number of entries (after this
            --  collection) plus the increment that is defined for this
            --  language.
            Ctx.Env_Caches_Collection_Threshold :=
              Ctx_Stats.Entry_Count
              + 100000;
            if Cache_Invalidation_Trace.Is_Active then
               Cache_Invalidation_Trace.Trace
                 ("New collection threshold :"
                  & Ctx.Env_Caches_Collection_Threshold'Image);
               Cache_Invalidation_Trace.Decrease_Indent;
            end if;
         end if;
      end Lexical_Env_Cache_Updated;
      ---------------------------------
      -- Lexical_Env_Cache_Looked_Up --
      ---------------------------------
      procedure Lexical_Env_Cache_Looked_Up (Node : Bare_Ada_Node) is
         Unit : constant Internal_Unit := Node.Unit;
         Ctx  : constant Internal_Context := Unit.Context;
      begin
         Unit.Env_Caches_Stats.Lookup_Count :=
            Unit.Env_Caches_Stats.Lookup_Count + 1;
         Ctx.Env_Caches_Stats.Lookup_Count :=
            Ctx.Env_Caches_Stats.Lookup_Count + 1;
      end Lexical_Env_Cache_Looked_Up;
      ---------------------------
      -- Lexical_Env_Cache_Hit --
      ---------------------------
      procedure Lexical_Env_Cache_Hit (Node : Bare_Ada_Node) is
         Unit : constant Internal_Unit := Node.Unit;
      begin
         Unit.Env_Caches_Stats.Hit_Count :=
            Unit.Env_Caches_Stats.Hit_Count + 1;
      end Lexical_Env_Cache_Hit;
   --------------------
   -- Element_Parent --
   --------------------
   function Element_Parent
     (Node : Bare_Ada_Node) return Bare_Ada_Node
   is (Node.Parent);
   ---------------
   -- Node_Unit --
   ---------------
   function Node_Unit (Node : Bare_Ada_Node) return Generic_Unit_Ptr is
   begin
      return Convert_Unit (Node.Unit);
   end Node_Unit;
   ----------
   -- Hash --
   ----------
   function Hash (Node : Bare_Ada_Node) return Hash_Type
   is
      function H is new Hash_Access
        (Root_Node_Record, Bare_Ada_Node);
   begin
      return H (Node);
   end Hash;
      function Hash (B : Boolean) return Hash_Type is (Boolean'Pos (B));
      function Hash (I : Integer) return Hash_Type is (Hash_Type'Mod (I));
   ------------------------
   -- Named environments --
   ------------------------
   ---------
   -- Add --
   ---------
   procedure Add
     (Self : in out NED_Assoc_Maps.Map;
      Key  : Symbol_Type;
      Node : AST_Envs.Internal_Map_Node)
   is
      use NED_Assoc_Maps;
      Pos   : Cursor;
      Dummy : Boolean;
   begin
      --  Make sure there is a vector entry for Key
      Self.Insert (Key, Internal_Map_Node_Vectors.Empty_Vector, Pos, Dummy);
      --  Append Node to that vector
      declare
         V : Internal_Map_Node_Vectors.Vector renames Self.Reference (Pos);
      begin
         V.Append (Node);
      end;
   end Add;
   ------------
   -- Remove --
   ------------
   procedure Remove
     (Self : in out NED_Assoc_Maps.Map;
      Key  : Symbol_Type;
      Node : Bare_Ada_Node)
   is
      use NED_Assoc_Maps;
      V : Internal_Map_Node_Vectors.Vector renames Self.Reference (Key);
   begin
      --  Remove the (assumed unique) entry in V whose node is Node. The order
      --  of items in V is not significant, so we can use Pop for efficient
      --  removal. Do the traversal in reverse order for correctness.
      for I in reverse 1 .. V.Length loop
         if V.Get_Access (I).Node = Node then
            V.Pop (I);
            exit;
         end if;
      end loop;
   end Remove;
   ------------------------------
   -- Get_Named_Env_Descriptor --
   ------------------------------
   function Get_Named_Env_Descriptor
     (Context : Internal_Context;
      Name    : Symbol_Type) return Named_Env_Descriptor_Access
   is
      use NED_Maps;
      --  Look for an existing entry for Name
      Pos : constant Cursor := Context.Named_Envs.Find (Name);
   begin
      if Has_Element (Pos) then
         return Element (Pos);
      end if;
      --  There is no such entry: create one
      return Result : constant Named_Env_Descriptor_Access :=
         new Named_Env_Descriptor'
           (Name                   => Name,
            Envs                   => <>,
            Env_With_Precedence    => Empty_Env,
            Foreign_Nodes          => <>,
            Foreign_Envs           => <>,
            Nodes_With_Foreign_Env => <>)
      do
         Context.Named_Envs.Insert (Name, Result);
      end return;
   end Get_Named_Env_Descriptor;
   ------------------------
   -- Register_Named_Env --
   ------------------------
   procedure Register_Named_Env
     (Context                   : Internal_Context;
      Name                      : Symbol_Type;
      Env                       : Lexical_Env;
      Named_Envs_Needing_Update : in out NED_Maps.Map)
   is
      NED_Access : constant Named_Env_Descriptor_Access :=
         Get_Named_Env_Descriptor (Context, Name);
      NED        : Named_Env_Descriptor renames NED_Access.all;
      Node       : constant Bare_Ada_Node := Env_Node (Env);
   begin
      NED.Envs.Insert (Node, Env);
      Node.Unit.Named_Envs.Append ((Name, Env));
      --  If that insertion must change the env that has precedence, signal
      --  that NED requires an update.
      if NED.Envs.First_Element /= NED.Env_With_Precedence then
         Named_Envs_Needing_Update.Include (Name, NED_Access);
      end if;
   end Register_Named_Env;
   ----------------------
   -- Update_Named_Env --
   ----------------------
   procedure Update_Named_Envs
     (Context : Internal_Context; Named_Envs : NED_Maps.Map)
   is
      Require_Cache_Reset : Boolean := False;
   begin
      for Cur in Named_Envs.Iterate loop
         declare
            NE      : Named_Env_Descriptor renames NED_Maps.Element (Cur).all;
            New_Env : constant Lexical_Env :=
              (if NE.Envs.Is_Empty
               then Empty_Env
               else NE.Envs.First_Element);
         begin
            --  If there was an environment with precedence, remove its foreign
            --  nodes.
            if NE.Env_With_Precedence /= Empty_Env then
               for Cur in NE.Foreign_Nodes.Iterate loop
                  declare
                     Key   : constant Symbol_Type :=
                        NED_Assoc_Maps.Key (Cur);
                     Nodes : Internal_Map_Node_Vectors.Vector renames
                        NE.Foreign_Nodes.Reference (Cur);
                  begin
                     for N of Nodes loop
                        Remove (NE.Env_With_Precedence, Thin (Key), N.Node);
                     end loop;
                  end;
               end loop;
            end if;
            --  Now, set the new environment that has precedence
            NE.Env_With_Precedence := New_Env;
            --  Add the foreign nodes to the new environment with precedence,
            --  if any.
            for Cur in NE.Foreign_Nodes.Iterate loop
               declare
                  Key   : constant Symbol_Type :=
                     NED_Assoc_Maps.Key (Cur);
                  Nodes : Internal_Map_Node_Vectors.Vector renames
                     NE.Foreign_Nodes.Reference (Cur);
               begin
                  for N of Nodes loop
                     Add (New_Env, Thin (Key), N.Node, N.Md, N.Resolver);
                  end loop;
               end;
            end loop;
            --  Set the parent environment of all foreign environments
            for Cur in NE.Foreign_Envs.Iterate loop
               declare
                  Env : Lexical_Env_Record renames
                     Unwrap (Sorted_Env_Maps.Element (Cur)).all;
               begin
                  Env.Parent := New_Env;
                  --  We have updated the lexical env hierarchy (e.g. an env
                  --  which had no parent may have one now), so the cached
                  --  entries for queries that traveresed the old env hierarchy
                  --  need to be invalidated.
                  Require_Cache_Reset := True;
               end;
            end loop;
            --  Update nodes whose environment was the old env with precedence
            for N of NE.Nodes_With_Foreign_Env loop
               N.Self_Env := New_Env;
            end loop;
         end;
      end loop;
      if Require_Cache_Reset then
         Invalidate_Caches (Context, Invalidate_Envs => True);
      end if;
   end Update_Named_Envs;
   --------------------------
   -- Big integers wrapper --
   --------------------------
   ------------------------
   -- Create_Big_Integer --
   ------------------------
   function Create_Big_Integer
     (Image : String; Base : Integer := 10) return Big_Integer_Type
   is
      use GNATCOLL.GMP;
      use GNATCOLL.GMP.Integers;
   begin
      return new Big_Integer_Record'(Value     => Make (Image, Int (Base)),
                                     Ref_Count => 1);
   end Create_Big_Integer;
   ------------------------
   -- Create_Big_Integer --
   ------------------------
   function Create_Big_Integer
     (Big_Int : GNATCOLL.GMP.Integers.Big_Integer) return Big_Integer_Type
   is
      Result : constant Big_Integer_Type :=
         new Big_Integer_Record'(Value     => <>,
                                 Ref_Count => 1);
   begin
      Result.Value.Set (Big_Int);
      return Result;
   end Create_Big_Integer;
   ------------------------
   -- Create_Big_Integer --
   ------------------------
   function Create_Big_Integer (Int : Integer) return Big_Integer_Type is
      Result : constant Big_Integer_Type :=
         new Big_Integer_Record'(Value     => <>,
                                 Ref_Count => 1);
   begin
      Result.Value.Set (GNATCOLL.GMP.Long (Int));
      return Result;
   end Create_Big_Integer;
   -------------------------------
   -- Create_Public_Big_Integer --
   -------------------------------
   function Create_Public_Big_Integer
     (Big_Int : Big_Integer_Type) return GNATCOLL.GMP.Integers.Big_Integer is
   begin
      return Result : GNATCOLL.GMP.Integers.Big_Integer do
         Result.Set (Big_Int.Value);
      end return;
   end Create_Public_Big_Integer;
   -----------------
   -- Trace_Image --
   -----------------
   function Trace_Image (I : Big_Integer_Type) return String is
   begin
      return GNATCOLL.GMP.Integers.Image (I.Value);
   end Trace_Image;
   ----------------
   -- To_Integer --
   ----------------
   function To_Integer
     (Self    : Bare_Ada_Node;
      Big_Int : Big_Integer_Type) return Integer
   is
      Image : constant String := Big_Int.Value.Image;
   begin
      return Integer'Value (Image);
   exception
      when Constraint_Error =>
         Raise_Property_Exception
           (Self, Property_Error'Identity, "out of range big integer");
   end To_Integer;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (Big_Int : Big_Integer_Type) is
   begin
      if Big_Int.Ref_Count /= -1 then
         Big_Int.Ref_Count := Big_Int.Ref_Count + 1;
      end if;
   end Inc_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (Big_Int : in out Big_Integer_Type) is
      procedure Destroy is new Ada.Unchecked_Deallocation
        (Big_Integer_Record, Big_Integer_Type);
   begin
      if Big_Int = null or else Big_Int.Ref_Count = -1 then
         return;
      end if;
      Big_Int.Ref_Count := Big_Int.Ref_Count - 1;
      if Big_Int.Ref_Count = 0 then
         Destroy (Big_Int);
      end if;
   end Dec_Ref;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (Left, Right : Big_Integer_Type) return Boolean is
      use type GNATCOLL.GMP.Integers.Big_Integer;
   begin
      return Left.Value = Right.Value;
   end Equivalent;
   ---------
   -- "<" --
   ---------
   function "<" (Left, Right : Big_Integer_Type) return Boolean is
      use type GNATCOLL.GMP.Integers.Big_Integer;
   begin
      return Left.Value < Right.Value;
   end "<";
   ----------
   -- "<=" --
   ----------
   function "<=" (Left, Right : Big_Integer_Type) return Boolean is
      use type GNATCOLL.GMP.Integers.Big_Integer;
   begin
      return Left.Value <= Right.Value;
   end "<=";
   ---------
   -- ">" --
   ---------
   function ">" (Left, Right : Big_Integer_Type) return Boolean is
      use type GNATCOLL.GMP.Integers.Big_Integer;
   begin
      return Left.Value > Right.Value;
   end ">";
   ----------
   -- ">=" --
   ----------
   function ">=" (Left, Right : Big_Integer_Type) return Boolean is
      use type GNATCOLL.GMP.Integers.Big_Integer;
   begin
      return Left.Value >= Right.Value;
   end ">=";
   ---------
   -- "+" --
   ---------
   function "+" (Left, Right : Big_Integer_Type) return Big_Integer_Type is
      use type GNATCOLL.GMP.Integers.Big_Integer;
   begin
      return Create_Big_Integer (Left.Value + Right.Value);
   end "+";
   ---------
   -- "-" --
   ---------
   function "-" (Left, Right : Big_Integer_Type) return Big_Integer_Type is
      use type GNATCOLL.GMP.Integers.Big_Integer;
   begin
      return Create_Big_Integer (Left.Value - Right.Value);
   end "-";
   ---------
   -- "-" --
   ---------
   function "-" (Value : Big_Integer_Type) return Big_Integer_Type is
      use type GNATCOLL.GMP.Integers.Big_Integer;
   begin
      return Create_Big_Integer (-Value.Value);
   end "-";
   ------------------
   -- Unit_Version --
   ------------------
   function Unit_Version (Unit : Generic_Unit_Ptr) return Version_Number is
   begin
      return Convert_Unit (Unit).Unit_Version;
   end Unit_Version;
   -------------------------
   -- Get_Context_Version --
   -------------------------
   function Get_Context_Version
     (Node : Bare_Ada_Node) return Version_Number is
   begin
      return Node.Unit.Context.Cache_Version;
   end Get_Context_Version;
   ---------------
   --  Self_Env --
   ---------------
   function Self_Env (Node : Bare_Ada_Node) return Lexical_Env is
   begin
      return Node.Self_Env;
   end Self_Env;
   --------------------------
   -- Properties_May_Raise --
   --------------------------
   function Properties_May_Raise
     (Exc : Ada.Exceptions.Exception_Occurrence) return Boolean is
   begin
      return Ada.Exceptions.Exception_Identity (Exc) in
            Precondition_Failure'Identity
               |
            Property_Error'Identity
      ;
   end Properties_May_Raise;
   ----------------------
   -- Short_Text_Image --
   ----------------------
   function Short_Text_Image (Self : Bare_Ada_Node) return Text_Type
   is
   begin
      if Self = null then
         return "None";
      end if;
   case Self.Kind is
            when Ada_Char_Literal .. Ada_String_Literal =>
         return Base_Id_Short_Image (Self);
            when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
         return Defining_Name_Short_Image (Self);
            when Ada_Abstract_State_Decl .. Ada_Synthetic_Object_Decl =>
         return Basic_Decl_Short_Image (Self);
      when others => 
         return "<" & To_Text (Kind_Name (Self))
                & " " & Node_Sloc_Image (Self) & ">";
   end case;
   end Short_Text_Image;
   ----------------------
   --- Node_Sloc_Image --
   ----------------------
   function Node_Sloc_Image (Self : Bare_Ada_Node) return Text_Type
   is
   begin
declare
   Filename : constant String := +Self.Unit.Filename.Base_Name;
begin
   if Filename = "__standard" then
      return "in Standard";
   else
      return To_Text (Filename) & ":" & To_Text (Image (Sloc_Range (Self)));
   end if;
end;
   end Node_Sloc_Image;
   --------------------
   -- Snaps_At_Start --
   --------------------
   function Snaps_At_Start (Self : Bare_Ada_Node) return Boolean is
   begin
   case Self.Kind is
            when Ada_Handled_Stmts =>
         return True;
            when Ada_Declarative_Part .. Ada_Public_Part =>
         return True;
      when others => 
         return False;
   end case;
   end Snaps_At_Start;
   ------------------
   -- Snaps_At_End --
   ------------------
   function Snaps_At_End (Self : Bare_Ada_Node) return Boolean is
   begin
   case Self.Kind is
            when Ada_Handled_Stmts =>
         return True;
            when Ada_Declarative_Part .. Ada_Public_Part =>
         return True;
      when others => 
         return Is_Incomplete (Self);
   end case;
   end Snaps_At_End;
   -------------
   -- Parents --
   -------------
   function Parents
     (Node      : Bare_Ada_Node;
      With_Self : Boolean := True)
      return Bare_Ada_Node_Array_Access
   is
      Count : Natural := 0;
      Start : Bare_Ada_Node :=
        (if With_Self then Node else Node.Parent);
      Cur   : Bare_Ada_Node := Start;
   begin
      while Cur /= null loop
         Count := Count + 1;
         Cur := Cur.Parent;
      end loop;
      declare
         Result : constant Bare_Ada_Node_Array_Access :=
            Create_Bare_Ada_Node_Array (Count);
      begin
         Cur := Start;
         for I in Result.Items'Range loop
            Result.Items (I) := Cur;
            Cur := Cur.Parent;
         end loop;
         return Result;
      end;
   end Parents;
   -----------------------
   -- First_Child_Index --
   -----------------------
   function First_Child_Index (Node : Bare_Ada_Node) return Natural
   is (1);
   ----------------------
   -- Last_Child_Index --
   ----------------------
   function Last_Child_Index (Node : Bare_Ada_Node) return Natural
   is (Children_Count (Node));
   ---------------
   -- Get_Child --
   ---------------
   procedure Get_Child
     (Node            : Bare_Ada_Node;
      Index           : Positive;
      Index_In_Bounds : out Boolean;
      Result          : out Bare_Ada_Node)
   is
      K : constant Ada_Node_Kind_Type := Node.Kind;
   begin
      Index_In_Bounds := True;
      Result := null;
      case Ada_Ada_Node (K) is
when Ada_Ada_List =>
declare
N_Bare_Ada_List : constant Bare_Ada_List := Node;
begin
                    if Index > N_Bare_Ada_List.Count then
                        Index_In_Bounds := False;
                    else
                        Result := N_Bare_Ada_List.Nodes (Index);
                    end if;
                    return;
end;
when Ada_Constrained_Array_Indices_Range =>
declare
N_Bare_Constrained_Array_Indices : constant Bare_Constrained_Array_Indices := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Constrained_Array_Indices.Constrained_Array_Indices_F_List;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Unconstrained_Array_Indices_Range =>
declare
N_Bare_Unconstrained_Array_Indices : constant Bare_Unconstrained_Array_Indices := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Unconstrained_Array_Indices.Unconstrained_Array_Indices_F_Types;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Aspect_Assoc_Range =>
declare
N_Bare_Aspect_Assoc : constant Bare_Aspect_Assoc := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Aspect_Assoc.Aspect_Assoc_F_Id;
                            return;
                        when 2 =>
                            Result := N_Bare_Aspect_Assoc.Aspect_Assoc_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_At_Clause_Range =>
declare
N_Bare_At_Clause : constant Bare_At_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_At_Clause.At_Clause_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_At_Clause.At_Clause_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Attribute_Def_Clause_Range =>
declare
N_Bare_Attribute_Def_Clause : constant Bare_Attribute_Def_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Attribute_Def_Clause.Attribute_Def_Clause_F_Attribute_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Attribute_Def_Clause.Attribute_Def_Clause_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Enum_Rep_Clause_Range =>
declare
N_Bare_Enum_Rep_Clause : constant Bare_Enum_Rep_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Enum_Rep_Clause.Enum_Rep_Clause_F_Type_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Enum_Rep_Clause.Enum_Rep_Clause_F_Aggregate;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Record_Rep_Clause_Range =>
declare
N_Bare_Record_Rep_Clause : constant Bare_Record_Rep_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Record_Rep_Clause.Record_Rep_Clause_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Record_Rep_Clause.Record_Rep_Clause_F_At_Expr;
                            return;
                        when 3 =>
                            Result := N_Bare_Record_Rep_Clause.Record_Rep_Clause_F_Components;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Aspect_Spec_Range =>
declare
N_Bare_Aspect_Spec : constant Bare_Aspect_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Aspect_Spec.Aspect_Spec_F_Aspect_Assocs;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Contract_Case_Assoc_Range =>
declare
N_Bare_Contract_Case_Assoc : constant Bare_Contract_Case_Assoc := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Contract_Case_Assoc.Contract_Case_Assoc_F_Guard;
                            return;
                        when 2 =>
                            Result := N_Bare_Contract_Case_Assoc.Contract_Case_Assoc_F_Consequence;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Pragma_Argument_Assoc_Range =>
declare
N_Bare_Pragma_Argument_Assoc : constant Bare_Pragma_Argument_Assoc := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Pragma_Argument_Assoc.Pragma_Argument_Assoc_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Pragma_Argument_Assoc.Pragma_Argument_Assoc_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Entry_Spec_Range =>
declare
N_Bare_Entry_Spec : constant Bare_Entry_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Entry_Spec.Entry_Spec_F_Entry_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Entry_Spec.Entry_Spec_F_Family_Type;
                            return;
                        when 3 =>
                            Result := N_Bare_Entry_Spec.Entry_Spec_F_Entry_Params;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Subp_Spec_Range =>
declare
N_Bare_Subp_Spec : constant Bare_Subp_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Subp_Spec.Subp_Spec_F_Subp_Kind;
                            return;
                        when 2 =>
                            Result := N_Bare_Subp_Spec.Subp_Spec_F_Subp_Name;
                            return;
                        when 3 =>
                            Result := N_Bare_Subp_Spec.Subp_Spec_F_Subp_Params;
                            return;
                        when 4 =>
                            Result := N_Bare_Subp_Spec.Subp_Spec_F_Subp_Returns;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Synthetic_Binary_Spec_Range =>
declare
N_Bare_Synthetic_Binary_Spec : constant Bare_Synthetic_Binary_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Synthetic_Binary_Spec.Synthetic_Binary_Spec_F_Left_Param;
                            return;
                        when 2 =>
                            Result := N_Bare_Synthetic_Binary_Spec.Synthetic_Binary_Spec_F_Right_Param;
                            return;
                        when 3 =>
                            Result := N_Bare_Synthetic_Binary_Spec.Synthetic_Binary_Spec_F_Return_Type_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Synthetic_Unary_Spec_Range =>
declare
N_Bare_Synthetic_Unary_Spec : constant Bare_Synthetic_Unary_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Synthetic_Unary_Spec.Synthetic_Unary_Spec_F_Right_Param;
                            return;
                        when 2 =>
                            Result := N_Bare_Synthetic_Unary_Spec.Synthetic_Unary_Spec_F_Return_Type_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Component_List_Range =>
declare
N_Bare_Component_List : constant Bare_Component_List := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Component_List.Component_List_F_Components;
                            return;
                        when 2 =>
                            Result := N_Bare_Component_List.Component_List_F_Variant_Part;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Known_Discriminant_Part_Range =>
declare
N_Bare_Known_Discriminant_Part : constant Bare_Known_Discriminant_Part := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Known_Discriminant_Part.Known_Discriminant_Part_F_Discr_Specs;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Entry_Completion_Formal_Params_Range =>
declare
N_Bare_Entry_Completion_Formal_Params : constant Bare_Entry_Completion_Formal_Params := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Entry_Completion_Formal_Params.Entry_Completion_Formal_Params_F_Params;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Generic_Formal_Part_Range =>
declare
N_Bare_Generic_Formal_Part : constant Bare_Generic_Formal_Part := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Generic_Formal_Part.Generic_Formal_Part_F_Decls;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Base_Record_Def =>
declare
N_Bare_Base_Record_Def : constant Bare_Base_Record_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Base_Record_Def.Base_Record_Def_F_Components;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Aggregate_Assoc_Range =>
declare
N_Bare_Aggregate_Assoc : constant Bare_Aggregate_Assoc := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Aggregate_Assoc.Aggregate_Assoc_F_Designators;
                            return;
                        when 2 =>
                            Result := N_Bare_Aggregate_Assoc.Aggregate_Assoc_F_R_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Composite_Constraint_Assoc_Range =>
declare
N_Bare_Composite_Constraint_Assoc : constant Bare_Composite_Constraint_Assoc := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Composite_Constraint_Assoc.Composite_Constraint_Assoc_F_Ids;
                            return;
                        when 2 =>
                            Result := N_Bare_Composite_Constraint_Assoc.Composite_Constraint_Assoc_F_Constraint_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Iterated_Assoc_Range =>
declare
N_Bare_Iterated_Assoc : constant Bare_Iterated_Assoc := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Iterated_Assoc.Iterated_Assoc_F_Spec;
                            return;
                        when 2 =>
                            Result := N_Bare_Iterated_Assoc.Iterated_Assoc_F_Key_Expr;
                            return;
                        when 3 =>
                            Result := N_Bare_Iterated_Assoc.Iterated_Assoc_F_R_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Param_Assoc_Range =>
declare
N_Bare_Param_Assoc : constant Bare_Param_Assoc := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Param_Assoc.Param_Assoc_F_Designator;
                            return;
                        when 2 =>
                            Result := N_Bare_Param_Assoc.Param_Assoc_F_R_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Abstract_State_Decl_Range =>
declare
N_Bare_Abstract_State_Decl : constant Bare_Abstract_State_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Abstract_State_Decl.Abstract_State_Decl_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Abstract_State_Decl.Abstract_State_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Anonymous_Expr_Decl_Range =>
declare
N_Bare_Anonymous_Expr_Decl : constant Bare_Anonymous_Expr_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Anonymous_Expr_Decl.Anonymous_Expr_Decl_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Component_Decl_Range =>
declare
N_Bare_Component_Decl : constant Bare_Component_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Component_Decl.Component_Decl_F_Ids;
                            return;
                        when 2 =>
                            Result := N_Bare_Component_Decl.Component_Decl_F_Component_Def;
                            return;
                        when 3 =>
                            Result := N_Bare_Component_Decl.Component_Decl_F_Default_Expr;
                            return;
                        when 4 =>
                            Result := N_Bare_Component_Decl.Component_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Discriminant_Spec_Range =>
declare
N_Bare_Discriminant_Spec : constant Bare_Discriminant_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Discriminant_Spec.Discriminant_Spec_F_Ids;
                            return;
                        when 2 =>
                            Result := N_Bare_Discriminant_Spec.Discriminant_Spec_F_Type_Expr;
                            return;
                        when 3 =>
                            Result := N_Bare_Discriminant_Spec.Discriminant_Spec_F_Default_Expr;
                            return;
                        when 4 =>
                            Result := N_Bare_Discriminant_Spec.Discriminant_Spec_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Generic_Formal =>
declare
N_Bare_Generic_Formal : constant Bare_Generic_Formal := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Generic_Formal.Generic_Formal_F_Decl;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Param_Spec_Range =>
declare
N_Bare_Param_Spec : constant Bare_Param_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Param_Spec.Param_Spec_F_Ids;
                            return;
                        when 2 =>
                            Result := N_Bare_Param_Spec.Param_Spec_F_Has_Aliased;
                            return;
                        when 3 =>
                            Result := N_Bare_Param_Spec.Param_Spec_F_Mode;
                            return;
                        when 4 =>
                            Result := N_Bare_Param_Spec.Param_Spec_F_Type_Expr;
                            return;
                        when 5 =>
                            Result := N_Bare_Param_Spec.Param_Spec_F_Default_Expr;
                            return;
                        when 6 =>
                            Result := N_Bare_Param_Spec.Param_Spec_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Synthetic_Formal_Param_Decl_Range =>
declare
N_Bare_Synthetic_Formal_Param_Decl : constant Bare_Synthetic_Formal_Param_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Synthetic_Formal_Param_Decl.Synthetic_Formal_Param_Decl_F_Param_Type;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Base_Package_Decl =>
declare
N_Bare_Base_Package_Decl : constant Bare_Base_Package_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Base_Package_Decl.Base_Package_Decl_F_Package_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Base_Package_Decl.Base_Package_Decl_F_Aspects;
                            return;
                        when 3 =>
                            Result := N_Bare_Base_Package_Decl.Base_Package_Decl_F_Public_Part;
                            return;
                        when 4 =>
                            Result := N_Bare_Base_Package_Decl.Base_Package_Decl_F_Private_Part;
                            return;
                        when 5 =>
                            Result := N_Bare_Base_Package_Decl.Base_Package_Decl_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Base_Type_Decl =>
declare
N_Bare_Base_Type_Decl : constant Bare_Base_Type_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Base_Type_Decl.Base_Type_Decl_F_Name;
                            return;
                        when others => null;
                    end case;
case Ada_Base_Type_Decl (K) is
when Ada_Subtype_Decl_Range =>
declare
N_Bare_Subtype_Decl : constant Bare_Subtype_Decl := N_Bare_Base_Type_Decl;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Subtype_Decl.Subtype_Decl_F_Subtype;
                            return;
                        when 3 =>
                            Result := N_Bare_Subtype_Decl.Subtype_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Incomplete_Type_Decl_Range =>
declare
N_Bare_Incomplete_Type_Decl : constant Bare_Incomplete_Type_Decl := N_Bare_Base_Type_Decl;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Incomplete_Type_Decl.Incomplete_Type_Decl_F_Discriminants;
                            return;
                        when others => null;
                    end case;
case Ada_Incomplete_Type_Decl_Range (K) is
when Ada_Incomplete_Formal_Type_Decl_Range =>
declare
N_Bare_Incomplete_Formal_Type_Decl : constant Bare_Incomplete_Formal_Type_Decl := N_Bare_Incomplete_Type_Decl;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Incomplete_Formal_Type_Decl.Incomplete_Formal_Type_Decl_F_Is_Tagged;
                            return;
                        when 4 =>
                            Result := N_Bare_Incomplete_Formal_Type_Decl.Incomplete_Formal_Type_Decl_F_Default_Type;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Incomplete_Tagged_Type_Decl_Range =>
declare
N_Bare_Incomplete_Tagged_Type_Decl : constant Bare_Incomplete_Tagged_Type_Decl := N_Bare_Incomplete_Type_Decl;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Incomplete_Tagged_Type_Decl.Incomplete_Tagged_Type_Decl_F_Has_Abstract;
                            return;
                        when others => null;
                    end case;
end;
when others => null;
end case;
end;
when Ada_Protected_Type_Decl_Range =>
declare
N_Bare_Protected_Type_Decl : constant Bare_Protected_Type_Decl := N_Bare_Base_Type_Decl;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Protected_Type_Decl.Protected_Type_Decl_F_Discriminants;
                            return;
                        when 3 =>
                            Result := N_Bare_Protected_Type_Decl.Protected_Type_Decl_F_Aspects;
                            return;
                        when 4 =>
                            Result := N_Bare_Protected_Type_Decl.Protected_Type_Decl_F_Interfaces;
                            return;
                        when 5 =>
                            Result := N_Bare_Protected_Type_Decl.Protected_Type_Decl_F_Definition;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Task_Type_Decl_Range =>
declare
N_Bare_Task_Type_Decl : constant Bare_Task_Type_Decl := N_Bare_Base_Type_Decl;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Task_Type_Decl.Task_Type_Decl_F_Discriminants;
                            return;
                        when 3 =>
                            Result := N_Bare_Task_Type_Decl.Task_Type_Decl_F_Aspects;
                            return;
                        when 4 =>
                            Result := N_Bare_Task_Type_Decl.Task_Type_Decl_F_Definition;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Type_Decl =>
declare
N_Bare_Type_Decl : constant Bare_Type_Decl := N_Bare_Base_Type_Decl;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Type_Decl.Type_Decl_F_Discriminants;
                            return;
                        when 3 =>
                            Result := N_Bare_Type_Decl.Type_Decl_F_Type_Def;
                            return;
                        when others => null;
                    end case;
case Ada_Type_Decl (K) is
when Ada_Concrete_Type_Decl_Range =>
declare
N_Bare_Concrete_Type_Decl : constant Bare_Concrete_Type_Decl := N_Bare_Type_Decl;
begin
case Index is
                        when 4 =>
                            Result := N_Bare_Concrete_Type_Decl.Concrete_Type_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Formal_Type_Decl_Range =>
declare
N_Bare_Formal_Type_Decl : constant Bare_Formal_Type_Decl := N_Bare_Type_Decl;
begin
case Index is
                        when 4 =>
                            Result := N_Bare_Formal_Type_Decl.Formal_Type_Decl_F_Default_Type;
                            return;
                        when 5 =>
                            Result := N_Bare_Formal_Type_Decl.Formal_Type_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when others => null;
end case;
end;
when others => null;
end case;
end;
when Ada_Classic_Subp_Decl =>
declare
N_Bare_Classic_Subp_Decl : constant Bare_Classic_Subp_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Classic_Subp_Decl.Classic_Subp_Decl_F_Overriding;
                            return;
                        when 2 =>
                            Result := N_Bare_Classic_Subp_Decl.Classic_Subp_Decl_F_Subp_Spec;
                            return;
                        when others => null;
                    end case;
case Ada_Classic_Subp_Decl (K) is
when Ada_Abstract_Subp_Decl_Range =>
declare
N_Bare_Abstract_Subp_Decl : constant Bare_Abstract_Subp_Decl := N_Bare_Classic_Subp_Decl;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Abstract_Subp_Decl.Abstract_Subp_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Formal_Subp_Decl =>
declare
N_Bare_Formal_Subp_Decl : constant Bare_Formal_Subp_Decl := N_Bare_Classic_Subp_Decl;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Formal_Subp_Decl.Formal_Subp_Decl_F_Default_Expr;
                            return;
                        when 4 =>
                            Result := N_Bare_Formal_Subp_Decl.Formal_Subp_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Subp_Decl_Range =>
declare
N_Bare_Subp_Decl : constant Bare_Subp_Decl := N_Bare_Classic_Subp_Decl;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Subp_Decl.Subp_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when others => null;
end case;
end;
when Ada_Entry_Decl_Range =>
declare
N_Bare_Entry_Decl : constant Bare_Entry_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Entry_Decl.Entry_Decl_F_Overriding;
                            return;
                        when 2 =>
                            Result := N_Bare_Entry_Decl.Entry_Decl_F_Spec;
                            return;
                        when 3 =>
                            Result := N_Bare_Entry_Decl.Entry_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Enum_Literal_Decl_Range =>
declare
N_Bare_Enum_Literal_Decl : constant Bare_Enum_Literal_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Enum_Literal_Decl.Enum_Literal_Decl_F_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Generic_Subp_Internal_Range =>
declare
N_Bare_Generic_Subp_Internal : constant Bare_Generic_Subp_Internal := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Generic_Subp_Internal.Generic_Subp_Internal_F_Subp_Spec;
                            return;
                        when 2 =>
                            Result := N_Bare_Generic_Subp_Internal.Generic_Subp_Internal_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Synthetic_Subp_Decl_Range =>
declare
N_Bare_Synthetic_Subp_Decl : constant Bare_Synthetic_Subp_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Synthetic_Subp_Decl.Synthetic_Subp_Decl_F_Spec;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Accept_Stmt_Body_Range =>
declare
N_Bare_Accept_Stmt_Body : constant Bare_Accept_Stmt_Body := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Accept_Stmt_Body.Accept_Stmt_Body_F_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Base_Subp_Body =>
declare
N_Bare_Base_Subp_Body : constant Bare_Base_Subp_Body := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Base_Subp_Body.Base_Subp_Body_F_Overriding;
                            return;
                        when 2 =>
                            Result := N_Bare_Base_Subp_Body.Base_Subp_Body_F_Subp_Spec;
                            return;
                        when others => null;
                    end case;
case Ada_Base_Subp_Body (K) is
when Ada_Expr_Function_Range =>
declare
N_Bare_Expr_Function : constant Bare_Expr_Function := N_Bare_Base_Subp_Body;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Expr_Function.Expr_Function_F_Expr;
                            return;
                        when 4 =>
                            Result := N_Bare_Expr_Function.Expr_Function_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Null_Subp_Decl_Range =>
declare
N_Bare_Null_Subp_Decl : constant Bare_Null_Subp_Decl := N_Bare_Base_Subp_Body;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Null_Subp_Decl.Null_Subp_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Subp_Body_Range =>
declare
N_Bare_Subp_Body : constant Bare_Subp_Body := N_Bare_Base_Subp_Body;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Subp_Body.Subp_Body_F_Aspects;
                            return;
                        when 4 =>
                            Result := N_Bare_Subp_Body.Subp_Body_F_Decls;
                            return;
                        when 5 =>
                            Result := N_Bare_Subp_Body.Subp_Body_F_Stmts;
                            return;
                        when 6 =>
                            Result := N_Bare_Subp_Body.Subp_Body_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Subp_Renaming_Decl_Range =>
declare
N_Bare_Subp_Renaming_Decl : constant Bare_Subp_Renaming_Decl := N_Bare_Base_Subp_Body;
begin
case Index is
                        when 3 =>
                            Result := N_Bare_Subp_Renaming_Decl.Subp_Renaming_Decl_F_Renames;
                            return;
                        when 4 =>
                            Result := N_Bare_Subp_Renaming_Decl.Subp_Renaming_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when others => null;
end case;
end;
when Ada_Package_Body_Stub_Range =>
declare
N_Bare_Package_Body_Stub : constant Bare_Package_Body_Stub := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Package_Body_Stub.Package_Body_Stub_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Package_Body_Stub.Package_Body_Stub_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Protected_Body_Stub_Range =>
declare
N_Bare_Protected_Body_Stub : constant Bare_Protected_Body_Stub := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Protected_Body_Stub.Protected_Body_Stub_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Protected_Body_Stub.Protected_Body_Stub_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Subp_Body_Stub_Range =>
declare
N_Bare_Subp_Body_Stub : constant Bare_Subp_Body_Stub := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Subp_Body_Stub.Subp_Body_Stub_F_Overriding;
                            return;
                        when 2 =>
                            Result := N_Bare_Subp_Body_Stub.Subp_Body_Stub_F_Subp_Spec;
                            return;
                        when 3 =>
                            Result := N_Bare_Subp_Body_Stub.Subp_Body_Stub_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Task_Body_Stub_Range =>
declare
N_Bare_Task_Body_Stub : constant Bare_Task_Body_Stub := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Task_Body_Stub.Task_Body_Stub_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Task_Body_Stub.Task_Body_Stub_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Entry_Body_Range =>
declare
N_Bare_Entry_Body : constant Bare_Entry_Body := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Entry_Body.Entry_Body_F_Entry_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Entry_Body.Entry_Body_F_Index_Spec;
                            return;
                        when 3 =>
                            Result := N_Bare_Entry_Body.Entry_Body_F_Params;
                            return;
                        when 4 =>
                            Result := N_Bare_Entry_Body.Entry_Body_F_Aspects;
                            return;
                        when 5 =>
                            Result := N_Bare_Entry_Body.Entry_Body_F_Barrier;
                            return;
                        when 6 =>
                            Result := N_Bare_Entry_Body.Entry_Body_F_Decls;
                            return;
                        when 7 =>
                            Result := N_Bare_Entry_Body.Entry_Body_F_Stmts;
                            return;
                        when 8 =>
                            Result := N_Bare_Entry_Body.Entry_Body_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Package_Body_Range =>
declare
N_Bare_Package_Body : constant Bare_Package_Body := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Package_Body.Package_Body_F_Package_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Package_Body.Package_Body_F_Aspects;
                            return;
                        when 3 =>
                            Result := N_Bare_Package_Body.Package_Body_F_Decls;
                            return;
                        when 4 =>
                            Result := N_Bare_Package_Body.Package_Body_F_Stmts;
                            return;
                        when 5 =>
                            Result := N_Bare_Package_Body.Package_Body_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Protected_Body_Range =>
declare
N_Bare_Protected_Body : constant Bare_Protected_Body := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Protected_Body.Protected_Body_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Protected_Body.Protected_Body_F_Aspects;
                            return;
                        when 3 =>
                            Result := N_Bare_Protected_Body.Protected_Body_F_Decls;
                            return;
                        when 4 =>
                            Result := N_Bare_Protected_Body.Protected_Body_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Task_Body_Range =>
declare
N_Bare_Task_Body : constant Bare_Task_Body := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Task_Body.Task_Body_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Task_Body.Task_Body_F_Aspects;
                            return;
                        when 3 =>
                            Result := N_Bare_Task_Body.Task_Body_F_Decls;
                            return;
                        when 4 =>
                            Result := N_Bare_Task_Body.Task_Body_F_Stmts;
                            return;
                        when 5 =>
                            Result := N_Bare_Task_Body.Task_Body_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Entry_Index_Spec_Range =>
declare
N_Bare_Entry_Index_Spec : constant Bare_Entry_Index_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Entry_Index_Spec.Entry_Index_Spec_F_Id;
                            return;
                        when 2 =>
                            Result := N_Bare_Entry_Index_Spec.Entry_Index_Spec_F_Subtype;
                            return;
                        when 3 =>
                            Result := N_Bare_Entry_Index_Spec.Entry_Index_Spec_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Exception_Decl_Range =>
declare
N_Bare_Exception_Decl : constant Bare_Exception_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Exception_Decl.Exception_Decl_F_Ids;
                            return;
                        when 2 =>
                            Result := N_Bare_Exception_Decl.Exception_Decl_F_Renames;
                            return;
                        when 3 =>
                            Result := N_Bare_Exception_Decl.Exception_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Exception_Handler_Range =>
declare
N_Bare_Exception_Handler : constant Bare_Exception_Handler := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Exception_Handler.Exception_Handler_F_Exception_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Exception_Handler.Exception_Handler_F_Handled_Exceptions;
                            return;
                        when 3 =>
                            Result := N_Bare_Exception_Handler.Exception_Handler_F_Stmts;
                            return;
                        when others => null;
                    end case;
end;
when Ada_For_Loop_Var_Decl_Range =>
declare
N_Bare_For_Loop_Var_Decl : constant Bare_For_Loop_Var_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_For_Loop_Var_Decl.For_Loop_Var_Decl_F_Id;
                            return;
                        when 2 =>
                            Result := N_Bare_For_Loop_Var_Decl.For_Loop_Var_Decl_F_Id_Type;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Generic_Decl =>
declare
N_Bare_Generic_Decl : constant Bare_Generic_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Generic_Decl.Generic_Decl_F_Formal_Part;
                            return;
                        when others => null;
                    end case;
case Ada_Generic_Decl (K) is
when Ada_Generic_Package_Decl_Range =>
declare
N_Bare_Generic_Package_Decl : constant Bare_Generic_Package_Decl := N_Bare_Generic_Decl;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Generic_Package_Decl.Generic_Package_Decl_F_Package_Decl;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Generic_Subp_Decl_Range =>
declare
N_Bare_Generic_Subp_Decl : constant Bare_Generic_Subp_Decl := N_Bare_Generic_Decl;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Generic_Subp_Decl.Generic_Subp_Decl_F_Subp_Decl;
                            return;
                        when others => null;
                    end case;
end;
when others => null;
end case;
end;
when Ada_Generic_Package_Instantiation_Range =>
declare
N_Bare_Generic_Package_Instantiation : constant Bare_Generic_Package_Instantiation := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Generic_Package_Instantiation.Generic_Package_Instantiation_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Generic_Package_Instantiation.Generic_Package_Instantiation_F_Generic_Pkg_Name;
                            return;
                        when 3 =>
                            Result := N_Bare_Generic_Package_Instantiation.Generic_Package_Instantiation_F_Params;
                            return;
                        when 4 =>
                            Result := N_Bare_Generic_Package_Instantiation.Generic_Package_Instantiation_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Generic_Subp_Instantiation_Range =>
declare
N_Bare_Generic_Subp_Instantiation : constant Bare_Generic_Subp_Instantiation := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Generic_Subp_Instantiation.Generic_Subp_Instantiation_F_Overriding;
                            return;
                        when 2 =>
                            Result := N_Bare_Generic_Subp_Instantiation.Generic_Subp_Instantiation_F_Kind;
                            return;
                        when 3 =>
                            Result := N_Bare_Generic_Subp_Instantiation.Generic_Subp_Instantiation_F_Subp_Name;
                            return;
                        when 4 =>
                            Result := N_Bare_Generic_Subp_Instantiation.Generic_Subp_Instantiation_F_Generic_Subp_Name;
                            return;
                        when 5 =>
                            Result := N_Bare_Generic_Subp_Instantiation.Generic_Subp_Instantiation_F_Params;
                            return;
                        when 6 =>
                            Result := N_Bare_Generic_Subp_Instantiation.Generic_Subp_Instantiation_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Generic_Package_Renaming_Decl_Range =>
declare
N_Bare_Generic_Package_Renaming_Decl : constant Bare_Generic_Package_Renaming_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Generic_Package_Renaming_Decl.Generic_Package_Renaming_Decl_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Generic_Package_Renaming_Decl.Generic_Package_Renaming_Decl_F_Renames;
                            return;
                        when 3 =>
                            Result := N_Bare_Generic_Package_Renaming_Decl.Generic_Package_Renaming_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Generic_Subp_Renaming_Decl_Range =>
declare
N_Bare_Generic_Subp_Renaming_Decl : constant Bare_Generic_Subp_Renaming_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Generic_Subp_Renaming_Decl.Generic_Subp_Renaming_Decl_F_Kind;
                            return;
                        when 2 =>
                            Result := N_Bare_Generic_Subp_Renaming_Decl.Generic_Subp_Renaming_Decl_F_Name;
                            return;
                        when 3 =>
                            Result := N_Bare_Generic_Subp_Renaming_Decl.Generic_Subp_Renaming_Decl_F_Renames;
                            return;
                        when 4 =>
                            Result := N_Bare_Generic_Subp_Renaming_Decl.Generic_Subp_Renaming_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Label_Decl_Range =>
declare
N_Bare_Label_Decl : constant Bare_Label_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Label_Decl.Label_Decl_F_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Named_Stmt_Decl_Range =>
declare
N_Bare_Named_Stmt_Decl : constant Bare_Named_Stmt_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Named_Stmt_Decl.Named_Stmt_Decl_F_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Number_Decl_Range =>
declare
N_Bare_Number_Decl : constant Bare_Number_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Number_Decl.Number_Decl_F_Ids;
                            return;
                        when 2 =>
                            Result := N_Bare_Number_Decl.Number_Decl_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Object_Decl_Range =>
declare
N_Bare_Object_Decl : constant Bare_Object_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Object_Decl.Object_Decl_F_Ids;
                            return;
                        when 2 =>
                            Result := N_Bare_Object_Decl.Object_Decl_F_Has_Aliased;
                            return;
                        when 3 =>
                            Result := N_Bare_Object_Decl.Object_Decl_F_Has_Constant;
                            return;
                        when 4 =>
                            Result := N_Bare_Object_Decl.Object_Decl_F_Mode;
                            return;
                        when 5 =>
                            Result := N_Bare_Object_Decl.Object_Decl_F_Type_Expr;
                            return;
                        when 6 =>
                            Result := N_Bare_Object_Decl.Object_Decl_F_Default_Expr;
                            return;
                        when 7 =>
                            Result := N_Bare_Object_Decl.Object_Decl_F_Renaming_Clause;
                            return;
                        when 8 =>
                            Result := N_Bare_Object_Decl.Object_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Package_Renaming_Decl_Range =>
declare
N_Bare_Package_Renaming_Decl : constant Bare_Package_Renaming_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Package_Renaming_Decl.Package_Renaming_Decl_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Package_Renaming_Decl.Package_Renaming_Decl_F_Renames;
                            return;
                        when 3 =>
                            Result := N_Bare_Package_Renaming_Decl.Package_Renaming_Decl_F_Aspects;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Single_Protected_Decl_Range =>
declare
N_Bare_Single_Protected_Decl : constant Bare_Single_Protected_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Single_Protected_Decl.Single_Protected_Decl_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Single_Protected_Decl.Single_Protected_Decl_F_Aspects;
                            return;
                        when 3 =>
                            Result := N_Bare_Single_Protected_Decl.Single_Protected_Decl_F_Interfaces;
                            return;
                        when 4 =>
                            Result := N_Bare_Single_Protected_Decl.Single_Protected_Decl_F_Definition;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Single_Task_Decl_Range =>
declare
N_Bare_Single_Task_Decl : constant Bare_Single_Task_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Single_Task_Decl.Single_Task_Decl_F_Task_Type;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Case_Stmt_Alternative_Range =>
declare
N_Bare_Case_Stmt_Alternative : constant Bare_Case_Stmt_Alternative := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Case_Stmt_Alternative.Case_Stmt_Alternative_F_Choices;
                            return;
                        when 2 =>
                            Result := N_Bare_Case_Stmt_Alternative.Case_Stmt_Alternative_F_Stmts;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Compilation_Unit_Range =>
declare
N_Bare_Compilation_Unit : constant Bare_Compilation_Unit := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Compilation_Unit.Compilation_Unit_F_Prelude;
                            return;
                        when 2 =>
                            Result := N_Bare_Compilation_Unit.Compilation_Unit_F_Body;
                            return;
                        when 3 =>
                            Result := N_Bare_Compilation_Unit.Compilation_Unit_F_Pragmas;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Component_Clause_Range =>
declare
N_Bare_Component_Clause : constant Bare_Component_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Component_Clause.Component_Clause_F_Id;
                            return;
                        when 2 =>
                            Result := N_Bare_Component_Clause.Component_Clause_F_Position;
                            return;
                        when 3 =>
                            Result := N_Bare_Component_Clause.Component_Clause_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Component_Def_Range =>
declare
N_Bare_Component_Def : constant Bare_Component_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Component_Def.Component_Def_F_Has_Aliased;
                            return;
                        when 2 =>
                            Result := N_Bare_Component_Def.Component_Def_F_Has_Constant;
                            return;
                        when 3 =>
                            Result := N_Bare_Component_Def.Component_Def_F_Type_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Composite_Constraint_Range =>
declare
N_Bare_Composite_Constraint : constant Bare_Composite_Constraint := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Composite_Constraint.Composite_Constraint_F_Constraints;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Delta_Constraint_Range =>
declare
N_Bare_Delta_Constraint : constant Bare_Delta_Constraint := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Delta_Constraint.Delta_Constraint_F_Delta;
                            return;
                        when 2 =>
                            Result := N_Bare_Delta_Constraint.Delta_Constraint_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Digits_Constraint_Range =>
declare
N_Bare_Digits_Constraint : constant Bare_Digits_Constraint := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Digits_Constraint.Digits_Constraint_F_Digits;
                            return;
                        when 2 =>
                            Result := N_Bare_Digits_Constraint.Digits_Constraint_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Range_Constraint_Range =>
declare
N_Bare_Range_Constraint : constant Bare_Range_Constraint := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Range_Constraint.Range_Constraint_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Declarative_Part_Range =>
declare
N_Bare_Declarative_Part : constant Bare_Declarative_Part := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Declarative_Part.Declarative_Part_F_Decls;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Elsif_Expr_Part_Range =>
declare
N_Bare_Elsif_Expr_Part : constant Bare_Elsif_Expr_Part := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Elsif_Expr_Part.Elsif_Expr_Part_F_Cond_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Elsif_Expr_Part.Elsif_Expr_Part_F_Then_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Elsif_Stmt_Part_Range =>
declare
N_Bare_Elsif_Stmt_Part : constant Bare_Elsif_Stmt_Part := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Elsif_Stmt_Part.Elsif_Stmt_Part_F_Cond_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Elsif_Stmt_Part.Elsif_Stmt_Part_F_Stmts;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Abstract_State_Decl_Expr_Range =>
declare
N_Bare_Abstract_State_Decl_Expr : constant Bare_Abstract_State_Decl_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Abstract_State_Decl_Expr.Abstract_State_Decl_Expr_F_State_Decl;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Allocator_Range =>
declare
N_Bare_Allocator : constant Bare_Allocator := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Allocator.Allocator_F_Subpool;
                            return;
                        when 2 =>
                            Result := N_Bare_Allocator.Allocator_F_Type_Or_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Base_Aggregate =>
declare
N_Bare_Base_Aggregate : constant Bare_Base_Aggregate := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Base_Aggregate.Base_Aggregate_F_Ancestor_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Base_Aggregate.Base_Aggregate_F_Assocs;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Bin_Op_Range =>
declare
N_Bare_Bin_Op : constant Bare_Bin_Op := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Bin_Op.Bin_Op_F_Left;
                            return;
                        when 2 =>
                            Result := N_Bare_Bin_Op.Bin_Op_F_Op;
                            return;
                        when 3 =>
                            Result := N_Bare_Bin_Op.Bin_Op_F_Right;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Case_Expr_Alternative_Range =>
declare
N_Bare_Case_Expr_Alternative : constant Bare_Case_Expr_Alternative := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Case_Expr_Alternative.Case_Expr_Alternative_F_Choices;
                            return;
                        when 2 =>
                            Result := N_Bare_Case_Expr_Alternative.Case_Expr_Alternative_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Concat_Op_Range =>
declare
N_Bare_Concat_Op : constant Bare_Concat_Op := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Concat_Op.Concat_Op_F_First_Operand;
                            return;
                        when 2 =>
                            Result := N_Bare_Concat_Op.Concat_Op_F_Other_Operands;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Concat_Operand_Range =>
declare
N_Bare_Concat_Operand : constant Bare_Concat_Operand := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Concat_Operand.Concat_Operand_F_Operator;
                            return;
                        when 2 =>
                            Result := N_Bare_Concat_Operand.Concat_Operand_F_Operand;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Case_Expr_Range =>
declare
N_Bare_Case_Expr : constant Bare_Case_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Case_Expr.Case_Expr_F_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Case_Expr.Case_Expr_F_Cases;
                            return;
                        when others => null;
                    end case;
end;
when Ada_If_Expr_Range =>
declare
N_Bare_If_Expr : constant Bare_If_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_If_Expr.If_Expr_F_Cond_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_If_Expr.If_Expr_F_Then_Expr;
                            return;
                        when 3 =>
                            Result := N_Bare_If_Expr.If_Expr_F_Alternatives;
                            return;
                        when 4 =>
                            Result := N_Bare_If_Expr.If_Expr_F_Else_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Contract_Cases_Range =>
declare
N_Bare_Contract_Cases : constant Bare_Contract_Cases := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Contract_Cases.Contract_Cases_F_Contract_Cases;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Decl_Expr_Range =>
declare
N_Bare_Decl_Expr : constant Bare_Decl_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Decl_Expr.Decl_Expr_F_Decls;
                            return;
                        when 2 =>
                            Result := N_Bare_Decl_Expr.Decl_Expr_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Format_String_Literal_Range =>
declare
N_Bare_Format_String_Literal : constant Bare_Format_String_Literal := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Format_String_Literal.Format_String_Literal_F_Opening_Chunk;
                            return;
                        when 2 =>
                            Result := N_Bare_Format_String_Literal.Format_String_Literal_F_Mid_Exprs;
                            return;
                        when 3 =>
                            Result := N_Bare_Format_String_Literal.Format_String_Literal_F_Trailing_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Membership_Expr_Range =>
declare
N_Bare_Membership_Expr : constant Bare_Membership_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Membership_Expr.Membership_Expr_F_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Membership_Expr.Membership_Expr_F_Op;
                            return;
                        when 3 =>
                            Result := N_Bare_Membership_Expr.Membership_Expr_F_Membership_Exprs;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Array_Subcomponent_Choice_Name_Range =>
declare
N_Bare_Array_Subcomponent_Choice_Name : constant Bare_Array_Subcomponent_Choice_Name := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Array_Subcomponent_Choice_Name.Array_Subcomponent_Choice_Name_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Array_Subcomponent_Choice_Name.Array_Subcomponent_Choice_Name_F_Suffix;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Attribute_Ref_Range =>
declare
N_Bare_Attribute_Ref : constant Bare_Attribute_Ref := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Attribute_Ref.Attribute_Ref_F_Prefix;
                            return;
                        when 2 =>
                            Result := N_Bare_Attribute_Ref.Attribute_Ref_F_Attribute;
                            return;
                        when 3 =>
                            Result := N_Bare_Attribute_Ref.Attribute_Ref_F_Args;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Call_Expr_Range =>
declare
N_Bare_Call_Expr : constant Bare_Call_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Call_Expr.Call_Expr_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Call_Expr.Call_Expr_F_Suffix;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Defining_Name_Range =>
declare
N_Bare_Defining_Name : constant Bare_Defining_Name := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Defining_Name.Defining_Name_F_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Discrete_Subtype_Name_Range =>
declare
N_Bare_Discrete_Subtype_Name : constant Bare_Discrete_Subtype_Name := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Discrete_Subtype_Name.Discrete_Subtype_Name_F_Subtype;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Dotted_Name_Range =>
declare
N_Bare_Dotted_Name : constant Bare_Dotted_Name := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Dotted_Name.Dotted_Name_F_Prefix;
                            return;
                        when 2 =>
                            Result := N_Bare_Dotted_Name.Dotted_Name_F_Suffix;
                            return;
                        when others => null;
                    end case;
end;
when Ada_End_Name_Range =>
declare
N_Bare_End_Name : constant Bare_End_Name := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_End_Name.End_Name_F_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Explicit_Deref_Range =>
declare
N_Bare_Explicit_Deref : constant Bare_Explicit_Deref := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Explicit_Deref.Explicit_Deref_F_Prefix;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Qual_Expr_Range =>
declare
N_Bare_Qual_Expr : constant Bare_Qual_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Qual_Expr.Qual_Expr_F_Prefix;
                            return;
                        when 2 =>
                            Result := N_Bare_Qual_Expr.Qual_Expr_F_Suffix;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Reduce_Attribute_Ref_Range =>
declare
N_Bare_Reduce_Attribute_Ref : constant Bare_Reduce_Attribute_Ref := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Reduce_Attribute_Ref.Reduce_Attribute_Ref_F_Prefix;
                            return;
                        when 2 =>
                            Result := N_Bare_Reduce_Attribute_Ref.Reduce_Attribute_Ref_F_Attribute;
                            return;
                        when 3 =>
                            Result := N_Bare_Reduce_Attribute_Ref.Reduce_Attribute_Ref_F_Args;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Update_Attribute_Ref_Range =>
declare
N_Bare_Update_Attribute_Ref : constant Bare_Update_Attribute_Ref := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Update_Attribute_Ref.Update_Attribute_Ref_F_Prefix;
                            return;
                        when 2 =>
                            Result := N_Bare_Update_Attribute_Ref.Update_Attribute_Ref_F_Attribute;
                            return;
                        when 3 =>
                            Result := N_Bare_Update_Attribute_Ref.Update_Attribute_Ref_F_Values;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Paren_Expr_Range =>
declare
N_Bare_Paren_Expr : constant Bare_Paren_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Paren_Expr.Paren_Expr_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Quantified_Expr_Range =>
declare
N_Bare_Quantified_Expr : constant Bare_Quantified_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Quantified_Expr.Quantified_Expr_F_Quantifier;
                            return;
                        when 2 =>
                            Result := N_Bare_Quantified_Expr.Quantified_Expr_F_Loop_Spec;
                            return;
                        when 3 =>
                            Result := N_Bare_Quantified_Expr.Quantified_Expr_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Raise_Expr_Range =>
declare
N_Bare_Raise_Expr : constant Bare_Raise_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Raise_Expr.Raise_Expr_F_Exception_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Raise_Expr.Raise_Expr_F_Error_Message;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Un_Op_Range =>
declare
N_Bare_Un_Op : constant Bare_Un_Op := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Un_Op.Un_Op_F_Op;
                            return;
                        when 2 =>
                            Result := N_Bare_Un_Op.Un_Op_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_For_Loop_Iter_Filter_Range =>
declare
N_Bare_For_Loop_Iter_Filter : constant Bare_For_Loop_Iter_Filter := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_For_Loop_Iter_Filter.For_Loop_Iter_Filter_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Format_String_Chunk_Range =>
declare
N_Bare_Format_String_Chunk : constant Bare_Format_String_Chunk := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Format_String_Chunk.Format_String_Chunk_F_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Format_String_Chunk.Format_String_Chunk_F_String_Tok;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Handled_Stmts_Range =>
declare
N_Bare_Handled_Stmts : constant Bare_Handled_Stmts := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Handled_Stmts.Handled_Stmts_F_Stmts;
                            return;
                        when 2 =>
                            Result := N_Bare_Handled_Stmts.Handled_Stmts_F_Exceptions;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Library_Item_Range =>
declare
N_Bare_Library_Item : constant Bare_Library_Item := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Library_Item.Library_Item_F_Has_Private;
                            return;
                        when 2 =>
                            Result := N_Bare_Library_Item.Library_Item_F_Item;
                            return;
                        when others => null;
                    end case;
end;
when Ada_For_Loop_Spec_Range =>
declare
N_Bare_For_Loop_Spec : constant Bare_For_Loop_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_For_Loop_Spec.For_Loop_Spec_F_Var_Decl;
                            return;
                        when 2 =>
                            Result := N_Bare_For_Loop_Spec.For_Loop_Spec_F_Loop_Type;
                            return;
                        when 3 =>
                            Result := N_Bare_For_Loop_Spec.For_Loop_Spec_F_Has_Reverse;
                            return;
                        when 4 =>
                            Result := N_Bare_For_Loop_Spec.For_Loop_Spec_F_Iter_Expr;
                            return;
                        when 5 =>
                            Result := N_Bare_For_Loop_Spec.For_Loop_Spec_F_Iter_Filter;
                            return;
                        when others => null;
                    end case;
end;
when Ada_While_Loop_Spec_Range =>
declare
N_Bare_While_Loop_Spec : constant Bare_While_Loop_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_While_Loop_Spec.While_Loop_Spec_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Multi_Abstract_State_Decl_Range =>
declare
N_Bare_Multi_Abstract_State_Decl : constant Bare_Multi_Abstract_State_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Multi_Abstract_State_Decl.Multi_Abstract_State_Decl_F_Decls;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Params_Range =>
declare
N_Bare_Params : constant Bare_Params := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Params.Params_F_Params;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Paren_Abstract_State_Decl_Range =>
declare
N_Bare_Paren_Abstract_State_Decl : constant Bare_Paren_Abstract_State_Decl := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Paren_Abstract_State_Decl.Paren_Abstract_State_Decl_F_Decl;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Pp_Elsif_Directive_Range =>
declare
N_Bare_Pp_Elsif_Directive : constant Bare_Pp_Elsif_Directive := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Pp_Elsif_Directive.Pp_Elsif_Directive_F_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Pp_Elsif_Directive.Pp_Elsif_Directive_F_Then_Kw;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Pp_If_Directive_Range =>
declare
N_Bare_Pp_If_Directive : constant Bare_Pp_If_Directive := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Pp_If_Directive.Pp_If_Directive_F_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Pp_If_Directive.Pp_If_Directive_F_Then_Kw;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Pragma_Node_Range =>
declare
N_Bare_Pragma_Node : constant Bare_Pragma_Node := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Pragma_Node.Pragma_Node_F_Id;
                            return;
                        when 2 =>
                            Result := N_Bare_Pragma_Node.Pragma_Node_F_Args;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Protected_Def_Range =>
declare
N_Bare_Protected_Def : constant Bare_Protected_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Protected_Def.Protected_Def_F_Public_Part;
                            return;
                        when 2 =>
                            Result := N_Bare_Protected_Def.Protected_Def_F_Private_Part;
                            return;
                        when 3 =>
                            Result := N_Bare_Protected_Def.Protected_Def_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Range_Spec_Range =>
declare
N_Bare_Range_Spec : constant Bare_Range_Spec := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Range_Spec.Range_Spec_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Renaming_Clause_Range =>
declare
N_Bare_Renaming_Clause : constant Bare_Renaming_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Renaming_Clause.Renaming_Clause_F_Renamed_Object;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Select_When_Part_Range =>
declare
N_Bare_Select_When_Part : constant Bare_Select_When_Part := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Select_When_Part.Select_When_Part_F_Cond_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Select_When_Part.Select_When_Part_F_Stmts;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Accept_Stmt_Range =>
declare
N_Bare_Accept_Stmt : constant Bare_Accept_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Accept_Stmt.Accept_Stmt_F_Body_Decl;
                            return;
                        when 2 =>
                            Result := N_Bare_Accept_Stmt.Accept_Stmt_F_Entry_Index_Expr;
                            return;
                        when 3 =>
                            Result := N_Bare_Accept_Stmt.Accept_Stmt_F_Params;
                            return;
                        when others => null;
                    end case;
case Ada_Accept_Stmt_Range (K) is
when Ada_Accept_Stmt_With_Stmts_Range =>
declare
N_Bare_Accept_Stmt_With_Stmts : constant Bare_Accept_Stmt_With_Stmts := N_Bare_Accept_Stmt;
begin
case Index is
                        when 4 =>
                            Result := N_Bare_Accept_Stmt_With_Stmts.Accept_Stmt_With_Stmts_F_Stmts;
                            return;
                        when 5 =>
                            Result := N_Bare_Accept_Stmt_With_Stmts.Accept_Stmt_With_Stmts_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when others => null;
end case;
end;
when Ada_Base_Loop_Stmt =>
declare
N_Bare_Base_Loop_Stmt : constant Bare_Base_Loop_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Base_Loop_Stmt.Base_Loop_Stmt_F_Spec;
                            return;
                        when 2 =>
                            Result := N_Bare_Base_Loop_Stmt.Base_Loop_Stmt_F_Stmts;
                            return;
                        when 3 =>
                            Result := N_Bare_Base_Loop_Stmt.Base_Loop_Stmt_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Begin_Block_Range =>
declare
N_Bare_Begin_Block : constant Bare_Begin_Block := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Begin_Block.Begin_Block_F_Stmts;
                            return;
                        when 2 =>
                            Result := N_Bare_Begin_Block.Begin_Block_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Decl_Block_Range =>
declare
N_Bare_Decl_Block : constant Bare_Decl_Block := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Decl_Block.Decl_Block_F_Decls;
                            return;
                        when 2 =>
                            Result := N_Bare_Decl_Block.Decl_Block_F_Stmts;
                            return;
                        when 3 =>
                            Result := N_Bare_Decl_Block.Decl_Block_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Case_Stmt_Range =>
declare
N_Bare_Case_Stmt : constant Bare_Case_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Case_Stmt.Case_Stmt_F_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_Case_Stmt.Case_Stmt_F_Pragmas;
                            return;
                        when 3 =>
                            Result := N_Bare_Case_Stmt.Case_Stmt_F_Alternatives;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Extended_Return_Stmt_Range =>
declare
N_Bare_Extended_Return_Stmt : constant Bare_Extended_Return_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Extended_Return_Stmt.Extended_Return_Stmt_F_Decl;
                            return;
                        when 2 =>
                            Result := N_Bare_Extended_Return_Stmt.Extended_Return_Stmt_F_Stmts;
                            return;
                        when others => null;
                    end case;
end;
when Ada_If_Stmt_Range =>
declare
N_Bare_If_Stmt : constant Bare_If_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_If_Stmt.If_Stmt_F_Cond_Expr;
                            return;
                        when 2 =>
                            Result := N_Bare_If_Stmt.If_Stmt_F_Then_Stmts;
                            return;
                        when 3 =>
                            Result := N_Bare_If_Stmt.If_Stmt_F_Alternatives;
                            return;
                        when 4 =>
                            Result := N_Bare_If_Stmt.If_Stmt_F_Else_Stmts;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Named_Stmt_Range =>
declare
N_Bare_Named_Stmt : constant Bare_Named_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Named_Stmt.Named_Stmt_F_Decl;
                            return;
                        when 2 =>
                            Result := N_Bare_Named_Stmt.Named_Stmt_F_Stmt;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Select_Stmt_Range =>
declare
N_Bare_Select_Stmt : constant Bare_Select_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Select_Stmt.Select_Stmt_F_Guards;
                            return;
                        when 2 =>
                            Result := N_Bare_Select_Stmt.Select_Stmt_F_Else_Stmts;
                            return;
                        when 3 =>
                            Result := N_Bare_Select_Stmt.Select_Stmt_F_Abort_Stmts;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Abort_Stmt_Range =>
declare
N_Bare_Abort_Stmt : constant Bare_Abort_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Abort_Stmt.Abort_Stmt_F_Names;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Assign_Stmt_Range =>
declare
N_Bare_Assign_Stmt : constant Bare_Assign_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Assign_Stmt.Assign_Stmt_F_Dest;
                            return;
                        when 2 =>
                            Result := N_Bare_Assign_Stmt.Assign_Stmt_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Call_Stmt_Range =>
declare
N_Bare_Call_Stmt : constant Bare_Call_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Call_Stmt.Call_Stmt_F_Call;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Delay_Stmt_Range =>
declare
N_Bare_Delay_Stmt : constant Bare_Delay_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Delay_Stmt.Delay_Stmt_F_Has_Until;
                            return;
                        when 2 =>
                            Result := N_Bare_Delay_Stmt.Delay_Stmt_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Exit_Stmt_Range =>
declare
N_Bare_Exit_Stmt : constant Bare_Exit_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Exit_Stmt.Exit_Stmt_F_Loop_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Exit_Stmt.Exit_Stmt_F_Cond_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Goto_Stmt_Range =>
declare
N_Bare_Goto_Stmt : constant Bare_Goto_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Goto_Stmt.Goto_Stmt_F_Label_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Label_Range =>
declare
N_Bare_Label : constant Bare_Label := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Label.Label_F_Decl;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Raise_Stmt_Range =>
declare
N_Bare_Raise_Stmt : constant Bare_Raise_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Raise_Stmt.Raise_Stmt_F_Exception_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Raise_Stmt.Raise_Stmt_F_Error_Message;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Requeue_Stmt_Range =>
declare
N_Bare_Requeue_Stmt : constant Bare_Requeue_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Requeue_Stmt.Requeue_Stmt_F_Call_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Requeue_Stmt.Requeue_Stmt_F_Has_Abort;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Return_Stmt_Range =>
declare
N_Bare_Return_Stmt : constant Bare_Return_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Return_Stmt.Return_Stmt_F_Return_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Simple_Decl_Stmt_Range =>
declare
N_Bare_Simple_Decl_Stmt : constant Bare_Simple_Decl_Stmt := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Simple_Decl_Stmt.Simple_Decl_Stmt_F_Decl;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Subunit_Range =>
declare
N_Bare_Subunit : constant Bare_Subunit := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Subunit.Subunit_F_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Subunit.Subunit_F_Body;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Task_Def_Range =>
declare
N_Bare_Task_Def : constant Bare_Task_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Task_Def.Task_Def_F_Interfaces;
                            return;
                        when 2 =>
                            Result := N_Bare_Task_Def.Task_Def_F_Public_Part;
                            return;
                        when 3 =>
                            Result := N_Bare_Task_Def.Task_Def_F_Private_Part;
                            return;
                        when 4 =>
                            Result := N_Bare_Task_Def.Task_Def_F_End_Name;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Access_Def =>
declare
N_Bare_Access_Def : constant Bare_Access_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Access_Def.Access_Def_F_Has_Not_Null;
                            return;
                        when others => null;
                    end case;
case Ada_Access_Def (K) is
when Ada_Access_To_Subp_Def_Range =>
declare
N_Bare_Access_To_Subp_Def : constant Bare_Access_To_Subp_Def := N_Bare_Access_Def;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Access_To_Subp_Def.Access_To_Subp_Def_F_Has_Protected;
                            return;
                        when 3 =>
                            Result := N_Bare_Access_To_Subp_Def.Access_To_Subp_Def_F_Subp_Spec;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Anonymous_Type_Access_Def_Range =>
declare
N_Bare_Anonymous_Type_Access_Def : constant Bare_Anonymous_Type_Access_Def := N_Bare_Access_Def;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Anonymous_Type_Access_Def.Anonymous_Type_Access_Def_F_Type_Decl;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Type_Access_Def_Range =>
declare
N_Bare_Type_Access_Def : constant Bare_Type_Access_Def := N_Bare_Access_Def;
begin
case Index is
                        when 2 =>
                            Result := N_Bare_Type_Access_Def.Type_Access_Def_F_Has_All;
                            return;
                        when 3 =>
                            Result := N_Bare_Type_Access_Def.Type_Access_Def_F_Has_Constant;
                            return;
                        when 4 =>
                            Result := N_Bare_Type_Access_Def.Type_Access_Def_F_Subtype_Indication;
                            return;
                        when others => null;
                    end case;
end;
when others => null;
end case;
end;
when Ada_Array_Type_Def_Range =>
declare
N_Bare_Array_Type_Def : constant Bare_Array_Type_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Array_Type_Def.Array_Type_Def_F_Indices;
                            return;
                        when 2 =>
                            Result := N_Bare_Array_Type_Def.Array_Type_Def_F_Component_Type;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Derived_Type_Def_Range =>
declare
N_Bare_Derived_Type_Def : constant Bare_Derived_Type_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Derived_Type_Def.Derived_Type_Def_F_Has_Abstract;
                            return;
                        when 2 =>
                            Result := N_Bare_Derived_Type_Def.Derived_Type_Def_F_Has_Limited;
                            return;
                        when 3 =>
                            Result := N_Bare_Derived_Type_Def.Derived_Type_Def_F_Has_Synchronized;
                            return;
                        when 4 =>
                            Result := N_Bare_Derived_Type_Def.Derived_Type_Def_F_Subtype_Indication;
                            return;
                        when 5 =>
                            Result := N_Bare_Derived_Type_Def.Derived_Type_Def_F_Interfaces;
                            return;
                        when 6 =>
                            Result := N_Bare_Derived_Type_Def.Derived_Type_Def_F_Record_Extension;
                            return;
                        when 7 =>
                            Result := N_Bare_Derived_Type_Def.Derived_Type_Def_F_Has_With_Private;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Enum_Type_Def_Range =>
declare
N_Bare_Enum_Type_Def : constant Bare_Enum_Type_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Enum_Type_Def.Enum_Type_Def_F_Enum_Literals;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Interface_Type_Def_Range =>
declare
N_Bare_Interface_Type_Def : constant Bare_Interface_Type_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Interface_Type_Def.Interface_Type_Def_F_Interface_Kind;
                            return;
                        when 2 =>
                            Result := N_Bare_Interface_Type_Def.Interface_Type_Def_F_Interfaces;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Mod_Int_Type_Def_Range =>
declare
N_Bare_Mod_Int_Type_Def : constant Bare_Mod_Int_Type_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Mod_Int_Type_Def.Mod_Int_Type_Def_F_Expr;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Private_Type_Def_Range =>
declare
N_Bare_Private_Type_Def : constant Bare_Private_Type_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Private_Type_Def.Private_Type_Def_F_Has_Abstract;
                            return;
                        when 2 =>
                            Result := N_Bare_Private_Type_Def.Private_Type_Def_F_Has_Tagged;
                            return;
                        when 3 =>
                            Result := N_Bare_Private_Type_Def.Private_Type_Def_F_Has_Limited;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Decimal_Fixed_Point_Def_Range =>
declare
N_Bare_Decimal_Fixed_Point_Def : constant Bare_Decimal_Fixed_Point_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Decimal_Fixed_Point_Def.Decimal_Fixed_Point_Def_F_Delta;
                            return;
                        when 2 =>
                            Result := N_Bare_Decimal_Fixed_Point_Def.Decimal_Fixed_Point_Def_F_Digits;
                            return;
                        when 3 =>
                            Result := N_Bare_Decimal_Fixed_Point_Def.Decimal_Fixed_Point_Def_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Floating_Point_Def_Range =>
declare
N_Bare_Floating_Point_Def : constant Bare_Floating_Point_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Floating_Point_Def.Floating_Point_Def_F_Num_Digits;
                            return;
                        when 2 =>
                            Result := N_Bare_Floating_Point_Def.Floating_Point_Def_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Ordinary_Fixed_Point_Def_Range =>
declare
N_Bare_Ordinary_Fixed_Point_Def : constant Bare_Ordinary_Fixed_Point_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Ordinary_Fixed_Point_Def.Ordinary_Fixed_Point_Def_F_Delta;
                            return;
                        when 2 =>
                            Result := N_Bare_Ordinary_Fixed_Point_Def.Ordinary_Fixed_Point_Def_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Record_Type_Def_Range =>
declare
N_Bare_Record_Type_Def : constant Bare_Record_Type_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Record_Type_Def.Record_Type_Def_F_Has_Abstract;
                            return;
                        when 2 =>
                            Result := N_Bare_Record_Type_Def.Record_Type_Def_F_Has_Tagged;
                            return;
                        when 3 =>
                            Result := N_Bare_Record_Type_Def.Record_Type_Def_F_Has_Limited;
                            return;
                        when 4 =>
                            Result := N_Bare_Record_Type_Def.Record_Type_Def_F_Record_Def;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Signed_Int_Type_Def_Range =>
declare
N_Bare_Signed_Int_Type_Def : constant Bare_Signed_Int_Type_Def := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Signed_Int_Type_Def.Signed_Int_Type_Def_F_Range;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Anonymous_Type_Range =>
declare
N_Bare_Anonymous_Type : constant Bare_Anonymous_Type := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Anonymous_Type.Anonymous_Type_F_Type_Decl;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Subtype_Indication_Range =>
declare
N_Bare_Subtype_Indication : constant Bare_Subtype_Indication := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Subtype_Indication.Subtype_Indication_F_Has_Not_Null;
                            return;
                        when 2 =>
                            Result := N_Bare_Subtype_Indication.Subtype_Indication_F_Name;
                            return;
                        when 3 =>
                            Result := N_Bare_Subtype_Indication.Subtype_Indication_F_Constraint;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Synthetic_Type_Expr_Range =>
declare
N_Bare_Synthetic_Type_Expr : constant Bare_Synthetic_Type_Expr := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Synthetic_Type_Expr.Synthetic_Type_Expr_F_Target_Type;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Unconstrained_Array_Index_Range =>
declare
N_Bare_Unconstrained_Array_Index : constant Bare_Unconstrained_Array_Index := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Unconstrained_Array_Index.Unconstrained_Array_Index_F_Subtype_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Unconstrained_Array_Index.Unconstrained_Array_Index_F_Lower_Bound;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Use_Package_Clause_Range =>
declare
N_Bare_Use_Package_Clause : constant Bare_Use_Package_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Use_Package_Clause.Use_Package_Clause_F_Packages;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Use_Type_Clause_Range =>
declare
N_Bare_Use_Type_Clause : constant Bare_Use_Type_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Use_Type_Clause.Use_Type_Clause_F_Has_All;
                            return;
                        when 2 =>
                            Result := N_Bare_Use_Type_Clause.Use_Type_Clause_F_Types;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Value_Sequence_Range =>
declare
N_Bare_Value_Sequence : constant Bare_Value_Sequence := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Value_Sequence.Value_Sequence_F_Iter_Assoc;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Variant_Range =>
declare
N_Bare_Variant : constant Bare_Variant := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Variant.Variant_F_Choices;
                            return;
                        when 2 =>
                            Result := N_Bare_Variant.Variant_F_Components;
                            return;
                        when others => null;
                    end case;
end;
when Ada_Variant_Part_Range =>
declare
N_Bare_Variant_Part : constant Bare_Variant_Part := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_Variant_Part.Variant_Part_F_Discr_Name;
                            return;
                        when 2 =>
                            Result := N_Bare_Variant_Part.Variant_Part_F_Variant;
                            return;
                        when others => null;
                    end case;
end;
when Ada_With_Clause_Range =>
declare
N_Bare_With_Clause : constant Bare_With_Clause := Node;
begin
case Index is
                        when 1 =>
                            Result := N_Bare_With_Clause.With_Clause_F_Has_Limited;
                            return;
                        when 2 =>
                            Result := N_Bare_With_Clause.With_Clause_F_Has_Private;
                            return;
                        when 3 =>
                            Result := N_Bare_With_Clause.With_Clause_F_Packages;
                            return;
                        when others => null;
                    end case;
end;
when others => null;
end case;
      --  Execution should reach this point iff nothing matched this index, so
      --  we must be out of bounds.
      Index_In_Bounds := False;
   end Get_Child;
   -----------
   -- Print --
   -----------
   procedure Print
     (Node        : Langkit_Support.Generic_API.Analysis.Lk_Node;
      Show_Slocs  : Boolean;
      Line_Prefix : String := "")
   is
      use Langkit_Support.Generic_API.Analysis;
      use Langkit_Support.Generic_API.Introspection;
      T : Type_Ref;
   begin
      if Node.Is_Null then
         Put_Line ("None");
         return;
      end if;
      T := Type_Of (Node);
      Put (Line_Prefix & Image (Node_Type_Repr_Name (T)));
      if Show_Slocs then
         Put ("[" & Image (Node.Sloc_Range) & "]");
      end if;
      if Node.Is_Incomplete then
         Put (" <<INCOMPLETE>>");
      end if;
      if Node.Is_Token_Node then
         Put_Line (": " & Image (Node.Text));
      elsif Is_List_Node (Node) then
         --  List nodes are displayed in a special way (they have no field)
         declare
            Count : constant Natural := Node.Children_Count;
            Child : Lk_Node;
         begin
            if Count = 0 then
               Put_Line (": <empty list>");
               return;
            end if;
            New_Line;
            for I in 1 .. Count loop
               Child := Node.Child (I);
               if not Child.Is_Null then
                  Print (Child, Show_Slocs, Line_Prefix & "|  ");
               end if;
            end loop;
         end;
      else
         --  This is for regular nodes: display each syntax field (i.e.
         --  non-property member).
         declare
            Attr_Prefix     : constant String := Line_Prefix & "|";
            Children_Prefix : constant String := Line_Prefix & "|  ";
            M_List          : constant Struct_Member_Ref_Array := Members (T);
            Child           : Lk_Node;
         begin
            New_Line;
            for M of M_List loop
               if not Is_Property (M) and then not Is_Null_For (M, T) then
                  Child := As_Node (Eval_Node_Member (Node, M));
                  Put (Attr_Prefix
                       & Image (Format_Name (Member_Name (M), Lower)) & ":");
                  if Child.Is_Null then
                     Put_Line (" <null>");
                  else
                     New_Line;
                     Print (Child, Show_Slocs, Children_Prefix);
                  end if;
               end if;
            end loop;
         end;
      end if;
   end Print;
   -----------
   -- Print --
   -----------
   procedure Print
     (Node        : Bare_Ada_Node;
      Show_Slocs  : Boolean;
      Line_Prefix : String := "")
   is
      Entity : constant Internal_Entity := (Node, No_Entity_Info);
   begin
      Print (To_Generic_Node (Entity), Show_Slocs, Line_Prefix);
   end Print;
   ------------
   -- Parent --
   ------------
   function Parent (Node : Bare_Ada_Node) return Bare_Ada_Node is
   begin
      return Node.Parent;
   end Parent;
   ------------------
   -- Stored_Token --
   ------------------
   function Stored_Token
     (Node  : Bare_Ada_Node;
      Token : Token_Reference) return Token_Index
   is
      Index : constant Token_Or_Trivia_Index := Get_Token_Index (Token);
   begin
      if Node.Unit.TDH'Access /= Get_Token_TDH (Token) then
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "Cannot associate a token and a node from different analysis"
            & " units");
      elsif Index.Trivia /= No_Token_Index then
         Raise_Property_Exception
           (Node,
            Property_Error'Identity,
            "A node cannot hold trivia");
      end if;
      return Index.Token;
   end Stored_Token;
   -------------------------
   -- Children_And_Trivia --
   -------------------------
   function Children_And_Trivia
     (Node : Bare_Ada_Node) return Bare_Children_Vector
   is
      Ret_Vec : Bare_Children_Vector;
      Ctx     : Internal_Context renames Node.Unit.Context;
      TDH     : Token_Data_Handler renames Node.Unit.TDH;
      procedure Append_Trivias (First, Last : Token_Index);
      --  Append all the trivias of tokens between indices First and Last to
      --  the returned vector.
      function Filter_Children
        (Parent : Bare_Ada_Node)
         return Internal_Bare_Ada_Node_Array;
      --  Return an array for all children in Parent that are not null
      --------------------
      -- Append_Trivias --
      --------------------
      procedure Append_Trivias (First, Last : Token_Index) is
      begin
         for I in First .. Last loop
            for D of Get_Trivias (TDH, I) loop
               Ret_Vec.Append
                 (Bare_Child_Record'
                    (Kind   => Trivia,
                     Trivia => Wrap_Token_Reference
                                 (Ctx, TDH'Access, (I, D))));
            end loop;
         end loop;
      end Append_Trivias;
      ---------------------
      -- Filter_Children --
      ---------------------
      function Filter_Children
        (Parent : Bare_Ada_Node)
         return Internal_Bare_Ada_Node_Array
      is
         Children : constant Internal_Bare_Ada_Node_Array :=
            Implementation.Children (Parent);
         Result   : Internal_Bare_Ada_Node_Array (Children'Range);
         Next     : Integer := Result'First;
      begin
         for I in Children'Range loop
            if Children (I) /= null then
               Result (Next) := Children (I);
               Next := Next + 1;
            end if;
         end loop;
         return Result (Result'First .. Next - 1);
      end Filter_Children;
      First_Child : constant Positive := 1;
      N_Children  : constant Internal_Bare_Ada_Node_Array :=
         Filter_Children (Node);
   begin
      if N_Children'Length > 0
        and then (Node.Token_Start_Index
                    /= N_Children (First_Child).Token_Start_Index)
      then
         Append_Trivias (Node.Token_Start_Index,
                         N_Children (First_Child).Token_Start_Index - 1);
      end if;
      --  Append each node to Ret_Vec, and append trivia that follow after each
      --  non-ghost nodes.
      for I in N_Children'Range loop
         Ret_Vec.Append (Bare_Child_Record'(Child, N_Children (I)));
         if not Is_Ghost (N_Children (I)) then
            Append_Trivias (N_Children (I).Token_End_Index,
                            (if I = N_Children'Last
                             then Node.Token_End_Index - 1
                             else N_Children (I + 1).Token_Start_Index - 1));
         end if;
      end loop;
      return Ret_Vec;
   end Children_And_Trivia;
   --------------
   -- Is_Ghost --
   --------------
   function Is_Ghost (Node : Bare_Ada_Node) return Boolean
   is (Node.Token_End_Index = No_Token_Index);
   -------------------
   -- Is_Incomplete --
   -------------------
   function Is_Incomplete (Node : Bare_Ada_Node) return Boolean
   is
      LGC : Bare_Ada_Node;
   begin
     if Is_List_Node (Node.Kind) then
        LGC := (if Last_Child_Index (Node) /= 0
                then Child (Node, Last_Child_Index (Node))
                else null);
        return LGC /= null and then Is_Incomplete (LGC);
      else
         return Node.Last_Attempted_Child > -1;
      end if;
   end;
   -----------------
   -- Token_Start --
   -----------------
   function Token_Start (Node : Bare_Ada_Node) return Token_Reference
   is (Token (Node, Node.Token_Start_Index));
   ---------------
   -- Token_End --
   ---------------
   function Token_End (Node : Bare_Ada_Node) return Token_Reference
   is
     (if Node.Token_End_Index = No_Token_Index
      then Token_Start (Node)
      else Token (Node, Node.Token_End_Index));
   -----------
   -- Token --
   -----------
   function Token
     (Node  : Bare_Ada_Node;
      Index : Token_Index) return Token_Reference
   is
      Unit    : constant Internal_Unit := Node.Unit;
      Context : constant Internal_Context := Unit.Context;
   begin
      return Wrap_Token_Reference
        (Context, Token_Data (Unit), (Index, No_Token_Index));
   end Token;
   ---------
   -- "<" --
   ---------
   function "<" (Left, Right : Bare_Ada_Node) return Boolean is
   begin
      --  Reject invalid inputs
      if Left /= null and Is_Synthetic (Left) then
         raise Property_Error with "left node is synthetic";
      elsif Right /= null and Is_Synthetic (Right) then
         raise Property_Error with "right node is synthetic";
      end if;
      --  Null nodes come first
      if Left = null then
         return Right /= null;
      elsif Right = null then
         return False;
      end if;
      --  So we have two non-null nodes. Sort by unit filename
      if Left.Unit < Right.Unit then
         return True;
      elsif Left.Unit /= Right.Unit then
         return False;
      end if;
      --  Both nodes come from the same unit: compare their token indexes
      if Left.Token_Start_Index < Right.Token_Start_Index then
         return True;
      elsif Left.Token_Start_Index > Right.Token_Start_Index then
         return False;
      else
         return Left.Token_End_Index < Right.Token_End_Index;
      end if;
   end "<";
   -------------
   -- Is_Null --
   -------------
   function Is_Null (Node : Bare_Ada_Node) return Boolean
   is (Node = null);
   ----------
   -- Kind --
   ----------
   function Kind (Node : Bare_Ada_Node) return Ada_Node_Kind_Type
   is (Node.Kind);
   -----------------
   -- Child_Index --
   -----------------
   function Child_Index (Node : Bare_Ada_Node) return Integer
   is
      N : Bare_Ada_Node := null;
   begin
      if Node.Parent = null then
         raise Property_Error with
            "Trying to get the child index of a root node";
      end if;
      for I in First_Child_Index (Node.Parent)
            .. Last_Child_Index (Node.Parent)
      loop
         N := Child (Node.Parent, I);
         if N = Node then
            return I - 1;
         end if;
      end loop;
      --  If we reach this point, then Node isn't a Child of Node.Parent. This
      --  is not supposed to happen.
      raise Program_Error;
   end Child_Index;
   -------------------
   -- Fetch_Sibling --
   -------------------
   function Fetch_Sibling
     (Node   : Bare_Ada_Node;
      Offset : Integer) return Bare_Ada_Node is
   begin
      --  Root nodes have no sibling: handle them now to avoid invalid requests
      --  in the code below.
      if Node.Parent = null then
         return null;
      end if;
      declare
         Node_Index : constant Positive := Child_Index (Node) + 1;
         --  Child_Index is 0-based, but the Child primitive expects a 1-based
         --  index.
         Sibling_Index : constant Integer := Node_Index + Offset;
      begin
         --  Child returns null for out-of-bound indexes
         return (if Sibling_Index >= 1
                 then Child (Node.Parent, Sibling_Index)
                 else null);
      end;
   end Fetch_Sibling;
   -------------------
   -- Fetch_Sibling --
   -------------------
   function Fetch_Sibling
     (Node   : Bare_Ada_Node;
      E_Info : Internal_Entity_Info;
      Offset : Integer) return Internal_Entity
   is
      Sibling : constant Bare_Ada_Node := Fetch_Sibling (Node, Offset);
   begin
      --  Don't forget to clear entity info if the result is nul
      return (if Sibling = null
              then No_Entity
              else (Sibling, E_Info));
   end Fetch_Sibling;
   ----------------------
   -- Previous_Sibling --
   ----------------------
   function Previous_Sibling
     (Node   : Bare_Ada_Node;
      E_Info : Internal_Entity_Info := No_Entity_Info)
      return Internal_Entity is
   begin
      return Fetch_Sibling (Node, E_Info, -1);
   end Previous_Sibling;
   ------------------
   -- Next_Sibling --
   ------------------
   function Next_Sibling
     (Node   : Bare_Ada_Node;
      E_Info : Internal_Entity_Info := No_Entity_Info)
      return Internal_Entity is
   begin
      return Fetch_Sibling (Node, E_Info, 1);
   end Next_Sibling;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (Self : Node_Builder_Type) is
   begin
      if Self.Ref_Count > 0 then
         Self.Ref_Count := Self.Ref_Count + 1;
      end if;
   end Inc_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (Self : in out Node_Builder_Type) is
   begin
      if Self = null or else Self.Ref_Count < 0 then
         return;
      elsif Self.Ref_Count = 1 then
         Self.Release;
         Free (Self);
      else
         Self.Ref_Count := Self.Ref_Count - 1;
      end if;
   end Dec_Ref;
   ------------------------------
   -- Create_Copy_Node_Builder --
   ------------------------------
   function Create_Copy_Node_Builder
     (Value : Bare_Ada_Node) return Node_Builder_Type is
   begin
      --  No need to allocate a new builder if in practice it cannot be
      --  distinguished from the "null" builder.
      if Value = null then
         return Null_Node_Builder;
      else
         return new Copy_Node_Builder_Record'(Ref_Count => 1, Value => Value);
      end if;
   end Create_Copy_Node_Builder;
         type Bare_Synthetic_Binary_Spec_Node_Builder_Record is new Node_Builder_Record with
            record
               Synthetic_Binary_Spec_Subp_Symbol : Symbol_Type;
               Synthetic_Binary_Spec_F_Left_Param : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
               Synthetic_Binary_Spec_F_Right_Param : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
               Synthetic_Binary_Spec_F_Return_Type_Expr : Bare_Type_Expr_Node_Builder;
            end record;
         type Bare_Synthetic_Binary_Spec_Node_Builder_Access is access all Bare_Synthetic_Binary_Spec_Node_Builder_Record;
         overriding function Build
           (Self              : Bare_Synthetic_Binary_Spec_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node;
            overriding procedure Release (Self : in out Bare_Synthetic_Binary_Spec_Node_Builder_Record);
         -----------
         -- Build --
         -----------
         overriding function Build
           (Self              : Bare_Synthetic_Binary_Spec_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node
         is
            Result : Bare_Ada_Node;
            Unit   : constant Internal_Unit := Self_Node.Unit;
            Env    : constant Lexical_Env :=
              (if Parent = null
               then Empty_Env
               else Parent.Self_Env);
         begin
            if Parent /= null and then Parent.Unit /= Unit then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic node parents must belong to the same unit as the"
                  & " nodes that trigger node synthetization");
            end if;
            if Is_Foreign_Strict (Env, Parent) then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic nodes cannot have foreign lexical envs");
            end if;
            Result := new Root_Node_Record
              (Ada_Synthetic_Binary_Spec);
            Initialize
              (Self => Result,
               Kind => Ada_Synthetic_Binary_Spec,
               Unit => Unit,
               Token_Start_Index => No_Token_Index,
               Token_End_Index   => No_Token_Index,
               Parent   => Parent,
               Self_Env => Env);
            Register_Destroyable (Unit, Result);
               declare
                  Children : array (1 .. 3)
                               of Bare_Ada_Node;
               begin
                     Children (1) :=
                       Self.Synthetic_Binary_Spec_F_Left_Param.Build (Result, Self_Node);
                        if Children (1) = null then
                           Raise_Property_Exception
                             (Self_Node,
                              Property_Error'Identity,
                              "SyntheticBinarySpec.left_param cannot be null in synthetic"
                              & " nodes; add a nullable annotation to this"
                              & " field to allow it");
                        end if;
                     Children (2) :=
                       Self.Synthetic_Binary_Spec_F_Right_Param.Build (Result, Self_Node);
                        if Children (2) = null then
                           Raise_Property_Exception
                             (Self_Node,
                              Property_Error'Identity,
                              "SyntheticBinarySpec.right_param cannot be null in synthetic"
                              & " nodes; add a nullable annotation to this"
                              & " field to allow it");
                        end if;
                     Children (3) :=
                       Self.Synthetic_Binary_Spec_F_Return_Type_Expr.Build (Result, Self_Node);
                  Initialize_Fields_For_Synthetic_Binary_Spec
                    (Self => Result,
                     Synthetic_Binary_Spec_F_Left_Param => Children (1),
                     Synthetic_Binary_Spec_F_Right_Param => Children (2),
                     Synthetic_Binary_Spec_F_Return_Type_Expr => Children (3));
               end;
               Result.Synthetic_Binary_Spec_Subp_Symbol :=
                  Self.Synthetic_Binary_Spec_Subp_Symbol;
            return Result;
         end Build;
            -------------
            -- Release --
            -------------
            overriding procedure Release (Self : in out Bare_Synthetic_Binary_Spec_Node_Builder_Record) is
            begin
                     Dec_Ref (Self.Synthetic_Binary_Spec_F_Left_Param);
                     Dec_Ref (Self.Synthetic_Binary_Spec_F_Right_Param);
                     Dec_Ref (Self.Synthetic_Binary_Spec_F_Return_Type_Expr);
            end Release;
         function Create_Bare_Synthetic_Binary_Spec_Node_Builder
             (Synthetic_Binary_Spec_Subp_Symbol : Symbol_Type;
               Synthetic_Binary_Spec_F_Left_Param : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
               Synthetic_Binary_Spec_F_Right_Param : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
               Synthetic_Binary_Spec_F_Return_Type_Expr : Bare_Type_Expr_Node_Builder)
           return Bare_Synthetic_Binary_Spec_Node_Builder
         is
            Builder : constant Bare_Synthetic_Binary_Spec_Node_Builder_Access := new Bare_Synthetic_Binary_Spec_Node_Builder_Record;
         begin
            Builder.Ref_Count := 1;
               Builder.Synthetic_Binary_Spec_Subp_Symbol := Synthetic_Binary_Spec_Subp_Symbol;
               Builder.Synthetic_Binary_Spec_F_Left_Param := Synthetic_Binary_Spec_F_Left_Param;
                  Inc_Ref (Builder.Synthetic_Binary_Spec_F_Left_Param);
               Builder.Synthetic_Binary_Spec_F_Right_Param := Synthetic_Binary_Spec_F_Right_Param;
                  Inc_Ref (Builder.Synthetic_Binary_Spec_F_Right_Param);
               Builder.Synthetic_Binary_Spec_F_Return_Type_Expr := Synthetic_Binary_Spec_F_Return_Type_Expr;
                  Inc_Ref (Builder.Synthetic_Binary_Spec_F_Return_Type_Expr);
            return Node_Builder_Type (Builder);
         end Create_Bare_Synthetic_Binary_Spec_Node_Builder;
         type Bare_Synthetic_Unary_Spec_Node_Builder_Record is new Node_Builder_Record with
            record
               Synthetic_Unary_Spec_Subp_Symbol : Symbol_Type;
               Synthetic_Unary_Spec_F_Right_Param : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
               Synthetic_Unary_Spec_F_Return_Type_Expr : Bare_Synthetic_Type_Expr_Node_Builder;
            end record;
         type Bare_Synthetic_Unary_Spec_Node_Builder_Access is access all Bare_Synthetic_Unary_Spec_Node_Builder_Record;
         overriding function Build
           (Self              : Bare_Synthetic_Unary_Spec_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node;
            overriding procedure Release (Self : in out Bare_Synthetic_Unary_Spec_Node_Builder_Record);
         -----------
         -- Build --
         -----------
         overriding function Build
           (Self              : Bare_Synthetic_Unary_Spec_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node
         is
            Result : Bare_Ada_Node;
            Unit   : constant Internal_Unit := Self_Node.Unit;
            Env    : constant Lexical_Env :=
              (if Parent = null
               then Empty_Env
               else Parent.Self_Env);
         begin
            if Parent /= null and then Parent.Unit /= Unit then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic node parents must belong to the same unit as the"
                  & " nodes that trigger node synthetization");
            end if;
            if Is_Foreign_Strict (Env, Parent) then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic nodes cannot have foreign lexical envs");
            end if;
            Result := new Root_Node_Record
              (Ada_Synthetic_Unary_Spec);
            Initialize
              (Self => Result,
               Kind => Ada_Synthetic_Unary_Spec,
               Unit => Unit,
               Token_Start_Index => No_Token_Index,
               Token_End_Index   => No_Token_Index,
               Parent   => Parent,
               Self_Env => Env);
            Register_Destroyable (Unit, Result);
               declare
                  Children : array (1 .. 2)
                               of Bare_Ada_Node;
               begin
                     Children (1) :=
                       Self.Synthetic_Unary_Spec_F_Right_Param.Build (Result, Self_Node);
                        if Children (1) = null then
                           Raise_Property_Exception
                             (Self_Node,
                              Property_Error'Identity,
                              "SyntheticUnarySpec.right_param cannot be null in synthetic"
                              & " nodes; add a nullable annotation to this"
                              & " field to allow it");
                        end if;
                     Children (2) :=
                       Self.Synthetic_Unary_Spec_F_Return_Type_Expr.Build (Result, Self_Node);
                        if Children (2) = null then
                           Raise_Property_Exception
                             (Self_Node,
                              Property_Error'Identity,
                              "SyntheticUnarySpec.return_type_expr cannot be null in synthetic"
                              & " nodes; add a nullable annotation to this"
                              & " field to allow it");
                        end if;
                  Initialize_Fields_For_Synthetic_Unary_Spec
                    (Self => Result,
                     Synthetic_Unary_Spec_F_Right_Param => Children (1),
                     Synthetic_Unary_Spec_F_Return_Type_Expr => Children (2));
               end;
               Result.Synthetic_Unary_Spec_Subp_Symbol :=
                  Self.Synthetic_Unary_Spec_Subp_Symbol;
            return Result;
         end Build;
            -------------
            -- Release --
            -------------
            overriding procedure Release (Self : in out Bare_Synthetic_Unary_Spec_Node_Builder_Record) is
            begin
                     Dec_Ref (Self.Synthetic_Unary_Spec_F_Right_Param);
                     Dec_Ref (Self.Synthetic_Unary_Spec_F_Return_Type_Expr);
            end Release;
         function Create_Bare_Synthetic_Unary_Spec_Node_Builder
             (Synthetic_Unary_Spec_Subp_Symbol : Symbol_Type;
               Synthetic_Unary_Spec_F_Right_Param : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
               Synthetic_Unary_Spec_F_Return_Type_Expr : Bare_Synthetic_Type_Expr_Node_Builder)
           return Bare_Synthetic_Unary_Spec_Node_Builder
         is
            Builder : constant Bare_Synthetic_Unary_Spec_Node_Builder_Access := new Bare_Synthetic_Unary_Spec_Node_Builder_Record;
         begin
            Builder.Ref_Count := 1;
               Builder.Synthetic_Unary_Spec_Subp_Symbol := Synthetic_Unary_Spec_Subp_Symbol;
               Builder.Synthetic_Unary_Spec_F_Right_Param := Synthetic_Unary_Spec_F_Right_Param;
                  Inc_Ref (Builder.Synthetic_Unary_Spec_F_Right_Param);
               Builder.Synthetic_Unary_Spec_F_Return_Type_Expr := Synthetic_Unary_Spec_F_Return_Type_Expr;
                  Inc_Ref (Builder.Synthetic_Unary_Spec_F_Return_Type_Expr);
            return Node_Builder_Type (Builder);
         end Create_Bare_Synthetic_Unary_Spec_Node_Builder;
         type Bare_Synthetic_Type_Expr_Node_Builder_Record is new Node_Builder_Record with
            record
               Synthetic_Type_Expr_F_Target_Type : Bare_Base_Type_Decl_Node_Builder;
            end record;
         type Bare_Synthetic_Type_Expr_Node_Builder_Access is access all Bare_Synthetic_Type_Expr_Node_Builder_Record;
         overriding function Build
           (Self              : Bare_Synthetic_Type_Expr_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node;
            overriding procedure Release (Self : in out Bare_Synthetic_Type_Expr_Node_Builder_Record);
         -----------
         -- Build --
         -----------
         overriding function Build
           (Self              : Bare_Synthetic_Type_Expr_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node
         is
            Result : Bare_Ada_Node;
            Unit   : constant Internal_Unit := Self_Node.Unit;
            Env    : constant Lexical_Env :=
              (if Parent = null
               then Empty_Env
               else Parent.Self_Env);
         begin
            if Parent /= null and then Parent.Unit /= Unit then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic node parents must belong to the same unit as the"
                  & " nodes that trigger node synthetization");
            end if;
            if Is_Foreign_Strict (Env, Parent) then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic nodes cannot have foreign lexical envs");
            end if;
            Result := new Root_Node_Record
              (Ada_Synthetic_Type_Expr);
            Initialize
              (Self => Result,
               Kind => Ada_Synthetic_Type_Expr,
               Unit => Unit,
               Token_Start_Index => No_Token_Index,
               Token_End_Index   => No_Token_Index,
               Parent   => Parent,
               Self_Env => Env);
            Register_Destroyable (Unit, Result);
               declare
                  Children : array (1 .. 1)
                               of Bare_Ada_Node;
               begin
                     Children (1) :=
                       Self.Synthetic_Type_Expr_F_Target_Type.Build (Result, Self_Node);
                        if Children (1) = null then
                           Raise_Property_Exception
                             (Self_Node,
                              Property_Error'Identity,
                              "SyntheticTypeExpr.target_type cannot be null in synthetic"
                              & " nodes; add a nullable annotation to this"
                              & " field to allow it");
                        end if;
                  Initialize_Fields_For_Synthetic_Type_Expr
                    (Self => Result,
                     Synthetic_Type_Expr_F_Target_Type => Children (1));
               end;
            return Result;
         end Build;
            -------------
            -- Release --
            -------------
            overriding procedure Release (Self : in out Bare_Synthetic_Type_Expr_Node_Builder_Record) is
            begin
                     Dec_Ref (Self.Synthetic_Type_Expr_F_Target_Type);
            end Release;
         function Create_Bare_Synthetic_Type_Expr_Node_Builder
             (Synthetic_Type_Expr_F_Target_Type : Bare_Base_Type_Decl_Node_Builder)
           return Bare_Synthetic_Type_Expr_Node_Builder
         is
            Builder : constant Bare_Synthetic_Type_Expr_Node_Builder_Access := new Bare_Synthetic_Type_Expr_Node_Builder_Record;
         begin
            Builder.Ref_Count := 1;
               Builder.Synthetic_Type_Expr_F_Target_Type := Synthetic_Type_Expr_F_Target_Type;
                  Inc_Ref (Builder.Synthetic_Type_Expr_F_Target_Type);
            return Node_Builder_Type (Builder);
         end Create_Bare_Synthetic_Type_Expr_Node_Builder;
         type Bare_Synthetic_Formal_Param_Decl_Node_Builder_Record is new Node_Builder_Record with
            record
               Synthetic_Formal_Param_Decl_Param_Name : Symbol_Type;
               Synthetic_Formal_Param_Decl_F_Param_Type : Bare_Type_Expr_Node_Builder;
            end record;
         type Bare_Synthetic_Formal_Param_Decl_Node_Builder_Access is access all Bare_Synthetic_Formal_Param_Decl_Node_Builder_Record;
         overriding function Build
           (Self              : Bare_Synthetic_Formal_Param_Decl_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node;
            overriding procedure Release (Self : in out Bare_Synthetic_Formal_Param_Decl_Node_Builder_Record);
         -----------
         -- Build --
         -----------
         overriding function Build
           (Self              : Bare_Synthetic_Formal_Param_Decl_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node
         is
            Result : Bare_Ada_Node;
            Unit   : constant Internal_Unit := Self_Node.Unit;
            Env    : constant Lexical_Env :=
              (if Parent = null
               then Empty_Env
               else Parent.Self_Env);
         begin
            if Parent /= null and then Parent.Unit /= Unit then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic node parents must belong to the same unit as the"
                  & " nodes that trigger node synthetization");
            end if;
            if Is_Foreign_Strict (Env, Parent) then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic nodes cannot have foreign lexical envs");
            end if;
            Result := new Root_Node_Record
              (Ada_Synthetic_Formal_Param_Decl);
            Initialize
              (Self => Result,
               Kind => Ada_Synthetic_Formal_Param_Decl,
               Unit => Unit,
               Token_Start_Index => No_Token_Index,
               Token_End_Index   => No_Token_Index,
               Parent   => Parent,
               Self_Env => Env);
            Register_Destroyable (Unit, Result);
               declare
                  Children : array (1 .. 1)
                               of Bare_Ada_Node;
               begin
                     Children (1) :=
                       Self.Synthetic_Formal_Param_Decl_F_Param_Type.Build (Result, Self_Node);
                        if Children (1) = null then
                           Raise_Property_Exception
                             (Self_Node,
                              Property_Error'Identity,
                              "SyntheticFormalParamDecl.param_type cannot be null in synthetic"
                              & " nodes; add a nullable annotation to this"
                              & " field to allow it");
                        end if;
                  Initialize_Fields_For_Synthetic_Formal_Param_Decl
                    (Self => Result,
                     Synthetic_Formal_Param_Decl_F_Param_Type => Children (1));
               end;
               Result.Synthetic_Formal_Param_Decl_Param_Name :=
                  Self.Synthetic_Formal_Param_Decl_Param_Name;
            return Result;
         end Build;
            -------------
            -- Release --
            -------------
            overriding procedure Release (Self : in out Bare_Synthetic_Formal_Param_Decl_Node_Builder_Record) is
            begin
                     Dec_Ref (Self.Synthetic_Formal_Param_Decl_F_Param_Type);
            end Release;
         function Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder
             (Synthetic_Formal_Param_Decl_Param_Name : Symbol_Type;
               Synthetic_Formal_Param_Decl_F_Param_Type : Bare_Type_Expr_Node_Builder)
           return Bare_Synthetic_Formal_Param_Decl_Node_Builder
         is
            Builder : constant Bare_Synthetic_Formal_Param_Decl_Node_Builder_Access := new Bare_Synthetic_Formal_Param_Decl_Node_Builder_Record;
         begin
            Builder.Ref_Count := 1;
               Builder.Synthetic_Formal_Param_Decl_Param_Name := Synthetic_Formal_Param_Decl_Param_Name;
               Builder.Synthetic_Formal_Param_Decl_F_Param_Type := Synthetic_Formal_Param_Decl_F_Param_Type;
                  Inc_Ref (Builder.Synthetic_Formal_Param_Decl_F_Param_Type);
            return Node_Builder_Type (Builder);
         end Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder;
         type Bare_Synthetic_Subp_Decl_Node_Builder_Record is new Node_Builder_Record with
            record
               Synthetic_Subp_Decl_F_Spec : Bare_Base_Subp_Spec_Node_Builder;
            end record;
         type Bare_Synthetic_Subp_Decl_Node_Builder_Access is access all Bare_Synthetic_Subp_Decl_Node_Builder_Record;
         overriding function Build
           (Self              : Bare_Synthetic_Subp_Decl_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node;
            overriding procedure Release (Self : in out Bare_Synthetic_Subp_Decl_Node_Builder_Record);
         -----------
         -- Build --
         -----------
         overriding function Build
           (Self              : Bare_Synthetic_Subp_Decl_Node_Builder_Record;
            Parent, Self_Node : Bare_Ada_Node)
            return Bare_Ada_Node
         is
            Result : Bare_Ada_Node;
            Unit   : constant Internal_Unit := Self_Node.Unit;
            Env    : constant Lexical_Env :=
              (if Parent = null
               then Empty_Env
               else Parent.Self_Env);
         begin
            if Parent /= null and then Parent.Unit /= Unit then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic node parents must belong to the same unit as the"
                  & " nodes that trigger node synthetization");
            end if;
            if Is_Foreign_Strict (Env, Parent) then
               Raise_Property_Exception
                 (Self_Node,
                  Property_Error'Identity,
                  "synthetic nodes cannot have foreign lexical envs");
            end if;
            Result := new Root_Node_Record
              (Ada_Synthetic_Subp_Decl);
            Initialize
              (Self => Result,
               Kind => Ada_Synthetic_Subp_Decl,
               Unit => Unit,
               Token_Start_Index => No_Token_Index,
               Token_End_Index   => No_Token_Index,
               Parent   => Parent,
               Self_Env => Env);
            Register_Destroyable (Unit, Result);
               declare
                  Children : array (1 .. 1)
                               of Bare_Ada_Node;
               begin
                     Children (1) :=
                       Self.Synthetic_Subp_Decl_F_Spec.Build (Result, Self_Node);
                        if Children (1) = null then
                           Raise_Property_Exception
                             (Self_Node,
                              Property_Error'Identity,
                              "SyntheticSubpDecl.spec cannot be null in synthetic"
                              & " nodes; add a nullable annotation to this"
                              & " field to allow it");
                        end if;
                  Initialize_Fields_For_Synthetic_Subp_Decl
                    (Self => Result,
                     Synthetic_Subp_Decl_F_Spec => Children (1));
               end;
            return Result;
         end Build;
            -------------
            -- Release --
            -------------
            overriding procedure Release (Self : in out Bare_Synthetic_Subp_Decl_Node_Builder_Record) is
            begin
                     Dec_Ref (Self.Synthetic_Subp_Decl_F_Spec);
            end Release;
         function Create_Bare_Synthetic_Subp_Decl_Node_Builder
             (Synthetic_Subp_Decl_F_Spec : Bare_Base_Subp_Spec_Node_Builder)
           return Bare_Synthetic_Subp_Decl_Node_Builder
         is
            Builder : constant Bare_Synthetic_Subp_Decl_Node_Builder_Access := new Bare_Synthetic_Subp_Decl_Node_Builder_Record;
         begin
            Builder.Ref_Count := 1;
               Builder.Synthetic_Subp_Decl_F_Spec := Synthetic_Subp_Decl_F_Spec;
                  Inc_Ref (Builder.Synthetic_Subp_Decl_F_Spec);
            return Node_Builder_Type (Builder);
         end Create_Bare_Synthetic_Subp_Decl_Node_Builder;
   ----------------------
   -- Compare_Metadata --
   ----------------------
   --  Deactivate "not referenced" warnings because if the metadata struct has
   --  no fields, formals and temporaries won't be referenced in the two
   --  following functions.
   pragma Warnings (Off, "referenced");
   function Compare_Metadata (L, R : Internal_Metadata) return Boolean is
   begin
            if L.Primitive /= R.Primitive then
               return False;
            end if;
            if L.Primitive_Real_Type /= R.Primitive_Real_Type then
               return False;
            end if;
      return True;
   end Compare_Metadata;
   ----------
   -- Hash --
   ----------
   function Hash (Self : Internal_Metadata) return Hash_Type is
      Ret : Hash_Type := Langkit_Support.Hashes.Initial_Hash;
   begin
               Ret := Combine (Ret, Hash (Self.Primitive));
               Ret := Combine (Ret, Hash (Self.Primitive_Real_Type));
      return Ret;
   end Hash;
   pragma Warnings (On, "referenced");
   -------------
   -- Combine --
   -------------
   function Combine
     (L, R : Internal_Metadata) return Internal_Metadata
   is
      Ret : Internal_Metadata := No_Metadata;
   begin
         Ret.Dottable_Subp := L.Dottable_Subp or R.Dottable_Subp;
         if L.Primitive = No_Bare_Ada_Node then
            Ret.Primitive := R.Primitive;
         elsif R.Primitive = No_Bare_Ada_Node then
            Ret.Primitive := L.Primitive;
         else
            raise Property_Error with "Wrong combine for metadata field";
         end if;
         if L.Primitive_Real_Type = No_Bare_Ada_Node then
            Ret.Primitive_Real_Type := R.Primitive_Real_Type;
         elsif R.Primitive_Real_Type = No_Bare_Ada_Node then
            Ret.Primitive_Real_Type := L.Primitive_Real_Type;
         else
            raise Property_Error with "Wrong combine for metadata field";
         end if;
      return Ret;
   end Combine;
   -------------------------------
   -- Create_Static_Lexical_Env --
   -------------------------------
   function Create_Static_Lexical_Env
     (Parent            : Lexical_Env;
      Node              : Bare_Ada_Node;
      Sym_Table         : Symbol_Table;
      Transitive_Parent : Boolean := False) return Lexical_Env
   is
      Unit : constant Internal_Unit :=
        (if Node = null then null else Node.Unit);
   begin
      return Result : Lexical_Env := Create_Lexical_Env
        (Parent, Node, Transitive_Parent, Sym_Table, Convert_Unit (Unit))
      do
         if Unit /= null then
            Register_Destroyable (Unit, Unwrap (Result.Env));
         end if;
      end return;
   end Create_Static_Lexical_Env;
   ---------
   -- Get --
   ---------
   function Get
     (Self  : Bare_Ada_Node;
      A     : AST_Envs.Entity_Array;
      Index : Integer) return Internal_Entity
   is
      function Length (A : AST_Envs.Entity_Array) return Natural
      is (A'Length);
      function Get
        (A     : AST_Envs.Entity_Array;
         Index : Integer) return Internal_Entity
      is (A (Index + 1)); --  A is 1-based but Index is 0-based
      function Relative_Get is new Langkit_Support.Relative_Get
        (Item_Type     => Entity,
         Sequence_Type => AST_Envs.Entity_Array,
         Length        => Length,
         Get           => Get);
      Result : Internal_Entity;
   begin
      if Relative_Get (A, Index, Result) then
         return Result;
      else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "out-of-bounds array access");
      end if;
   end Get;
   -----------
   -- Group --
   -----------
   function Group
     (Envs   : Lexical_Env_Array_Access;
      Env_Md : Internal_Metadata := No_Metadata) return Lexical_Env
   is (Group (Lexical_Env_Array (Envs.Items), Env_Md));
      --
      --  Untyped wrappers for Bare_Ada_Node
      --
function Ada_Node_P_Resolve_Generic_Actual
  (E : Entity
  ) return Internal_Entity;
function Ada_Node_P_Use_Clauses_In_Spec_Of_Subp_Body
  (E : Entity
  ) return Lexical_Env;
function Ada_Node_P_Use_Clauses_In_Generic_Formal_Part
  (E : Entity
  ) return Lexical_Env;
function Ada_Node_P_Nested_Generic_Formal_Part
  (E : Entity
  ) return Lexical_Env;
      --
      --  Untyped wrappers for Bare_Base_Type_Decl
      --
function Base_Type_Decl_F_Direct_Primitive_Subps
  (E : Entity
  ) return Internal_Inner_Env_Assoc_Array_Access;
function Base_Type_Decl_P_Dottable_Subps
  (E : Entity
  ) return Internal_Inner_Env_Assoc_Array_Access;
      --
      --  Untyped wrappers for Bare_Type_Decl
      --
function Type_Decl_P_Refined_Parent_Primitives_Env
  (E : Entity
  ) return Lexical_Env;
      --
      --  Untyped wrappers for Bare_Body_Node
      --
function Body_Node_P_Subunit_Decl_Env
  (E : Entity
  ) return Lexical_Env;
function Body_Node_P_Body_Decl_Scope
  (E : Entity
  ) return Lexical_Env;
      --
      --  Untyped wrappers for Bare_Package_Body
      --
function Package_Body_P_Package_Decl_Use_Clauses_Envs
  (E : Entity
  ) return Lexical_Env;
      --
      --  Untyped wrappers for Bare_Task_Body
      --
function Task_Body_P_Task_Type_Decl_Scope
  (E : Entity
  ) return Lexical_Env;
      --
      --  Untyped wrappers for Bare_Generic_Instantiation
      --
function Generic_Instantiation_P_Instantiation_Bindings
  (E : Entity
  ) return Internal_Inner_Env_Assoc_Array_Access;
function Generic_Instantiation_P_Parent_Instantiation_Env
  (E : Entity
  ) return Lexical_Env;
      --
      --  Untyped wrappers for Bare_Name
      --
function Name_P_Name_Designated_Type_Env
  (E : Entity
  ) return Lexical_Env;
function Name_P_Use_Package_Name_Designated_Env
  (E : Entity
  ) return Lexical_Env;
   ------------------
   -- Children_Env --
   ------------------
   function Children_Env
     (Node   : Bare_Ada_Node;
      E_Info : Internal_Entity_Info := No_Entity_Info)
      return Lexical_Env
   is (Rebind_Env (Node.Self_Env, E_Info));
   --------------
   -- Node_Env --
   --------------
   function Node_Env
     (Node   : Bare_Ada_Node;
      E_Info : Internal_Entity_Info := No_Entity_Info)
      return Lexical_Env
   is
      function Get_Base_Env return Lexical_Env;
      --  Return the environment that we need to rebind before returning
      ------------------
      -- Get_Base_Env --
      ------------------
      function Get_Base_Env return Lexical_Env is
         pragma Warnings (Off, "referenced");
         function Get_Parent_Env return Lexical_Env;
         pragma Warnings (On, "referenced");
         --------------------
         -- Get_Parent_Env --
         --------------------
         function Get_Parent_Env return Lexical_Env is
            Parent : constant Lexical_Env := AST_Envs.Parent (Node.Self_Env);
         begin
            --  If Node is the root scope or the empty environment, Parent can
            --  be a wrapper around the null node. Turn this into the
            --  Empty_Env, as null envs are erroneous values in properties.
            return (if Unwrap (Parent) = null
                    then Empty_Env
                    else Parent);
         end Get_Parent_Env;
      begin
         return
           (if Node.Kind in Ada_Generic_Package_Internal | Ada_Package_Decl | Ada_Subtype_Decl | Ada_Incomplete_Type_Decl | Ada_Incomplete_Formal_Type_Decl | Ada_Incomplete_Tagged_Type_Decl | Ada_Protected_Type_Decl | Ada_Task_Type_Decl | Ada_Single_Task_Type_Decl | Ada_Concrete_Type_Decl | Ada_Formal_Type_Decl | Ada_Abstract_Subp_Decl | Ada_Abstract_Formal_Subp_Decl | Ada_Concrete_Formal_Subp_Decl | Ada_Subp_Decl | Ada_Entry_Decl | Ada_Enum_Literal_Decl | Ada_Synthetic_Char_Enum_Lit | Ada_Generic_Subp_Internal | Ada_Synthetic_Subp_Decl | Ada_Expr_Function | Ada_Null_Subp_Decl | Ada_Subp_Body | Ada_Subp_Renaming_Decl | Ada_Package_Body_Stub | Ada_Protected_Body_Stub | Ada_Subp_Body_Stub | Ada_Task_Body_Stub | Ada_Entry_Body | Ada_Package_Body | Ada_Protected_Body | Ada_Task_Body | Ada_Exception_Handler | Ada_Generic_Package_Decl | Ada_Generic_Subp_Decl | Ada_Generic_Package_Instantiation | Ada_Generic_Subp_Instantiation | Ada_Generic_Package_Renaming_Decl | Ada_Generic_Subp_Renaming_Decl | Ada_Package_Renaming_Decl | Ada_Single_Protected_Decl | Ada_Single_Task_Decl | Ada_Private_Part | Ada_Decl_Expr | Ada_Quantified_Expr | Ada_Accept_Stmt | Ada_Accept_Stmt_With_Stmts | Ada_For_Loop_Stmt | Ada_Begin_Block | Ada_Decl_Block | Ada_Extended_Return_Stmt | Ada_Named_Stmt | Ada_Access_To_Subp_Def
            then Get_Parent_Env
            else Node.Self_Env);
      end Get_Base_Env;
      Base_Env : Lexical_Env := Get_Base_Env;
      Result   : constant Lexical_Env := Rebind_Env (Base_Env, E_Info);
   begin
      Dec_Ref (Base_Env);
      return Result;
   end Node_Env;
   ------------
   -- Parent --
   ------------
   function Parent
     (Node   : Bare_Ada_Node;
      E_Info : Internal_Entity_Info := No_Entity_Info)
      return Internal_Entity is
   begin
      --  TODO: shed entity information as appropriate
      return (Node.Parent, E_Info);
   end Parent;
   -------------
   -- Parents --
   -------------
   function Parents
     (Node      : Bare_Ada_Node;
      With_Self : Boolean := True;
      E_Info    : Internal_Entity_Info := No_Entity_Info)
      return Internal_Entity_Array_Access
   is
      Bare_Parents : Bare_Ada_Node_Array_Access := Parents (Node, With_Self);
      Result       : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (Bare_Parents.N);
   begin
      --  TODO: shed entity information as appropriate
      for I in Bare_Parents.Items'Range loop
         Result.Items (I) := (Bare_Parents.Items (I), E_Info);
      end loop;
      Dec_Ref (Bare_Parents);
      return Result;
   end Parents;
   --------------
   -- Children --
   --------------
   function Children
     (Node   : Bare_Ada_Node;
      E_Info : Internal_Entity_Info := No_Entity_Info)
      return Internal_Entity_Array_Access
   is
      Bare_Children : Bare_Ada_Node_Array_Access := Children (Node);
      Result        : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (Bare_Children.N);
   begin
      --  TODO: shed entity information as appropriate
      for I in Bare_Children.Items'Range loop
         Result.Items (I) := (Bare_Children.Items (I), E_Info);
      end loop;
      Dec_Ref (Bare_Children);
      return Result;
   end Children;
   ---------------------
   -- New_Unit_String --
   ---------------------
   function New_Unit_String
     (Unit : Internal_Unit; Str : String) return String_Access
   is
      procedure Register_Destroyable_String is new Register_Destroyable_Gen
        (String, String_Access, Free);
   begin
      return Ret : String_Access := new String'(Str) do
         Register_Destroyable_String (Unit, Ret);
      end return;
   end New_Unit_String;
   --------------------------------
   -- Assign_Names_To_Logic_Vars --
   --------------------------------
   procedure Assign_Names_To_Logic_Vars (Node : Bare_Ada_Node) is
      pragma Warnings (Off, "referenced");
      procedure Assign
        (Node  : Bare_Ada_Node;
         LV    : in out Logic_Var_Record;
         Field : String);
      --  Assign a name to the LV logic variable. Node must be the node that
      --  owns LV, and Field must be the name of the field in Node that holds
      --  LV.
      ------------
      -- Assign --
      ------------
      procedure Assign
        (Node  : Bare_Ada_Node;
         LV    : in out Logic_Var_Record;
         Field : String) is
      begin
         LV.Dbg_Name :=
           new String'(Image (Short_Text_Image (Node)) & "." & Field);
      end Assign;
      K : constant Ada_Node_Kind_Type := Node.Kind;
      pragma Warnings (On, "referenced");
   begin
      case Ada_Ada_Node (K) is
when Ada_Attribute_Ref_Range =>
declare
N_Bare_Attribute_Ref : constant Bare_Attribute_Ref := Node;
begin
Assign (N_Bare_Attribute_Ref,        N_Bare_Attribute_Ref.Attribute_Ref_R_Ref_Var,        "r_ref_var");
end;
when Ada_Call_Expr_Range =>
declare
N_Bare_Call_Expr : constant Bare_Call_Expr := Node;
begin
Assign (N_Bare_Call_Expr,        N_Bare_Call_Expr.Call_Expr_R_Called_Spec,        "r_called_spec");
end;
when Ada_Explicit_Deref_Range =>
declare
N_Bare_Explicit_Deref : constant Bare_Explicit_Deref := Node;
begin
Assign (N_Bare_Explicit_Deref,        N_Bare_Explicit_Deref.Explicit_Deref_R_Called_Spec,        "r_called_spec");
end;
when Ada_Reduce_Attribute_Ref_Range =>
declare
N_Bare_Reduce_Attribute_Ref : constant Bare_Reduce_Attribute_Ref := Node;
begin
Assign (N_Bare_Reduce_Attribute_Ref,        N_Bare_Reduce_Attribute_Ref.Reduce_Attribute_Ref_R_Ref_Var,        "r_ref_var");
end;
when Ada_Target_Name_Range =>
declare
N_Bare_Target_Name : constant Bare_Target_Name := Node;
begin
Assign (N_Bare_Target_Name,        N_Bare_Target_Name.Target_Name_R_Ref_Var,        "r_ref_var");
end;
when Ada_Update_Attribute_Ref_Range =>
declare
N_Bare_Update_Attribute_Ref : constant Bare_Update_Attribute_Ref := Node;
begin
Assign (N_Bare_Update_Attribute_Ref,        N_Bare_Update_Attribute_Ref.Update_Attribute_Ref_R_Ref_Var,        "r_ref_var");
end;
when others => null;
end case;
      for Child of Internal_Bare_Ada_Node_Array'(Children (Node)) loop
         if Child /= null then
            Assign_Names_To_Logic_Vars (Child);
         end if;
      end loop;
   end Assign_Names_To_Logic_Vars;
   --------------------------
   -- Initialization_Error --
   --------------------------
   function Initialization_Error
     (Exc : Ada.Exceptions.Exception_Occurrence)
      return Error_Initialization_State
   is
      use Ada.Exceptions;
   begin
      if
            Exception_Identity (Exc) = Precondition_Failure'Identity
         then
            return Raised_Precondition_Failure;
         elsif
            Exception_Identity (Exc) = Property_Error'Identity
         then
            return Raised_Property_Error;
      else
         raise Program_Error;
      end if;
   end Initialization_Error;
   ----------------------------------
   -- Reraise_Initialization_Error --
   ----------------------------------
   procedure Reraise_Initialization_Error
     (Node    : Bare_Ada_Node;
      State   : Error_Initialization_State;
      Message : String)
   is
      Exc : Ada.Exceptions.Exception_Id;
   begin
      case State is
            when Raised_Precondition_Failure =>
               Exc := Precondition_Failure'Identity;
            when Raised_Property_Error =>
               Exc := Property_Error'Identity;
      end case;
      Raise_Property_Exception (Node, Exc, Message);
   end Reraise_Initialization_Error;
   ----------------
   -- Text_Image --
   ----------------
   function Text_Image (Ent : Internal_Entity) return Text_Type is
   begin
      if Ent.Node /= null then
         declare
            Node_Image : constant Text_Type := Short_Text_Image (Ent.Node);
         begin
            return
            (if Ent.Info.Rebindings /= null
             then "<| "
             & Node_Image (Node_Image'First + 1 .. Node_Image'Last - 1) & " "
             & AST_Envs.Text_Image (Ent.Info.Rebindings) & " |>"
             else Node_Image);
         end;
      else
         return "None";
      end if;
   end Text_Image;
   ---------------------
   -- Full_Sloc_Image --
   ---------------------
   function Full_Sloc_Image (Node : Bare_Ada_Node) return String_Type
   is
      Res      : constant Text_Type :=
        To_Text
          (Ada.Directories.Simple_Name
             (Get_Filename (Unit (Node))))
           & ":" & To_Text (Image (Start_Sloc (Sloc_Range (Node)))) & ": ";
   begin
      return Create_String (Res);
   end Full_Sloc_Image;
   -----------
   -- Image --
   -----------
   function Image (Ent : Internal_Entity) return String is
      Result : constant Text_Type := Text_Image (Ent);
   begin
      return Image (Result);
   end Image;
   ---------------
   -- Can_Reach --
   ---------------
   function Can_Reach (El, From : Bare_Ada_Node) return Boolean is
   begin
      return Ada_Node_P_Can_Reach (El, From);
   end Can_Reach;
   -----------------
   -- Hash_Entity --
   -----------------
   function Hash_Entity (Self : Internal_Entity) return Hash_Type is
   begin
      return Combine
        ((Hash (Self.Node), Hash (Self.Info.Rebindings), Hash (Self.Info.Md)));
   end Hash_Entity;
   --------------------
   -- Compare_Entity --
   --------------------
   function Compare_Entity (Left, Right : Internal_Entity) return Boolean
   is
   begin
      return Left.Node = Right.Node
             and then Left.Info.Rebindings = Right.Info.Rebindings
             and then Compare_Metadata (Left.Info.Md, Right.Info.Md);
   end Compare_Entity;
   --------------------------------
   -- Create_Dynamic_Lexical_Env --
   --------------------------------
   function Create_Dynamic_Lexical_Env
     (Self              : Bare_Ada_Node;
      Assocs_Getter     : Inner_Env_Assocs_Resolver;
      Assoc_Resolver    : Entity_Resolver;
      Transitive_Parent : Boolean;
      Sym_Table         : Symbol_Table) return Lexical_Env
   is
      Unit : constant Internal_Unit := Self.Unit;
   begin
      --  This restriction is necessary to avoid relocation issues when
      --  Self.Self_Env is terminated.
      if Is_Foreign_Strict (Self.Self_Env, Self) then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "cannot create a dynamic lexical env when Self.Self_Env is"
            & " foreign");
      end if;
      return Result : constant Lexical_Env := Create_Dynamic_Lexical_Env
        (Parent            => Null_Lexical_Env,
         Node              => Self,
         Transitive_Parent => Transitive_Parent,
         Owner             => Convert_Unit (Unit),
         Assocs_Getter     => Assocs_Getter,
         Assoc_Resolver    => Assoc_Resolver,
         Sym_Table         => Sym_Table)
      do
         --  Since dynamic lexical environments can only be created in lazy
         --  field initializers, it is fine to tie Result's lifetime to the
         --  its owning unit's lifetime.
         Register_Destroyable (Unit, Unwrap (Result));
      end return;
   end Create_Dynamic_Lexical_Env;
   procedure Destroy_Synthetic_Node (Node : in out Bare_Ada_Node);
   --  Helper for the Register_Destroyable above
   ------------
   -- Length --
   ------------
   function Length (Node : Bare_Ada_List) return Natural
   is (if Node = null then 0 else Children_Count (Node));
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (B : Boolean) return String is
      begin
         return (if B then "True" else "False");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (I : Integer) return String is
      begin
         return Integer'Image (I);
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (S : Symbol_Type) return String is
      begin
         return (if S = No_Symbol
                 then "None"
                 else Image (S, With_Quotes => True));
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (C : Character_Type) return String is
         C_Str : constant Text_Type := (1 => C);
      begin
         return "'" & Image (C_Str) & "'";
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (S : String_Type) return String is
      begin
         return Image (S.Content, With_Quotes => True);
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (Env : Lexical_Env) return String is
      begin
         case Env.Kind is
         when Static_Primary =>
            return "<LexicalEnv static-primary for "
                   & Trace_Image (Env_Node (Env)) & ">";
         when others =>
            return "<LexicalEnv synthetic>";
         end case;
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (R : Env_Rebindings) return String is
      begin
         return Image (Text_Image (R));
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (Unit : Internal_Unit) return String is
      begin
         return "Internal_Unit (""" & Basename (Unit) & """)";
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (Eq : Logic_Equation) return String is
         pragma Unreferenced (Eq);
      begin
         return "<LogicEquation>";
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (Var : Logic_Var) return String is
         pragma Unreferenced (Var);
      begin
         return "<LogicVariable>";
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (K : Analysis_Unit_Kind) return String is
      begin
         return Analysis_Unit_Kind'Image (K);
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image (Self : Ref_Categories) return String is
         Result : Unbounded_String;
         First  : Boolean := True;
      begin
         Append (Result, "RefCategories(");
         for C in Ref_Category loop
            if Self (C) then
               if First then
                  First := False;
               else
                  Append (Result, ", ");
               end if;
               Append (Result, C'Image);
            end if;
         end loop;
         Append (Result, ")");
         return To_String (Result);
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Metadata) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Dottable_Subp => " & Trace_Image (R.Dottable_Subp)
                        & ", "
                     & "Primitive => " & Trace_Image (R.Primitive)
                        & ", "
                     & "Primitive_Real_Type => " & Trace_Image (R.Primitive_Real_Type)
               & ")");
      end Trace_Image;
      ----------
      -- Hash --
      ----------
      pragma Warnings (Off, "referenced");
      function Hash (R : Internal_Entity_Info) return Hash_Type is
         pragma Warnings (On, "referenced");
      begin
            return Combine ((Hash (R.Md), Hash (R.Rebindings), Hash (R.From_Rebound)));
      end Hash;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Info) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Md => " & Trace_Image (R.Md)
                        & ", "
                     & "Rebindings => " & Trace_Image (R.Rebindings)
                        & ", "
                     & "From_Rebound => " & Trace_Image (R.From_Rebound)
               & ")");
      end Trace_Image;
      function Create_Internal_Entity
        (Node : Bare_Ada_Node; Info : Internal_Entity_Info)
         return Internal_Entity is
      begin
         if Node = null then
            return No_Entity;
         end if;
         return (Node => Node, Info => Info);
      end;
      ----------
      -- Hash --
      ----------
      pragma Warnings (Off, "referenced");
      function Hash (R : Internal_Entity) return Hash_Type is
         pragma Warnings (On, "referenced");
      begin
            return Combine
              (Hash (R.Node), Hash (R.Info));
      end Hash;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Expr
        (Node : Bare_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Expr is
      begin
         if Node = null then
            return No_Entity_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      ----------
      -- Hash --
      ----------
      pragma Warnings (Off, "referenced");
      function Hash (R : Internal_Entity_Expr) return Hash_Type is
         pragma Warnings (On, "referenced");
      begin
            return Combine
              (Hash (R.Node), Hash (R.Info));
      end Hash;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      ----------
      -- Hash --
      ----------
      pragma Warnings (Off, "referenced");
      function Hash (R : Internal_Aspect) return Hash_Type is
         pragma Warnings (On, "referenced");
      begin
            return Combine ((Hash (R.Exists), Hash (R.Node), Hash (R.Value), Hash (R.Inherited)));
      end Hash;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Aspect) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Exists => " & Trace_Image (R.Exists)
                        & ", "
                     & "Node => " & Trace_Image (R.Node)
                        & ", "
                     & "Value => " & Trace_Image (R.Value)
                        & ", "
                     & "Inherited => " & Trace_Image (R.Inherited)
               & ")");
      end Trace_Image;
      function Create_Internal_Entity_Basic_Decl
        (Node : Bare_Basic_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Basic_Decl is
      begin
         if Node = null then
            return No_Entity_Basic_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      ----------
      -- Hash --
      ----------
      pragma Warnings (Off, "referenced");
      function Hash (R : Internal_Entity_Basic_Decl) return Hash_Type is
         pragma Warnings (On, "referenced");
      begin
            return Combine
              (Hash (R.Node), Hash (R.Info));
      end Hash;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Basic_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Completion_Item) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Decl => " & Trace_Image (R.Decl)
                        & ", "
                     & "Is_Dot_Call => " & Trace_Image (R.Is_Dot_Call)
                        & ", "
                     & "Is_Visible => " & Trace_Image (R.Is_Visible)
                        & ", "
                     & "Weight => " & Trace_Image (R.Weight)
               & ")");
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_Designated_Env) is
      begin
               Inc_Ref (R.Direct_Env);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_Designated_Env) is
      begin
               Dec_Ref (R.Direct_Env);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_Designated_Env) return Boolean is
      begin
         return L.Kind = R.Kind and then L.Env_Name = R.Env_Name and then Equivalent (L.Direct_Env, R.Direct_Env);
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Designated_Env) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Kind => " & Trace_Image (R.Kind)
                        & ", "
                     & "Env_Name => " & Trace_Image (R.Env_Name)
                        & ", "
                     & "Direct_Env => " & Trace_Image (R.Direct_Env)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Discrete_Range) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Low_Bound => " & Trace_Image (R.Low_Bound)
                        & ", "
                     & "High_Bound => " & Trace_Image (R.High_Bound)
               & ")");
      end Trace_Image;
      function Create_Internal_Entity_Ada_List
        (Node : Bare_Ada_List; Info : Internal_Entity_Info)
         return Internal_Entity_Ada_List is
      begin
         if Node = null then
            return No_Entity_Ada_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Ada_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Ada_Node_List
        (Node : Bare_Ada_Node_List; Info : Internal_Entity_Info)
         return Internal_Entity_Ada_Node_List is
      begin
         if Node = null then
            return No_Entity_Ada_Node_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Ada_Node_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Alternatives_List
        (Node : Bare_Alternatives_List; Info : Internal_Entity_Info)
         return Internal_Entity_Alternatives_List is
      begin
         if Node = null then
            return No_Entity_Alternatives_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Alternatives_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Name
        (Node : Bare_Name; Info : Internal_Entity_Info)
         return Internal_Entity_Name is
      begin
         if Node = null then
            return No_Entity_Name;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Name) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Single_Tok_Node
        (Node : Bare_Single_Tok_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Single_Tok_Node is
      begin
         if Node = null then
            return No_Entity_Single_Tok_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Single_Tok_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Id
        (Node : Bare_Base_Id; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Id is
      begin
         if Node = null then
            return No_Entity_Base_Id;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Id) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Identifier
        (Node : Bare_Identifier; Info : Internal_Entity_Info)
         return Internal_Entity_Identifier is
      begin
         if Node = null then
            return No_Entity_Identifier;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Identifier) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Discriminant_Values) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Discriminant => " & Trace_Image (R.Discriminant)
                        & ", "
                     & "Values => " & Trace_Image (R.Values)
               & ")");
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_Doc_Annotation) is
      begin
               Inc_Ref (R.Key);
               Inc_Ref (R.Value);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_Doc_Annotation) is
      begin
               Dec_Ref (R.Key);
               Dec_Ref (R.Value);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_Doc_Annotation) return Boolean is
      begin
         return Equivalent (L.Key, R.Key) and then Equivalent (L.Value, R.Value);
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Doc_Annotation) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Key => " & Trace_Image (R.Key)
                        & ", "
                     & "Value => " & Trace_Image (R.Value)
               & ")");
      end Trace_Image;
      function Create_Internal_Entity_Abort_Node
        (Node : Bare_Abort_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Abort_Node is
      begin
         if Node = null then
            return No_Entity_Abort_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abort_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abort_Absent
        (Node : Bare_Abort_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Abort_Absent is
      begin
         if Node = null then
            return No_Entity_Abort_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abort_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abort_Present
        (Node : Bare_Abort_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Abort_Present is
      begin
         if Node = null then
            return No_Entity_Abort_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abort_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Stmt
        (Node : Bare_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Stmt is
      begin
         if Node = null then
            return No_Entity_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Simple_Stmt
        (Node : Bare_Simple_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Simple_Stmt is
      begin
         if Node = null then
            return No_Entity_Simple_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Simple_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abort_Stmt
        (Node : Bare_Abort_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Abort_Stmt is
      begin
         if Node = null then
            return No_Entity_Abort_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abort_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abstract_Node
        (Node : Bare_Abstract_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Abstract_Node is
      begin
         if Node = null then
            return No_Entity_Abstract_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abstract_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abstract_Absent
        (Node : Bare_Abstract_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Abstract_Absent is
      begin
         if Node = null then
            return No_Entity_Abstract_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abstract_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Basic_Subp_Decl
        (Node : Bare_Basic_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Basic_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Basic_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Basic_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Classic_Subp_Decl
        (Node : Bare_Classic_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Classic_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Classic_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Classic_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Formal_Subp_Decl
        (Node : Bare_Formal_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Formal_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Formal_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Formal_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abstract_Formal_Subp_Decl
        (Node : Bare_Abstract_Formal_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Abstract_Formal_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Abstract_Formal_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abstract_Formal_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abstract_Present
        (Node : Bare_Abstract_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Abstract_Present is
      begin
         if Node = null then
            return No_Entity_Abstract_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abstract_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abstract_State_Decl
        (Node : Bare_Abstract_State_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Abstract_State_Decl is
      begin
         if Node = null then
            return No_Entity_Abstract_State_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abstract_State_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abstract_State_Decl_Expr
        (Node : Bare_Abstract_State_Decl_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Abstract_State_Decl_Expr is
      begin
         if Node = null then
            return No_Entity_Abstract_State_Decl_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abstract_State_Decl_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abstract_State_Decl_List
        (Node : Bare_Abstract_State_Decl_List; Info : Internal_Entity_Info)
         return Internal_Entity_Abstract_State_Decl_List is
      begin
         if Node = null then
            return No_Entity_Abstract_State_Decl_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abstract_State_Decl_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Abstract_Subp_Decl
        (Node : Bare_Abstract_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Abstract_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Abstract_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Abstract_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Composite_Stmt
        (Node : Bare_Composite_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Composite_Stmt is
      begin
         if Node = null then
            return No_Entity_Composite_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Composite_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Accept_Stmt
        (Node : Bare_Accept_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Accept_Stmt is
      begin
         if Node = null then
            return No_Entity_Accept_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Accept_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Body_Node
        (Node : Bare_Body_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Body_Node is
      begin
         if Node = null then
            return No_Entity_Body_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Body_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Accept_Stmt_Body
        (Node : Bare_Accept_Stmt_Body; Info : Internal_Entity_Info)
         return Internal_Entity_Accept_Stmt_Body is
      begin
         if Node = null then
            return No_Entity_Accept_Stmt_Body;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Accept_Stmt_Body) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Accept_Stmt_With_Stmts
        (Node : Bare_Accept_Stmt_With_Stmts; Info : Internal_Entity_Info)
         return Internal_Entity_Accept_Stmt_With_Stmts is
      begin
         if Node = null then
            return No_Entity_Accept_Stmt_With_Stmts;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Accept_Stmt_With_Stmts) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Type_Def
        (Node : Bare_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Type_Def is
      begin
         if Node = null then
            return No_Entity_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Access_Def
        (Node : Bare_Access_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Access_Def is
      begin
         if Node = null then
            return No_Entity_Access_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Access_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Access_To_Subp_Def
        (Node : Bare_Access_To_Subp_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Access_To_Subp_Def is
      begin
         if Node = null then
            return No_Entity_Access_To_Subp_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Access_To_Subp_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Aggregate
        (Node : Bare_Base_Aggregate; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Aggregate is
      begin
         if Node = null then
            return No_Entity_Base_Aggregate;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Aggregate) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aggregate
        (Node : Bare_Aggregate; Info : Internal_Entity_Info)
         return Internal_Entity_Aggregate is
      begin
         if Node = null then
            return No_Entity_Aggregate;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aggregate) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Basic_Assoc
        (Node : Bare_Basic_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Basic_Assoc is
      begin
         if Node = null then
            return No_Entity_Basic_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Basic_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aggregate_Assoc
        (Node : Bare_Aggregate_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Aggregate_Assoc is
      begin
         if Node = null then
            return No_Entity_Aggregate_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aggregate_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aliased_Node
        (Node : Bare_Aliased_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Aliased_Node is
      begin
         if Node = null then
            return No_Entity_Aliased_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aliased_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aliased_Absent
        (Node : Bare_Aliased_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Aliased_Absent is
      begin
         if Node = null then
            return No_Entity_Aliased_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aliased_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aliased_Present
        (Node : Bare_Aliased_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Aliased_Present is
      begin
         if Node = null then
            return No_Entity_Aliased_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aliased_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_All_Node
        (Node : Bare_All_Node; Info : Internal_Entity_Info)
         return Internal_Entity_All_Node is
      begin
         if Node = null then
            return No_Entity_All_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_All_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_All_Absent
        (Node : Bare_All_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_All_Absent is
      begin
         if Node = null then
            return No_Entity_All_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_All_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_All_Present
        (Node : Bare_All_Present; Info : Internal_Entity_Info)
         return Internal_Entity_All_Present is
      begin
         if Node = null then
            return No_Entity_All_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_All_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Allocator
        (Node : Bare_Allocator; Info : Internal_Entity_Info)
         return Internal_Entity_Allocator is
      begin
         if Node = null then
            return No_Entity_Allocator;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Allocator) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Anonymous_Expr_Decl
        (Node : Bare_Anonymous_Expr_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Anonymous_Expr_Decl is
      begin
         if Node = null then
            return No_Entity_Anonymous_Expr_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Anonymous_Expr_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Type_Expr
        (Node : Bare_Type_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Type_Expr is
      begin
         if Node = null then
            return No_Entity_Type_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Type_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Anonymous_Type
        (Node : Bare_Anonymous_Type; Info : Internal_Entity_Info)
         return Internal_Entity_Anonymous_Type is
      begin
         if Node = null then
            return No_Entity_Anonymous_Type;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Anonymous_Type) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Type_Access_Def
        (Node : Bare_Base_Type_Access_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Type_Access_Def is
      begin
         if Node = null then
            return No_Entity_Base_Type_Access_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Type_Access_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Anonymous_Type_Access_Def
        (Node : Bare_Anonymous_Type_Access_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Anonymous_Type_Access_Def is
      begin
         if Node = null then
            return No_Entity_Anonymous_Type_Access_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Anonymous_Type_Access_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Type_Decl
        (Node : Bare_Base_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Base_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      ----------
      -- Hash --
      ----------
      pragma Warnings (Off, "referenced");
      function Hash (R : Internal_Entity_Base_Type_Decl) return Hash_Type is
         pragma Warnings (On, "referenced");
      begin
            return Combine
              (Hash (R.Node), Hash (R.Info));
      end Hash;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Type_Decl
        (Node : Bare_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Anonymous_Type_Decl
        (Node : Bare_Anonymous_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Anonymous_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Anonymous_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Anonymous_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Array_Indices
        (Node : Bare_Array_Indices; Info : Internal_Entity_Info)
         return Internal_Entity_Array_Indices is
      begin
         if Node = null then
            return No_Entity_Array_Indices;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Array_Indices) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Array_Subcomponent_Choice_Name
        (Node : Bare_Array_Subcomponent_Choice_Name; Info : Internal_Entity_Info)
         return Internal_Entity_Array_Subcomponent_Choice_Name is
      begin
         if Node = null then
            return No_Entity_Array_Subcomponent_Choice_Name;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Array_Subcomponent_Choice_Name) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Array_Type_Def
        (Node : Bare_Array_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Array_Type_Def is
      begin
         if Node = null then
            return No_Entity_Array_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Array_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aspect_Assoc
        (Node : Bare_Aspect_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Aspect_Assoc is
      begin
         if Node = null then
            return No_Entity_Aspect_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aspect_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aspect_Assoc_List
        (Node : Bare_Aspect_Assoc_List; Info : Internal_Entity_Info)
         return Internal_Entity_Aspect_Assoc_List is
      begin
         if Node = null then
            return No_Entity_Aspect_Assoc_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aspect_Assoc_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aspect_Clause
        (Node : Bare_Aspect_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Aspect_Clause is
      begin
         if Node = null then
            return No_Entity_Aspect_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aspect_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Aspect_Spec
        (Node : Bare_Aspect_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Aspect_Spec is
      begin
         if Node = null then
            return No_Entity_Aspect_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Aspect_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Assign_Stmt
        (Node : Bare_Assign_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Assign_Stmt is
      begin
         if Node = null then
            return No_Entity_Assign_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Assign_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Basic_Assoc_List
        (Node : Bare_Basic_Assoc_List; Info : Internal_Entity_Info)
         return Internal_Entity_Basic_Assoc_List is
      begin
         if Node = null then
            return No_Entity_Basic_Assoc_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Basic_Assoc_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Assoc_List
        (Node : Bare_Assoc_List; Info : Internal_Entity_Info)
         return Internal_Entity_Assoc_List is
      begin
         if Node = null then
            return No_Entity_Assoc_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Assoc_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_At_Clause
        (Node : Bare_At_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_At_Clause is
      begin
         if Node = null then
            return No_Entity_At_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_At_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Attribute_Def_Clause
        (Node : Bare_Attribute_Def_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Attribute_Def_Clause is
      begin
         if Node = null then
            return No_Entity_Attribute_Def_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Attribute_Def_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Attribute_Ref
        (Node : Bare_Attribute_Ref; Info : Internal_Entity_Info)
         return Internal_Entity_Attribute_Ref is
      begin
         if Node = null then
            return No_Entity_Attribute_Ref;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Attribute_Ref) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Assoc
        (Node : Bare_Base_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Assoc is
      begin
         if Node = null then
            return No_Entity_Base_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Assoc_List
        (Node : Bare_Base_Assoc_List; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Assoc_List is
      begin
         if Node = null then
            return No_Entity_Base_Assoc_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Assoc_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Formal_Param_Decl
        (Node : Bare_Base_Formal_Param_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Formal_Param_Decl is
      begin
         if Node = null then
            return No_Entity_Base_Formal_Param_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Formal_Param_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Formal_Param_Holder
        (Node : Bare_Base_Formal_Param_Holder; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Formal_Param_Holder is
      begin
         if Node = null then
            return No_Entity_Base_Formal_Param_Holder;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Formal_Param_Holder) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Loop_Stmt
        (Node : Bare_Base_Loop_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Loop_Stmt is
      begin
         if Node = null then
            return No_Entity_Base_Loop_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Loop_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Package_Decl
        (Node : Bare_Base_Package_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Package_Decl is
      begin
         if Node = null then
            return No_Entity_Base_Package_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Package_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Record_Def
        (Node : Bare_Base_Record_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Record_Def is
      begin
         if Node = null then
            return No_Entity_Base_Record_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Record_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Subp_Body
        (Node : Bare_Base_Subp_Body; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Subp_Body is
      begin
         if Node = null then
            return No_Entity_Base_Subp_Body;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Subp_Body) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Subp_Spec
        (Node : Bare_Base_Subp_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Subp_Spec is
      begin
         if Node = null then
            return No_Entity_Base_Subp_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Subp_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Base_Subtype_Decl
        (Node : Bare_Base_Subtype_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Base_Subtype_Decl is
      begin
         if Node = null then
            return No_Entity_Base_Subtype_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Base_Subtype_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Block_Stmt
        (Node : Bare_Block_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Block_Stmt is
      begin
         if Node = null then
            return No_Entity_Block_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Block_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Begin_Block
        (Node : Bare_Begin_Block; Info : Internal_Entity_Info)
         return Internal_Entity_Begin_Block is
      begin
         if Node = null then
            return No_Entity_Begin_Block;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Begin_Block) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Bin_Op
        (Node : Bare_Bin_Op; Info : Internal_Entity_Info)
         return Internal_Entity_Bin_Op is
      begin
         if Node = null then
            return No_Entity_Bin_Op;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Bin_Op) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Body_Stub
        (Node : Bare_Body_Stub; Info : Internal_Entity_Info)
         return Internal_Entity_Body_Stub is
      begin
         if Node = null then
            return No_Entity_Body_Stub;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Body_Stub) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Box_Expr
        (Node : Bare_Box_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Box_Expr is
      begin
         if Node = null then
            return No_Entity_Box_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Box_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Bracket_Aggregate
        (Node : Bare_Bracket_Aggregate; Info : Internal_Entity_Info)
         return Internal_Entity_Bracket_Aggregate is
      begin
         if Node = null then
            return No_Entity_Bracket_Aggregate;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Bracket_Aggregate) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Delta_Aggregate
        (Node : Bare_Delta_Aggregate; Info : Internal_Entity_Info)
         return Internal_Entity_Delta_Aggregate is
      begin
         if Node = null then
            return No_Entity_Delta_Aggregate;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Delta_Aggregate) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Bracket_Delta_Aggregate
        (Node : Bare_Bracket_Delta_Aggregate; Info : Internal_Entity_Info)
         return Internal_Entity_Bracket_Delta_Aggregate is
      begin
         if Node = null then
            return No_Entity_Bracket_Delta_Aggregate;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Bracket_Delta_Aggregate) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Call_Expr
        (Node : Bare_Call_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Call_Expr is
      begin
         if Node = null then
            return No_Entity_Call_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Call_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Call_Stmt
        (Node : Bare_Call_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Call_Stmt is
      begin
         if Node = null then
            return No_Entity_Call_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Call_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Cond_Expr
        (Node : Bare_Cond_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Cond_Expr is
      begin
         if Node = null then
            return No_Entity_Cond_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Cond_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Case_Expr
        (Node : Bare_Case_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Case_Expr is
      begin
         if Node = null then
            return No_Entity_Case_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Case_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Case_Expr_Alternative
        (Node : Bare_Case_Expr_Alternative; Info : Internal_Entity_Info)
         return Internal_Entity_Case_Expr_Alternative is
      begin
         if Node = null then
            return No_Entity_Case_Expr_Alternative;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Case_Expr_Alternative) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Case_Expr_Alternative_List
        (Node : Bare_Case_Expr_Alternative_List; Info : Internal_Entity_Info)
         return Internal_Entity_Case_Expr_Alternative_List is
      begin
         if Node = null then
            return No_Entity_Case_Expr_Alternative_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Case_Expr_Alternative_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Case_Stmt
        (Node : Bare_Case_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Case_Stmt is
      begin
         if Node = null then
            return No_Entity_Case_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Case_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Case_Stmt_Alternative
        (Node : Bare_Case_Stmt_Alternative; Info : Internal_Entity_Info)
         return Internal_Entity_Case_Stmt_Alternative is
      begin
         if Node = null then
            return No_Entity_Case_Stmt_Alternative;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Case_Stmt_Alternative) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Case_Stmt_Alternative_List
        (Node : Bare_Case_Stmt_Alternative_List; Info : Internal_Entity_Info)
         return Internal_Entity_Case_Stmt_Alternative_List is
      begin
         if Node = null then
            return No_Entity_Case_Stmt_Alternative_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Case_Stmt_Alternative_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Char_Literal
        (Node : Bare_Char_Literal; Info : Internal_Entity_Info)
         return Internal_Entity_Char_Literal is
      begin
         if Node = null then
            return No_Entity_Char_Literal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Char_Literal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Classwide_Type_Decl
        (Node : Bare_Classwide_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Classwide_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Classwide_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Classwide_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Compilation_Unit
        (Node : Bare_Compilation_Unit; Info : Internal_Entity_Info)
         return Internal_Entity_Compilation_Unit is
      begin
         if Node = null then
            return No_Entity_Compilation_Unit;
         end if;
         return (Node => Node, Info => Info);
      end;
      ----------
      -- Hash --
      ----------
      pragma Warnings (Off, "referenced");
      function Hash (R : Internal_Entity_Compilation_Unit) return Hash_Type is
         pragma Warnings (On, "referenced");
      begin
            return Combine
              (Hash (R.Node), Hash (R.Info));
      end Hash;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Compilation_Unit) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Compilation_Unit_List
        (Node : Bare_Compilation_Unit_List; Info : Internal_Entity_Info)
         return Internal_Entity_Compilation_Unit_List is
      begin
         if Node = null then
            return No_Entity_Compilation_Unit_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Compilation_Unit_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Component_Clause
        (Node : Bare_Component_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Component_Clause is
      begin
         if Node = null then
            return No_Entity_Component_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Component_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Component_Decl
        (Node : Bare_Component_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Component_Decl is
      begin
         if Node = null then
            return No_Entity_Component_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Component_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Component_Def
        (Node : Bare_Component_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Component_Def is
      begin
         if Node = null then
            return No_Entity_Component_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Component_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Component_List
        (Node : Bare_Component_List; Info : Internal_Entity_Info)
         return Internal_Entity_Component_List is
      begin
         if Node = null then
            return No_Entity_Component_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Component_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Constraint
        (Node : Bare_Constraint; Info : Internal_Entity_Info)
         return Internal_Entity_Constraint is
      begin
         if Node = null then
            return No_Entity_Constraint;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Constraint) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Composite_Constraint
        (Node : Bare_Composite_Constraint; Info : Internal_Entity_Info)
         return Internal_Entity_Composite_Constraint is
      begin
         if Node = null then
            return No_Entity_Composite_Constraint;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Composite_Constraint) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Composite_Constraint_Assoc
        (Node : Bare_Composite_Constraint_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Composite_Constraint_Assoc is
      begin
         if Node = null then
            return No_Entity_Composite_Constraint_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Composite_Constraint_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Concat_Op
        (Node : Bare_Concat_Op; Info : Internal_Entity_Info)
         return Internal_Entity_Concat_Op is
      begin
         if Node = null then
            return No_Entity_Concat_Op;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Concat_Op) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Concat_Operand
        (Node : Bare_Concat_Operand; Info : Internal_Entity_Info)
         return Internal_Entity_Concat_Operand is
      begin
         if Node = null then
            return No_Entity_Concat_Operand;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Concat_Operand) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Concat_Operand_List
        (Node : Bare_Concat_Operand_List; Info : Internal_Entity_Info)
         return Internal_Entity_Concat_Operand_List is
      begin
         if Node = null then
            return No_Entity_Concat_Operand_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Concat_Operand_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Concrete_Formal_Subp_Decl
        (Node : Bare_Concrete_Formal_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Concrete_Formal_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Concrete_Formal_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Concrete_Formal_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Concrete_Type_Decl
        (Node : Bare_Concrete_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Concrete_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Concrete_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Concrete_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Constant_Node
        (Node : Bare_Constant_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Constant_Node is
      begin
         if Node = null then
            return No_Entity_Constant_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Constant_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Constant_Absent
        (Node : Bare_Constant_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Constant_Absent is
      begin
         if Node = null then
            return No_Entity_Constant_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Constant_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Constant_Present
        (Node : Bare_Constant_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Constant_Present is
      begin
         if Node = null then
            return No_Entity_Constant_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Constant_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Constrained_Array_Indices
        (Node : Bare_Constrained_Array_Indices; Info : Internal_Entity_Info)
         return Internal_Entity_Constrained_Array_Indices is
      begin
         if Node = null then
            return No_Entity_Constrained_Array_Indices;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Constrained_Array_Indices) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subtype_Indication
        (Node : Bare_Subtype_Indication; Info : Internal_Entity_Info)
         return Internal_Entity_Subtype_Indication is
      begin
         if Node = null then
            return No_Entity_Subtype_Indication;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subtype_Indication) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Constrained_Subtype_Indication
        (Node : Bare_Constrained_Subtype_Indication; Info : Internal_Entity_Info)
         return Internal_Entity_Constrained_Subtype_Indication is
      begin
         if Node = null then
            return No_Entity_Constrained_Subtype_Indication;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Constrained_Subtype_Indication) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Constraint_List
        (Node : Bare_Constraint_List; Info : Internal_Entity_Info)
         return Internal_Entity_Constraint_List is
      begin
         if Node = null then
            return No_Entity_Constraint_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Constraint_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Contract_Case_Assoc
        (Node : Bare_Contract_Case_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Contract_Case_Assoc is
      begin
         if Node = null then
            return No_Entity_Contract_Case_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Contract_Case_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Contract_Case_Assoc_List
        (Node : Bare_Contract_Case_Assoc_List; Info : Internal_Entity_Info)
         return Internal_Entity_Contract_Case_Assoc_List is
      begin
         if Node = null then
            return No_Entity_Contract_Case_Assoc_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Contract_Case_Assoc_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Contract_Cases
        (Node : Bare_Contract_Cases; Info : Internal_Entity_Info)
         return Internal_Entity_Contract_Cases is
      begin
         if Node = null then
            return No_Entity_Contract_Cases;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Contract_Cases) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Real_Type_Def
        (Node : Bare_Real_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Real_Type_Def is
      begin
         if Node = null then
            return No_Entity_Real_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Real_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Decimal_Fixed_Point_Def
        (Node : Bare_Decimal_Fixed_Point_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Decimal_Fixed_Point_Def is
      begin
         if Node = null then
            return No_Entity_Decimal_Fixed_Point_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Decimal_Fixed_Point_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Decl_Block
        (Node : Bare_Decl_Block; Info : Internal_Entity_Info)
         return Internal_Entity_Decl_Block is
      begin
         if Node = null then
            return No_Entity_Decl_Block;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Decl_Block) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Decl_Expr
        (Node : Bare_Decl_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Decl_Expr is
      begin
         if Node = null then
            return No_Entity_Decl_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Decl_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Decl_List
        (Node : Bare_Decl_List; Info : Internal_Entity_Info)
         return Internal_Entity_Decl_List is
      begin
         if Node = null then
            return No_Entity_Decl_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Decl_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Declarative_Part
        (Node : Bare_Declarative_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Declarative_Part is
      begin
         if Node = null then
            return No_Entity_Declarative_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Declarative_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Defining_Name
        (Node : Bare_Defining_Name; Info : Internal_Entity_Info)
         return Internal_Entity_Defining_Name is
      begin
         if Node = null then
            return No_Entity_Defining_Name;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Defining_Name) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Defining_Name_List
        (Node : Bare_Defining_Name_List; Info : Internal_Entity_Info)
         return Internal_Entity_Defining_Name_List is
      begin
         if Node = null then
            return No_Entity_Defining_Name_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Defining_Name_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Delay_Stmt
        (Node : Bare_Delay_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Delay_Stmt is
      begin
         if Node = null then
            return No_Entity_Delay_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Delay_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Delta_Constraint
        (Node : Bare_Delta_Constraint; Info : Internal_Entity_Info)
         return Internal_Entity_Delta_Constraint is
      begin
         if Node = null then
            return No_Entity_Delta_Constraint;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Delta_Constraint) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Derived_Type_Def
        (Node : Bare_Derived_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Derived_Type_Def is
      begin
         if Node = null then
            return No_Entity_Derived_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Derived_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Digits_Constraint
        (Node : Bare_Digits_Constraint; Info : Internal_Entity_Info)
         return Internal_Entity_Digits_Constraint is
      begin
         if Node = null then
            return No_Entity_Digits_Constraint;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Digits_Constraint) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Discrete_Base_Subtype_Decl
        (Node : Bare_Discrete_Base_Subtype_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Discrete_Base_Subtype_Decl is
      begin
         if Node = null then
            return No_Entity_Discrete_Base_Subtype_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Discrete_Base_Subtype_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Discrete_Subtype_Indication
        (Node : Bare_Discrete_Subtype_Indication; Info : Internal_Entity_Info)
         return Internal_Entity_Discrete_Subtype_Indication is
      begin
         if Node = null then
            return No_Entity_Discrete_Subtype_Indication;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Discrete_Subtype_Indication) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Discrete_Subtype_Name
        (Node : Bare_Discrete_Subtype_Name; Info : Internal_Entity_Info)
         return Internal_Entity_Discrete_Subtype_Name is
      begin
         if Node = null then
            return No_Entity_Discrete_Subtype_Name;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Discrete_Subtype_Name) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Identifier_List
        (Node : Bare_Identifier_List; Info : Internal_Entity_Info)
         return Internal_Entity_Identifier_List is
      begin
         if Node = null then
            return No_Entity_Identifier_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Identifier_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Discriminant_Choice_List
        (Node : Bare_Discriminant_Choice_List; Info : Internal_Entity_Info)
         return Internal_Entity_Discriminant_Choice_List is
      begin
         if Node = null then
            return No_Entity_Discriminant_Choice_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Discriminant_Choice_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Discriminant_Part
        (Node : Bare_Discriminant_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Discriminant_Part is
      begin
         if Node = null then
            return No_Entity_Discriminant_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Discriminant_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Discriminant_Spec
        (Node : Bare_Discriminant_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Discriminant_Spec is
      begin
         if Node = null then
            return No_Entity_Discriminant_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Discriminant_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Discriminant_Spec_List
        (Node : Bare_Discriminant_Spec_List; Info : Internal_Entity_Info)
         return Internal_Entity_Discriminant_Spec_List is
      begin
         if Node = null then
            return No_Entity_Discriminant_Spec_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Discriminant_Spec_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Dotted_Name
        (Node : Bare_Dotted_Name; Info : Internal_Entity_Info)
         return Internal_Entity_Dotted_Name is
      begin
         if Node = null then
            return No_Entity_Dotted_Name;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Dotted_Name) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Elsif_Expr_Part
        (Node : Bare_Elsif_Expr_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Elsif_Expr_Part is
      begin
         if Node = null then
            return No_Entity_Elsif_Expr_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Elsif_Expr_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Elsif_Expr_Part_List
        (Node : Bare_Elsif_Expr_Part_List; Info : Internal_Entity_Info)
         return Internal_Entity_Elsif_Expr_Part_List is
      begin
         if Node = null then
            return No_Entity_Elsif_Expr_Part_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Elsif_Expr_Part_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Elsif_Stmt_Part
        (Node : Bare_Elsif_Stmt_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Elsif_Stmt_Part is
      begin
         if Node = null then
            return No_Entity_Elsif_Stmt_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Elsif_Stmt_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Elsif_Stmt_Part_List
        (Node : Bare_Elsif_Stmt_Part_List; Info : Internal_Entity_Info)
         return Internal_Entity_Elsif_Stmt_Part_List is
      begin
         if Node = null then
            return No_Entity_Elsif_Stmt_Part_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Elsif_Stmt_Part_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_End_Name
        (Node : Bare_End_Name; Info : Internal_Entity_Info)
         return Internal_Entity_End_Name is
      begin
         if Node = null then
            return No_Entity_End_Name;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_End_Name) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Entry_Body
        (Node : Bare_Entry_Body; Info : Internal_Entity_Info)
         return Internal_Entity_Entry_Body is
      begin
         if Node = null then
            return No_Entity_Entry_Body;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Entry_Body) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Entry_Completion_Formal_Params
        (Node : Bare_Entry_Completion_Formal_Params; Info : Internal_Entity_Info)
         return Internal_Entity_Entry_Completion_Formal_Params is
      begin
         if Node = null then
            return No_Entity_Entry_Completion_Formal_Params;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Entry_Completion_Formal_Params) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Entry_Decl
        (Node : Bare_Entry_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Entry_Decl is
      begin
         if Node = null then
            return No_Entity_Entry_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Entry_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Entry_Index_Spec
        (Node : Bare_Entry_Index_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Entry_Index_Spec is
      begin
         if Node = null then
            return No_Entity_Entry_Index_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Entry_Index_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Entry_Spec
        (Node : Bare_Entry_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Entry_Spec is
      begin
         if Node = null then
            return No_Entity_Entry_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Entry_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Enum_Lit_Synth_Type_Expr
        (Node : Bare_Enum_Lit_Synth_Type_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Enum_Lit_Synth_Type_Expr is
      begin
         if Node = null then
            return No_Entity_Enum_Lit_Synth_Type_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Enum_Lit_Synth_Type_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Enum_Literal_Decl
        (Node : Bare_Enum_Literal_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Enum_Literal_Decl is
      begin
         if Node = null then
            return No_Entity_Enum_Literal_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Enum_Literal_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Enum_Literal_Decl_List
        (Node : Bare_Enum_Literal_Decl_List; Info : Internal_Entity_Info)
         return Internal_Entity_Enum_Literal_Decl_List is
      begin
         if Node = null then
            return No_Entity_Enum_Literal_Decl_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Enum_Literal_Decl_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Enum_Rep_Clause
        (Node : Bare_Enum_Rep_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Enum_Rep_Clause is
      begin
         if Node = null then
            return No_Entity_Enum_Rep_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Enum_Rep_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Enum_Subp_Spec
        (Node : Bare_Enum_Subp_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Enum_Subp_Spec is
      begin
         if Node = null then
            return No_Entity_Enum_Subp_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Enum_Subp_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Enum_Type_Def
        (Node : Bare_Enum_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Enum_Type_Def is
      begin
         if Node = null then
            return No_Entity_Enum_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Enum_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Error_Decl
        (Node : Bare_Error_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Error_Decl is
      begin
         if Node = null then
            return No_Entity_Error_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Error_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Error_Stmt
        (Node : Bare_Error_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Error_Stmt is
      begin
         if Node = null then
            return No_Entity_Error_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Error_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Exception_Decl
        (Node : Bare_Exception_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Exception_Decl is
      begin
         if Node = null then
            return No_Entity_Exception_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Exception_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Exception_Handler
        (Node : Bare_Exception_Handler; Info : Internal_Entity_Info)
         return Internal_Entity_Exception_Handler is
      begin
         if Node = null then
            return No_Entity_Exception_Handler;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Exception_Handler) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Exit_Stmt
        (Node : Bare_Exit_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Exit_Stmt is
      begin
         if Node = null then
            return No_Entity_Exit_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Exit_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Explicit_Deref
        (Node : Bare_Explicit_Deref; Info : Internal_Entity_Info)
         return Internal_Entity_Explicit_Deref is
      begin
         if Node = null then
            return No_Entity_Explicit_Deref;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Explicit_Deref) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Expr_List
        (Node : Bare_Expr_List; Info : Internal_Entity_Info)
         return Internal_Entity_Expr_List is
      begin
         if Node = null then
            return No_Entity_Expr_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Expr_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Expr_Alternatives_List
        (Node : Bare_Expr_Alternatives_List; Info : Internal_Entity_Info)
         return Internal_Entity_Expr_Alternatives_List is
      begin
         if Node = null then
            return No_Entity_Expr_Alternatives_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Expr_Alternatives_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Expr_Function
        (Node : Bare_Expr_Function; Info : Internal_Entity_Info)
         return Internal_Entity_Expr_Function is
      begin
         if Node = null then
            return No_Entity_Expr_Function;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Expr_Function) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Extended_Return_Stmt
        (Node : Bare_Extended_Return_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Extended_Return_Stmt is
      begin
         if Node = null then
            return No_Entity_Extended_Return_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Extended_Return_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Object_Decl
        (Node : Bare_Object_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Object_Decl is
      begin
         if Node = null then
            return No_Entity_Object_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Object_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Extended_Return_Stmt_Object_Decl
        (Node : Bare_Extended_Return_Stmt_Object_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Extended_Return_Stmt_Object_Decl is
      begin
         if Node = null then
            return No_Entity_Extended_Return_Stmt_Object_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Extended_Return_Stmt_Object_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Floating_Point_Def
        (Node : Bare_Floating_Point_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Floating_Point_Def is
      begin
         if Node = null then
            return No_Entity_Floating_Point_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Floating_Point_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_For_Loop_Iter_Filter
        (Node : Bare_For_Loop_Iter_Filter; Info : Internal_Entity_Info)
         return Internal_Entity_For_Loop_Iter_Filter is
      begin
         if Node = null then
            return No_Entity_For_Loop_Iter_Filter;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_For_Loop_Iter_Filter) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Loop_Spec
        (Node : Bare_Loop_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Loop_Spec is
      begin
         if Node = null then
            return No_Entity_Loop_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Loop_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_For_Loop_Spec
        (Node : Bare_For_Loop_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_For_Loop_Spec is
      begin
         if Node = null then
            return No_Entity_For_Loop_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_For_Loop_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_For_Loop_Stmt
        (Node : Bare_For_Loop_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_For_Loop_Stmt is
      begin
         if Node = null then
            return No_Entity_For_Loop_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_For_Loop_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_For_Loop_Var_Decl
        (Node : Bare_For_Loop_Var_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_For_Loop_Var_Decl is
      begin
         if Node = null then
            return No_Entity_For_Loop_Var_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_For_Loop_Var_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Formal_Discrete_Type_Def
        (Node : Bare_Formal_Discrete_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Formal_Discrete_Type_Def is
      begin
         if Node = null then
            return No_Entity_Formal_Discrete_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Formal_Discrete_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Formal_Type_Decl
        (Node : Bare_Formal_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Formal_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Formal_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Formal_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Format_String_Chunk
        (Node : Bare_Format_String_Chunk; Info : Internal_Entity_Info)
         return Internal_Entity_Format_String_Chunk is
      begin
         if Node = null then
            return No_Entity_Format_String_Chunk;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Format_String_Chunk) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Format_String_Chunk_List
        (Node : Bare_Format_String_Chunk_List; Info : Internal_Entity_Info)
         return Internal_Entity_Format_String_Chunk_List is
      begin
         if Node = null then
            return No_Entity_Format_String_Chunk_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Format_String_Chunk_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Format_String_Literal
        (Node : Bare_Format_String_Literal; Info : Internal_Entity_Info)
         return Internal_Entity_Format_String_Literal is
      begin
         if Node = null then
            return No_Entity_Format_String_Literal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Format_String_Literal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Format_String_Tok_Node
        (Node : Bare_Format_String_Tok_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Format_String_Tok_Node is
      begin
         if Node = null then
            return No_Entity_Format_String_Tok_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Format_String_Tok_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Format_String_Tok_End
        (Node : Bare_Format_String_Tok_End; Info : Internal_Entity_Info)
         return Internal_Entity_Format_String_Tok_End is
      begin
         if Node = null then
            return No_Entity_Format_String_Tok_End;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Format_String_Tok_End) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Format_String_Tok_Mid
        (Node : Bare_Format_String_Tok_Mid; Info : Internal_Entity_Info)
         return Internal_Entity_Format_String_Tok_Mid is
      begin
         if Node = null then
            return No_Entity_Format_String_Tok_Mid;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Format_String_Tok_Mid) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Format_String_Tok_Start
        (Node : Bare_Format_String_Tok_Start; Info : Internal_Entity_Info)
         return Internal_Entity_Format_String_Tok_Start is
      begin
         if Node = null then
            return No_Entity_Format_String_Tok_Start;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Format_String_Tok_Start) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Format_String_Tok_String
        (Node : Bare_Format_String_Tok_String; Info : Internal_Entity_Info)
         return Internal_Entity_Format_String_Tok_String is
      begin
         if Node = null then
            return No_Entity_Format_String_Tok_String;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Format_String_Tok_String) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Decl
        (Node : Bare_Generic_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Formal
        (Node : Bare_Generic_Formal; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Formal is
      begin
         if Node = null then
            return No_Entity_Generic_Formal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Formal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Formal_Obj_Decl
        (Node : Bare_Generic_Formal_Obj_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Formal_Obj_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Formal_Obj_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Formal_Obj_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Formal_Package
        (Node : Bare_Generic_Formal_Package; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Formal_Package is
      begin
         if Node = null then
            return No_Entity_Generic_Formal_Package;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Formal_Package) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Formal_Part
        (Node : Bare_Generic_Formal_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Formal_Part is
      begin
         if Node = null then
            return No_Entity_Generic_Formal_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Formal_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Formal_Subp_Decl
        (Node : Bare_Generic_Formal_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Formal_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Formal_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Formal_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Formal_Type_Decl
        (Node : Bare_Generic_Formal_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Formal_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Formal_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Formal_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Instantiation
        (Node : Bare_Generic_Instantiation; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Instantiation is
      begin
         if Node = null then
            return No_Entity_Generic_Instantiation;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Instantiation) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Package_Decl
        (Node : Bare_Generic_Package_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Package_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Package_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Package_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Package_Instantiation
        (Node : Bare_Generic_Package_Instantiation; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Package_Instantiation is
      begin
         if Node = null then
            return No_Entity_Generic_Package_Instantiation;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Package_Instantiation) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Package_Internal
        (Node : Bare_Generic_Package_Internal; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Package_Internal is
      begin
         if Node = null then
            return No_Entity_Generic_Package_Internal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Package_Internal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Renaming_Decl
        (Node : Bare_Generic_Renaming_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Renaming_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Renaming_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Renaming_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Package_Renaming_Decl
        (Node : Bare_Generic_Package_Renaming_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Package_Renaming_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Package_Renaming_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Package_Renaming_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Subp_Decl
        (Node : Bare_Generic_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Subp_Instantiation
        (Node : Bare_Generic_Subp_Instantiation; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Subp_Instantiation is
      begin
         if Node = null then
            return No_Entity_Generic_Subp_Instantiation;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Subp_Instantiation) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Subp_Internal
        (Node : Bare_Generic_Subp_Internal; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Subp_Internal is
      begin
         if Node = null then
            return No_Entity_Generic_Subp_Internal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Subp_Internal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Generic_Subp_Renaming_Decl
        (Node : Bare_Generic_Subp_Renaming_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Generic_Subp_Renaming_Decl is
      begin
         if Node = null then
            return No_Entity_Generic_Subp_Renaming_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Generic_Subp_Renaming_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Goto_Stmt
        (Node : Bare_Goto_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Goto_Stmt is
      begin
         if Node = null then
            return No_Entity_Goto_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Goto_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Handled_Stmts
        (Node : Bare_Handled_Stmts; Info : Internal_Entity_Info)
         return Internal_Entity_Handled_Stmts is
      begin
         if Node = null then
            return No_Entity_Handled_Stmts;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Handled_Stmts) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_If_Expr
        (Node : Bare_If_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_If_Expr is
      begin
         if Node = null then
            return No_Entity_If_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_If_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_If_Stmt
        (Node : Bare_If_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_If_Stmt is
      begin
         if Node = null then
            return No_Entity_If_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_If_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Incomplete_Type_Decl
        (Node : Bare_Incomplete_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Incomplete_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Incomplete_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Incomplete_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Incomplete_Formal_Type_Decl
        (Node : Bare_Incomplete_Formal_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Incomplete_Formal_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Incomplete_Formal_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Incomplete_Formal_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Incomplete_Tagged_Type_Decl
        (Node : Bare_Incomplete_Tagged_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Incomplete_Tagged_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Incomplete_Tagged_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Incomplete_Tagged_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Num_Literal
        (Node : Bare_Num_Literal; Info : Internal_Entity_Info)
         return Internal_Entity_Num_Literal is
      begin
         if Node = null then
            return No_Entity_Num_Literal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Num_Literal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Int_Literal
        (Node : Bare_Int_Literal; Info : Internal_Entity_Info)
         return Internal_Entity_Int_Literal is
      begin
         if Node = null then
            return No_Entity_Int_Literal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Int_Literal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Interface_Kind
        (Node : Bare_Interface_Kind; Info : Internal_Entity_Info)
         return Internal_Entity_Interface_Kind is
      begin
         if Node = null then
            return No_Entity_Interface_Kind;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Interface_Kind) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Interface_Kind_Limited
        (Node : Bare_Interface_Kind_Limited; Info : Internal_Entity_Info)
         return Internal_Entity_Interface_Kind_Limited is
      begin
         if Node = null then
            return No_Entity_Interface_Kind_Limited;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Interface_Kind_Limited) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Interface_Kind_Protected
        (Node : Bare_Interface_Kind_Protected; Info : Internal_Entity_Info)
         return Internal_Entity_Interface_Kind_Protected is
      begin
         if Node = null then
            return No_Entity_Interface_Kind_Protected;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Interface_Kind_Protected) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Interface_Kind_Synchronized
        (Node : Bare_Interface_Kind_Synchronized; Info : Internal_Entity_Info)
         return Internal_Entity_Interface_Kind_Synchronized is
      begin
         if Node = null then
            return No_Entity_Interface_Kind_Synchronized;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Interface_Kind_Synchronized) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Interface_Kind_Task
        (Node : Bare_Interface_Kind_Task; Info : Internal_Entity_Info)
         return Internal_Entity_Interface_Kind_Task is
      begin
         if Node = null then
            return No_Entity_Interface_Kind_Task;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Interface_Kind_Task) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Interface_Type_Def
        (Node : Bare_Interface_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Interface_Type_Def is
      begin
         if Node = null then
            return No_Entity_Interface_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Interface_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Iter_Type
        (Node : Bare_Iter_Type; Info : Internal_Entity_Info)
         return Internal_Entity_Iter_Type is
      begin
         if Node = null then
            return No_Entity_Iter_Type;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Iter_Type) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Iter_Type_In
        (Node : Bare_Iter_Type_In; Info : Internal_Entity_Info)
         return Internal_Entity_Iter_Type_In is
      begin
         if Node = null then
            return No_Entity_Iter_Type_In;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Iter_Type_In) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Iter_Type_Of
        (Node : Bare_Iter_Type_Of; Info : Internal_Entity_Info)
         return Internal_Entity_Iter_Type_Of is
      begin
         if Node = null then
            return No_Entity_Iter_Type_Of;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Iter_Type_Of) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Iterated_Assoc
        (Node : Bare_Iterated_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Iterated_Assoc is
      begin
         if Node = null then
            return No_Entity_Iterated_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Iterated_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Known_Discriminant_Part
        (Node : Bare_Known_Discriminant_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Known_Discriminant_Part is
      begin
         if Node = null then
            return No_Entity_Known_Discriminant_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Known_Discriminant_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Label
        (Node : Bare_Label; Info : Internal_Entity_Info)
         return Internal_Entity_Label is
      begin
         if Node = null then
            return No_Entity_Label;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Label) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Label_Decl
        (Node : Bare_Label_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Label_Decl is
      begin
         if Node = null then
            return No_Entity_Label_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Label_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Library_Item
        (Node : Bare_Library_Item; Info : Internal_Entity_Info)
         return Internal_Entity_Library_Item is
      begin
         if Node = null then
            return No_Entity_Library_Item;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Library_Item) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Limited_Node
        (Node : Bare_Limited_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Limited_Node is
      begin
         if Node = null then
            return No_Entity_Limited_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Limited_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Limited_Absent
        (Node : Bare_Limited_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Limited_Absent is
      begin
         if Node = null then
            return No_Entity_Limited_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Limited_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Limited_Present
        (Node : Bare_Limited_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Limited_Present is
      begin
         if Node = null then
            return No_Entity_Limited_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Limited_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Loop_Stmt
        (Node : Bare_Loop_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Loop_Stmt is
      begin
         if Node = null then
            return No_Entity_Loop_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Loop_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Membership_Expr
        (Node : Bare_Membership_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Membership_Expr is
      begin
         if Node = null then
            return No_Entity_Membership_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Membership_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Mod_Int_Type_Def
        (Node : Bare_Mod_Int_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Mod_Int_Type_Def is
      begin
         if Node = null then
            return No_Entity_Mod_Int_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Mod_Int_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Mode
        (Node : Bare_Mode; Info : Internal_Entity_Info)
         return Internal_Entity_Mode is
      begin
         if Node = null then
            return No_Entity_Mode;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Mode) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Mode_Default
        (Node : Bare_Mode_Default; Info : Internal_Entity_Info)
         return Internal_Entity_Mode_Default is
      begin
         if Node = null then
            return No_Entity_Mode_Default;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Mode_Default) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Mode_In
        (Node : Bare_Mode_In; Info : Internal_Entity_Info)
         return Internal_Entity_Mode_In is
      begin
         if Node = null then
            return No_Entity_Mode_In;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Mode_In) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Mode_In_Out
        (Node : Bare_Mode_In_Out; Info : Internal_Entity_Info)
         return Internal_Entity_Mode_In_Out is
      begin
         if Node = null then
            return No_Entity_Mode_In_Out;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Mode_In_Out) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Mode_Out
        (Node : Bare_Mode_Out; Info : Internal_Entity_Info)
         return Internal_Entity_Mode_Out is
      begin
         if Node = null then
            return No_Entity_Mode_Out;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Mode_Out) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Multi_Abstract_State_Decl
        (Node : Bare_Multi_Abstract_State_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Multi_Abstract_State_Decl is
      begin
         if Node = null then
            return No_Entity_Multi_Abstract_State_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Multi_Abstract_State_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Multi_Dim_Array_Assoc
        (Node : Bare_Multi_Dim_Array_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Multi_Dim_Array_Assoc is
      begin
         if Node = null then
            return No_Entity_Multi_Dim_Array_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Multi_Dim_Array_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Name_List
        (Node : Bare_Name_List; Info : Internal_Entity_Info)
         return Internal_Entity_Name_List is
      begin
         if Node = null then
            return No_Entity_Name_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Name_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Named_Stmt
        (Node : Bare_Named_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Named_Stmt is
      begin
         if Node = null then
            return No_Entity_Named_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Named_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Named_Stmt_Decl
        (Node : Bare_Named_Stmt_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Named_Stmt_Decl is
      begin
         if Node = null then
            return No_Entity_Named_Stmt_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Named_Stmt_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_No_Type_Object_Renaming_Decl
        (Node : Bare_No_Type_Object_Renaming_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_No_Type_Object_Renaming_Decl is
      begin
         if Node = null then
            return No_Entity_No_Type_Object_Renaming_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_No_Type_Object_Renaming_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Not_Null
        (Node : Bare_Not_Null; Info : Internal_Entity_Info)
         return Internal_Entity_Not_Null is
      begin
         if Node = null then
            return No_Entity_Not_Null;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Not_Null) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Not_Null_Absent
        (Node : Bare_Not_Null_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Not_Null_Absent is
      begin
         if Node = null then
            return No_Entity_Not_Null_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Not_Null_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Not_Null_Present
        (Node : Bare_Not_Null_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Not_Null_Present is
      begin
         if Node = null then
            return No_Entity_Not_Null_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Not_Null_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Null_Component_Decl
        (Node : Bare_Null_Component_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Null_Component_Decl is
      begin
         if Node = null then
            return No_Entity_Null_Component_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Null_Component_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Null_Literal
        (Node : Bare_Null_Literal; Info : Internal_Entity_Info)
         return Internal_Entity_Null_Literal is
      begin
         if Node = null then
            return No_Entity_Null_Literal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Null_Literal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Null_Record_Aggregate
        (Node : Bare_Null_Record_Aggregate; Info : Internal_Entity_Info)
         return Internal_Entity_Null_Record_Aggregate is
      begin
         if Node = null then
            return No_Entity_Null_Record_Aggregate;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Null_Record_Aggregate) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Null_Record_Def
        (Node : Bare_Null_Record_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Null_Record_Def is
      begin
         if Node = null then
            return No_Entity_Null_Record_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Null_Record_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Null_Stmt
        (Node : Bare_Null_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Null_Stmt is
      begin
         if Node = null then
            return No_Entity_Null_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Null_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Null_Subp_Decl
        (Node : Bare_Null_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Null_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Null_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Null_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Number_Decl
        (Node : Bare_Number_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Number_Decl is
      begin
         if Node = null then
            return No_Entity_Number_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Number_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op
        (Node : Bare_Op; Info : Internal_Entity_Info)
         return Internal_Entity_Op is
      begin
         if Node = null then
            return No_Entity_Op;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Abs
        (Node : Bare_Op_Abs; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Abs is
      begin
         if Node = null then
            return No_Entity_Op_Abs;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Abs) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_And
        (Node : Bare_Op_And; Info : Internal_Entity_Info)
         return Internal_Entity_Op_And is
      begin
         if Node = null then
            return No_Entity_Op_And;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_And) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_And_Then
        (Node : Bare_Op_And_Then; Info : Internal_Entity_Info)
         return Internal_Entity_Op_And_Then is
      begin
         if Node = null then
            return No_Entity_Op_And_Then;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_And_Then) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Concat
        (Node : Bare_Op_Concat; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Concat is
      begin
         if Node = null then
            return No_Entity_Op_Concat;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Concat) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Div
        (Node : Bare_Op_Div; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Div is
      begin
         if Node = null then
            return No_Entity_Op_Div;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Div) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Double_Dot
        (Node : Bare_Op_Double_Dot; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Double_Dot is
      begin
         if Node = null then
            return No_Entity_Op_Double_Dot;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Double_Dot) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Eq
        (Node : Bare_Op_Eq; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Eq is
      begin
         if Node = null then
            return No_Entity_Op_Eq;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Eq) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Gt
        (Node : Bare_Op_Gt; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Gt is
      begin
         if Node = null then
            return No_Entity_Op_Gt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Gt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Gte
        (Node : Bare_Op_Gte; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Gte is
      begin
         if Node = null then
            return No_Entity_Op_Gte;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Gte) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_In
        (Node : Bare_Op_In; Info : Internal_Entity_Info)
         return Internal_Entity_Op_In is
      begin
         if Node = null then
            return No_Entity_Op_In;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_In) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Lt
        (Node : Bare_Op_Lt; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Lt is
      begin
         if Node = null then
            return No_Entity_Op_Lt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Lt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Lte
        (Node : Bare_Op_Lte; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Lte is
      begin
         if Node = null then
            return No_Entity_Op_Lte;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Lte) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Minus
        (Node : Bare_Op_Minus; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Minus is
      begin
         if Node = null then
            return No_Entity_Op_Minus;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Minus) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Mod
        (Node : Bare_Op_Mod; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Mod is
      begin
         if Node = null then
            return No_Entity_Op_Mod;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Mod) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Mult
        (Node : Bare_Op_Mult; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Mult is
      begin
         if Node = null then
            return No_Entity_Op_Mult;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Mult) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Neq
        (Node : Bare_Op_Neq; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Neq is
      begin
         if Node = null then
            return No_Entity_Op_Neq;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Neq) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Not
        (Node : Bare_Op_Not; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Not is
      begin
         if Node = null then
            return No_Entity_Op_Not;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Not) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Not_In
        (Node : Bare_Op_Not_In; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Not_In is
      begin
         if Node = null then
            return No_Entity_Op_Not_In;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Not_In) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Or
        (Node : Bare_Op_Or; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Or is
      begin
         if Node = null then
            return No_Entity_Op_Or;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Or) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Or_Else
        (Node : Bare_Op_Or_Else; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Or_Else is
      begin
         if Node = null then
            return No_Entity_Op_Or_Else;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Or_Else) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Plus
        (Node : Bare_Op_Plus; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Plus is
      begin
         if Node = null then
            return No_Entity_Op_Plus;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Plus) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Pow
        (Node : Bare_Op_Pow; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Pow is
      begin
         if Node = null then
            return No_Entity_Op_Pow;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Pow) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Rem
        (Node : Bare_Op_Rem; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Rem is
      begin
         if Node = null then
            return No_Entity_Op_Rem;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Rem) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Op_Xor
        (Node : Bare_Op_Xor; Info : Internal_Entity_Info)
         return Internal_Entity_Op_Xor is
      begin
         if Node = null then
            return No_Entity_Op_Xor;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Op_Xor) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Ordinary_Fixed_Point_Def
        (Node : Bare_Ordinary_Fixed_Point_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Ordinary_Fixed_Point_Def is
      begin
         if Node = null then
            return No_Entity_Ordinary_Fixed_Point_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Ordinary_Fixed_Point_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Others_Designator
        (Node : Bare_Others_Designator; Info : Internal_Entity_Info)
         return Internal_Entity_Others_Designator is
      begin
         if Node = null then
            return No_Entity_Others_Designator;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Others_Designator) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Overriding_Node
        (Node : Bare_Overriding_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Overriding_Node is
      begin
         if Node = null then
            return No_Entity_Overriding_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Overriding_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Overriding_Not_Overriding
        (Node : Bare_Overriding_Not_Overriding; Info : Internal_Entity_Info)
         return Internal_Entity_Overriding_Not_Overriding is
      begin
         if Node = null then
            return No_Entity_Overriding_Not_Overriding;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Overriding_Not_Overriding) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Overriding_Overriding
        (Node : Bare_Overriding_Overriding; Info : Internal_Entity_Info)
         return Internal_Entity_Overriding_Overriding is
      begin
         if Node = null then
            return No_Entity_Overriding_Overriding;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Overriding_Overriding) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Overriding_Unspecified
        (Node : Bare_Overriding_Unspecified; Info : Internal_Entity_Info)
         return Internal_Entity_Overriding_Unspecified is
      begin
         if Node = null then
            return No_Entity_Overriding_Unspecified;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Overriding_Unspecified) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Package_Body
        (Node : Bare_Package_Body; Info : Internal_Entity_Info)
         return Internal_Entity_Package_Body is
      begin
         if Node = null then
            return No_Entity_Package_Body;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Package_Body) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Package_Body_Stub
        (Node : Bare_Package_Body_Stub; Info : Internal_Entity_Info)
         return Internal_Entity_Package_Body_Stub is
      begin
         if Node = null then
            return No_Entity_Package_Body_Stub;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Package_Body_Stub) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Package_Decl
        (Node : Bare_Package_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Package_Decl is
      begin
         if Node = null then
            return No_Entity_Package_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Package_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Package_Renaming_Decl
        (Node : Bare_Package_Renaming_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Package_Renaming_Decl is
      begin
         if Node = null then
            return No_Entity_Package_Renaming_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Package_Renaming_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Param_Assoc
        (Node : Bare_Param_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Param_Assoc is
      begin
         if Node = null then
            return No_Entity_Param_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Param_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Param_Spec
        (Node : Bare_Param_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Param_Spec is
      begin
         if Node = null then
            return No_Entity_Param_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Param_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Param_Spec_List
        (Node : Bare_Param_Spec_List; Info : Internal_Entity_Info)
         return Internal_Entity_Param_Spec_List is
      begin
         if Node = null then
            return No_Entity_Param_Spec_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Param_Spec_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Params
        (Node : Bare_Params; Info : Internal_Entity_Info)
         return Internal_Entity_Params is
      begin
         if Node = null then
            return No_Entity_Params;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Params) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Paren_Abstract_State_Decl
        (Node : Bare_Paren_Abstract_State_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Paren_Abstract_State_Decl is
      begin
         if Node = null then
            return No_Entity_Paren_Abstract_State_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Paren_Abstract_State_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Paren_Expr
        (Node : Bare_Paren_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Paren_Expr is
      begin
         if Node = null then
            return No_Entity_Paren_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Paren_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Parent_List
        (Node : Bare_Parent_List; Info : Internal_Entity_Info)
         return Internal_Entity_Parent_List is
      begin
         if Node = null then
            return No_Entity_Parent_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Parent_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pp_Directive
        (Node : Bare_Pp_Directive; Info : Internal_Entity_Info)
         return Internal_Entity_Pp_Directive is
      begin
         if Node = null then
            return No_Entity_Pp_Directive;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pp_Directive) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pp_Else_Directive
        (Node : Bare_Pp_Else_Directive; Info : Internal_Entity_Info)
         return Internal_Entity_Pp_Else_Directive is
      begin
         if Node = null then
            return No_Entity_Pp_Else_Directive;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pp_Else_Directive) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pp_Elsif_Directive
        (Node : Bare_Pp_Elsif_Directive; Info : Internal_Entity_Info)
         return Internal_Entity_Pp_Elsif_Directive is
      begin
         if Node = null then
            return No_Entity_Pp_Elsif_Directive;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pp_Elsif_Directive) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pp_End_If_Directive
        (Node : Bare_Pp_End_If_Directive; Info : Internal_Entity_Info)
         return Internal_Entity_Pp_End_If_Directive is
      begin
         if Node = null then
            return No_Entity_Pp_End_If_Directive;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pp_End_If_Directive) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pp_If_Directive
        (Node : Bare_Pp_If_Directive; Info : Internal_Entity_Info)
         return Internal_Entity_Pp_If_Directive is
      begin
         if Node = null then
            return No_Entity_Pp_If_Directive;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pp_If_Directive) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pp_Then_Kw
        (Node : Bare_Pp_Then_Kw; Info : Internal_Entity_Info)
         return Internal_Entity_Pp_Then_Kw is
      begin
         if Node = null then
            return No_Entity_Pp_Then_Kw;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pp_Then_Kw) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pragma_Argument_Assoc
        (Node : Bare_Pragma_Argument_Assoc; Info : Internal_Entity_Info)
         return Internal_Entity_Pragma_Argument_Assoc is
      begin
         if Node = null then
            return No_Entity_Pragma_Argument_Assoc;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pragma_Argument_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pragma_Node
        (Node : Bare_Pragma_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Pragma_Node is
      begin
         if Node = null then
            return No_Entity_Pragma_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pragma_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Pragma_Node_List
        (Node : Bare_Pragma_Node_List; Info : Internal_Entity_Info)
         return Internal_Entity_Pragma_Node_List is
      begin
         if Node = null then
            return No_Entity_Pragma_Node_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Pragma_Node_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Private_Node
        (Node : Bare_Private_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Private_Node is
      begin
         if Node = null then
            return No_Entity_Private_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Private_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Private_Absent
        (Node : Bare_Private_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Private_Absent is
      begin
         if Node = null then
            return No_Entity_Private_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Private_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Private_Part
        (Node : Bare_Private_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Private_Part is
      begin
         if Node = null then
            return No_Entity_Private_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Private_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Private_Present
        (Node : Bare_Private_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Private_Present is
      begin
         if Node = null then
            return No_Entity_Private_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Private_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Private_Type_Def
        (Node : Bare_Private_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Private_Type_Def is
      begin
         if Node = null then
            return No_Entity_Private_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Private_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Protected_Node
        (Node : Bare_Protected_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Protected_Node is
      begin
         if Node = null then
            return No_Entity_Protected_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Protected_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Protected_Absent
        (Node : Bare_Protected_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Protected_Absent is
      begin
         if Node = null then
            return No_Entity_Protected_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Protected_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Protected_Body
        (Node : Bare_Protected_Body; Info : Internal_Entity_Info)
         return Internal_Entity_Protected_Body is
      begin
         if Node = null then
            return No_Entity_Protected_Body;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Protected_Body) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Protected_Body_Stub
        (Node : Bare_Protected_Body_Stub; Info : Internal_Entity_Info)
         return Internal_Entity_Protected_Body_Stub is
      begin
         if Node = null then
            return No_Entity_Protected_Body_Stub;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Protected_Body_Stub) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Protected_Def
        (Node : Bare_Protected_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Protected_Def is
      begin
         if Node = null then
            return No_Entity_Protected_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Protected_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Protected_Present
        (Node : Bare_Protected_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Protected_Present is
      begin
         if Node = null then
            return No_Entity_Protected_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Protected_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Protected_Type_Decl
        (Node : Bare_Protected_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Protected_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Protected_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Protected_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Public_Part
        (Node : Bare_Public_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Public_Part is
      begin
         if Node = null then
            return No_Entity_Public_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Public_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Qual_Expr
        (Node : Bare_Qual_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Qual_Expr is
      begin
         if Node = null then
            return No_Entity_Qual_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Qual_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Quantified_Expr
        (Node : Bare_Quantified_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Quantified_Expr is
      begin
         if Node = null then
            return No_Entity_Quantified_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Quantified_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Quantifier
        (Node : Bare_Quantifier; Info : Internal_Entity_Info)
         return Internal_Entity_Quantifier is
      begin
         if Node = null then
            return No_Entity_Quantifier;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Quantifier) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Quantifier_All
        (Node : Bare_Quantifier_All; Info : Internal_Entity_Info)
         return Internal_Entity_Quantifier_All is
      begin
         if Node = null then
            return No_Entity_Quantifier_All;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Quantifier_All) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Quantifier_Some
        (Node : Bare_Quantifier_Some; Info : Internal_Entity_Info)
         return Internal_Entity_Quantifier_Some is
      begin
         if Node = null then
            return No_Entity_Quantifier_Some;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Quantifier_Some) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Raise_Expr
        (Node : Bare_Raise_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Raise_Expr is
      begin
         if Node = null then
            return No_Entity_Raise_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Raise_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Raise_Stmt
        (Node : Bare_Raise_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Raise_Stmt is
      begin
         if Node = null then
            return No_Entity_Raise_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Raise_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Range_Constraint
        (Node : Bare_Range_Constraint; Info : Internal_Entity_Info)
         return Internal_Entity_Range_Constraint is
      begin
         if Node = null then
            return No_Entity_Range_Constraint;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Range_Constraint) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Range_Spec
        (Node : Bare_Range_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Range_Spec is
      begin
         if Node = null then
            return No_Entity_Range_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Range_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Real_Literal
        (Node : Bare_Real_Literal; Info : Internal_Entity_Info)
         return Internal_Entity_Real_Literal is
      begin
         if Node = null then
            return No_Entity_Real_Literal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Real_Literal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Record_Def
        (Node : Bare_Record_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Record_Def is
      begin
         if Node = null then
            return No_Entity_Record_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Record_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Record_Rep_Clause
        (Node : Bare_Record_Rep_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Record_Rep_Clause is
      begin
         if Node = null then
            return No_Entity_Record_Rep_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Record_Rep_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Record_Type_Def
        (Node : Bare_Record_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Record_Type_Def is
      begin
         if Node = null then
            return No_Entity_Record_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Record_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Reduce_Attribute_Ref
        (Node : Bare_Reduce_Attribute_Ref; Info : Internal_Entity_Info)
         return Internal_Entity_Reduce_Attribute_Ref is
      begin
         if Node = null then
            return No_Entity_Reduce_Attribute_Ref;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Reduce_Attribute_Ref) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Relation_Op
        (Node : Bare_Relation_Op; Info : Internal_Entity_Info)
         return Internal_Entity_Relation_Op is
      begin
         if Node = null then
            return No_Entity_Relation_Op;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Relation_Op) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Renaming_Clause
        (Node : Bare_Renaming_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Renaming_Clause is
      begin
         if Node = null then
            return No_Entity_Renaming_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Renaming_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Requeue_Stmt
        (Node : Bare_Requeue_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Requeue_Stmt is
      begin
         if Node = null then
            return No_Entity_Requeue_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Requeue_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Return_Stmt
        (Node : Bare_Return_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Return_Stmt is
      begin
         if Node = null then
            return No_Entity_Return_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Return_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Reverse_Node
        (Node : Bare_Reverse_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Reverse_Node is
      begin
         if Node = null then
            return No_Entity_Reverse_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Reverse_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Reverse_Absent
        (Node : Bare_Reverse_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Reverse_Absent is
      begin
         if Node = null then
            return No_Entity_Reverse_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Reverse_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Reverse_Present
        (Node : Bare_Reverse_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Reverse_Present is
      begin
         if Node = null then
            return No_Entity_Reverse_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Reverse_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Select_Stmt
        (Node : Bare_Select_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Select_Stmt is
      begin
         if Node = null then
            return No_Entity_Select_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Select_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Select_When_Part
        (Node : Bare_Select_When_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Select_When_Part is
      begin
         if Node = null then
            return No_Entity_Select_When_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Select_When_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Select_When_Part_List
        (Node : Bare_Select_When_Part_List; Info : Internal_Entity_Info)
         return Internal_Entity_Select_When_Part_List is
      begin
         if Node = null then
            return No_Entity_Select_When_Part_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Select_When_Part_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Signed_Int_Type_Def
        (Node : Bare_Signed_Int_Type_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Signed_Int_Type_Def is
      begin
         if Node = null then
            return No_Entity_Signed_Int_Type_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Signed_Int_Type_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Simple_Decl_Stmt
        (Node : Bare_Simple_Decl_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_Simple_Decl_Stmt is
      begin
         if Node = null then
            return No_Entity_Simple_Decl_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Simple_Decl_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Single_Protected_Decl
        (Node : Bare_Single_Protected_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Single_Protected_Decl is
      begin
         if Node = null then
            return No_Entity_Single_Protected_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Single_Protected_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Single_Task_Decl
        (Node : Bare_Single_Task_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Single_Task_Decl is
      begin
         if Node = null then
            return No_Entity_Single_Task_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Single_Task_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Task_Type_Decl
        (Node : Bare_Task_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Task_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Task_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Task_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Single_Task_Type_Decl
        (Node : Bare_Single_Task_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Single_Task_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Single_Task_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Single_Task_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Stmt_List
        (Node : Bare_Stmt_List; Info : Internal_Entity_Info)
         return Internal_Entity_Stmt_List is
      begin
         if Node = null then
            return No_Entity_Stmt_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Stmt_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_String_Literal
        (Node : Bare_String_Literal; Info : Internal_Entity_Info)
         return Internal_Entity_String_Literal is
      begin
         if Node = null then
            return No_Entity_String_Literal;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_String_Literal) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subp_Body
        (Node : Bare_Subp_Body; Info : Internal_Entity_Info)
         return Internal_Entity_Subp_Body is
      begin
         if Node = null then
            return No_Entity_Subp_Body;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subp_Body) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subp_Body_Stub
        (Node : Bare_Subp_Body_Stub; Info : Internal_Entity_Info)
         return Internal_Entity_Subp_Body_Stub is
      begin
         if Node = null then
            return No_Entity_Subp_Body_Stub;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subp_Body_Stub) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subp_Decl
        (Node : Bare_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subp_Kind
        (Node : Bare_Subp_Kind; Info : Internal_Entity_Info)
         return Internal_Entity_Subp_Kind is
      begin
         if Node = null then
            return No_Entity_Subp_Kind;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subp_Kind) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subp_Kind_Function
        (Node : Bare_Subp_Kind_Function; Info : Internal_Entity_Info)
         return Internal_Entity_Subp_Kind_Function is
      begin
         if Node = null then
            return No_Entity_Subp_Kind_Function;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subp_Kind_Function) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subp_Kind_Procedure
        (Node : Bare_Subp_Kind_Procedure; Info : Internal_Entity_Info)
         return Internal_Entity_Subp_Kind_Procedure is
      begin
         if Node = null then
            return No_Entity_Subp_Kind_Procedure;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subp_Kind_Procedure) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subp_Renaming_Decl
        (Node : Bare_Subp_Renaming_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Subp_Renaming_Decl is
      begin
         if Node = null then
            return No_Entity_Subp_Renaming_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subp_Renaming_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subp_Spec
        (Node : Bare_Subp_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Subp_Spec is
      begin
         if Node = null then
            return No_Entity_Subp_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subp_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subtype_Decl
        (Node : Bare_Subtype_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Subtype_Decl is
      begin
         if Node = null then
            return No_Entity_Subtype_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subtype_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Subunit
        (Node : Bare_Subunit; Info : Internal_Entity_Info)
         return Internal_Entity_Subunit is
      begin
         if Node = null then
            return No_Entity_Subunit;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Subunit) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synchronized_Node
        (Node : Bare_Synchronized_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Synchronized_Node is
      begin
         if Node = null then
            return No_Entity_Synchronized_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synchronized_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synchronized_Absent
        (Node : Bare_Synchronized_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Synchronized_Absent is
      begin
         if Node = null then
            return No_Entity_Synchronized_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synchronized_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synchronized_Present
        (Node : Bare_Synchronized_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Synchronized_Present is
      begin
         if Node = null then
            return No_Entity_Synchronized_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synchronized_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synth_Anonymous_Type_Decl
        (Node : Bare_Synth_Anonymous_Type_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Synth_Anonymous_Type_Decl is
      begin
         if Node = null then
            return No_Entity_Synth_Anonymous_Type_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synth_Anonymous_Type_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Binary_Spec
        (Node : Bare_Synthetic_Binary_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Binary_Spec is
      begin
         if Node = null then
            return No_Entity_Synthetic_Binary_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Binary_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Char_Enum_Lit
        (Node : Bare_Synthetic_Char_Enum_Lit; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Char_Enum_Lit is
      begin
         if Node = null then
            return No_Entity_Synthetic_Char_Enum_Lit;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Char_Enum_Lit) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Defining_Name
        (Node : Bare_Synthetic_Defining_Name; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Defining_Name is
      begin
         if Node = null then
            return No_Entity_Synthetic_Defining_Name;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Defining_Name) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Formal_Param_Decl
        (Node : Bare_Synthetic_Formal_Param_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Formal_Param_Decl is
      begin
         if Node = null then
            return No_Entity_Synthetic_Formal_Param_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Formal_Param_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Identifier
        (Node : Bare_Synthetic_Identifier; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Identifier is
      begin
         if Node = null then
            return No_Entity_Synthetic_Identifier;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Identifier) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Object_Decl
        (Node : Bare_Synthetic_Object_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Object_Decl is
      begin
         if Node = null then
            return No_Entity_Synthetic_Object_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Object_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Renaming_Clause
        (Node : Bare_Synthetic_Renaming_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Renaming_Clause is
      begin
         if Node = null then
            return No_Entity_Synthetic_Renaming_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Renaming_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Subp_Decl
        (Node : Bare_Synthetic_Subp_Decl; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Subp_Decl is
      begin
         if Node = null then
            return No_Entity_Synthetic_Subp_Decl;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Subp_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Type_Expr
        (Node : Bare_Synthetic_Type_Expr; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Type_Expr is
      begin
         if Node = null then
            return No_Entity_Synthetic_Type_Expr;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Type_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Synthetic_Unary_Spec
        (Node : Bare_Synthetic_Unary_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_Synthetic_Unary_Spec is
      begin
         if Node = null then
            return No_Entity_Synthetic_Unary_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Synthetic_Unary_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Tagged_Node
        (Node : Bare_Tagged_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Tagged_Node is
      begin
         if Node = null then
            return No_Entity_Tagged_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Tagged_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Tagged_Absent
        (Node : Bare_Tagged_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Tagged_Absent is
      begin
         if Node = null then
            return No_Entity_Tagged_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Tagged_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Tagged_Present
        (Node : Bare_Tagged_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Tagged_Present is
      begin
         if Node = null then
            return No_Entity_Tagged_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Tagged_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Target_Name
        (Node : Bare_Target_Name; Info : Internal_Entity_Info)
         return Internal_Entity_Target_Name is
      begin
         if Node = null then
            return No_Entity_Target_Name;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Target_Name) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Task_Body
        (Node : Bare_Task_Body; Info : Internal_Entity_Info)
         return Internal_Entity_Task_Body is
      begin
         if Node = null then
            return No_Entity_Task_Body;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Task_Body) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Task_Body_Stub
        (Node : Bare_Task_Body_Stub; Info : Internal_Entity_Info)
         return Internal_Entity_Task_Body_Stub is
      begin
         if Node = null then
            return No_Entity_Task_Body_Stub;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Task_Body_Stub) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Task_Def
        (Node : Bare_Task_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Task_Def is
      begin
         if Node = null then
            return No_Entity_Task_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Task_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Terminate_Alternative
        (Node : Bare_Terminate_Alternative; Info : Internal_Entity_Info)
         return Internal_Entity_Terminate_Alternative is
      begin
         if Node = null then
            return No_Entity_Terminate_Alternative;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Terminate_Alternative) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Type_Access_Def
        (Node : Bare_Type_Access_Def; Info : Internal_Entity_Info)
         return Internal_Entity_Type_Access_Def is
      begin
         if Node = null then
            return No_Entity_Type_Access_Def;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Type_Access_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Type_Attributes_Repository
        (Node : Bare_Type_Attributes_Repository; Info : Internal_Entity_Info)
         return Internal_Entity_Type_Attributes_Repository is
      begin
         if Node = null then
            return No_Entity_Type_Attributes_Repository;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Type_Attributes_Repository) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Un_Op
        (Node : Bare_Un_Op; Info : Internal_Entity_Info)
         return Internal_Entity_Un_Op is
      begin
         if Node = null then
            return No_Entity_Un_Op;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Un_Op) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Unconstrained_Array_Index
        (Node : Bare_Unconstrained_Array_Index; Info : Internal_Entity_Info)
         return Internal_Entity_Unconstrained_Array_Index is
      begin
         if Node = null then
            return No_Entity_Unconstrained_Array_Index;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Unconstrained_Array_Index) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Unconstrained_Array_Index_List
        (Node : Bare_Unconstrained_Array_Index_List; Info : Internal_Entity_Info)
         return Internal_Entity_Unconstrained_Array_Index_List is
      begin
         if Node = null then
            return No_Entity_Unconstrained_Array_Index_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Unconstrained_Array_Index_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Unconstrained_Array_Indices
        (Node : Bare_Unconstrained_Array_Indices; Info : Internal_Entity_Info)
         return Internal_Entity_Unconstrained_Array_Indices is
      begin
         if Node = null then
            return No_Entity_Unconstrained_Array_Indices;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Unconstrained_Array_Indices) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Unknown_Discriminant_Part
        (Node : Bare_Unknown_Discriminant_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Unknown_Discriminant_Part is
      begin
         if Node = null then
            return No_Entity_Unknown_Discriminant_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Unknown_Discriminant_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Until_Node
        (Node : Bare_Until_Node; Info : Internal_Entity_Info)
         return Internal_Entity_Until_Node is
      begin
         if Node = null then
            return No_Entity_Until_Node;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Until_Node) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Until_Absent
        (Node : Bare_Until_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_Until_Absent is
      begin
         if Node = null then
            return No_Entity_Until_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Until_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Until_Present
        (Node : Bare_Until_Present; Info : Internal_Entity_Info)
         return Internal_Entity_Until_Present is
      begin
         if Node = null then
            return No_Entity_Until_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Until_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Update_Attribute_Ref
        (Node : Bare_Update_Attribute_Ref; Info : Internal_Entity_Info)
         return Internal_Entity_Update_Attribute_Ref is
      begin
         if Node = null then
            return No_Entity_Update_Attribute_Ref;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Update_Attribute_Ref) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Use_Clause
        (Node : Bare_Use_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Use_Clause is
      begin
         if Node = null then
            return No_Entity_Use_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Use_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Use_Package_Clause
        (Node : Bare_Use_Package_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Use_Package_Clause is
      begin
         if Node = null then
            return No_Entity_Use_Package_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Use_Package_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Use_Type_Clause
        (Node : Bare_Use_Type_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_Use_Type_Clause is
      begin
         if Node = null then
            return No_Entity_Use_Type_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Use_Type_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Value_Sequence
        (Node : Bare_Value_Sequence; Info : Internal_Entity_Info)
         return Internal_Entity_Value_Sequence is
      begin
         if Node = null then
            return No_Entity_Value_Sequence;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Value_Sequence) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Variant
        (Node : Bare_Variant; Info : Internal_Entity_Info)
         return Internal_Entity_Variant is
      begin
         if Node = null then
            return No_Entity_Variant;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Variant) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Variant_List
        (Node : Bare_Variant_List; Info : Internal_Entity_Info)
         return Internal_Entity_Variant_List is
      begin
         if Node = null then
            return No_Entity_Variant_List;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Variant_List) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_Variant_Part
        (Node : Bare_Variant_Part; Info : Internal_Entity_Info)
         return Internal_Entity_Variant_Part is
      begin
         if Node = null then
            return No_Entity_Variant_Part;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_Variant_Part) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_While_Loop_Spec
        (Node : Bare_While_Loop_Spec; Info : Internal_Entity_Info)
         return Internal_Entity_While_Loop_Spec is
      begin
         if Node = null then
            return No_Entity_While_Loop_Spec;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_While_Loop_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_While_Loop_Stmt
        (Node : Bare_While_Loop_Stmt; Info : Internal_Entity_Info)
         return Internal_Entity_While_Loop_Stmt is
      begin
         if Node = null then
            return No_Entity_While_Loop_Stmt;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_While_Loop_Stmt) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_With_Clause
        (Node : Bare_With_Clause; Info : Internal_Entity_Info)
         return Internal_Entity_With_Clause is
      begin
         if Node = null then
            return No_Entity_With_Clause;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_With_Clause) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_With_Private
        (Node : Bare_With_Private; Info : Internal_Entity_Info)
         return Internal_Entity_With_Private is
      begin
         if Node = null then
            return No_Entity_With_Private;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_With_Private) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_With_Private_Absent
        (Node : Bare_With_Private_Absent; Info : Internal_Entity_Info)
         return Internal_Entity_With_Private_Absent is
      begin
         if Node = null then
            return No_Entity_With_Private_Absent;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_With_Private_Absent) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      function Create_Internal_Entity_With_Private_Present
        (Node : Bare_With_Private_Present; Info : Internal_Entity_Info)
         return Internal_Entity_With_Private_Present is
      begin
         if Node = null then
            return No_Entity_With_Private_Present;
         end if;
         return (Node => Node, Info => Info);
      end;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Entity_With_Private_Present) return String is
         pragma Warnings (On, "referenced");
      begin
            return Image (Entity'(Node => R.Node, Info => R.Info));
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_Env_Assoc) is
      begin
               Inc_Ref (R.Dest_Env);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_Env_Assoc) is
      begin
               Dec_Ref (R.Dest_Env);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_Env_Assoc) return Boolean is
      begin
         return L.Key = R.Key and then L.Value = R.Value and then Equivalent (L.Dest_Env, R.Dest_Env) and then L.Metadata = R.Metadata;
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Env_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Key => " & Trace_Image (R.Key)
                        & ", "
                     & "Value => " & Trace_Image (R.Value)
                        & ", "
                     & "Dest_Env => " & Trace_Image (R.Dest_Env)
                        & ", "
                     & "Metadata => " & Trace_Image (R.Metadata)
               & ")");
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_Eval_Discrete_Range) is
      begin
               Inc_Ref (R.Low_Bound);
               Inc_Ref (R.High_Bound);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_Eval_Discrete_Range) is
      begin
               Dec_Ref (R.Low_Bound);
               Dec_Ref (R.High_Bound);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_Eval_Discrete_Range) return Boolean is
      begin
         return Equivalent (L.Low_Bound, R.Low_Bound) and then Equivalent (L.High_Bound, R.High_Bound);
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Eval_Discrete_Range) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Low_Bound => " & Trace_Image (R.Low_Bound)
                        & ", "
                     & "High_Bound => " & Trace_Image (R.High_Bound)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Expected_Type_For_Expr) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Expected_Type => " & Trace_Image (R.Expected_Type)
                        & ", "
                     & "Expr => " & Trace_Image (R.Expr)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Inner_Env_Assoc) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Key => " & Trace_Image (R.Key)
                        & ", "
                     & "Value => " & Trace_Image (R.Value)
                        & ", "
                     & "Rebindings => " & Trace_Image (R.Rebindings)
                        & ", "
                     & "Metadata => " & Trace_Image (R.Metadata)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Logic_Context) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Ref_Node => " & Trace_Image (R.Ref_Node)
                        & ", "
                     & "Decl_Node => " & Trace_Image (R.Decl_Node)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Logic_Val_Result) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Success => " & Trace_Image (R.Success)
                        & ", "
                     & "Value => " & Trace_Image (R.Value)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Multidim_Aggregate_Info) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Agg => " & Trace_Image (R.Agg)
                        & ", "
                     & "Typ => " & Trace_Image (R.Typ)
                        & ", "
                     & "Rank => " & Trace_Image (R.Rank)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Param_Actual) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Param => " & Trace_Image (R.Param)
                        & ", "
                     & "Actual => " & Trace_Image (R.Actual)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Single_Actual) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Name => " & Trace_Image (R.Name)
                        & ", "
                     & "Assoc => " & Trace_Image (R.Assoc)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Param_Match) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Has_Matched => " & Trace_Image (R.Has_Matched)
                        & ", "
                     & "Actual => " & Trace_Image (R.Actual)
                        & ", "
                     & "Formal => " & Trace_Image (R.Formal)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Ref_Result) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Ref => " & Trace_Image (R.Ref)
                        & ", "
                     & "Kind => " & Trace_Image (R.Kind)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Refd_Decl) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Decl => " & Trace_Image (R.Decl)
                        & ", "
                     & "Kind => " & Trace_Image (R.Kind)
               & ")");
      end Trace_Image;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Refd_Def) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Def_Name => " & Trace_Image (R.Def_Name)
                        & ", "
                     & "Kind => " & Trace_Image (R.Kind)
               & ")");
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_Shape) is
      begin
               Inc_Ref (R.Components);
               Inc_Ref (R.Discriminants_Values);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_Shape) is
      begin
               Dec_Ref (R.Components);
               Dec_Ref (R.Discriminants_Values);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_Shape) return Boolean is
      begin
         return Equivalent (L.Components, R.Components) and then Equivalent (L.Discriminants_Values, R.Discriminants_Values);
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Shape) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Components => " & Trace_Image (R.Components)
                        & ", "
                     & "Discriminants_Values => " & Trace_Image (R.Discriminants_Values)
               & ")");
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_Solver_Diagnostic) is
      begin
               Inc_Ref (R.Message_Template);
               Inc_Ref (R.Args);
               Inc_Ref (R.Contexts);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_Solver_Diagnostic) is
      begin
               Dec_Ref (R.Message_Template);
               Dec_Ref (R.Args);
               Dec_Ref (R.Contexts);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_Solver_Diagnostic) return Boolean is
      begin
         return Equivalent (L.Message_Template, R.Message_Template) and then Equivalent (L.Args, R.Args) and then L.Location = R.Location and then Equivalent (L.Contexts, R.Contexts) and then L.Round = R.Round;
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Solver_Diagnostic) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Message_Template => " & Trace_Image (R.Message_Template)
                        & ", "
                     & "Args => " & Trace_Image (R.Args)
                        & ", "
                     & "Location => " & Trace_Image (R.Location)
                        & ", "
                     & "Contexts => " & Trace_Image (R.Contexts)
                        & ", "
                     & "Round => " & Trace_Image (R.Round)
               & ")");
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_Solver_Result) is
      begin
               Inc_Ref (R.Diagnostics);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_Solver_Result) is
      begin
               Dec_Ref (R.Diagnostics);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_Solver_Result) return Boolean is
      begin
         return L.Success = R.Success and then Equivalent (L.Diagnostics, R.Diagnostics);
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Solver_Result) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Success => " & Trace_Image (R.Success)
                        & ", "
                     & "Diagnostics => " & Trace_Image (R.Diagnostics)
               & ")");
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_Substitution) is
      begin
               Inc_Ref (R.To_Value);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_Substitution) is
      begin
               Dec_Ref (R.To_Value);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_Substitution) return Boolean is
      begin
         return L.From_Decl = R.From_Decl and then Equivalent (L.To_Value, R.To_Value) and then L.Value_Type = R.Value_Type;
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_Substitution) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "From_Decl => " & Trace_Image (R.From_Decl)
                        & ", "
                     & "To_Value => " & Trace_Image (R.To_Value)
                        & ", "
                     & "Value_Type => " & Trace_Image (R.Value_Type)
               & ")");
      end Trace_Image;
      -------------
      -- Inc_Ref --
      -------------
      procedure Inc_Ref (R : Internal_User_Defined_Function_Subp_Spec) is
      begin
               Inc_Ref (R.Subp_Params_Types);
      end Inc_Ref;
      -------------
      -- Dec_Ref --
      -------------
      procedure Dec_Ref (R : in out Internal_User_Defined_Function_Subp_Spec) is
      begin
               Dec_Ref (R.Subp_Params_Types);
      end Dec_Ref;
      ----------------
      -- Equivalent --
      ----------------
      function Equivalent (L, R : Internal_User_Defined_Function_Subp_Spec) return Boolean is
      begin
         return Equivalent (L.Subp_Params_Types, R.Subp_Params_Types) and then L.Subp_Return_Type = R.Subp_Return_Type;
      end Equivalent;
      -----------------
      -- Trace_Image --
      -----------------
      pragma Warnings (Off, "referenced");
      function Trace_Image (R : Internal_User_Defined_Function_Subp_Spec) return String is
         pragma Warnings (On, "referenced");
      begin
            return
              ("("
                     & "Subp_Params_Types => " & Trace_Image (R.Subp_Params_Types)
                        & ", "
                     & "Subp_Return_Type => " & Trace_Image (R.Subp_Return_Type)
               & ")");
      end Trace_Image;
   type Ada_Node_P_Is_Not_Null_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         null;
   end record;
      overriding function Call
        (Self : Ada_Node_P_Is_Not_Null_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Ada_Node_P_Is_Not_Null_0_Predicate) return String;
   function Create_Ada_Node_P_Is_Not_Null_0_Predicate
      return Ada_Node_P_Is_Not_Null_0_Predicate is
   begin
      return Ada_Node_P_Is_Not_Null_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Ada_Node_P_Is_Not_Null_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
         pragma Unreferenced (Self);
      Node : Bare_Ada_Node;
   begin
      Node := Entity.Node;
      return Ada_Node_P_Is_Not_Null (Node, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Ada_Node_P_Is_Not_Null_0_Predicate) return String is
   begin
      return "AdaNode.is_not_null";
   end Image;
   type Ada_Node_P_Missing_Entity_Error_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Error_Location : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Ada_Node_P_Missing_Entity_Error_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
      overriding procedure Failed
        (Self : Ada_Node_P_Missing_Entity_Error_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   ;
   overriding function Image (Self : Ada_Node_P_Missing_Entity_Error_0_Predicate) return String;
   function Create_Ada_Node_P_Missing_Entity_Error_0_Predicate
   (
         Error_Location : Bare_Ada_Node
   )
      return Ada_Node_P_Missing_Entity_Error_0_Predicate is
   begin
      return Ada_Node_P_Missing_Entity_Error_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Error_Location => Error_Location);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Ada_Node_P_Missing_Entity_Error_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
         pragma Unreferenced (Self);
      Node : Bare_Ada_Node;
   begin
      Node := Entity.Node;
      return Ada_Node_P_Missing_Entity_Error (Node);
   end Call;
   ------------
   -- Failed --
   ------------
      overriding procedure Failed
        (Self : Ada_Node_P_Missing_Entity_Error_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   is
      Args : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (0);
      Contexts : Internal_Logic_Context_Array_Access :=
         Create_Internal_Logic_Context_Array (Ctxs'Length);
      Diag : constant Internal_Solver_Diagnostic :=
        (Message_Template => Create_String ("no such entity"),
         Args             => Args,
         Contexts         => Contexts,
         Location         => Self.Error_Location,
         Round            => Round);
   begin
      for I in Ctxs'Range loop
         Contexts.Items (I) := Ctxs (I).all;
      end loop;
      Emitter (Diag);
   end Failed;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Ada_Node_P_Missing_Entity_Error_0_Predicate) return String is
   begin
      return "AdaNode.missing_entity_error";
   end Image;
   type Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Internal_Entity_Basic_Decl;
         Field_1 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate) return String;
   function Create_Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate
   (
         Field_0 : Internal_Entity_Basic_Decl;
         Field_1 : Bare_Ada_Node
   )
      return Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate is
   begin
      return Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Field_1 => Field_1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Basic_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Basic_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Basic_Decl_P_Subp_Decl_Match_Signature (Node, Other => Self.Field_0, Origin => Self.Field_1, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate) return String is
   begin
      return "BasicDecl.subp_decl_match_signature";
   end Image;
   type Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Internal_Entity_Basic_Decl;
         Field_1 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate) return String;
   function Create_Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate
   (
         Field_0 : Internal_Entity_Basic_Decl;
         Field_1 : Bare_Ada_Node
   )
      return Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate is
   begin
      return Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Field_1 => Field_1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Basic_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Basic_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Basic_Decl_P_Access_To_Subp_Decl_Match_Signature (Node, Other => Self.Field_0, Origin => Self.Field_1, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate) return String is
   begin
      return "BasicDecl.access_to_subp_decl_match_signature";
   end Image;
   type Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate is
   new Solver_Ifc.N_Predicate_Type
   with record
         Field_0 : Internal_Entity_Basic_Decl;
         Field_1 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   ;
   overriding function Image (Self : Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate) return String;
   function Create_Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate
   (
         Field_0 : Internal_Entity_Basic_Decl;
         Field_1 : Bare_Ada_Node
   )
      return Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate is
   begin
      return Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate'(N => 2, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Field_1 => Field_1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   is
         Entity : Internal_Entity := Entities (1);
      Node : Bare_Basic_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Basic_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
               if Entities (2).Node /= null
                  and then Entities (2).Node.Kind
                           not in Ada_Basic_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Basic_Decl_P_Subp_Renaming_Decl_Match_Signature (Node, (Node => Entities (2).Node, Info => Entities (2).Info), Other => Self.Field_0, Origin => Self.Field_1, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate) return String is
   begin
      return "BasicDecl.subp_renaming_decl_match_signature";
   end Image;
   type Basic_Decl_P_Is_Subprogram_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         null;
   end record;
      overriding function Call
        (Self : Basic_Decl_P_Is_Subprogram_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Basic_Decl_P_Is_Subprogram_0_Predicate) return String;
   function Create_Basic_Decl_P_Is_Subprogram_0_Predicate
      return Basic_Decl_P_Is_Subprogram_0_Predicate is
   begin
      return Basic_Decl_P_Is_Subprogram_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Basic_Decl_P_Is_Subprogram_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
         pragma Unreferenced (Self);
      Node : Bare_Basic_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Basic_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Basic_Decl_P_Is_Subprogram (Node);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Basic_Decl_P_Is_Subprogram_0_Predicate) return String is
   begin
      return "BasicDecl.is_subprogram";
   end Image;
   type Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Internal_Entity_Base_Type_Decl;
         Field_1 : Boolean;
   end record;
      overriding function Call
        (Self : Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate) return String;
   function Create_Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate
   (
         Field_0 : Internal_Entity_Base_Type_Decl;
         Field_1 : Boolean
   )
      return Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate is
   begin
      return Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Field_1 => Field_1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Basic_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Basic_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Basic_Decl_P_Is_Stream_Subprogram_For_Type (Node, Typ => Self.Field_0, Return_Obj => Self.Field_1, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate) return String is
   begin
      return "BasicDecl.is_stream_subprogram_for_type";
   end Image;
   type Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Internal_Entity_Base_Type_Decl;
   end record;
      overriding function Call
        (Self : Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate) return String;
   function Create_Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate
   (
         Field_0 : Internal_Entity_Base_Type_Decl
   )
      return Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate is
   begin
      return Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Basic_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Basic_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Basic_Decl_P_Is_Put_Image_Subprogram_For_Type (Node, Typ => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate) return String is
   begin
      return "BasicDecl.is_put_image_subprogram_for_type";
   end Image;
   type Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Array_Or_Rec (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_array_or_rec";
   end Image;
   type Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Non_Null_Char_Type (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_non_null_char_type";
   end Image;
   type Base_Type_Decl_P_Is_Universal_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         null;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Universal_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Universal_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Universal_Type_0_Predicate
      return Base_Type_Decl_P_Is_Universal_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Universal_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Universal_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
         pragma Unreferenced (Self);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Universal_Type (Node, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Universal_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_universal_type";
   end Image;
   type Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         null;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate
      return Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
         pragma Unreferenced (Self);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Not_Universal_Type (Node, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_not_universal_type";
   end Image;
   type Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Access_Type_Predicate (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_access_type_predicate";
   end Image;
   type Base_Type_Decl_P_Is_Iterator_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Iterator_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Iterator_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Iterator_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Iterator_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Iterator_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Iterator_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Iterator_Type (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Iterator_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_iterator_type";
   end Image;
   type Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         null;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate
      return Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
         pragma Unreferenced (Self);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Not_Root_Int_Type (Node, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_not_root_int_type";
   end Image;
   type Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Error_Location : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate
   (
         Error_Location : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Error_Location => Error_Location);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
         pragma Unreferenced (Self);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Not_Any_Type (Node);
   end Call;
   ------------
   -- Failed --
   ------------
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   is
      Args : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (0);
      Contexts : Internal_Logic_Context_Array_Access :=
         Create_Internal_Logic_Context_Array (Ctxs'Length);
      Diag : constant Internal_Solver_Diagnostic :=
        (Message_Template => Create_String ("No inferable type for expression"),
         Args             => Args,
         Contexts         => Contexts,
         Location         => Self.Error_Location,
         Round            => Round);
   begin
      for I in Ctxs'Range loop
         Contexts.Items (I) := Ctxs (I).all;
      end loop;
      Emitter (Diag);
   end Failed;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_not_any_type";
   end Image;
   type Base_Type_Decl_P_Allows_String_Literal_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Allows_String_Literal_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Allows_String_Literal_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   ;
   overriding function Image (Self : Base_Type_Decl_P_Allows_String_Literal_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Allows_String_Literal_0_Predicate
   (
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Allows_String_Literal_0_Predicate is
   begin
      return Base_Type_Decl_P_Allows_String_Literal_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Error_Location => Error_Location);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Allows_String_Literal_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Allows_String_Literal (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   ------------
   -- Failed --
   ------------
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Allows_String_Literal_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   is
      Args : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (1);
      Contexts : Internal_Logic_Context_Array_Access :=
         Create_Internal_Logic_Context_Array (Ctxs'Length);
      Diag : constant Internal_Solver_Diagnostic :=
        (Message_Template => Create_String ("{} does not allow string literals"),
         Args             => Args,
         Contexts         => Contexts,
         Location         => Self.Error_Location,
         Round            => Round);
   begin
      Args.Items (1) := Entity;
      for I in Ctxs'Range loop
         Contexts.Items (I) := Ctxs (I).all;
      end loop;
      Emitter (Diag);
   end Failed;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Allows_String_Literal_0_Predicate) return String is
   begin
      return "BaseTypeDecl.allows_string_literal";
   end Image;
   type Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate is
   new Solver_Ifc.N_Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate'(N => 2, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   is
         Entity : Internal_Entity := Entities (1);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
               if Entities (2).Node /= null
                  and then Entities (2).Node.Kind
                           not in Ada_Basic_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Subp_Access_Of (Node, (Node => Entities (2).Node, Info => Entities (2).Info), Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_subp_access_of";
   end Image;
   type Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate
   (
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Error_Location => Error_Location);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Tagged_Type_With_Deref (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   ------------
   -- Failed --
   ------------
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   is
      Args : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (1);
      Contexts : Internal_Logic_Context_Array_Access :=
         Create_Internal_Logic_Context_Array (Ctxs'Length);
      Diag : constant Internal_Solver_Diagnostic :=
        (Message_Template => Create_String ("expected tagged type, got {}"),
         Args             => Args,
         Contexts         => Contexts,
         Location         => Self.Error_Location,
         Round            => Round);
   begin
      Args.Items (1) := Entity;
      for I in Ctxs'Range loop
         Contexts.Items (I) := Ctxs (I).all;
      end loop;
      Emitter (Diag);
   end Failed;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_tagged_type_with_deref";
   end Image;
   type Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Array_Def_With_Deref (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_array_def_with_deref";
   end Image;
   type Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_array_def_with_deref_or_null";
   end Image;
   type Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate is
   new Solver_Ifc.N_Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate'(N => 2, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   is
         Entity : Internal_Entity := Entities (1);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
               if Entities (2).Node /= null
                  and then Entities (2).Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Matching_Prefix_Type (Node, (Node => Entities (2).Node, Info => Entities (2).Info), Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.matching_prefix_type";
   end Image;
   type Base_Type_Decl_P_Matching_Formal_Type_0_Predicate is
   new Solver_Ifc.N_Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Formal_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   ;
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Matching_Formal_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   ;
   overriding function Image (Self : Base_Type_Decl_P_Matching_Formal_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Matching_Formal_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Matching_Formal_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Matching_Formal_Type_0_Predicate'(N => 2, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Error_Location => Error_Location);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Formal_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   is
         Entity : Internal_Entity := Entities (1);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
               if Entities (2).Node /= null
                  and then Entities (2).Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Matching_Formal_Type (Node, (Node => Entities (2).Node, Info => Entities (2).Info), Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   ------------
   -- Failed --
   ------------
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Matching_Formal_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   is
      Args : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (2);
      Contexts : Internal_Logic_Context_Array_Access :=
         Create_Internal_Logic_Context_Array (Ctxs'Length);
      Diag : constant Internal_Solver_Diagnostic :=
        (Message_Template => Create_String ("expected {}, got {}"),
         Args             => Args,
         Contexts         => Contexts,
         Location         => Self.Error_Location,
         Round            => Round);
   begin
      Args.Items (1) := Entities (2);
      Args.Items (2) := Entities (1);
      for I in Ctxs'Range loop
         Contexts.Items (I) := Ctxs (I).all;
      end loop;
      Emitter (Diag);
   end Failed;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Matching_Formal_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.matching_formal_type";
   end Image;
   type Base_Type_Decl_P_Matching_Membership_Type_0_Predicate is
   new Solver_Ifc.N_Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Membership_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Matching_Membership_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Matching_Membership_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Matching_Membership_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Matching_Membership_Type_0_Predicate'(N => 2, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Membership_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   is
         Entity : Internal_Entity := Entities (1);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
               if Entities (2).Node /= null
                  and then Entities (2).Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Matching_Membership_Type (Node, (Node => Entities (2).Node, Info => Entities (2).Info), Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Matching_Membership_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.matching_membership_type";
   end Image;
   type Base_Type_Decl_P_Matching_Assign_Type_0_Predicate is
   new Solver_Ifc.N_Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Assign_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   ;
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Matching_Assign_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   ;
   overriding function Image (Self : Base_Type_Decl_P_Matching_Assign_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Matching_Assign_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Matching_Assign_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Matching_Assign_Type_0_Predicate'(N => 2, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Error_Location => Error_Location);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Assign_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   is
         Entity : Internal_Entity := Entities (1);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
               if Entities (2).Node /= null
                  and then Entities (2).Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Matching_Assign_Type (Node, (Node => Entities (2).Node, Info => Entities (2).Info), Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   ------------
   -- Failed --
   ------------
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Matching_Assign_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   is
      Args : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (2);
      Contexts : Internal_Logic_Context_Array_Access :=
         Create_Internal_Logic_Context_Array (Ctxs'Length);
      Diag : constant Internal_Solver_Diagnostic :=
        (Message_Template => Create_String ("expected {}, got {}"),
         Args             => Args,
         Contexts         => Contexts,
         Location         => Self.Error_Location,
         Round            => Round);
   begin
      Args.Items (1) := Entities (2);
      Args.Items (2) := Entities (1);
      for I in Ctxs'Range loop
         Contexts.Items (I) := Ctxs (I).all;
      end loop;
      Emitter (Diag);
   end Failed;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Matching_Assign_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.matching_assign_type";
   end Image;
   type Base_Type_Decl_P_Matching_Type_0_Predicate is
   new Solver_Ifc.N_Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   ;
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Matching_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   ;
   overriding function Image (Self : Base_Type_Decl_P_Matching_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Matching_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Matching_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Matching_Type_0_Predicate'(N => 2, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Error_Location => Error_Location);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array
        ) return Boolean
   is
         Entity : Internal_Entity := Entities (1);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
               if Entities (2).Node /= null
                  and then Entities (2).Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Matching_Type (Node, (Node => Entities (2).Node, Info => Entities (2).Info), Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   ------------
   -- Failed --
   ------------
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Matching_Type_0_Predicate;
            Entities : Entity_Vars.Value_Array;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   is
      Args : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (2);
      Contexts : Internal_Logic_Context_Array_Access :=
         Create_Internal_Logic_Context_Array (Ctxs'Length);
      Diag : constant Internal_Solver_Diagnostic :=
        (Message_Template => Create_String ("expected {}, got {}"),
         Args             => Args,
         Contexts         => Contexts,
         Location         => Self.Error_Location,
         Round            => Round);
   begin
      Args.Items (1) := Entities (2);
      Args.Items (2) := Entities (1);
      for I in Ctxs'Range loop
         Contexts.Items (I) := Ctxs (I).all;
      end loop;
      Emitter (Diag);
   end Failed;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Matching_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.matching_type";
   end Image;
   type Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Internal_Entity_Base_Type_Decl;
         Field_1 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate
   (
         Field_0 : Internal_Entity_Base_Type_Decl;
         Field_1 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Field_1 => Field_1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Matching_Allocator_Type (Node, Allocated_Type => Self.Field_0, Origin => Self.Field_1, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.matching_allocator_type";
   end Image;
   type Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   ;
   overriding function Image (Self : Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node;
         Error_Location : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0, Error_Location => Error_Location);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Base_Type_Decl_P_Derives_From_Std_Bool_Type (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   ------------
   -- Failed --
   ------------
      overriding procedure Failed
        (Self : Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate;
            Entity : Internal_Entity;
         Ctxs    : Solver_Ifc.Logic_Context_Array;
         Round   : Natural;
         Emitter : Solver_Ifc.Diagnostic_Emitter
        )
   is
      Args : Internal_Entity_Array_Access :=
         Create_Internal_Entity_Array (1);
      Contexts : Internal_Logic_Context_Array_Access :=
         Create_Internal_Logic_Context_Array (Ctxs'Length);
      Diag : constant Internal_Solver_Diagnostic :=
        (Message_Template => Create_String ("expected boolean type, got {}"),
         Args             => Args,
         Contexts         => Contexts,
         Location         => Self.Error_Location,
         Round            => Round);
   begin
      Args.Items (1) := Entity;
      for I in Ctxs'Range loop
         Contexts.Items (I) := Ctxs (I).all;
      end loop;
      Emitter (Diag);
   end Failed;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.derives_from_std_bool_type";
   end Image;
   type Base_Type_Decl_P_Is_Task_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         null;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Task_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Task_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Task_Type_0_Predicate
      return Base_Type_Decl_P_Is_Task_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Task_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Task_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
         pragma Unreferenced (Self);
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Dispatcher_Base_Type_Decl_P_Is_Task_Type (Node, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Task_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_task_type";
   end Image;
   type Base_Type_Decl_P_Is_Discrete_Type_0_Predicate is
   new Solver_Ifc.Predicate_Type
   with record
         Field_0 : Bare_Ada_Node;
   end record;
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Discrete_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   ;
   overriding function Image (Self : Base_Type_Decl_P_Is_Discrete_Type_0_Predicate) return String;
   function Create_Base_Type_Decl_P_Is_Discrete_Type_0_Predicate
   (
         Field_0 : Bare_Ada_Node
   )
      return Base_Type_Decl_P_Is_Discrete_Type_0_Predicate is
   begin
      return Base_Type_Decl_P_Is_Discrete_Type_0_Predicate'(Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Ref_Count => 1, Field_0 => Field_0);
   end;
   ----------
   -- Call --
   ----------
      overriding function Call
        (Self : Base_Type_Decl_P_Is_Discrete_Type_0_Predicate;
            Entity : Internal_Entity
        ) return Boolean
   is
      Node : Bare_Base_Type_Decl;
   begin
               if Entity.Node /= null
                  and then Entity.Node.Kind
                           not in Ada_Base_Type_Decl
               then
                  Raise_Property_Exception
                    (Node, Property_Error'Identity, "mismatching node type");
               end if;
      Node := Entity.Node;
      return Dispatcher_Base_Type_Decl_P_Is_Discrete_Type (Node, Origin => Self.Field_0, E_Info => Entity.Info);
   end Call;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Base_Type_Decl_P_Is_Discrete_Type_0_Predicate) return String is
   begin
      return "BaseTypeDecl.is_discrete_type";
   end Image;
   type Logic_Functor_887 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_887; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_887) return String;
   overriding function Convert (Self : Logic_Functor_887; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Accessed_Type_No_Call (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_887) return String is
   begin
      return ("BaseTypeDecl.accessed_type_no_call");
   end Image;
   type Logic_Functor_845 is new Solver_Ifc.Converter_Type with
      null record;
   overriding function Convert (Self : Logic_Functor_845; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_845) return String;
   overriding function Convert (Self : Logic_Functor_845; From : Internal_Entity) return Internal_Entity is
         pragma Unreferenced (Self);
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Anonymous_Access_Type_Or_Null (Node => From.Node, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_845) return String is
   begin
      return ("BaseTypeDecl.anonymous_access_type_or_null");
   end Image;
   type Logic_Functor_869 is new Solver_Ifc.Combiner_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Combine (Self : Logic_Functor_869; Vals : Entity_Vars.Value_Array) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_869) return String;
   overriding function Combine (Self : Logic_Functor_869; Vals : Entity_Vars.Value_Array) return Internal_Entity is
         From : constant Internal_Entity := Vals (1);
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for comb_prop");
            end if;
            if Vals (2).Node /= null
               and then Vals (2).Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for comb_prop");
            end if;
      Ret := Base_Type_Decl_P_Array_Concat_Result_Type (Node => From.Node, Other => (Node => Vals (2).Node,  Info => Vals (2).Info), Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Combine;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_869) return String is
   begin
      return ("BaseTypeDecl.array_concat_result_type");
   end Image;
   type Logic_Functor_843 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_843; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_843) return String;
   overriding function Convert (Self : Logic_Functor_843; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Base_Subtype (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_843) return String is
   begin
      return ("BaseTypeDecl.base_subtype");
   end Image;
   type Logic_Functor_897 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_897; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_897) return String;
   overriding function Convert (Self : Logic_Functor_897; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Comp_Type (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_897) return String is
   begin
      return ("BaseTypeDecl.comp_type");
   end Image;
   type Logic_Functor_921 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_921; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_921) return String;
   overriding function Convert (Self : Logic_Functor_921; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Basic_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Corresponding_Char_Literal (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_921) return String is
   begin
      return ("BaseTypeDecl.corresponding_char_literal");
   end Image;
   type Logic_Functor_880 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_880; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_880) return String;
   overriding function Convert (Self : Logic_Functor_880; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Cursor_Type (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_880) return String is
   begin
      return ("BaseTypeDecl.cursor_type");
   end Image;
   type Logic_Functor_868 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_868; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_868) return String;
   overriding function Convert (Self : Logic_Functor_868; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Derefed_Base_Subtype (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_868) return String is
   begin
      return ("BaseTypeDecl.derefed_base_subtype");
   end Image;
   type Logic_Functor_867 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_867; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_867) return String;
   overriding function Convert (Self : Logic_Functor_867; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Derefed_Type (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_867) return String is
   begin
      return ("BaseTypeDecl.derefed_type");
   end Image;
   type Logic_Functor_870 is new Solver_Ifc.Combiner_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Combine (Self : Logic_Functor_870; Vals : Entity_Vars.Value_Array) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_870) return String;
   overriding function Combine (Self : Logic_Functor_870; Vals : Entity_Vars.Value_Array) return Internal_Entity is
         From : constant Internal_Entity := Vals (1);
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for comb_prop");
            end if;
            if Vals (2).Node /= null
               and then Vals (2).Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for comb_prop");
            end if;
      Ret := Base_Type_Decl_P_Expected_Array_Concat_Operand_Type (Node => From.Node, Operand_Type => (Node => Vals (2).Node,  Info => Vals (2).Info), Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Combine;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_870) return String is
   begin
      return ("BaseTypeDecl.expected_array_concat_operand_type");
   end Image;
   type Logic_Functor_902 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_902; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_902) return String;
   overriding function Convert (Self : Logic_Functor_902; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Iterable_Comp_Type_Or_Null (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_902) return String is
   begin
      return ("BaseTypeDecl.iterable_comp_type_or_null");
   end Image;
   type Logic_Functor_872 is new Solver_Ifc.Converter_Type with
      null record;
   overriding function Convert (Self : Logic_Functor_872; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_872) return String;
   overriding function Convert (Self : Logic_Functor_872; From : Internal_Entity) return Internal_Entity is
         pragma Unreferenced (Self);
      Ret : Internal_Entity_Discrete_Base_Subtype_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Base_Type_Decl_P_Scalar_Base_Type (Node => From.Node, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_872) return String is
   begin
      return ("BaseTypeDecl.scalar_base_type");
   end Image;
   type Logic_Functor_682 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_682; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_682) return String;
   overriding function Convert (Self : Logic_Functor_682; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Basic_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Basic_Decl_P_Identity_Type (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_682) return String is
   begin
      return ("BasicDecl.identity_type");
   end Image;
   type Logic_Functor_947 is new Solver_Ifc.Converter_Type with
      null record;
   overriding function Convert (Self : Logic_Functor_947; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_947) return String;
   overriding function Convert (Self : Logic_Functor_947; From : Internal_Entity) return Internal_Entity is
         pragma Unreferenced (Self);
      Ret : Internal_Entity_Classwide_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Base_Type_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => From.Node, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_947) return String is
   begin
      return ("BaseTypeDecl.classwide_type");
   end Image;
   type Logic_Functor_722 is new Solver_Ifc.Converter_Type with
      record
            Origin : Bare_Ada_Node;
      end record;
   overriding function Convert (Self : Logic_Functor_722; From : Internal_Entity) return Internal_Entity with Inline;
   overriding function Image (Self : Logic_Functor_722) return String;
   overriding function Convert (Self : Logic_Functor_722; From : Internal_Entity) return Internal_Entity is
      Ret : Internal_Entity_Base_Type_Decl;
   begin
            if From.Node /= null
               and then From.Node.Kind not in
                 Ada_Basic_Decl
            then
               Raise_Property_Exception
                 (From.Node,
                  Property_Error'Identity,
                  "mismatching node type for conv_prop");
            end if;
      Ret := Dispatcher_Basic_Decl_P_Expr_Type (Node => From.Node, Origin => Self.Origin, E_Info => From.Info);
      return (Node => Ret.Node, Info => Ret.Info);
   end Convert;
   -----------
   -- Image --
   -----------
   overriding function Image (Self : Logic_Functor_722) return String is
   begin
      return ("BasicDecl.expr_type");
   end Image;
   --
   --  Primitives for Bare_Ada_Node
   --
--# property-start AdaNode.declarative_scope ada/nodes.lkt:48
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Declarative_Scope
  (Node : Bare_Ada_Node
  )
   return Bare_Declarative_Part
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Bare_Declarative_Part;
            procedure Finalizer_Scope_5 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result : Bare_Declarative_Part;
            procedure Finalizer_Scope_5 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_5;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4 '<Cast to DeclarativePart at nodes.lkt:49:9>' Cast_Result ada/nodes.lkt:49
--# expr-start 3 '<Find at nodes.lkt:49:9>' Find_Result ada/nodes.lkt:49
   --# expr-start 1 '<FieldAccess for parents at nodes.lkt:49:9>' Node_Parents ada/nodes.lkt:49
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 1
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 2 '<IsA DeclarativePart at nodes.lkt:49:36>' Is_A ada/nodes.lkt:49
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Declarative_Part_Range; 
--# expr-done 2
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 3
   if Find_Result = null
      or else Find_Result.Kind in Ada_Declarative_Part_Range
   then
      Cast_Result := Find_Result;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 4
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_5;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_5;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Declarative_Scope;
--# end
--# property-start AdaNode.owning_unit_kind ada/nodes.lkt:52
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Owning_Unit_Kind
  (Node : Bare_Ada_Node
  )
   return Analysis_Unit_Kind
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Analysis_Unit_Kind;
      Fld : Internal_Unit;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Fld_2 : Analysis_Unit_Kind;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8 '<FieldAccess for unit_kind at nodes.lkt:53:9>' Fld_2 ada/nodes.lkt:53
--# expr-start 7 '<Cast to CompilationUnit at nodes.lkt:53:9>' Cast_Result ada/nodes.lkt:53
--# expr-start 6 '<FieldAccess for root at nodes.lkt:53:9>' Fld_1 ada/nodes.lkt:53
--# expr-start 5 '<FieldAccess for unit at nodes.lkt:53:9>' Fld ada/nodes.lkt:53
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 5
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Ast_Root;
--# expr-done 6
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Fld_1;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 7
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.unit_kind
Fld_2 := Libadalang.Implementation.Compilation_Unit_P_Unit_Kind (Node => Cast_Result);
--# end
--# expr-done 8
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Owning_Unit_Kind;
--# end
--# property-start AdaNode.withed_unit_helper ada/nodes.lkt:61
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Withed_Unit_Helper
  (Node : Bare_Ada_Node
      ; Unit_Name : Bare_Name
  )
   return Bare_Compilation_Unit
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind unit_name Unit_Name
   Property_Result : Bare_Compilation_Unit;
            procedure Finalizer_Scope_7 with Inline_Always;
      Local_Unit_Name_Array : Symbol_Type_Array_Access;
Local_Spec : Bare_Compilation_Unit;
Local_Body : Bare_Compilation_Unit;
Ignored : Bare_Compilation_Unit;
Var_Expr_0 : Bare_Compilation_Unit;
Var_Expr : Bare_Compilation_Unit;
Fld : Symbol_Type_Array_Access;
Fld_1 : Bare_Compilation_Unit;
Fld_2 : Bare_Compilation_Unit;
Is_Null : Boolean;
If_Result : Bare_Compilation_Unit;
Fld_3 : Bare_Compilation_Unit;
Fld_4 : Bare_Basic_Decl;
Is_A : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Is_Null_1 : Boolean;
If_Result_1 : Boolean;
Is_Null_2 : Boolean;
Is_Null_3 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Bare_Compilation_Unit;
Scope_Result_1 : Bare_Compilation_Unit;
Result_Var_1 : Bare_Compilation_Unit;
Let_Result : Bare_Compilation_Unit;
Let_Result_1 : Bare_Compilation_Unit;
Let_Result_2 : Bare_Compilation_Unit;
Let_Result_3 : Bare_Compilation_Unit;
            procedure Finalizer_Scope_7 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Unit_Name_Array);
            end Finalizer_Scope_7;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 27 '<Let at nodes.lkt:64:9>' Let_Result_3 ada/nodes.lkt:64
--# scope-start
--# expr-start 9 '<FieldAccess for as_symbol_array at nodes.lkt:64:31>' Fld ada/nodes.lkt:64
      if Unit_Name = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Unit_Name);
--# end
--# expr-done 9
Local_Unit_Name_Array := Fld; Inc_Ref (Local_Unit_Name_Array);
--# bind unit_name_array Local_Unit_Name_Array
--# expr-start 26 '<Let at nodes.lkt:65:9>' Let_Result_2 ada/nodes.lkt:65
--# scope-start
--# expr-start 10 '<FieldAccess for designated_compilation_unit at nodes.lkt:66:13>' Fld_1 ada/nodes.lkt:66
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.designated_compilation_unit
Fld_1 := Libadalang.Implementation.Ada_Node_P_Designated_Compilation_Unit (Node => Self, Name => Local_Unit_Name_Array, Kind => Unit_Specification, Not_Found_Is_Error => False);
--# end
--# expr-done 10
Local_Spec := Fld_1; 
--# bind spec Local_Spec
--# expr-start 25 '<Let at nodes.lkt:71:9>' Let_Result_1 ada/nodes.lkt:71
--# scope-start
--# expr-start 13 '<If at nodes.lkt:72:13>' If_Result ada/nodes.lkt:72
--# expr-start 11 '<IsNull at nodes.lkt:72:16>' Is_Null ada/nodes.lkt:72
Is_Null := Local_Spec = null; 
--# expr-done 11
if Is_Null then
   --# expr-start 12 '<FieldAccess for designated_compilation_unit at nodes.lkt:74:17>' Fld_2 ada/nodes.lkt:74
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.designated_compilation_unit
Fld_2 := Libadalang.Implementation.Ada_Node_P_Designated_Compilation_Unit (Node => Self, Name => Local_Unit_Name_Array, Kind => Unit_Body, Not_Found_Is_Error => False);
--# end
--# expr-done 12
   If_Result := Fld_2;
else
   If_Result := No_Bare_Ada_Node;
end if;
--# expr-done 13
Local_Body := If_Result; 
--# bind body Local_Body
--# expr-start 24 '<Let at nodes.lkt:83:9>' Let_Result ada/nodes.lkt:83
--# scope-start
--# expr-start 23 '<If at nodes.lkt:84:13>' If_Result_4 ada/nodes.lkt:84
--# expr-start 21 '<BooleanBinaryOp Or at nodes.lkt:85:17>' If_Result_3 ada/nodes.lkt:85
--# expr-start 17 '<BooleanBinaryOp And at nodes.lkt:85:18>' If_Result_1 ada/nodes.lkt:85
Var_Expr_0 := Local_Body;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 15 '<IsA PackageBody at nodes.lkt:85:34>' Is_A ada/nodes.lkt:85
--# expr-start 14 '<FieldAccess for decl at nodes.lkt:85:34>' Fld_4 ada/nodes.lkt:85
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_4 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Var_Expr_0);
--# end
--# expr-done 14
Is_A := Fld_4 /= null 
and then Fld_4.Kind in Ada_Package_Body_Range; 
--# expr-done 15
Scope_Result := Is_A;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   --# expr-start 16 '<IsNull at nodes.lkt:85:64>' Is_Null_1 ada/nodes.lkt:85
Is_Null_1 := Local_Spec = null; 
--# expr-done 16
   If_Result_1 := Is_Null_1;
else
   If_Result_1 := False;
end if;
--# expr-done 17
if If_Result_1 then
   If_Result_3 := True;
else
   --# expr-start 20 '<BooleanBinaryOp And at nodes.lkt:86:21>' If_Result_2 ada/nodes.lkt:86
--# expr-start 18 '<IsNull at nodes.lkt:86:21>' Is_Null_2 ada/nodes.lkt:86
Is_Null_2 := Local_Spec = null; 
--# expr-done 18
if Is_Null_2 then
   --# expr-start 19 '<IsNull at nodes.lkt:86:38>' Is_Null_3 ada/nodes.lkt:86
Is_Null_3 := Local_Body = null; 
--# expr-done 19
   If_Result_2 := Is_Null_3;
else
   If_Result_2 := False;
end if;
--# expr-done 20
   If_Result_3 := If_Result_2;
end if;
--# expr-done 21
if If_Result_3 then
   --# expr-start 22 '<FieldAccess for designated_compilation_unit at nodes.lkt:88:17>' Fld_3 ada/nodes.lkt:88
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.designated_compilation_unit
Fld_3 := Libadalang.Implementation.Ada_Node_P_Designated_Compilation_Unit (Node => Self, Name => Local_Unit_Name_Array, Kind => Unit_Specification, Not_Found_Is_Error => True);
--# end
--# expr-done 22
   If_Result_4 := Fld_3;
else
   If_Result_4 := No_Bare_Ada_Node;
end if;
--# expr-done 23
Ignored := If_Result_4; 
--# bind _ Ignored
Var_Expr := Local_Spec;
if Var_Expr /= No_Bare_Ada_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Local_Body;
end if;
Let_Result := Result_Var_1; 
--# end
--# expr-done 24
Let_Result_1 := Let_Result; 
--# end
--# expr-done 25
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 26
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 27
         Property_Result := Let_Result_3;
   --# end
      Finalizer_Scope_7;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_7;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Withed_Unit_Helper;
--# end
--# property-start AdaNode.is_contract_aspect ada/nodes.lkt:99
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Is_Contract_Aspect
  (Node : Bare_Ada_Node
      ; Name : Symbol_Type
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind name Name
   Property_Result : Boolean;
      Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Sym_10 : Symbol_Type;
Sym_11 : Symbol_Type;
Sym_12 : Symbol_Type;
Sym_13 : Symbol_Type;
Sym_14 : Symbol_Type;
Sym_15 : Symbol_Type;
Sym_16 : Symbol_Type;
Sym_17 : Symbol_Type;
Sym_18 : Symbol_Type;
Sym_19 : Symbol_Type;
Sym_20 : Symbol_Type;
Sym_21 : Symbol_Type;
Sym_22 : Symbol_Type;
Sym_23 : Symbol_Type;
Sym_24 : Symbol_Type;
Sym_25 : Symbol_Type;
Sym_26 : Symbol_Type;
Sym_27 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
Is_Equal_4 : Boolean;
If_Result_3 : Boolean;
Is_Equal_5 : Boolean;
If_Result_4 : Boolean;
Is_Equal_6 : Boolean;
If_Result_5 : Boolean;
Is_Equal_7 : Boolean;
If_Result_6 : Boolean;
Is_Equal_8 : Boolean;
If_Result_7 : Boolean;
Is_Equal_9 : Boolean;
If_Result_8 : Boolean;
Is_Equal_10 : Boolean;
If_Result_9 : Boolean;
Is_Equal_11 : Boolean;
If_Result_10 : Boolean;
Is_Equal_12 : Boolean;
If_Result_11 : Boolean;
Is_Equal_13 : Boolean;
If_Result_12 : Boolean;
Is_Equal_14 : Boolean;
If_Result_13 : Boolean;
Is_Equal_15 : Boolean;
If_Result_14 : Boolean;
Is_Equal_16 : Boolean;
If_Result_15 : Boolean;
Is_Equal_17 : Boolean;
If_Result_16 : Boolean;
Is_Equal_18 : Boolean;
If_Result_17 : Boolean;
Is_Equal_19 : Boolean;
If_Result_18 : Boolean;
Is_Equal_20 : Boolean;
If_Result_19 : Boolean;
Is_Equal_21 : Boolean;
If_Result_20 : Boolean;
Is_Equal_22 : Boolean;
If_Result_21 : Boolean;
Is_Equal_23 : Boolean;
If_Result_22 : Boolean;
Is_Equal_24 : Boolean;
If_Result_23 : Boolean;
Is_Equal_25 : Boolean;
If_Result_24 : Boolean;
Is_Equal_26 : Boolean;
If_Result_25 : Boolean;
Is_Equal_27 : Boolean;
If_Result_26 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 28 '<Symbol Pre at nodes.lkt:100:17>' Sym ada/nodes.lkt:100
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre); 
--# expr-done 28
Is_Equal_27 := Name = Sym; 
if Is_Equal_27 then
   If_Result_26 := True;
else
--# expr-start 29 '<Symbol Pre'"'"'Class at nodes.lkt:101:15>' Sym_1 ada/nodes.lkt:101
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre_Class); 
--# expr-done 29
Is_Equal_26 := Name = Sym_1; 
if Is_Equal_26 then
   If_Result_25 := True;
else
--# expr-start 30 '<Symbol Post at nodes.lkt:102:15>' Sym_2 ada/nodes.lkt:102
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post); 
--# expr-done 30
Is_Equal_25 := Name = Sym_2; 
if Is_Equal_25 then
   If_Result_24 := True;
else
--# expr-start 31 '<Symbol Post'"'"'Class at nodes.lkt:103:15>' Sym_3 ada/nodes.lkt:103
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post_Class); 
--# expr-done 31
Is_Equal_24 := Name = Sym_3; 
if Is_Equal_24 then
   If_Result_23 := True;
else
--# expr-start 32 '<Symbol Refined_Post at nodes.lkt:104:15>' Sym_4 ada/nodes.lkt:104
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Post); 
--# expr-done 32
Is_Equal_23 := Name = Sym_4; 
if Is_Equal_23 then
   If_Result_22 := True;
else
--# expr-start 33 '<Symbol Precondition at nodes.lkt:105:15>' Sym_5 ada/nodes.lkt:105
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Precondition); 
--# expr-done 33
Is_Equal_22 := Name = Sym_5; 
if Is_Equal_22 then
   If_Result_21 := True;
else
--# expr-start 34 '<Symbol Postcondition at nodes.lkt:106:15>' Sym_6 ada/nodes.lkt:106
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Postcondition); 
--# expr-done 34
Is_Equal_21 := Name = Sym_6; 
if Is_Equal_21 then
   If_Result_20 := True;
else
--# expr-start 35 '<Symbol Precondition'"'"'Class at nodes.lkt:107:15>' Sym_7 ada/nodes.lkt:107
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Precondition_Class); 
--# expr-done 35
Is_Equal_20 := Name = Sym_7; 
if Is_Equal_20 then
   If_Result_19 := True;
else
--# expr-start 36 '<Symbol Postcondition'"'"'Class at nodes.lkt:108:15>' Sym_8 ada/nodes.lkt:108
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Postcondition_Class); 
--# expr-done 36
Is_Equal_19 := Name = Sym_8; 
if Is_Equal_19 then
   If_Result_18 := True;
else
--# expr-start 37 '<Symbol Invariant at nodes.lkt:109:15>' Sym_9 ada/nodes.lkt:109
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Invariant); 
--# expr-done 37
Is_Equal_18 := Name = Sym_9; 
if Is_Equal_18 then
   If_Result_17 := True;
else
--# expr-start 38 '<Symbol Invariant'"'"'Class at nodes.lkt:110:15>' Sym_10 ada/nodes.lkt:110
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Invariant_Class); 
--# expr-done 38
Is_Equal_17 := Name = Sym_10; 
if Is_Equal_17 then
   If_Result_16 := True;
else
--# expr-start 39 '<Symbol Type_Invariant at nodes.lkt:111:15>' Sym_11 ada/nodes.lkt:111
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Type_Invariant); 
--# expr-done 39
Is_Equal_16 := Name = Sym_11; 
if Is_Equal_16 then
   If_Result_15 := True;
else
--# expr-start 40 '<Symbol Type_Invariant'"'"'Class at nodes.lkt:112:15>' Sym_12 ada/nodes.lkt:112
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Type_Invariant_Class); 
--# expr-done 40
Is_Equal_15 := Name = Sym_12; 
if Is_Equal_15 then
   If_Result_14 := True;
else
--# expr-start 41 '<Symbol Predicate at nodes.lkt:113:15>' Sym_13 ada/nodes.lkt:113
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Predicate); 
--# expr-done 41
Is_Equal_14 := Name = Sym_13; 
if Is_Equal_14 then
   If_Result_13 := True;
else
--# expr-start 42 '<Symbol Static_Predicate at nodes.lkt:114:15>' Sym_14 ada/nodes.lkt:114
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Static_Predicate); 
--# expr-done 42
Is_Equal_13 := Name = Sym_14; 
if Is_Equal_13 then
   If_Result_12 := True;
else
--# expr-start 43 '<Symbol Dynamic_Predicate at nodes.lkt:115:15>' Sym_15 ada/nodes.lkt:115
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Dynamic_Predicate); 
--# expr-done 43
Is_Equal_12 := Name = Sym_15; 
if Is_Equal_12 then
   If_Result_11 := True;
else
--# expr-start 44 '<Symbol Default_Initial_Condition at nodes.lkt:116:15>' Sym_16 ada/nodes.lkt:116
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Default_Initial_Condition); 
--# expr-done 44
Is_Equal_11 := Name = Sym_16; 
if Is_Equal_11 then
   If_Result_10 := True;
else
--# expr-start 45 '<Symbol Initial_Condition at nodes.lkt:117:15>' Sym_17 ada/nodes.lkt:117
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Initial_Condition); 
--# expr-done 45
Is_Equal_10 := Name = Sym_17; 
if Is_Equal_10 then
   If_Result_9 := True;
else
--# expr-start 46 '<Symbol Contract_Cases at nodes.lkt:118:15>' Sym_18 ada/nodes.lkt:118
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Contract_Cases); 
--# expr-done 46
Is_Equal_9 := Name = Sym_18; 
if Is_Equal_9 then
   If_Result_8 := True;
else
--# expr-start 47 '<Symbol Test_Case at nodes.lkt:119:15>' Sym_19 ada/nodes.lkt:119
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Test_Case); 
--# expr-done 47
Is_Equal_8 := Name = Sym_19; 
if Is_Equal_8 then
   If_Result_7 := True;
else
--# expr-start 48 '<Symbol Global at nodes.lkt:120:15>' Sym_20 ada/nodes.lkt:120
Sym_20 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Global); 
--# expr-done 48
Is_Equal_7 := Name = Sym_20; 
if Is_Equal_7 then
   If_Result_6 := True;
else
--# expr-start 49 '<Symbol Refined_Global at nodes.lkt:121:15>' Sym_21 ada/nodes.lkt:121
Sym_21 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Global); 
--# expr-done 49
Is_Equal_6 := Name = Sym_21; 
if Is_Equal_6 then
   If_Result_5 := True;
else
--# expr-start 50 '<Symbol Refined_State at nodes.lkt:122:15>' Sym_22 ada/nodes.lkt:122
Sym_22 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_State); 
--# expr-done 50
Is_Equal_5 := Name = Sym_22; 
if Is_Equal_5 then
   If_Result_4 := True;
else
--# expr-start 51 '<Symbol Stable_Properties at nodes.lkt:123:15>' Sym_23 ada/nodes.lkt:123
Sym_23 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Stable_Properties); 
--# expr-done 51
Is_Equal_4 := Name = Sym_23; 
if Is_Equal_4 then
   If_Result_3 := True;
else
--# expr-start 52 '<Symbol Depends at nodes.lkt:124:15>' Sym_24 ada/nodes.lkt:124
Sym_24 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Depends); 
--# expr-done 52
Is_Equal_3 := Name = Sym_24; 
if Is_Equal_3 then
   If_Result_2 := True;
else
--# expr-start 53 '<Symbol Refined_Depends at nodes.lkt:125:15>' Sym_25 ada/nodes.lkt:125
Sym_25 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Depends); 
--# expr-done 53
Is_Equal_2 := Name = Sym_25; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 54 '<Symbol Predicate_Failure at nodes.lkt:126:15>' Sym_26 ada/nodes.lkt:126
Sym_26 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Predicate_Failure); 
--# expr-done 54
Is_Equal_1 := Name = Sym_26; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 55 '<Symbol SPARK_Mode at nodes.lkt:127:15>' Sym_27 ada/nodes.lkt:127
Sym_27 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 55
Is_Equal := Name = Sym_27; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
   If_Result_2 := If_Result_1;
end if;
   If_Result_3 := If_Result_2;
end if;
   If_Result_4 := If_Result_3;
end if;
   If_Result_5 := If_Result_4;
end if;
   If_Result_6 := If_Result_5;
end if;
   If_Result_7 := If_Result_6;
end if;
   If_Result_8 := If_Result_7;
end if;
   If_Result_9 := If_Result_8;
end if;
   If_Result_10 := If_Result_9;
end if;
   If_Result_11 := If_Result_10;
end if;
   If_Result_12 := If_Result_11;
end if;
   If_Result_13 := If_Result_12;
end if;
   If_Result_14 := If_Result_13;
end if;
   If_Result_15 := If_Result_14;
end if;
   If_Result_16 := If_Result_15;
end if;
   If_Result_17 := If_Result_16;
end if;
   If_Result_18 := If_Result_17;
end if;
   If_Result_19 := If_Result_18;
end if;
   If_Result_20 := If_Result_19;
end if;
   If_Result_21 := If_Result_20;
end if;
   If_Result_22 := If_Result_21;
end if;
   If_Result_23 := If_Result_22;
end if;
   If_Result_24 := If_Result_23;
end if;
   If_Result_25 := If_Result_24;
end if;
   If_Result_26 := If_Result_25;
end if;
         Property_Result := If_Result_26;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Is_Contract_Aspect;
--# end
--# property-start AdaNode.aspect_has_forward_visibility ada/nodes.lkt:132
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Aspect_Has_Forward_Visibility
  (Node : Bare_Ada_Node
      ; Name : Symbol_Type
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind name Name
   Property_Result : Boolean;
      Fld : Boolean;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 59 '<BooleanBinaryOp Or at nodes.lkt:133:9>' If_Result_1 ada/nodes.lkt:133
--# expr-start 56 '<FieldAccess for is_contract_aspect at nodes.lkt:133:9>' Fld ada/nodes.lkt:133
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.is_contract_aspect
Fld := Libadalang.Implementation.Ada_Node_P_Is_Contract_Aspect (Node => Self, Name => Name);
--# end
--# expr-done 56
if Fld then
   If_Result_1 := True;
else
--# expr-start 57 '<Symbol Iterator_Element at nodes.lkt:134:20>' Sym ada/nodes.lkt:134
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterator_Element); 
--# expr-done 57
Is_Equal_1 := Name = Sym; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 58 '<Symbol Default_Iterator at nodes.lkt:134:42>' Sym_1 ada/nodes.lkt:134
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Default_Iterator); 
--# expr-done 58
Is_Equal := Name = Sym_1; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
--# expr-done 59
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Aspect_Has_Forward_Visibility;
--# end
--# property-start AdaNode.in_aspect_with_forward_visibility ada/nodes.lkt:136
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_In_Aspect_With_Forward_Visibility
  (Node : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
            procedure Finalizer_Scope_10 with Inline_Always;
      Var_Expr_1 : Bare_Aspect_Assoc;
Var_Expr_2 : Bare_Pragma_Node;
Var_Expr : Boolean;
Node_Parents : Bare_Ada_Node_Array_Access;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Aspect_Assoc;
Fld : Bare_Name;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld_1 : Symbol_Type;
Fld_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_1 : Bare_Pragma_Node;
Fld_3 : Bare_Identifier;
As_Entity_1 : Internal_Entity_Identifier;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Identifier;
Fld_4 : Symbol_Type;
Fld_5 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_1 : Boolean;
Result_Var_2 : Boolean;
Find_Result : Bare_Ada_Node;
Is_Null_2 : Boolean;
Not_Val : Boolean;
            procedure Finalizer_Scope_10 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_10;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 73 '<Not at nodes.lkt:137:9>' Not_Val ada/nodes.lkt:137
--# expr-start 72 '<IsNull at nodes.lkt:137:13>' Is_Null_2 ada/nodes.lkt:137
--# expr-start 71 '<Find at nodes.lkt:137:13>' Find_Result ada/nodes.lkt:137
   --# expr-start 60 '<FieldAccess for parents at nodes.lkt:137:13>' Node_Parents ada/nodes.lkt:137
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 60
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
--# expr-start 61 '<Cast to AspectAssoc at nodes.lkt:139:13>' Cast_Result ada/nodes.lkt:139
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Aspect_Assoc_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 61
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind a Var_Expr_1
--# expr-start 65 '<FieldAccess for aspect_has_forward_visibility at nodes.lkt:141:17>' Fld_2 ada/nodes.lkt:141
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 64 '<FieldAccess for name_symbol at nodes.lkt:142:21>' Fld_1 ada/nodes.lkt:142
--# expr-start 63 '<as_bare_entity at nodes.lkt:142:21>' If_Result ada/nodes.lkt:142
--# expr-start 62 '<FieldAccess for id at nodes.lkt:142:21>' Fld ada/nodes.lkt:142
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Var_Expr_1.Aspect_Assoc_F_Id;
--# expr-done 62
Is_Null := Fld = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
As_Entity := (Info => No_Entity_Info, Node => Fld); 
   If_Result := As_Entity;
end if;
--# expr-done 63
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => If_Result.Node);
--# end
--# expr-done 64
--# property-call-start AdaNode.aspect_has_forward_visibility
Fld_2 := Libadalang.Implementation.Ada_Node_P_Aspect_Has_Forward_Visibility (Node => Self, Name => Fld_1);
--# end
--# expr-done 65
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Var_Expr := Result_Var;
if Var_Expr /= False then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_2 := Scope_Result_1;
else
--# expr-start 66 '<Cast to Pragma at nodes.lkt:145:17>' Cast_Result_1 ada/nodes.lkt:145
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result_1 := Cast_Expr_1;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 66
Var_Expr_2 := Cast_Result_1;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind p Var_Expr_2
--# expr-start 70 '<FieldAccess for aspect_has_forward_visibility at nodes.lkt:147:17>' Fld_5 ada/nodes.lkt:147
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 69 '<FieldAccess for name_symbol at nodes.lkt:148:21>' Fld_4 ada/nodes.lkt:148
--# expr-start 68 '<as_bare_entity at nodes.lkt:148:21>' If_Result_1 ada/nodes.lkt:148
--# expr-start 67 '<FieldAccess for id at nodes.lkt:148:21>' Fld_3 ada/nodes.lkt:148
      if Var_Expr_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Var_Expr_2.Pragma_Node_F_Id;
--# expr-done 67
Is_Null_1 := Fld_3 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Identifier;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Fld_3); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 68
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => If_Result_1.Node);
--# end
--# expr-done 69
--# property-call-start AdaNode.aspect_has_forward_visibility
Fld_5 := Libadalang.Implementation.Ada_Node_P_Aspect_Has_Forward_Visibility (Node => Self, Name => Fld_4);
--# end
--# expr-done 70
Scope_Result_2 := Fld_5;
   --# end
   Result_Var_1 := Scope_Result_2;
else
   Result_Var_1 := False;
end if;
   Result_Var_2 := Result_Var_1;
end if;
      if Result_Var_2 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var_2;
         end loop;
      end;
--# expr-done 71
Is_Null_2 := Find_Result = null; 
--# expr-done 72
Not_Val := not (Is_Null_2); 
--# expr-done 73
         Property_Result := Not_Val;
   --# end
      Finalizer_Scope_10;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_10;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_In_Aspect_With_Forward_Visibility;
--# end
--# property-start AdaNode.in_aspect ada/nodes.lkt:155
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_In_Aspect
  (Node : Bare_Ada_Node
      ; Name : Symbol_Type
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind name Name
   Property_Result : Boolean;
            procedure Finalizer_Scope_11 with Inline_Always;
      Var_Expr_1 : Bare_Aspect_Assoc;
Node_Parents : Bare_Ada_Node_Array_Access;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Aspect_Assoc;
Fld : Bare_Name;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Quantifier_Result : Boolean;
            procedure Finalizer_Scope_11 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_11;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 78 '<AnyQuantifier at nodes.lkt:156:9>' Quantifier_Result ada/nodes.lkt:156
   --# expr-start 74 '<FieldAccess for parents at nodes.lkt:156:9>' Node_Parents ada/nodes.lkt:156
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 74
      Quantifier_Result := False;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
--# expr-start 75 '<Cast to AspectAssoc at nodes.lkt:157:20>' Cast_Result ada/nodes.lkt:157
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Aspect_Assoc_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 75
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind a Var_Expr_1
--# expr-start 77 '<FieldAccess for name_is at nodes.lkt:157:48>' Fld_1 ada/nodes.lkt:157
--# expr-start 76 '<FieldAccess for id at nodes.lkt:157:48>' Fld ada/nodes.lkt:157
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Var_Expr_1.Aspect_Assoc_F_Id;
--# expr-done 76
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_1 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld, Sym => Name);
--# end
--# expr-done 77
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      Quantifier_Result := Result_Var;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 78
         Property_Result := Quantifier_Result;
   --# end
      Finalizer_Scope_11;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_11;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_In_Aspect;
--# end
--# property-start AdaNode.empty_env ada/nodes.lkt:160
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Empty_Env
  (Node : Bare_Ada_Node
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_12 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_12 is
            begin
                     Dec_Ref (Node_Parents);
                     Dec_Ref (Fld);
            end Finalizer_Scope_12;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 83 '<FieldAccess for get_empty_env at nodes.lkt:161:9>' Fld ada/nodes.lkt:161
--# expr-start 82 '<Cast to CompilationUnit at nodes.lkt:161:9>' Cast_Result ada/nodes.lkt:161
--# expr-start 81 '<Find at nodes.lkt:161:9>' Find_Result ada/nodes.lkt:161
   --# expr-start 79 '<FieldAccess for parents at nodes.lkt:161:9>' Node_Parents ada/nodes.lkt:161
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 79
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 80 '<IsA CompilationUnit at nodes.lkt:161:36>' Is_A ada/nodes.lkt:161
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Compilation_Unit_Range; 
--# expr-done 80
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 81
   if Find_Result = null
      or else Find_Result.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Find_Result;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 82
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Compilation_Unit_P_Get_Empty_Env (Node => Cast_Result);
--# expr-done 83
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_12;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_12;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Empty_Env;
--# end
--# property-start AdaNode.is_not_null ada/nodes.lkt:166
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Is_Not_Null
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 85 '<Not at nodes.lkt:171:9>' Not_Val ada/nodes.lkt:171
--# expr-start 84 '<IsNull at nodes.lkt:171:13>' Is_Null ada/nodes.lkt:171
Is_Null := Ent.Node = null; 
--# expr-done 84
Not_Val := not (Is_Null); 
--# expr-done 85
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Is_Not_Null;
--# end
--# property-start AdaNode.eval_discrete_range ada/nodes.lkt:174
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Eval_Discrete_Range
  (Node : Bare_Ada_Node
      ; Dr : Internal_Discrete_Range
  )
   return Internal_Eval_Discrete_Range
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind dr Dr
   Property_Result : Internal_Eval_Discrete_Range;
            procedure Finalizer_Scope_14 with Inline_Always;
            procedure Finalizer_Scope_1908 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Entity_Expr;
Fld_1 : Big_Integer_Type;
Scope_Result : Big_Integer_Type;
Big_Int : Big_Integer_Type;
Result_Var : Big_Integer_Type;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Big_Integer_Type;
New_Struct : Internal_Eval_Discrete_Range := No_Eval_Discrete_Range;
Is_Equal : Boolean;
If_Result : Internal_Eval_Discrete_Range := No_Eval_Discrete_Range;
            procedure Finalizer_Scope_14 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Big_Int);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_3);
                     Dec_Ref (New_Struct);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_14;
            procedure Finalizer_Scope_1908 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1908;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 93 '<If at nodes.lkt:175:9>' If_Result ada/nodes.lkt:175
--# expr-start 86 '<Eq at nodes.lkt:175:12>' Is_Equal ada/nodes.lkt:175
Is_Equal := Dr = No_Discrete_Range; 
--# expr-done 86
if Is_Equal then
   If_Result := raise Precondition_Failure with "Attempting to evaluate a null discrete range";
else
   --# expr-start 92 '<New EvalDiscreteRange at nodes.lkt:181:13>' New_Struct ada/nodes.lkt:181
--# expr-start 88 '<FieldAccess for eval_as_int at nodes.lkt:186:28>' Fld_3 ada/nodes.lkt:186
--# expr-start 87 '<FieldAccess for high_bound at nodes.lkt:186:28>' Fld_2 ada/nodes.lkt:186
Fld_2 := Dr.High_Bound;
--# expr-done 87
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_3 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 88
--# expr-start 89 '<FieldAccess for low_bound at nodes.lkt:182:27>' Fld ada/nodes.lkt:182
Fld := Dr.Low_Bound;
--# expr-done 89
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind lb Var_Expr_0
--# expr-start 90 '<FieldAccess for eval_as_int at nodes.lkt:183:29>' Fld_1 ada/nodes.lkt:183
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_1 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 90
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_1908;
   Result_Var := Scope_Result;
else
   --# expr-start 91 '<BigInteger 0 at nodes.lkt:184:33>' Big_Int ada/nodes.lkt:184
Big_Int := Create_Big_Integer ("0"); 
--# expr-done 91
   Result_Var := Big_Int;
end if;
      Inc_Ref (Result_Var);
Inc_Ref (Fld_3);
Inc_Ref (Result_Var);
New_Struct := (High_Bound => Fld_3, Low_Bound => Result_Var); 
--# expr-done 92
   If_Result := New_Struct;
end if;
      Inc_Ref (If_Result);
--# expr-done 93
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_14;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_14;
                     Finalizer_Scope_1908;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Eval_Discrete_Range;
--# end
--# property-start AdaNode.sym_join ada/nodes.lkt:190
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Sym_Join
  (Node : Bare_Ada_Node
      ; Syms : Symbol_Type_Array_Access
      ; Sep : String_Type
  )
   return String_Type
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind syms Syms
   --# bind sep Sep
   Property_Result : String_Type;
            procedure Finalizer_Scope_15 with Inline_Always;
            procedure Finalizer_Scope_1909 with Inline_Always;
      Fld : String_Type;
Map_Result : String_Type_Array_Access;
Join_Result : String_Type;
            procedure Finalizer_Scope_15 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Join_Result);
            end Finalizer_Scope_15;
            procedure Finalizer_Scope_1909 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1909;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 96 '<Join at nodes.lkt:191:9>' Join_Result ada/nodes.lkt:191
--# expr-start 95 '<Map at nodes.lkt:191:18>' Map_Result ada/nodes.lkt:191
      declare
         Map_Result_Vec : String_Type_Vectors.Vector;
      begin
      declare
         Collection : constant Symbol_Type_Array_Access := Syms;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind s Item_0
      --# expr-start 94 '<FieldAccess for image at nodes.lkt:191:34>' Fld ada/nodes.lkt:191
Fld := Libadalang.Implementation.Image (Self => Item_0);
--# expr-done 94
         declare
            Item_To_Append : constant String_Type := Fld;
         begin
               Inc_Ref (Item_To_Append);
            String_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_1909;
         end loop;
      end;
         Map_Result := Create_String_Type_Array
           (Items_Count => Natural (String_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := String_Type_Vectors.Get
              (Map_Result_Vec,
               I + String_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         String_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 95
Join_Result := Join_Strings (Sep, Map_Result); 
--# expr-done 96
         Property_Result := Join_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_15;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_15;
                     Finalizer_Scope_1909;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Sym_Join;
--# end
--# property-start AdaNode.enclosing_compilation_unit ada/nodes.lkt:199
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Enclosing_Compilation_Unit
  (Node : Bare_Ada_Node
  )
   return Bare_Compilation_Unit
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit;
            procedure Finalizer_Scope_16 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
            procedure Finalizer_Scope_16 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_16;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 100 '<Cast to CompilationUnit at nodes.lkt:200:9>' Cast_Result ada/nodes.lkt:200
--# expr-start 99 '<Find at nodes.lkt:200:9>' Find_Result ada/nodes.lkt:200
   --# expr-start 97 '<FieldAccess for parents at nodes.lkt:200:9>' Node_Parents ada/nodes.lkt:200
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 97
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
      --# expr-start 98 '<IsA CompilationUnit at nodes.lkt:200:36>' Is_A ada/nodes.lkt:200
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Compilation_Unit_Range; 
--# expr-done 98
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 99
   if Find_Result = null
      or else Find_Result.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Find_Result;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 100
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_16;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_16;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Enclosing_Compilation_Unit;
--# end
--# property-start AdaNode.is_children_env ada/nodes.lkt:204
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Is_Children_Env
  (Node : Bare_Ada_Node
      ; Parent : Lexical_Env
      ; Current_Env : Lexical_Env
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind parent Parent
   --# bind current_env Current_Env
   Property_Result : Boolean;
            procedure Finalizer_Scope_17 with Inline_Always;
      Env_Parent : Lexical_Env := Empty_Env;
Fld : Boolean;
Is_Equal : Boolean;
If_Result : Boolean;
Is_Equal_1 : Boolean;
If_Result_1 : Boolean;
Is_Equal_2 : Boolean;
If_Result_2 : Boolean;
            procedure Finalizer_Scope_17 is
            begin
                     Dec_Ref (Env_Parent);
            end Finalizer_Scope_17;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 108 '<If at nodes.lkt:205:9>' If_Result_2 ada/nodes.lkt:205
--# expr-start 101 '<Eq at nodes.lkt:205:12>' Is_Equal_2 ada/nodes.lkt:205
Is_Equal_2 := Equivalent (Parent, Empty_Env); 
--# expr-done 101
if Is_Equal_2 then
   If_Result_2 := False;
else
   --# expr-start 107 '<If at nodes.lkt:205:9>' If_Result_1 ada/nodes.lkt:205
--# expr-start 102 '<Eq at nodes.lkt:206:14>' Is_Equal_1 ada/nodes.lkt:206
Is_Equal_1 := Equivalent (Current_Env, Parent); 
--# expr-done 102
if Is_Equal_1 then
   If_Result_1 := True;
else
   --# expr-start 106 '<If at nodes.lkt:205:9>' If_Result ada/nodes.lkt:205
--# expr-start 103 '<IsNull at nodes.lkt:207:14>' Is_Equal ada/nodes.lkt:207
Is_Equal := Equivalent (Current_Env, Empty_Env); 
--# expr-done 103
if Is_Equal then
   If_Result := False;
else
   --# expr-start 105 '<FieldAccess for is_children_env at nodes.lkt:208:14>' Fld ada/nodes.lkt:208
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 104 '<env_parent at nodes.lkt:208:43>' Env_Parent ada/nodes.lkt:208
Env_Parent := AST_Envs.Parent (Current_Env); 
--# expr-done 104
--# property-call-start AdaNode.is_children_env
Fld := Libadalang.Implementation.Ada_Node_P_Is_Children_Env (Node => Self, Parent => Parent, Current_Env => Env_Parent);
--# end
--# expr-done 105
   If_Result := Fld;
end if;
--# expr-done 106
   If_Result_1 := If_Result;
end if;
--# expr-done 107
   If_Result_2 := If_Result_1;
end if;
--# expr-done 108
         Property_Result := If_Result_2;
   --# end
      Finalizer_Scope_17;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_17;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Is_Children_Env;
--# end
--# property-start AdaNode.without_md ada/nodes.lkt:211
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Without_Md
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity;
      Fld : Bare_Ada_Node;
Fld_1 : Internal_Entity_Info;
Fld_2 : Env_Rebindings;
Fld_3 : Internal_Entity_Info;
Fld_4 : Boolean;
New_Struct : Internal_Entity_Info;
New_Struct_1 : Internal_Entity;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 115 '<New AdaNode.entity at nodes.lkt:212:9>' New_Struct_1 ada/nodes.lkt:212
--# expr-start 113 '<New EntityInfo at nodes.lkt:214:18>' New_Struct ada/nodes.lkt:214
--# expr-start 110 '<FieldAccess for from_rebound at nodes.lkt:217:30>' Fld_4 ada/nodes.lkt:217
--# expr-start 109 '<FieldAccess for info at nodes.lkt:217:30>' Fld_3 ada/nodes.lkt:217
Fld_3 := Ent.Info;
--# expr-done 109
Fld_4 := Fld_3.From_Rebound;
--# expr-done 110
--# expr-start 112 '<FieldAccess for rebindings at nodes.lkt:216:28>' Fld_2 ada/nodes.lkt:216
--# expr-start 111 '<FieldAccess for info at nodes.lkt:216:28>' Fld_1 ada/nodes.lkt:216
Fld_1 := Ent.Info;
--# expr-done 111
Fld_2 := Fld_1.Rebindings;
--# expr-done 112
New_Struct := (From_Rebound => Fld_4, Md => No_Metadata, Rebindings => Fld_2); 
--# expr-done 113
--# expr-start 114 '<FieldAccess for node at nodes.lkt:213:18>' Fld ada/nodes.lkt:213
Fld := Ent.Node;
--# expr-done 114
New_Struct_1 := (Info => New_Struct, Node => Fld); 
--# expr-done 115
         Property_Result := New_Struct_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Without_Md;
--# end
--# property-start AdaNode.get_uninstantiated_node ada/nodes.lkt:225
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Get_Uninstantiated_Node
  (Node : Bare_Ada_Node
  )
   return Internal_Entity
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity;
      As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 116 '<as_bare_entity at nodes.lkt:225:54>' If_Result ada/nodes.lkt:225
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 116
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Get_Uninstantiated_Node;
--# end
--# property-start AdaNode.complete ada/nodes.lkt:229
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Complete
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Completion_Item_Iterator_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Completion_Item_Iterator_Access;
            procedure Finalizer_Scope_20 with Inline_Always;
      Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Completion_Item_Array_Access;
Fld_2 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Completion_Item_Array_Access;
Iter : Internal_Completion_Item_Iterator_Access;
Dyn_Var_Bind_Result : Internal_Completion_Item_Iterator_Access;
            procedure Finalizer_Scope_20 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Iter);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_20;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 124 '<bind at nodes.lkt:230:9>' Dyn_Var_Bind_Result ada/nodes.lkt:230
--# expr-start 117 '<FieldAccess for origin_node at nodes.lkt:230:23>' Fld ada/nodes.lkt:230
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 117
Bound_Origin := Fld; 
--# expr-start 123 '<FieldAccess for to_iterator at nodes.lkt:232:9>' Iter ada/nodes.lkt:232
--# expr-start 122 '<Map at nodes.lkt:232:9>' Map_Result ada/nodes.lkt:232
   --# expr-start 118 '<FieldAccess for complete_items at nodes.lkt:232:9>' Fld_1 ada/nodes.lkt:232
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.complete_items'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Complete_Items (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 118
      declare
         Map_Result_Vec : Internal_Completion_Item_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Completion_Item_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
         --# expr-start 121 '<Not at nodes.lkt:239:20>' Not_Val ada/nodes.lkt:239
--# expr-start 120 '<IsA SyntheticSubpDecl, SyntheticObjectDecl at nodes.lkt:239:24>' Is_A ada/nodes.lkt:239
--# expr-start 119 '<FieldAccess for decl at nodes.lkt:239:24>' Fld_2 ada/nodes.lkt:239
Fld_2 := Item_0.Decl;
--# expr-done 119
Is_A := Fld_2.Node /= null 
and then Fld_2.Node.Kind in Ada_Synthetic_Subp_Decl_Range | Ada_Synthetic_Object_Decl_Range; 
--# expr-done 120
Not_Val := not (Is_A); 
--# expr-done 121
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Completion_Item := Item_0;
         begin
            Internal_Completion_Item_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Completion_Item_Array
           (Items_Count => Natural (Internal_Completion_Item_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Completion_Item_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Completion_Item_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Completion_Item_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 122
Iter := To_Iterator (Map_Result, Self.Unit.Context); 
--# expr-done 123
Dyn_Var_Bind_Result := Iter; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 124
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_20;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_20;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Complete;
--# end
--# property-start AdaNode.complete_item_weight_matching_type ada/nodes.lkt:249
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Complete_Item_Weight_Matching_Type
  (Node : Bare_Ada_Node
      ; Item : Internal_Entity_Basic_Decl
      ; Name : Internal_Entity_Name
      ; Origin : Bare_Ada_Node
  )
   return Integer
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind item Item
   --# bind name Name
   --# bind origin Origin
   Property_Result : Integer;
      Local_Te_Not_Null : Boolean;
Local_Td : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Type_Expr;
Var_Expr_2 : Internal_Entity_Basic_Decl;
Var_Expr_3 : Internal_Entity_Type_Expr;
Var_Expr_4 : Internal_Entity_Basic_Decl;
Var_Expr_5 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_Type_Expr;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Bound_Imprecise_Fallback : Boolean;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Internal_Entity_Type_Expr;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result : Boolean;
Dyn_Var_Bind_Result : Boolean;
If_Result_1 : Integer;
Fld_8 : Internal_Entity_Basic_Decl;
Fld_9 : Internal_Entity_Type_Expr;
Fld_10 : Internal_Entity_Base_Type_Decl;
Fld_11 : Boolean;
Scope_Result_3 : Boolean;
Result_Var_3 : Boolean;
Scope_Result_4 : Boolean;
Result_Var_4 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Integer;
Scope_Result_5 : Integer;
Result_Var_5 : Integer;
Let_Result : Integer;
Let_Result_1 : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 145 '<Let at nodes.lkt:253:9>' Let_Result_1 ada/nodes.lkt:253
--# scope-start
--# expr-start 127 '<Not at nodes.lkt:253:27>' Not_Val ada/nodes.lkt:253
--# expr-start 126 '<IsNull at nodes.lkt:253:31>' Is_Null ada/nodes.lkt:253
--# expr-start 125 '<FieldAccess for type_expression at nodes.lkt:253:31>' Fld ada/nodes.lkt:253
      if Item.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Item.Node, E_Info => Item.Info);
--# end
--# expr-done 125
Is_Null := Fld.Node = null; 
--# expr-done 126
Not_Val := not (Is_Null); 
--# expr-done 127
Local_Te_Not_Null := Not_Val; 
--# bind te_not_null Local_Te_Not_Null
--# expr-start 144 '<Let at nodes.lkt:254:9>' Let_Result ada/nodes.lkt:254
--# scope-start
--# expr-start 128 '<FieldAccess for type_expression at nodes.lkt:254:18>' Fld_1 ada/nodes.lkt:254
      if Item.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Item.Node, E_Info => Item.Info);
--# end
--# expr-done 128
Var_Expr_1 := Fld_1;
if Var_Expr_1 /= No_Entity_Type_Expr then
   --# scope-start
--# expr-start 129 '<FieldAccess for designated_type_decl at nodes.lkt:254:18>' Fld_2 ada/nodes.lkt:254
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld_2 := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 129
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Local_Td := Result_Var; 
--# bind td Local_Td
--# expr-start 130 '<FieldAccess for expr_type at nodes.lkt:257:9>' Fld_3 ada/nodes.lkt:257
      if Item.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Item.Node, Origin => Origin, E_Info => Item.Info);
--# end
--# expr-done 130
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind _ Var_Expr_0
--# expr-start 143 '<If at nodes.lkt:260:13>' If_Result_3 ada/nodes.lkt:260
--# expr-start 135 '<BooleanBinaryOp And at nodes.lkt:261:17>' If_Result_2 ada/nodes.lkt:261
--# expr-start 131 '<FieldAccess for referenced_decl at nodes.lkt:261:17>' Fld_8 ada/nodes.lkt:261
      if Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_8 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Name.Node, Imprecise_Fallback => False, E_Info => Name.Info);
--# end
--# expr-done 131
Var_Expr_2 := Fld_8;
if Var_Expr_2 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 132 '<FieldAccess for type_expression at nodes.lkt:261:17>' Fld_9 ada/nodes.lkt:261
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 132
Var_Expr_3 := Fld_9;
if Var_Expr_3 /= No_Entity_Type_Expr then
   --# scope-start
--# expr-start 134 '<FieldAccess for matching_assign_type at nodes.lkt:261:17>' Fld_11 ada/nodes.lkt:261
--# expr-start 133 '<FieldAccess for designated_type_decl at nodes.lkt:261:17>' Fld_10 ada/nodes.lkt:261
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld_10 := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 133
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_assign_type
Fld_11 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Assign_Type (Node => Fld_10.Node, Expected_Type => Local_Td, Origin => Origin, E_Info => Fld_10.Info);
--# end
--# expr-done 134
Scope_Result_3 := Fld_11;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := False;
end if;
Scope_Result_4 := Result_Var_3;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := False;
end if;
if Result_Var_4 then
   If_Result_2 := Local_Te_Not_Null;
else
   If_Result_2 := False;
end if;
--# expr-done 135
if If_Result_2 then
   If_Result_3 := 100;
else
   --# expr-start 142 '<If at nodes.lkt:260:13>' If_Result_1 ada/nodes.lkt:260
--# expr-start 141 '<bind at nodes.lkt:270:17>' Dyn_Var_Bind_Result ada/nodes.lkt:270
Bound_Imprecise_Fallback := True; 
--# expr-start 140 '<BooleanBinaryOp And at nodes.lkt:272:17>' If_Result ada/nodes.lkt:272
--# expr-start 136 '<FieldAccess for referenced_decl at nodes.lkt:272:17>' Fld_4 ada/nodes.lkt:272
      if Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_4 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Name.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Name.Info);
--# end
--# expr-done 136
Var_Expr_4 := Fld_4;
if Var_Expr_4 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 137 '<FieldAccess for type_expression at nodes.lkt:272:17>' Fld_5 ada/nodes.lkt:272
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Var_Expr_4.Node, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 137
Var_Expr_5 := Fld_5;
if Var_Expr_5 /= No_Entity_Type_Expr then
   --# scope-start
--# expr-start 139 '<FieldAccess for matching_assign_type at nodes.lkt:272:17>' Fld_7 ada/nodes.lkt:272
--# expr-start 138 '<FieldAccess for designated_type_decl at nodes.lkt:272:17>' Fld_6 ada/nodes.lkt:272
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld_6 := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Var_Expr_5.Node, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 138
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_assign_type
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Assign_Type (Node => Fld_6.Node, Expected_Type => Local_Td, Origin => Origin, E_Info => Fld_6.Info);
--# end
--# expr-done 139
Scope_Result_1 := Fld_7;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
if Result_Var_2 then
   If_Result := Local_Te_Not_Null;
else
   If_Result := False;
end if;
--# expr-done 140
Dyn_Var_Bind_Result := If_Result; 
--# expr-done 141
if Dyn_Var_Bind_Result then
   If_Result_1 := 70;
else
   If_Result_1 := 50;
end if;
--# expr-done 142
   If_Result_3 := If_Result_1;
end if;
--# expr-done 143
Scope_Result_5 := If_Result_3;
   --# end
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := 0;
end if;
Let_Result := Result_Var_5; 
--# end
--# expr-done 144
Let_Result_1 := Let_Result; 
--# end
--# expr-done 145
         Property_Result := Let_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Complete_Item_Weight_Matching_Type;
--# end
--# property-start AdaNode.valid_keywords ada/nodes.lkt:289
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Valid_Keywords
  (Node : Bare_Ada_Node
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_22 with Inline_Always;
      Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Sym_10 : Symbol_Type;
Sym_11 : Symbol_Type;
Sym_12 : Symbol_Type;
Sym_13 : Symbol_Type;
Sym_14 : Symbol_Type;
Sym_15 : Symbol_Type;
Sym_16 : Symbol_Type;
Sym_17 : Symbol_Type;
Sym_18 : Symbol_Type;
Sym_19 : Symbol_Type;
Sym_20 : Symbol_Type;
Sym_21 : Symbol_Type;
Sym_22 : Symbol_Type;
Sym_23 : Symbol_Type;
Sym_24 : Symbol_Type;
Sym_25 : Symbol_Type;
Sym_26 : Symbol_Type;
Sym_27 : Symbol_Type;
Sym_28 : Symbol_Type;
Sym_29 : Symbol_Type;
Sym_30 : Symbol_Type;
Sym_31 : Symbol_Type;
Sym_32 : Symbol_Type;
Sym_33 : Symbol_Type;
Sym_34 : Symbol_Type;
Sym_35 : Symbol_Type;
Sym_36 : Symbol_Type;
Sym_37 : Symbol_Type;
Sym_38 : Symbol_Type;
Sym_39 : Symbol_Type;
Sym_40 : Symbol_Type;
Sym_41 : Symbol_Type;
Sym_42 : Symbol_Type;
Sym_43 : Symbol_Type;
Sym_44 : Symbol_Type;
Sym_45 : Symbol_Type;
Sym_46 : Symbol_Type;
Sym_47 : Symbol_Type;
Sym_48 : Symbol_Type;
Sym_49 : Symbol_Type;
Sym_50 : Symbol_Type;
Sym_51 : Symbol_Type;
Sym_52 : Symbol_Type;
Sym_53 : Symbol_Type;
Sym_54 : Symbol_Type;
Sym_55 : Symbol_Type;
Sym_56 : Symbol_Type;
Sym_57 : Symbol_Type;
Sym_58 : Symbol_Type;
Sym_59 : Symbol_Type;
Sym_60 : Symbol_Type;
Sym_61 : Symbol_Type;
Sym_62 : Symbol_Type;
Sym_63 : Symbol_Type;
Sym_64 : Symbol_Type;
Sym_65 : Symbol_Type;
Sym_66 : Symbol_Type;
Sym_67 : Symbol_Type;
Sym_68 : Symbol_Type;
Sym_69 : Symbol_Type;
Sym_70 : Symbol_Type;
Sym_71 : Symbol_Type;
Sym_72 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_22 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_22;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 219 '<ArrayLiteral at nodes.lkt:290:9>' Array_Lit ada/nodes.lkt:290
--# expr-start 146 '<Symbol abort at nodes.lkt:291:13>' Sym ada/nodes.lkt:291
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abort); 
--# expr-done 146
--# expr-start 147 '<Symbol abs at nodes.lkt:292:13>' Sym_1 ada/nodes.lkt:292
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs_316); 
--# expr-done 147
--# expr-start 148 '<Symbol abstract at nodes.lkt:293:13>' Sym_2 ada/nodes.lkt:293
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abstract); 
--# expr-done 148
--# expr-start 149 '<Symbol accept at nodes.lkt:294:13>' Sym_3 ada/nodes.lkt:294
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Accept); 
--# expr-done 149
--# expr-start 150 '<Symbol access at nodes.lkt:295:13>' Sym_4 ada/nodes.lkt:295
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Access_319); 
--# expr-done 150
--# expr-start 151 '<Symbol aliased at nodes.lkt:296:13>' Sym_5 ada/nodes.lkt:296
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aliased); 
--# expr-done 151
--# expr-start 152 '<Symbol all at nodes.lkt:297:13>' Sym_6 ada/nodes.lkt:297
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_All); 
--# expr-done 152
--# expr-start 153 '<Symbol and at nodes.lkt:298:13>' Sym_7 ada/nodes.lkt:298
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_And_324); 
--# expr-done 153
--# expr-start 154 '<Symbol array at nodes.lkt:299:13>' Sym_8 ada/nodes.lkt:299
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Array); 
--# expr-done 154
--# expr-start 155 '<Symbol at at nodes.lkt:300:13>' Sym_9 ada/nodes.lkt:300
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_At); 
--# expr-done 155
--# expr-start 156 '<Symbol begin at nodes.lkt:301:13>' Sym_10 ada/nodes.lkt:301
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Begin); 
--# expr-done 156
--# expr-start 157 '<Symbol body at nodes.lkt:302:13>' Sym_11 ada/nodes.lkt:302
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Body); 
--# expr-done 157
--# expr-start 158 '<Symbol case at nodes.lkt:303:13>' Sym_12 ada/nodes.lkt:303
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Case); 
--# expr-done 158
--# expr-start 159 '<Symbol constant at nodes.lkt:304:13>' Sym_13 ada/nodes.lkt:304
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Constant); 
--# expr-done 159
--# expr-start 160 '<Symbol declare at nodes.lkt:305:13>' Sym_14 ada/nodes.lkt:305
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Declare); 
--# expr-done 160
--# expr-start 161 '<Symbol delay at nodes.lkt:306:13>' Sym_15 ada/nodes.lkt:306
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Delay); 
--# expr-done 161
--# expr-start 162 '<Symbol delta at nodes.lkt:307:13>' Sym_16 ada/nodes.lkt:307
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Delta_338); 
--# expr-done 162
--# expr-start 163 '<Symbol digits at nodes.lkt:308:13>' Sym_17 ada/nodes.lkt:308
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Digits_339); 
--# expr-done 163
--# expr-start 164 '<Symbol do at nodes.lkt:309:13>' Sym_18 ada/nodes.lkt:309
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Do); 
--# expr-done 164
--# expr-start 165 '<Symbol else at nodes.lkt:310:13>' Sym_19 ada/nodes.lkt:310
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Else); 
--# expr-done 165
--# expr-start 166 '<Symbol elsif at nodes.lkt:311:13>' Sym_20 ada/nodes.lkt:311
Sym_20 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Elsif); 
--# expr-done 166
--# expr-start 167 '<Symbol end at nodes.lkt:312:13>' Sym_21 ada/nodes.lkt:312
Sym_21 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_End); 
--# expr-done 167
--# expr-start 168 '<Symbol entry at nodes.lkt:313:13>' Sym_22 ada/nodes.lkt:313
Sym_22 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Entry); 
--# expr-done 168
--# expr-start 169 '<Symbol exception at nodes.lkt:314:13>' Sym_23 ada/nodes.lkt:314
Sym_23 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exception); 
--# expr-done 169
--# expr-start 170 '<Symbol exit at nodes.lkt:315:13>' Sym_24 ada/nodes.lkt:315
Sym_24 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exit); 
--# expr-done 170
--# expr-start 171 '<Symbol for at nodes.lkt:316:13>' Sym_25 ada/nodes.lkt:316
Sym_25 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_For); 
--# expr-done 171
--# expr-start 172 '<Symbol function at nodes.lkt:317:13>' Sym_26 ada/nodes.lkt:317
Sym_26 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Function); 
--# expr-done 172
--# expr-start 173 '<Symbol generic at nodes.lkt:318:13>' Sym_27 ada/nodes.lkt:318
Sym_27 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Generic); 
--# expr-done 173
--# expr-start 174 '<Symbol goto at nodes.lkt:319:13>' Sym_28 ada/nodes.lkt:319
Sym_28 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Goto); 
--# expr-done 174
--# expr-start 175 '<Symbol if at nodes.lkt:320:13>' Sym_29 ada/nodes.lkt:320
Sym_29 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_If); 
--# expr-done 175
--# expr-start 176 '<Symbol in at nodes.lkt:321:13>' Sym_30 ada/nodes.lkt:321
Sym_30 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_In); 
--# expr-done 176
--# expr-start 177 '<Symbol interface at nodes.lkt:322:13>' Sym_31 ada/nodes.lkt:322
Sym_31 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Interface_362); 
--# expr-done 177
--# expr-start 178 '<Symbol is at nodes.lkt:323:13>' Sym_32 ada/nodes.lkt:323
Sym_32 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Is); 
--# expr-done 178
--# expr-start 179 '<Symbol limited at nodes.lkt:324:13>' Sym_33 ada/nodes.lkt:324
Sym_33 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Limited); 
--# expr-done 179
--# expr-start 180 '<Symbol loop at nodes.lkt:325:13>' Sym_34 ada/nodes.lkt:325
Sym_34 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Loop); 
--# expr-done 180
--# expr-start 181 '<Symbol mod at nodes.lkt:326:13>' Sym_35 ada/nodes.lkt:326
Sym_35 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mod_372); 
--# expr-done 181
--# expr-start 182 '<Symbol new at nodes.lkt:327:13>' Sym_36 ada/nodes.lkt:327
Sym_36 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_New); 
--# expr-done 182
--# expr-start 183 '<Symbol not at nodes.lkt:328:13>' Sym_37 ada/nodes.lkt:328
Sym_37 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Not_375); 
--# expr-done 183
--# expr-start 184 '<Symbol null at nodes.lkt:329:13>' Sym_38 ada/nodes.lkt:329
Sym_38 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Null); 
--# expr-done 184
--# expr-start 185 '<Symbol others at nodes.lkt:330:13>' Sym_39 ada/nodes.lkt:330
Sym_39 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Others); 
--# expr-done 185
--# expr-start 186 '<Symbol out at nodes.lkt:331:13>' Sym_40 ada/nodes.lkt:331
Sym_40 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Out); 
--# expr-done 186
--# expr-start 187 '<Symbol of at nodes.lkt:332:13>' Sym_41 ada/nodes.lkt:332
Sym_41 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Of); 
--# expr-done 187
--# expr-start 188 '<Symbol or at nodes.lkt:333:13>' Sym_42 ada/nodes.lkt:333
Sym_42 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Or_378); 
--# expr-done 188
--# expr-start 189 '<Symbol overriding at nodes.lkt:334:13>' Sym_43 ada/nodes.lkt:334
Sym_43 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Overriding); 
--# expr-done 189
--# expr-start 190 '<Symbol package at nodes.lkt:335:13>' Sym_44 ada/nodes.lkt:335
Sym_44 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Package); 
--# expr-done 190
--# expr-start 191 '<Symbol pragma at nodes.lkt:336:13>' Sym_45 ada/nodes.lkt:336
Sym_45 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pragma); 
--# expr-done 191
--# expr-start 192 '<Symbol private at nodes.lkt:337:13>' Sym_46 ada/nodes.lkt:337
Sym_46 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Private); 
--# expr-done 192
--# expr-start 193 '<Symbol procedure at nodes.lkt:338:13>' Sym_47 ada/nodes.lkt:338
Sym_47 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Procedure); 
--# expr-done 193
--# expr-start 194 '<Symbol protected at nodes.lkt:339:13>' Sym_48 ada/nodes.lkt:339
Sym_48 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Protected); 
--# expr-done 194
--# expr-start 195 '<Symbol raise at nodes.lkt:340:13>' Sym_49 ada/nodes.lkt:340
Sym_49 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Raise); 
--# expr-done 195
--# expr-start 196 '<Symbol range at nodes.lkt:341:13>' Sym_50 ada/nodes.lkt:341
Sym_50 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Range_392); 
--# expr-done 196
--# expr-start 197 '<Symbol record at nodes.lkt:342:13>' Sym_51 ada/nodes.lkt:342
Sym_51 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Record); 
--# expr-done 197
--# expr-start 198 '<Symbol rem at nodes.lkt:343:13>' Sym_52 ada/nodes.lkt:343
Sym_52 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Rem_395); 
--# expr-done 198
--# expr-start 199 '<Symbol renames at nodes.lkt:344:13>' Sym_53 ada/nodes.lkt:344
Sym_53 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Renames); 
--# expr-done 199
--# expr-start 200 '<Symbol requeue at nodes.lkt:345:13>' Sym_54 ada/nodes.lkt:345
Sym_54 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Requeue); 
--# expr-done 200
--# expr-start 201 '<Symbol return at nodes.lkt:346:13>' Sym_55 ada/nodes.lkt:346
Sym_55 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Return); 
--# expr-done 201
--# expr-start 202 '<Symbol reverse at nodes.lkt:347:13>' Sym_56 ada/nodes.lkt:347
Sym_56 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Reverse); 
--# expr-done 202
--# expr-start 203 '<Symbol select at nodes.lkt:348:13>' Sym_57 ada/nodes.lkt:348
Sym_57 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Select); 
--# expr-done 203
--# expr-start 204 '<Symbol separate at nodes.lkt:349:13>' Sym_58 ada/nodes.lkt:349
Sym_58 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Separate); 
--# expr-done 204
--# expr-start 205 '<Symbol some at nodes.lkt:350:13>' Sym_59 ada/nodes.lkt:350
Sym_59 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Some); 
--# expr-done 205
--# expr-start 206 '<Symbol subtype at nodes.lkt:351:13>' Sym_60 ada/nodes.lkt:351
Sym_60 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Subtype); 
--# expr-done 206
--# expr-start 207 '<Symbol synchronized at nodes.lkt:352:13>' Sym_61 ada/nodes.lkt:352
Sym_61 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Synchronized); 
--# expr-done 207
--# expr-start 208 '<Symbol tagged at nodes.lkt:353:13>' Sym_62 ada/nodes.lkt:353
Sym_62 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Tagged); 
--# expr-done 208
--# expr-start 209 '<Symbol task at nodes.lkt:354:13>' Sym_63 ada/nodes.lkt:354
Sym_63 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Task); 
--# expr-done 209
--# expr-start 210 '<Symbol terminate at nodes.lkt:355:13>' Sym_64 ada/nodes.lkt:355
Sym_64 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Terminate); 
--# expr-done 210
--# expr-start 211 '<Symbol then at nodes.lkt:356:13>' Sym_65 ada/nodes.lkt:356
Sym_65 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Then); 
--# expr-done 211
--# expr-start 212 '<Symbol type at nodes.lkt:357:13>' Sym_66 ada/nodes.lkt:357
Sym_66 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Type); 
--# expr-done 212
--# expr-start 213 '<Symbol until at nodes.lkt:358:13>' Sym_67 ada/nodes.lkt:358
Sym_67 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Until); 
--# expr-done 213
--# expr-start 214 '<Symbol use at nodes.lkt:359:13>' Sym_68 ada/nodes.lkt:359
Sym_68 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Use); 
--# expr-done 214
--# expr-start 215 '<Symbol when at nodes.lkt:360:13>' Sym_69 ada/nodes.lkt:360
Sym_69 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_When); 
--# expr-done 215
--# expr-start 216 '<Symbol while at nodes.lkt:361:13>' Sym_70 ada/nodes.lkt:361
Sym_70 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_While); 
--# expr-done 216
--# expr-start 217 '<Symbol with at nodes.lkt:362:13>' Sym_71 ada/nodes.lkt:362
Sym_71 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_With); 
--# expr-done 217
--# expr-start 218 '<Symbol xor at nodes.lkt:363:13>' Sym_72 ada/nodes.lkt:363
Sym_72 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Xor_437); 
--# expr-done 218
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1, 3 => Sym_2, 4 => Sym_3, 5 => Sym_4, 6 => Sym_5, 7 => Sym_6, 8 => Sym_7, 9 => Sym_8, 10 => Sym_9, 11 => Sym_10, 12 => Sym_11, 13 => Sym_12, 14 => Sym_13, 15 => Sym_14, 16 => Sym_15, 17 => Sym_16, 18 => Sym_17, 19 => Sym_18, 20 => Sym_19, 21 => Sym_20, 22 => Sym_21, 23 => Sym_22, 24 => Sym_23, 25 => Sym_24, 26 => Sym_25, 27 => Sym_26, 28 => Sym_27, 29 => Sym_28, 30 => Sym_29, 31 => Sym_30, 32 => Sym_31, 33 => Sym_32, 34 => Sym_33, 35 => Sym_34, 36 => Sym_35, 37 => Sym_36, 38 => Sym_37, 39 => Sym_38, 40 => Sym_39, 41 => Sym_40, 42 => Sym_41, 43 => Sym_42, 44 => Sym_43, 45 => Sym_44, 46 => Sym_45, 47 => Sym_46, 48 => Sym_47, 49 => Sym_48, 50 => Sym_49, 51 => Sym_50, 52 => Sym_51, 53 => Sym_52, 54 => Sym_53, 55 => Sym_54, 56 => Sym_55, 57 => Sym_56, 58 => Sym_57, 59 => Sym_58, 60 => Sym_59, 61 => Sym_60, 62 => Sym_61, 63 => Sym_62, 64 => Sym_63, 65 => Sym_64, 66 => Sym_65, 67 => Sym_66, 68 => Sym_67, 69 => Sym_68, 70 => Sym_69, 71 => Sym_70, 72 => Sym_71, 73 => Sym_72)); 
--# expr-done 219
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_22;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_22;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Valid_Keywords;
--# end
--# property-start AdaNode.call_context ada/nodes.lkt:373
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Call_Context
  (Node : Bare_Ada_Node
      ; Ctx : Internal_Logic_Context
  )
   return Bare_Ada_Node
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind ctx Ctx
   Property_Result : Bare_Ada_Node;
            procedure Finalizer_Scope_1921 with Inline_Always;
      Local_Bd : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Var_Expr_1 : Internal_Entity_Call_Expr;
Var_Expr_3 : Internal_Param_Match;
Var_Expr_6 : Internal_Entity_Basic_Decl;
Var_Expr_7 : Internal_Entity_Name;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Base_Subp_Spec;
Fld_2 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Name;
Fld_3 : Internal_Entity_Call_Expr;
Fld_4 : Internal_Entity_Type_Expr;
Fld_5 : Bare_Type_Expr;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_7 : Internal_Entity_Assoc_List;
Fld_8 : Internal_Entity_Info;
Fld_9 : Internal_Metadata;
Fld_10 : Boolean;
Fld_11 : Internal_Param_Match_Array_Access;
Fld_12 : Internal_Single_Actual;
Fld_13 : Internal_Entity_Basic_Assoc;
Fld_14 : Internal_Entity_Expr;
Fld_15 : Bare_Expr;
Cast_Result_2 : Bare_Ada_Node;
Is_Equal : Boolean;
Find_Result : Internal_Param_Match;
Fld_16 : Internal_Entity_Defining_Name;
Fld_17 : Internal_Entity_Base_Formal_Param_Decl;
Fld_18 : Internal_Entity_Type_Expr;
Fld_19 : Bare_Type_Expr;
Scope_Result : Bare_Type_Expr;
Fld_20 : Internal_Entity_Defining_Name;
Fld_21 : Bare_Defining_Name;
Cast_Result_3 : Bare_Ada_Node;
Cast_Result_4 : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Cast_Result_5 : Bare_Ada_Node;
Fld_22 : Bare_Call_Expr;
Cast_Result_6 : Bare_Ada_Node;
Is_Equal_1 : Boolean;
If_Result : Bare_Ada_Node;
Scope_Result_1 : Bare_Ada_Node;
Fld_23 : Internal_Entity_Defining_Name;
Fld_24 : Bare_Defining_Name;
Cast_Result_7 : Bare_Ada_Node;
Result_Var_1 : Bare_Ada_Node;
Scope_Result_2 : Bare_Ada_Node;
Result_Var_2 : Bare_Ada_Node;
Scope_Result_3 : Bare_Ada_Node;
Fld_25 : Internal_Entity;
Fld_26 : Bare_Ada_Node;
Result_Var_3 : Bare_Ada_Node;
Scope_Result_4 : Bare_Ada_Node;
Result_Var_4 : Bare_Ada_Node;
Let_Result : Bare_Ada_Node;
            procedure Finalizer_Scope_1921 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_11);
            end Finalizer_Scope_1921;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 253 '<Let at nodes.lkt:374:9>' Let_Result ada/nodes.lkt:374
--# scope-start
--# expr-start 221 '<Cast to BasicDecl at nodes.lkt:374:18>' Cast_Result ada/nodes.lkt:374
--# expr-start 220 '<FieldAccess for decl_node at nodes.lkt:374:18>' Fld ada/nodes.lkt:374
Fld := Ctx.Decl_Node;
--# expr-done 220
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 221
Local_Bd := Cast_Result; 
--# bind bd Local_Bd
Var_Expr_6 := Local_Bd;
if Var_Expr_6 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 222 '<FieldAccess for subp_spec_or_null at nodes.lkt:376:9>' Fld_1 ada/nodes.lkt:376
      if Var_Expr_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_6.Node, E_Info => Var_Expr_6.Info);
--# end
--# expr-done 222
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 224 '<Cast to Name at nodes.lkt:378:13>' Cast_Result_1 ada/nodes.lkt:378
--# expr-start 223 '<FieldAccess for ref_node at nodes.lkt:378:13>' Fld_2 ada/nodes.lkt:378
Fld_2 := Ctx.Ref_Node;
--# expr-done 223
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result_1 := No_Entity_Name;
   end if;
--# expr-done 224
Var_Expr_7 := Cast_Result_1;
if Var_Expr_7 /= No_Entity_Name then
   --# scope-start
--# expr-start 225 '<FieldAccess for parent_callexpr at nodes.lkt:378:13>' Fld_3 ada/nodes.lkt:378
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_callexpr
Fld_3 := Libadalang.Implementation.Name_P_Parent_Callexpr (Node => Var_Expr_7.Node, E_Info => Var_Expr_7.Info);
--# end
--# expr-done 225
Var_Expr_1 := Fld_3;
if Var_Expr_1 /= No_Entity_Call_Expr then
   --# scope-start
   --# bind ce Var_Expr_1
--# expr-start 248 '<If at nodes.lkt:380:17>' If_Result ada/nodes.lkt:380
--# expr-start 227 '<Eq at nodes.lkt:380:20>' Is_Equal_1 ada/nodes.lkt:380
--# expr-start 226 '<FieldAccess for node at nodes.lkt:380:28>' Fld_22 ada/nodes.lkt:380
Fld_22 := Var_Expr_1.Node;
--# expr-done 226
      Cast_Result_6 := Fld_22;
Is_Equal_1 := Self = Cast_Result_6; 
--# expr-done 227
if Is_Equal_1 then
--# expr-start 229 '<FieldAccess for node at nodes.lkt:380:41>' Fld_5 ada/nodes.lkt:380
--# expr-start 228 '<FieldAccess for returns at nodes.lkt:380:41>' Fld_4 ada/nodes.lkt:380
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 228
Fld_5 := Fld_4.Node;
--# expr-done 229
      Cast_Result_5 := Fld_5;
   If_Result := Cast_Result_5;
else
--# expr-start 241 '<Find at nodes.lkt:382:21>' Find_Result ada/nodes.lkt:382
   --# expr-start 235 '<FieldAccess for match_formals at nodes.lkt:382:21>' Fld_11 ada/nodes.lkt:382
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 230 '<FieldAccess for abstract_formal_params at nodes.lkt:383:25>' Fld_6 ada/nodes.lkt:383
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 230
--# expr-start 231 '<FieldAccess for params at nodes.lkt:384:25>' Fld_7 ada/nodes.lkt:384
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_7 := Libadalang.Implementation.Call_Expr_P_Params (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 231
--# expr-start 234 '<FieldAccess for dottable_subp at nodes.lkt:385:25>' Fld_10 ada/nodes.lkt:385
--# expr-start 233 '<FieldAccess for md at nodes.lkt:385:25>' Fld_9 ada/nodes.lkt:385
--# expr-start 232 '<FieldAccess for info at nodes.lkt:385:25>' Fld_8 ada/nodes.lkt:385
Fld_8 := Local_Bd.Info;
--# expr-done 232
Fld_9 := Fld_8.Md;
--# expr-done 233
Fld_10 := Fld_9.Dottable_Subp;
--# expr-done 234
--# property-call-start AdaNode.match_formals
Fld_11 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Self, Formal_Params => Fld_6, Params => Fld_7, Is_Dottable_Subp => Fld_10);
--# end
--# expr-done 235
      Find_Result := No_Param_Match;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_11;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_2
      --# expr-start 240 '<Eq at nodes.lkt:387:35>' Is_Equal ada/nodes.lkt:387
--# expr-start 239 '<FieldAccess for node at nodes.lkt:387:35>' Fld_15 ada/nodes.lkt:387
--# expr-start 238 '<FieldAccess for expr at nodes.lkt:387:35>' Fld_14 ada/nodes.lkt:387
--# expr-start 237 '<FieldAccess for assoc at nodes.lkt:387:35>' Fld_13 ada/nodes.lkt:387
--# expr-start 236 '<FieldAccess for actual at nodes.lkt:387:35>' Fld_12 ada/nodes.lkt:387
Fld_12 := Item_2.Actual;
--# expr-done 236
Fld_13 := Fld_12.Assoc;
--# expr-done 237
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_14 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_13.Node, E_Info => Fld_13.Info);
--# end
--# expr-done 238
Fld_15 := Fld_14.Node;
--# expr-done 239
      Cast_Result_2 := Fld_15;
Is_Equal := Cast_Result_2 = Self; 
--# expr-done 240
      if Is_Equal then
         Find_Result := Item_2; 
      end if;
   --# end
               exit when Is_Equal;
         end loop;
      end;
--# expr-done 241
Var_Expr_3 := Find_Result;
if Var_Expr_3 /= No_Param_Match then
   --# scope-start
   --# bind pm Var_Expr_3
--# expr-start 245 '<FieldAccess for node at nodes.lkt:389:33>' Fld_19 ada/nodes.lkt:389
--# expr-start 244 '<FieldAccess for type_expression at nodes.lkt:389:33>' Fld_18 ada/nodes.lkt:389
--# expr-start 243 '<FieldAccess for formal_decl at nodes.lkt:389:33>' Fld_17 ada/nodes.lkt:389
--# expr-start 242 '<FieldAccess for formal at nodes.lkt:389:33>' Fld_16 ada/nodes.lkt:389
Fld_16 := Var_Expr_3.Formal;
--# expr-done 242
      if Fld_16.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_17 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_16.Node, E_Info => Fld_16.Info);
--# end
--# expr-done 243
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_18 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_17.Node, E_Info => Fld_17.Info);
--# end
--# expr-done 244
Fld_19 := Fld_18.Node;
--# expr-done 245
Scope_Result := Fld_19;
   --# end
      Cast_Result_3 := Scope_Result;
   Result_Var := Cast_Result_3;
else
--# expr-start 247 '<FieldAccess for node at nodes.lkt:390:37>' Fld_21 ada/nodes.lkt:390
--# expr-start 246 '<FieldAccess for defining_name at nodes.lkt:390:37>' Fld_20 ada/nodes.lkt:390
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_20 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 246
Fld_21 := Fld_20.Node;
--# expr-done 247
      Cast_Result_4 := Fld_21;
   Result_Var := Cast_Result_4;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 248
Scope_Result_1 := If_Result;
   --# end
      Finalizer_Scope_1921;
   Result_Var_1 := Scope_Result_1;
else
--# expr-start 250 '<FieldAccess for node at nodes.lkt:392:29>' Fld_24 ada/nodes.lkt:392
--# expr-start 249 '<FieldAccess for defining_name at nodes.lkt:392:29>' Fld_23 ada/nodes.lkt:392
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_23 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 249
Fld_24 := Fld_23.Node;
--# expr-done 250
      Cast_Result_7 := Fld_24;
   Result_Var_1 := Cast_Result_7;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Bare_Ada_Node;
end if;
Scope_Result_3 := Result_Var_2;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   --# expr-start 252 '<FieldAccess for node at nodes.lkt:394:25>' Fld_26 ada/nodes.lkt:394
--# expr-start 251 '<FieldAccess for decl_node at nodes.lkt:394:25>' Fld_25 ada/nodes.lkt:394
Fld_25 := Ctx.Decl_Node;
--# expr-done 251
Fld_26 := Fld_25.Node;
--# expr-done 252
   Result_Var_3 := Fld_26;
end if;
Scope_Result_4 := Result_Var_3;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := No_Bare_Ada_Node;
end if;
Let_Result := Result_Var_4; 
--# end
--# expr-done 253
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1921;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Call_Context;
--# end
--# property-start AdaNode.generic_instantiations ada/nodes.lkt:402
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Generic_Instantiations
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Generic_Instantiation_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Generic_Instantiation_Array_Access;
            procedure Finalizer_Scope_24 with Inline_Always;
      Fld : Internal_Entity_Info;
Fld_1 : Env_Rebindings;
Fld_2 : Internal_Entity_Generic_Instantiation_Array_Access;
            procedure Finalizer_Scope_24 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_24;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 256 '<FieldAccess for generic_instantiations_internal at nodes.lkt:403:9>' Fld_2 ada/nodes.lkt:403
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 255 '<FieldAccess for rebindings at nodes.lkt:403:46>' Fld_1 ada/nodes.lkt:403
--# expr-start 254 '<FieldAccess for info at nodes.lkt:403:46>' Fld ada/nodes.lkt:403
Fld := Ent.Info;
--# expr-done 254
Fld_1 := Fld.Rebindings;
--# expr-done 255
--# property-call-start AdaNode.generic_instantiations_internal
Fld_2 := Libadalang.Implementation.Ada_Node_P_Generic_Instantiations_Internal (Node => Self, R => Fld_1);
--# end
--# expr-done 256
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_24;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_24;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Generic_Instantiations;
--# end
--# property-start AdaNode.generic_instantiations_internal ada/nodes.lkt:405
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Generic_Instantiations_Internal
  (Node : Bare_Ada_Node
      ; R : Env_Rebindings
  )
   return Internal_Entity_Generic_Instantiation_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind r R
   Property_Result : Internal_Entity_Generic_Instantiation_Array_Access;
            procedure Finalizer_Scope_25 with Inline_Always;
      Local_Head : Internal_Entity_Generic_Instantiation;
Local_Tail : Internal_Entity_Generic_Instantiation_Array_Access;
Fld : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Cast_Result : Bare_Generic_Instantiation;
As_Entity : Internal_Entity_Generic_Instantiation;
Is_Null : Boolean;
If_Result : Internal_Entity_Generic_Instantiation;
Fld_1 : Env_Rebindings;
Fld_2 : Internal_Entity_Generic_Instantiation_Array_Access;
Array_Lit : Internal_Entity_Generic_Instantiation_Array_Access;
Concat_Result : Internal_Entity_Generic_Instantiation_Array_Access;
Let_Result : Internal_Entity_Generic_Instantiation_Array_Access;
Let_Result_1 : Internal_Entity_Generic_Instantiation_Array_Access;
Is_Equal : Boolean;
If_Result_1 : Internal_Entity_Generic_Instantiation_Array_Access;
            procedure Finalizer_Scope_25 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Local_Tail);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_25;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 267 '<If at nodes.lkt:408:9>' If_Result_1 ada/nodes.lkt:408
--# expr-start 257 '<Eq at nodes.lkt:408:12>' Is_Equal ada/nodes.lkt:408
Is_Equal := R = null; 
--# expr-done 257
if Is_Equal then
   If_Result_1 := No_Internal_Entity_Generic_Instantiation_Array_Type;
else
   --# expr-start 266 '<Let at nodes.lkt:411:13>' Let_Result_1 ada/nodes.lkt:411
--# scope-start
--# expr-start 261 '<as_bare_entity at nodes.lkt:412:17>' If_Result ada/nodes.lkt:412
--# expr-start 260 '<Cast to GenericInstantiation at nodes.lkt:412:17>' Cast_Result ada/nodes.lkt:412
--# expr-start 259 '<env_node at nodes.lkt:412:17>' Env_Node ada/nodes.lkt:412
--# expr-start 258 '<FieldAccess for new_env at nodes.lkt:412:17>' Fld ada/nodes.lkt:412
      if R = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := R.New_Env;
Inc_Ref (Fld);
--# expr-done 258
Env_Node := AST_Envs.Env_Node (Fld); 
--# expr-done 259
   if Env_Node = null
      or else Env_Node.Kind in Ada_Generic_Instantiation
   then
      Cast_Result := Env_Node;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 260
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Generic_Instantiation;
else
As_Entity := (Info => No_Entity_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 261
Local_Head := If_Result; 
--# bind head Local_Head
--# expr-start 265 '<Let at nodes.lkt:414:13>' Let_Result ada/nodes.lkt:414
--# scope-start
--# expr-start 263 '<FieldAccess for generic_instantiations_internal at nodes.lkt:414:24>' Fld_2 ada/nodes.lkt:414
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 262 '<FieldAccess for get_parent at nodes.lkt:414:61>' Fld_1 ada/nodes.lkt:414
      if R = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := R.Parent;
--# expr-done 262
--# property-call-start AdaNode.generic_instantiations_internal
Fld_2 := Libadalang.Implementation.Ada_Node_P_Generic_Instantiations_Internal (Node => Self, R => Fld_1);
--# end
--# expr-done 263
Local_Tail := Fld_2; Inc_Ref (Local_Tail);
--# bind tail Local_Tail
--# expr-start 264 '<ArrayLiteral at nodes.lkt:416:13>' Array_Lit ada/nodes.lkt:416
Array_Lit := Create_Internal_Entity_Generic_Instantiation_Array (Internal_Internal_Entity_Generic_Instantiation_Array'(1 => Local_Head)); 
--# expr-done 264
Concat_Result := Concat (Array_Lit, Local_Tail); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 265
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 266
   If_Result_1 := Let_Result_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 267
         Property_Result := If_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_25;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_25;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Generic_Instantiations_Internal;
--# end
--# property-start AdaNode.remove_rebindings ada/nodes.lkt:421
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Remove_Rebindings
  (Node : Bare_Ada_Node
      ; Base : Env_Rebindings
      ; Suffix : Env_Rebindings
  )
   return Env_Rebindings
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind base Base
   --# bind suffix Suffix
   Property_Result : Env_Rebindings;
            procedure Finalizer_Scope_26 with Inline_Always;
      Fld : Env_Rebindings;
Fld_1 : Env_Rebindings;
Fld_2 : Env_Rebindings;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Lexical_Env := Empty_Env;
Is_Equal : Boolean;
Fld_5 : Lexical_Env := Empty_Env;
Fld_6 : Lexical_Env := Empty_Env;
Is_Equal_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Env_Rebindings;
Is_Equal_2 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Env_Rebindings;
            procedure Finalizer_Scope_26 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_26;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 282 '<If at nodes.lkt:425:9>' If_Result_3 ada/nodes.lkt:425
--# expr-start 270 '<BooleanBinaryOp Or at nodes.lkt:425:12>' If_Result_2 ada/nodes.lkt:425
--# expr-start 268 '<IsNull at nodes.lkt:425:12>' Is_Equal_2 ada/nodes.lkt:425
Is_Equal_2 := Base = null; 
--# expr-done 268
if Is_Equal_2 then
   If_Result_2 := True;
else
   --# expr-start 269 '<IsNull at nodes.lkt:425:28>' Is_Equal_3 ada/nodes.lkt:425
Is_Equal_3 := Suffix = null; 
--# expr-done 269
   If_Result_2 := Is_Equal_3;
end if;
--# expr-done 270
if If_Result_2 then
   If_Result_3 := Base;
else
   --# expr-start 281 '<If at nodes.lkt:425:9>' If_Result_1 ada/nodes.lkt:425
--# expr-start 277 '<BooleanBinaryOp And at nodes.lkt:426:14>' If_Result ada/nodes.lkt:426
--# expr-start 273 '<Eq at nodes.lkt:426:14>' Is_Equal ada/nodes.lkt:426
--# expr-start 271 '<FieldAccess for old_env at nodes.lkt:426:14>' Fld_3 ada/nodes.lkt:426
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Base.Old_Env;
Inc_Ref (Fld_3);
--# expr-done 271
--# expr-start 272 '<FieldAccess for old_env at nodes.lkt:426:30>' Fld_4 ada/nodes.lkt:426
      if Suffix = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Suffix.Old_Env;
Inc_Ref (Fld_4);
--# expr-done 272
Is_Equal := Equivalent (Fld_3, Fld_4); 
--# expr-done 273
if Is_Equal then
   --# expr-start 276 '<Eq at nodes.lkt:426:49>' Is_Equal_1 ada/nodes.lkt:426
--# expr-start 274 '<FieldAccess for new_env at nodes.lkt:426:49>' Fld_5 ada/nodes.lkt:426
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Base.New_Env;
Inc_Ref (Fld_5);
--# expr-done 274
--# expr-start 275 '<FieldAccess for new_env at nodes.lkt:426:65>' Fld_6 ada/nodes.lkt:426
      if Suffix = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Suffix.New_Env;
Inc_Ref (Fld_6);
--# expr-done 275
Is_Equal_1 := Equivalent (Fld_5, Fld_6); 
--# expr-done 276
   If_Result := Is_Equal_1;
else
   If_Result := False;
end if;
--# expr-done 277
if If_Result then
   --# expr-start 280 '<FieldAccess for remove_rebindings at nodes.lkt:427:14>' Fld_2 ada/nodes.lkt:427
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 278 '<FieldAccess for get_parent at nodes.lkt:427:37>' Fld ada/nodes.lkt:427
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Base.Parent;
--# expr-done 278
--# expr-start 279 '<FieldAccess for get_parent at nodes.lkt:427:54>' Fld_1 ada/nodes.lkt:427
      if Suffix = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Suffix.Parent;
--# expr-done 279
--# property-call-start AdaNode.remove_rebindings
Fld_2 := Libadalang.Implementation.Ada_Node_P_Remove_Rebindings (Node => Self, Base => Fld, Suffix => Fld_1);
--# end
--# expr-done 280
   If_Result_1 := Fld_2;
else
   If_Result_1 := Base;
end if;
--# expr-done 281
   If_Result_3 := If_Result_1;
end if;
--# expr-done 282
         Property_Result := If_Result_3;
   --# end
      Finalizer_Scope_26;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_26;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Remove_Rebindings;
--# end
--# property-start AdaNode.add_rebinding ada/nodes.lkt:457
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Add_Rebinding
  (Node : Bare_Ada_Node
      ; Base : Env_Rebindings
      ; Old_Env : Lexical_Env
      ; New_Env : Lexical_Env
  )
   return Env_Rebindings
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind base Base
   --# bind old_env Old_Env
   --# bind new_env New_Env
   Property_Result : Env_Rebindings;
            procedure Finalizer_Scope_27 with Inline_Always;
            procedure Finalizer_Scope_1924 with Inline_Always;
      Local_Parent_Env : Lexical_Env := Empty_Env;
Var_Expr_0 : Internal_Entity_Generic_Package_Instantiation;
Local_Gen_Env : Lexical_Env := Empty_Env;
Local_Info : Internal_Entity_Info;
Env_Node : Bare_Ada_Node;
Fld : Lexical_Env := Empty_Env;
Rebinding : Env_Rebindings;
Fld_1 : Lexical_Env := Empty_Env;
Env_Node_1 : Bare_Ada_Node;
Cast_Result : Bare_Generic_Package_Instantiation;
Fld_2 : Bare_Defining_Name;
Fld_3 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity_Generic_Package_Instantiation;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Bare_Basic_Decl;
Fld_6 : Lexical_Env := Empty_Env;
Fld_7 : Env_Rebindings;
Fld_8 : Lexical_Env := Empty_Env;
Fld_9 : Env_Rebindings;
New_Struct : Internal_Entity_Info;
Shed_Entity_Info : Internal_Entity_Info;
Fld_10 : Env_Rebindings;
Let_Result : Env_Rebindings;
Let_Result_1 : Env_Rebindings;
Scope_Result : Env_Rebindings;
Rebinding_1 : Env_Rebindings;
Result_Var : Env_Rebindings;
Fld_11 : Env_Rebindings;
Fld_12 : Env_Rebindings;
Fld_13 : Lexical_Env := Empty_Env;
Is_Equal : Boolean;
If_Result : Env_Rebindings;
Is_Equal_1 : Boolean;
Env_Node_2 : Bare_Ada_Node;
Is_A : Boolean;
Not_Val : Boolean;
If_Result_1 : Boolean;
Fld_14 : Boolean;
Not_Val_1 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Env_Rebindings;
Let_Result_2 : Env_Rebindings;
            procedure Finalizer_Scope_27 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Parent_Env);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_13);
            end Finalizer_Scope_27;
            procedure Finalizer_Scope_1924 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Local_Gen_Env);
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_1924;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 319 '<Let at nodes.lkt:462:9>' Let_Result_2 ada/nodes.lkt:462
--# scope-start
--# expr-start 284 '<FieldAccess for node_env at nodes.lkt:462:26>' Fld ada/nodes.lkt:462
--# expr-start 283 '<env_node at nodes.lkt:462:26>' Env_Node ada/nodes.lkt:462
Env_Node := AST_Envs.Env_Node (New_Env); 
--# expr-done 283
      if Env_Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Env_Node);
--# expr-done 284
Local_Parent_Env := Fld; Inc_Ref (Local_Parent_Env);
--# bind parent_env Local_Parent_Env
--# expr-start 318 '<If at nodes.lkt:464:9>' If_Result_3 ada/nodes.lkt:464
--# expr-start 292 '<BooleanBinaryOp Or at nodes.lkt:465:13>' If_Result_2 ada/nodes.lkt:465
--# expr-start 289 '<BooleanBinaryOp Or at nodes.lkt:465:13>' If_Result_1 ada/nodes.lkt:465
--# expr-start 285 '<IsNull at nodes.lkt:465:13>' Is_Equal_1 ada/nodes.lkt:465
Is_Equal_1 := Base = null; 
--# expr-done 285
if Is_Equal_1 then
   If_Result_1 := True;
else
   --# expr-start 288 '<Not at nodes.lkt:465:29>' Not_Val ada/nodes.lkt:465
--# expr-start 287 '<IsA GenericDecl at nodes.lkt:465:33>' Is_A ada/nodes.lkt:465
--# expr-start 286 '<env_node at nodes.lkt:465:33>' Env_Node_2 ada/nodes.lkt:465
Env_Node_2 := AST_Envs.Env_Node (Local_Parent_Env); 
--# expr-done 286
Is_A := Env_Node_2 /= null 
and then Env_Node_2.Kind in Ada_Generic_Decl; 
--# expr-done 287
Not_Val := not (Is_A); 
--# expr-done 288
   If_Result_1 := Not_Val;
end if;
--# expr-done 289
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 291 '<Not at nodes.lkt:466:16>' Not_Val_1 ada/nodes.lkt:466
--# expr-start 290 '<FieldAccess for is_rebound at nodes.lkt:466:20>' Fld_14 ada/nodes.lkt:466
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.is_rebound
Fld_14 := Libadalang.Implementation.Ada_Node_P_Is_Rebound (Node => Self, Base => Base, Old_Env => Local_Parent_Env);
--# end
--# expr-done 290
Not_Val_1 := not (Fld_14); 
--# expr-done 291
   If_Result_2 := Not_Val_1;
end if;
--# expr-done 292
if If_Result_2 then
   --# expr-start 293 '<append_rebinding at nodes.lkt:468:14>' Rebinding ada/nodes.lkt:468
Rebinding := AST_Envs.Append_Rebinding (Base, Old_Env, New_Env); 
--# expr-done 293
   If_Result_3 := Rebinding;
else
   --# expr-start 317 '<If at nodes.lkt:464:9>' If_Result ada/nodes.lkt:464
--# expr-start 295 '<Eq at nodes.lkt:469:14>' Is_Equal ada/nodes.lkt:469
--# expr-start 294 '<FieldAccess for old_env at nodes.lkt:469:14>' Fld_13 ada/nodes.lkt:469
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Base.Old_Env;
Inc_Ref (Fld_13);
--# expr-done 294
Is_Equal := Equivalent (Fld_13, Local_Parent_Env); 
--# expr-done 295
if Is_Equal then
--# expr-start 302 '<Cast to GenericPackageInstantiation at nodes.lkt:471:13>' Cast_Result_1 ada/nodes.lkt:471
--# expr-start 301 '<EnvGet at nodes.lkt:471:13>' Env_Get_Result ada/nodes.lkt:471
--# expr-start 296 '<FieldAccess for new_env at nodes.lkt:471:13>' Fld_1 ada/nodes.lkt:471
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Base.New_Env;
Inc_Ref (Fld_1);
--# expr-done 296
--# expr-start 300 '<FieldAccess for name_symbol at nodes.lkt:472:17>' Fld_3 ada/nodes.lkt:472
--# expr-start 299 '<FieldAccess for name at nodes.lkt:472:17>' Fld_2 ada/nodes.lkt:472
--# expr-start 298 '<Cast to GenericPackageInstantiation at nodes.lkt:472:17>' Cast_Result ada/nodes.lkt:472
--# expr-start 297 '<env_node at nodes.lkt:472:17>' Env_Node_1 ada/nodes.lkt:472
Env_Node_1 := AST_Envs.Env_Node (New_Env); 
--# expr-done 297
   if Env_Node_1 = null
      or else Env_Node_1.Kind in Ada_Generic_Package_Instantiation_Range
   then
      Cast_Result := Env_Node_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 298
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Generic_Package_Instantiation_F_Name;
--# expr-done 299
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_2);
--# end
--# expr-done 300
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Fld_3), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 301
   if Env_Get_Result.Node = null
      or else Env_Get_Result.Node.Kind in Ada_Generic_Package_Instantiation_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Generic_Package_Instantiation
        (Node => Env_Get_Result.Node,
         Info => Env_Get_Result.Info);
   else
         Cast_Result_1 := No_Entity_Generic_Package_Instantiation;
   end if;
--# expr-done 302
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Entity_Generic_Package_Instantiation then
   --# scope-start
   --# bind gpi Var_Expr_0
--# expr-start 313 '<Let at nodes.lkt:482:21>' Let_Result_1 ada/nodes.lkt:482
--# scope-start
--# expr-start 305 '<FieldAccess for children_env at nodes.lkt:483:25>' Fld_6 ada/nodes.lkt:483
--# expr-start 304 '<FieldAccess for node at nodes.lkt:483:25>' Fld_5 ada/nodes.lkt:483
--# expr-start 303 '<FieldAccess for nonbound_generic_decl_from_self at nodes.lkt:483:25>' Fld_4 ada/nodes.lkt:483
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.nonbound_generic_decl_from_self
Fld_4 := Libadalang.Implementation.Generic_Instantiation_P_Nonbound_Generic_Decl_From_Self (Node => Var_Expr_0.Node);
--# end
--# expr-done 303
Fld_5 := Fld_4.Node;
--# expr-done 304
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Children_Env (Node => Fld_5);
--# expr-done 305
Local_Gen_Env := Fld_6; Inc_Ref (Local_Gen_Env);
--# bind gen_env Local_Gen_Env
--# expr-start 312 '<Let at nodes.lkt:486:21>' Let_Result ada/nodes.lkt:486
--# scope-start
--# expr-start 309 '<New EntityInfo at nodes.lkt:487:25>' New_Struct ada/nodes.lkt:487
--# expr-start 308 '<FieldAccess for add_rebinding at nodes.lkt:489:40>' Fld_9 ada/nodes.lkt:489
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 306 '<FieldAccess for get_parent at nodes.lkt:490:33>' Fld_7 ada/nodes.lkt:490
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Base.Parent;
--# expr-done 306
--# expr-start 307 '<FieldAccess for instantiation_env at nodes.lkt:492:33>' Fld_8 ada/nodes.lkt:492
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.instantiation_env
Fld_8 := Libadalang.Implementation.Generic_Instantiation_F_Instantiation_Env (Node => Var_Expr_0.Node);
--# end
--# expr-done 307
--# property-call-start AdaNode.add_rebinding
Fld_9 := Libadalang.Implementation.Ada_Node_P_Add_Rebinding (Node => Self, Base => Fld_7, Old_Env => Local_Gen_Env, New_Env => Fld_8);
--# end
--# expr-done 308
New_Struct := (From_Rebound => False, Md => No_Metadata, Rebindings => Fld_9); 
--# expr-done 309
Local_Info := New_Struct; 
--# bind info Local_Info
--# expr-start 311 '<FieldAccess for rebindings at nodes.lkt:498:21>' Fld_10 ada/nodes.lkt:498
--# expr-start 310 '<shed_rebindings at nodes.lkt:498:21>' Shed_Entity_Info ada/nodes.lkt:498
Shed_Entity_Info := AST_Envs.Shed_Rebindings (Local_Info, Local_Gen_Env); 
--# expr-done 310
Fld_10 := Shed_Entity_Info.Rebindings;
--# expr-done 311
Let_Result := Fld_10; 
--# end
--# expr-done 312
Let_Result_1 := Let_Result; 
--# end
--# expr-done 313
Scope_Result := Let_Result_1;
   --# end
      Finalizer_Scope_1924;
   Result_Var := Scope_Result;
else
   --# expr-start 314 '<append_rebinding at nodes.lkt:500:29>' Rebinding_1 ada/nodes.lkt:500
Rebinding_1 := AST_Envs.Append_Rebinding (Base, Old_Env, New_Env); 
--# expr-done 314
   Result_Var := Rebinding_1;
end if;
   If_Result := Result_Var;
else
   --# expr-start 316 '<FieldAccess for add_rebinding at nodes.lkt:502:14>' Fld_12 ada/nodes.lkt:502
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 315 '<FieldAccess for get_parent at nodes.lkt:502:33>' Fld_11 ada/nodes.lkt:502
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Base.Parent;
--# expr-done 315
--# property-call-start AdaNode.add_rebinding
Fld_12 := Libadalang.Implementation.Ada_Node_P_Add_Rebinding (Node => Self, Base => Fld_11, Old_Env => Old_Env, New_Env => New_Env);
--# end
--# expr-done 316
   If_Result := Fld_12;
end if;
--# expr-done 317
   If_Result_3 := If_Result;
end if;
--# expr-done 318
Let_Result_2 := If_Result_3; 
--# end
--# expr-done 319
         Property_Result := Let_Result_2;
   --# end
      Finalizer_Scope_27;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_27;
                     Finalizer_Scope_1924;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Add_Rebinding;
--# end
--# property-start AdaNode.is_rebound ada/nodes.lkt:507
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Is_Rebound
  (Node : Bare_Ada_Node
      ; Base : Env_Rebindings
      ; Old_Env : Lexical_Env
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind base Base
   --# bind old_env Old_Env
   Property_Result : Boolean;
            procedure Finalizer_Scope_28 with Inline_Always;
      Is_Equal : Boolean;
Not_Val : Boolean;
Fld : Lexical_Env := Empty_Env;
Is_Equal_1 : Boolean;
Fld_1 : Env_Rebindings;
Fld_2 : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
            procedure Finalizer_Scope_28 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_28;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 327 '<BooleanBinaryOp And at nodes.lkt:508:9>' If_Result_1 ada/nodes.lkt:508
--# expr-start 321 '<Not at nodes.lkt:508:9>' Not_Val ada/nodes.lkt:508
--# expr-start 320 '<IsNull at nodes.lkt:508:13>' Is_Equal ada/nodes.lkt:508
Is_Equal := Base = null; 
--# expr-done 320
Not_Val := not (Is_Equal); 
--# expr-done 321
if Not_Val then
   --# expr-start 326 '<BooleanBinaryOp Or at nodes.lkt:510:13>' If_Result ada/nodes.lkt:510
--# expr-start 323 '<Eq at nodes.lkt:510:13>' Is_Equal_1 ada/nodes.lkt:510
--# expr-start 322 '<FieldAccess for old_env at nodes.lkt:510:13>' Fld ada/nodes.lkt:510
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Base.Old_Env;
Inc_Ref (Fld);
--# expr-done 322
Is_Equal_1 := Equivalent (Fld, Old_Env); 
--# expr-done 323
if Is_Equal_1 then
   If_Result := True;
else
   --# expr-start 325 '<FieldAccess for is_rebound at nodes.lkt:511:16>' Fld_2 ada/nodes.lkt:511
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 324 '<FieldAccess for get_parent at nodes.lkt:511:32>' Fld_1 ada/nodes.lkt:511
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Base.Parent;
--# expr-done 324
--# property-call-start AdaNode.is_rebound
Fld_2 := Libadalang.Implementation.Ada_Node_P_Is_Rebound (Node => Self, Base => Fld_1, Old_Env => Old_Env);
--# end
--# expr-done 325
   If_Result := Fld_2;
end if;
--# expr-done 326
   If_Result_1 := If_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 327
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_28;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_28;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Is_Rebound;
--# end
--# property-start AdaNode.insert_rebindings ada/nodes.lkt:517
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Insert_Rebindings
  (Node : Bare_Ada_Node
      ; Base : Env_Rebindings
      ; To_Insert : Env_Rebindings
  )
   return Env_Rebindings
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind base Base
   --# bind to_insert To_Insert
   Property_Result : Env_Rebindings;
            procedure Finalizer_Scope_29 with Inline_Always;
      Fld : Env_Rebindings;
Fld_1 : Env_Rebindings;
Fld_2 : Lexical_Env := Empty_Env;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Env_Rebindings;
Fld_5 : Lexical_Env := Empty_Env;
Fld_6 : Boolean;
If_Result : Env_Rebindings;
Is_Equal : Boolean;
If_Result_1 : Env_Rebindings;
Is_Equal_1 : Boolean;
If_Result_2 : Env_Rebindings;
            procedure Finalizer_Scope_29 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_29;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 339 '<If at nodes.lkt:521:9>' If_Result_2 ada/nodes.lkt:521
--# expr-start 328 '<IsNull at nodes.lkt:521:12>' Is_Equal_1 ada/nodes.lkt:521
Is_Equal_1 := To_Insert = null; 
--# expr-done 328
if Is_Equal_1 then
   If_Result_2 := Base;
else
   --# expr-start 338 '<If at nodes.lkt:521:9>' If_Result_1 ada/nodes.lkt:521
--# expr-start 329 '<IsNull at nodes.lkt:522:14>' Is_Equal ada/nodes.lkt:522
Is_Equal := Base = null; 
--# expr-done 329
if Is_Equal then
   If_Result_1 := To_Insert;
else
   --# expr-start 337 '<If at nodes.lkt:521:9>' If_Result ada/nodes.lkt:521
--# expr-start 331 '<FieldAccess for is_rebound at nodes.lkt:523:14>' Fld_6 ada/nodes.lkt:523
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 330 '<FieldAccess for old_env at nodes.lkt:523:36>' Fld_5 ada/nodes.lkt:523
      if To_Insert = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := To_Insert.Old_Env;
Inc_Ref (Fld_5);
--# expr-done 330
--# property-call-start AdaNode.is_rebound
Fld_6 := Libadalang.Implementation.Ada_Node_P_Is_Rebound (Node => Self, Base => Base, Old_Env => Fld_5);
--# end
--# expr-done 331
if Fld_6 then
   If_Result := Base;
else
   --# expr-start 336 '<FieldAccess for add_rebinding at nodes.lkt:525:13>' Fld_4 ada/nodes.lkt:525
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 333 '<FieldAccess for insert_rebindings at nodes.lkt:526:17>' Fld_1 ada/nodes.lkt:526
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 332 '<FieldAccess for get_parent at nodes.lkt:526:46>' Fld ada/nodes.lkt:526
      if To_Insert = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := To_Insert.Parent;
--# expr-done 332
--# property-call-start AdaNode.insert_rebindings
Fld_1 := Libadalang.Implementation.Ada_Node_P_Insert_Rebindings (Node => Self, Base => Base, To_Insert => Fld);
--# end
--# expr-done 333
--# expr-start 334 '<FieldAccess for old_env at nodes.lkt:527:17>' Fld_2 ada/nodes.lkt:527
      if To_Insert = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := To_Insert.Old_Env;
Inc_Ref (Fld_2);
--# expr-done 334
--# expr-start 335 '<FieldAccess for new_env at nodes.lkt:528:17>' Fld_3 ada/nodes.lkt:528
      if To_Insert = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := To_Insert.New_Env;
Inc_Ref (Fld_3);
--# expr-done 335
--# property-call-start AdaNode.add_rebinding
Fld_4 := Libadalang.Implementation.Ada_Node_P_Add_Rebinding (Node => Self, Base => Fld_1, Old_Env => Fld_2, New_Env => Fld_3);
--# end
--# expr-done 336
   If_Result := Fld_4;
end if;
--# expr-done 337
   If_Result_1 := If_Result;
end if;
--# expr-done 338
   If_Result_2 := If_Result_1;
end if;
--# expr-done 339
         Property_Result := If_Result_2;
   --# end
      Finalizer_Scope_29;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_29;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Insert_Rebindings;
--# end
--# property-start AdaNode.has_parent_rebindings ada/nodes.lkt:535
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Has_Parent_Rebindings
  (Node : Bare_Ada_Node
      ; Base : Env_Rebindings
      ; Parent : Env_Rebindings
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind base Base
   --# bind parent Parent
   Property_Result : Boolean;
      Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
Not_Val : Boolean;
Fld : Env_Rebindings;
Fld_1 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 348 '<BooleanBinaryOp Or at nodes.lkt:539:9>' If_Result_2 ada/nodes.lkt:539
--# expr-start 342 '<BooleanBinaryOp Or at nodes.lkt:539:9>' If_Result ada/nodes.lkt:539
--# expr-start 340 '<Eq at nodes.lkt:539:9>' Is_Equal ada/nodes.lkt:539
Is_Equal := Base = Parent; 
--# expr-done 340
if Is_Equal then
   If_Result := True;
else
   --# expr-start 341 '<IsNull at nodes.lkt:539:27>' Is_Equal_1 ada/nodes.lkt:539
Is_Equal_1 := Parent = null; 
--# expr-done 341
   If_Result := Is_Equal_1;
end if;
--# expr-done 342
if If_Result then
   If_Result_2 := True;
else
   --# expr-start 347 '<BooleanBinaryOp And at nodes.lkt:541:13>' If_Result_1 ada/nodes.lkt:541
--# expr-start 344 '<Not at nodes.lkt:541:13>' Not_Val ada/nodes.lkt:541
--# expr-start 343 '<IsNull at nodes.lkt:541:17>' Is_Equal_2 ada/nodes.lkt:541
Is_Equal_2 := Base = null; 
--# expr-done 343
Not_Val := not (Is_Equal_2); 
--# expr-done 344
if Not_Val then
   --# expr-start 346 '<FieldAccess for has_parent_rebindings at nodes.lkt:542:17>' Fld_1 ada/nodes.lkt:542
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 345 '<FieldAccess for get_parent at nodes.lkt:542:44>' Fld ada/nodes.lkt:542
      if Base = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Base.Parent;
--# expr-done 345
--# property-call-start AdaNode.has_parent_rebindings
Fld_1 := Libadalang.Implementation.Ada_Node_P_Has_Parent_Rebindings (Node => Self, Base => Fld, Parent => Parent);
--# end
--# expr-done 346
   If_Result_1 := Fld_1;
else
   If_Result_1 := False;
end if;
--# expr-done 347
   If_Result_2 := If_Result_1;
end if;
--# expr-done 348
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Has_Parent_Rebindings;
--# end
--# property-start AdaNode.logic_val ada/nodes.lkt:550
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Logic_Val
  (Node : Bare_Ada_Node
      ; From_Node : Internal_Entity
      ; Lvar : Logic_Var
  )
   return Internal_Logic_Val_Result
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind from_node From_Node
   --# bind lvar Lvar
   Property_Result : Internal_Logic_Val_Result;
      Local_Success : Boolean;
Fld : Boolean;
Is_Logic_Var_Defined : Boolean;
Eq_Solution : Internal_Entity;
If_Result : Internal_Entity;
If_Result_1 : Internal_Entity;
New_Struct : Internal_Logic_Val_Result;
Let_Result : Internal_Logic_Val_Result;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 353 '<Let at nodes.lkt:554:9>' Let_Result ada/nodes.lkt:554
--# scope-start
--# expr-start 349 '<FieldAccess for resolve_names_from_closest_entry_point at nodes.lkt:554:23>' Fld ada/nodes.lkt:554
      if From_Node.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_from_closest_entry_point
Fld := Libadalang.Implementation.Ada_Node_P_Resolve_Names_From_Closest_Entry_Point (Node => From_Node.Node, E_Info => From_Node.Info);
--# end
--# expr-done 349
Local_Success := Fld; 
--# bind success Local_Success
--# expr-start 352 '<New LogicValResult at nodes.lkt:556:9>' New_Struct ada/nodes.lkt:556
--# expr-start 351 '<If at nodes.lkt:558:19>' If_Result_1 ada/nodes.lkt:558
if Local_Success then
   --# expr-start 350 '<get_value at nodes.lkt:558:35>' If_Result ada/nodes.lkt:558
Is_Logic_Var_Defined := Entity_Vars.Is_Defined (Lvar); 
if Is_Logic_Var_Defined then
Eq_Solution := Entity_Vars.Get_Value (Lvar); 
   If_Result := Eq_Solution;
else
   If_Result := No_Entity;
end if;
--# expr-done 350
   If_Result_1 := If_Result;
else
   If_Result_1 := No_Entity;
end if;
--# expr-done 351
New_Struct := (Success => Local_Success, Value => If_Result_1); 
--# expr-done 352
Let_Result := New_Struct; 
--# end
--# expr-done 353
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Logic_Val;
--# end
--# property-start AdaNode.semantic_parent_helper ada/nodes.lkt:562
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Semantic_Parent_Helper
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity;
            procedure Finalizer_Scope_1925 with Inline_Always;
      Var_Expr_0 : Lexical_Env := Empty_Env;
Var_Expr : Internal_Entity;
Env_Node : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Env_Parent : Lexical_Env := Empty_Env;
Fld : Internal_Entity;
Result_Var : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
            procedure Finalizer_Scope_1925 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Env_Parent);
            end Finalizer_Scope_1925;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
Var_Expr_0 := Env;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_Env then
   --# scope-start
   --# bind env Var_Expr_0
--# expr-start 355 '<as_entity at nodes.lkt:565:13>' If_Result ada/nodes.lkt:565
--# expr-start 354 '<env_node at nodes.lkt:565:13>' Env_Node ada/nodes.lkt:565
Env_Node := AST_Envs.Env_Node (Var_Expr_0); 
--# expr-done 354
Is_Null := Env_Node = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Env_Node); 
   If_Result := As_Entity;
end if;
--# expr-done 355
Var_Expr := If_Result;
if Var_Expr /= No_Entity then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 357 '<FieldAccess for semantic_parent_helper at nodes.lkt:566:17>' Fld ada/nodes.lkt:566
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 356 '<env_parent at nodes.lkt:566:45>' Env_Parent ada/nodes.lkt:566
Env_Parent := AST_Envs.Parent (Var_Expr_0); 
--# expr-done 356
--# property-call-start AdaNode.semantic_parent_helper
Fld := Libadalang.Implementation.Ada_Node_P_Semantic_Parent_Helper (Node => Ent.Node, Env => Env_Parent, E_Info => Ent.Info);
--# end
--# expr-done 357
   Result_Var := Fld;
end if;
Scope_Result_1 := Result_Var;
   --# end
      Finalizer_Scope_1925;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1925;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Semantic_Parent_Helper;
--# end
--# property-start AdaNode.semantic_parent ada/nodes.lkt:576
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Semantic_Parent
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity;
            procedure Finalizer_Scope_33 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity;
            procedure Finalizer_Scope_33 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_33;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 359 '<FieldAccess for semantic_parent_helper at nodes.lkt:577:9>' Fld_1 ada/nodes.lkt:577
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 358 '<FieldAccess for node_env at nodes.lkt:577:37>' Fld ada/nodes.lkt:577
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 358
--# property-call-start AdaNode.semantic_parent_helper
Fld_1 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent_Helper (Node => Ent.Node, Env => Fld, E_Info => Ent.Info);
--# end
--# expr-done 359
         Property_Result := Fld_1;
   --# end
      Finalizer_Scope_33;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_33;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Semantic_Parent;
--# end
--# property-start AdaNode.semantic_parents ada/nodes.lkt:581
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Semantic_Parents
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_34 with Inline_Always;
            procedure Finalizer_Scope_1927 with Inline_Always;
      Var_Expr_0 : Internal_Entity;
Fld : Internal_Entity;
Array_Lit : Internal_Entity_Array_Access;
Fld_1 : Internal_Entity_Array_Access;
Concat_Result : Internal_Entity_Array_Access;
Scope_Result : Internal_Entity_Array_Access;
Result_Var : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_34 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_34;
            procedure Finalizer_Scope_1927 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_1927;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 360 '<FieldAccess for semantic_parent at nodes.lkt:582:9>' Fld ada/nodes.lkt:582
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 360
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity then
   --# scope-start
   --# bind sp Var_Expr_0
--# expr-start 361 '<ArrayLiteral at nodes.lkt:582:43>' Array_Lit ada/nodes.lkt:582
Array_Lit := Create_Internal_Entity_Array (Internal_Internal_Entity_Array'(1 => Var_Expr_0)); 
--# expr-done 361
--# expr-start 362 '<FieldAccess for semantic_parents at nodes.lkt:582:50>' Fld_1 ada/nodes.lkt:582
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parents
Fld_1 := Libadalang.Implementation.Ada_Node_P_Semantic_Parents (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 362
Concat_Result := Concat (Array_Lit, Fld_1); 
Scope_Result := Concat_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_1927;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_34;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_34;
                     Finalizer_Scope_1927;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Semantic_Parents;
--# end
--# property-start AdaNode.parent_basic_decl ada/nodes.lkt:598
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Parent_Basic_Decl
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_35 with Inline_Always;
      Local_Gen_Decl : Internal_Entity_Generic_Decl;
Local_Gen_Body : Internal_Entity_Generic_Decl;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Entity_Generic_Decl;
Var_Expr_2 : Internal_Entity;
Var_Expr_8 : Internal_Entity_Body_Node;
Var_Expr : Internal_Entity_Generic_Decl;
Var_Expr_3 : Internal_Entity_Generic_Instantiation;
Var_Expr_4 : Internal_Entity_Generic_Decl;
Var_Expr_5 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Fld_1 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Generic_Decl;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Body_Node;
Fld_2 : Internal_Entity_Basic_Decl;
Cast_Expr_2 : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Generic_Decl;
Scope_Result : Internal_Entity_Generic_Decl;
Fld_3 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Generic_Decl;
Result_Var : Internal_Entity_Generic_Decl;
Scope_Result_1 : Internal_Entity_Generic_Decl;
Result_Var_1 : Internal_Entity_Generic_Decl;
Scope_Result_2 : Internal_Entity_Generic_Decl;
Result_Var_2 : Internal_Entity_Generic_Decl;
Scope_Result_3 : Internal_Entity_Generic_Decl;
Result_Var_3 : Internal_Entity_Generic_Decl;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Internal_Entity_Generic_Instantiation;
Scope_Result_4 : Internal_Entity_Generic_Instantiation;
Result_Var_4 : Internal_Entity_Generic_Instantiation;
Scope_Result_5 : Internal_Entity_Generic_Instantiation;
Fld_6 : Internal_Entity;
Fld_7 : Internal_Entity_Basic_Decl;
Cast_Expr_3 : Internal_Entity;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Scope_Result_6 : Internal_Entity_Basic_Decl;
Fld_8 : Internal_Entity_Basic_Decl;
Result_Var_5 : Internal_Entity_Basic_Decl;
Is_A_1 : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Scope_Result_7 : Internal_Entity_Basic_Decl;
Result_Var_6 : Internal_Entity_Basic_Decl;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Result_Var_7 : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Is_A_2 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_35 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_35;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 384 '<If at nodes.lkt:603:9>' If_Result_1 ada/nodes.lkt:603
--# expr-start 363 '<IsA ClasswideTypeDecl, DiscreteBaseSubtypeDecl, SynthAnonymousTypeDecl, SyntheticSubpDecl at nodes.lkt:604:13>' Is_A_2 ada/nodes.lkt:604
Is_A_2 := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Classwide_Type_Decl_Range | Ada_Discrete_Base_Subtype_Decl_Range | Ada_Synth_Anonymous_Type_Decl_Range | Ada_Synthetic_Subp_Decl_Range; 
--# expr-done 363
if Is_A_2 then
   --# expr-start 367 '<FieldAccess for parent_basic_decl at nodes.lkt:609:13>' Fld_1 ada/nodes.lkt:609
--# expr-start 366 '<Find at nodes.lkt:609:13>' Find_Result ada/nodes.lkt:609
   --# expr-start 364 '<FieldAccess for parents at nodes.lkt:609:13>' Fld ada/nodes.lkt:609
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => False, E_Info => Ent.Info);
--# expr-done 364
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_3
      --# expr-start 365 '<IsA BasicDecl at nodes.lkt:610:24>' Is_A ada/nodes.lkt:610
Is_A := Item_3.Node /= null 
and then Item_3.Node.Kind in Ada_Basic_Decl; 
--# expr-done 365
      if Is_A then
         Find_Result := Item_3; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 366
      if Find_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_1 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Find_Result.Node, E_Info => Find_Result.Info);
--# end
--# expr-done 367
   If_Result_1 := Fld_1;
else
   --# expr-start 383 '<Let at nodes.lkt:613:13>' Let_Result_1 ada/nodes.lkt:613
--# scope-start
--# expr-start 368 '<Cast to GenericDecl at nodes.lkt:613:28>' Cast_Result ada/nodes.lkt:613
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Generic_Decl
   then
      Cast_Result := Create_Internal_Entity_Generic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Generic_Decl;
   end if;
--# expr-done 368
Local_Gen_Decl := Cast_Result; 
--# bind gen_decl Local_Gen_Decl
--# expr-start 382 '<Let at nodes.lkt:614:13>' Let_Result ada/nodes.lkt:614
--# scope-start
--# expr-start 369 '<Cast to Body at nodes.lkt:615:17>' Cast_Result_1 ada/nodes.lkt:615
Cast_Expr_1 := Ent; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Body_Node
   then
      Cast_Result_1 := Create_Internal_Entity_Body_Node
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Body_Node;
   end if;
--# expr-done 369
Var_Expr_8 := Cast_Result_1;
if Var_Expr_8 /= No_Entity_Body_Node then
   --# scope-start
--# expr-start 370 '<FieldAccess for decl_part at nodes.lkt:615:17>' Fld_2 ada/nodes.lkt:615
      if Var_Expr_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_2 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Var_Expr_8.Node, Imprecise_Fallback => False, E_Info => Var_Expr_8.Info);
--# end
--# expr-done 370
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind dp Var_Expr_0
--# expr-start 371 '<Cast to GenericDecl at nodes.lkt:616:29>' Cast_Result_2 ada/nodes.lkt:616
Cast_Expr_2 := Var_Expr_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Generic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Generic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_2 := No_Entity_Generic_Decl;
   end if;
--# expr-done 371
Var_Expr := Cast_Result_2;
if Var_Expr /= No_Entity_Generic_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 373 '<Cast to GenericDecl at nodes.lkt:616:52>' Cast_Result_3 ada/nodes.lkt:616
--# expr-start 372 '<parent at nodes.lkt:616:52>' Fld_3 ada/nodes.lkt:616
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 372
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Generic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Generic_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result_3 := No_Entity_Generic_Decl;
   end if;
--# expr-done 373
   Result_Var := Cast_Result_3;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Generic_Decl;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Generic_Decl;
end if;
Local_Gen_Body := Result_Var_2; 
--# bind gen_body Local_Gen_Body
Var_Expr_4 := Local_Gen_Decl;
if Var_Expr_4 /= No_Entity_Generic_Decl then
   --# scope-start
   --# bind e Var_Expr_4
Scope_Result_3 := Var_Expr_4;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := Local_Gen_Body;
end if;
Var_Expr_1 := Result_Var_3;
if Var_Expr_1 /= No_Entity_Generic_Decl then
   --# scope-start
   --# bind gd Var_Expr_1
--# expr-start 375 '<FieldAccess for get_instantiation at nodes.lkt:618:48>' Fld_5 ada/nodes.lkt:618
--# expr-start 374 '<FieldAccess for decl at nodes.lkt:618:48>' Fld_4 ada/nodes.lkt:618
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericDecl.decl'
Fld_4 := Libadalang.Implementation.Dispatcher_Generic_Decl_P_Decl (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 374
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.get_instantiation
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Get_Instantiation (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 375
Scope_Result_4 := Fld_5;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := No_Entity_Generic_Instantiation;
end if;
Var_Expr_3 := Result_Var_4;
if Var_Expr_3 /= No_Entity_Generic_Instantiation then
   --# scope-start
   --# bind e Var_Expr_3
Scope_Result_5 := Var_Expr_3;
   --# end
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Scope_Result_5.Node,
         Info => Scope_Result_5.Info);
   Result_Var_7 := Cast_Result_5;
else
--# expr-start 376 '<FieldAccess for semantic_parent at nodes.lkt:619:17>' Fld_6 ada/nodes.lkt:619
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_6 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 376
Var_Expr_2 := Fld_6;
if Var_Expr_2 /= No_Entity then
   --# scope-start
   --# bind sp Var_Expr_2
--# expr-start 381 '<If at nodes.lkt:621:17>' If_Result ada/nodes.lkt:621
--# expr-start 377 '<IsA GenericSubpInternal, GenericPackageInternal at nodes.lkt:621:20>' Is_A_1 ada/nodes.lkt:621
Is_A_1 := Var_Expr_2.Node /= null 
and then Var_Expr_2.Node.Kind in Ada_Generic_Subp_Internal_Range | Ada_Generic_Package_Internal_Range; 
--# expr-done 377
if Is_A_1 then
   --# expr-start 378 '<FieldAccess for parent_basic_decl at nodes.lkt:622:22>' Fld_7 ada/nodes.lkt:622
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_7 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 378
   If_Result := Fld_7;
else
--# expr-start 379 '<Cast to BasicDecl at nodes.lkt:623:22>' Cast_Result_4 ada/nodes.lkt:623
Cast_Expr_3 := Var_Expr_2; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_4 := No_Entity_Basic_Decl;
   end if;
--# expr-done 379
Var_Expr_5 := Cast_Result_4;
if Var_Expr_5 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind e Var_Expr_5
Scope_Result_6 := Var_Expr_5;
   --# end
   Result_Var_5 := Scope_Result_6;
else
   --# expr-start 380 '<FieldAccess for parent_basic_decl at nodes.lkt:623:43>' Fld_8 ada/nodes.lkt:623
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_8 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 380
   Result_Var_5 := Fld_8;
end if;
   If_Result := Result_Var_5;
end if;
--# expr-done 381
Scope_Result_7 := If_Result;
   --# end
   Result_Var_6 := Scope_Result_7;
else
   Result_Var_6 := No_Entity_Basic_Decl;
end if;
   Result_Var_7 := Result_Var_6;
end if;
Let_Result := Result_Var_7; 
--# end
--# expr-done 382
Let_Result_1 := Let_Result; 
--# end
--# expr-done 383
   If_Result_1 := Let_Result_1;
end if;
--# expr-done 384
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_35;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_35;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Parent_Basic_Decl;
--# end
--# property-start AdaNode.is_spark_impl ada/nodes.lkt:636
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Is_Spark_Impl
  (Node : Bare_Ada_Node
      ; Include_Skip_Proof_Annotations : Boolean
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind include_skip_proof_annotations Include_Skip_Proof_Annotations
   Property_Result : Boolean;
            procedure Finalizer_Scope_36 with Inline_Always;
            procedure Finalizer_Scope_1940 with Inline_Always;
      Local_Spark_Mode : Internal_Aspect;
Var_Expr_0 : Internal_Entity_Expr;
Var_Expr_1 : Internal_Entity_Body_Node;
Var_Expr_3 : Internal_Entity_Body_Node;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Sym : Symbol_Type;
Fld_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Fld_3 : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Body_Node;
Scope_Result_1 : Internal_Entity_Body_Node;
Fld_4 : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Cast_Result_2 : Internal_Entity_Body_Node;
Result_Var_1 : Internal_Entity_Body_Node;
Fld_5 : Internal_Entity_Expr_Array_Access;
Cast_Expr_2 : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Name;
Fld_6 : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result_1 : Boolean;
Find_Result_1 : Internal_Entity_Expr;
Scope_Result_2 : Internal_Entity_Expr;
Result_Var_2 : Internal_Entity_Expr;
Is_Null : Boolean;
Not_Val_1 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Let_Result : Boolean;
            procedure Finalizer_Scope_36 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_36;
            procedure Finalizer_Scope_1940 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_1940;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 408 '<Let at nodes.lkt:637:9>' Let_Result ada/nodes.lkt:637
--# scope-start
--# expr-start 385 '<FieldAccess for spark_mode_aspect at nodes.lkt:637:26>' Fld ada/nodes.lkt:637
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.spark_mode_aspect'
Fld := Libadalang.Implementation.Dispatcher_Ada_Node_P_Spark_Mode_Aspect (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 385
Local_Spark_Mode := Fld; 
--# bind spark_mode Local_Spark_Mode
--# expr-start 407 '<If at nodes.lkt:641:9>' If_Result_3 ada/nodes.lkt:641
--# expr-start 399 '<BooleanBinaryOp And at nodes.lkt:642:13>' If_Result_2 ada/nodes.lkt:642
if Include_Skip_Proof_Annotations then
   --# expr-start 398 '<Not at nodes.lkt:643:17>' Not_Val_1 ada/nodes.lkt:643
--# expr-start 397 '<IsNull at nodes.lkt:643:21>' Is_Null ada/nodes.lkt:643
--# expr-start 386 '<Cast to Body at nodes.lkt:643:21>' Cast_Result_1 ada/nodes.lkt:643
Cast_Expr_1 := Ent; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Body_Node
   then
      Cast_Result_1 := Create_Internal_Entity_Body_Node
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Body_Node;
   end if;
--# expr-done 386
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Entity_Body_Node then
   --# scope-start
   --# bind b Var_Expr_1
Scope_Result_1 := Var_Expr_1;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 390 '<Cast to Body at nodes.lkt:645:29>' Cast_Result_2 ada/nodes.lkt:645
--# expr-start 389 '<Find at nodes.lkt:645:29>' Find_Result ada/nodes.lkt:645
   --# expr-start 387 '<FieldAccess for semantic_parents at nodes.lkt:645:29>' Fld_4 ada/nodes.lkt:645
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parents
Fld_4 := Libadalang.Implementation.Ada_Node_P_Semantic_Parents (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 387
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_4;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_2
      --# expr-start 388 '<IsA Body at nodes.lkt:645:65>' Is_A ada/nodes.lkt:645
Is_A := Item_2.Node /= null 
and then Item_2.Node.Kind in Ada_Body_Node; 
--# expr-done 388
      if Is_A then
         Find_Result := Item_2; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 389
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Body_Node
   then
      Cast_Result_2 := Create_Internal_Entity_Body_Node
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_2 := No_Entity_Body_Node;
   end if;
--# expr-done 390
   Result_Var_1 := Cast_Result_2;
end if;
Var_Expr_3 := Result_Var_1;
if Var_Expr_3 /= No_Entity_Body_Node then
   --# scope-start
   --# bind b Var_Expr_3
--# expr-start 396 '<Find at nodes.lkt:650:17>' Find_Result_1 ada/nodes.lkt:650
   --# expr-start 391 '<FieldAccess for gnatprove_annotations at nodes.lkt:650:17>' Fld_5 ada/nodes.lkt:650
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.gnatprove_annotations
Fld_5 := Libadalang.Implementation.Body_Node_P_Gnatprove_Annotations (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 391
      Find_Result_1 := No_Entity_Expr;
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Fld_5;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind a Item_4
      --# expr-start 393 '<FieldAccess for name_symbol at nodes.lkt:652:21>' Fld_6 ada/nodes.lkt:652
--# expr-start 392 '<Cast to Name at nodes.lkt:652:21>' Cast_Result_3 ada/nodes.lkt:652
Cast_Expr_2 := Item_4; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Name
   then
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_3 := No_Entity_Name;
   end if;
--# expr-done 392
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Cast_Result_3.Node);
--# end
--# expr-done 393
--# expr-start 394 '<Symbol Skip_Proof at nodes.lkt:652:49>' Sym_1 ada/nodes.lkt:652
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Skip_Proof); 
--# expr-done 394
Is_Equal_1 := Fld_6 = Sym_1; 
if Is_Equal_1 then
   If_Result_1 := True;
else
--# expr-start 395 '<Symbol Skip_Flow_And_Proof at nodes.lkt:653:27>' Sym_2 ada/nodes.lkt:653
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Skip_Flow_And_Proof); 
--# expr-done 395
Is_Equal := Fld_6 = Sym_2; 
   If_Result_1 := Is_Equal;
end if;
      if If_Result_1 then
         Find_Result_1 := Item_4; 
      end if;
   --# end
               exit when If_Result_1;
         end loop;
      end;
--# expr-done 396
Scope_Result_2 := Find_Result_1;
   --# end
      Finalizer_Scope_1940;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Expr;
end if;
Is_Null := Result_Var_2.Node = null; 
--# expr-done 397
Not_Val_1 := not (Is_Null); 
--# expr-done 398
   If_Result_2 := Not_Val_1;
else
   If_Result_2 := False;
end if;
--# expr-done 399
if If_Result_2 then
   If_Result_3 := False;
else
   --# expr-start 406 '<If at nodes.lkt:641:9>' If_Result ada/nodes.lkt:641
--# expr-start 401 '<Not at nodes.lkt:659:14>' Not_Val ada/nodes.lkt:659
--# expr-start 400 '<FieldAccess for exists at nodes.lkt:659:18>' Fld_3 ada/nodes.lkt:659
Fld_3 := Local_Spark_Mode.Exists;
--# expr-done 400
Not_Val := not (Fld_3); 
--# expr-done 401
if Not_Val then
   If_Result := False;
else
--# expr-start 402 '<FieldAccess for value at nodes.lkt:661:13>' Fld_1 ada/nodes.lkt:661
Fld_1 := Local_Spark_Mode.Value;
--# expr-done 402
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind mode Var_Expr_0
--# expr-start 405 '<FieldAccess for name_is at nodes.lkt:662:27>' Fld_2 ada/nodes.lkt:662
--# expr-start 403 '<Cast to Name at nodes.lkt:662:27>' Cast_Result ada/nodes.lkt:662
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 403
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 404 '<Symbol On at nodes.lkt:662:49>' Sym ada/nodes.lkt:662
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_On); 
--# expr-done 404
--# property-call-start Name.name_is
Fld_2 := Libadalang.Implementation.Name_P_Name_Is (Node => Cast_Result.Node, Sym => Sym);
--# end
--# expr-done 405
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 406
   If_Result_3 := If_Result;
end if;
--# expr-done 407
Let_Result := If_Result_3; 
--# end
--# expr-done 408
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_36;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_36;
                     Finalizer_Scope_1940;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Is_Spark_Impl;
--# end
--# property-start AdaNode.has_spark_mode_on ada/nodes.lkt:674
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Has_Spark_Mode_On
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 409 '<FieldAccess for is_spark_impl at nodes.lkt:674:37>' Fld ada/nodes.lkt:674
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.is_spark_impl
Fld := Libadalang.Implementation.Ada_Node_P_Is_Spark_Impl (Node => Ent.Node, Include_Skip_Proof_Annotations => False, E_Info => Ent.Info);
--# end
--# expr-done 409
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Has_Spark_Mode_On;
--# end
--# property-start AdaNode.is_subject_to_proof ada/nodes.lkt:679
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Is_Subject_To_Proof
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 410 '<FieldAccess for is_spark_impl at nodes.lkt:679:39>' Fld ada/nodes.lkt:679
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.is_spark_impl
Fld := Libadalang.Implementation.Ada_Node_P_Is_Spark_Impl (Node => Ent.Node, Include_Skip_Proof_Annotations => True, E_Info => Ent.Info);
--# end
--# expr-done 410
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Is_Subject_To_Proof;
--# end
--# property-start AdaNode.designated_compilation_unit ada/nodes.lkt:712
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Designated_Compilation_Unit
  (Node : Bare_Ada_Node
      ; Name : Symbol_Type_Array_Access
      ; Kind : Analysis_Unit_Kind
      ; Load_If_Needed : Boolean
         := True
      ; Not_Found_Is_Error : Boolean
         := True
      ; Process_Parents : Boolean
         := True
  )
   return Bare_Compilation_Unit
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind name Name
   --# bind kind Kind
   --# bind load_if_needed Load_If_Needed
   --# bind not_found_is_error Not_Found_Is_Error
   --# bind process_parents Process_Parents
   Property_Result : Bare_Compilation_Unit;
      Local_Designated_Analysis_Unit : Internal_Unit;
Fld : Internal_Unit;
Fld_1 : Bare_Compilation_Unit;
Let_Result : Bare_Compilation_Unit;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 413 '<Let at nodes.lkt:719:9>' Let_Result ada/nodes.lkt:719
--# scope-start
--# expr-start 411 '<FieldAccess for get_unit at nodes.lkt:720:13>' Fld ada/nodes.lkt:720
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Ada_Node_P_Get_Unit (Node => Self, Name => Name, Kind => Kind, Load_If_Needed => Load_If_Needed, Not_Found_Is_Error => Not_Found_Is_Error, Process_Parents => Process_Parents);
--# expr-done 411
Local_Designated_Analysis_Unit := Fld; 
--# bind designated_analysis_unit Local_Designated_Analysis_Unit
--# expr-start 412 '<FieldAccess for compilation_unit_with_name at nodes.lkt:728:9>' Fld_1 ada/nodes.lkt:728
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.compilation_unit_with_name
Fld_1 := Libadalang.Implementation.Ada_Node_P_Compilation_Unit_With_Name (Node => Self, Unit => Local_Designated_Analysis_Unit, Name => Name);
--# end
--# expr-done 412
Let_Result := Fld_1; 
--# end
--# expr-done 413
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Designated_Compilation_Unit;
--# end
--# property-start AdaNode.compilation_unit_with_name ada/nodes.lkt:734
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Compilation_Unit_With_Name
  (Node : Bare_Ada_Node
      ; Unit : Internal_Unit
      ; Name : Symbol_Type_Array_Access
  )
   return Bare_Compilation_Unit
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind unit Unit
   --# bind name Name
   Property_Result : Bare_Compilation_Unit;
            procedure Finalizer_Scope_1945 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Match_0 : Bare_Compilation_Unit;
Match_1 : Bare_Compilation_Unit_List;
Match_2 : Bare_Pragma_Node_List;
Match_3 : Bare_Ada_Node;
Fld : Bare_Ada_Node;
Item_1 : Bare_Compilation_Unit;
Fld_1 : Symbol_Type_Array_Access;
Is_Equal : Boolean;
Find_Result : Bare_Compilation_Unit;
Match_Prefix : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Let_Result : Bare_Compilation_Unit;
Scope_Result : Bare_Compilation_Unit;
Cast_Result_1 : Bare_Compilation_Unit_List;
Let_Result_1 : Bare_Compilation_Unit;
Scope_Result_1 : Bare_Compilation_Unit;
Cast_Result_2 : Bare_Pragma_Node_List;
Let_Result_2 : Bare_Compilation_Unit;
Scope_Result_2 : Bare_Compilation_Unit;
Cast_Result_3 : Bare_Ada_Node;
Let_Result_3 : Bare_Compilation_Unit;
Scope_Result_3 : Bare_Compilation_Unit;
Match_Result : Bare_Compilation_Unit;
Scope_Result_4 : Bare_Compilation_Unit;
Result_Var : Bare_Compilation_Unit;
            procedure Finalizer_Scope_1945 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1945;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 414 '<FieldAccess for root at nodes.lkt:738:9>' Fld ada/nodes.lkt:738
      if Unit = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Unit.Ast_Root;
--# expr-done 414
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 418 '<Match at nodes.lkt:740:13>' Match_Result ada/nodes.lkt:740
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Compilation_Unit =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind single Match_0
Let_Result := Match_0; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Compilation_Unit_List =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind multi Match_1
--# expr-start 417 '<Find at nodes.lkt:749:21>' Find_Result ada/nodes.lkt:749
      Find_Result := No_Bare_Ada_Node;
      if Match_1 = null then
      Find_Result := No_Bare_Ada_Node;
      else
      declare
         Collection : constant Bare_Compilation_Unit_List := Match_1;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_1 := Untyped_Item_1; 
   --# scope-start
               --# bind c Item_1
      --# expr-start 416 '<Eq at nodes.lkt:750:32>' Is_Equal ada/nodes.lkt:750
--# expr-start 415 '<FieldAccess for syntactic_fully_qualified_name at nodes.lkt:750:32>' Fld_1 ada/nodes.lkt:750
      if Item_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.syntactic_fully_qualified_name
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Syntactic_Fully_Qualified_Name (Node => Item_1);
--# end
--# expr-done 415
Is_Equal := Equivalent (Fld_1, Name); 
--# expr-done 416
      if Is_Equal then
         Find_Result := Item_1; 
      end if;
   --# end
      Finalizer_Scope_1945;
               exit when Is_Equal;
         end loop;
      end;
      end if;
--# expr-done 417
Let_Result_1 := Find_Result; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Pragma_Node_List =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Bare_Ada_Node; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Abort_Absent .. Ada_Case_Stmt_Alternative_List | Ada_Concat_Operand_List .. Ada_Param_Spec_List | Ada_Select_When_Part_List .. Ada_Case_Stmt_Alternative | Ada_Component_Clause .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_3 := Cast_Result_3; 
--# bind _ Match_3
Let_Result_3 := raise Property_Error with "Unexpected analysis unit root"; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 418
Scope_Result_4 := Match_Result;
   --# end
   Result_Var := Scope_Result_4;
else
   Result_Var := No_Bare_Ada_Node;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1945;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Compilation_Unit_With_Name;
--# end
--# property-start AdaNode.get_unit_root_decl ada/nodes.lkt:766
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Get_Unit_Root_Decl
  (Node : Bare_Ada_Node
      ; Name : Symbol_Type_Array_Access
      ; Kind : Analysis_Unit_Kind
      ; Load_If_Needed : Boolean
         := True
      ; Not_Found_Is_Error : Boolean
         := True
      ; Process_Parents : Boolean
         := True
  )
   return Bare_Basic_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind name Name
   --# bind kind Kind
   --# bind load_if_needed Load_If_Needed
   --# bind not_found_is_error Not_Found_Is_Error
   --# bind process_parents Process_Parents
   Property_Result : Bare_Basic_Decl;
      Local_Cu : Bare_Compilation_Unit;
Var_Expr_9 : Bare_Compilation_Unit;
Fld : Bare_Compilation_Unit;
Fld_1 : Bare_Basic_Decl;
Scope_Result : Bare_Basic_Decl;
Result_Var : Bare_Basic_Decl;
Let_Result : Bare_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 421 '<Let at nodes.lkt:773:9>' Let_Result ada/nodes.lkt:773
--# scope-start
--# expr-start 419 '<FieldAccess for designated_compilation_unit at nodes.lkt:774:13>' Fld ada/nodes.lkt:774
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.designated_compilation_unit
Fld := Libadalang.Implementation.Ada_Node_P_Designated_Compilation_Unit (Node => Self, Name => Name, Kind => Kind, Load_If_Needed => Load_If_Needed, Not_Found_Is_Error => Not_Found_Is_Error, Process_Parents => Process_Parents);
--# end
--# expr-done 419
Local_Cu := Fld; 
--# bind cu Local_Cu
Var_Expr_9 := Local_Cu;
if Var_Expr_9 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 420 '<FieldAccess for decl at nodes.lkt:782:9>' Fld_1 ada/nodes.lkt:782
      if Var_Expr_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Var_Expr_9);
--# end
--# expr-done 420
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
Let_Result := Result_Var; 
--# end
--# expr-done 421
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Get_Unit_Root_Decl;
--# end
--# property-start AdaNode.xref_initial_env ada/nodes.lkt:799
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Xref_Initial_Env
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_44 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_44 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_44;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 422 '<FieldAccess for children_env at nodes.lkt:799:42>' Fld ada/nodes.lkt:799
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 422
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_44;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_44;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Xref_Initial_Env;
--# end
--# property-start AdaNode.bind_to_non_local ada/nodes.lkt:814
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Bind_To_Non_Local
  (Node : Bare_Ada_Node
      ; Dest : Logic_Var
      ; Outer_Node : Bare_Ada_Node
      ; Node_Var : Logic_Var
      ; Entry_Point : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind dest Dest
   --# bind outer_node Outer_Node
   --# bind node_var Node_Var
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_45 with Inline_Always;
      Bind_Result : Logic_Equation;
Is_Logic_Var_Defined : Boolean;
Eq_Solution : Internal_Entity;
If_Result : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Node_Parents : Bare_Ada_Node_Array_Access;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Ada_Node;
Is_Equal : Boolean;
Quantifier_Result : Boolean;
If_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_45 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Node_Parents);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_45;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 429 '<If at nodes.lkt:819:9>' If_Result_1 ada/nodes.lkt:819
--# expr-start 425 '<Contains at nodes.lkt:819:12>' Quantifier_Result ada/nodes.lkt:819
   --# expr-start 423 '<FieldAccess for parents at nodes.lkt:819:12>' Node_Parents ada/nodes.lkt:819
      if Outer_Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Outer_Node, True); 
--# expr-done 423
      Quantifier_Result := False;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_0
      --# expr-start 424 '<Eq at ???>' Is_Equal None
Cast_Expr := Item_0; 
      Cast_Result := Cast_Expr;
Is_Equal := Cast_Result = Entry_Point; 
--# expr-done 424
      Quantifier_Result := Is_Equal;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 425
if Quantifier_Result then
   --# expr-start 426 '<Bind at nodes.lkt:819:60>' Bind_Result ada/nodes.lkt:819
Dest.Value := No_Entity;
Entity_Vars.Reset (Dest);
Node_Var.Value := No_Entity;
Entity_Vars.Reset (Node_Var);
Bind_Result := Solver.Create_Unify (Dest, Node_Var, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:819:60") else null)); 
--# expr-done 426
   If_Result_1 := Bind_Result;
else
   --# expr-start 428 '<Bind at nodes.lkt:820:14>' Bind_Result_1 ada/nodes.lkt:820
Dest.Value := No_Entity;
Entity_Vars.Reset (Dest);
--# expr-start 427 '<get_value at nodes.lkt:820:22>' If_Result ada/nodes.lkt:820
Is_Logic_Var_Defined := Entity_Vars.Is_Defined (Node_Var); 
if Is_Logic_Var_Defined then
Eq_Solution := Entity_Vars.Get_Value (Node_Var); 
   If_Result := Eq_Solution;
else
   If_Result := No_Entity;
end if;
--# expr-done 427
Bind_Result_1 := Solver.Create_Assign (Dest, If_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:820:14") else null)); 
--# expr-done 428
   If_Result_1 := Bind_Result_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 429
         Property_Result := If_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_45;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_45;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Bind_To_Non_Local;
--# end
--# property-start AdaNode.sub_equation ada/nodes.lkt:828
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Sub_Equation
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_46 with Inline_Always;
      Fld : Logic_Equation;
Fld_1 : Logic_Equation;
Fld_2 : Boolean;
If_Result : Logic_Equation;
            procedure Finalizer_Scope_46 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_46;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 433 '<If at nodes.lkt:829:9>' If_Result ada/nodes.lkt:829
--# expr-start 430 '<FieldAccess for xref_stop_resolution at nodes.lkt:829:12>' Fld_2 ada/nodes.lkt:829
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_stop_resolution'
Fld_2 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Stop_Resolution (Node => Ent.Node, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 430
if Fld_2 then
   --# expr-start 431 '<FieldAccess for stop_resolution_equation at nodes.lkt:829:45>' Fld ada/nodes.lkt:829
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.stop_resolution_equation'
Fld := Libadalang.Implementation.Dispatcher_Ada_Node_P_Stop_Resolution_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 431
   If_Result := Fld;
else
   --# expr-start 432 '<FieldAccess for xref_equation at nodes.lkt:830:14>' Fld_1 ada/nodes.lkt:830
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 432
   If_Result := Fld_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 433
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_46;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_46;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Sub_Equation;
--# end
--# property-start AdaNode.resolve_children_names ada/nodes.lkt:842
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Resolve_Children_Names
  (Node : Bare_Ada_Node
      ; Generate_Diagnostics : Boolean
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind generate_diagnostics Generate_Diagnostics
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_48 with Inline_Always;
            procedure Finalizer_Scope_1951 with Inline_Always;
      Var_Expr_1 : Bare_Ada_Node;
Node_Children : Bare_Ada_Node_Array_Access;
Bound_Entry_Point : Bare_Ada_Node;
Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Fld_1 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Dyn_Var_Bind_Result_1 : Boolean;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Fld_2 : Boolean;
If_Result_2 : Boolean;
As_Entity_2 : Internal_Entity;
Is_Null_2 : Boolean;
If_Result_3 : Internal_Entity;
Fld_3 : Boolean;
If_Result_4 : Boolean;
Fld_4 : Boolean;
If_Result_5 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Quantifier_Result : Boolean;
            procedure Finalizer_Scope_48 is
            begin
                     Dec_Ref (Node_Children);
            end Finalizer_Scope_48;
            procedure Finalizer_Scope_1951 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_1951;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 448 '<AllQuantifier at nodes.lkt:843:9>' Quantifier_Result ada/nodes.lkt:843
   --# expr-start 434 '<children at nodes.lkt:843:9>' Node_Children ada/nodes.lkt:843
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Children := Children (Self); 
--# expr-done 434
      Quantifier_Result := True;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Children;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind c Item_0
Var_Expr_1 := Item_0;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind c Var_Expr_1
--# expr-start 447 '<If at nodes.lkt:849:17>' If_Result_5 ada/nodes.lkt:849
--# expr-start 435 '<FieldAccess for xref_entry_point at nodes.lkt:849:20>' Fld_4 ada/nodes.lkt:849
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_entry_point'
Fld_4 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Entry_Point (Node => Var_Expr_1);
--# end
--# expr-done 435
if Fld_4 then
   If_Result_5 := True;
else
   --# expr-start 446 '<BooleanBinaryOp And at nodes.lkt:851:21>' If_Result_4 ada/nodes.lkt:851
--# expr-start 443 '<If at nodes.lkt:852:25>' If_Result_2 ada/nodes.lkt:852
--# expr-start 437 '<FieldAccess for xref_stop_resolution at nodes.lkt:852:28>' Fld_2 ada/nodes.lkt:852
--# expr-start 436 '<as_entity at nodes.lkt:852:28>' If_Result_1 ada/nodes.lkt:852
Is_Null_1 := Var_Expr_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
As_Entity_1 := (Info => E_Info, Node => Var_Expr_1); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 436
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_stop_resolution'
Fld_2 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Stop_Resolution (Node => If_Result_1.Node, Env => Env, Origin => Origin, E_Info => If_Result_1.Info);
--# end
--# expr-done 437
if Fld_2 then
   --# expr-start 442 '<bind at nodes.lkt:854:29>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:854
Bound_Entry_Point := Var_Expr_1; 
--# expr-start 441 '<bind at nodes.lkt:855:29>' Dyn_Var_Bind_Result ada/nodes.lkt:855
--# expr-start 438 '<FieldAccess for xref_initial_env at nodes.lkt:855:40>' Fld ada/nodes.lkt:855
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.xref_initial_env
Fld := Libadalang.Implementation.Ada_Node_P_Xref_Initial_Env (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 438
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 440 '<FieldAccess for resolve_own_names at nodes.lkt:857:29>' Fld_1 ada/nodes.lkt:857
--# expr-start 439 '<as_entity at nodes.lkt:857:29>' If_Result ada/nodes.lkt:857
Is_Null := Var_Expr_1 = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Var_Expr_1); 
   If_Result := As_Entity;
end if;
--# expr-done 439
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Ada_Node_P_Resolve_Own_Names (Node => If_Result.Node, Generate_Diagnostics => Generate_Diagnostics, Env => Bound_Env, Origin => Origin, Entry_Point => Bound_Entry_Point, E_Info => If_Result.Info);
--# expr-done 440
Dyn_Var_Bind_Result := Fld_1; 
--# expr-done 441
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; 
--# expr-done 442
   If_Result_2 := Dyn_Var_Bind_Result_1;
else
   If_Result_2 := True;
end if;
--# expr-done 443
if If_Result_2 then
   --# expr-start 445 '<FieldAccess for resolve_children_names at nodes.lkt:861:25>' Fld_3 ada/nodes.lkt:861
--# expr-start 444 '<as_entity at nodes.lkt:861:25>' If_Result_3 ada/nodes.lkt:861
Is_Null_2 := Var_Expr_1 = null; 
if Is_Null_2 then
   If_Result_3 := No_Entity;
else
As_Entity_2 := (Info => E_Info, Node => Var_Expr_1); 
   If_Result_3 := As_Entity_2;
end if;
--# expr-done 444
      if If_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_children_names
Fld_3 := Libadalang.Implementation.Ada_Node_P_Resolve_Children_Names (Node => If_Result_3.Node, Generate_Diagnostics => Generate_Diagnostics, Env => Env, Origin => Origin, E_Info => If_Result_3.Info);
--# end
--# expr-done 445
   If_Result_4 := Fld_3;
else
   If_Result_4 := False;
end if;
--# expr-done 446
   If_Result_5 := If_Result_4;
end if;
--# expr-done 447
Scope_Result := If_Result_5;
   --# end
      Finalizer_Scope_1951;
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
      Quantifier_Result := Result_Var;
   --# end
               exit when not Quantifier_Result;
         end loop;
      end;
--# expr-done 448
         Property_Result := Quantifier_Result;
   --# end
      Finalizer_Scope_48;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_48;
                     Finalizer_Scope_1951;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Resolve_Children_Names;
--# end
--# property-start AdaNode.resolve_names_internal ada/nodes.lkt:870
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Resolve_Names_Internal
  (Node : Bare_Ada_Node
      ; Generate_Diagnostics : Boolean
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind generate_diagnostics Generate_Diagnostics
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
      Bound_Entry_Point : Bare_Ada_Node;
Fld : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
Dyn_Var_Bind_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 452 '<bind at nodes.lkt:871:9>' Dyn_Var_Bind_Result ada/nodes.lkt:871
Bound_Entry_Point := Self; 
--# expr-start 451 '<BooleanBinaryOp And at nodes.lkt:873:9>' If_Result ada/nodes.lkt:873
--# expr-start 449 '<FieldAccess for resolve_own_names at nodes.lkt:873:9>' Fld ada/nodes.lkt:873
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Ada_Node_P_Resolve_Own_Names (Node => Ent.Node, Generate_Diagnostics => Generate_Diagnostics, Env => Env, Origin => Origin, Entry_Point => Bound_Entry_Point, E_Info => Ent.Info);
--# expr-done 449
if Fld then
   --# expr-start 450 '<FieldAccess for resolve_children_names at nodes.lkt:874:13>' Fld_1 ada/nodes.lkt:874
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_children_names
Fld_1 := Libadalang.Implementation.Ada_Node_P_Resolve_Children_Names (Node => Ent.Node, Generate_Diagnostics => Generate_Diagnostics, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 450
   If_Result := Fld_1;
else
   If_Result := False;
end if;
--# expr-done 451
Dyn_Var_Bind_Result := If_Result; 
--# expr-done 452
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Resolve_Names_Internal;
--# end
--# property-start AdaNode.resolve_names_internal_with_eq ada/nodes.lkt:880
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Resolve_Names_Internal_With_Eq
  (Node : Bare_Ada_Node
      ; Additional_Equation : Logic_Equation
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind additional_equation Additional_Equation
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_50 with Inline_Always;
      Local_Eq : Logic_Equation;
Bound_Entry_Point : Bare_Ada_Node;
Fld : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Solve_Success : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
Let_Result : Boolean;
            procedure Finalizer_Scope_50 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Local_Eq);
            end Finalizer_Scope_50;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 459 '<Let at nodes.lkt:881:9>' Let_Result ada/nodes.lkt:881
--# scope-start
--# expr-start 455 '<LogicBinaryOp And at nodes.lkt:882:13>' And_Pred ada/nodes.lkt:882
--# expr-start 454 '<bind at nodes.lkt:883:17>' Dyn_Var_Bind_Result ada/nodes.lkt:883
Bound_Entry_Point := Self; 
--# expr-start 453 '<FieldAccess for xref_equation at nodes.lkt:885:17>' Fld ada/nodes.lkt:885
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Bound_Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 453
Dyn_Var_Bind_Result := Fld; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 454
And_Pred := Create_And (Dyn_Var_Bind_Result, Additional_Equation, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:882:13") else null)); 
--# expr-done 455
Local_Eq := And_Pred; Inc_Ref (Local_Eq);
--# bind eq Local_Eq
--# expr-start 458 '<BooleanBinaryOp And at nodes.lkt:889:9>' If_Result ada/nodes.lkt:889
--# expr-start 456 '<solve at nodes.lkt:889:9>' Solve_Success ada/nodes.lkt:889
Solve_Success := Solve_Wrapper (Local_Eq, Self); 
--# expr-done 456
if Solve_Success then
   --# expr-start 457 '<FieldAccess for resolve_children_names at nodes.lkt:889:24>' Fld_1 ada/nodes.lkt:889
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_children_names
Fld_1 := Libadalang.Implementation.Ada_Node_P_Resolve_Children_Names (Node => Ent.Node, Generate_Diagnostics => False, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 457
   If_Result := Fld_1;
else
   If_Result := False;
end if;
--# expr-done 458
Let_Result := If_Result; 
--# end
--# expr-done 459
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_50;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_50;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Resolve_Names_Internal_With_Eq;
--# end
--# property-start AdaNode.resolve_names ada/nodes.lkt:898
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Resolve_Names
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
            procedure Finalizer_Scope_51 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_2 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Dyn_Var_Bind_Result_1 : Boolean;
            procedure Finalizer_Scope_51 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_51;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Resolve_Names,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Boolean;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 464 '<bind at nodes.lkt:899:9>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:899
--# expr-start 460 '<FieldAccess for xref_initial_env at nodes.lkt:899:20>' Fld ada/nodes.lkt:899
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.xref_initial_env
Fld := Libadalang.Implementation.Ada_Node_P_Xref_Initial_Env (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 460
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 463 '<bind at nodes.lkt:900:9>' Dyn_Var_Bind_Result ada/nodes.lkt:900
--# expr-start 461 '<FieldAccess for origin_node at nodes.lkt:900:23>' Fld_1 ada/nodes.lkt:900
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 461
Bound_Origin := Fld_1; 
--# expr-start 462 '<FieldAccess for resolve_names_internal at nodes.lkt:902:9>' Fld_2 ada/nodes.lkt:902
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_internal
Fld_2 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal (Node => Ent.Node, Generate_Diagnostics => False, Env => Bound_Env, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 462
Dyn_Var_Bind_Result := Fld_2; 
--# expr-done 463
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; 
--# expr-done 464
         Property_Result := Dyn_Var_Bind_Result_1;
   --# end
      Finalizer_Scope_51;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_51;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Boolean,
                        As_Boolean => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Resolve_Names;
--# end
--# property-start AdaNode.resolve_names_from_closest_entry_point ada/nodes.lkt:924
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Resolve_Names_From_Closest_Entry_Point
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
            procedure Finalizer_Scope_52 with Inline_Always;
            procedure Finalizer_Scope_1953 with Inline_Always;
      Var_Expr_0 : Boolean;
Var_Expr_10 : Internal_Entity;
Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Bound_Entry_Point : Bare_Ada_Node;
Fld_2 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Dyn_Var_Bind_Result_1 : Boolean;
Dyn_Var_Bind_Result_2 : Boolean;
Fld_3 : Internal_Entity;
Fld_4 : Boolean;
Fld_5 : Lexical_Env := Empty_Env;
Bound_Env_1 : Lexical_Env := Empty_Env;
Fld_6 : Bare_Ada_Node;
Bound_Origin_1 : Bare_Ada_Node;
Bound_Entry_Point_1 : Bare_Ada_Node;
Fld_7 : Boolean;
Dyn_Var_Bind_Result_3 : Boolean;
Fld_8 : Boolean;
If_Result : Boolean;
Dyn_Var_Bind_Result_4 : Boolean;
Dyn_Var_Bind_Result_5 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Fld_9 : Boolean;
If_Result_1 : Boolean;
            procedure Finalizer_Scope_52 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_52;
            procedure Finalizer_Scope_1953 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Bound_Env_1);
            end Finalizer_Scope_1953;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 482 '<If at nodes.lkt:927:9>' If_Result_1 ada/nodes.lkt:927
--# expr-start 465 '<FieldAccess for xref_entry_point at nodes.lkt:927:12>' Fld_9 ada/nodes.lkt:927
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_entry_point'
Fld_9 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Entry_Point (Node => Ent.Node);
--# end
--# expr-done 465
if Fld_9 then
   --# expr-start 471 '<bind at nodes.lkt:929:13>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:929
--# expr-start 466 '<FieldAccess for xref_initial_env at nodes.lkt:929:24>' Fld ada/nodes.lkt:929
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.xref_initial_env
Fld := Libadalang.Implementation.Ada_Node_P_Xref_Initial_Env (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 466
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 470 '<bind at nodes.lkt:930:13>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:930
--# expr-start 467 '<FieldAccess for origin_node at nodes.lkt:930:27>' Fld_1 ada/nodes.lkt:930
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 467
Bound_Origin := Fld_1; 
--# expr-start 469 '<bind at nodes.lkt:931:13>' Dyn_Var_Bind_Result ada/nodes.lkt:931
Bound_Entry_Point := Self; 
--# expr-start 468 '<FieldAccess for resolve_own_names at nodes.lkt:933:13>' Fld_2 ada/nodes.lkt:933
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Ada_Node_P_Resolve_Own_Names (Node => Ent.Node, Generate_Diagnostics => False, Env => Bound_Env, Origin => Bound_Origin, Entry_Point => Bound_Entry_Point, E_Info => Ent.Info);
--# expr-done 468
Dyn_Var_Bind_Result := Fld_2; 
--# expr-done 469
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; 
--# expr-done 470
Dyn_Var_Bind_Result_2 := Dyn_Var_Bind_Result_1; 
--# expr-done 471
   If_Result_1 := Dyn_Var_Bind_Result_2;
else
--# expr-start 472 '<parent at nodes.lkt:938:13>' Fld_3 ada/nodes.lkt:938
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 472
Var_Expr_10 := Fld_3;
if Var_Expr_10 /= No_Entity then
   --# scope-start
--# expr-start 473 '<FieldAccess for resolve_names_from_closest_entry_point at nodes.lkt:938:13>' Fld_4 ada/nodes.lkt:938
      if Var_Expr_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_from_closest_entry_point
Fld_4 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_From_Closest_Entry_Point (Node => Var_Expr_10.Node, E_Info => Var_Expr_10.Info);
--# end
--# expr-done 473
Var_Expr_0 := Fld_4;
if Var_Expr_0 /= False then
   --# scope-start
   --# bind _ Var_Expr_0
--# expr-start 481 '<bind at nodes.lkt:940:21>' Dyn_Var_Bind_Result_5 ada/nodes.lkt:940
--# expr-start 474 '<FieldAccess for xref_initial_env at nodes.lkt:940:32>' Fld_5 ada/nodes.lkt:940
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.xref_initial_env
Fld_5 := Libadalang.Implementation.Ada_Node_P_Xref_Initial_Env (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 474
Bound_Env_1 := Fld_5; Inc_Ref (Bound_Env_1);
--# expr-start 480 '<bind at nodes.lkt:941:21>' Dyn_Var_Bind_Result_4 ada/nodes.lkt:941
--# expr-start 475 '<FieldAccess for origin_node at nodes.lkt:941:35>' Fld_6 ada/nodes.lkt:941
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_6 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 475
Bound_Origin_1 := Fld_6; 
--# expr-start 479 '<If at nodes.lkt:945:21>' If_Result ada/nodes.lkt:945
--# expr-start 476 '<FieldAccess for xref_stop_resolution at nodes.lkt:945:24>' Fld_8 ada/nodes.lkt:945
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_stop_resolution'
Fld_8 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Stop_Resolution (Node => Ent.Node, Env => Bound_Env_1, Origin => Bound_Origin_1, E_Info => Ent.Info);
--# end
--# expr-done 476
if Fld_8 then
   --# expr-start 478 '<bind at nodes.lkt:947:25>' Dyn_Var_Bind_Result_3 ada/nodes.lkt:947
Bound_Entry_Point_1 := Self; 
--# expr-start 477 '<FieldAccess for resolve_own_names at nodes.lkt:949:25>' Fld_7 ada/nodes.lkt:949
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Ada_Node_P_Resolve_Own_Names (Node => Ent.Node, Generate_Diagnostics => False, Env => Bound_Env_1, Origin => Bound_Origin_1, Entry_Point => Bound_Entry_Point_1, E_Info => Ent.Info);
--# expr-done 477
Dyn_Var_Bind_Result_3 := Fld_7; 
--# expr-done 478
   If_Result := Dyn_Var_Bind_Result_3;
else
   If_Result := True;
end if;
--# expr-done 479
Dyn_Var_Bind_Result_4 := If_Result; 
--# expr-done 480
Dyn_Var_Bind_Result_5 := Dyn_Var_Bind_Result_4; 
--# expr-done 481
Scope_Result := Dyn_Var_Bind_Result_5;
   --# end
      Finalizer_Scope_1953;
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_1 := Result_Var_1;
end if;
--# expr-done 482
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_52;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_52;
                     Finalizer_Scope_1953;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Resolve_Names_From_Closest_Entry_Point;
--# end
--# property-start AdaNode.children_nameres_diagnostics ada/nodes.lkt:971
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Children_Nameres_Diagnostics
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Solver_Diagnostic_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Solver_Diagnostic_Array_Access;
            procedure Finalizer_Scope_54 with Inline_Always;
            procedure Finalizer_Scope_1954 with Inline_Always;
            procedure Finalizer_Scope_1955 with Inline_Always;
      Var_Expr_1 : Internal_Entity;
Fld : Internal_Entity_Array_Access;
Fld_1 : Internal_Solver_Diagnostic_Array_Access;
Fld_2 : Internal_Solver_Diagnostic_Array_Access;
Concat_Result : Internal_Solver_Diagnostic_Array_Access;
Is_Null : Boolean;
Fld_3 : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Solver_Diagnostic_Array_Access;
Scope_Result : Internal_Solver_Diagnostic_Array_Access;
Result_Var : Internal_Solver_Diagnostic_Array_Access;
Map_Result : Internal_Solver_Diagnostic_Array_Access;
            procedure Finalizer_Scope_54 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_54;
            procedure Finalizer_Scope_1954 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1954;
            procedure Finalizer_Scope_1955 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_1955;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 490 '<Mapcat at nodes.lkt:972:9>' Map_Result ada/nodes.lkt:972
   --# expr-start 483 '<children at nodes.lkt:972:9>' Fld ada/nodes.lkt:972
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 483
      declare
         Map_Result_Vec : Internal_Solver_Diagnostic_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind c Item_0
Var_Expr_1 := Item_0;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind c Var_Expr_1
--# expr-start 489 '<If at nodes.lkt:976:17>' If_Result_1 ada/nodes.lkt:976
--# expr-start 486 '<BooleanBinaryOp Or at nodes.lkt:976:20>' If_Result ada/nodes.lkt:976
--# expr-start 484 '<IsNull at nodes.lkt:976:20>' Is_Null ada/nodes.lkt:976
Is_Null := Var_Expr_1.Node = null; 
--# expr-done 484
if Is_Null then
   If_Result := True;
else
   --# expr-start 485 '<FieldAccess for xref_entry_point at nodes.lkt:976:33>' Fld_3 ada/nodes.lkt:976
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_entry_point'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Entry_Point (Node => Var_Expr_1.Node);
--# end
--# expr-done 485
   If_Result := Fld_3;
end if;
--# expr-done 486
if If_Result then
   If_Result_1 := No_Internal_Solver_Diagnostic_Array_Type;
else
   --# expr-start 487 '<FieldAccess for own_nameres_diagnostics at nodes.lkt:979:21>' Fld_1 ada/nodes.lkt:979
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Ada_Node_P_Own_Nameres_Diagnostics (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# expr-done 487
--# expr-start 488 '<FieldAccess for children_nameres_diagnostics at nodes.lkt:980:23>' Fld_2 ada/nodes.lkt:980
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.children_nameres_diagnostics
Fld_2 := Libadalang.Implementation.Ada_Node_P_Children_Nameres_Diagnostics (Node => Var_Expr_1.Node, Env => Env, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 488
Concat_Result := Concat (Fld_1, Fld_2); 
   If_Result_1 := Concat_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 489
Scope_Result := If_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_1955;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Solver_Diagnostic_Array_Type;
end if;
      Inc_Ref (Result_Var);
         for Item_To_Append of
               Result_Var.Items
         loop
               Inc_Ref (Item_To_Append);
            Internal_Solver_Diagnostic_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_1954;
         end loop;
      end;
         Map_Result := Create_Internal_Solver_Diagnostic_Array
           (Items_Count => Natural (Internal_Solver_Diagnostic_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Solver_Diagnostic_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Solver_Diagnostic_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Solver_Diagnostic_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 490
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_54;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_54;
                     Finalizer_Scope_1954;
                     Finalizer_Scope_1955;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Children_Nameres_Diagnostics;
--# end
--# property-start AdaNode.nameres_diagnostics ada/nodes.lkt:987
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Nameres_Diagnostics
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Solver_Diagnostic_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Solver_Diagnostic_Array_Access;
            procedure Finalizer_Scope_55 with Inline_Always;
      Ignored : Boolean;
Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_2 : Boolean;
Fld_3 : Internal_Solver_Diagnostic_Array_Access;
Fld_4 : Internal_Solver_Diagnostic_Array_Access;
Concat_Result : Internal_Solver_Diagnostic_Array_Access;
Let_Result : Internal_Solver_Diagnostic_Array_Access;
Dyn_Var_Bind_Result : Internal_Solver_Diagnostic_Array_Access;
Dyn_Var_Bind_Result_1 : Internal_Solver_Diagnostic_Array_Access;
            procedure Finalizer_Scope_55 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
            end Finalizer_Scope_55;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 498 '<bind at nodes.lkt:988:9>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:988
--# expr-start 491 '<FieldAccess for xref_initial_env at nodes.lkt:988:20>' Fld ada/nodes.lkt:988
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.xref_initial_env
Fld := Libadalang.Implementation.Ada_Node_P_Xref_Initial_Env (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 491
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 497 '<bind at nodes.lkt:989:9>' Dyn_Var_Bind_Result ada/nodes.lkt:989
--# expr-start 492 '<FieldAccess for origin_node at nodes.lkt:989:23>' Fld_1 ada/nodes.lkt:989
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 492
Bound_Origin := Fld_1; 
--# expr-start 496 '<Let at nodes.lkt:991:9>' Let_Result ada/nodes.lkt:991
--# scope-start
--# expr-start 493 '<FieldAccess for resolve_names_internal at nodes.lkt:991:17>' Fld_2 ada/nodes.lkt:991
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_internal
Fld_2 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal (Node => Ent.Node, Generate_Diagnostics => True, Env => Bound_Env, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 493
Ignored := Fld_2; 
--# bind _ Ignored
--# expr-start 494 '<FieldAccess for own_nameres_diagnostics at nodes.lkt:993:9>' Fld_3 ada/nodes.lkt:993
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Ada_Node_P_Own_Nameres_Diagnostics (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 494
--# expr-start 495 '<FieldAccess for children_nameres_diagnostics at nodes.lkt:993:42>' Fld_4 ada/nodes.lkt:993
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.children_nameres_diagnostics
Fld_4 := Libadalang.Implementation.Ada_Node_P_Children_Nameres_Diagnostics (Node => Ent.Node, Env => Bound_Env, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 495
Concat_Result := Concat (Fld_3, Fld_4); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 496
Dyn_Var_Bind_Result := Let_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 497
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 498
         Property_Result := Dyn_Var_Bind_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_55;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_55;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Nameres_Diagnostics;
--# end
--# property-start AdaNode.missing_entity_error ada/nodes.lkt:999
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Missing_Entity_Error
  (Node : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 500 '<Not at nodes.lkt:999:40>' Not_Val ada/nodes.lkt:999
--# expr-start 499 '<IsNull at nodes.lkt:999:44>' Is_Null ada/nodes.lkt:999
Is_Null := Self = null; 
--# expr-done 499
Not_Val := not (Is_Null); 
--# expr-done 500
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Missing_Entity_Error;
--# end
--# property-start AdaNode.std ada/nodes.lkt:1016
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Unit;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Fld_2 : Bare_Ada_Node;
Cast_Result_1 : Bare_Library_Item;
Fld_3 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 507 '<as_bare_entity at nodes.lkt:1017:9>' If_Result ada/nodes.lkt:1017
--# expr-start 506 '<FieldAccess for item at nodes.lkt:1017:9>' Fld_3 ada/nodes.lkt:1017
--# expr-start 505 '<Cast to LibraryItem at nodes.lkt:1017:9>' Cast_Result_1 ada/nodes.lkt:1017
--# expr-start 504 '<FieldAccess for body at nodes.lkt:1017:9>' Fld_2 ada/nodes.lkt:1017
--# expr-start 503 '<Cast to CompilationUnit at nodes.lkt:1017:9>' Cast_Result ada/nodes.lkt:1017
--# expr-start 502 '<FieldAccess for root at nodes.lkt:1017:9>' Fld_1 ada/nodes.lkt:1017
--# expr-start 501 '<FieldAccess for standard_unit at nodes.lkt:1017:9>' Fld ada/nodes.lkt:1017
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Ada_Node_P_Standard_Unit (Node => Self);
--# expr-done 501
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Ast_Root;
--# expr-done 502
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 503
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Compilation_Unit_F_Body;
--# expr-done 504
   if Fld_2 = null
      or else Fld_2.Kind in Ada_Library_Item_Range
   then
      Cast_Result_1 := Fld_2;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 505
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Cast_Result_1.Library_Item_F_Item;
--# expr-done 506
Is_Null := Fld_3 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_3); 
   If_Result := As_Entity;
end if;
--# expr-done 507
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std;
--# end
--# property-start AdaNode.std_env ada/nodes.lkt:1026
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Env
  (Node : Bare_Ada_Node
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_60 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_60 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_60;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 509 '<FieldAccess for children_env at nodes.lkt:1026:33>' Fld_1 ada/nodes.lkt:1026
--# expr-start 508 '<FieldAccess for std at nodes.lkt:1026:33>' Fld ada/nodes.lkt:1026
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std
Fld := Libadalang.Implementation.Ada_Node_P_Std (Node => Self);
--# end
--# expr-done 508
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 509
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_60;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_60;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_Env;
--# end
--# property-start AdaNode.std_entity ada/nodes.lkt:1031
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Entity
  (Node : Bare_Ada_Node
      ; Sym : Symbol_Type
  )
   return Internal_Entity
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind sym Sym
   Property_Result : Internal_Entity;
      Fld : Internal_Unit;
Fld_1 : Bare_Ada_Node;
Fld_2 : Internal_Entity;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 512 '<FieldAccess for std_entity_implem at nodes.lkt:1032:9>' Fld_2 ada/nodes.lkt:1032
--# expr-start 511 '<FieldAccess for root at nodes.lkt:1032:9>' Fld_1 ada/nodes.lkt:1032
--# expr-start 510 '<FieldAccess for unit at nodes.lkt:1032:9>' Fld ada/nodes.lkt:1032
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 510
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Ast_Root;
--# expr-done 511
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_entity_implem
Fld_2 := Libadalang.Implementation.Ada_Node_P_Std_Entity_Implem (Node => Fld_1, Sym => Sym);
--# end
--# expr-done 512
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_Entity;
--# end
--# property-start AdaNode.std_entity_implem ada/nodes.lkt:1035
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Entity_Implem
  (Node : Bare_Ada_Node
      ; Sym : Symbol_Type
  )
   return Internal_Entity
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind sym Sym
   Property_Result : Internal_Entity;
            procedure Finalizer_Scope_62 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Env_Get_Result : Internal_Entity;
            procedure Finalizer_Scope_62 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_62;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Std_Entity_Implem,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Sym);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 514 '<EnvGet at nodes.lkt:1036:9>' Env_Get_Result ada/nodes.lkt:1036
--# expr-start 513 '<FieldAccess for std_env at nodes.lkt:1036:9>' Fld ada/nodes.lkt:1036
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_env
Fld := Libadalang.Implementation.Ada_Node_P_Std_Env (Node => Self);
--# end
--# expr-done 513
Env_Get_Result := AST_Envs.Get_First (Self => Fld, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 514
         Property_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_62;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_62;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity,
                        As_Internal_Entity => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Std_Entity_Implem;
--# end
--# property-start AdaNode.bool_type ada/nodes.lkt:1043
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Bool_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 517 '<Cast to BaseTypeDecl at nodes.lkt:1044:9>' Cast_Result ada/nodes.lkt:1044
--# expr-start 516 '<FieldAccess for std_entity at nodes.lkt:1044:9>' Fld ada/nodes.lkt:1044
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 515 '<Symbol Boolean at nodes.lkt:1044:25>' Sym ada/nodes.lkt:1044
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Boolean); 
--# expr-done 515
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 516
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 517
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Bool_Type;
--# end
--# property-start AdaNode.int_type ada/nodes.lkt:1048
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Int_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 520 '<Cast to BaseTypeDecl at nodes.lkt:1049:9>' Cast_Result ada/nodes.lkt:1049
--# expr-start 519 '<FieldAccess for std_entity at nodes.lkt:1049:9>' Fld ada/nodes.lkt:1049
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 518 '<Symbol Integer at nodes.lkt:1049:25>' Sym ada/nodes.lkt:1049
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Integer); 
--# expr-done 518
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 519
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 520
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Int_Type;
--# end
--# property-start AdaNode.universal_int_type ada/nodes.lkt:1053
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Universal_Int_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 523 '<Cast to BaseTypeDecl at nodes.lkt:1054:9>' Cast_Result ada/nodes.lkt:1054
--# expr-start 522 '<FieldAccess for std_entity at nodes.lkt:1054:9>' Fld ada/nodes.lkt:1054
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 521 '<Symbol Universal_Int_Type_ at nodes.lkt:1054:25>' Sym ada/nodes.lkt:1054
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Universal_Int_Type); 
--# expr-done 521
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 522
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 523
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Universal_Int_Type;
--# end
--# property-start AdaNode.universal_real_type ada/nodes.lkt:1058
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Universal_Real_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 526 '<Cast to BaseTypeDecl at nodes.lkt:1059:9>' Cast_Result ada/nodes.lkt:1059
--# expr-start 525 '<FieldAccess for std_entity at nodes.lkt:1059:9>' Fld ada/nodes.lkt:1059
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 524 '<Symbol Universal_Real_Type_ at nodes.lkt:1059:25>' Sym ada/nodes.lkt:1059
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Universal_Real_Type); 
--# expr-done 524
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 525
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 526
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Universal_Real_Type;
--# end
--# property-start AdaNode.universal_fixed_type ada/nodes.lkt:1062
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Universal_Fixed_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 529 '<Cast to BaseTypeDecl at nodes.lkt:1063:9>' Cast_Result ada/nodes.lkt:1063
--# expr-start 528 '<FieldAccess for std_entity at nodes.lkt:1063:9>' Fld ada/nodes.lkt:1063
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 527 '<Symbol Universal_Fixed_Type_ at nodes.lkt:1063:25>' Sym ada/nodes.lkt:1063
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Universal_Fixed_Type); 
--# expr-done 527
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 528
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 529
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Universal_Fixed_Type;
--# end
--# property-start AdaNode.std_char_type ada/nodes.lkt:1067
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Char_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 532 '<Cast to BaseTypeDecl at nodes.lkt:1068:9>' Cast_Result ada/nodes.lkt:1068
--# expr-start 531 '<FieldAccess for std_entity at nodes.lkt:1068:9>' Fld ada/nodes.lkt:1068
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 530 '<Symbol Character at nodes.lkt:1068:25>' Sym ada/nodes.lkt:1068
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Character); 
--# expr-done 530
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 531
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 532
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_Char_Type;
--# end
--# property-start AdaNode.std_wide_char_type ada/nodes.lkt:1072
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Wide_Char_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 535 '<Cast to BaseTypeDecl at nodes.lkt:1073:9>' Cast_Result ada/nodes.lkt:1073
--# expr-start 534 '<FieldAccess for std_entity at nodes.lkt:1073:9>' Fld ada/nodes.lkt:1073
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 533 '<Symbol Wide_Character at nodes.lkt:1073:25>' Sym ada/nodes.lkt:1073
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Character); 
--# expr-done 533
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 534
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 535
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_Wide_Char_Type;
--# end
--# property-start AdaNode.std_wide_wide_char_type ada/nodes.lkt:1077
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Wide_Wide_Char_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 538 '<Cast to BaseTypeDecl at nodes.lkt:1078:9>' Cast_Result ada/nodes.lkt:1078
--# expr-start 537 '<FieldAccess for std_entity at nodes.lkt:1078:9>' Fld ada/nodes.lkt:1078
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 536 '<Symbol Wide_Wide_Character at nodes.lkt:1078:25>' Sym ada/nodes.lkt:1078
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Character); 
--# expr-done 536
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 537
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 538
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_Wide_Wide_Char_Type;
--# end
--# property-start AdaNode.std_string_type ada/nodes.lkt:1082
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_String_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 541 '<Cast to BaseTypeDecl at nodes.lkt:1083:9>' Cast_Result ada/nodes.lkt:1083
--# expr-start 540 '<FieldAccess for std_entity at nodes.lkt:1083:9>' Fld ada/nodes.lkt:1083
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 539 '<Symbol String at nodes.lkt:1083:25>' Sym ada/nodes.lkt:1083
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String); 
--# expr-done 539
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 540
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 541
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_String_Type;
--# end
--# property-start AdaNode.std_wide_string_type ada/nodes.lkt:1087
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Wide_String_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 544 '<Cast to BaseTypeDecl at nodes.lkt:1088:9>' Cast_Result ada/nodes.lkt:1088
--# expr-start 543 '<FieldAccess for std_entity at nodes.lkt:1088:9>' Fld ada/nodes.lkt:1088
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 542 '<Symbol Wide_String at nodes.lkt:1088:25>' Sym ada/nodes.lkt:1088
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_String); 
--# expr-done 542
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 543
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 544
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_Wide_String_Type;
--# end
--# property-start AdaNode.std_wide_wide_string_type ada/nodes.lkt:1092
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Wide_Wide_String_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 547 '<Cast to BaseTypeDecl at nodes.lkt:1093:9>' Cast_Result ada/nodes.lkt:1093
--# expr-start 546 '<FieldAccess for std_entity at nodes.lkt:1093:9>' Fld ada/nodes.lkt:1093
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 545 '<Symbol Wide_Wide_String at nodes.lkt:1093:25>' Sym ada/nodes.lkt:1093
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_String); 
--# expr-done 545
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 546
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 547
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_Wide_Wide_String_Type;
--# end
--# property-start AdaNode.std_root_types ada/nodes.lkt:1097
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Std_Root_Types
  (Node : Bare_Ada_Node
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_74 with Inline_Always;
            procedure Finalizer_Scope_1956 with Inline_Always;
      Var_Expr_11 : Internal_Entity_Package_Decl;
Sym : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Package_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_74 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_74;
            procedure Finalizer_Scope_1956 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1956;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 550 '<Cast to PackageDecl at nodes.lkt:1098:9>' Cast_Result ada/nodes.lkt:1098
--# expr-start 549 '<FieldAccess for std_entity at nodes.lkt:1098:9>' Fld ada/nodes.lkt:1098
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 548 '<Symbol root_types_ at nodes.lkt:1098:25>' Sym ada/nodes.lkt:1098
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Root_Types); 
--# expr-done 548
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 549
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Package_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Package_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Package_Decl;
   end if;
--# expr-done 550
Var_Expr_11 := Cast_Result;
if Var_Expr_11 /= No_Entity_Package_Decl then
   --# scope-start
--# expr-start 551 '<FieldAccess for children_env at nodes.lkt:1098:9>' Fld_1 ada/nodes.lkt:1098
      if Var_Expr_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_11.Node, E_Info => Var_Expr_11.Info);
--# expr-done 551
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_1956;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_Env;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_74;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_74;
                     Finalizer_Scope_1956;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Std_Root_Types;
--# end
--# property-start AdaNode.root_int_type ada/nodes.lkt:1101
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Root_Int_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_75 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Env_Get_Result : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_75 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_75;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 555 '<Cast to BaseTypeDecl at nodes.lkt:1102:9>' Cast_Result ada/nodes.lkt:1102
--# expr-start 554 '<EnvGet at nodes.lkt:1102:9>' Env_Get_Result ada/nodes.lkt:1102
--# expr-start 552 '<FieldAccess for std_root_types at nodes.lkt:1102:9>' Fld ada/nodes.lkt:1102
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_root_types
Fld := Libadalang.Implementation.Ada_Node_P_Std_Root_Types (Node => Self);
--# end
--# expr-done 552
--# expr-start 553 '<Symbol root_integer at nodes.lkt:1103:13>' Sym ada/nodes.lkt:1103
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Root_Integer); 
--# expr-done 553
Env_Get_Result := AST_Envs.Get_First (Self => Fld, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 554
   if Env_Get_Result.Node = null
      or else Env_Get_Result.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Env_Get_Result.Node,
         Info => Env_Get_Result.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 555
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_75;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_75;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Root_Int_Type;
--# end
--# property-start AdaNode.root_real_type ada/nodes.lkt:1110
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Root_Real_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_76 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Env_Get_Result : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_76 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_76;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 559 '<Cast to BaseTypeDecl at nodes.lkt:1111:9>' Cast_Result ada/nodes.lkt:1111
--# expr-start 558 '<EnvGet at nodes.lkt:1111:9>' Env_Get_Result ada/nodes.lkt:1111
--# expr-start 556 '<FieldAccess for std_root_types at nodes.lkt:1111:9>' Fld ada/nodes.lkt:1111
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_root_types
Fld := Libadalang.Implementation.Ada_Node_P_Std_Root_Types (Node => Self);
--# end
--# expr-done 556
--# expr-start 557 '<Symbol root_real at nodes.lkt:1112:13>' Sym ada/nodes.lkt:1112
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Root_Real); 
--# expr-done 557
Env_Get_Result := AST_Envs.Get_First (Self => Fld, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 558
   if Env_Get_Result.Node = null
      or else Env_Get_Result.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Env_Get_Result.Node,
         Info => Env_Get_Result.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 559
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_76;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_76;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Root_Real_Type;
--# end
--# property-start AdaNode.system_address_type ada/nodes.lkt:1119
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_System_Address_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_77 with Inline_Always;
            procedure Finalizer_Scope_1957 with Inline_Always;
      Var_Expr_12 : Bare_Basic_Decl;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_1 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_77 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_77;
            procedure Finalizer_Scope_1957 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1957;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 566 '<Cast to BaseTypeDecl at nodes.lkt:1120:9>' Cast_Result ada/nodes.lkt:1120
--# expr-start 562 '<FieldAccess for get_unit_root_decl at nodes.lkt:1120:9>' Fld ada/nodes.lkt:1120
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 561 '<ArrayLiteral at nodes.lkt:1121:13>' Array_Lit ada/nodes.lkt:1121
--# expr-start 560 '<Symbol System at nodes.lkt:1121:14>' Sym ada/nodes.lkt:1121
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_System); 
--# expr-done 560
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 561
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 562
Var_Expr_12 := Fld;
if Var_Expr_12 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 565 '<EnvGet at nodes.lkt:1120:9>' Env_Get_Result ada/nodes.lkt:1120
--# expr-start 563 '<FieldAccess for children_env at nodes.lkt:1120:9>' Fld_1 ada/nodes.lkt:1120
      if Var_Expr_12 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_12);
--# expr-done 563
--# expr-start 564 '<Symbol Address at nodes.lkt:1125:20>' Sym_1 ada/nodes.lkt:1125
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Address); 
--# expr-done 564
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_1), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 565
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_1957;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 566
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_77;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_77;
                     Finalizer_Scope_1957;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_System_Address_Type;
--# end
--# property-start AdaNode.root_type_ops_impl ada/nodes.lkt:1130
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Root_Type_Ops_Impl
  (Node : Bare_Ada_Node
      ; Sym : Symbol_Type
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind sym Sym
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_78 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_1 : Boolean;
Map_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_78 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_78;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Root_Type_Ops_Impl,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Sym);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Basic_Decl_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 572 '<Map at nodes.lkt:1131:9>' Map_Result ada/nodes.lkt:1131
   --# expr-start 568 '<EnvGet at nodes.lkt:1131:9>' Env_Get_Result ada/nodes.lkt:1131
--# expr-start 567 '<FieldAccess for std_root_types at nodes.lkt:1131:9>' Fld ada/nodes.lkt:1131
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_root_types
Fld := Libadalang.Implementation.Ada_Node_P_Std_Root_Types (Node => Self);
--# end
--# expr-done 567
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 568
      declare
         Map_Result_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
         --# expr-start 570 '<FieldAccess for is_subprogram at nodes.lkt:1138:20>' Fld_1 ada/nodes.lkt:1138
--# expr-start 569 '<Cast to BasicDecl at nodes.lkt:1138:20>' Cast_Result_1 ada/nodes.lkt:1138
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 569
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_subprogram
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Is_Subprogram (Node => Cast_Result_1.Node);
--# end
--# expr-done 570
         if Fld_1 then
      --# expr-start 571 '<Cast to BasicDecl at nodes.lkt:1137:20>' Cast_Result ada/nodes.lkt:1137
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 571
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Cast_Result;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 572
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_78;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_78;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Basic_Decl_Array_Access,
                        As_Internal_Entity_Basic_Decl_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Root_Type_Ops_Impl;
--# end
--# property-start AdaNode.root_type_ops ada/nodes.lkt:1143
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Root_Type_Ops
  (Node : Bare_Ada_Node
      ; Sym : Symbol_Type
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind sym Sym
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_79 with Inline_Always;
      Fld : Internal_Unit;
Fld_1 : Bare_Ada_Node;
Fld_2 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_79 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_79;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 575 '<FieldAccess for root_type_ops_impl at nodes.lkt:1145:9>' Fld_2 ada/nodes.lkt:1145
--# expr-start 574 '<FieldAccess for root at nodes.lkt:1145:9>' Fld_1 ada/nodes.lkt:1145
--# expr-start 573 '<FieldAccess for unit at nodes.lkt:1145:9>' Fld ada/nodes.lkt:1145
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 573
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Ast_Root;
--# expr-done 574
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_type_ops_impl
Fld_2 := Libadalang.Implementation.Ada_Node_P_Root_Type_Ops_Impl (Node => Fld_1, Sym => Sym);
--# end
--# expr-done 575
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_79;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_79;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Root_Type_Ops;
--# end
--# property-start AdaNode.exc_id_type ada/nodes.lkt:1148
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Exc_Id_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_80 with Inline_Always;
            procedure Finalizer_Scope_1959 with Inline_Always;
      Var_Expr_13 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_80 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_80;
            procedure Finalizer_Scope_1959 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1959;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 583 '<Cast to BaseTypeDecl at nodes.lkt:1149:9>' Cast_Result ada/nodes.lkt:1149
--# expr-start 579 '<FieldAccess for get_unit_root_decl at nodes.lkt:1149:9>' Fld ada/nodes.lkt:1149
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 578 '<ArrayLiteral at nodes.lkt:1150:13>' Array_Lit ada/nodes.lkt:1150
--# expr-start 576 '<Symbol Ada at nodes.lkt:1150:14>' Sym ada/nodes.lkt:1150
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 576
--# expr-start 577 '<Symbol Exceptions at nodes.lkt:1150:22>' Sym_1 ada/nodes.lkt:1150
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exceptions); 
--# expr-done 577
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 578
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 579
Var_Expr_13 := Fld;
if Var_Expr_13 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 582 '<EnvGet at nodes.lkt:1149:9>' Env_Get_Result ada/nodes.lkt:1149
--# expr-start 580 '<FieldAccess for children_env at nodes.lkt:1149:9>' Fld_1 ada/nodes.lkt:1149
      if Var_Expr_13 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_13);
--# expr-done 580
--# expr-start 581 '<Symbol Exception_Id at nodes.lkt:1154:20>' Sym_2 ada/nodes.lkt:1154
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exception_Id); 
--# expr-done 581
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 582
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_1959;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 583
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_80;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_80;
                     Finalizer_Scope_1959;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Exc_Id_Type;
--# end
--# property-start AdaNode.task_id_type ada/nodes.lkt:1158
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Task_Id_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_81 with Inline_Always;
            procedure Finalizer_Scope_1960 with Inline_Always;
      Var_Expr_14 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_81 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_81;
            procedure Finalizer_Scope_1960 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1960;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 591 '<Cast to BaseTypeDecl at nodes.lkt:1159:9>' Cast_Result ada/nodes.lkt:1159
--# expr-start 587 '<FieldAccess for get_unit_root_decl at nodes.lkt:1159:9>' Fld ada/nodes.lkt:1159
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 586 '<ArrayLiteral at nodes.lkt:1160:13>' Array_Lit ada/nodes.lkt:1160
--# expr-start 584 '<Symbol Ada at nodes.lkt:1160:14>' Sym ada/nodes.lkt:1160
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 584
--# expr-start 585 '<Symbol Task_Identification at nodes.lkt:1160:22>' Sym_1 ada/nodes.lkt:1160
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Task_Identification); 
--# expr-done 585
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 586
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 587
Var_Expr_14 := Fld;
if Var_Expr_14 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 590 '<EnvGet at nodes.lkt:1159:9>' Env_Get_Result ada/nodes.lkt:1159
--# expr-start 588 '<FieldAccess for children_env at nodes.lkt:1159:9>' Fld_1 ada/nodes.lkt:1159
      if Var_Expr_14 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_14);
--# expr-done 588
--# expr-start 589 '<Symbol Task_Id at nodes.lkt:1164:20>' Sym_2 ada/nodes.lkt:1164
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Task_Id); 
--# expr-done 589
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 590
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_1960;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 591
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_81;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_81;
                     Finalizer_Scope_1960;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Task_Id_Type;
--# end
--# property-start AdaNode.root_buffer_type ada/nodes.lkt:1168
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Root_Buffer_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_82 with Inline_Always;
            procedure Finalizer_Scope_1961 with Inline_Always;
      Var_Expr_15 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_3 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_82 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_82;
            procedure Finalizer_Scope_1961 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1961;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 600 '<Cast to BaseTypeDecl at nodes.lkt:1169:9>' Cast_Result ada/nodes.lkt:1169
--# expr-start 596 '<FieldAccess for get_unit_root_decl at nodes.lkt:1169:9>' Fld ada/nodes.lkt:1169
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 595 '<ArrayLiteral at nodes.lkt:1170:13>' Array_Lit ada/nodes.lkt:1170
--# expr-start 592 '<Symbol Ada at nodes.lkt:1170:14>' Sym ada/nodes.lkt:1170
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 592
--# expr-start 593 '<Symbol Strings at nodes.lkt:1170:22>' Sym_1 ada/nodes.lkt:1170
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Strings); 
--# expr-done 593
--# expr-start 594 '<Symbol Text_Buffers at nodes.lkt:1170:34>' Sym_2 ada/nodes.lkt:1170
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Text_Buffers); 
--# expr-done 594
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1, 3 => Sym_2)); 
--# expr-done 595
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 596
Var_Expr_15 := Fld;
if Var_Expr_15 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 599 '<EnvGet at nodes.lkt:1169:9>' Env_Get_Result ada/nodes.lkt:1169
--# expr-start 597 '<FieldAccess for children_env at nodes.lkt:1169:9>' Fld_1 ada/nodes.lkt:1169
      if Var_Expr_15 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_15);
--# expr-done 597
--# expr-start 598 '<Symbol Root_Buffer_Type at nodes.lkt:1174:20>' Sym_3 ada/nodes.lkt:1174
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Root_Buffer_Type); 
--# expr-done 598
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_3), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 599
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_1961;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 600
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_82;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_82;
                     Finalizer_Scope_1961;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Root_Buffer_Type;
--# end
--# property-start AdaNode.root_stream_type ada/nodes.lkt:1178
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Root_Stream_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_83 with Inline_Always;
            procedure Finalizer_Scope_1962 with Inline_Always;
      Var_Expr_16 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Classwide_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_83 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_83;
            procedure Finalizer_Scope_1962 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1962;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 610 '<Cast to BaseTypeDecl at nodes.lkt:1179:9>' Cast_Result_1 ada/nodes.lkt:1179
--# expr-start 609 '<FieldAccess for classwide_type at nodes.lkt:1179:9>' Fld_2 ada/nodes.lkt:1179
--# expr-start 608 '<Cast to BaseTypeDecl at nodes.lkt:1179:9>' Cast_Result ada/nodes.lkt:1179
--# expr-start 604 '<FieldAccess for get_unit_root_decl at nodes.lkt:1179:9>' Fld ada/nodes.lkt:1179
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 603 '<ArrayLiteral at nodes.lkt:1180:13>' Array_Lit ada/nodes.lkt:1180
--# expr-start 601 '<Symbol Ada at nodes.lkt:1180:14>' Sym ada/nodes.lkt:1180
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 601
--# expr-start 602 '<Symbol Streams at nodes.lkt:1180:22>' Sym_1 ada/nodes.lkt:1180
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Streams); 
--# expr-done 602
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 603
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 604
Var_Expr_16 := Fld;
if Var_Expr_16 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 607 '<EnvGet at nodes.lkt:1179:9>' Env_Get_Result ada/nodes.lkt:1179
--# expr-start 605 '<FieldAccess for children_env at nodes.lkt:1179:9>' Fld_1 ada/nodes.lkt:1179
      if Var_Expr_16 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_16);
--# expr-done 605
--# expr-start 606 '<Symbol Root_Stream_Type at nodes.lkt:1184:20>' Sym_2 ada/nodes.lkt:1184
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Root_Stream_Type); 
--# expr-done 606
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 607
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_1962;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 608
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 609
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
--# expr-done 610
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_83;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_83;
                     Finalizer_Scope_1962;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Root_Stream_Type;
--# end
--# property-start AdaNode.big_integer_type ada/nodes.lkt:1190
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Big_Integer_Type
  (Node : Bare_Ada_Node
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_84 with Inline_Always;
            procedure Finalizer_Scope_1963 with Inline_Always;
      Var_Expr_17 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_4 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_84 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_84;
            procedure Finalizer_Scope_1963 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1963;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 620 '<Cast to BaseTypeDecl at nodes.lkt:1191:9>' Cast_Result ada/nodes.lkt:1191
--# expr-start 616 '<FieldAccess for get_unit_root_decl at nodes.lkt:1191:9>' Fld ada/nodes.lkt:1191
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 615 '<ArrayLiteral at nodes.lkt:1192:13>' Array_Lit ada/nodes.lkt:1192
--# expr-start 611 '<Symbol Ada at nodes.lkt:1192:14>' Sym ada/nodes.lkt:1192
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 611
--# expr-start 612 '<Symbol Numerics at nodes.lkt:1192:22>' Sym_1 ada/nodes.lkt:1192
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Numerics); 
--# expr-done 612
--# expr-start 613 '<Symbol Big_Numbers at nodes.lkt:1192:35>' Sym_2 ada/nodes.lkt:1192
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Big_Numbers); 
--# expr-done 613
--# expr-start 614 '<Symbol Big_Integers at nodes.lkt:1192:51>' Sym_3 ada/nodes.lkt:1192
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Big_Integers); 
--# expr-done 614
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1, 3 => Sym_2, 4 => Sym_3)); 
--# expr-done 615
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 616
Var_Expr_17 := Fld;
if Var_Expr_17 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 619 '<EnvGet at nodes.lkt:1191:9>' Env_Get_Result ada/nodes.lkt:1191
--# expr-start 617 '<FieldAccess for children_env at nodes.lkt:1191:9>' Fld_1 ada/nodes.lkt:1191
      if Var_Expr_17 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_17);
--# expr-done 617
--# expr-start 618 '<Symbol Big_Integer at nodes.lkt:1196:20>' Sym_4 ada/nodes.lkt:1196
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Big_Integer); 
--# expr-done 618
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_4), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 619
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_1963;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 620
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_84;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_84;
                     Finalizer_Scope_1963;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Big_Integer_Type;
--# end
--# property-start AdaNode.parent_has_with_visibility ada/nodes.lkt:1205
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Parent_Has_With_Visibility
  (Node : Bare_Ada_Node
      ; Refd_Unit : Internal_Unit
      ; Self_Cu : Bare_Compilation_Unit
      ; Has_Private_View : Boolean
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind refd_unit Refd_Unit
   --# bind self_cu Self_Cu
   --# bind has_private_view Has_Private_View
   Property_Result : Boolean;
      Local_Should_Have_Private_View : Boolean;
Var_Expr_0 : Internal_Entity;
Fld : Boolean;
If_Result : Boolean;
Fld_1 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity;
Fld_3 : Internal_Entity;
Fld_4 : Boolean;
Fld_5 : Boolean;
Is_A : Boolean;
Not_Val : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 633 '<Let at nodes.lkt:1210:9>' Let_Result ada/nodes.lkt:1210
--# scope-start
--# expr-start 622 '<BooleanBinaryOp Or at nodes.lkt:1211:13>' If_Result ada/nodes.lkt:1211
if Has_Private_View then
   If_Result := True;
else
   --# expr-start 621 '<FieldAccess for has_private_view at nodes.lkt:1211:33>' Fld ada/nodes.lkt:1211
      if Self_Cu = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.has_private_view
Fld := Libadalang.Implementation.Compilation_Unit_P_Has_Private_View (Node => Self_Cu, Origin => Self);
--# end
--# expr-done 621
   If_Result := Fld;
end if;
--# expr-done 622
Local_Should_Have_Private_View := If_Result; 
--# bind should_have_private_view Local_Should_Have_Private_View
--# expr-start 625 '<FieldAccess for semantic_parent at nodes.lkt:1213:9>' Fld_2 ada/nodes.lkt:1213
--# expr-start 624 '<as_bare_entity at nodes.lkt:1213:9>' If_Result_1 ada/nodes.lkt:1213
--# expr-start 623 '<FieldAccess for decl at nodes.lkt:1213:9>' Fld_1 ada/nodes.lkt:1213
      if Self_Cu = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Self_Cu);
--# end
--# expr-done 623
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result_1 := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_1); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 624
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_2 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => If_Result_1.Node, E_Info => If_Result_1.Info);
--# end
--# expr-done 625
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity then
   --# scope-start
   --# bind parent Var_Expr_0
--# expr-start 632 '<If at nodes.lkt:1220:13>' If_Result_3 ada/nodes.lkt:1220
--# expr-start 628 '<BooleanBinaryOp And at nodes.lkt:1220:16>' If_Result_2 ada/nodes.lkt:1220
--# expr-start 626 '<IsA PrivatePart at nodes.lkt:1220:16>' Is_A ada/nodes.lkt:1220
Is_A := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Private_Part_Range; 
--# expr-done 626
if Is_A then
   --# expr-start 627 '<Not at nodes.lkt:1220:42>' Not_Val ada/nodes.lkt:1220
Not_Val := not (Local_Should_Have_Private_View); 
--# expr-done 627
   If_Result_2 := Not_Val;
else
   If_Result_2 := False;
end if;
--# expr-done 628
if If_Result_2 then
   --# expr-start 630 '<FieldAccess for has_with_visibility at nodes.lkt:1222:17>' Fld_4 ada/nodes.lkt:1222
--# expr-start 629 '<parent at nodes.lkt:1222:17>' Fld_3 ada/nodes.lkt:1222
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 629
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_with_visibility
Fld_4 := Libadalang.Implementation.Ada_Node_P_Has_With_Visibility (Node => Fld_3.Node, Refd_Unit => Refd_Unit, Omit_Privacy_Check => False);
--# end
--# expr-done 630
   If_Result_3 := Fld_4;
else
   --# expr-start 631 '<FieldAccess for has_with_visibility at nodes.lkt:1227:17>' Fld_5 ada/nodes.lkt:1227
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_with_visibility
Fld_5 := Libadalang.Implementation.Ada_Node_P_Has_With_Visibility (Node => Var_Expr_0.Node, Refd_Unit => Refd_Unit, Omit_Privacy_Check => Local_Should_Have_Private_View);
--# end
--# expr-done 631
   If_Result_3 := Fld_5;
end if;
--# expr-done 632
Scope_Result := If_Result_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Let_Result := Result_Var; 
--# end
--# expr-done 633
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Parent_Has_With_Visibility;
--# end
--# property-start AdaNode.has_private_part_parent ada/nodes.lkt:1241
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Has_Private_Part_Parent
  (Node : Bare_Ada_Node
      ; Barrier : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind barrier Barrier
   Property_Result : Boolean;
            procedure Finalizer_Scope_86 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Is_A : Boolean;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Ada_Node;
Is_Equal : Boolean;
Not_Val : Boolean;
Fld : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
            procedure Finalizer_Scope_86 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_86;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 641 '<BooleanBinaryOp Or at nodes.lkt:1242:9>' If_Result_1 ada/nodes.lkt:1242
--# expr-start 634 '<IsA PrivatePart at nodes.lkt:1242:9>' Is_A ada/nodes.lkt:1242
Is_A := Self /= null 
and then Self.Kind in Ada_Private_Part_Range; 
--# expr-done 634
if Is_A then
   If_Result_1 := True;
else
   --# expr-start 640 '<BooleanBinaryOp And at nodes.lkt:1244:13>' If_Result ada/nodes.lkt:1244
--# expr-start 636 '<Not at nodes.lkt:1244:13>' Not_Val ada/nodes.lkt:1244
--# expr-start 635 '<Eq at nodes.lkt:1244:13>' Is_Equal ada/nodes.lkt:1244
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Is_Equal := Cast_Result = Barrier; 
--# expr-done 635
Not_Val := not (Is_Equal); 
--# expr-done 636
if Not_Val then
--# expr-start 638 '<env_node at nodes.lkt:1245:17>' Env_Node ada/nodes.lkt:1245
--# expr-start 637 '<FieldAccess for node_env at nodes.lkt:1245:17>' Fld ada/nodes.lkt:1245
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Self);
--# expr-done 637
Env_Node := AST_Envs.Env_Node (Fld); 
--# expr-done 638
Var_Expr_0 := Env_Node;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind parent Var_Expr_0
--# expr-start 639 '<FieldAccess for has_private_part_parent at nodes.lkt:1246:29>' Fld_1 ada/nodes.lkt:1246
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_private_part_parent
Fld_1 := Libadalang.Implementation.Ada_Node_P_Has_Private_Part_Parent (Node => Var_Expr_0, Barrier => Barrier);
--# end
--# expr-done 639
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
   If_Result := Result_Var;
else
   If_Result := False;
end if;
--# expr-done 640
   If_Result_1 := If_Result;
end if;
--# expr-done 641
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_86;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_86;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Has_Private_Part_Parent;
--# end
--# property-start AdaNode.has_private_with_visibility ada/nodes.lkt:1255
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Has_Private_With_Visibility
  (Node : Bare_Ada_Node
      ; Self_Cu : Bare_Compilation_Unit
      ; Refd_Unit : Internal_Unit
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind self_cu Self_Cu
   --# bind refd_unit Refd_Unit
   Property_Result : Boolean;
            procedure Finalizer_Scope_87 with Inline_Always;
      Fld : Internal_Unit;
Is_Equal : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
Fld_2 : Internal_Unit_Array_Access;
Is_Equal_1 : Boolean;
Quantifier_Result : Boolean;
Not_Val : Boolean;
If_Result_1 : Boolean;
            procedure Finalizer_Scope_87 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_87;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 650 '<BooleanBinaryOp Or at nodes.lkt:1260:9>' If_Result_1 ada/nodes.lkt:1260
--# expr-start 645 '<BooleanBinaryOp Or at nodes.lkt:1260:9>' If_Result ada/nodes.lkt:1260
--# expr-start 643 '<Eq at nodes.lkt:1260:9>' Is_Equal ada/nodes.lkt:1260
--# expr-start 642 '<FieldAccess for unit at nodes.lkt:1260:9>' Fld ada/nodes.lkt:1260
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 642
Is_Equal := Fld = Refd_Unit; 
--# expr-done 643
if Is_Equal then
   If_Result := True;
else
   --# expr-start 644 '<FieldAccess for has_private_view at nodes.lkt:1264:12>' Fld_1 ada/nodes.lkt:1264
      if Self_Cu = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.has_private_view
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Has_Private_View (Node => Self_Cu, Origin => Self);
--# end
--# expr-done 644
   If_Result := Fld_1;
end if;
--# expr-done 645
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 649 '<Not at nodes.lkt:1268:12>' Not_Val ada/nodes.lkt:1268
--# expr-start 648 '<Contains at nodes.lkt:1268:16>' Quantifier_Result ada/nodes.lkt:1268
   --# expr-start 646 '<FieldAccess for privately_imported_units at nodes.lkt:1268:16>' Fld_2 ada/nodes.lkt:1268
      if Self_Cu = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.privately_imported_units
Fld_2 := Libadalang.Implementation.Compilation_Unit_P_Privately_Imported_Units (Node => Self_Cu);
--# end
--# expr-done 646
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Unit_Array_Access := Fld_2;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_1
      --# expr-start 647 '<Eq at ???>' Is_Equal_1 None
Is_Equal_1 := Item_1 = Refd_Unit; 
--# expr-done 647
      Quantifier_Result := Is_Equal_1;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 648
Not_Val := not (Quantifier_Result); 
--# expr-done 649
   If_Result_1 := Not_Val;
end if;
--# expr-done 650
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_87;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_87;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Has_Private_With_Visibility;
--# end
--# property-start AdaNode.has_with_visibility ada/nodes.lkt:1274
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Has_With_Visibility
  (Node : Bare_Ada_Node
      ; Refd_Unit : Internal_Unit
      ; Omit_Privacy_Check : Boolean
         := False
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind refd_unit Refd_Unit
   --# bind omit_privacy_check Omit_Privacy_Check
   Property_Result : Boolean;
      Local_Cu : Bare_Compilation_Unit;
Var_Expr_0 : Internal_Entity_Base_Subp_Body;
Var_Expr_1 : Bare_Compilation_Unit;
Var_Expr_18 : Bare_Compilation_Unit;
Var_Expr_19 : Bare_Compilation_Unit;
Fld : Bare_Compilation_Unit;
Fld_1 : Internal_Unit;
Fld_2 : Boolean;
Fld_3 : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
Fld_4 : Boolean;
If_Result_2 : Boolean;
Fld_5 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result_3 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Base_Subp_Body;
Fld_6 : Internal_Entity_Defining_Name;
Fld_7 : Bare_Compilation_Unit;
Fld_8 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Cast_Expr : Bare_Compilation_Unit;
Cast_Result_1 : Bare_Compilation_Unit;
Is_Equal : Boolean;
If_Result_4 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Fld_9 : Boolean;
If_Result_5 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_6 : Boolean;
Fld_10 : Bare_Ada_Node;
Cast_Result_2 : Bare_Compilation_Unit;
Fld_11 : Boolean;
Scope_Result_3 : Boolean;
Result_Var_3 : Boolean;
If_Result_7 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 674 '<Let at nodes.lkt:1278:9>' Let_Result ada/nodes.lkt:1278
--# scope-start
--# expr-start 651 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:1278:18>' Fld ada/nodes.lkt:1278
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Self);
--# end
--# expr-done 651
Local_Cu := Fld; 
--# bind cu Local_Cu
--# expr-start 673 '<BooleanBinaryOp Or at nodes.lkt:1280:9>' If_Result_7 ada/nodes.lkt:1280
--# expr-start 669 '<BooleanBinaryOp Or at nodes.lkt:1280:9>' If_Result_6 ada/nodes.lkt:1280
--# expr-start 658 '<BooleanBinaryOp Or at nodes.lkt:1280:9>' If_Result_2 ada/nodes.lkt:1280
--# expr-start 656 '<BooleanBinaryOp And at nodes.lkt:1282:13>' If_Result_1 ada/nodes.lkt:1282
--# expr-start 653 '<FieldAccess for is_referenced_from at nodes.lkt:1282:13>' Fld_2 ada/nodes.lkt:1282
      if Refd_Unit = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 652 '<FieldAccess for unit at nodes.lkt:1282:42>' Fld_1 ada/nodes.lkt:1282
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 652
Fld_2 := Libadalang.Implementation.Is_Referenced_From (Self => Refd_Unit, Unit => Fld_1);
--# expr-done 653
if Fld_2 then
   --# expr-start 655 '<BooleanBinaryOp Or at nodes.lkt:1284:17>' If_Result ada/nodes.lkt:1284
if Omit_Privacy_Check then
   If_Result := True;
else
   --# expr-start 654 '<FieldAccess for has_private_with_visibility at nodes.lkt:1285:20>' Fld_3 ada/nodes.lkt:1285
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_private_with_visibility
Fld_3 := Libadalang.Implementation.Ada_Node_P_Has_Private_With_Visibility (Node => Self, Self_Cu => Local_Cu, Refd_Unit => Refd_Unit);
--# end
--# expr-done 654
   If_Result := Fld_3;
end if;
--# expr-done 655
   If_Result_1 := If_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 656
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 657 '<FieldAccess for parent_has_with_visibility at nodes.lkt:1290:13>' Fld_4 ada/nodes.lkt:1290
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_has_with_visibility
Fld_4 := Libadalang.Implementation.Ada_Node_P_Parent_Has_With_Visibility (Node => Self, Refd_Unit => Refd_Unit, Self_Cu => Local_Cu, Has_Private_View => Omit_Privacy_Check);
--# end
--# expr-done 657
   If_Result_2 := Fld_4;
end if;
--# expr-done 658
if If_Result_2 then
   If_Result_6 := True;
else
--# expr-start 661 '<Cast to BaseSubpBody at nodes.lkt:1301:13>' Cast_Result ada/nodes.lkt:1301
--# expr-start 660 '<as_bare_entity at nodes.lkt:1301:13>' If_Result_3 ada/nodes.lkt:1301
--# expr-start 659 '<FieldAccess for decl at nodes.lkt:1301:13>' Fld_5 ada/nodes.lkt:1301
      if Local_Cu = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_5 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Local_Cu);
--# end
--# expr-done 659
Is_Null := Fld_5 = null; 
if Is_Null then
   If_Result_3 := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_5); 
   If_Result_3 := As_Entity;
end if;
--# expr-done 660
   if If_Result_3.Node = null
      or else If_Result_3.Node.Kind in Ada_Base_Subp_Body
   then
      Cast_Result := Create_Internal_Entity_Base_Subp_Body
        (Node => If_Result_3.Node,
         Info => If_Result_3.Info);
   else
         Cast_Result := No_Entity_Base_Subp_Body;
   end if;
--# expr-done 661
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Base_Subp_Body then
   --# scope-start
   --# bind b Var_Expr_0
--# expr-start 668 '<If at nodes.lkt:1303:17>' If_Result_5 ada/nodes.lkt:1303
--# expr-start 662 '<FieldAccess for is_library_item at nodes.lkt:1303:20>' Fld_9 ada/nodes.lkt:1303
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Var_Expr_0.Node);
--# end
--# expr-done 662
if Fld_9 then
--# expr-start 664 '<FieldAccess for referenced_unit at nodes.lkt:1305:21>' Fld_7 ada/nodes.lkt:1305
--# expr-start 663 '<FieldAccess for defining_name at nodes.lkt:1305:21>' Fld_6 ada/nodes.lkt:1305
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 663
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_unit
Fld_7 := Libadalang.Implementation.Name_P_Referenced_Unit (Node => Fld_6.Node, Kind => Unit_Specification, Not_Found_Is_Error => False);
--# end
--# expr-done 664
Var_Expr_1 := Fld_7;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind u Var_Expr_1
--# expr-start 667 '<If at nodes.lkt:1316:25>' If_Result_4 ada/nodes.lkt:1316
--# expr-start 665 '<Eq at nodes.lkt:1316:28>' Is_Equal ada/nodes.lkt:1316
Cast_Expr := Local_Cu; 
      Cast_Result_1 := Cast_Expr;
Is_Equal := Cast_Result_1 = Var_Expr_1; 
--# expr-done 665
if Is_Equal then
   If_Result_4 := False;
else
Var_Expr_18 := Var_Expr_1;
if Var_Expr_18 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 666 '<FieldAccess for has_with_visibility at nodes.lkt:1318:29>' Fld_8 ada/nodes.lkt:1318
      if Var_Expr_18 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_with_visibility
Fld_8 := Libadalang.Implementation.Ada_Node_P_Has_With_Visibility (Node => Var_Expr_18, Refd_Unit => Refd_Unit, Omit_Privacy_Check => True);
--# end
--# expr-done 666
Scope_Result := Fld_8;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result_4 := Result_Var;
end if;
--# expr-done 667
Scope_Result_1 := If_Result_4;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_5 := Result_Var_1;
else
   If_Result_5 := False;
end if;
--# expr-done 668
Scope_Result_2 := If_Result_5;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_6 := Result_Var_2;
end if;
--# expr-done 669
if If_Result_6 then
   If_Result_7 := True;
else
--# expr-start 671 '<Cast to CompilationUnit at nodes.lkt:1334:13>' Cast_Result_2 ada/nodes.lkt:1334
--# expr-start 670 '<FieldAccess for root at nodes.lkt:1334:13>' Fld_10 ada/nodes.lkt:1334
      if Refd_Unit = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Refd_Unit.Ast_Root;
--# expr-done 670
   if Fld_10 = null
      or else Fld_10.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result_2 := Fld_10;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 671
Var_Expr_19 := Cast_Result_2;
if Var_Expr_19 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 672 '<FieldAccess for is_text_io_child at nodes.lkt:1334:13>' Fld_11 ada/nodes.lkt:1334
      if Var_Expr_19 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.is_text_io_child
Fld_11 := Libadalang.Implementation.Compilation_Unit_P_Is_Text_Io_Child (Node => Var_Expr_19);
--# end
--# expr-done 672
Scope_Result_3 := Fld_11;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := False;
end if;
   If_Result_7 := Result_Var_3;
end if;
--# expr-done 673
Let_Result := If_Result_7; 
--# end
--# expr-done 674
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Has_With_Visibility;
--# end
--# property-start AdaNode.has_visibility ada/nodes.lkt:1338
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Has_Visibility
  (Node : Bare_Ada_Node
      ; Other_Entity : Internal_Entity
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind other_entity Other_Entity
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Synthetic_Object_Decl;
Var_Expr_20 : Internal_Entity_Generic_Package_Instantiation;
Var_Expr_21 : Internal_Entity_Package_Renaming_Decl;
Var_Expr_22 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Synthetic_Object_Decl;
Fld : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Generic_Package_Instantiation;
Fld_1 : Internal_Entity_Info;
Fld_2 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Cast_Expr_2 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Package_Renaming_Decl;
Fld_3 : Internal_Entity_Info;
Fld_4 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result : Boolean;
Cast_Expr_3 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Fld_5 : Boolean;
Scope_Result_3 : Boolean;
Result_Var_3 : Boolean;
Not_Val : Boolean;
If_Result_1 : Boolean;
Fld_6 : Bare_Ada_Node;
Fld_7 : Internal_Unit;
Fld_8 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 692 '<BooleanBinaryOp And at nodes.lkt:1341:9>' If_Result_3 ada/nodes.lkt:1341
--# expr-start 675 '<Cast to SyntheticObjectDecl at nodes.lkt:1341:9>' Cast_Result ada/nodes.lkt:1341
Cast_Expr := Other_Entity; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Synthetic_Object_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Synthetic_Object_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Synthetic_Object_Decl;
   end if;
--# expr-done 675
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Synthetic_Object_Decl then
   --# scope-start
   --# bind sod Var_Expr_0
--# expr-start 676 '<FieldAccess for is_referred_by at nodes.lkt:1342:22>' Fld ada/nodes.lkt:1342
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SyntheticObjectDecl.is_referred_by
Fld := Libadalang.Implementation.Synthetic_Object_Decl_P_Is_Referred_By (Node => Var_Expr_0.Node, Origin => Self);
--# end
--# expr-done 676
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
if Result_Var then
   --# expr-start 691 '<BooleanBinaryOp Or at nodes.lkt:1346:13>' If_Result_2 ada/nodes.lkt:1346
--# expr-start 687 '<BooleanBinaryOp Or at nodes.lkt:1346:13>' If_Result_1 ada/nodes.lkt:1346
--# expr-start 683 '<BooleanBinaryOp Or at nodes.lkt:1346:13>' If_Result ada/nodes.lkt:1346
--# expr-start 677 '<Cast to GenericPackageInstantiation at nodes.lkt:1349:17>' Cast_Result_1 ada/nodes.lkt:1349
Cast_Expr_1 := Other_Entity; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Generic_Package_Instantiation_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Generic_Package_Instantiation
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Generic_Package_Instantiation;
   end if;
--# expr-done 677
Var_Expr_20 := Cast_Result_1;
if Var_Expr_20 /= No_Entity_Generic_Package_Instantiation then
   --# scope-start
--# expr-start 679 '<FieldAccess for from_rebound at nodes.lkt:1349:17>' Fld_2 ada/nodes.lkt:1349
--# expr-start 678 '<FieldAccess for info at nodes.lkt:1349:17>' Fld_1 ada/nodes.lkt:1349
Fld_1 := Var_Expr_20.Info;
--# expr-done 678
Fld_2 := Fld_1.From_Rebound;
--# expr-done 679
Scope_Result_1 := Fld_2;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
if Result_Var_1 then
   If_Result := True;
else
--# expr-start 680 '<Cast to PackageRenamingDecl at nodes.lkt:1351:16>' Cast_Result_2 ada/nodes.lkt:1351
Cast_Expr_2 := Other_Entity; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Package_Renaming_Decl_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Package_Renaming_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_2 := No_Entity_Package_Renaming_Decl;
   end if;
--# expr-done 680
Var_Expr_21 := Cast_Result_2;
if Var_Expr_21 /= No_Entity_Package_Renaming_Decl then
   --# scope-start
--# expr-start 682 '<FieldAccess for from_rebound at nodes.lkt:1351:16>' Fld_4 ada/nodes.lkt:1351
--# expr-start 681 '<FieldAccess for info at nodes.lkt:1351:16>' Fld_3 ada/nodes.lkt:1351
Fld_3 := Var_Expr_21.Info;
--# expr-done 681
Fld_4 := Fld_3.From_Rebound;
--# expr-done 682
Scope_Result_2 := Fld_4;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result := Result_Var_2;
end if;
--# expr-done 683
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 686 '<Not at nodes.lkt:1354:17>' Not_Val ada/nodes.lkt:1354
--# expr-start 684 '<Cast to BasicDecl at nodes.lkt:1354:21>' Cast_Result_3 ada/nodes.lkt:1354
Cast_Expr_3 := Other_Entity; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_3 := No_Entity_Basic_Decl;
   end if;
--# expr-done 684
Var_Expr_22 := Cast_Result_3;
if Var_Expr_22 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 685 '<FieldAccess for is_compilation_unit_root at nodes.lkt:1354:21>' Fld_5 ada/nodes.lkt:1354
      if Var_Expr_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Var_Expr_22.Node);
--# end
--# expr-done 685
Scope_Result_3 := Fld_5;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := False;
end if;
Not_Val := not (Result_Var_3); 
--# expr-done 686
   If_Result_1 := Not_Val;
end if;
--# expr-done 687
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 690 '<FieldAccess for has_with_visibility at nodes.lkt:1358:17>' Fld_8 ada/nodes.lkt:1358
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 689 '<FieldAccess for unit at nodes.lkt:1358:42>' Fld_7 ada/nodes.lkt:1358
--# expr-start 688 '<FieldAccess for node at nodes.lkt:1358:42>' Fld_6 ada/nodes.lkt:1358
Fld_6 := Other_Entity.Node;
--# expr-done 688
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Unit (Node => Fld_6);
--# expr-done 689
--# property-call-start AdaNode.has_with_visibility
Fld_8 := Libadalang.Implementation.Ada_Node_P_Has_With_Visibility (Node => Self, Refd_Unit => Fld_7);
--# end
--# expr-done 690
   If_Result_2 := Fld_8;
end if;
--# expr-done 691
   If_Result_3 := If_Result_2;
else
   If_Result_3 := False;
end if;
--# expr-done 692
         Property_Result := If_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Has_Visibility;
--# end
--# property-start AdaNode.resolve_generic_actual ada/nodes.lkt:1363
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Resolve_Generic_Actual
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity;
            procedure Finalizer_Scope_1976 with Inline_Always;
      Match_0 : Internal_Entity_Anonymous_Expr_Decl;
Match_1 : Internal_Entity_Name;
Match_2 : Internal_Entity;
Var_Expr : Internal_Entity;
Var_Expr_1 : Internal_Entity;
Var_Expr_23 : Internal_Entity_Attribute_Ref;
Fld : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Cast_Expr : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Attribute_Ref;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Scope_Result_2 : Internal_Entity;
Fld_2 : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Result_Var_2 : Internal_Entity;
Match_Prefix : Internal_Entity;
Cast_Result_3 : Internal_Entity_Anonymous_Expr_Decl;
Cast_Expr_1 : Internal_Entity_Anonymous_Expr_Decl;
Cast_Result_4 : Internal_Entity;
Let_Result : Internal_Entity;
Scope_Result_3 : Internal_Entity;
Cast_Result_5 : Internal_Entity_Name;
Let_Result_1 : Internal_Entity;
Scope_Result_4 : Internal_Entity;
Cast_Result_6 : Internal_Entity;
Let_Result_2 : Internal_Entity;
Scope_Result_5 : Internal_Entity;
Match_Result : Internal_Entity;
            procedure Finalizer_Scope_1976 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1976;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 699 '<Match at nodes.lkt:1363:53>' Match_Result ada/nodes.lkt:1363
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Expr_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Anonymous_Expr_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_3; 
--# bind aod Match_0
Cast_Expr_1 := Match_0; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Let_Result := Cast_Result_4; 
--# end
Scope_Result_3 := Let_Result;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_5; 
--# bind n Match_1
--# expr-start 694 '<Cast to AdaNode at nodes.lkt:1373:17>' Cast_Result ada/nodes.lkt:1373
--# expr-start 693 '<FieldAccess for name_designated_type at nodes.lkt:1373:17>' Fld ada/nodes.lkt:1373
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 693
      Cast_Result := Create_Internal_Entity
        (Node => Fld.Node,
         Info => Fld.Info);
--# expr-done 694
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind e Var_Expr_1
Scope_Result := Var_Expr_1;
   --# end
   Result_Var_1 := Scope_Result;
else
--# expr-start 695 '<Cast to AttributeRef at nodes.lkt:1374:21>' Cast_Result_1 ada/nodes.lkt:1374
Cast_Expr := Match_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Attribute_Ref_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Attribute_Ref
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Attribute_Ref;
   end if;
--# expr-done 695
Var_Expr_23 := Cast_Result_1;
if Var_Expr_23 /= No_Entity_Attribute_Ref then
   --# scope-start
--# expr-start 696 '<FieldAccess for attribute_subprogram at nodes.lkt:1374:21>' Fld_1 ada/nodes.lkt:1374
      if Var_Expr_23.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.attribute_subprogram
Fld_1 := Libadalang.Implementation.Attribute_Ref_P_Attribute_Subprogram (Node => Var_Expr_23.Node, E_Info => Var_Expr_23.Info);
--# end
--# expr-done 696
Scope_Result_1 := Fld_1;
   --# end
   Result_Var := Scope_Result_1;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
      Cast_Result_2 := Create_Internal_Entity
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   Result_Var_1 := Cast_Result_2;
end if;
Var_Expr := Result_Var_1;
if Var_Expr /= No_Entity then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_2 := Var_Expr;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   --# expr-start 698 '<at at nodes.lkt:1376:17>' Get_Result ada/nodes.lkt:1376
--# expr-start 697 '<FieldAccess for all_env_elements at nodes.lkt:1376:17>' Fld_2 ada/nodes.lkt:1376
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_env_elements
Fld_2 := Libadalang.Implementation.Name_P_All_Env_Elements (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 697
Get_Result := Get (Self, Fld_2, 0, True); 
--# expr-done 698
   Result_Var_2 := Get_Result;
end if;
Let_Result_1 := Result_Var_2; 
--# end
Scope_Result_4 := Let_Result_1;
   --# end
      Finalizer_Scope_1976;
            Match_Result := Scope_Result_4; 
         when Ada_Abort_Absent .. Ada_Abstract_State_Decl | Ada_Component_Decl .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_6; 
--# bind _ Match_2
Let_Result_2 := No_Entity; 
--# end
Scope_Result_5 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 699
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1976;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Resolve_Generic_Actual;
--# end
--# property-start AdaNode.top_level_use_package_clauses ada/nodes.lkt:1387
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Top_Level_Use_Package_Clauses
  (Node : Bare_Ada_Node
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_91 with Inline_Always;
            procedure Finalizer_Scope_1982 with Inline_Always;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Fld_2 : Bare_Ada_Node_List;
Item_0 : Bare_Ada_Node;
Is_A : Boolean;
Map_Result : Bare_Ada_Node_Array_Access;
Cast_Expr : Bare_Ada_Node;
Cast_Result_1 : Bare_Use_Package_Clause;
Fld_3 : Bare_Name_List;
Item_2 : Bare_Name;
Cast_Expr_1 : Bare_Name;
Cast_Result_2 : Bare_Ada_Node;
Map_Result_1 : Bare_Ada_Node_Array_Access;
Map_Result_2 : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_91 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_91;
            procedure Finalizer_Scope_1982 is
            begin
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_1982;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 710 '<Mapcat at nodes.lkt:1388:9>' Map_Result_2 ada/nodes.lkt:1388
   --# expr-start 705 '<Map at nodes.lkt:1388:9>' Map_Result ada/nodes.lkt:1388
   --# expr-start 703 '<FieldAccess for prelude at nodes.lkt:1388:9>' Fld_2 ada/nodes.lkt:1388
--# expr-start 702 '<Cast to CompilationUnit at nodes.lkt:1388:9>' Cast_Result ada/nodes.lkt:1388
--# expr-start 701 '<parent at nodes.lkt:1388:9>' Fld_1 ada/nodes.lkt:1388
--# expr-start 700 '<parent at nodes.lkt:1388:9>' Fld ada/nodes.lkt:1388
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 700
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 701
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Fld_1;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 702
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Compilation_Unit_F_Prelude;
--# expr-done 703
      declare
         Map_Result_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind p Item_0
         --# expr-start 704 '<IsA UsePackageClause at nodes.lkt:1389:20>' Is_A ada/nodes.lkt:1389
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Use_Package_Clause_Range; 
--# expr-done 704
         if Is_A then
         declare
            Item_To_Append : constant Bare_Ada_Node := Item_0;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 705
      declare
         Map_Result_2_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Map_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
      --# expr-start 709 '<Map at nodes.lkt:1392:20>' Map_Result_1 ada/nodes.lkt:1392
   --# expr-start 707 '<FieldAccess for packages at nodes.lkt:1392:20>' Fld_3 ada/nodes.lkt:1392
--# expr-start 706 '<Cast to UsePackageClause at nodes.lkt:1392:20>' Cast_Result_1 ada/nodes.lkt:1392
Cast_Expr := Item_1; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Use_Package_Clause_Range
   then
      Cast_Result_1 := Cast_Expr;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 706
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Cast_Result_1.Use_Package_Clause_F_Packages;
--# expr-done 707
      declare
         Map_Result_1_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Fld_3 = null then
      Map_Result_1 := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld_3;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_2 := Untyped_Item_2; 
   --# scope-start
               --# bind n Item_2
      --# expr-start 708 '<Cast to AdaNode at nodes.lkt:1392:64>' Cast_Result_2 ada/nodes.lkt:1392
Cast_Expr_1 := Item_2; 
      Cast_Result_2 := Cast_Expr_1;
--# expr-done 708
         declare
            Item_To_Append : constant Bare_Ada_Node := Cast_Result_2;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_1_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 709
         for Item_To_Append of
               Map_Result_1.Items
         loop
            Bare_Ada_Node_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_1982;
         end loop;
      end;
         Map_Result_2 := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_2_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 710
         Property_Result := Map_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_91;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_91;
                     Finalizer_Scope_1982;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Top_Level_Use_Package_Clauses;
--# end
--# property-start AdaNode.top_level_use_type_clauses ada/nodes.lkt:1398
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Top_Level_Use_Type_Clauses
  (Node : Bare_Ada_Node
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_92 with Inline_Always;
            procedure Finalizer_Scope_1985 with Inline_Always;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Fld_2 : Bare_Ada_Node_List;
Item_0 : Bare_Ada_Node;
Is_A : Boolean;
Map_Result : Bare_Ada_Node_Array_Access;
Cast_Expr : Bare_Ada_Node;
Cast_Result_1 : Bare_Use_Type_Clause;
Fld_3 : Bare_Name_List;
Item_2 : Bare_Name;
Cast_Expr_1 : Bare_Name;
Cast_Result_2 : Bare_Ada_Node;
Map_Result_1 : Bare_Ada_Node_Array_Access;
Map_Result_2 : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_92 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_92;
            procedure Finalizer_Scope_1985 is
            begin
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_1985;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 721 '<Mapcat at nodes.lkt:1399:9>' Map_Result_2 ada/nodes.lkt:1399
   --# expr-start 716 '<Map at nodes.lkt:1399:9>' Map_Result ada/nodes.lkt:1399
   --# expr-start 714 '<FieldAccess for prelude at nodes.lkt:1399:9>' Fld_2 ada/nodes.lkt:1399
--# expr-start 713 '<Cast to CompilationUnit at nodes.lkt:1399:9>' Cast_Result ada/nodes.lkt:1399
--# expr-start 712 '<parent at nodes.lkt:1399:9>' Fld_1 ada/nodes.lkt:1399
--# expr-start 711 '<parent at nodes.lkt:1399:9>' Fld ada/nodes.lkt:1399
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 711
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 712
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Fld_1;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 713
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Compilation_Unit_F_Prelude;
--# expr-done 714
      declare
         Map_Result_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind p Item_0
         --# expr-start 715 '<IsA UseTypeClause at nodes.lkt:1400:20>' Is_A ada/nodes.lkt:1400
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Use_Type_Clause_Range; 
--# expr-done 715
         if Is_A then
         declare
            Item_To_Append : constant Bare_Ada_Node := Item_0;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 716
      declare
         Map_Result_2_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Map_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
      --# expr-start 720 '<Map at nodes.lkt:1402:24>' Map_Result_1 ada/nodes.lkt:1402
   --# expr-start 718 '<FieldAccess for types at nodes.lkt:1402:24>' Fld_3 ada/nodes.lkt:1402
--# expr-start 717 '<Cast to UseTypeClause at nodes.lkt:1402:24>' Cast_Result_1 ada/nodes.lkt:1402
Cast_Expr := Item_1; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Use_Type_Clause_Range
   then
      Cast_Result_1 := Cast_Expr;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 717
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Cast_Result_1.Use_Type_Clause_F_Types;
--# expr-done 718
      declare
         Map_Result_1_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Fld_3 = null then
      Map_Result_1 := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld_3;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_2 := Untyped_Item_2; 
   --# scope-start
               --# bind n Item_2
      --# expr-start 719 '<Cast to AdaNode at nodes.lkt:1402:62>' Cast_Result_2 ada/nodes.lkt:1402
Cast_Expr_1 := Item_2; 
      Cast_Result_2 := Cast_Expr_1;
--# expr-done 719
         declare
            Item_To_Append : constant Bare_Ada_Node := Cast_Result_2;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_1_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 720
         for Item_To_Append of
               Map_Result_1.Items
         loop
            Bare_Ada_Node_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_1985;
         end loop;
      end;
         Map_Result_2 := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_2_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 721
         Property_Result := Map_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_92;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_92;
                     Finalizer_Scope_1985;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Top_Level_Use_Type_Clauses;
--# end
--# property-start AdaNode.top_level_use_clauses ada/nodes.lkt:1406
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Top_Level_Use_Clauses
  (Node : Bare_Ada_Node
  )
   return Bare_Use_Clause_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Bare_Use_Clause_Array_Access;
            procedure Finalizer_Scope_93 with Inline_Always;
      Local_Cu : Bare_Compilation_Unit;
Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Fld_2 : Bare_Ada_Node_List;
Item_0 : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result_1 : Bare_Use_Clause;
Is_A : Boolean;
Map_Result : Bare_Use_Clause_Array_Access;
Let_Result : Bare_Use_Clause_Array_Access;
            procedure Finalizer_Scope_93 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_93;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 729 '<Let at nodes.lkt:1407:9>' Let_Result ada/nodes.lkt:1407
--# scope-start
--# expr-start 724 '<Cast to CompilationUnit at nodes.lkt:1407:18>' Cast_Result ada/nodes.lkt:1407
--# expr-start 723 '<parent at nodes.lkt:1407:18>' Fld_1 ada/nodes.lkt:1407
--# expr-start 722 '<parent at nodes.lkt:1407:18>' Fld ada/nodes.lkt:1407
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 722
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 723
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Fld_1;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 724
Local_Cu := Cast_Result; 
--# bind cu Local_Cu
--# expr-start 728 '<Map at nodes.lkt:1409:9>' Map_Result ada/nodes.lkt:1409
   --# expr-start 725 '<FieldAccess for prelude at nodes.lkt:1409:9>' Fld_2 ada/nodes.lkt:1409
      if Local_Cu = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Local_Cu.Compilation_Unit_F_Prelude;
--# expr-done 725
      declare
         Map_Result_Vec : Bare_Use_Clause_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Bare_Use_Clause_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind p Item_0
         --# expr-start 726 '<IsA UseClause at nodes.lkt:1409:61>' Is_A ada/nodes.lkt:1409
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Use_Clause; 
--# expr-done 726
         if Is_A then
      --# expr-start 727 '<Cast to UseClause at nodes.lkt:1409:37>' Cast_Result_1 ada/nodes.lkt:1409
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Use_Clause
   then
      Cast_Result_1 := Cast_Expr;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 727
         declare
            Item_To_Append : constant Bare_Use_Clause := Cast_Result_1;
         begin
            Bare_Use_Clause_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Use_Clause_Array
           (Items_Count => Natural (Bare_Use_Clause_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Use_Clause_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Use_Clause_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Use_Clause_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 728
Let_Result := Map_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 729
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_93;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_93;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Top_Level_Use_Clauses;
--# end
--# property-start AdaNode.top_level_with_package_clauses ada/nodes.lkt:1415
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Top_Level_With_Package_Clauses
  (Node : Bare_Ada_Node
      ; Include_Privates : Boolean
         := True
  )
   return Bare_Name_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind include_privates Include_Privates
   Property_Result : Bare_Name_Array_Access;
            procedure Finalizer_Scope_94 with Inline_Always;
            procedure Finalizer_Scope_1988 with Inline_Always;
            procedure Finalizer_Scope_1989 with Inline_Always;
      Var_Expr_1 : Bare_With_Clause;
Fld : Bare_Compilation_Unit;
Fld_1 : Bare_Ada_Node_List;
Item_0 : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_With_Clause;
Fld_2 : Bare_Name_List;
Item_18 : Bare_Name;
Map_Result : Bare_Name_Array_Access;
Fld_3 : Bare_Private_Node;
Fld_4 : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
If_Result_1 : Bare_Name_Array_Access;
Scope_Result : Bare_Name_Array_Access;
Result_Var : Bare_Name_Array_Access;
Map_Result_1 : Bare_Name_Array_Access;
            procedure Finalizer_Scope_94 is
            begin
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_94;
            procedure Finalizer_Scope_1988 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1988;
            procedure Finalizer_Scope_1989 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_1989;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 740 '<Mapcat at nodes.lkt:1418:9>' Map_Result_1 ada/nodes.lkt:1418
   --# expr-start 731 '<FieldAccess for prelude at nodes.lkt:1418:9>' Fld_1 ada/nodes.lkt:1418
--# expr-start 730 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:1418:9>' Fld ada/nodes.lkt:1418
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Self);
--# end
--# expr-done 730
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Compilation_Unit_F_Prelude;
--# expr-done 731
      declare
         Map_Result_1_Vec : Bare_Name_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result_1 := Create_Bare_Name_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind clause Item_0
--# expr-start 732 '<Cast to WithClause at nodes.lkt:1420:13>' Cast_Result ada/nodes.lkt:1420
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_With_Clause_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 732
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind with_clause Var_Expr_1
--# expr-start 739 '<If at nodes.lkt:1422:17>' If_Result_1 ada/nodes.lkt:1422
--# expr-start 736 '<BooleanBinaryOp And at nodes.lkt:1422:20>' If_Result ada/nodes.lkt:1422
--# expr-start 734 '<FieldAccess for as_bool at nodes.lkt:1422:20>' Fld_4 ada/nodes.lkt:1422
--# expr-start 733 '<FieldAccess for has_private at nodes.lkt:1422:20>' Fld_3 ada/nodes.lkt:1422
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Var_Expr_1.With_Clause_F_Has_Private;
--# expr-done 733
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Private.as_bool'
Fld_4 := Libadalang.Implementation.Dispatcher_Private_Node_P_As_Bool (Node => Fld_3);
--# end
--# expr-done 734
if Fld_4 then
   --# expr-start 735 '<Not at nodes.lkt:1422:58>' Not_Val ada/nodes.lkt:1422
Not_Val := not (Include_Privates); 
--# expr-done 735
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 736
if If_Result then
   If_Result_1 := No_Bare_Name_Array_Type;
else
   --# expr-start 738 '<TakeWhile at ???>' Map_Result None
   --# expr-start 737 '<FieldAccess for packages at nodes.lkt:1424:22>' Fld_2 ada/nodes.lkt:1424
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_1.With_Clause_F_Packages;
--# expr-done 737
      declare
         Map_Result_Vec : Bare_Name_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Bare_Name_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld_2;
      begin
         for Untyped_Item_18 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_18 := Untyped_Item_18; 
   --# scope-start
         declare
            Item_To_Append : constant Bare_Name := Item_18;
         begin
            Bare_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Name_Array
           (Items_Count => Natural (Bare_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Name_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 738
   If_Result_1 := Map_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 739
Scope_Result := If_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_1989;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Name_Array_Type;
end if;
      Inc_Ref (Result_Var);
         for Item_To_Append of
               Result_Var.Items
         loop
            Bare_Name_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_1988;
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Bare_Name_Array
           (Items_Count => Natural (Bare_Name_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Bare_Name_Vectors.Get
              (Map_Result_1_Vec,
               I + Bare_Name_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Bare_Name_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 740
         Property_Result := Map_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_94;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_94;
                     Finalizer_Scope_1988;
                     Finalizer_Scope_1989;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Top_Level_With_Package_Clauses;
--# end
--# property-start AdaNode.use_clauses_in_spec_of_subp_body ada/nodes.lkt:1430
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Use_Clauses_In_Spec_Of_Subp_Body
  (Node : Bare_Ada_Node
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_95 with Inline_Always;
            procedure Finalizer_Scope_1991 with Inline_Always;
            procedure Finalizer_Scope_1992 with Inline_Always;
            procedure Finalizer_Scope_1993 with Inline_Always;
      Local_Fqn : Symbol_Type_Array_Access;
Local_Spec : Bare_Compilation_Unit;
Var_Expr_24 : Bare_Compilation_Unit;
Var_Expr_25 : Bare_Basic_Decl;
Fld : Bare_Compilation_Unit;
Fld_1 : Symbol_Type_Array_Access;
Fld_2 : Bare_Compilation_Unit;
Fld_3 : Bare_Basic_Decl;
Fld_4 : Bare_Use_Clause_Array_Access;
As_Entity : Internal_Entity_Use_Clause;
Is_Null : Boolean;
If_Result : Internal_Entity_Use_Clause;
Fld_5 : Lexical_Env := Empty_Env;
Map_Result : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
Let_Result_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_95 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Fqn);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_95;
            procedure Finalizer_Scope_1991 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1991;
            procedure Finalizer_Scope_1992 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_1992;
            procedure Finalizer_Scope_1993 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_1993;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 751 '<Let at nodes.lkt:1431:9>' Let_Result_1 ada/nodes.lkt:1431
--# scope-start
--# expr-start 742 '<FieldAccess for syntactic_fully_qualified_name at nodes.lkt:1432:13>' Fld_1 ada/nodes.lkt:1432
--# expr-start 741 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:1432:13>' Fld ada/nodes.lkt:1432
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Self);
--# end
--# expr-done 741
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.syntactic_fully_qualified_name
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Syntactic_Fully_Qualified_Name (Node => Fld);
--# end
--# expr-done 742
Local_Fqn := Fld_1; Inc_Ref (Local_Fqn);
--# bind fqn Local_Fqn
--# expr-start 750 '<Let at nodes.lkt:1433:9>' Let_Result ada/nodes.lkt:1433
--# scope-start
--# expr-start 743 '<FieldAccess for designated_compilation_unit at nodes.lkt:1434:13>' Fld_2 ada/nodes.lkt:1434
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.designated_compilation_unit
Fld_2 := Libadalang.Implementation.Ada_Node_P_Designated_Compilation_Unit (Node => Self, Name => Local_Fqn, Kind => Unit_Specification, Not_Found_Is_Error => False);
--# end
--# expr-done 743
Local_Spec := Fld_2; 
--# bind spec Local_Spec
Var_Expr_24 := Local_Spec;
if Var_Expr_24 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 744 '<FieldAccess for decl at nodes.lkt:1440:9>' Fld_3 ada/nodes.lkt:1440
      if Var_Expr_24 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_3 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Var_Expr_24);
--# end
--# expr-done 744
Var_Expr_25 := Fld_3;
if Var_Expr_25 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 749 '<env_group at nodes.lkt:1440:9>' Group_Env ada/nodes.lkt:1440
--# expr-start 748 '<Map at nodes.lkt:1440:9>' Map_Result ada/nodes.lkt:1440
   --# expr-start 745 '<FieldAccess for top_level_use_clauses at nodes.lkt:1440:9>' Fld_4 ada/nodes.lkt:1440
      if Var_Expr_25 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_clauses
Fld_4 := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Clauses (Node => Var_Expr_25);
--# end
--# expr-done 745
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Use_Clause_Array_Access := Fld_4;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind clause Item_0
      --# expr-start 747 '<FieldAccess for used_envs at nodes.lkt:1441:25>' Fld_5 ada/nodes.lkt:1441
--# expr-start 746 '<as_bare_entity at nodes.lkt:1441:25>' If_Result ada/nodes.lkt:1441
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Use_Clause;
else
As_Entity := (Info => No_Entity_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 746
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UseClause.used_envs
Fld_5 := Libadalang.Implementation.Use_Clause_P_Used_Envs (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 747
         declare
            Item_To_Append : constant Lexical_Env := Fld_5;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_1993;
         end loop;
      end;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 748
Group_Env := Group (Map_Result, No_Metadata); 
--# expr-done 749
Scope_Result := Group_Env;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_1992;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_Env;
end if;
      Inc_Ref (Result_Var);
Scope_Result_1 := Result_Var;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_1991;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Empty_Env;
end if;
      Inc_Ref (Result_Var_1);
Let_Result := Result_Var_1; Inc_Ref (Let_Result);
--# end
--# expr-done 750
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 751
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_95;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_95;
                     Finalizer_Scope_1991;
                     Finalizer_Scope_1992;
                     Finalizer_Scope_1993;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Use_Clauses_In_Spec_Of_Subp_Body;
--# end
--# property-start AdaNode.use_clauses_in_generic_formal_part ada/nodes.lkt:1451
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Use_Clauses_In_Generic_Formal_Part
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_96 with Inline_Always;
            procedure Finalizer_Scope_1995 with Inline_Always;
      Local_Gen_Decl : Internal_Entity_Generic_Decl;
Var_Expr_0 : Internal_Entity_Generic_Decl;
Var_Expr_26 : Internal_Entity_Body_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Body_Node;
Fld : Internal_Entity_Generic_Decl;
Scope_Result : Internal_Entity_Generic_Decl;
Result_Var : Internal_Entity_Generic_Decl;
Fld_1 : Internal_Entity_Generic_Formal_Part;
Fld_2 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Fld_3 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_96 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_96;
            procedure Finalizer_Scope_1995 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1995;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 757 '<Let at nodes.lkt:1452:9>' Let_Result ada/nodes.lkt:1452
--# scope-start
--# expr-start 752 '<Cast to Body at nodes.lkt:1452:24>' Cast_Result ada/nodes.lkt:1452
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Body_Node
   then
      Cast_Result := Create_Internal_Entity_Body_Node
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Body_Node;
   end if;
--# expr-done 752
Var_Expr_26 := Cast_Result;
if Var_Expr_26 /= No_Entity_Body_Node then
   --# scope-start
--# expr-start 753 '<FieldAccess for safe_generic_decl_part at nodes.lkt:1452:24>' Fld ada/nodes.lkt:1452
      if Var_Expr_26.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.safe_generic_decl_part
Fld := Libadalang.Implementation.Body_Node_P_Safe_Generic_Decl_Part (Node => Var_Expr_26.Node, E_Info => Var_Expr_26.Info);
--# end
--# expr-done 753
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Generic_Decl;
end if;
Local_Gen_Decl := Result_Var; 
--# bind gen_decl Local_Gen_Decl
Var_Expr_0 := Local_Gen_Decl;
if Var_Expr_0 /= No_Entity_Generic_Decl then
   --# scope-start
   --# bind gd Var_Expr_0
--# expr-start 755 '<FieldAccess for use_clauses_envs at nodes.lkt:1455:21>' Fld_2 ada/nodes.lkt:1455
--# expr-start 754 '<FieldAccess for formal_part at nodes.lkt:1455:21>' Fld_1 ada/nodes.lkt:1455
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Generic_Formal_Part (Node => Var_Expr_0.Node.Generic_Decl_F_Formal_Part, Info => Var_Expr_0.Info);
--# expr-done 754
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericFormalPart.use_clauses_envs
Fld_2 := Libadalang.Implementation.Generic_Formal_Part_P_Use_Clauses_Envs (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 755
Scope_Result_1 := Fld_2;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_1995;
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 756 '<FieldAccess for empty_env at nodes.lkt:1456:25>' Fld_3 ada/nodes.lkt:1456
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.empty_env
Fld_3 := Libadalang.Implementation.Ada_Node_P_Empty_Env (Node => Self);
--# end
--# expr-done 756
   Result_Var_1 := Fld_3;
end if;
      Inc_Ref (Result_Var_1);
Let_Result := Result_Var_1; Inc_Ref (Let_Result);
--# end
--# expr-done 757
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_96;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_96;
                     Finalizer_Scope_1995;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Use_Clauses_In_Generic_Formal_Part;
--# end
--# property-start AdaNode.nested_generic_formal_part ada/nodes.lkt:1471
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Nested_Generic_Formal_Part
  (Node : Bare_Ada_Node
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_97 with Inline_Always;
            procedure Finalizer_Scope_1997 with Inline_Always;
      Local_Gen_Decl : Internal_Entity_Generic_Decl;
Var_Expr_0 : Internal_Entity_Generic_Decl;
Var_Expr_27 : Internal_Entity_Body_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Cast_Result : Internal_Entity_Body_Node;
Fld : Internal_Entity_Generic_Decl;
Scope_Result : Internal_Entity_Generic_Decl;
Result_Var : Internal_Entity_Generic_Decl;
Fld_1 : Bare_Generic_Decl;
Fld_2 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Fld_3 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_97 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_97;
            procedure Finalizer_Scope_1997 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1997;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 764 '<Let at nodes.lkt:1472:9>' Let_Result ada/nodes.lkt:1472
--# scope-start
--# expr-start 759 '<Cast to Body at nodes.lkt:1472:24>' Cast_Result ada/nodes.lkt:1472
--# expr-start 758 '<as_bare_entity at nodes.lkt:1472:24>' If_Result ada/nodes.lkt:1472
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 758
   if If_Result.Node = null
      or else If_Result.Node.Kind in Ada_Body_Node
   then
      Cast_Result := Create_Internal_Entity_Body_Node
        (Node => If_Result.Node,
         Info => If_Result.Info);
   else
         Cast_Result := No_Entity_Body_Node;
   end if;
--# expr-done 759
Var_Expr_27 := Cast_Result;
if Var_Expr_27 /= No_Entity_Body_Node then
   --# scope-start
--# expr-start 760 '<FieldAccess for safe_generic_decl_part at nodes.lkt:1472:24>' Fld ada/nodes.lkt:1472
      if Var_Expr_27.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.safe_generic_decl_part
Fld := Libadalang.Implementation.Body_Node_P_Safe_Generic_Decl_Part (Node => Var_Expr_27.Node, E_Info => Var_Expr_27.Info);
--# end
--# expr-done 760
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Generic_Decl;
end if;
Local_Gen_Decl := Result_Var; 
--# bind gen_decl Local_Gen_Decl
Var_Expr_0 := Local_Gen_Decl;
if Var_Expr_0 /= No_Entity_Generic_Decl then
   --# scope-start
   --# bind gd Var_Expr_0
--# expr-start 762 '<FieldAccess for children_env at nodes.lkt:1474:29>' Fld_2 ada/nodes.lkt:1474
--# expr-start 761 '<FieldAccess for node at nodes.lkt:1474:29>' Fld_1 ada/nodes.lkt:1474
Fld_1 := Var_Expr_0.Node;
--# expr-done 761
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Fld_1);
--# expr-done 762
Scope_Result_1 := Fld_2;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_1997;
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 763 '<FieldAccess for empty_env at nodes.lkt:1474:63>' Fld_3 ada/nodes.lkt:1474
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.empty_env
Fld_3 := Libadalang.Implementation.Ada_Node_P_Empty_Env (Node => Self);
--# end
--# expr-done 763
   Result_Var_1 := Fld_3;
end if;
      Inc_Ref (Result_Var_1);
Let_Result := Result_Var_1; Inc_Ref (Let_Result);
--# end
--# expr-done 764
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_97;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_97;
                     Finalizer_Scope_1997;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Nested_Generic_Formal_Part;
--# end
--# property-start AdaNode.is_package ada/nodes.lkt:1478
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Is_Package
  (Node : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
      Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 765 '<IsA PackageDecl, PackageBody, GenericPackageInstantiation, PackageRenamingDecl, GenericPackageDecl at nodes.lkt:1479:9>' Is_A ada/nodes.lkt:1479
Is_A := Self /= null 
and then Self.Kind in Ada_Package_Decl_Range | Ada_Package_Body_Range | Ada_Generic_Package_Instantiation_Range | Ada_Package_Renaming_Decl_Range | Ada_Generic_Package_Decl_Range; 
--# expr-done 765
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Is_Package;
--# end
--# property-start AdaNode.default_initial_env ada/nodes.lkt:1487
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Default_Initial_Env
  (Node : Bare_Ada_Node
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_99 with Inline_Always;
            procedure Finalizer_Scope_1998 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Fld : Bare_Ada_Node;
Fld_1 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Fld_2 : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_99 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_99;
            procedure Finalizer_Scope_1998 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1998;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 766 '<parent at nodes.lkt:1488:9>' Fld ada/nodes.lkt:1488
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 766
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 767 '<FieldAccess for children_env at nodes.lkt:1488:31>' Fld_1 ada/nodes.lkt:1488
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_0);
--# expr-done 767
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_1998;
   Result_Var := Scope_Result;
else
   --# expr-start 768 '<FieldAccess for children_env at nodes.lkt:1488:59>' Fld_2 ada/nodes.lkt:1488
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Self);
--# expr-done 768
   Result_Var := Fld_2;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_99;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_99;
                     Finalizer_Scope_1998;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Default_Initial_Env;
--# end
--# property-start AdaNode.top_level_decl ada/nodes.lkt:1493
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Top_Level_Decl
  (Node : Bare_Ada_Node
      ; Unit : Internal_Unit
  )
   return Bare_Basic_Decl
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind unit Unit
   Property_Result : Bare_Basic_Decl;
      Var_Expr_28 : Internal_Unit;
Fld : Bare_Ada_Node;
Scope_Result : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Fld_1 : Bare_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 771 '<FieldAccess for decl at nodes.lkt:1494:9>' Fld_1 ada/nodes.lkt:1494
--# expr-start 770 '<Cast to CompilationUnit at nodes.lkt:1494:9>' Cast_Result ada/nodes.lkt:1494
Var_Expr_28 := Unit;
if Var_Expr_28 /= null then
   --# scope-start
--# expr-start 769 '<FieldAccess for root at nodes.lkt:1494:9>' Fld ada/nodes.lkt:1494
      if Var_Expr_28 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Var_Expr_28.Ast_Root;
--# expr-done 769
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
   if Result_Var = null
      or else Result_Var.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Result_Var;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 770
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Cast_Result);
--# end
--# expr-done 771
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Top_Level_Decl;
--# end
--# property-start AdaNode.unpack_formals ada/nodes.lkt:1497
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Unpack_Formals
  (Node : Bare_Ada_Node
      ; Formal_Params : Internal_Entity_Base_Formal_Param_Decl_Array_Access
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind formal_params Formal_Params
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_101 with Inline_Always;
      Fld : Internal_Unit;
Fld_1 : Bare_Ada_Node;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_101 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_101;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 774 '<FieldAccess for unpack_formals_impl at nodes.lkt:1500:9>' Fld_2 ada/nodes.lkt:1500
--# expr-start 773 '<FieldAccess for root at nodes.lkt:1500:9>' Fld_1 ada/nodes.lkt:1500
--# expr-start 772 '<FieldAccess for unit at nodes.lkt:1500:9>' Fld ada/nodes.lkt:1500
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 772
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Ast_Root;
--# expr-done 773
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.unpack_formals_impl
Fld_2 := Libadalang.Implementation.Ada_Node_P_Unpack_Formals_Impl (Node => Fld_1, Formal_Params => Formal_Params);
--# end
--# expr-done 774
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_101;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_101;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Unpack_Formals;
--# end
--# property-start AdaNode.unpack_formals_impl ada/nodes.lkt:1502
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Unpack_Formals_Impl
  (Node : Bare_Ada_Node
      ; Formal_Params : Internal_Entity_Base_Formal_Param_Decl_Array_Access
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind formal_params Formal_Params
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_102 with Inline_Always;
            procedure Finalizer_Scope_2000 with Inline_Always;
      Fld : Internal_Entity_Defining_Name_Array_Access;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_102 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_102;
            procedure Finalizer_Scope_2000 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_2000;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 776 '<Mapcat at nodes.lkt:1505:9>' Map_Result ada/nodes.lkt:1505
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Formal_Param_Decl_Array_Access := Formal_Params;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind spec Item_0
      --# expr-start 775 '<FieldAccess for defining_names at nodes.lkt:1505:40>' Fld ada/nodes.lkt:1505
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 775
         for Item_To_Append of
               Fld.Items
         loop
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2000;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 776
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_102;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_102;
                     Finalizer_Scope_2000;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Unpack_Formals_Impl;
--# end
--# property-start AdaNode.match_formals ada/nodes.lkt:1511
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Match_Formals
  (Node : Bare_Ada_Node
      ; Formal_Params : Internal_Entity_Base_Formal_Param_Decl_Array_Access
      ; Params : Internal_Entity_Assoc_List
      ; Is_Dottable_Subp : Boolean
      ; Match_Others : Boolean
         := True
  )
   return Internal_Param_Match_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind formal_params Formal_Params
   --# bind params Params
   --# bind is_dottable_subp Is_Dottable_Subp
   --# bind match_others Match_Others
   Property_Result : Internal_Param_Match_Array_Access;
            procedure Finalizer_Scope_103 with Inline_Always;
            procedure Finalizer_Scope_2001 with Inline_Always;
            procedure Finalizer_Scope_2007 with Inline_Always;
            procedure Finalizer_Scope_2008 with Inline_Always;
      Local_Unpacked_Formals : Internal_Entity_Defining_Name_Array_Access;
Local_Matched_Formals : Internal_Param_Match_Array_Access;
Var_Expr_0 : Internal_Entity_Assoc_List;
Var_Expr_3 : Bare_Base_Id;
Var_Expr_5 : Internal_Entity_Defining_Name;
Local_Idx : Integer;
Var_Expr_6 : Internal_Entity_Defining_Name;
Local_Od_Assoc : Internal_Entity_Basic_Assoc;
Var_Expr_9 : Internal_Entity_Basic_Assoc;
Local_Unmatched_Formals : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Single_Actual_Array_Access;
Index_2 : Integer;
Arith_Result : Integer;
If_Result : Integer;
Get_Result : Internal_Entity_Defining_Name;
New_Struct : Internal_Param_Match;
Scope_Result : Internal_Param_Match;
Result_Var : Internal_Param_Match;
Let_Result : Internal_Param_Match;
Fld_2 : Bare_Base_Id;
Fld_3 : Internal_Entity_Name;
Cast_Expr : Bare_Base_Id;
Cast_Result : Bare_Name;
Fld_4 : Boolean;
Find_Result : Internal_Entity_Defining_Name;
New_Struct_1 : Internal_Param_Match;
Scope_Result_1 : Internal_Param_Match;
Result_Var_1 : Internal_Param_Match;
Scope_Result_2 : Internal_Param_Match;
Result_Var_2 : Internal_Param_Match;
Fld_5 : Bare_Base_Id;
Is_Null : Boolean;
If_Result_1 : Internal_Param_Match;
Map_Result : Internal_Param_Match_Array_Access;
Scope_Result_3 : Internal_Param_Match_Array_Access;
Result_Var_3 : Internal_Param_Match_Array_Access;
Saved : Internal_Entity_Assoc_List;
Fld_6 : Bare_Assoc_List;
Fld_7 : Internal_Entity_Info;
Item_8 : Internal_Entity_Basic_Assoc;
Bare_Item_8 : Bare_Basic_Assoc;
Fld_8 : Bare_Ada_Node_Array_Access;
Get_Result_1 : Bare_Ada_Node;
Is_A : Boolean;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity_Basic_Assoc;
Find_Result_1 : Internal_Entity_Basic_Assoc;
Fld_9 : Internal_Entity_Name;
Fld_10 : Internal_Single_Actual;
Fld_11 : Bare_Base_Id;
Cast_Result_1 : Bare_Name;
Fld_12 : Boolean;
Find_Result_2 : Internal_Param_Match;
Is_Equal : Boolean;
Map_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Fld_13 : Boolean;
Map_Result_2 : Internal_Param_Match_Array_Access;
Cast_Expr_1 : Bare_Identifier;
Cast_Result_2 : Bare_Base_Id;
New_Struct_2 : Internal_Single_Actual;
New_Struct_3 : Internal_Param_Match;
Map_Result_3 : Internal_Param_Match_Array_Access;
Concat_Result : Internal_Param_Match_Array_Access;
Let_Result_1 : Internal_Param_Match_Array_Access;
Scope_Result_4 : Internal_Param_Match_Array_Access;
Result_Var_4 : Internal_Param_Match_Array_Access;
Let_Result_2 : Internal_Param_Match_Array_Access;
Fld_14 : Boolean;
Not_Val : Boolean;
Quantifier_Result : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Internal_Param_Match_Array_Access;
Let_Result_3 : Internal_Param_Match_Array_Access;
Let_Result_4 : Internal_Param_Match_Array_Access;
            procedure Finalizer_Scope_103 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Unpacked_Formals);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Local_Matched_Formals);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_103;
            procedure Finalizer_Scope_2001 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2001;
            procedure Finalizer_Scope_2007 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_2007;
            procedure Finalizer_Scope_2008 is
            begin
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_Unmatched_Formals);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_2008;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 817 '<Let at nodes.lkt:1517:9>' Let_Result_4 ada/nodes.lkt:1517
--# scope-start
--# expr-start 777 '<FieldAccess for unpack_formals at nodes.lkt:1517:32>' Fld ada/nodes.lkt:1517
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.unpack_formals
Fld := Libadalang.Implementation.Ada_Node_P_Unpack_Formals (Node => Self, Formal_Params => Formal_Params);
--# end
--# expr-done 777
Local_Unpacked_Formals := Fld; Inc_Ref (Local_Unpacked_Formals);
--# bind unpacked_formals Local_Unpacked_Formals
--# expr-start 816 '<Let at nodes.lkt:1519:9>' Let_Result_3 ada/nodes.lkt:1519
--# scope-start
Var_Expr_0 := Params;
if Var_Expr_0 /= No_Entity_Assoc_List then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 792 '<Map at nodes.lkt:1522:17>' Map_Result ada/nodes.lkt:1522
   --# expr-start 778 '<FieldAccess for unpacked_params at nodes.lkt:1522:17>' Fld_1 ada/nodes.lkt:1522
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.unpacked_params
Fld_1 := Libadalang.Implementation.Assoc_List_P_Unpacked_Params (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 778
      declare
         Map_Result_Vec : Internal_Param_Match_Vectors.Vector;
      begin
         Index_2 := 0;
      declare
         Collection : constant Internal_Single_Actual_Array_Access := Fld_1;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind a Item_1
               --# bind i Index_2
      --# expr-start 791 '<If at nodes.lkt:1524:21>' If_Result_1 ada/nodes.lkt:1524
--# expr-start 780 '<IsNull at nodes.lkt:1524:24>' Is_Null ada/nodes.lkt:1524
--# expr-start 779 '<FieldAccess for name at nodes.lkt:1524:24>' Fld_5 ada/nodes.lkt:1524
Fld_5 := Item_1.Name;
--# expr-done 779
Is_Null := Fld_5 = null; 
--# expr-done 780
if Is_Null then
   --# expr-start 785 '<Let at nodes.lkt:1526:25>' Let_Result ada/nodes.lkt:1526
--# scope-start
--# expr-start 782 '<If at nodes.lkt:1526:35>' If_Result ada/nodes.lkt:1526
if Is_Dottable_Subp then
   --# expr-start 781 '<Arithmetic + at nodes.lkt:1526:60>' Arith_Result ada/nodes.lkt:1526
Arith_Result := (Index_2 + 1); 
--# expr-done 781
   If_Result := Arith_Result;
else
   If_Result := Index_2;
end if;
--# expr-done 782
Local_Idx := If_Result; 
--# bind idx Local_Idx
--# expr-start 783 '<at at nodes.lkt:1530:25>' Get_Result ada/nodes.lkt:1530
Get_Result := Get (Self, Local_Unpacked_Formals, Local_Idx, True); 
--# expr-done 783
Var_Expr_6 := Get_Result;
if Var_Expr_6 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind sp Var_Expr_6
--# expr-start 784 '<New ParamMatch at nodes.lkt:1532:29>' New_Struct ada/nodes.lkt:1532
New_Struct := (Actual => Item_1, Formal => Var_Expr_6, Has_Matched => True); 
--# expr-done 784
Scope_Result := New_Struct;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Param_Match;
end if;
Let_Result := Result_Var; 
--# end
--# expr-done 785
   If_Result_1 := Let_Result;
else
--# expr-start 786 '<FieldAccess for name at nodes.lkt:1539:25>' Fld_2 ada/nodes.lkt:1539
Fld_2 := Item_1.Name;
--# expr-done 786
Var_Expr_3 := Fld_2;
if Var_Expr_3 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind id Var_Expr_3
--# expr-start 789 '<Find at nodes.lkt:1541:29>' Find_Result ada/nodes.lkt:1541
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Local_Unpacked_Formals;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_4
      --# expr-start 788 '<FieldAccess for matches at nodes.lkt:1541:58>' Fld_4 ada/nodes.lkt:1541
--# expr-start 787 '<FieldAccess for name at nodes.lkt:1541:58>' Fld_3 ada/nodes.lkt:1541
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Item_4.Node.Defining_Name_F_Name, Info => Item_4.Info);
--# expr-done 787
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Var_Expr_3; 
      Cast_Result := Cast_Expr;
--# property-call-start Name.matches
Fld_4 := Libadalang.Implementation.Name_P_Matches (Node => Fld_3.Node, N => Cast_Result);
--# end
--# expr-done 788
      if Fld_4 then
         Find_Result := Item_4; 
      end if;
   --# end
               exit when Fld_4;
         end loop;
      end;
--# expr-done 789
Var_Expr_5 := Find_Result;
if Var_Expr_5 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind sp Var_Expr_5
--# expr-start 790 '<New ParamMatch at nodes.lkt:1544:33>' New_Struct_1 ada/nodes.lkt:1544
New_Struct_1 := (Actual => Item_1, Formal => Var_Expr_5, Has_Matched => True); 
--# expr-done 790
Scope_Result_1 := New_Struct_1;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Param_Match;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Param_Match;
end if;
   If_Result_1 := Result_Var_2;
end if;
--# expr-done 791
         declare
            Item_To_Append : constant Internal_Param_Match := If_Result_1;
         begin
            Internal_Param_Match_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
               Index_2 := Index_2 + 1;
         end loop;
      end;
         Map_Result := Create_Internal_Param_Match_Array
           (Items_Count => Natural (Internal_Param_Match_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Match_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Match_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Match_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 792
Scope_Result_3 := Map_Result;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2001;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Internal_Param_Match_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
Local_Matched_Formals := Result_Var_3; Inc_Ref (Local_Matched_Formals);
--# bind matched_formals Local_Matched_Formals
--# expr-start 815 '<If at nodes.lkt:1557:9>' If_Result_4 ada/nodes.lkt:1557
--# expr-start 796 '<BooleanBinaryOp And at nodes.lkt:1557:12>' If_Result_3 ada/nodes.lkt:1557
if Match_Others then
   --# expr-start 795 '<AnyQuantifier at nodes.lkt:1557:29>' Quantifier_Result ada/nodes.lkt:1557
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Local_Matched_Formals;
      begin
         for Item_7 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_7
      --# expr-start 794 '<Not at nodes.lkt:1557:56>' Not_Val ada/nodes.lkt:1557
--# expr-start 793 '<FieldAccess for has_matched at nodes.lkt:1557:60>' Fld_14 ada/nodes.lkt:1557
Fld_14 := Item_7.Has_Matched;
--# expr-done 793
Not_Val := not (Fld_14); 
--# expr-done 794
      Quantifier_Result := Not_Val;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 795
   If_Result_3 := Quantifier_Result;
else
   If_Result_3 := False;
end if;
--# expr-done 796
if If_Result_3 then
   --# expr-start 814 '<Let at nodes.lkt:1559:13>' Let_Result_2 ada/nodes.lkt:1559
--# scope-start
--# expr-start 800 '<Find at nodes.lkt:1560:17>' Find_Result_1 ada/nodes.lkt:1560
Saved := Params; 
Fld_6 := Saved.Node;
      Find_Result_1 := No_Entity_Basic_Assoc;
      if Fld_6 = null then
      Find_Result_1 := No_Entity_Basic_Assoc;
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_6;
      begin
         for Untyped_Item_8 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_8 := Untyped_Item_8; 
Is_Null_1 := Bare_Item_8 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity_Basic_Assoc;
else
Fld_7 := Saved.Info;
As_Entity := (Info => Fld_7, Node => Bare_Item_8); 
   If_Result_2 := As_Entity;
end if;
                  Item_8 := If_Result_2; 
   --# scope-start
               --# bind p Item_8
      --# expr-start 799 '<IsA OthersDesignator at nodes.lkt:1560:36>' Is_A ada/nodes.lkt:1560
--# expr-start 798 '<at at nodes.lkt:1560:36>' Get_Result_1 ada/nodes.lkt:1560
--# expr-start 797 '<FieldAccess for names at nodes.lkt:1560:36>' Fld_8 ada/nodes.lkt:1560
      if Item_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_8 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Item_8.Node);
--# end
--# expr-done 797
Get_Result_1 := Get (Self, Fld_8, 0, True); 
--# expr-done 798
Is_A := Get_Result_1 /= null 
and then Get_Result_1.Kind in Ada_Others_Designator_Range; 
--# expr-done 799
      if Is_A then
         Find_Result_1 := Item_8; 
      end if;
   --# end
      Finalizer_Scope_2007;
               exit when Is_A;
         end loop;
      end;
      end if;
--# expr-done 800
Local_Od_Assoc := Find_Result_1; 
--# bind od_assoc Local_Od_Assoc
Var_Expr_9 := Local_Od_Assoc;
if Var_Expr_9 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind od Var_Expr_9
--# expr-start 813 '<Let at nodes.lkt:1564:21>' Let_Result_1 ada/nodes.lkt:1564
--# scope-start
--# expr-start 807 '<Map at nodes.lkt:1565:25>' Map_Result_1 ada/nodes.lkt:1565
      declare
         Map_Result_1_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Local_Unpacked_Formals;
      begin
         for Item_10 of
               Collection.Items
         loop
   --# scope-start
               --# bind f Item_10
         --# expr-start 806 '<IsNull at nodes.lkt:1567:29>' Is_Equal ada/nodes.lkt:1567
--# expr-start 805 '<Find at nodes.lkt:1567:29>' Find_Result_2 ada/nodes.lkt:1567
      Find_Result_2 := No_Param_Match;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Local_Matched_Formals;
      begin
         for Item_11 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_11
      --# expr-start 804 '<FieldAccess for matches at nodes.lkt:1568:40>' Fld_12 ada/nodes.lkt:1568
--# expr-start 801 '<FieldAccess for name at nodes.lkt:1568:40>' Fld_9 ada/nodes.lkt:1568
      if Item_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Name (Node => Item_10.Node.Defining_Name_F_Name, Info => Item_10.Info);
--# expr-done 801
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 803 '<FieldAccess for name at nodes.lkt:1568:55>' Fld_11 ada/nodes.lkt:1568
--# expr-start 802 '<FieldAccess for actual at nodes.lkt:1568:55>' Fld_10 ada/nodes.lkt:1568
Fld_10 := Item_11.Actual;
--# expr-done 802
Fld_11 := Fld_10.Name;
--# expr-done 803
      Cast_Result_1 := Fld_11;
--# property-call-start Name.matches
Fld_12 := Libadalang.Implementation.Name_P_Matches (Node => Fld_9.Node, N => Cast_Result_1);
--# end
--# expr-done 804
      if Fld_12 then
         Find_Result_2 := Item_11; 
      end if;
   --# end
               exit when Fld_12;
         end loop;
      end;
--# expr-done 805
Is_Equal := Find_Result_2 = No_Param_Match; 
--# expr-done 806
         if Is_Equal then
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_10;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 807
Local_Unmatched_Formals := Map_Result_1; Inc_Ref (Local_Unmatched_Formals);
--# bind unmatched_formals Local_Unmatched_Formals
--# expr-start 809 '<Map at nodes.lkt:1573:21>' Map_Result_2 ada/nodes.lkt:1573
      declare
         Map_Result_2_Vec : Internal_Param_Match_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Local_Matched_Formals;
      begin
         for Item_12 of
               Collection.Items
         loop
   --# scope-start
               --# bind mf Item_12
         --# expr-start 808 '<FieldAccess for has_matched at nodes.lkt:1573:52>' Fld_13 ada/nodes.lkt:1573
Fld_13 := Item_12.Has_Matched;
--# expr-done 808
         if Fld_13 then
         declare
            Item_To_Append : constant Internal_Param_Match := Item_12;
         begin
            Internal_Param_Match_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Param_Match_Array
           (Items_Count => Natural (Internal_Param_Match_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Param_Match_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Param_Match_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Param_Match_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 809
--# expr-start 812 '<Map at nodes.lkt:1574:23>' Map_Result_3 ada/nodes.lkt:1574
      declare
         Map_Result_3_Vec : Internal_Param_Match_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Local_Unmatched_Formals;
      begin
         for Item_13 of
               Collection.Items
         loop
   --# scope-start
               --# bind uf Item_13
      --# expr-start 811 '<New ParamMatch at nodes.lkt:1576:25>' New_Struct_3 ada/nodes.lkt:1576
--# expr-start 810 '<New SingleActual at nodes.lkt:1578:36>' New_Struct_2 ada/nodes.lkt:1578
Cast_Expr_1 := No_Bare_Ada_Node; 
      Cast_Result_2 := Cast_Expr_1;
New_Struct_2 := (Assoc => Var_Expr_9, Name => Cast_Result_2); 
--# expr-done 810
New_Struct_3 := (Actual => New_Struct_2, Formal => Item_13, Has_Matched => True); 
--# expr-done 811
         declare
            Item_To_Append : constant Internal_Param_Match := New_Struct_3;
         begin
            Internal_Param_Match_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_3 := Create_Internal_Param_Match_Array
           (Items_Count => Natural (Internal_Param_Match_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Param_Match_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Param_Match_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Param_Match_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 812
Concat_Result := Concat (Map_Result_2, Map_Result_3); 
Let_Result_1 := Concat_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 813
Scope_Result_4 := Let_Result_1;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2008;
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := Local_Matched_Formals;
end if;
      Inc_Ref (Result_Var_4);
Let_Result_2 := Result_Var_4; Inc_Ref (Let_Result_2);
--# end
--# expr-done 814
   If_Result_4 := Let_Result_2;
else
   If_Result_4 := Local_Matched_Formals;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 815
Let_Result_3 := If_Result_4; Inc_Ref (Let_Result_3);
--# end
--# expr-done 816
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 817
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_103;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_103;
                     Finalizer_Scope_2001;
                     Finalizer_Scope_2007;
                     Finalizer_Scope_2008;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Match_Formals;
--# end
--# property-start AdaNode.choice_match ada/nodes.lkt:1603
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Choice_Match
  (Node : Bare_Ada_Node
      ; Value : Big_Integer_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind value Value
   Property_Result : Boolean;
            procedure Finalizer_Scope_2014 with Inline_Always;
            procedure Finalizer_Scope_2015 with Inline_Always;
            procedure Finalizer_Scope_2017 with Inline_Always;
            procedure Finalizer_Scope_2019 with Inline_Always;
            procedure Finalizer_Scope_2020 with Inline_Always;
      Match_0 : Internal_Entity_Bin_Op;
Match_1 : Internal_Entity_Name;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Discrete_Range;
Local_Edr : Internal_Eval_Discrete_Range := No_Eval_Discrete_Range;
Match_2 : Internal_Entity_Subtype_Indication;
Var_Expr_2 : Internal_Discrete_Range;
Local_Edr_1 : Internal_Eval_Discrete_Range := No_Eval_Discrete_Range;
Match_3 : Internal_Entity_Expr;
Match_4 : Internal_Entity_Others_Designator;
Match_5 : Internal_Entity;
Fld : Internal_Entity_Expr;
Fld_1 : Big_Integer_Type;
Comp_Result : Boolean;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Big_Integer_Type;
Comp_Result_1 : Boolean;
If_Result : Boolean;
Fld_4 : Big_Integer_Type;
Is_Equal : Boolean;
Fld_5 : Internal_Entity_Op;
Is_A : Boolean;
If_Result_1 : Boolean;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Internal_Discrete_Range;
Fld_8 : Internal_Eval_Discrete_Range := No_Eval_Discrete_Range;
Fld_9 : Big_Integer_Type;
Comp_Result_2 : Boolean;
Fld_10 : Big_Integer_Type;
Comp_Result_3 : Boolean;
If_Result_2 : Boolean;
Let_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Bound_Origin : Bare_Ada_Node;
Bound_Imprecise_Fallback : Boolean;
Fld_11 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Dyn_Var_Bind_Result_1 : Boolean;
If_Result_3 : Boolean;
Scope_Result_1 : Boolean;
Fld_12 : Big_Integer_Type;
Is_Equal_1 : Boolean;
Result_Var_1 : Boolean;
Fld_13 : Internal_Discrete_Range;
Fld_14 : Internal_Eval_Discrete_Range := No_Eval_Discrete_Range;
Fld_15 : Big_Integer_Type;
Comp_Result_4 : Boolean;
Fld_16 : Big_Integer_Type;
Comp_Result_5 : Boolean;
If_Result_4 : Boolean;
Let_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Bound_Origin_1 : Bare_Ada_Node;
Bound_Imprecise_Fallback_1 : Boolean;
Fld_17 : Internal_Entity_Base_Type_Decl;
Fld_18 : Boolean;
Dyn_Var_Bind_Result_2 : Boolean;
Dyn_Var_Bind_Result_3 : Boolean;
If_Result_5 : Boolean;
Fld_19 : Big_Integer_Type;
Is_Equal_2 : Boolean;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Bin_Op;
Let_Result_2 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_1 : Internal_Entity_Name;
Let_Result_3 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_2 : Internal_Entity_Subtype_Indication;
Let_Result_4 : Boolean;
Scope_Result_5 : Boolean;
Cast_Result_3 : Internal_Entity_Expr;
Let_Result_5 : Boolean;
Scope_Result_6 : Boolean;
Cast_Result_4 : Internal_Entity_Others_Designator;
Let_Result_6 : Boolean;
Scope_Result_7 : Boolean;
Cast_Result_5 : Internal_Entity;
Let_Result_7 : Boolean;
Scope_Result_8 : Boolean;
Match_Result : Boolean;
            procedure Finalizer_Scope_2014 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_2014;
            procedure Finalizer_Scope_2015 is
            begin
                     Dec_Ref (Fld_12);
            end Finalizer_Scope_2015;
            procedure Finalizer_Scope_2017 is
            begin
                     Dec_Ref (Fld_8);
                     Dec_Ref (Local_Edr);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_2017;
            procedure Finalizer_Scope_2019 is
            begin
                     Dec_Ref (Fld_14);
                     Dec_Ref (Local_Edr_1);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
            end Finalizer_Scope_2019;
            procedure Finalizer_Scope_2020 is
            begin
                     Dec_Ref (Fld_19);
            end Finalizer_Scope_2020;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 854 '<Match at nodes.lkt:1603:45>' Match_Result ada/nodes.lkt:1603
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Bin_Op .. Ada_Relation_Op =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Bin_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind bo Match_0
--# expr-start 827 '<If at nodes.lkt:1608:13>' If_Result_1 ada/nodes.lkt:1608
--# expr-start 819 '<IsA Op.DoubleDot at nodes.lkt:1608:16>' Is_A ada/nodes.lkt:1608
--# expr-start 818 '<FieldAccess for op at nodes.lkt:1608:16>' Fld_5 ada/nodes.lkt:1608
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Op (Node => Match_0.Node.Bin_Op_F_Op, Info => Match_0.Info);
--# expr-done 818
Is_A := Fld_5.Node /= null 
and then Fld_5.Node.Kind in Ada_Op_Double_Dot_Range; 
--# expr-done 819
if Is_A then
   --# expr-start 824 '<BooleanBinaryOp And at nodes.lkt:1610:17>' If_Result ada/nodes.lkt:1610
--# expr-start 821 '<FieldAccess for eval_as_int at nodes.lkt:1610:26>' Fld_1 ada/nodes.lkt:1610
--# expr-start 820 '<FieldAccess for left at nodes.lkt:1610:26>' Fld ada/nodes.lkt:1610
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Match_0.Node.Bin_Op_F_Left, Info => Match_0.Info);
--# expr-done 820
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_1 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 821
Comp_Result := Value >= Fld_1; 
if Comp_Result then
--# expr-start 823 '<FieldAccess for eval_as_int at nodes.lkt:1611:30>' Fld_3 ada/nodes.lkt:1611
--# expr-start 822 '<FieldAccess for right at nodes.lkt:1611:30>' Fld_2 ada/nodes.lkt:1611
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Match_0.Node.Bin_Op_F_Right, Info => Match_0.Info);
--# expr-done 822
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_3 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 823
Comp_Result_1 := Value <= Fld_3; 
   If_Result := Comp_Result_1;
else
   If_Result := False;
end if;
--# expr-done 824
   If_Result_1 := If_Result;
else
   --# expr-start 826 '<Eq at nodes.lkt:1612:18>' Is_Equal ada/nodes.lkt:1612
--# expr-start 825 '<FieldAccess for eval_as_int at nodes.lkt:1612:27>' Fld_4 ada/nodes.lkt:1612
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_4 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 825
Is_Equal := Equivalent (Value, Fld_4); 
--# expr-done 826
   If_Result_1 := Is_Equal;
end if;
--# expr-done 827
Let_Result_2 := If_Result_1; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
      Finalizer_Scope_2014;
            Match_Result := Scope_Result_3; 
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind n Match_1
--# expr-start 828 '<FieldAccess for name_designated_type at nodes.lkt:1617:13>' Fld_6 ada/nodes.lkt:1617
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_6 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 828
Var_Expr_0 := Fld_6;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind dt Var_Expr_0
--# expr-start 838 '<BooleanBinaryOp And at nodes.lkt:1619:17>' If_Result_3 ada/nodes.lkt:1619
--# expr-start 829 '<FieldAccess for discrete_range at nodes.lkt:1619:17>' Fld_7 ada/nodes.lkt:1619
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discrete_range'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discrete_Range (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 829
Var_Expr_1 := Fld_7;
if Var_Expr_1 /= No_Discrete_Range then
   --# scope-start
   --# bind dr Var_Expr_1
--# expr-start 834 '<Let at nodes.lkt:1621:25>' Let_Result ada/nodes.lkt:1621
--# scope-start
--# expr-start 830 '<FieldAccess for eval_discrete_range at nodes.lkt:1621:35>' Fld_8 ada/nodes.lkt:1621
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.eval_discrete_range
Fld_8 := Libadalang.Implementation.Ada_Node_P_Eval_Discrete_Range (Node => Self, Dr => Var_Expr_1);
--# end
--# expr-done 830
Local_Edr := Fld_8; Inc_Ref (Local_Edr);
--# bind edr Local_Edr
--# expr-start 833 '<BooleanBinaryOp And at nodes.lkt:1623:25>' If_Result_2 ada/nodes.lkt:1623
--# expr-start 831 '<FieldAccess for low_bound at nodes.lkt:1623:34>' Fld_9 ada/nodes.lkt:1623
Fld_9 := Local_Edr.Low_Bound;
Inc_Ref (Fld_9);
--# expr-done 831
Comp_Result_2 := Value >= Fld_9; 
if Comp_Result_2 then
--# expr-start 832 '<FieldAccess for high_bound at nodes.lkt:1623:61>' Fld_10 ada/nodes.lkt:1623
Fld_10 := Local_Edr.High_Bound;
Inc_Ref (Fld_10);
--# expr-done 832
Comp_Result_3 := Value <= Fld_10; 
   If_Result_2 := Comp_Result_3;
else
   If_Result_2 := False;
end if;
--# expr-done 833
Let_Result := If_Result_2; 
--# end
--# expr-done 834
Scope_Result := Let_Result;
   --# end
      Finalizer_Scope_2017;
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
if Result_Var then
   --# expr-start 837 '<bind at nodes.lkt:1628:21>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:1628
Bound_Origin := Self; 
--# expr-start 836 '<bind at nodes.lkt:1629:21>' Dyn_Var_Bind_Result ada/nodes.lkt:1629
Bound_Imprecise_Fallback := False; 
--# expr-start 835 '<FieldAccess for satisfies_type_predicates at nodes.lkt:1631:21>' Fld_11 ada/nodes.lkt:1631
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.satisfies_type_predicates
Fld_11 := Libadalang.Implementation.Base_Type_Decl_P_Satisfies_Type_Predicates (Node => Var_Expr_0.Node, Value => Value, Imprecise_Fallback => Bound_Imprecise_Fallback, Origin => Bound_Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 835
Dyn_Var_Bind_Result := Fld_11; 
--# expr-done 836
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; 
--# expr-done 837
   If_Result_3 := Dyn_Var_Bind_Result_1;
else
   If_Result_3 := False;
end if;
--# expr-done 838
Scope_Result_1 := If_Result_3;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 840 '<Eq at nodes.lkt:1633:29>' Is_Equal_1 ada/nodes.lkt:1633
--# expr-start 839 '<FieldAccess for eval_as_int at nodes.lkt:1633:38>' Fld_12 ada/nodes.lkt:1633
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_12 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 839
Is_Equal_1 := Equivalent (Value, Fld_12); 
--# expr-done 840
   Result_Var_1 := Is_Equal_1;
end if;
Let_Result_3 := Result_Var_1; 
--# end
Scope_Result_4 := Let_Result_3;
   --# end
      Finalizer_Scope_2015;
            Match_Result := Scope_Result_4; 
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind st Match_2
--# expr-start 851 '<BooleanBinaryOp And at nodes.lkt:1638:13>' If_Result_5 ada/nodes.lkt:1638
--# expr-start 841 '<FieldAccess for discrete_range at nodes.lkt:1638:13>' Fld_13 ada/nodes.lkt:1638
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubtypeIndication.discrete_range
Fld_13 := Libadalang.Implementation.Subtype_Indication_P_Discrete_Range (Node => Match_2.Node, E_Info => Match_2.Info);
--# end
--# expr-done 841
Var_Expr_2 := Fld_13;
if Var_Expr_2 /= No_Discrete_Range then
   --# scope-start
   --# bind dr Var_Expr_2
--# expr-start 846 '<Let at nodes.lkt:1640:21>' Let_Result_1 ada/nodes.lkt:1640
--# scope-start
--# expr-start 842 '<FieldAccess for eval_discrete_range at nodes.lkt:1640:31>' Fld_14 ada/nodes.lkt:1640
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.eval_discrete_range
Fld_14 := Libadalang.Implementation.Ada_Node_P_Eval_Discrete_Range (Node => Self, Dr => Var_Expr_2);
--# end
--# expr-done 842
Local_Edr_1 := Fld_14; Inc_Ref (Local_Edr_1);
--# bind edr Local_Edr_1
--# expr-start 845 '<BooleanBinaryOp And at nodes.lkt:1642:21>' If_Result_4 ada/nodes.lkt:1642
--# expr-start 843 '<FieldAccess for low_bound at nodes.lkt:1642:30>' Fld_15 ada/nodes.lkt:1642
Fld_15 := Local_Edr_1.Low_Bound;
Inc_Ref (Fld_15);
--# expr-done 843
Comp_Result_4 := Value >= Fld_15; 
if Comp_Result_4 then
--# expr-start 844 '<FieldAccess for high_bound at nodes.lkt:1642:57>' Fld_16 ada/nodes.lkt:1642
Fld_16 := Local_Edr_1.High_Bound;
Inc_Ref (Fld_16);
--# expr-done 844
Comp_Result_5 := Value <= Fld_16; 
   If_Result_4 := Comp_Result_5;
else
   If_Result_4 := False;
end if;
--# expr-done 845
Let_Result_1 := If_Result_4; 
--# end
--# expr-done 846
Scope_Result_2 := Let_Result_1;
   --# end
      Finalizer_Scope_2019;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := True;
end if;
if Result_Var_2 then
   --# expr-start 850 '<bind at nodes.lkt:1647:17>' Dyn_Var_Bind_Result_3 ada/nodes.lkt:1647
Bound_Origin_1 := Self; 
--# expr-start 849 '<bind at nodes.lkt:1648:17>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:1648
Bound_Imprecise_Fallback_1 := False; 
--# expr-start 848 '<FieldAccess for satisfies_type_predicates at nodes.lkt:1650:17>' Fld_18 ada/nodes.lkt:1650
--# expr-start 847 '<FieldAccess for designated_type at nodes.lkt:1650:17>' Fld_17 ada/nodes.lkt:1650
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_17 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Match_2.Node, Origin => Bound_Origin_1, E_Info => Match_2.Info);
--# end
--# expr-done 847
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.satisfies_type_predicates
Fld_18 := Libadalang.Implementation.Base_Type_Decl_P_Satisfies_Type_Predicates (Node => Fld_17.Node, Value => Value, Imprecise_Fallback => Bound_Imprecise_Fallback_1, Origin => Bound_Origin_1, E_Info => Fld_17.Info);
--# end
--# expr-done 848
Dyn_Var_Bind_Result_2 := Fld_18; 
--# expr-done 849
Dyn_Var_Bind_Result_3 := Dyn_Var_Bind_Result_2; 
--# expr-done 850
   If_Result_5 := Dyn_Var_Bind_Result_3;
else
   If_Result_5 := False;
end if;
--# expr-done 851
Let_Result_4 := If_Result_5; 
--# end
Scope_Result_5 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Abstract_State_Decl_Expr .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_3; 
--# bind e Match_3
--# expr-start 853 '<Eq at nodes.lkt:1654:25>' Is_Equal_2 ada/nodes.lkt:1654
--# expr-start 852 '<FieldAccess for eval_as_int at nodes.lkt:1654:34>' Fld_19 ada/nodes.lkt:1654
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_19 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Match_3.Node, E_Info => Match_3.Info);
--# end
--# expr-done 852
Is_Equal_2 := Equivalent (Value, Fld_19); 
--# expr-done 853
Let_Result_5 := Is_Equal_2; 
--# end
Scope_Result_6 := Let_Result_5;
   --# end
      Finalizer_Scope_2020;
            Match_Result := Scope_Result_6; 
         when Ada_Others_Designator =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Others_Designator
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_4; 
--# bind _ Match_4
Let_Result_6 := True; 
--# end
Scope_Result_7 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_7; 
         when Ada_Abort_Absent .. Ada_Elsif_Stmt_Part | Ada_For_Loop_Iter_Filter .. Ada_Null_Component_Decl | Ada_Overriding_Not_Overriding .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_5; 
--# bind _ Match_5
Let_Result_7 := False; 
--# end
Scope_Result_8 := Let_Result_7;
   --# end
            Match_Result := Scope_Result_8; 
end case;
--# expr-done 854
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2014;
                     Finalizer_Scope_2015;
                     Finalizer_Scope_2017;
                     Finalizer_Scope_2019;
                     Finalizer_Scope_2020;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Choice_Match;
--# end
--# property-start AdaNode.gnat_xref ada/nodes.lkt:1665
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Gnat_Xref
  (Node : Bare_Ada_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_105 with Inline_Always;
      Local_Bd : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Defining_Name;
Local_Dbd : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Entity_Basic_Decl;
Var_Expr_2 : Internal_Entity_Base_Type_Decl;
Var_Expr_3 : Boolean;
Var_Expr_4 : Internal_Entity_Base_Type_Decl;
Local_Pd : Internal_Entity_Basic_Decl;
Var_Expr_5 : Internal_Entity_Basic_Decl;
Var_Expr_7 : Internal_Entity_Subp_Body;
Var_Expr_29 : Internal_Entity_Defining_Name;
Var_Expr : Internal_Entity_Defining_Name;
Var_Expr_6 : Internal_Entity_Defining_Name;
Var_Expr_30 : Internal_Entity_Name;
Var_Expr_8 : Internal_Entity_Defining_Name;
Var_Expr_9 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Bound_Origin : Bare_Ada_Node;
Fld_2 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Defining_Name;
Fld_4 : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Cast_Result_2 : Internal_Entity_Generic_Decl;
Fld_5 : Internal_Entity_Basic_Decl;
Fld_6 : Internal_Entity_Defining_Name;
Cast_Expr_1 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Name;
Fld_7 : Internal_Entity_Defining_Name;
Fld_8 : Internal_Entity_Defining_Name;
Cast_Expr_2 : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity_Discriminant_Spec;
Fld_9 : Internal_Entity_Basic_Decl;
Cast_Expr_3 : Internal_Entity;
Cast_Result_5 : Internal_Entity_Name;
Fld_10 : Internal_Entity_Defining_Name;
Fld_11 : Internal_Entity_Defining_Name;
Scope_Result_1 : Internal_Entity_Defining_Name;
Fld_12 : Internal_Entity_Defining_Name;
Result_Var_1 : Internal_Entity_Defining_Name;
Fld_13 : Internal_Entity_Defining_Name;
Fld_14 : Boolean;
If_Result : Internal_Entity_Defining_Name;
Let_Result : Internal_Entity_Defining_Name;
Cast_Expr_4 : Internal_Entity_Basic_Decl;
Cast_Result_6 : Internal_Entity_Abstract_Subp_Decl;
Fld_15 : Internal_Entity_Base_Subp_Spec;
Fld_16 : Internal_Entity_Base_Type_Decl;
Fld_17 : Internal_Entity_Defining_Name;
Cast_Expr_5 : Internal_Entity_Basic_Decl;
Cast_Result_7 : Internal_Entity_Basic_Subp_Decl;
Fld_18 : Internal_Entity_Base_Subp_Spec;
Fld_19 : Internal_Entity_Base_Type_Decl;
Fld_20 : Boolean;
Fld_21 : Internal_Entity_Base_Type_Decl;
Fld_22 : Internal_Entity_Defining_Name;
Scope_Result_2 : Internal_Entity_Defining_Name;
Result_Var_2 : Internal_Entity_Defining_Name;
Scope_Result_3 : Internal_Entity_Defining_Name;
Fld_23 : Internal_Entity_Defining_Name;
Result_Var_3 : Internal_Entity_Defining_Name;
Scope_Result_4 : Internal_Entity_Defining_Name;
Result_Var_4 : Internal_Entity_Defining_Name;
Scope_Result_5 : Internal_Entity_Defining_Name;
Result_Var_5 : Internal_Entity_Defining_Name;
Cast_Expr_6 : Internal_Entity_Basic_Decl;
Cast_Result_8 : Internal_Entity_Base_Subp_Body;
Fld_24 : Internal_Entity_Subp_Spec;
Fld_25 : Internal_Entity_Defining_Name;
Cast_Expr_7 : Internal_Entity;
Cast_Result_9 : Internal_Entity_Name;
Fld_26 : Internal_Entity_Defining_Name;
Fld_27 : Internal_Entity_Basic_Decl;
Cast_Expr_8 : Internal_Entity_Basic_Decl;
Cast_Result_10 : Internal_Entity_Param_Spec;
Fld_28 : Internal_Entity_Defining_Name;
Cast_Expr_9 : Internal_Entity_Basic_Decl;
Cast_Result_11 : Internal_Entity_Object_Decl;
Cast_Expr_10 : Internal_Entity;
Cast_Result_12 : Internal_Entity_Name;
Fld_29 : Symbol_Type;
Fld_30 : Internal_Entity_Basic_Decl;
Fld_31 : Internal_Entity_Defining_Name;
Scope_Result_6 : Internal_Entity_Defining_Name;
Result_Var_6 : Internal_Entity_Defining_Name;
Scope_Result_7 : Internal_Entity_Defining_Name;
Result_Var_7 : Internal_Entity_Defining_Name;
Cast_Expr_11 : Internal_Entity_Basic_Decl;
Cast_Result_13 : Internal_Entity_Body_Node;
Fld_32 : Internal_Entity_Basic_Decl;
Scope_Result_8 : Internal_Entity_Basic_Decl;
Result_Var_8 : Internal_Entity_Basic_Decl;
Fld_33 : Internal_Entity_Defining_Name;
Fld_34 : Internal_Entity;
Cast_Result_14 : Internal_Entity_Basic_Decl;
Fld_35 : Internal_Entity_Defining_Name;
Is_A_1 : Boolean;
Sym : Symbol_Type;
Fld_36 : Boolean;
If_Result_1 : Boolean;
Fld_37 : Internal_Entity;
Is_A_2 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Internal_Entity_Defining_Name;
Is_A_3 : Boolean;
If_Result_4 : Internal_Entity_Defining_Name;
Is_A_4 : Boolean;
If_Result_5 : Internal_Entity_Defining_Name;
Is_A_5 : Boolean;
If_Result_6 : Internal_Entity_Defining_Name;
Let_Result_1 : Internal_Entity_Defining_Name;
Scope_Result_9 : Internal_Entity_Defining_Name;
Result_Var_9 : Internal_Entity_Defining_Name;
Scope_Result_10 : Internal_Entity_Defining_Name;
Result_Var_10 : Internal_Entity_Defining_Name;
Is_A_6 : Boolean;
If_Result_7 : Internal_Entity_Defining_Name;
Is_A_7 : Boolean;
If_Result_8 : Internal_Entity_Defining_Name;
Is_A_8 : Boolean;
If_Result_9 : Internal_Entity_Defining_Name;
Is_A_9 : Boolean;
If_Result_10 : Internal_Entity_Defining_Name;
Is_A_10 : Boolean;
Cast_Expr_12 : Internal_Entity_Basic_Decl;
Cast_Result_15 : Internal_Entity_Object_Decl;
Fld_38 : Internal_Entity_Constant_Node;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result_11 : Boolean;
Fld_39 : Boolean;
If_Result_12 : Boolean;
If_Result_13 : Internal_Entity_Defining_Name;
Fld_40 : Internal_Entity;
Is_A_11 : Boolean;
Scope_Result_11 : Boolean;
Result_Var_11 : Boolean;
If_Result_14 : Internal_Entity_Defining_Name;
Is_A_12 : Boolean;
Fld_41 : Internal_Entity;
Is_A_13 : Boolean;
Fld_42 : Internal_Entity;
Cast_Result_16 : Internal_Entity_Subp_Body;
Fld_43 : Internal_Entity_Basic_Decl;
Is_Null_1 : Boolean;
Scope_Result_12 : Boolean;
Result_Var_12 : Boolean;
If_Result_15 : Boolean;
If_Result_16 : Boolean;
If_Result_17 : Internal_Entity_Defining_Name;
Dyn_Var_Bind_Result : Internal_Entity_Defining_Name;
Let_Result_2 : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_105 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_105;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 956 '<Let at nodes.lkt:1666:9>' Let_Result_2 ada/nodes.lkt:1666
--# scope-start
--# expr-start 856 '<FieldAccess for enclosing_defining_name at nodes.lkt:1666:18>' Fld ada/nodes.lkt:1666
--# expr-start 855 '<Cast to Name at nodes.lkt:1666:18>' Cast_Result ada/nodes.lkt:1666
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 855
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.enclosing_defining_name
Fld := Libadalang.Implementation.Name_P_Enclosing_Defining_Name (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 856
Var_Expr_29 := Fld;
if Var_Expr_29 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 857 '<FieldAccess for basic_decl at nodes.lkt:1666:18>' Fld_1 ada/nodes.lkt:1666
      if Var_Expr_29.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Var_Expr_29.Node, E_Info => Var_Expr_29.Info);
--# end
--# expr-done 857
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
Local_Bd := Result_Var; 
--# bind bd Local_Bd
--# expr-start 955 '<bind at nodes.lkt:1668:9>' Dyn_Var_Bind_Result ada/nodes.lkt:1668
Bound_Origin := Self; 
--# expr-start 954 '<If at nodes.lkt:1670:9>' If_Result_17 ada/nodes.lkt:1670
--# expr-start 866 '<BooleanBinaryOp And at nodes.lkt:1671:13>' If_Result_16 ada/nodes.lkt:1671
--# expr-start 858 '<IsA ParamSpec at nodes.lkt:1671:13>' Is_A_12 ada/nodes.lkt:1671
Is_A_12 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Param_Spec_Range; 
--# expr-done 858
if Is_A_12 then
   --# expr-start 865 '<BooleanBinaryOp Or at nodes.lkt:1673:17>' If_Result_15 ada/nodes.lkt:1673
--# expr-start 860 '<IsA BasicSubpDecl, ExprFunction, BaseTypeDecl, SubpBodyStub, NullSubpDecl at nodes.lkt:1673:17>' Is_A_13 ada/nodes.lkt:1673
--# expr-start 859 '<FieldAccess for semantic_parent at nodes.lkt:1673:17>' Fld_41 ada/nodes.lkt:1673
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_41 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 859
Is_A_13 := Fld_41.Node /= null 
and then Fld_41.Node.Kind in Ada_Basic_Subp_Decl | Ada_Expr_Function_Range | Ada_Base_Type_Decl | Ada_Subp_Body_Stub_Range | Ada_Null_Subp_Decl_Range; 
--# expr-done 860
if Is_A_13 then
   If_Result_15 := True;
else
--# expr-start 862 '<Cast to SubpBody at nodes.lkt:1678:20>' Cast_Result_16 ada/nodes.lkt:1678
--# expr-start 861 '<FieldAccess for semantic_parent at nodes.lkt:1678:20>' Fld_42 ada/nodes.lkt:1678
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_42 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 861
   if Fld_42.Node = null
      or else Fld_42.Node.Kind in Ada_Subp_Body_Range
   then
      Cast_Result_16 := Create_Internal_Entity_Subp_Body
        (Node => Fld_42.Node,
         Info => Fld_42.Info);
   else
         Cast_Result_16 := No_Entity_Subp_Body;
   end if;
--# expr-done 862
Var_Expr_7 := Cast_Result_16;
if Var_Expr_7 /= No_Entity_Subp_Body then
   --# scope-start
   --# bind body Var_Expr_7
--# expr-start 864 '<IsNull at nodes.lkt:1679:31>' Is_Null_1 ada/nodes.lkt:1679
--# expr-start 863 '<FieldAccess for previous_part_for_decl at nodes.lkt:1679:31>' Fld_43 ada/nodes.lkt:1679
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_decl'
Fld_43 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Decl (Node => Var_Expr_7.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_7.Info);
--# end
--# expr-done 863
Is_Null_1 := Fld_43.Node = null; 
--# expr-done 864
Scope_Result_12 := Is_Null_1;
   --# end
   Result_Var_12 := Scope_Result_12;
else
   Result_Var_12 := False;
end if;
   If_Result_15 := Result_Var_12;
end if;
--# expr-done 865
   If_Result_16 := If_Result_15;
else
   If_Result_16 := False;
end if;
--# expr-done 866
if If_Result_16 then
   --# expr-start 869 '<FieldAccess for defining_name at nodes.lkt:1682:14>' Fld_3 ada/nodes.lkt:1682
--# expr-start 868 '<Cast to BasicDecl at nodes.lkt:1682:14>' Cast_Result_1 ada/nodes.lkt:1682
--# expr-start 867 '<FieldAccess for semantic_parent at nodes.lkt:1682:14>' Fld_2 ada/nodes.lkt:1682
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_2 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 867
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 868
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 869
   If_Result_17 := Fld_3;
else
   --# expr-start 953 '<If at nodes.lkt:1670:9>' If_Result_14 ada/nodes.lkt:1670
Var_Expr_5 := Local_Bd;
if Var_Expr_5 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind v1 Var_Expr_5
--# expr-start 871 '<IsA GenericFormal at nodes.lkt:1683:28>' Is_A_11 ada/nodes.lkt:1683
--# expr-start 870 '<parent at nodes.lkt:1683:28>' Fld_40 ada/nodes.lkt:1683
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_40 := Libadalang.Implementation.Parent (Node => Var_Expr_5.Node, E_Info => Var_Expr_5.Info);
--# expr-done 870
Is_A_11 := Fld_40.Node /= null 
and then Fld_40.Node.Kind in Ada_Generic_Formal; 
--# expr-done 871
Scope_Result_11 := Is_A_11;
   --# end
   Result_Var_11 := Scope_Result_11;
else
   Result_Var_11 := False;
end if;
if Result_Var_11 then
   --# expr-start 877 '<FieldAccess for defining_name at nodes.lkt:1685:13>' Fld_6 ada/nodes.lkt:1685
--# expr-start 876 '<FieldAccess for decl at nodes.lkt:1685:13>' Fld_5 ada/nodes.lkt:1685
--# expr-start 875 '<Cast to GenericDecl at nodes.lkt:1685:13>' Cast_Result_2 ada/nodes.lkt:1685
--# expr-start 874 '<Find at nodes.lkt:1685:13>' Find_Result ada/nodes.lkt:1685
   --# expr-start 872 '<FieldAccess for parents at nodes.lkt:1685:13>' Fld_4 ada/nodes.lkt:1685
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Parents (Node => Local_Bd.Node, With_Self => True, E_Info => Local_Bd.Info);
--# expr-done 872
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_4;
      begin
         for Item_6 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_6
      --# expr-start 873 '<IsA GenericDecl at nodes.lkt:1685:38>' Is_A ada/nodes.lkt:1685
Is_A := Item_6.Node /= null 
and then Item_6.Node.Kind in Ada_Generic_Decl; 
--# expr-done 873
      if Is_A then
         Find_Result := Item_6; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 874
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Generic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Generic_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_2 := No_Entity_Generic_Decl;
   end if;
--# expr-done 875
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericDecl.decl'
Fld_5 := Libadalang.Implementation.Dispatcher_Generic_Decl_P_Decl (Node => Cast_Result_2.Node, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 876
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 877
   If_Result_14 := Fld_6;
else
   --# expr-start 952 '<If at nodes.lkt:1670:9>' If_Result_13 ada/nodes.lkt:1670
--# expr-start 885 '<BooleanBinaryOp And at nodes.lkt:1690:13>' If_Result_12 ada/nodes.lkt:1690
--# expr-start 883 '<BooleanBinaryOp And at nodes.lkt:1690:13>' If_Result_11 ada/nodes.lkt:1690
--# expr-start 878 '<IsA ObjectDecl at nodes.lkt:1690:13>' Is_A_10 ada/nodes.lkt:1690
Is_A_10 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Object_Decl_Range; 
--# expr-done 878
if Is_A_10 then
   --# expr-start 882 '<Not at nodes.lkt:1691:17>' Not_Val ada/nodes.lkt:1691
--# expr-start 881 '<IsNull at nodes.lkt:1691:21>' Is_Null ada/nodes.lkt:1691
--# expr-start 880 '<FieldAccess for has_constant at nodes.lkt:1691:21>' Fld_38 ada/nodes.lkt:1691
--# expr-start 879 '<Cast to ObjectDecl at nodes.lkt:1691:21>' Cast_Result_15 ada/nodes.lkt:1691
Cast_Expr_12 := Local_Bd; 
   if Cast_Expr_12.Node = null
      or else Cast_Expr_12.Node.Kind in Ada_Object_Decl_Range
   then
      Cast_Result_15 := Create_Internal_Entity_Object_Decl
        (Node => Cast_Expr_12.Node,
         Info => Cast_Expr_12.Info);
   else
         Cast_Result_15 := No_Entity_Object_Decl;
   end if;
--# expr-done 879
      if Cast_Result_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_38 := Create_Internal_Entity_Constant_Node (Node => Cast_Result_15.Node.Object_Decl_F_Has_Constant, Info => Cast_Result_15.Info);
--# expr-done 880
Is_Null := Fld_38.Node = null; 
--# expr-done 881
Not_Val := not (Is_Null); 
--# expr-done 882
   If_Result_11 := Not_Val;
else
   If_Result_11 := False;
end if;
--# expr-done 883
if If_Result_11 then
   --# expr-start 884 '<FieldAccess for is_in_private_part at nodes.lkt:1692:17>' Fld_39 ada/nodes.lkt:1692
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_39 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 884
   If_Result_12 := Fld_39;
else
   If_Result_12 := False;
end if;
--# expr-done 885
if If_Result_12 then
   --# expr-start 888 '<FieldAccess for previous_part at nodes.lkt:1693:14>' Fld_8 ada/nodes.lkt:1693
--# expr-start 887 '<FieldAccess for enclosing_defining_name at nodes.lkt:1693:14>' Fld_7 ada/nodes.lkt:1693
--# expr-start 886 '<Cast to Name at nodes.lkt:1693:14>' Cast_Result_3 ada/nodes.lkt:1693
Cast_Expr_1 := Ent; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Name
   then
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_3 := No_Entity_Name;
   end if;
--# expr-done 886
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.enclosing_defining_name
Fld_7 := Libadalang.Implementation.Name_P_Enclosing_Defining_Name (Node => Cast_Result_3.Node, E_Info => Cast_Result_3.Info);
--# end
--# expr-done 887
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.previous_part
Fld_8 := Libadalang.Implementation.Defining_Name_P_Previous_Part (Node => Fld_7.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_7.Info);
--# end
--# expr-done 888
   If_Result_13 := Fld_8;
else
   --# expr-start 951 '<If at nodes.lkt:1670:9>' If_Result_10 ada/nodes.lkt:1670
--# expr-start 889 '<IsA DiscriminantSpec at nodes.lkt:1703:14>' Is_A_9 ada/nodes.lkt:1703
Is_A_9 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Discriminant_Spec_Range; 
--# expr-done 889
if Is_A_9 then
   --# expr-start 899 '<Let at nodes.lkt:1705:13>' Let_Result ada/nodes.lkt:1705
--# scope-start
--# expr-start 891 '<FieldAccess for parent_decl at nodes.lkt:1705:22>' Fld_9 ada/nodes.lkt:1705
--# expr-start 890 '<Cast to DiscriminantSpec at nodes.lkt:1705:22>' Cast_Result_4 ada/nodes.lkt:1705
Cast_Expr_2 := Local_Bd; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Discriminant_Spec_Range
   then
      Cast_Result_4 := Create_Internal_Entity_Discriminant_Spec
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_4 := No_Entity_Discriminant_Spec;
   end if;
--# expr-done 890
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.parent_decl
Fld_9 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Parent_Decl (Node => Cast_Result_4.Node, E_Info => Cast_Result_4.Info);
--# end
--# expr-done 891
Local_Pd := Fld_9; 
--# bind pd Local_Pd
--# expr-start 898 '<If at nodes.lkt:1707:13>' If_Result ada/nodes.lkt:1707
--# expr-start 892 '<FieldAccess for is_in_private_part at nodes.lkt:1707:16>' Fld_14 ada/nodes.lkt:1707
      if Local_Pd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_14 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Local_Pd.Node, E_Info => Local_Pd.Info);
--# end
--# expr-done 892
if Fld_14 then
--# expr-start 895 '<FieldAccess for previous_part at nodes.lkt:1709:17>' Fld_11 ada/nodes.lkt:1709
--# expr-start 894 '<FieldAccess for enclosing_defining_name at nodes.lkt:1709:17>' Fld_10 ada/nodes.lkt:1709
--# expr-start 893 '<Cast to Name at nodes.lkt:1709:17>' Cast_Result_5 ada/nodes.lkt:1709
Cast_Expr_3 := Ent; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Name
   then
      Cast_Result_5 := Create_Internal_Entity_Name
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_5 := No_Entity_Name;
   end if;
--# expr-done 893
      if Cast_Result_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.enclosing_defining_name
Fld_10 := Libadalang.Implementation.Name_P_Enclosing_Defining_Name (Node => Cast_Result_5.Node, E_Info => Cast_Result_5.Info);
--# end
--# expr-done 894
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.previous_part
Fld_11 := Libadalang.Implementation.Defining_Name_P_Previous_Part (Node => Fld_10.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_10.Info);
--# end
--# expr-done 895
Var_Expr := Fld_11;
if Var_Expr /= No_Entity_Defining_Name then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 896 '<FieldAccess for defining_name at nodes.lkt:1710:21>' Fld_12 ada/nodes.lkt:1710
      if Local_Pd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Local_Pd.Node, E_Info => Local_Pd.Info);
--# end
--# expr-done 896
   Result_Var_1 := Fld_12;
end if;
   If_Result := Result_Var_1;
else
   --# expr-start 897 '<FieldAccess for defining_name at nodes.lkt:1711:18>' Fld_13 ada/nodes.lkt:1711
      if Local_Pd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_13 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Local_Pd.Node, E_Info => Local_Pd.Info);
--# end
--# expr-done 897
   If_Result := Fld_13;
end if;
--# expr-done 898
Let_Result := If_Result; 
--# end
--# expr-done 899
   If_Result_10 := Let_Result;
else
   --# expr-start 950 '<If at nodes.lkt:1670:9>' If_Result_9 ada/nodes.lkt:1670
--# expr-start 900 '<IsA AbstractSubpDecl at nodes.lkt:1713:14>' Is_A_8 ada/nodes.lkt:1713
Is_A_8 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Abstract_Subp_Decl_Range; 
--# expr-done 900
if Is_A_8 then
   --# expr-start 904 '<FieldAccess for defining_name at nodes.lkt:1715:13>' Fld_17 ada/nodes.lkt:1715
--# expr-start 903 '<FieldAccess for primitive_subp_first_type at nodes.lkt:1715:13>' Fld_16 ada/nodes.lkt:1715
--# expr-start 902 '<FieldAccess for subp_decl_spec at nodes.lkt:1715:13>' Fld_15 ada/nodes.lkt:1715
--# expr-start 901 '<Cast to AbstractSubpDecl at nodes.lkt:1715:13>' Cast_Result_6 ada/nodes.lkt:1715
Cast_Expr_4 := Local_Bd; 
   if Cast_Expr_4.Node = null
      or else Cast_Expr_4.Node.Kind in Ada_Abstract_Subp_Decl_Range
   then
      Cast_Result_6 := Create_Internal_Entity_Abstract_Subp_Decl
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
   else
         Cast_Result_6 := No_Entity_Abstract_Subp_Decl;
   end if;
--# expr-done 901
      if Cast_Result_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicSubpDecl.subp_decl_spec'
Fld_15 := Libadalang.Implementation.Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec (Node => Cast_Result_6.Node, E_Info => Cast_Result_6.Info);
--# end
--# expr-done 902
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.primitive_subp_first_type
Fld_16 := Libadalang.Implementation.Base_Subp_Spec_P_Primitive_Subp_First_Type (Node => Fld_15.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_15.Info);
--# end
--# expr-done 903
      if Fld_16.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_17 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Fld_16.Node, E_Info => Fld_16.Info);
--# end
--# expr-done 904
   If_Result_9 := Fld_17;
else
   --# expr-start 949 '<If at nodes.lkt:1670:9>' If_Result_8 ada/nodes.lkt:1670
--# expr-start 905 '<IsA BasicSubpDecl at nodes.lkt:1718:14>' Is_A_7 ada/nodes.lkt:1718
Is_A_7 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Basic_Subp_Decl; 
--# expr-done 905
if Is_A_7 then
--# expr-start 908 '<FieldAccess for primitive_subp_first_type at nodes.lkt:1720:13>' Fld_19 ada/nodes.lkt:1720
--# expr-start 907 '<FieldAccess for subp_decl_spec at nodes.lkt:1720:13>' Fld_18 ada/nodes.lkt:1720
--# expr-start 906 '<Cast to BasicSubpDecl at nodes.lkt:1720:13>' Cast_Result_7 ada/nodes.lkt:1720
Cast_Expr_5 := Local_Bd; 
   if Cast_Expr_5.Node = null
      or else Cast_Expr_5.Node.Kind in Ada_Basic_Subp_Decl
   then
      Cast_Result_7 := Create_Internal_Entity_Basic_Subp_Decl
        (Node => Cast_Expr_5.Node,
         Info => Cast_Expr_5.Info);
   else
         Cast_Result_7 := No_Entity_Basic_Subp_Decl;
   end if;
--# expr-done 906
      if Cast_Result_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicSubpDecl.subp_decl_spec'
Fld_18 := Libadalang.Implementation.Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec (Node => Cast_Result_7.Node, E_Info => Cast_Result_7.Info);
--# end
--# expr-done 907
      if Fld_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.primitive_subp_first_type
Fld_19 := Libadalang.Implementation.Base_Subp_Spec_P_Primitive_Subp_First_Type (Node => Fld_18.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_18.Info);
--# end
--# expr-done 908
Var_Expr_2 := Fld_19;
if Var_Expr_2 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind prim_typ Var_Expr_2
--# expr-start 909 '<FieldAccess for is_tagged_type at nodes.lkt:1722:31>' Fld_20 ada/nodes.lkt:1722
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_tagged_type'
Fld_20 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Tagged_Type (Node => Var_Expr_2.Node, Origin => Bound_Origin, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 909
Var_Expr_3 := Fld_20;
if Var_Expr_3 /= False then
   --# scope-start
   --# bind _ Var_Expr_3
--# expr-start 910 '<FieldAccess for private_completion at nodes.lkt:1723:24>' Fld_21 ada/nodes.lkt:1723
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.private_completion
Fld_21 := Libadalang.Implementation.Base_Type_Decl_P_Private_Completion (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 910
Var_Expr_4 := Fld_21;
if Var_Expr_4 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind pc Var_Expr_4
--# expr-start 911 '<FieldAccess for defining_name at nodes.lkt:1724:29>' Fld_22 ada/nodes.lkt:1724
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_22 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_4.Node, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 911
Scope_Result_2 := Fld_22;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Defining_Name;
end if;
Var_Expr_6 := Result_Var_2;
if Var_Expr_6 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind e Var_Expr_6
Scope_Result_3 := Var_Expr_6;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   --# expr-start 912 '<FieldAccess for defining_name at nodes.lkt:1725:23>' Fld_23 ada/nodes.lkt:1725
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_23 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 912
   Result_Var_3 := Fld_23;
end if;
Scope_Result_4 := Result_Var_3;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := No_Entity_Defining_Name;
end if;
Scope_Result_5 := Result_Var_4;
   --# end
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := No_Entity_Defining_Name;
end if;
   If_Result_8 := Result_Var_5;
else
   --# expr-start 948 '<If at nodes.lkt:1670:9>' If_Result_7 ada/nodes.lkt:1670
--# expr-start 913 '<IsA BaseSubpBody at nodes.lkt:1727:14>' Is_A_6 ada/nodes.lkt:1727
Is_A_6 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Base_Subp_Body; 
--# expr-done 913
if Is_A_6 then
   --# expr-start 916 '<FieldAccess for subp_name at nodes.lkt:1728:14>' Fld_25 ada/nodes.lkt:1728
--# expr-start 915 '<FieldAccess for subp_spec at nodes.lkt:1728:14>' Fld_24 ada/nodes.lkt:1728
--# expr-start 914 '<Cast to BaseSubpBody at nodes.lkt:1728:14>' Cast_Result_8 ada/nodes.lkt:1728
Cast_Expr_6 := Local_Bd; 
   if Cast_Expr_6.Node = null
      or else Cast_Expr_6.Node.Kind in Ada_Base_Subp_Body
   then
      Cast_Result_8 := Create_Internal_Entity_Base_Subp_Body
        (Node => Cast_Expr_6.Node,
         Info => Cast_Expr_6.Info);
   else
         Cast_Result_8 := No_Entity_Base_Subp_Body;
   end if;
--# expr-done 914
      if Cast_Result_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Create_Internal_Entity_Subp_Spec (Node => Cast_Result_8.Node.Base_Subp_Body_F_Subp_Spec, Info => Cast_Result_8.Info);
--# expr-done 915
      if Fld_24.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Create_Internal_Entity_Defining_Name (Node => Fld_24.Node.Subp_Spec_F_Subp_Name, Info => Fld_24.Info);
--# expr-done 916
   If_Result_7 := Fld_25;
else
--# expr-start 917 '<Cast to Name at nodes.lkt:1729:14>' Cast_Result_9 ada/nodes.lkt:1729
Cast_Expr_7 := Ent; 
   if Cast_Expr_7.Node = null
      or else Cast_Expr_7.Node.Kind in Ada_Name
   then
      Cast_Result_9 := Create_Internal_Entity_Name
        (Node => Cast_Expr_7.Node,
         Info => Cast_Expr_7.Info);
   else
         Cast_Result_9 := No_Entity_Name;
   end if;
--# expr-done 917
Var_Expr_30 := Cast_Result_9;
if Var_Expr_30 /= No_Entity_Name then
   --# scope-start
--# expr-start 918 '<FieldAccess for gnat_xref_decl at nodes.lkt:1729:14>' Fld_26 ada/nodes.lkt:1729
      if Var_Expr_30.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.gnat_xref_decl
Fld_26 := Libadalang.Implementation.Name_P_Gnat_Xref_Decl (Node => Var_Expr_30.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_30.Info);
--# end
--# expr-done 918
Var_Expr_0 := Fld_26;
if Var_Expr_0 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind ret Var_Expr_0
--# expr-start 947 '<Let at nodes.lkt:1730:13>' Let_Result_1 ada/nodes.lkt:1730
--# scope-start
--# expr-start 919 '<FieldAccess for basic_decl at nodes.lkt:1730:23>' Fld_27 ada/nodes.lkt:1730
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_27 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 919
Local_Dbd := Fld_27; 
--# bind dbd Local_Dbd
--# expr-start 946 '<If at nodes.lkt:1732:13>' If_Result_6 ada/nodes.lkt:1732
--# expr-start 920 '<IsA ParamSpec at nodes.lkt:1732:16>' Is_A_5 ada/nodes.lkt:1732
Is_A_5 := Local_Dbd.Node /= null 
and then Local_Dbd.Node.Kind in Ada_Param_Spec_Range; 
--# expr-done 920
if Is_A_5 then
   --# expr-start 922 '<FieldAccess for decl_param at nodes.lkt:1733:18>' Fld_28 ada/nodes.lkt:1733
--# expr-start 921 '<Cast to ParamSpec at nodes.lkt:1733:18>' Cast_Result_10 ada/nodes.lkt:1733
Cast_Expr_8 := Local_Dbd; 
   if Cast_Expr_8.Node = null
      or else Cast_Expr_8.Node.Kind in Ada_Param_Spec_Range
   then
      Cast_Result_10 := Create_Internal_Entity_Param_Spec
        (Node => Cast_Expr_8.Node,
         Info => Cast_Expr_8.Info);
   else
         Cast_Result_10 := No_Entity_Param_Spec;
   end if;
--# expr-done 921
      if Cast_Result_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.decl_param
Fld_28 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Decl_Param (Node => Cast_Result_10.Node, Param => Var_Expr_0, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result_10.Info);
--# end
--# expr-done 922
   If_Result_6 := Fld_28;
else
   --# expr-start 945 '<If at nodes.lkt:1732:13>' If_Result_5 ada/nodes.lkt:1732
--# expr-start 923 '<IsA ObjectDecl at nodes.lkt:1734:18>' Is_A_4 ada/nodes.lkt:1734
Is_A_4 := Local_Dbd.Node /= null 
and then Local_Dbd.Node.Kind in Ada_Object_Decl_Range; 
--# expr-done 923
if Is_A_4 then
--# expr-start 927 '<FieldAccess for previous_part_for_name at nodes.lkt:1740:17>' Fld_30 ada/nodes.lkt:1740
--# expr-start 924 '<Cast to ObjectDecl at nodes.lkt:1740:17>' Cast_Result_11 ada/nodes.lkt:1740
Cast_Expr_9 := Local_Dbd; 
   if Cast_Expr_9.Node = null
      or else Cast_Expr_9.Node.Kind in Ada_Object_Decl_Range
   then
      Cast_Result_11 := Create_Internal_Entity_Object_Decl
        (Node => Cast_Expr_9.Node,
         Info => Cast_Expr_9.Info);
   else
         Cast_Result_11 := No_Entity_Object_Decl;
   end if;
--# expr-done 924
      if Cast_Result_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 926 '<FieldAccess for name_symbol at nodes.lkt:1741:21>' Fld_29 ada/nodes.lkt:1741
--# expr-start 925 '<Cast to Name at nodes.lkt:1741:21>' Cast_Result_12 ada/nodes.lkt:1741
Cast_Expr_10 := Ent; 
   if Cast_Expr_10.Node = null
      or else Cast_Expr_10.Node.Kind in Ada_Name
   then
      Cast_Result_12 := Create_Internal_Entity_Name
        (Node => Cast_Expr_10.Node,
         Info => Cast_Expr_10.Info);
   else
         Cast_Result_12 := No_Entity_Name;
   end if;
--# expr-done 925
      if Cast_Result_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_29 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Cast_Result_12.Node);
--# end
--# expr-done 926
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_name'
Fld_30 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Name (Node => Cast_Result_11.Node, Sym => Fld_29, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result_11.Info);
--# end
--# expr-done 927
Var_Expr_1 := Fld_30;
if Var_Expr_1 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind ppn Var_Expr_1
--# expr-start 928 '<FieldAccess for defining_name at nodes.lkt:1743:30>' Fld_31 ada/nodes.lkt:1743
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_31 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 928
Scope_Result_6 := Fld_31;
   --# end
   Result_Var_6 := Scope_Result_6;
else
   Result_Var_6 := No_Entity_Defining_Name;
end if;
Var_Expr_8 := Result_Var_6;
if Var_Expr_8 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind e Var_Expr_8
Scope_Result_7 := Var_Expr_8;
   --# end
   Result_Var_7 := Scope_Result_7;
else
   Result_Var_7 := Var_Expr_0;
end if;
   If_Result_5 := Result_Var_7;
else
   --# expr-start 944 '<If at nodes.lkt:1732:13>' If_Result_4 ada/nodes.lkt:1732
--# expr-start 929 '<IsA Body at nodes.lkt:1746:18>' Is_A_3 ada/nodes.lkt:1746
Is_A_3 := Local_Dbd.Node /= null 
and then Local_Dbd.Node.Kind in Ada_Body_Node; 
--# expr-done 929
if Is_A_3 then
   --# expr-start 932 '<FieldAccess for defining_name at nodes.lkt:1747:18>' Fld_33 ada/nodes.lkt:1747
--# expr-start 931 '<FieldAccess for decl_part at nodes.lkt:1747:19>' Fld_32 ada/nodes.lkt:1747
--# expr-start 930 '<Cast to Body at nodes.lkt:1747:19>' Cast_Result_13 ada/nodes.lkt:1747
Cast_Expr_11 := Local_Dbd; 
   if Cast_Expr_11.Node = null
      or else Cast_Expr_11.Node.Kind in Ada_Body_Node
   then
      Cast_Result_13 := Create_Internal_Entity_Body_Node
        (Node => Cast_Expr_11.Node,
         Info => Cast_Expr_11.Info);
   else
         Cast_Result_13 := No_Entity_Body_Node;
   end if;
--# expr-done 930
      if Cast_Result_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_32 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Cast_Result_13.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result_13.Info);
--# end
--# expr-done 931
Var_Expr_9 := Fld_32;
if Var_Expr_9 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind e Var_Expr_9
Scope_Result_8 := Var_Expr_9;
   --# end
   Result_Var_8 := Scope_Result_8;
else
   Result_Var_8 := Local_Dbd;
end if;
      if Result_Var_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_33 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Result_Var_8.Node, E_Info => Result_Var_8.Info);
--# end
--# expr-done 932
   If_Result_4 := Fld_33;
else
   --# expr-start 943 '<If at nodes.lkt:1732:13>' If_Result_3 ada/nodes.lkt:1732
--# expr-start 939 '<BooleanBinaryOp And at nodes.lkt:1749:17>' If_Result_2 ada/nodes.lkt:1749
--# expr-start 936 '<BooleanBinaryOp And at nodes.lkt:1749:17>' If_Result_1 ada/nodes.lkt:1749
--# expr-start 933 '<IsA SyntheticDefiningName at nodes.lkt:1749:17>' Is_A_1 ada/nodes.lkt:1749
Is_A_1 := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Synthetic_Defining_Name_Range; 
--# expr-done 933
if Is_A_1 then
   --# expr-start 935 '<FieldAccess for name_is at nodes.lkt:1750:21>' Fld_36 ada/nodes.lkt:1750
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 934 '<Symbol "/=" at nodes.lkt:1750:33>' Sym ada/nodes.lkt:1750
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 934
--# property-call-start Name.name_is
Fld_36 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_0.Node, Sym => Sym);
--# end
--# expr-done 935
   If_Result_1 := Fld_36;
else
   If_Result_1 := False;
end if;
--# expr-done 936
if If_Result_1 then
   --# expr-start 938 '<IsA BasicDecl at nodes.lkt:1751:21>' Is_A_2 ada/nodes.lkt:1751
--# expr-start 937 '<parent at nodes.lkt:1751:21>' Fld_37 ada/nodes.lkt:1751
      if Local_Dbd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_37 := Libadalang.Implementation.Parent (Node => Local_Dbd.Node, E_Info => Local_Dbd.Info);
--# expr-done 937
Is_A_2 := Fld_37.Node /= null 
and then Fld_37.Node.Kind in Ada_Basic_Decl; 
--# expr-done 938
   If_Result_2 := Is_A_2;
else
   If_Result_2 := False;
end if;
--# expr-done 939
if If_Result_2 then
   --# expr-start 942 '<FieldAccess for defining_name at nodes.lkt:1753:17>' Fld_35 ada/nodes.lkt:1753
--# expr-start 941 '<Cast to BasicDecl at nodes.lkt:1753:17>' Cast_Result_14 ada/nodes.lkt:1753
--# expr-start 940 '<parent at nodes.lkt:1753:17>' Fld_34 ada/nodes.lkt:1753
      if Local_Dbd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_34 := Libadalang.Implementation.Parent (Node => Local_Dbd.Node, E_Info => Local_Dbd.Info);
--# expr-done 940
   if Fld_34.Node = null
      or else Fld_34.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_14 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_34.Node,
         Info => Fld_34.Info);
   else
         Cast_Result_14 := No_Entity_Basic_Decl;
   end if;
--# expr-done 941
      if Cast_Result_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_35 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Cast_Result_14.Node, E_Info => Cast_Result_14.Info);
--# end
--# expr-done 942
   If_Result_3 := Fld_35;
else
   If_Result_3 := Var_Expr_0;
end if;
--# expr-done 943
   If_Result_4 := If_Result_3;
end if;
--# expr-done 944
   If_Result_5 := If_Result_4;
end if;
--# expr-done 945
   If_Result_6 := If_Result_5;
end if;
--# expr-done 946
Let_Result_1 := If_Result_6; 
--# end
--# expr-done 947
Scope_Result_9 := Let_Result_1;
   --# end
   Result_Var_9 := Scope_Result_9;
else
   Result_Var_9 := No_Entity_Defining_Name;
end if;
Scope_Result_10 := Result_Var_9;
   --# end
   Result_Var_10 := Scope_Result_10;
else
   Result_Var_10 := No_Entity_Defining_Name;
end if;
   If_Result_7 := Result_Var_10;
end if;
--# expr-done 948
   If_Result_8 := If_Result_7;
end if;
--# expr-done 949
   If_Result_9 := If_Result_8;
end if;
--# expr-done 950
   If_Result_10 := If_Result_9;
end if;
--# expr-done 951
   If_Result_13 := If_Result_10;
end if;
--# expr-done 952
   If_Result_14 := If_Result_13;
end if;
--# expr-done 953
   If_Result_17 := If_Result_14;
end if;
--# expr-done 954
Dyn_Var_Bind_Result := If_Result_17; 
--# expr-done 955
Let_Result_2 := Dyn_Var_Bind_Result; 
--# end
--# expr-done 956
         Property_Result := Let_Result_2;
   --# end
      Finalizer_Scope_105;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_105;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Gnat_Xref;
--# end
--# property-start AdaNode.env_get_real_from_node ada/nodes.lkt:1762
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Env_Get_Real_From_Node
  (Node : Bare_Ada_Node
      ; From_Node : Bare_Ada_Node
  )
   return Bare_Ada_Node
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind from_node From_Node
   Property_Result : Bare_Ada_Node;
            procedure Finalizer_Scope_106 with Inline_Always;
      Local_C : Bare_Ada_Node;
Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Generic_Instantiation;
As_Entity : Internal_Entity_Generic_Instantiation;
Is_Null : Boolean;
If_Result : Internal_Entity_Generic_Instantiation;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Bare_Defining_Name;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_1 : Bare_Base_Subp_Spec;
As_Entity_1 : Internal_Entity_Base_Subp_Spec;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Subp_Spec;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Bare_Defining_Name;
Cast_Expr_2 : Bare_Ada_Node;
Cast_Result_2 : Bare_Renaming_Clause;
Fld_4 : Bare_Ada_Node;
Is_A_1 : Boolean;
If_Result_2 : Bare_Ada_Node;
Cast_Result_3 : Bare_Ada_Node;
Is_A_2 : Boolean;
If_Result_3 : Bare_Ada_Node;
Cast_Result_4 : Bare_Ada_Node;
Is_A_3 : Boolean;
If_Result_4 : Bare_Ada_Node;
Is_Null_2 : Boolean;
If_Result_5 : Bare_Ada_Node;
Let_Result : Bare_Ada_Node;
Is_Null_3 : Boolean;
If_Result_6 : Bare_Ada_Node;
            procedure Finalizer_Scope_106 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_106;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 980 '<If at nodes.lkt:1763:9>' If_Result_6 ada/nodes.lkt:1763
--# expr-start 957 '<IsNull at nodes.lkt:1763:12>' Is_Null_3 ada/nodes.lkt:1763
Is_Null_3 := From_Node = null; 
--# expr-done 957
if Is_Null_3 then
   If_Result_6 := From_Node;
else
   --# expr-start 979 '<Let at nodes.lkt:1765:13>' Let_Result ada/nodes.lkt:1765
--# scope-start
--# expr-start 960 '<Find at nodes.lkt:1766:17>' Find_Result ada/nodes.lkt:1766
   --# expr-start 958 '<FieldAccess for parents at nodes.lkt:1766:17>' Node_Parents ada/nodes.lkt:1766
      if From_Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (From_Node, True); 
--# expr-done 958
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
      --# expr-start 959 '<IsA GenericInstantiation, BaseSubpSpec, ComponentDecl, RenamingClause at nodes.lkt:1768:21>' Is_A ada/nodes.lkt:1768
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Generic_Instantiation | Ada_Base_Subp_Spec | Ada_Component_Decl_Range | Ada_Renaming_Clause_Range; 
--# expr-done 959
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 960
Local_C := Find_Result; 
--# bind c Local_C
--# expr-start 978 '<If at nodes.lkt:1774:13>' If_Result_5 ada/nodes.lkt:1774
--# expr-start 961 '<IsNull at nodes.lkt:1774:16>' Is_Null_2 ada/nodes.lkt:1774
Is_Null_2 := Local_C = null; 
--# expr-done 961
if Is_Null_2 then
   If_Result_5 := From_Node;
else
   --# expr-start 977 '<If at nodes.lkt:1774:13>' If_Result_4 ada/nodes.lkt:1774
--# expr-start 962 '<IsA GenericInstantiation at nodes.lkt:1775:18>' Is_A_3 ada/nodes.lkt:1775
Is_A_3 := Local_C /= null 
and then Local_C.Kind in Ada_Generic_Instantiation; 
--# expr-done 962
if Is_A_3 then
--# expr-start 966 '<FieldAccess for node at nodes.lkt:1781:17>' Fld_1 ada/nodes.lkt:1781
--# expr-start 965 '<FieldAccess for defining_name at nodes.lkt:1781:17>' Fld ada/nodes.lkt:1781
--# expr-start 964 '<as_bare_entity at nodes.lkt:1781:17>' If_Result ada/nodes.lkt:1781
--# expr-start 963 '<Cast to GenericInstantiation at nodes.lkt:1781:17>' Cast_Result ada/nodes.lkt:1781
Cast_Expr := Local_C; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Generic_Instantiation
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 963
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Generic_Instantiation;
else
As_Entity := (Info => No_Entity_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 964
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 965
Fld_1 := Fld.Node;
--# expr-done 966
      Cast_Result_4 := Fld_1;
   If_Result_4 := Cast_Result_4;
else
   --# expr-start 976 '<If at nodes.lkt:1774:13>' If_Result_3 ada/nodes.lkt:1774
--# expr-start 967 '<IsA BaseSubpSpec at nodes.lkt:1786:18>' Is_A_2 ada/nodes.lkt:1786
Is_A_2 := Local_C /= null 
and then Local_C.Kind in Ada_Base_Subp_Spec; 
--# expr-done 967
if Is_A_2 then
--# expr-start 971 '<FieldAccess for node at nodes.lkt:1787:18>' Fld_3 ada/nodes.lkt:1787
--# expr-start 970 '<FieldAccess for name at nodes.lkt:1787:18>' Fld_2 ada/nodes.lkt:1787
--# expr-start 969 '<as_bare_entity at nodes.lkt:1787:18>' If_Result_1 ada/nodes.lkt:1787
--# expr-start 968 '<Cast to BaseSubpSpec at nodes.lkt:1787:18>' Cast_Result_1 ada/nodes.lkt:1787
Cast_Expr_1 := Local_C; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Base_Subp_Spec
   then
      Cast_Result_1 := Cast_Expr_1;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 968
Is_Null_1 := Cast_Result_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Base_Subp_Spec;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Cast_Result_1); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 969
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => If_Result_1.Node, E_Info => If_Result_1.Info);
--# end
--# expr-done 970
Fld_3 := Fld_2.Node;
--# expr-done 971
      Cast_Result_3 := Fld_3;
   If_Result_3 := Cast_Result_3;
else
   --# expr-start 975 '<If at nodes.lkt:1774:13>' If_Result_2 ada/nodes.lkt:1774
--# expr-start 972 '<IsA RenamingClause at nodes.lkt:1788:18>' Is_A_1 ada/nodes.lkt:1788
Is_A_1 := Local_C /= null 
and then Local_C.Kind in Ada_Renaming_Clause_Range; 
--# expr-done 972
if Is_A_1 then
   --# expr-start 974 '<parent at nodes.lkt:1793:17>' Fld_4 ada/nodes.lkt:1793
--# expr-start 973 '<Cast to RenamingClause at nodes.lkt:1793:17>' Cast_Result_2 ada/nodes.lkt:1793
Cast_Expr_2 := Local_C; 
   if Cast_Expr_2 = null
      or else Cast_Expr_2.Kind in Ada_Renaming_Clause_Range
   then
      Cast_Result_2 := Cast_Expr_2;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 973
      if Cast_Result_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Cast_Result_2.Parent; 
--# expr-done 974
   If_Result_2 := Fld_4;
else
   If_Result_2 := Local_C;
end if;
--# expr-done 975
   If_Result_3 := If_Result_2;
end if;
--# expr-done 976
   If_Result_4 := If_Result_3;
end if;
--# expr-done 977
   If_Result_5 := If_Result_4;
end if;
--# expr-done 978
Let_Result := If_Result_5; 
--# end
--# expr-done 979
   If_Result_6 := Let_Result;
end if;
--# expr-done 980
         Property_Result := If_Result_6;
   --# end
      Finalizer_Scope_106;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_106;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Env_Get_Real_From_Node;
--# end
--# property-start AdaNode.entity_no_md ada/nodes.lkt:1801
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Entity_No_Md
  (Node : Bare_Ada_Node
      ; N : Bare_Ada_Node
      ; Rebindings : Env_Rebindings
      ; From_Rebound : Boolean
  )
   return Internal_Entity
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind n N
   --# bind rebindings Rebindings
   --# bind from_rebound From_Rebound
   Property_Result : Internal_Entity;
      New_Struct : Internal_Entity_Info;
Is_Null : Boolean;
If_Result : Internal_Entity_Info;
New_Struct_1 : Internal_Entity;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 984 '<New AdaNode.entity at nodes.lkt:1806:9>' New_Struct_1 ada/nodes.lkt:1806
--# expr-start 983 '<If at nodes.lkt:1808:18>' If_Result ada/nodes.lkt:1808
--# expr-start 981 '<IsNull at nodes.lkt:1808:21>' Is_Null ada/nodes.lkt:1808
Is_Null := N = null; 
--# expr-done 981
if Is_Null then
   If_Result := No_Entity_Info;
else
   --# expr-start 982 '<New EntityInfo at nodes.lkt:1810:17>' New_Struct ada/nodes.lkt:1810
New_Struct := (From_Rebound => From_Rebound, Md => No_Metadata, Rebindings => Rebindings); 
--# expr-done 982
   If_Result := New_Struct;
end if;
--# expr-done 983
New_Struct_1 := (Info => If_Result, Node => N); 
--# expr-done 984
         Property_Result := New_Struct_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Entity_No_Md;
--# end
--# property-start AdaNode.env_mappings ada/nodes.lkt:1819
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Env_Mappings
  (Node : Bare_Ada_Node
      ; Defining_Names : Bare_Defining_Name_List
      ; Value : Bare_Ada_Node
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind defining_names Defining_Names
   --# bind value Value
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_108 with Inline_Always;
            procedure Finalizer_Scope_2038 with Inline_Always;
      Item_0 : Bare_Defining_Name;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
Map_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_108 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_108;
            procedure Finalizer_Scope_2038 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_2038;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 988 '<Map at nodes.lkt:1823:9>' Map_Result ada/nodes.lkt:1823
      declare
         Map_Result_Vec : Internal_Env_Assoc_Vectors.Vector;
      begin
      if Defining_Names = null then
      Map_Result := Create_Internal_Env_Assoc_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Defining_Names;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind n Item_0
      --# expr-start 987 '<New EnvAssoc at nodes.lkt:1825:13>' New_Struct_1 ada/nodes.lkt:1825
--# expr-start 985 '<New DesignatedEnv at nodes.lkt:1828:26>' New_Struct ada/nodes.lkt:1828
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 985
--# expr-start 986 '<FieldAccess for name_symbol at nodes.lkt:1826:21>' Fld ada/nodes.lkt:1826
      if Item_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Item_0);
--# end
--# expr-done 986
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Value); 
--# expr-done 987
         declare
            Item_To_Append : constant Internal_Env_Assoc := New_Struct_1;
         begin
               Inc_Ref (Item_To_Append);
            Internal_Env_Assoc_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2038;
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Env_Assoc_Array
           (Items_Count => Natural (Internal_Env_Assoc_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Env_Assoc_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Env_Assoc_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Env_Assoc_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 988
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_108;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_108;
                     Finalizer_Scope_2038;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Env_Mappings;
--# end
--# property-start AdaNode.comp_bind ada/nodes.lkt:1838
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Comp_Bind
  (Node : Bare_Ada_Node
      ; Left : Logic_Var
      ; Right : Logic_Var
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind left Left
   --# bind right Right
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_109 with Inline_Always;
      Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_109 is
            begin
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_109;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 989 '<NPropagate at nodes.lkt:1839:9>' Bind_Result ada/nodes.lkt:1839
Left.Value := No_Entity;
Entity_Vars.Reset (Left);
Right.Value := No_Entity;
Entity_Vars.Reset (Right);
Bind_Result := Solver.Create_Propagate (Left, Right, Logic_Functor_897'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:1839:9") else null)); 
--# expr-done 989
         Property_Result := Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_109;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_109;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Comp_Bind;
--# end
--# property-start AdaNode.universal_int_bind ada/nodes.lkt:1845
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Universal_Int_Bind
  (Node : Bare_Ada_Node
      ; Type_Var : Logic_Var
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind type_var Type_Var
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_110 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_110 is
            begin
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_110;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 991 '<Bind at nodes.lkt:1846:9>' Bind_Result ada/nodes.lkt:1846
Type_Var.Value := No_Entity;
Entity_Vars.Reset (Type_Var);
--# expr-start 990 '<FieldAccess for universal_int_type at nodes.lkt:1846:21>' Fld ada/nodes.lkt:1846
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Self);
--# end
--# expr-done 990
      Cast_Result := Create_Internal_Entity
        (Node => Fld.Node,
         Info => Fld.Info);
Bind_Result := Solver.Create_Assign (Type_Var, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:1846:9") else null)); 
--# expr-done 991
         Property_Result := Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_110;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_110;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Universal_Int_Bind;
--# end
--# property-start AdaNode.universal_real_bind ada/nodes.lkt:1852
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Universal_Real_Bind
  (Node : Bare_Ada_Node
      ; Type_Var : Logic_Var
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind type_var Type_Var
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_111 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_111 is
            begin
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_111;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 993 '<Bind at nodes.lkt:1853:9>' Bind_Result ada/nodes.lkt:1853
Type_Var.Value := No_Entity;
Entity_Vars.Reset (Type_Var);
--# expr-start 992 '<FieldAccess for universal_real_type at nodes.lkt:1853:21>' Fld ada/nodes.lkt:1853
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_real_type
Fld := Libadalang.Implementation.Ada_Node_P_Universal_Real_Type (Node => Self);
--# end
--# expr-done 992
      Cast_Result := Create_Internal_Entity
        (Node => Fld.Node,
         Info => Fld.Info);
Bind_Result := Solver.Create_Assign (Type_Var, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:1853:9") else null)); 
--# expr-done 993
         Property_Result := Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_111;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_111;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Universal_Real_Bind;
--# end
--# property-start AdaNode.origin_node ada/nodes.lkt:1857
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Origin_Node
  (Node : Bare_Ada_Node
  )
   return Bare_Ada_Node
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node;
      Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Expr_Function;
Fld : Bare_Expr;
Cast_Result_1 : Bare_Ada_Node;
Is_A : Boolean;
If_Result : Bare_Ada_Node;
Fld_1 : Boolean;
If_Result_1 : Bare_Ada_Node;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 999 '<If at nodes.lkt:1858:9>' If_Result_1 ada/nodes.lkt:1858
--# expr-start 994 '<FieldAccess for in_aspect_with_forward_visibility at nodes.lkt:1858:12>' Fld_1 ada/nodes.lkt:1858
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.in_aspect_with_forward_visibility
Fld_1 := Libadalang.Implementation.Ada_Node_P_In_Aspect_With_Forward_Visibility (Node => Self);
--# end
--# expr-done 994
if Fld_1 then
   If_Result_1 := No_Bare_Ada_Node;
else
   --# expr-start 998 '<If at nodes.lkt:1858:9>' If_Result ada/nodes.lkt:1858
--# expr-start 995 '<IsA ExprFunction at nodes.lkt:1859:14>' Is_A ada/nodes.lkt:1859
Is_A := Self /= null 
and then Self.Kind in Ada_Expr_Function_Range; 
--# expr-done 995
if Is_A then
--# expr-start 997 '<FieldAccess for expr at nodes.lkt:1859:40>' Fld ada/nodes.lkt:1859
--# expr-start 996 '<Cast to ExprFunction at nodes.lkt:1859:40>' Cast_Result ada/nodes.lkt:1859
Cast_Expr := Self; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Expr_Function_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 996
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Cast_Result.Expr_Function_F_Expr;
--# expr-done 997
      Cast_Result_1 := Fld;
   If_Result := Cast_Result_1;
else
   If_Result := Self;
end if;
--# expr-done 998
   If_Result_1 := If_Result;
end if;
--# expr-done 999
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Origin_Node;
--# end
--# property-start AdaNode.env_hook ada/nodes.lkt:1866
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Env_Hook
  (Node : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
      Match_0 : Bare_Library_Item;
Match_0_1 : Bare_Body_Node;
Match_1 : Bare_Basic_Decl;
Match_2 : Bare_Ada_Node;
Match_1_1 : Bare_Subunit;
Match_2_1 : Bare_Ada_Node;
Fld : Bare_Ada_Node;
Fld_1 : Boolean;
Fld_2 : Boolean;
Match_Prefix : Bare_Ada_Node;
Cast_Result : Bare_Body_Node;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_1 : Bare_Basic_Decl;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_2 : Bare_Ada_Node;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Match_Result : Boolean;
Fld_3 : Boolean;
Match_Prefix_1 : Bare_Ada_Node;
Cast_Result_3 : Bare_Library_Item;
Let_Result_3 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_4 : Bare_Subunit;
Let_Result_4 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_5 : Bare_Ada_Node;
Let_Result_5 : Boolean;
Scope_Result_5 : Boolean;
Match_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1005 '<Match at nodes.lkt:1866:28>' Match_Result_1 ada/nodes.lkt:1866
--# expr-start 1000 '<parent at nodes.lkt:1866:34>' Fld ada/nodes.lkt:1866
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 1000
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Fld; 
case Ada_Ada_Node (Match_Prefix_1.Kind) is
         when Ada_Library_Item =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix_1;
Match_0 := Cast_Result_3; 
--# bind _ Match_0
--# expr-start 1003 '<Match at nodes.lkt:1868:13>' Match_Result ada/nodes.lkt:1868
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Self; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Accept_Stmt_Body .. Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0_1 := Cast_Result; 
--# bind b Match_0_1
--# expr-start 1001 '<FieldAccess for env_hook_body at nodes.lkt:1869:33>' Fld_1 ada/nodes.lkt:1869
      if Match_0_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.env_hook_body
Fld_1 := Libadalang.Implementation.Body_Node_P_Env_Hook_Body (Node => Match_0_1);
--# end
--# expr-done 1001
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl .. Ada_Synthetic_Subp_Decl | Ada_Entry_Index_Spec .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind bd Match_1
--# expr-start 1002 '<FieldAccess for env_hook_basic_decl at nodes.lkt:1870:39>' Fld_2 ada/nodes.lkt:1870
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.env_hook_basic_decl
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Env_Hook_Basic_Decl (Node => Match_1);
--# end
--# expr-done 1002
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := False; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 1003
Let_Result_3 := Match_Result; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result_1 := Scope_Result_3; 
         when Ada_Subunit =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix_1;
Match_1_1 := Cast_Result_4; 
--# bind su Match_1_1
--# expr-start 1004 '<FieldAccess for env_hook_subunit at nodes.lkt:1873:29>' Fld_3 ada/nodes.lkt:1873
      if Match_1_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.env_hook_subunit
Fld_3 := Libadalang.Implementation.Subunit_P_Env_Hook_Subunit (Node => Match_1_1);
--# end
--# expr-done 1004
Let_Result_4 := Fld_3; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result_1 := Scope_Result_4; 
         when Ada_Abort_Absent .. Ada_Iter_Type_Of | Ada_Limited_Absent .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Match_Prefix_1;
Match_2_1 := Cast_Result_5; 
--# bind _ Match_2_1
Let_Result_5 := False; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result_1 := Scope_Result_5; 
end case;
--# expr-done 1005
         Property_Result := Match_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Env_Hook;
--# end
--# property-start AdaNode.env_get ada/nodes.lkt:1902
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Env_Get
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Symbol : Symbol_Type
      ; Lookup : Lookup_Kind
         := Recursive
      ; From_Node : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Categories : Ref_Categories
         := (Inherited_Primitives => True, Nocat => True)
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind env Env
   --# bind symbol Symbol
   --# bind lookup Lookup
   --# bind from_node From_Node
   --# bind categories Categories
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_114 with Inline_Always;
            procedure Finalizer_Scope_2045 with Inline_Always;
            procedure Finalizer_Scope_2050 with Inline_Always;
      Local_Real_From_Node : Bare_Ada_Node;
Local_Results : Internal_Entity_Array_Access;
Var_Expr_0 : Bare_Ada_Node;
Match_0 : Bare_Basic_Decl;
Match_1 : Bare_Defining_Name;
Match_2 : Bare_Ada_Node;
Var_Expr_1 : Bare_Basic_Decl;
Var_Expr_31 : Internal_Entity_Defining_Name;
Fld : Bare_Ada_Node;
Env_Get_Result : Internal_Entity_Array_Access;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Defining_Name;
Fld_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result_1 : Bare_Basic_Decl;
As_Entity_1 : Internal_Entity_Defining_Name;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity_Defining_Name;
Fld_3 : Internal_Entity_Basic_Decl;
Fld_4 : Bare_Basic_Decl;
Fld_5 : Boolean;
If_Result_3 : Bare_Basic_Decl;
Match_Prefix : Bare_Ada_Node;
Cast_Result : Bare_Basic_Decl;
Let_Result : Bare_Basic_Decl;
Scope_Result_1 : Bare_Basic_Decl;
Cast_Result_1 : Bare_Defining_Name;
Let_Result_1 : Bare_Basic_Decl;
Scope_Result_2 : Bare_Basic_Decl;
Cast_Result_2 : Bare_Ada_Node;
Let_Result_2 : Bare_Basic_Decl;
Scope_Result_3 : Bare_Basic_Decl;
Match_Result : Bare_Basic_Decl;
Fld_6 : Bare_Ada_Node;
Cast_Expr : Bare_Basic_Decl;
Cast_Result_3 : Bare_Ada_Node;
Is_Equal : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Array_Access;
Scope_Result_4 : Internal_Entity_Array_Access;
Result_Var_1 : Internal_Entity_Array_Access;
Scope_Result_5 : Internal_Entity_Array_Access;
Result_Var_2 : Internal_Entity_Array_Access;
Let_Result_3 : Internal_Entity_Array_Access;
Let_Result_4 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_114 is
            begin
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Local_Results);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_114;
            procedure Finalizer_Scope_2045 is
            begin
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_2045;
            procedure Finalizer_Scope_2050 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2050;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1023 '<Let at nodes.lkt:1909:9>' Let_Result_4 ada/nodes.lkt:1909
--# scope-start
--# expr-start 1006 '<FieldAccess for env_get_real_from_node at nodes.lkt:1909:30>' Fld ada/nodes.lkt:1909
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_get_real_from_node
Fld := Libadalang.Implementation.Ada_Node_P_Env_Get_Real_From_Node (Node => Self, From_Node => From_Node);
--# end
--# expr-done 1006
Local_Real_From_Node := Fld; 
--# bind real_from_node Local_Real_From_Node
--# expr-start 1022 '<Let at nodes.lkt:1910:9>' Let_Result_3 ada/nodes.lkt:1910
--# scope-start
--# expr-start 1007 '<EnvGet at nodes.lkt:1911:13>' Env_Get_Result ada/nodes.lkt:1911
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Env, Key => Thin (Symbol), Lookup_Kind => To_Lookup_Kind_Type (Lookup), Categories => Categories, From => Local_Real_From_Node)); 
--# expr-done 1007
Local_Results := Env_Get_Result; Inc_Ref (Local_Results);
--# bind results Local_Results
Var_Expr_0 := Local_Real_From_Node;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind rfn Var_Expr_0
--# expr-start 1017 '<Match at nodes.lkt:1923:13>' Match_Result ada/nodes.lkt:1923
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Abstract_State_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind bd Match_0
--# expr-start 1011 '<If at nodes.lkt:1925:21>' If_Result_1 ada/nodes.lkt:1925
--# expr-start 1009 '<FieldAccess for defining_name at nodes.lkt:1925:24>' Fld_1 ada/nodes.lkt:1925
--# expr-start 1008 '<as_bare_entity at nodes.lkt:1925:24>' If_Result ada/nodes.lkt:1925
Is_Null := Match_0 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Match_0); 
   If_Result := As_Entity;
end if;
--# expr-done 1008
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 1009
Var_Expr_31 := Fld_1;
if Var_Expr_31 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 1010 '<FieldAccess for name_is at nodes.lkt:1925:24>' Fld_2 ada/nodes.lkt:1925
      if Var_Expr_31.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_2 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_31.Node, Sym => Symbol);
--# end
--# expr-done 1010
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   If_Result_1 := Match_0;
else
   If_Result_1 := No_Bare_Ada_Node;
end if;
--# expr-done 1011
Let_Result := If_Result_1; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind dn Match_1
--# expr-start 1016 '<If at nodes.lkt:1929:21>' If_Result_3 ada/nodes.lkt:1929
--# expr-start 1012 '<FieldAccess for name_is at nodes.lkt:1929:24>' Fld_5 ada/nodes.lkt:1929
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_5 := Libadalang.Implementation.Name_P_Name_Is (Node => Match_1, Sym => Symbol);
--# end
--# expr-done 1012
if Fld_5 then
   --# expr-start 1015 '<FieldAccess for node at nodes.lkt:1930:26>' Fld_4 ada/nodes.lkt:1930
--# expr-start 1014 '<FieldAccess for basic_decl at nodes.lkt:1930:26>' Fld_3 ada/nodes.lkt:1930
--# expr-start 1013 '<as_bare_entity at nodes.lkt:1930:26>' If_Result_2 ada/nodes.lkt:1930
Is_Null_1 := Match_1 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity_Defining_Name;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Match_1); 
   If_Result_2 := As_Entity_1;
end if;
--# expr-done 1013
      if If_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_3 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => If_Result_2.Node, E_Info => If_Result_2.Info);
--# end
--# expr-done 1014
Fld_4 := Fld_3.Node;
--# expr-done 1015
   If_Result_3 := Fld_4;
else
   If_Result_3 := No_Bare_Ada_Node;
end if;
--# expr-done 1016
Let_Result_1 := If_Result_3; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_Call_Expr | Ada_Discrete_Subtype_Name .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Bare_Ada_Node; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 1017
Var_Expr_1 := Match_Result;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind enclosing_bd Var_Expr_1
--# expr-start 1021 '<Map at nodes.lkt:1940:17>' Map_Result ada/nodes.lkt:1940
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Results;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind r Item_2
         --# expr-start 1020 '<Not at nodes.lkt:1940:39>' Not_Val ada/nodes.lkt:1940
--# expr-start 1019 '<Eq at nodes.lkt:1940:39>' Is_Equal ada/nodes.lkt:1940
--# expr-start 1018 '<FieldAccess for node at nodes.lkt:1940:39>' Fld_6 ada/nodes.lkt:1940
Fld_6 := Item_2.Node;
--# expr-done 1018
Cast_Expr := Var_Expr_1; 
      Cast_Result_3 := Cast_Expr;
Is_Equal := Fld_6 = Cast_Result_3; 
--# expr-done 1019
Not_Val := not (Is_Equal); 
--# expr-done 1020
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity := Item_2;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1021
Scope_Result_4 := Map_Result;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2050;
   Result_Var_1 := Scope_Result_4;
else
   Result_Var_1 := Local_Results;
end if;
      Inc_Ref (Result_Var_1);
Scope_Result_5 := Result_Var_1;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_2045;
   Result_Var_2 := Scope_Result_5;
else
   Result_Var_2 := Local_Results;
end if;
      Inc_Ref (Result_Var_2);
Let_Result_3 := Result_Var_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 1022
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 1023
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_114;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_114;
                     Finalizer_Scope_2045;
                     Finalizer_Scope_2050;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Env_Get;
--# end
--# property-start AdaNode.env_get_public ada/nodes.lkt:1950
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Env_Get_Public
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Symbol : Symbol_Type
      ; Lookup : Lookup_Kind
         := Recursive
      ; From_Node : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Categories : Ref_Categories
         := (Inherited_Primitives => True, Nocat => True)
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind env Env
   --# bind symbol Symbol
   --# bind lookup Lookup
   --# bind from_node From_Node
   --# bind categories Categories
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_115 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Package_Decl;
Fld : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Package_Decl;
Fld_1 : Symbol_Type;
Sym : Symbol_Type;
Is_Equal : Boolean;
Not_Val : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Map_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_115 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_115;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1030 '<Map at nodes.lkt:1957:9>' Map_Result ada/nodes.lkt:1957
   --# expr-start 1024 '<FieldAccess for env_get at nodes.lkt:1957:9>' Fld ada/nodes.lkt:1957
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_get
Fld := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Env, Symbol => Symbol, Lookup => Lookup, From_Node => From_Node, Categories => Categories);
--# end
--# expr-done 1024
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind x Item_0
--# expr-start 1025 '<Cast to PackageDecl at nodes.lkt:1959:13>' Cast_Result ada/nodes.lkt:1959
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Package_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Package_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Package_Decl;
   end if;
--# expr-done 1025
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Package_Decl then
   --# scope-start
   --# bind pkg Var_Expr_1
--# expr-start 1029 '<Not at nodes.lkt:1960:26>' Not_Val ada/nodes.lkt:1960
--# expr-start 1028 '<Eq at nodes.lkt:1960:26>' Is_Equal ada/nodes.lkt:1960
--# expr-start 1026 '<FieldAccess for name_symbol at nodes.lkt:1960:26>' Fld_1 ada/nodes.lkt:1960
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Var_Expr_1.Node);
--# end
--# expr-done 1026
--# expr-start 1027 '<Symbol root_types_ at nodes.lkt:1960:47>' Sym ada/nodes.lkt:1960
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Root_Types); 
--# expr-done 1027
Is_Equal := Fld_1 = Sym; 
--# expr-done 1028
Not_Val := not (Is_Equal); 
--# expr-done 1029
Scope_Result := Not_Val;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
         if Result_Var then
         declare
            Item_To_Append : constant Internal_Entity := Item_0;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1030
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_115;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_115;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Env_Get_Public;
--# end
--# property-start AdaNode.synthesize_defining_name ada/nodes.lkt:1968
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Synthesize_Defining_Name
  (Node : Bare_Ada_Node
      ; Sym : Symbol_Type
  )
   return Bare_Defining_Name
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind sym Sym
   Property_Result : Bare_Defining_Name;
      New_Node : Bare_Synthetic_Identifier;
Cast_Result : Bare_Name;
New_Node_1 : Bare_Synthetic_Defining_Name;
Cast_Result_1 : Bare_Defining_Name;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Synthesize_Defining_Name,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Sym);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Bare_Defining_Name;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
--# expr-start 1032 '<New SyntheticDefiningName at nodes.lkt:1969:9>' New_Node_1 ada/nodes.lkt:1969
--# expr-start 1031 '<New SyntheticIdentifier at nodes.lkt:1971:18>' New_Node ada/nodes.lkt:1971
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Identifier);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Identifier,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
      New_Node.Expr_Logic_Vars :=
         System.Null_Address;
      New_Node.Synthetic_Identifier_Sym :=
         Sym;
--# expr-done 1031
      Cast_Result := New_Node;
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Cast_Result = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "DefiningName.name cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_1 := new Root_Node_Record
  (Ada_Synthetic_Defining_Name);
Initialize
  (Self => New_Node_1,
   Kind => Ada_Synthetic_Defining_Name,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_1);
   Initialize_Fields_For_Synthetic_Defining_Name
     (Self => New_Node_1,
      Defining_Name_F_Name => Cast_Result);
      New_Node_1.Expr_Logic_Vars :=
         System.Null_Address;
--# expr-done 1032
      Cast_Result_1 := New_Node_1;
         Property_Result := Cast_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Bare_Defining_Name,
                        As_Bare_Defining_Name => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Synthesize_Defining_Name;
--# end
--# property-start AdaNode.create_unop_assoc ada/nodes.lkt:1978
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Create_Unop_Assoc
  (Node : Bare_Ada_Node
      ; Op : Symbol_Type
      ; Rhs : Bare_Base_Type_Decl
      ; Ret : Bare_Base_Type_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind op Op
   --# bind rhs Rhs
   --# bind ret Ret
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_117 with Inline_Always;
      Sym : Symbol_Type;
New_Node : Bare_Synthetic_Type_Expr;
Cast_Result : Bare_Type_Expr;
New_Node_1 : Bare_Synthetic_Formal_Param_Decl;
New_Node_2 : Bare_Synthetic_Type_Expr;
New_Node_3 : Bare_Synthetic_Unary_Spec;
Cast_Result_1 : Bare_Base_Subp_Spec;
New_Node_4 : Bare_Synthetic_Subp_Decl;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Result_2 : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_117 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_117;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Create_Unop_Assoc,
            Items    => new Mmz_Key_Array (1 ..  4))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Op);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Rhs);
               Mmz_K.Items (4) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Ret);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1040 '<New EnvAssoc at nodes.lkt:1983:9>' New_Struct_1 ada/nodes.lkt:1983
--# expr-start 1033 '<New DesignatedEnv at nodes.lkt:1995:22>' New_Struct ada/nodes.lkt:1995
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 1033
--# expr-start 1039 '<New SyntheticSubpDecl at nodes.lkt:1985:19>' New_Node_4 ada/nodes.lkt:1985
--# expr-start 1038 '<New SyntheticUnarySpec at nodes.lkt:1986:22>' New_Node_3 ada/nodes.lkt:1986
--# expr-start 1034 '<New SyntheticTypeExpr at nodes.lkt:1992:38>' New_Node_2 ada/nodes.lkt:1992
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Ret = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_2 := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node_2,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_2);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node_2,
      Synthetic_Type_Expr_F_Target_Type => Ret);
--# expr-done 1034
--# expr-start 1037 '<New SyntheticFormalParamDecl at nodes.lkt:1988:33>' New_Node_1 ada/nodes.lkt:1988
--# expr-start 1035 '<New SyntheticTypeExpr at nodes.lkt:1990:36>' New_Node ada/nodes.lkt:1990
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Rhs = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node,
      Synthetic_Type_Expr_F_Target_Type => Rhs);
--# expr-done 1035
      Cast_Result := New_Node;
--# expr-start 1036 '<Symbol right at nodes.lkt:1989:36>' Sym ada/nodes.lkt:1989
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Right); 
--# expr-done 1036
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Cast_Result = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticFormalParamDecl.param_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_1 := new Root_Node_Record
  (Ada_Synthetic_Formal_Param_Decl);
Initialize
  (Self => New_Node_1,
   Kind => Ada_Synthetic_Formal_Param_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_1);
   Initialize_Fields_For_Synthetic_Formal_Param_Decl
     (Self => New_Node_1,
      Synthetic_Formal_Param_Decl_F_Param_Type => Cast_Result);
      New_Node_1.Synthetic_Formal_Param_Decl_Param_Name :=
         Sym;
--# expr-done 1037
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if New_Node_2 = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticUnarySpec.return_type_expr cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
      if New_Node_1 = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticUnarySpec.right_param cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_3 := new Root_Node_Record
  (Ada_Synthetic_Unary_Spec);
Initialize
  (Self => New_Node_3,
   Kind => Ada_Synthetic_Unary_Spec,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_3);
   Initialize_Fields_For_Synthetic_Unary_Spec
     (Self => New_Node_3,
      Synthetic_Unary_Spec_F_Return_Type_Expr => New_Node_2, Synthetic_Unary_Spec_F_Right_Param => New_Node_1);
      New_Node_3.Synthetic_Unary_Spec_Subp_Symbol :=
         Op;
--# expr-done 1038
      Cast_Result_1 := New_Node_3;
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticSubpDecl.spec cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_4 := new Root_Node_Record
  (Ada_Synthetic_Subp_Decl);
Initialize
  (Self => New_Node_4,
   Kind => Ada_Synthetic_Subp_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_4);
   Initialize_Fields_For_Synthetic_Subp_Decl
     (Self => New_Node_4,
      Synthetic_Subp_Decl_F_Spec => Cast_Result_1);
--# expr-done 1039
      Cast_Result_2 := New_Node_4;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Op, Metadata => No_Metadata, Value => Cast_Result_2); 
--# expr-done 1040
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_117;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_117;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc,
                        As_Internal_Env_Assoc => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Create_Unop_Assoc;
--# end
--# property-start AdaNode.create_binop_assoc_impl ada/nodes.lkt:2006
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Create_Binop_Assoc_Impl
  (Node : Bare_Ada_Node
      ; Op : Symbol_Type
      ; Lhs : Bare_Type_Expr
      ; Rhs : Bare_Type_Expr
      ; Ret : Bare_Type_Expr
  )
   return Internal_Env_Assoc
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind op Op
   --# bind lhs Lhs
   --# bind rhs Rhs
   --# bind ret Ret
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_118 with Inline_Always;
      Sym : Symbol_Type;
New_Node : Bare_Synthetic_Formal_Param_Decl;
Sym_1 : Symbol_Type;
New_Node_1 : Bare_Synthetic_Formal_Param_Decl;
New_Node_2 : Bare_Synthetic_Binary_Spec;
Cast_Result : Bare_Base_Subp_Spec;
New_Node_3 : Bare_Synthetic_Subp_Decl;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Result_1 : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_118 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_118;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Create_Binop_Assoc_Impl,
            Items    => new Mmz_Key_Array (1 ..  5))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Op);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Type_Expr,
                                      As_Bare_Type_Expr => Lhs);
               Mmz_K.Items (4) := (Kind => Mmz_Bare_Type_Expr,
                                      As_Bare_Type_Expr => Rhs);
               Mmz_K.Items (5) := (Kind => Mmz_Bare_Type_Expr,
                                      As_Bare_Type_Expr => Ret);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1048 '<New EnvAssoc at nodes.lkt:2012:9>' New_Struct_1 ada/nodes.lkt:2012
--# expr-start 1041 '<New DesignatedEnv at nodes.lkt:2028:22>' New_Struct ada/nodes.lkt:2028
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 1041
--# expr-start 1047 '<New SyntheticSubpDecl at nodes.lkt:2014:19>' New_Node_3 ada/nodes.lkt:2014
--# expr-start 1046 '<New SyntheticBinarySpec at nodes.lkt:2015:22>' New_Node_2 ada/nodes.lkt:2015
--# expr-start 1043 '<New SyntheticFormalParamDecl at nodes.lkt:2017:32>' New_Node ada/nodes.lkt:2017
--# expr-start 1042 '<Symbol left at nodes.lkt:2018:36>' Sym ada/nodes.lkt:2018
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Left); 
--# expr-done 1042
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Lhs = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticFormalParamDecl.param_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Formal_Param_Decl);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Formal_Param_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Synthetic_Formal_Param_Decl
     (Self => New_Node,
      Synthetic_Formal_Param_Decl_F_Param_Type => Lhs);
      New_Node.Synthetic_Formal_Param_Decl_Param_Name :=
         Sym;
--# expr-done 1043
--# expr-start 1045 '<New SyntheticFormalParamDecl at nodes.lkt:2021:33>' New_Node_1 ada/nodes.lkt:2021
--# expr-start 1044 '<Symbol right at nodes.lkt:2022:36>' Sym_1 ada/nodes.lkt:2022
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Right); 
--# expr-done 1044
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Rhs = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticFormalParamDecl.param_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_1 := new Root_Node_Record
  (Ada_Synthetic_Formal_Param_Decl);
Initialize
  (Self => New_Node_1,
   Kind => Ada_Synthetic_Formal_Param_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_1);
   Initialize_Fields_For_Synthetic_Formal_Param_Decl
     (Self => New_Node_1,
      Synthetic_Formal_Param_Decl_F_Param_Type => Rhs);
      New_Node_1.Synthetic_Formal_Param_Decl_Param_Name :=
         Sym_1;
--# expr-done 1045
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if New_Node = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticBinarySpec.left_param cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
      if New_Node_1 = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticBinarySpec.right_param cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_2 := new Root_Node_Record
  (Ada_Synthetic_Binary_Spec);
Initialize
  (Self => New_Node_2,
   Kind => Ada_Synthetic_Binary_Spec,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_2);
   Initialize_Fields_For_Synthetic_Binary_Spec
     (Self => New_Node_2,
      Synthetic_Binary_Spec_F_Left_Param => New_Node, Synthetic_Binary_Spec_F_Return_Type_Expr => Ret, Synthetic_Binary_Spec_F_Right_Param => New_Node_1);
      New_Node_2.Synthetic_Binary_Spec_Subp_Symbol :=
         Op;
--# expr-done 1046
      Cast_Result := New_Node_2;
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Cast_Result = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticSubpDecl.spec cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_3 := new Root_Node_Record
  (Ada_Synthetic_Subp_Decl);
Initialize
  (Self => New_Node_3,
   Kind => Ada_Synthetic_Subp_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_3);
   Initialize_Fields_For_Synthetic_Subp_Decl
     (Self => New_Node_3,
      Synthetic_Subp_Decl_F_Spec => Cast_Result);
--# expr-done 1047
      Cast_Result_1 := New_Node_3;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Op, Metadata => No_Metadata, Value => Cast_Result_1); 
--# expr-done 1048
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_118;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_118;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc,
                        As_Internal_Env_Assoc => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Create_Binop_Assoc_Impl;
--# end
--# property-start AdaNode.create_binop_assoc ada/nodes.lkt:2040
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Create_Binop_Assoc
  (Node : Bare_Ada_Node
      ; Op : Symbol_Type
      ; Lhs : Bare_Base_Type_Decl
      ; Rhs : Bare_Base_Type_Decl
      ; Ret : Bare_Base_Type_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind op Op
   --# bind lhs Lhs
   --# bind rhs Rhs
   --# bind ret Ret
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_119 with Inline_Always;
      New_Node : Bare_Synthetic_Type_Expr;
Cast_Result : Bare_Type_Expr;
New_Node_1 : Bare_Synthetic_Type_Expr;
Cast_Result_1 : Bare_Type_Expr;
New_Node_2 : Bare_Synthetic_Type_Expr;
Cast_Result_2 : Bare_Type_Expr;
Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_119 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_119;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Create_Binop_Assoc,
            Items    => new Mmz_Key_Array (1 ..  5))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Op);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Lhs);
               Mmz_K.Items (4) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Rhs);
               Mmz_K.Items (5) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Ret);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1052 '<FieldAccess for create_binop_assoc_impl at nodes.lkt:2046:9>' Fld ada/nodes.lkt:2046
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1049 '<New SyntheticTypeExpr at nodes.lkt:2048:13>' New_Node ada/nodes.lkt:2048
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Lhs = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node,
      Synthetic_Type_Expr_F_Target_Type => Lhs);
--# expr-done 1049
      Cast_Result := New_Node;
--# expr-start 1050 '<New SyntheticTypeExpr at nodes.lkt:2049:13>' New_Node_1 ada/nodes.lkt:2049
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Rhs = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_1 := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node_1,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_1);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node_1,
      Synthetic_Type_Expr_F_Target_Type => Rhs);
--# expr-done 1050
      Cast_Result_1 := New_Node_1;
--# expr-start 1051 '<New SyntheticTypeExpr at nodes.lkt:2050:13>' New_Node_2 ada/nodes.lkt:2050
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Ret = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_2 := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node_2,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_2);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node_2,
      Synthetic_Type_Expr_F_Target_Type => Ret);
--# expr-done 1051
      Cast_Result_2 := New_Node_2;
--# property-call-start AdaNode.create_binop_assoc_impl
Fld := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc_Impl (Node => Self, Op => Op, Lhs => Cast_Result, Rhs => Cast_Result_1, Ret => Cast_Result_2);
--# end
--# expr-done 1052
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_119;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_119;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc,
                        As_Internal_Env_Assoc => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Create_Binop_Assoc;
--# end
--# property-start AdaNode.create_binop_assoc_l_expr ada/nodes.lkt:2056
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Create_Binop_Assoc_L_Expr
  (Node : Bare_Ada_Node
      ; Op : Symbol_Type
      ; Lhs : Bare_Type_Expr
      ; Rhs : Bare_Base_Type_Decl
      ; Ret : Bare_Base_Type_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind op Op
   --# bind lhs Lhs
   --# bind rhs Rhs
   --# bind ret Ret
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_120 with Inline_Always;
      New_Node : Bare_Synthetic_Type_Expr;
Cast_Result : Bare_Type_Expr;
New_Node_1 : Bare_Synthetic_Type_Expr;
Cast_Result_1 : Bare_Type_Expr;
Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_120 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_120;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Create_Binop_Assoc_L_Expr,
            Items    => new Mmz_Key_Array (1 ..  5))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Op);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Type_Expr,
                                      As_Bare_Type_Expr => Lhs);
               Mmz_K.Items (4) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Rhs);
               Mmz_K.Items (5) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Ret);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1055 '<FieldAccess for create_binop_assoc_impl at nodes.lkt:2062:9>' Fld ada/nodes.lkt:2062
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1053 '<New SyntheticTypeExpr at nodes.lkt:2065:13>' New_Node ada/nodes.lkt:2065
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Rhs = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node,
      Synthetic_Type_Expr_F_Target_Type => Rhs);
--# expr-done 1053
      Cast_Result := New_Node;
--# expr-start 1054 '<New SyntheticTypeExpr at nodes.lkt:2066:13>' New_Node_1 ada/nodes.lkt:2066
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Ret = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_1 := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node_1,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_1);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node_1,
      Synthetic_Type_Expr_F_Target_Type => Ret);
--# expr-done 1054
      Cast_Result_1 := New_Node_1;
--# property-call-start AdaNode.create_binop_assoc_impl
Fld := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc_Impl (Node => Self, Op => Op, Lhs => Lhs, Rhs => Cast_Result, Ret => Cast_Result_1);
--# end
--# expr-done 1055
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_120;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_120;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc,
                        As_Internal_Env_Assoc => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Create_Binop_Assoc_L_Expr;
--# end
--# property-start AdaNode.create_binop_assoc_r_expr ada/nodes.lkt:2072
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Create_Binop_Assoc_R_Expr
  (Node : Bare_Ada_Node
      ; Op : Symbol_Type
      ; Lhs : Bare_Base_Type_Decl
      ; Rhs : Bare_Type_Expr
      ; Ret : Bare_Base_Type_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind op Op
   --# bind lhs Lhs
   --# bind rhs Rhs
   --# bind ret Ret
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_121 with Inline_Always;
      New_Node : Bare_Synthetic_Type_Expr;
Cast_Result : Bare_Type_Expr;
New_Node_1 : Bare_Synthetic_Type_Expr;
Cast_Result_1 : Bare_Type_Expr;
Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_121 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_121;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Create_Binop_Assoc_R_Expr,
            Items    => new Mmz_Key_Array (1 ..  5))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Op);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Lhs);
               Mmz_K.Items (4) := (Kind => Mmz_Bare_Type_Expr,
                                      As_Bare_Type_Expr => Rhs);
               Mmz_K.Items (5) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Ret);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1058 '<FieldAccess for create_binop_assoc_impl at nodes.lkt:2078:9>' Fld ada/nodes.lkt:2078
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1056 '<New SyntheticTypeExpr at nodes.lkt:2080:13>' New_Node ada/nodes.lkt:2080
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Lhs = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node,
      Synthetic_Type_Expr_F_Target_Type => Lhs);
--# expr-done 1056
      Cast_Result := New_Node;
--# expr-start 1057 '<New SyntheticTypeExpr at nodes.lkt:2082:13>' New_Node_1 ada/nodes.lkt:2082
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Ret = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_1 := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node_1,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_1);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node_1,
      Synthetic_Type_Expr_F_Target_Type => Ret);
--# expr-done 1057
      Cast_Result_1 := New_Node_1;
--# property-call-start AdaNode.create_binop_assoc_impl
Fld := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc_Impl (Node => Self, Op => Op, Lhs => Cast_Result, Rhs => Rhs, Ret => Cast_Result_1);
--# end
--# expr-done 1058
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_121;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_121;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc,
                        As_Internal_Env_Assoc => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Create_Binop_Assoc_R_Expr;
--# end
--# property-start AdaNode.create_binop_assoc_l_r_expr ada/nodes.lkt:2088
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Create_Binop_Assoc_L_R_Expr
  (Node : Bare_Ada_Node
      ; Op : Symbol_Type
      ; Lhs : Bare_Type_Expr
      ; Rhs : Bare_Type_Expr
      ; Ret : Bare_Base_Type_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind op Op
   --# bind lhs Lhs
   --# bind rhs Rhs
   --# bind ret Ret
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_122 with Inline_Always;
      New_Node : Bare_Synthetic_Type_Expr;
Cast_Result : Bare_Type_Expr;
Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_122 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_122;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ada_Node_Ada_Node_P_Create_Binop_Assoc_L_R_Expr,
            Items    => new Mmz_Key_Array (1 ..  5))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ada_Node,
                                As_Bare_Ada_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Op);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Type_Expr,
                                      As_Bare_Type_Expr => Lhs);
               Mmz_K.Items (4) := (Kind => Mmz_Bare_Type_Expr,
                                      As_Bare_Type_Expr => Rhs);
               Mmz_K.Items (5) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Ret);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1060 '<FieldAccess for create_binop_assoc_impl at nodes.lkt:2094:9>' Fld ada/nodes.lkt:2094
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1059 '<New SyntheticTypeExpr at nodes.lkt:2098:13>' New_Node ada/nodes.lkt:2098
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Ret = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node,
      Synthetic_Type_Expr_F_Target_Type => Ret);
--# expr-done 1059
      Cast_Result := New_Node;
--# property-call-start AdaNode.create_binop_assoc_impl
Fld := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc_Impl (Node => Self, Op => Op, Lhs => Lhs, Rhs => Rhs, Ret => Cast_Result);
--# end
--# expr-done 1060
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_122;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_122;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc,
                        As_Internal_Env_Assoc => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Ada_Node_P_Create_Binop_Assoc_L_R_Expr;
--# end
--# property-start '[dispatcher]AdaNode.custom_id_text' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Custom_Id_Text
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : String_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_Signed_Int_Type_Def | Ada_Unconstrained_Array_Index .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.custom_id_text
                  Property_Result := Ada_Node_P_Custom_Id_Text
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_State_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.custom_id_text
                  Property_Result := Basic_Decl_P_Custom_Id_Text
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Indication .. Ada_Synthetic_Type_Expr =>
                  --# property-call-start TypeExpr.custom_id_text
                  Property_Result := Type_Expr_P_Custom_Id_Text
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type =>
                  --# property-call-start AnonymousType.custom_id_text
                  Property_Result := Anonymous_Type_P_Custom_Id_Text
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Lit_Synth_Type_Expr =>
                  --# property-call-start EnumLitSynthTypeExpr.custom_id_text
                  Property_Result := Enum_Lit_Synth_Type_Expr_P_Custom_Id_Text
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Custom_Id_Text;
--# end
--# property-start '[dispatcher]AdaNode.complete_items' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Complete_Items
  (Node : Bare_Ada_Node
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Completion_Item_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Completion_Item_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_Abstract_State_Decl_List | Ada_Constraint_List .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Char_Literal | Ada_Op_Abs .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.complete_items
                  Property_Result := Ada_Node_P_Complete_Items
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Alternatives_List =>
                  --# property-call-start AlternativesList.complete_items
                  Property_Result := Alternatives_List_P_Complete_Items
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.complete_items
                  Property_Result := Dotted_Name_P_Complete_Items
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Identifier =>
                  --# property-call-start Identifier.complete_items
                  Property_Result := Identifier_P_Complete_Items
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
                  --# property-call-start SubtypeIndication.complete_items
                  Property_Result := Subtype_Indication_P_Complete_Items
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Complete_Items;
--# end
--# property-start '[dispatcher]AdaNode.complete_item_weight' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Complete_Item_Weight
  (Node : Bare_Ada_Node
      ; Item : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind item Item
   --# bind origin Origin
   Property_Result : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_Constant_Present | Ada_Delta_Constraint .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Abort_Stmt | Ada_Call_Stmt .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.complete_item_weight
                  Property_Result := Ada_Node_P_Complete_Item_Weight
                    (Self
                        , Item
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Composite_Constraint =>
                  --# property-call-start CompositeConstraint.complete_item_weight
                  Property_Result := Composite_Constraint_P_Complete_Item_Weight
                    (Self
                        , Item
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.complete_item_weight
                  Property_Result := Dotted_Name_P_Complete_Item_Weight
                    (Self
                        , Item
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Assign_Stmt =>
                  --# property-call-start AssignStmt.complete_item_weight
                  Property_Result := Assign_Stmt_P_Complete_Item_Weight
                    (Self
                        , Item
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Complete_Item_Weight;
--# end
--# property-start '[dispatcher]AdaNode.spark_mode_aspect' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Spark_Mode_Aspect
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Aspect;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_Range_Constraint | Ada_Elsif_Expr_Part .. Ada_Format_String_Tok_String | Ada_Interface_Kind_Limited .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.spark_mode_aspect
                  Property_Result := Ada_Node_P_Spark_Mode_Aspect
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_State_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.spark_mode_aspect
                  Property_Result := Basic_Decl_P_Spark_Mode_Aspect
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Declarative_Part | Ada_Public_Part =>
                  --# property-call-start DeclarativePart.spark_mode_aspect
                  Property_Result := Declarative_Part_P_Spark_Mode_Aspect
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Private_Part =>
                  --# property-call-start PrivatePart.spark_mode_aspect
                  Property_Result := Private_Part_P_Spark_Mode_Aspect
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Handled_Stmts =>
                  --# property-call-start HandledStmts.spark_mode_aspect
                  Property_Result := Handled_Stmts_P_Spark_Mode_Aspect
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Spark_Mode_Aspect;
--# end
--# property-start '[dispatcher]AdaNode.immediate_declarative_region' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Immediate_Declarative_Region
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_Declarative_Part | Ada_Public_Part .. Ada_Begin_Block | Ada_Case_Stmt .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.immediate_declarative_region
                  Property_Result := Ada_Node_P_Immediate_Declarative_Region
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_State_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.immediate_declarative_region
                  Property_Result := Basic_Decl_P_Immediate_Declarative_Region
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Private_Part =>
                  --# property-call-start PrivatePart.immediate_declarative_region
                  Property_Result := Private_Part_P_Immediate_Declarative_Region
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Decl_Block =>
                  --# property-call-start DeclBlock.immediate_declarative_region
                  Property_Result := Decl_Block_P_Immediate_Declarative_Region
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Immediate_Declarative_Region;
--# end
--# property-start '[dispatcher]AdaNode.xref_equation' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Xref_Equation
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_All_Present | Ada_Aspect_Spec .. Ada_Pragma_Argument_Assoc | Ada_Component_List .. Ada_Record_Def | Ada_Composite_Constraint_Assoc | Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Formal_Obj_Decl .. Ada_Generic_Formal_Type_Decl | Ada_Synthetic_Formal_Param_Decl .. Ada_Discrete_Base_Subtype_Decl | Ada_Classwide_Type_Decl .. Ada_Incomplete_Type_Decl | Ada_Incomplete_Tagged_Type_Decl | Ada_Abstract_Subp_Decl | Ada_Subp_Decl .. Ada_Accept_Stmt_Body | Ada_Null_Subp_Decl .. Ada_Subp_Body | Ada_Package_Body_Stub .. Ada_Task_Body_Stub | Ada_Package_Body .. Ada_Task_Body | Ada_Error_Decl | Ada_Generic_Package_Decl .. Ada_Generic_Subp_Decl | Ada_Label_Decl .. Ada_Named_Stmt_Decl | Ada_Single_Task_Decl .. Ada_Synthetic_Object_Decl | Ada_Compilation_Unit | Ada_Constant_Absent .. Ada_Constant_Present | Ada_Declarative_Part .. Ada_Elsif_Expr_Part | Ada_Case_Expr_Alternative | Ada_Concat_Operand | Ada_Contract_Cases | Ada_Discrete_Subtype_Name | Ada_Synthetic_Identifier | Ada_Format_String_Tok_End .. Ada_Limited_Present | Ada_Mode_Default .. Ada_Null_Component_Decl | Ada_Overriding_Not_Overriding .. Ada_Pp_Then_Kw | Ada_Private_Absent .. Ada_Quantifier_Some | Ada_Renaming_Clause .. Ada_Reverse_Present | Ada_Error_Stmt | Ada_Subp_Kind_Function .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_Tagged_Present | Ada_Type_Attributes_Repository | Ada_Anonymous_Type_Access_Def | Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_Until_Present | Ada_Variant | Ada_With_Private_Absent .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.xref_equation
                  Property_Result := Ada_Node_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Constrained_Array_Indices =>
                  --# property-call-start ConstrainedArrayIndices.xref_equation
                  Property_Result := Constrained_Array_Indices_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Unconstrained_Array_Indices =>
                  --# property-call-start UnconstrainedArrayIndices.xref_equation
                  Property_Result := Unconstrained_Array_Indices_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Aspect_Assoc =>
                  --# property-call-start AspectAssoc.xref_equation
                  Property_Result := Aspect_Assoc_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_At_Clause =>
                  --# property-call-start AtClause.xref_equation
                  Property_Result := At_Clause_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Attribute_Def_Clause =>
                  --# property-call-start AttributeDefClause.xref_equation
                  Property_Result := Attribute_Def_Clause_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Rep_Clause =>
                  --# property-call-start EnumRepClause.xref_equation
                  Property_Result := Enum_Rep_Clause_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Record_Rep_Clause =>
                  --# property-call-start RecordRepClause.xref_equation
                  Property_Result := Record_Rep_Clause_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Subp_Spec .. Ada_Synthetic_Unary_Spec =>
                  --# property-call-start BaseSubpSpec.xref_equation
                  Property_Result := Base_Subp_Spec_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Spec =>
                  --# property-call-start EntrySpec.xref_equation
                  Property_Result := Entry_Spec_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Aggregate_Assoc .. Ada_Multi_Dim_Array_Assoc =>
                  --# property-call-start AggregateAssoc.xref_equation
                  Property_Result := Aggregate_Assoc_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Iterated_Assoc =>
                  --# property-call-start IteratedAssoc.xref_equation
                  Property_Result := Iterated_Assoc_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Param_Assoc =>
                  --# property-call-start ParamAssoc.xref_equation
                  Property_Result := Param_Assoc_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl =>
                  --# property-call-start ComponentDecl.xref_equation
                  Property_Result := Component_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Discriminant_Spec =>
                  --# property-call-start DiscriminantSpec.xref_equation
                  Property_Result := Discriminant_Spec_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Param_Spec =>
                  --# property-call-start ParamSpec.xref_equation
                  Property_Result := Param_Spec_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Decl =>
                  --# property-call-start SubtypeDecl.xref_equation
                  Property_Result := Subtype_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Incomplete_Formal_Type_Decl =>
                  --# property-call-start IncompleteFormalTypeDecl.xref_equation
                  Property_Result := Incomplete_Formal_Type_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Protected_Type_Decl =>
                  --# property-call-start ProtectedTypeDecl.xref_equation
                  Property_Result := Protected_Type_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start TaskTypeDecl.xref_equation
                  Property_Result := Task_Type_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Concrete_Type_Decl =>
                  --# property-call-start TypeDecl.xref_equation
                  Property_Result := Type_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Formal_Type_Decl =>
                  --# property-call-start FormalTypeDecl.xref_equation
                  Property_Result := Formal_Type_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Formal_Subp_Decl .. Ada_Concrete_Formal_Subp_Decl =>
                  --# property-call-start FormalSubpDecl.xref_equation
                  Property_Result := Formal_Subp_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Expr_Function =>
                  --# property-call-start ExprFunction.xref_equation
                  Property_Result := Expr_Function_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Subp_Renaming_Decl =>
                  --# property-call-start SubpRenamingDecl.xref_equation
                  Property_Result := Subp_Renaming_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Body =>
                  --# property-call-start EntryBody.xref_equation
                  Property_Result := Entry_Body_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Index_Spec =>
                  --# property-call-start EntryIndexSpec.xref_equation
                  Property_Result := Entry_Index_Spec_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Exception_Decl =>
                  --# property-call-start ExceptionDecl.xref_equation
                  Property_Result := Exception_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Exception_Handler =>
                  --# property-call-start ExceptionHandler.xref_equation
                  Property_Result := Exception_Handler_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_For_Loop_Var_Decl =>
                  --# property-call-start ForLoopVarDecl.xref_equation
                  Property_Result := For_Loop_Var_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Instantiation .. Ada_Generic_Subp_Instantiation =>
                  --# property-call-start GenericInstantiation.xref_equation
                  Property_Result := Generic_Instantiation_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Renaming_Decl .. Ada_Generic_Subp_Renaming_Decl =>
                  --# property-call-start GenericRenamingDecl.xref_equation
                  Property_Result := Generic_Renaming_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Number_Decl =>
                  --# property-call-start NumberDecl.xref_equation
                  Property_Result := Number_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_Extended_Return_Stmt_Object_Decl =>
                  --# property-call-start ObjectDecl.xref_equation
                  Property_Result := Object_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start NoTypeObjectRenamingDecl.xref_equation
                  Property_Result := No_Type_Object_Renaming_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Package_Renaming_Decl =>
                  --# property-call-start PackageRenamingDecl.xref_equation
                  Property_Result := Package_Renaming_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Single_Protected_Decl =>
                  --# property-call-start SingleProtectedDecl.xref_equation
                  Property_Result := Single_Protected_Decl_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Case_Stmt_Alternative =>
                  --# property-call-start CaseStmtAlternative.xref_equation
                  Property_Result := Case_Stmt_Alternative_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Component_Clause =>
                  --# property-call-start ComponentClause.xref_equation
                  Property_Result := Component_Clause_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Component_Def =>
                  --# property-call-start ComponentDef.xref_equation
                  Property_Result := Component_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Composite_Constraint =>
                  --# property-call-start CompositeConstraint.xref_equation
                  Property_Result := Composite_Constraint_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Delta_Constraint =>
                  --# property-call-start DeltaConstraint.xref_equation
                  Property_Result := Delta_Constraint_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Digits_Constraint =>
                  --# property-call-start DigitsConstraint.xref_equation
                  Property_Result := Digits_Constraint_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Range_Constraint =>
                  --# property-call-start RangeConstraint.xref_equation
                  Property_Result := Range_Constraint_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Elsif_Stmt_Part =>
                  --# property-call-start ElsifStmtPart.xref_equation
                  Property_Result := Elsif_Stmt_Part_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_State_Decl_Expr =>
                  --# property-call-start AbstractStateDeclExpr.xref_equation
                  Property_Result := Abstract_State_Decl_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Allocator =>
                  --# property-call-start Allocator.xref_equation
                  Property_Result := Allocator_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Aggregate .. Ada_Null_Record_Aggregate =>
                  --# property-call-start BaseAggregate.xref_equation
                  Property_Result := Base_Aggregate_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Bin_Op .. Ada_Relation_Op =>
                  --# property-call-start BinOp.xref_equation
                  Property_Result := Bin_Op_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Box_Expr =>
                  --# property-call-start BoxExpr.xref_equation
                  Property_Result := Box_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Concat_Op =>
                  --# property-call-start ConcatOp.xref_equation
                  Property_Result := Concat_Op_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Case_Expr =>
                  --# property-call-start CaseExpr.xref_equation
                  Property_Result := Case_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_If_Expr =>
                  --# property-call-start IfExpr.xref_equation
                  Property_Result := If_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Decl_Expr =>
                  --# property-call-start DeclExpr.xref_equation
                  Property_Result := Decl_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Format_String_Literal =>
                  --# property-call-start FormatStringLiteral.xref_equation
                  Property_Result := Format_String_Literal_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Membership_Expr =>
                  --# property-call-start MembershipExpr.xref_equation
                  Property_Result := Membership_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Array_Subcomponent_Choice_Name =>
                  --# property-call-start ArraySubcomponentChoiceName.xref_equation
                  Property_Result := Array_Subcomponent_Choice_Name_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Attribute_Ref =>
                  --# property-call-start AttributeRef.xref_equation
                  Property_Result := Attribute_Ref_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.xref_equation
                  Property_Result := Call_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
                  --# property-call-start DefiningName.xref_equation
                  Property_Result := Defining_Name_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.xref_equation
                  Property_Result := Dotted_Name_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_End_Name =>
                  --# property-call-start EndName.xref_equation
                  Property_Result := End_Name_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Explicit_Deref =>
                  --# property-call-start ExplicitDeref.xref_equation
                  Property_Result := Explicit_Deref_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Qual_Expr =>
                  --# property-call-start QualExpr.xref_equation
                  Property_Result := Qual_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Reduce_Attribute_Ref =>
                  --# property-call-start ReduceAttributeRef.xref_equation
                  Property_Result := Reduce_Attribute_Ref_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Identifier =>
                  --# property-call-start BaseId.xref_equation
                  Property_Result := Base_Id_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Char_Literal =>
                  --# property-call-start CharLiteral.xref_equation
                  Property_Result := Char_Literal_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Op_Abs .. Ada_Op_Xor =>
                  --# property-call-start Op.xref_equation
                  Property_Result := Op_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_String_Literal =>
                  --# property-call-start StringLiteral.xref_equation
                  Property_Result := String_Literal_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Null_Literal =>
                  --# property-call-start NullLiteral.xref_equation
                  Property_Result := Null_Literal_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Int_Literal =>
                  --# property-call-start IntLiteral.xref_equation
                  Property_Result := Int_Literal_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Real_Literal =>
                  --# property-call-start RealLiteral.xref_equation
                  Property_Result := Real_Literal_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Target_Name =>
                  --# property-call-start TargetName.xref_equation
                  Property_Result := Target_Name_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Update_Attribute_Ref =>
                  --# property-call-start UpdateAttributeRef.xref_equation
                  Property_Result := Update_Attribute_Ref_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Paren_Expr =>
                  --# property-call-start ParenExpr.xref_equation
                  Property_Result := Paren_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Quantified_Expr =>
                  --# property-call-start QuantifiedExpr.xref_equation
                  Property_Result := Quantified_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Raise_Expr =>
                  --# property-call-start RaiseExpr.xref_equation
                  Property_Result := Raise_Expr_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Un_Op =>
                  --# property-call-start UnOp.xref_equation
                  Property_Result := Un_Op_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_For_Loop_Iter_Filter =>
                  --# property-call-start ForLoopIterFilter.xref_equation
                  Property_Result := For_Loop_Iter_Filter_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Format_String_Chunk =>
                  --# property-call-start FormatStringChunk.xref_equation
                  Property_Result := Format_String_Chunk_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_For_Loop_Spec =>
                  --# property-call-start ForLoopSpec.xref_equation
                  Property_Result := For_Loop_Spec_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_While_Loop_Spec =>
                  --# property-call-start WhileLoopSpec.xref_equation
                  Property_Result := While_Loop_Spec_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Others_Designator =>
                  --# property-call-start OthersDesignator.xref_equation
                  Property_Result := Others_Designator_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Pragma_Node =>
                  --# property-call-start Pragma.xref_equation
                  Property_Result := Pragma_Node_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Range_Spec =>
                  --# property-call-start RangeSpec.xref_equation
                  Property_Result := Range_Spec_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Select_When_Part =>
                  --# property-call-start SelectWhenPart.xref_equation
                  Property_Result := Select_When_Part_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Accept_Stmt .. Ada_Accept_Stmt_With_Stmts =>
                  --# property-call-start AcceptStmt.xref_equation
                  Property_Result := Accept_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_For_Loop_Stmt .. Ada_While_Loop_Stmt =>
                  --# property-call-start BaseLoopStmt.xref_equation
                  Property_Result := Base_Loop_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Begin_Block .. Ada_Decl_Block =>
                  --# property-call-start BlockStmt.xref_equation
                  Property_Result := Block_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Case_Stmt =>
                  --# property-call-start CaseStmt.xref_equation
                  Property_Result := Case_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Extended_Return_Stmt =>
                  --# property-call-start ExtendedReturnStmt.xref_equation
                  Property_Result := Extended_Return_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_If_Stmt =>
                  --# property-call-start IfStmt.xref_equation
                  Property_Result := If_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Named_Stmt =>
                  --# property-call-start NamedStmt.xref_equation
                  Property_Result := Named_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Select_Stmt =>
                  --# property-call-start SelectStmt.xref_equation
                  Property_Result := Select_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Abort_Stmt =>
                  --# property-call-start AbortStmt.xref_equation
                  Property_Result := Abort_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Assign_Stmt =>
                  --# property-call-start AssignStmt.xref_equation
                  Property_Result := Assign_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Call_Stmt =>
                  --# property-call-start CallStmt.xref_equation
                  Property_Result := Call_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Delay_Stmt =>
                  --# property-call-start DelayStmt.xref_equation
                  Property_Result := Delay_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Exit_Stmt =>
                  --# property-call-start ExitStmt.xref_equation
                  Property_Result := Exit_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Goto_Stmt =>
                  --# property-call-start GotoStmt.xref_equation
                  Property_Result := Goto_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Label =>
                  --# property-call-start Label.xref_equation
                  Property_Result := Label_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Null_Stmt =>
                  --# property-call-start NullStmt.xref_equation
                  Property_Result := Null_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Raise_Stmt =>
                  --# property-call-start RaiseStmt.xref_equation
                  Property_Result := Raise_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Requeue_Stmt =>
                  --# property-call-start RequeueStmt.xref_equation
                  Property_Result := Requeue_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Return_Stmt =>
                  --# property-call-start ReturnStmt.xref_equation
                  Property_Result := Return_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Simple_Decl_Stmt =>
                  --# property-call-start SimpleDeclStmt.xref_equation
                  Property_Result := Simple_Decl_Stmt_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Terminate_Alternative =>
                  --# property-call-start TerminateAlternative.xref_equation
                  Property_Result := Terminate_Alternative_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Subunit =>
                  --# property-call-start Subunit.xref_equation
                  Property_Result := Subunit_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Task_Def =>
                  --# property-call-start TaskDef.xref_equation
                  Property_Result := Task_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Access_To_Subp_Def =>
                  --# property-call-start AccessToSubpDef.xref_equation
                  Property_Result := Access_To_Subp_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Type_Access_Def =>
                  --# property-call-start TypeAccessDef.xref_equation
                  Property_Result := Type_Access_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Array_Type_Def =>
                  --# property-call-start ArrayTypeDef.xref_equation
                  Property_Result := Array_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.xref_equation
                  Property_Result := Derived_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Type_Def =>
                  --# property-call-start EnumTypeDef.xref_equation
                  Property_Result := Enum_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Formal_Discrete_Type_Def =>
                  --# property-call-start FormalDiscreteTypeDef.xref_equation
                  Property_Result := Formal_Discrete_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Interface_Type_Def =>
                  --# property-call-start InterfaceTypeDef.xref_equation
                  Property_Result := Interface_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Mod_Int_Type_Def =>
                  --# property-call-start ModIntTypeDef.xref_equation
                  Property_Result := Mod_Int_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Private_Type_Def =>
                  --# property-call-start PrivateTypeDef.xref_equation
                  Property_Result := Private_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Decimal_Fixed_Point_Def =>
                  --# property-call-start DecimalFixedPointDef.xref_equation
                  Property_Result := Decimal_Fixed_Point_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Floating_Point_Def =>
                  --# property-call-start FloatingPointDef.xref_equation
                  Property_Result := Floating_Point_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Ordinary_Fixed_Point_Def =>
                  --# property-call-start OrdinaryFixedPointDef.xref_equation
                  Property_Result := Ordinary_Fixed_Point_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Record_Type_Def =>
                  --# property-call-start RecordTypeDef.xref_equation
                  Property_Result := Record_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Signed_Int_Type_Def =>
                  --# property-call-start SignedIntTypeDef.xref_equation
                  Property_Result := Signed_Int_Type_Def_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type =>
                  --# property-call-start AnonymousType.xref_equation
                  Property_Result := Anonymous_Type_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
                  --# property-call-start SubtypeIndication.xref_equation
                  Property_Result := Subtype_Indication_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Use_Package_Clause =>
                  --# property-call-start UsePackageClause.xref_equation
                  Property_Result := Use_Package_Clause_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Use_Type_Clause =>
                  --# property-call-start UseTypeClause.xref_equation
                  Property_Result := Use_Type_Clause_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Value_Sequence =>
                  --# property-call-start ValueSequence.xref_equation
                  Property_Result := Value_Sequence_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Variant_Part =>
                  --# property-call-start VariantPart.xref_equation
                  Property_Result := Variant_Part_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_With_Clause =>
                  --# property-call-start WithClause.xref_equation
                  Property_Result := With_Clause_P_Xref_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Xref_Equation;
--# end
--# property-start '[dispatcher]AdaNode.xref_stop_resolution' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Xref_Stop_Resolution
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_Record_Def | Ada_Composite_Constraint_Assoc | Ada_Param_Assoc .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_Quantifier_Some | Ada_Renaming_Clause .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.xref_stop_resolution
                  Property_Result := Ada_Node_P_Xref_Stop_Resolution
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Aggregate_Assoc .. Ada_Multi_Dim_Array_Assoc =>
                  --# property-call-start AggregateAssoc.xref_stop_resolution
                  Property_Result := Aggregate_Assoc_P_Xref_Stop_Resolution
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Iterated_Assoc =>
                  --# property-call-start IteratedAssoc.xref_stop_resolution
                  Property_Result := Iterated_Assoc_P_Xref_Stop_Resolution
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.xref_stop_resolution
                  Property_Result := Call_Expr_P_Xref_Stop_Resolution
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Range_Spec =>
                  --# property-call-start RangeSpec.xref_stop_resolution
                  Property_Result := Range_Spec_P_Xref_Stop_Resolution
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Xref_Stop_Resolution;
--# end
--# property-start '[dispatcher]AdaNode.stop_resolution_equation' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Stop_Resolution_Equation
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.stop_resolution_equation
                  Property_Result := Ada_Node_P_Stop_Resolution_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.stop_resolution_equation
                  Property_Result := Call_Expr_P_Stop_Resolution_Equation
                    (Self
                        , Env
                        , Origin
                        , Entry_Point
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Stop_Resolution_Equation;
--# end
--# property-start '[dispatcher]AdaNode.xref_entry_point' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Ada_Node_P_Xref_Entry_Point
  (Node : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Ada_Node (Self.Kind) is
               when Ada_Abort_Absent .. Ada_Unconstrained_Array_Indices | Ada_Aspect_Spec .. Ada_Pragma_Argument_Assoc | Ada_Component_List .. Ada_Iterated_Assoc | Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Formal_Obj_Decl .. Ada_Generic_Formal_Type_Decl | Ada_Synthetic_Formal_Param_Decl .. Ada_Discrete_Base_Subtype_Decl | Ada_Classwide_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl | Ada_Abstract_Subp_Decl | Ada_Subp_Decl .. Ada_Accept_Stmt_Body | Ada_Null_Subp_Decl .. Ada_Subp_Body | Ada_Package_Body_Stub .. Ada_Task_Body_Stub | Ada_Package_Body .. Ada_Task_Body | Ada_Error_Decl | Ada_For_Loop_Var_Decl .. Ada_Generic_Subp_Decl | Ada_Label_Decl .. Ada_Named_Stmt_Decl | Ada_Single_Task_Decl .. Ada_Synthetic_Object_Decl | Ada_Compilation_Unit | Ada_Component_Def .. Ada_Elsif_Expr_Part | Ada_Abstract_State_Decl_Expr .. Ada_Call_Expr | Ada_Discrete_Subtype_Name .. Ada_Dotted_Name | Ada_Explicit_Deref .. Ada_Un_Op | Ada_Format_String_Chunk .. Ada_Limited_Present | Ada_While_Loop_Spec .. Ada_Pp_Then_Kw | Ada_Private_Absent .. Ada_Select_When_Part | Ada_Subp_Kind_Function .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_Type_Access_Def | Ada_Derived_Type_Def .. Ada_Until_Present | Ada_Value_Sequence .. Ada_Variant | Ada_With_Private_Absent .. Ada_With_Private_Present =>
                  --# property-call-start AdaNode.xref_entry_point
                  Property_Result := Ada_Node_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Aspect_Assoc =>
                  --# property-call-start AspectAssoc.xref_entry_point
                  Property_Result := Aspect_Assoc_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_At_Clause .. Ada_Record_Rep_Clause =>
                  --# property-call-start AspectClause.xref_entry_point
                  Property_Result := Aspect_Clause_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Entry_Spec .. Ada_Synthetic_Unary_Spec =>
                  --# property-call-start BaseSubpSpec.xref_entry_point
                  Property_Result := Base_Subp_Spec_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Param_Assoc =>
                  --# property-call-start ParamAssoc.xref_entry_point
                  Property_Result := Param_Assoc_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Component_Decl =>
                  --# property-call-start ComponentDecl.xref_entry_point
                  Property_Result := Component_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Discriminant_Spec =>
                  --# property-call-start DiscriminantSpec.xref_entry_point
                  Property_Result := Discriminant_Spec_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Param_Spec =>
                  --# property-call-start ParamSpec.xref_entry_point
                  Property_Result := Param_Spec_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Subtype_Decl =>
                  --# property-call-start SubtypeDecl.xref_entry_point
                  Property_Result := Subtype_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Protected_Type_Decl =>
                  --# property-call-start ProtectedTypeDecl.xref_entry_point
                  Property_Result := Protected_Type_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start TaskTypeDecl.xref_entry_point
                  Property_Result := Task_Type_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Concrete_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.xref_entry_point
                  Property_Result := Type_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Synth_Anonymous_Type_Decl =>
                  --# property-call-start AnonymousTypeDecl.xref_entry_point
                  Property_Result := Anonymous_Type_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Abstract_Formal_Subp_Decl .. Ada_Concrete_Formal_Subp_Decl =>
                  --# property-call-start FormalSubpDecl.xref_entry_point
                  Property_Result := Formal_Subp_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Expr_Function =>
                  --# property-call-start ExprFunction.xref_entry_point
                  Property_Result := Expr_Function_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Subp_Renaming_Decl =>
                  --# property-call-start SubpRenamingDecl.xref_entry_point
                  Property_Result := Subp_Renaming_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Entry_Body =>
                  --# property-call-start EntryBody.xref_entry_point
                  Property_Result := Entry_Body_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Entry_Index_Spec =>
                  --# property-call-start EntryIndexSpec.xref_entry_point
                  Property_Result := Entry_Index_Spec_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Exception_Decl =>
                  --# property-call-start ExceptionDecl.xref_entry_point
                  Property_Result := Exception_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Exception_Handler =>
                  --# property-call-start ExceptionHandler.xref_entry_point
                  Property_Result := Exception_Handler_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Generic_Package_Instantiation .. Ada_Generic_Subp_Instantiation =>
                  --# property-call-start GenericInstantiation.xref_entry_point
                  Property_Result := Generic_Instantiation_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Generic_Package_Renaming_Decl .. Ada_Generic_Subp_Renaming_Decl =>
                  --# property-call-start GenericRenamingDecl.xref_entry_point
                  Property_Result := Generic_Renaming_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Number_Decl =>
                  --# property-call-start NumberDecl.xref_entry_point
                  Property_Result := Number_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.xref_entry_point
                  Property_Result := Object_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Package_Renaming_Decl =>
                  --# property-call-start PackageRenamingDecl.xref_entry_point
                  Property_Result := Package_Renaming_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Single_Protected_Decl =>
                  --# property-call-start SingleProtectedDecl.xref_entry_point
                  Property_Result := Single_Protected_Decl_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Case_Stmt_Alternative =>
                  --# property-call-start CaseStmtAlternative.xref_entry_point
                  Property_Result := Case_Stmt_Alternative_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Component_Clause =>
                  --# property-call-start ComponentClause.xref_entry_point
                  Property_Result := Component_Clause_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Elsif_Stmt_Part =>
                  --# property-call-start ElsifStmtPart.xref_entry_point
                  Property_Result := Elsif_Stmt_Part_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
                  --# property-call-start DefiningName.xref_entry_point
                  Property_Result := Defining_Name_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_End_Name =>
                  --# property-call-start EndName.xref_entry_point
                  Property_Result := End_Name_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_For_Loop_Iter_Filter =>
                  --# property-call-start ForLoopIterFilter.xref_entry_point
                  Property_Result := For_Loop_Iter_Filter_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_For_Loop_Spec =>
                  --# property-call-start ForLoopSpec.xref_entry_point
                  Property_Result := For_Loop_Spec_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Pragma_Node =>
                  --# property-call-start Pragma.xref_entry_point
                  Property_Result := Pragma_Node_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Accept_Stmt .. Ada_Terminate_Alternative =>
                  --# property-call-start Stmt.xref_entry_point
                  Property_Result := Stmt_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Subunit =>
                  --# property-call-start Subunit.xref_entry_point
                  Property_Result := Subunit_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Array_Type_Def =>
                  --# property-call-start ArrayTypeDef.xref_entry_point
                  Property_Result := Array_Type_Def_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Use_Package_Clause .. Ada_Use_Type_Clause =>
                  --# property-call-start UseClause.xref_entry_point
                  Property_Result := Use_Clause_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_Variant_Part =>
                  --# property-call-start VariantPart.xref_entry_point
                  Property_Result := Variant_Part_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
               when Ada_With_Clause =>
                  --# property-call-start WithClause.xref_entry_point
                  Property_Result := With_Clause_P_Xref_Entry_Point
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Ada_Node_P_Xref_Entry_Point;
--# end
--# property-start AdaNode.matching_with_use_clause ada/nodes.lkt:2198
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Matching_With_Use_Clause
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
            procedure Finalizer_Scope_2056 with Inline_Always;
      Var_Expr_0 : Bare_Use_Package_Clause;
Var_Expr_1 : Internal_Entity_With_Clause;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Use_Package_Clause;
Fld : Internal_Entity;
Cast_Result_1 : Internal_Entity_With_Clause;
Fld_1 : Bare_Name_List;
Len : Integer;
Fld_2 : Internal_Entity_Name_List;
Fld_3 : Bare_Name_List;
Len_1 : Integer;
Is_Equal : Boolean;
Fld_4 : Bare_Name_List;
Get_Result : Bare_Name;
Fld_5 : Symbol_Type_Array_Access;
Fld_6 : Internal_Entity_Name_List;
Fld_7 : Bare_Name_List;
Fld_8 : Internal_Entity_Info;
Get_Result_1 : Bare_Name;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld_9 : Symbol_Type_Array_Access;
Is_Equal_1 : Boolean;
If_Result_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
            procedure Finalizer_Scope_2056 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_9);
            end Finalizer_Scope_2056;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 1061 '<Cast to UsePackageClause at nodes.lkt:2199:9>' Cast_Result ada/nodes.lkt:2199
Cast_Expr := Self; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Use_Package_Clause_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 1061
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind uc Var_Expr_0
--# expr-start 1063 '<Cast to WithClause at nodes.lkt:2201:13>' Cast_Result_1 ada/nodes.lkt:2201
--# expr-start 1062 '<FieldAccess for previous_sibling at nodes.lkt:2201:13>' Fld ada/nodes.lkt:2201
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Previous_Sibling (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1062
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_With_Clause_Range
   then
      Cast_Result_1 := Create_Internal_Entity_With_Clause
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result_1 := No_Entity_With_Clause;
   end if;
--# expr-done 1063
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Entity_With_Clause then
   --# scope-start
   --# bind wc Var_Expr_1
--# expr-start 1075 '<BooleanBinaryOp And at nodes.lkt:2203:17>' If_Result_1 ada/nodes.lkt:2203
--# expr-start 1068 '<Eq at nodes.lkt:2203:17>' Is_Equal ada/nodes.lkt:2203
--# expr-start 1065 '<length at nodes.lkt:2203:17>' Len ada/nodes.lkt:2203
--# expr-start 1064 '<FieldAccess for packages at nodes.lkt:2203:17>' Fld_1 ada/nodes.lkt:2203
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Var_Expr_0.Use_Package_Clause_F_Packages;
--# expr-done 1064
Len := Length (Fld_1); 
--# expr-done 1065
--# expr-start 1067 '<length at nodes.lkt:2203:41>' Len_1 ada/nodes.lkt:2203
--# expr-start 1066 '<FieldAccess for packages at nodes.lkt:2203:41>' Fld_2 ada/nodes.lkt:2203
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name_List (Node => Var_Expr_1.Node.With_Clause_F_Packages, Info => Var_Expr_1.Info);
--# expr-done 1066
Fld_3 := Fld_2.Node; 
Len_1 := Length (Fld_3); 
--# expr-done 1067
Is_Equal := Len = Len_1; 
--# expr-done 1068
if Is_Equal then
   --# expr-start 1074 '<Eq at nodes.lkt:2204:21>' Is_Equal_1 ada/nodes.lkt:2204
--# expr-start 1071 '<FieldAccess for as_symbol_array at nodes.lkt:2204:21>' Fld_5 ada/nodes.lkt:2204
--# expr-start 1070 '<at_or_raise at nodes.lkt:2204:21>' Get_Result ada/nodes.lkt:2204
--# expr-start 1069 '<FieldAccess for packages at nodes.lkt:2204:21>' Fld_4 ada/nodes.lkt:2204
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Var_Expr_0.Use_Package_Clause_F_Packages;
--# expr-done 1069
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Get_Result := Get (Self, Fld_4, 0, False); 
--# expr-done 1070
      if Get_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_5 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Get_Result);
--# end
--# expr-done 1071
--# expr-start 1073 '<FieldAccess for as_symbol_array at nodes.lkt:2205:20>' Fld_9 ada/nodes.lkt:2205
--# expr-start 1072 '<FieldAccess for packages at nodes.lkt:2205:20>' Fld_6 ada/nodes.lkt:2205
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Name_List (Node => Var_Expr_1.Node.With_Clause_F_Packages, Info => Var_Expr_1.Info);
--# expr-done 1072
Fld_7 := Fld_6.Node;
      if Fld_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Get_Result_1 := Get (Self, Fld_7, 0, False); 
Is_Null := Get_Result_1 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_8 := Fld_6.Info;
As_Entity := (Info => Fld_8, Node => Get_Result_1); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_9 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => If_Result.Node);
--# end
--# expr-done 1073
Is_Equal_1 := Equivalent (Fld_5, Fld_9); 
--# expr-done 1074
   If_Result_1 := Is_Equal_1;
else
   If_Result_1 := False;
end if;
--# expr-done 1075
Scope_Result := If_Result_1;
   --# end
      Finalizer_Scope_2056;
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2056;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Matching_With_Use_Clause;
--# end
--# property-start AdaNode.custom_id_text ada/nodes.lkt:2105
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Custom_Id_Text
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : String_Type;
            procedure Finalizer_Scope_123 with Inline_Always;
      Str : String_Type;
            procedure Finalizer_Scope_123 is
            begin
                     Dec_Ref (Str);
            end Finalizer_Scope_123;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1076 '<String at nodes.lkt:2105:36>' Str ada/nodes.lkt:2105
Str := Create_String (""); 
--# expr-done 1076
         Property_Result := Str;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_123;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_123;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Custom_Id_Text;
--# end
--# property-start AdaNode.complete_items ada/nodes.lkt:2111
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Complete_Items
  (Node : Bare_Ada_Node
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Completion_Item_Array_Access
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_124 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Info;
Fld_3 : Internal_Metadata;
Fld_4 : Boolean;
Fld_5 : Boolean;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_6 : Integer;
New_Struct : Internal_Completion_Item;
Map_Result : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_124 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_124;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1087 '<Map at nodes.lkt:2112:9>' Map_Result ada/nodes.lkt:2112
   --# expr-start 1078 '<FieldAccess for env_get_public at nodes.lkt:2112:9>' Fld_1 ada/nodes.lkt:2112
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1077 '<FieldAccess for children_env at nodes.lkt:2112:29>' Fld ada/nodes.lkt:2112
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Self);
--# expr-done 1077
--# property-call-start AdaNode.env_get_public
Fld_1 := Libadalang.Implementation.Ada_Node_P_Env_Get_Public (Node => Self, Env => Fld, Symbol => No_Symbol);
--# end
--# expr-done 1078
      declare
         Map_Result_Vec : Internal_Completion_Item_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
      --# expr-start 1086 '<New CompletionItem at nodes.lkt:2114:13>' New_Struct ada/nodes.lkt:2114
--# expr-start 1079 '<Cast to BasicDecl at nodes.lkt:2115:22>' Cast_Result ada/nodes.lkt:2115
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 1079
--# expr-start 1082 '<FieldAccess for dottable_subp at nodes.lkt:2116:29>' Fld_4 ada/nodes.lkt:2116
--# expr-start 1081 '<FieldAccess for md at nodes.lkt:2116:29>' Fld_3 ada/nodes.lkt:2116
--# expr-start 1080 '<FieldAccess for info at nodes.lkt:2116:29>' Fld_2 ada/nodes.lkt:2116
Fld_2 := Item_0.Info;
--# expr-done 1080
Fld_3 := Fld_2.Md;
--# expr-done 1081
Fld_4 := Fld_3.Dottable_Subp;
--# expr-done 1082
--# expr-start 1083 '<FieldAccess for has_visibility at nodes.lkt:2117:28>' Fld_5 ada/nodes.lkt:2117
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_5 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 1083
--# expr-start 1085 '<FieldAccess for complete_item_weight at nodes.lkt:2118:24>' Fld_6 ada/nodes.lkt:2118
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1084 '<Cast to BasicDecl at nodes.lkt:2118:50>' Cast_Result_1 ada/nodes.lkt:2118
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 1084
--# property-call-start '[dispatcher]AdaNode.complete_item_weight'
Fld_6 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Complete_Item_Weight (Node => Ent.Node, Item => Cast_Result_1, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1085
New_Struct := (Decl => Cast_Result, Is_Dot_Call => Fld_4, Is_Visible => Fld_5, Weight => Fld_6); 
--# expr-done 1086
         declare
            Item_To_Append : constant Internal_Completion_Item := New_Struct;
         begin
            Internal_Completion_Item_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Completion_Item_Array
           (Items_Count => Natural (Internal_Completion_Item_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Completion_Item_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Completion_Item_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Completion_Item_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1087
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_124;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_124;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Complete_Items;
--# end
--# property-start AdaNode.complete_item_weight ada/nodes.lkt:2130
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Complete_Item_Weight
  (Node : Bare_Ada_Node
      ; Item : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind item Item
   --# bind origin Origin
   Property_Result : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := 0;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Complete_Item_Weight;
--# end
--# property-start AdaNode.spark_mode_aspect ada/nodes.lkt:2146
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Spark_Mode_Aspect
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
     Ent : Internal_Entity :=
       Internal_Entity'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Aspect;
      Fld : Internal_Entity;
Fld_1 : Internal_Aspect;
Fld_2 : Internal_Entity;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Internal_Aspect;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1093 '<If at nodes.lkt:2147:9>' If_Result ada/nodes.lkt:2147
--# expr-start 1090 '<Not at nodes.lkt:2147:12>' Not_Val ada/nodes.lkt:2147
--# expr-start 1089 '<IsNull at nodes.lkt:2147:16>' Is_Null ada/nodes.lkt:2147
--# expr-start 1088 '<parent at nodes.lkt:2147:16>' Fld_2 ada/nodes.lkt:2147
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1088
Is_Null := Fld_2.Node = null; 
--# expr-done 1089
Not_Val := not (Is_Null); 
--# expr-done 1090
if Not_Val then
   --# expr-start 1092 '<FieldAccess for spark_mode_aspect at nodes.lkt:2147:41>' Fld_1 ada/nodes.lkt:2147
--# expr-start 1091 '<parent at nodes.lkt:2147:41>' Fld ada/nodes.lkt:2147
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1091
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.spark_mode_aspect'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Spark_Mode_Aspect (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 1092
   If_Result := Fld_1;
else
   If_Result := raise Precondition_Failure with "SPARK Mode does not apply here";
end if;
--# expr-done 1093
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Spark_Mode_Aspect;
--# end
--# property-start AdaNode.immediate_declarative_region ada/nodes.lkt:2161
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Immediate_Declarative_Region
  (Node : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Empty_Env;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Immediate_Declarative_Region;
--# end
--# property-start AdaNode.xref_equation ada/nodes.lkt:2173
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Xref_Equation
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property AdaNode.xref_equation not implemented";
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Xref_Equation;
--# end
--# property-start AdaNode.xref_stop_resolution ada/nodes.lkt:2179
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Xref_Stop_Resolution
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Xref_Stop_Resolution;
--# end
--# property-start AdaNode.stop_resolution_equation ada/nodes.lkt:2182
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Stop_Resolution_Equation
  (Node : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_130 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_130 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_130;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2182:48") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_130;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_130;
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Stop_Resolution_Equation;
--# end
--# property-start AdaNode.xref_entry_point ada/nodes.lkt:2193
pragma Warnings (Off, "is not referenced");
 function Ada_Node_P_Xref_Entry_Point
  (Node : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Ada_Node  := Bare_Ada_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ada_Node_P_Xref_Entry_Point;
--# end
function Ada_Node_P_Resolve_Generic_Actual
  (E : Entity
  ) return Internal_Entity
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
   declare
      Result : constant Internal_Entity :=
         Ada_Node_P_Resolve_Generic_Actual (E.Node, E_Info);
   begin
         return (Node => Result.Node, Info => Result.Info);
   end;
end;
function Ada_Node_P_Use_Clauses_In_Spec_Of_Subp_Body
  (E : Entity
  ) return Lexical_Env
is
begin
   declare
      Result : constant Lexical_Env :=
         Ada_Node_P_Use_Clauses_In_Spec_Of_Subp_Body (E.Node);
   begin
         return Result;
   end;
end;
function Ada_Node_P_Use_Clauses_In_Generic_Formal_Part
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
   declare
      Result : constant Lexical_Env :=
         Ada_Node_P_Use_Clauses_In_Generic_Formal_Part (E.Node, E_Info);
   begin
         return Result;
   end;
end;
function Ada_Node_P_Nested_Generic_Formal_Part
  (E : Entity
  ) return Lexical_Env
is
begin
   declare
      Result : constant Lexical_Env :=
         Ada_Node_P_Nested_Generic_Formal_Part (E.Node);
   begin
         return Result;
   end;
end;
   --
   --  Primitives for Bare_Abort_Node
   --
--# property-start '[dispatcher]Abort.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Abort_Node_P_As_Bool
  (Node : Bare_Abort_Node
  )
   return Boolean
is
   Self : Bare_Abort_Node  := Bare_Abort_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Abort_Node (Self.Kind) is
               when Ada_Abort_Absent =>
                  --# property-call-start Abort.Absent.as_bool
                  Property_Result := Abort_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Abort_Present =>
                  --# property-call-start Abort.Present.as_bool
                  Property_Result := Abort_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Abort_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Abort_Absent
   --
--# property-start Abort.Absent.as_bool ada/nodes.lkt:2212
pragma Warnings (Off, "is not referenced");
 function Abort_Absent_P_As_Bool
  (Node : Bare_Abort_Absent
  )
   return Boolean
is
   Self : Bare_Abort_Absent  := Bare_Abort_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Abort_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Abort_Present
   --
--# property-start Abort.Present.as_bool ada/nodes.lkt:2212
pragma Warnings (Off, "is not referenced");
 function Abort_Present_P_As_Bool
  (Node : Bare_Abort_Present
  )
   return Boolean
is
   Self : Bare_Abort_Present  := Bare_Abort_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Abort_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Abstract_Node
   --
--# property-start '[dispatcher]Abstract.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Abstract_Node_P_As_Bool
  (Node : Bare_Abstract_Node
  )
   return Boolean
is
   Self : Bare_Abstract_Node  := Bare_Abstract_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Abstract_Node (Self.Kind) is
               when Ada_Abstract_Absent =>
                  --# property-call-start Abstract.Absent.as_bool
                  Property_Result := Abstract_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Abstract_Present =>
                  --# property-call-start Abstract.Present.as_bool
                  Property_Result := Abstract_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Abstract_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Abstract_Absent
   --
--# property-start Abstract.Absent.as_bool ada/nodes.lkt:2217
pragma Warnings (Off, "is not referenced");
 function Abstract_Absent_P_As_Bool
  (Node : Bare_Abstract_Absent
  )
   return Boolean
is
   Self : Bare_Abstract_Absent  := Bare_Abstract_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Abstract_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Abstract_Present
   --
--# property-start Abstract.Present.as_bool ada/nodes.lkt:2217
pragma Warnings (Off, "is not referenced");
 function Abstract_Present_P_As_Bool
  (Node : Bare_Abstract_Present
  )
   return Boolean
is
   Self : Bare_Abstract_Present  := Bare_Abstract_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Abstract_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Ada_List
   --
   --
   --  Primitives for Bare_Ada_Node_List
   --
   --
   --  Primitives for Bare_Abstract_State_Decl_List
   --
   --
   --  Primitives for Bare_Alternatives_List
   --
--# property-start AlternativesList.enum_type ada/nodes.lkt:2228
pragma Warnings (Off, "is not referenced");
 function Alternatives_List_P_Enum_Type
  (Node : Bare_Alternatives_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Alternatives_List  := Bare_Alternatives_List (Node);
     Ent : Internal_Entity_Alternatives_List :=
       Internal_Entity_Alternatives_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Case_Stmt;
Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Fld_2 : Internal_Entity;
Cast_Result : Internal_Entity_Case_Stmt;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 1097 '<Cast to CaseStmt at nodes.lkt:2229:9>' Cast_Result ada/nodes.lkt:2229
--# expr-start 1096 '<parent at nodes.lkt:2229:9>' Fld_2 ada/nodes.lkt:2229
--# expr-start 1095 '<parent at nodes.lkt:2229:9>' Fld_1 ada/nodes.lkt:2229
--# expr-start 1094 '<parent at nodes.lkt:2229:9>' Fld ada/nodes.lkt:2229
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1094
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 1095
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# expr-done 1096
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Case_Stmt_Range
   then
      Cast_Result := Create_Internal_Entity_Case_Stmt
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Case_Stmt;
   end if;
--# expr-done 1097
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Case_Stmt then
   --# scope-start
   --# bind cs Var_Expr_0
--# expr-start 1099 '<FieldAccess for expression_type at nodes.lkt:2230:21>' Fld_4 ada/nodes.lkt:2230
--# expr-start 1098 '<FieldAccess for expr at nodes.lkt:2230:21>' Fld_3 ada/nodes.lkt:2230
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Var_Expr_0.Node.Case_Stmt_F_Expr, Info => Var_Expr_0.Info);
--# expr-done 1098
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_4 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 1099
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Alternatives_List_P_Enum_Type;
--# end
--# property-start AlternativesList.complete_items ada/nodes.lkt:2235
pragma Warnings (Off, "is not referenced");
 function Alternatives_List_P_Complete_Items
  (Node : Bare_Alternatives_List
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Completion_Item_Array_Access
is
   Self : Bare_Alternatives_List  := Bare_Alternatives_List (Node);
     Ent : Internal_Entity_Alternatives_List :=
       Internal_Entity_Alternatives_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_156 with Inline_Always;
      Match_0 : Internal_Entity_Enum_Literal_Decl;
Match_1 : Internal_Entity;
Fld : Lexical_Env := Empty_Env;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Info;
Fld_2 : Internal_Metadata;
Fld_3 : Boolean;
Fld_4 : Boolean;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Internal_Entity_Type_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Integer;
Match_Prefix : Internal_Entity;
Cast_Result_3 : Internal_Entity_Enum_Literal_Decl;
Let_Result : Integer;
Scope_Result : Integer;
Cast_Result_4 : Internal_Entity;
Let_Result_1 : Integer;
Scope_Result_1 : Integer;
Match_Result : Integer;
New_Struct : Internal_Completion_Item;
Map_Result : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_156 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_156;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1113 '<Map at nodes.lkt:2236:9>' Map_Result ada/nodes.lkt:2236
   --# expr-start 1101 '<EnvGet at nodes.lkt:2236:9>' Env_Get_Result ada/nodes.lkt:2236
--# expr-start 1100 '<FieldAccess for children_env at nodes.lkt:2236:9>' Fld ada/nodes.lkt:2236
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Self);
--# expr-done 1100
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld, Key => Thin (No_Symbol), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 1101
      declare
         Map_Result_Vec : Internal_Completion_Item_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
      --# expr-start 1112 '<New CompletionItem at nodes.lkt:2238:13>' New_Struct ada/nodes.lkt:2238
--# expr-start 1102 '<Cast to BasicDecl at nodes.lkt:2239:22>' Cast_Result ada/nodes.lkt:2239
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 1102
--# expr-start 1105 '<FieldAccess for dottable_subp at nodes.lkt:2240:29>' Fld_3 ada/nodes.lkt:2240
--# expr-start 1104 '<FieldAccess for md at nodes.lkt:2240:29>' Fld_2 ada/nodes.lkt:2240
--# expr-start 1103 '<FieldAccess for info at nodes.lkt:2240:29>' Fld_1 ada/nodes.lkt:2240
Fld_1 := Item_0.Info;
--# expr-done 1103
Fld_2 := Fld_1.Md;
--# expr-done 1104
Fld_3 := Fld_2.Dottable_Subp;
--# expr-done 1105
--# expr-start 1106 '<FieldAccess for has_visibility at nodes.lkt:2241:28>' Fld_4 ada/nodes.lkt:2241
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_4 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 1106
--# expr-start 1111 '<Match at nodes.lkt:2242:24>' Match_Result ada/nodes.lkt:2242
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Enum_Literal_Decl .. Ada_Synthetic_Char_Enum_Lit =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Enum_Literal_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_3; 
--# bind eld Match_0
--# expr-start 1110 '<If at nodes.lkt:2244:25>' If_Result ada/nodes.lkt:2244
--# expr-start 1109 '<Eq at nodes.lkt:2244:28>' Is_Equiv ada/nodes.lkt:2244
--# expr-start 1107 '<FieldAccess for enum_type at nodes.lkt:2244:28>' Fld_5 ada/nodes.lkt:2244
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AlternativesList.enum_type
Fld_5 := Libadalang.Implementation.Alternatives_List_P_Enum_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1107
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
--# expr-start 1108 '<FieldAccess for enum_type at nodes.lkt:2244:48>' Fld_6 ada/nodes.lkt:2244
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]EnumLiteralDecl.enum_type'
Fld_6 := Libadalang.Implementation.Dispatcher_Enum_Literal_Decl_P_Enum_Type (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 1108
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 1109
if Is_Equiv then
   If_Result := 100;
else
   If_Result := 0;
end if;
--# expr-done 1110
Let_Result := If_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abort_Absent .. Ada_Entry_Decl | Ada_Generic_Subp_Internal .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_4; 
--# bind _ Match_1
Let_Result_1 := 0; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 1111
New_Struct := (Decl => Cast_Result, Is_Dot_Call => Fld_3, Is_Visible => Fld_4, Weight => Match_Result); 
--# expr-done 1112
         declare
            Item_To_Append : constant Internal_Completion_Item := New_Struct;
         begin
            Internal_Completion_Item_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Completion_Item_Array
           (Items_Count => Natural (Internal_Completion_Item_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Completion_Item_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Completion_Item_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Completion_Item_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1113
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_156;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_156;
            raise;
      end;
   return Property_Result;
end Alternatives_List_P_Complete_Items;
--# end
   --
   --  Primitives for Bare_Constraint_List
   --
   --
   --  Primitives for Bare_Decl_List
   --
   --
   --  Primitives for Bare_Stmt_List
   --
   --
   --  Primitives for Bare_Aspect_Assoc_List
   --
   --
   --  Primitives for Bare_Base_Assoc_List
   --
   --
   --  Primitives for Bare_Basic_Assoc_List
   --
   --
   --  Primitives for Bare_Assoc_List
   --
--# property-start AssocList.actual_for_param_at ada/nodes.lkt:2267
pragma Warnings (Off, "is not referenced");
 function Assoc_List_P_Actual_For_Param_At
  (Node : Bare_Assoc_List
      ; Param : Internal_Entity_Defining_Name
      ; Pos : Integer
      ; Default_Expr : Internal_Entity_Expr
         := No_Entity_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Assoc_List  := Bare_Assoc_List (Node);
     Ent : Internal_Entity_Assoc_List :=
       Internal_Entity_Assoc_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind param Param
   --# bind pos Pos
   --# bind default_expr Default_Expr
   Property_Result : Internal_Entity_Expr;
            procedure Finalizer_Scope_160 with Inline_Always;
      Local_Up : Internal_Single_Actual_Array_Access;
Var_Expr_1 : Internal_Single_Actual;
Var_Expr_32 : Bare_Base_Id;
Fld : Internal_Single_Actual_Array_Access;
Fld_1 : Bare_Base_Id;
Fld_2 : Internal_Entity_Name;
Fld_3 : Bare_Name;
Fld_4 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Find_Result : Internal_Single_Actual;
Fld_5 : Internal_Entity_Basic_Assoc;
Fld_6 : Internal_Entity_Expr;
Scope_Result_1 : Internal_Entity_Expr;
Get_Result : Internal_Single_Actual;
Fld_7 : Internal_Entity_Basic_Assoc;
Fld_8 : Internal_Entity_Expr;
Get_Result_1 : Internal_Single_Actual;
Is_Equal : Boolean;
Get_Result_2 : Internal_Single_Actual;
Fld_9 : Internal_Entity_Basic_Assoc;
Fld_10 : Bare_Ada_Node_Array_Access;
Is_Equal_1 : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Expr;
Result_Var_1 : Internal_Entity_Expr;
Let_Result : Internal_Entity_Expr;
            procedure Finalizer_Scope_160 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Up);
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_160;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1134 '<Let at nodes.lkt:2272:9>' Let_Result ada/nodes.lkt:2272
--# scope-start
--# expr-start 1114 '<FieldAccess for unpacked_params at nodes.lkt:2272:18>' Fld ada/nodes.lkt:2272
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.unpacked_params
Fld := Libadalang.Implementation.Assoc_List_P_Unpacked_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1114
Local_Up := Fld; Inc_Ref (Local_Up);
--# bind up Local_Up
--# expr-start 1119 '<Find at nodes.lkt:2274:9>' Find_Result ada/nodes.lkt:2274
      Find_Result := No_Single_Actual;
      declare
         Collection : constant Internal_Single_Actual_Array_Access := Local_Up;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
--# expr-start 1115 '<FieldAccess for name at nodes.lkt:2276:20>' Fld_1 ada/nodes.lkt:2276
Fld_1 := Item_0.Name;
--# expr-done 1115
Var_Expr_32 := Fld_1;
if Var_Expr_32 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 1118 '<FieldAccess for matches at nodes.lkt:2276:20>' Fld_4 ada/nodes.lkt:2276
      if Var_Expr_32 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1117 '<FieldAccess for node at nodes.lkt:2276:36>' Fld_3 ada/nodes.lkt:2276
--# expr-start 1116 '<FieldAccess for name at nodes.lkt:2276:36>' Fld_2 ada/nodes.lkt:2276
      if Param.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Param.Node.Defining_Name_F_Name, Info => Param.Info);
--# expr-done 1116
Fld_3 := Fld_2.Node;
--# expr-done 1117
--# property-call-start Name.matches
Fld_4 := Libadalang.Implementation.Name_P_Matches (Node => Var_Expr_32, N => Fld_3);
--# end
--# expr-done 1118
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
--# expr-done 1119
Var_Expr_1 := Find_Result;
if Var_Expr_1 /= No_Single_Actual then
   --# scope-start
   --# bind a Var_Expr_1
--# expr-start 1121 '<FieldAccess for expr at nodes.lkt:2279:20>' Fld_6 ada/nodes.lkt:2279
--# expr-start 1120 '<FieldAccess for assoc at nodes.lkt:2279:20>' Fld_5 ada/nodes.lkt:2279
Fld_5 := Var_Expr_1.Assoc;
--# expr-done 1120
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 1121
Scope_Result_1 := Fld_6;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 1133 '<If at nodes.lkt:2281:25>' If_Result_1 ada/nodes.lkt:2281
--# expr-start 1129 '<BooleanBinaryOp Or at nodes.lkt:2282:17>' If_Result ada/nodes.lkt:2282
--# expr-start 1123 '<IsNull at nodes.lkt:2282:17>' Is_Equal ada/nodes.lkt:2282
--# expr-start 1122 '<at at nodes.lkt:2282:17>' Get_Result_1 ada/nodes.lkt:2282
Get_Result_1 := Get (Self, Local_Up, Pos, True); 
--# expr-done 1122
Is_Equal := Get_Result_1 = No_Single_Actual; 
--# expr-done 1123
if Is_Equal then
   If_Result := True;
else
   --# expr-start 1128 '<Not at nodes.lkt:2282:37>' Not_Val ada/nodes.lkt:2282
--# expr-start 1127 '<IsNull at nodes.lkt:2282:41>' Is_Equal_1 ada/nodes.lkt:2282
--# expr-start 1126 '<FieldAccess for names at nodes.lkt:2282:41>' Fld_10 ada/nodes.lkt:2282
--# expr-start 1125 '<FieldAccess for assoc at nodes.lkt:2282:41>' Fld_9 ada/nodes.lkt:2282
--# expr-start 1124 '<at at nodes.lkt:2282:41>' Get_Result_2 ada/nodes.lkt:2282
Get_Result_2 := Get (Self, Local_Up, Pos, True); 
--# expr-done 1124
Fld_9 := Get_Result_2.Assoc;
--# expr-done 1125
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Fld_9.Node);
--# end
--# expr-done 1126
Is_Equal_1 := Equivalent (Fld_10, No_Bare_Ada_Node_Array_Type); 
--# expr-done 1127
Not_Val := not (Is_Equal_1); 
--# expr-done 1128
   If_Result := Not_Val;
end if;
--# expr-done 1129
if If_Result then
   If_Result_1 := Default_Expr;
else
   --# expr-start 1132 '<FieldAccess for expr at nodes.lkt:2290:17>' Fld_8 ada/nodes.lkt:2290
--# expr-start 1131 '<FieldAccess for assoc at nodes.lkt:2290:17>' Fld_7 ada/nodes.lkt:2290
--# expr-start 1130 '<at at nodes.lkt:2290:17>' Get_Result ada/nodes.lkt:2290
Get_Result := Get (Self, Local_Up, Pos, True); 
--# expr-done 1130
Fld_7 := Get_Result.Assoc;
--# expr-done 1131
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_8 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 1132
   If_Result_1 := Fld_8;
end if;
--# expr-done 1133
   Result_Var_1 := If_Result_1;
end if;
Let_Result := Result_Var_1; 
--# end
--# expr-done 1134
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_160;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_160;
            raise;
      end;
   return Property_Result;
end Assoc_List_P_Actual_For_Param_At;
--# end
--# property-start AssocList.unpacked_params ada/nodes.lkt:2299
pragma Warnings (Off, "is not referenced");
 function Assoc_List_P_Unpacked_Params
  (Node : Bare_Assoc_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Single_Actual_Array_Access
is
   Self : Bare_Assoc_List  := Bare_Assoc_List (Node);
     Ent : Internal_Entity_Assoc_List :=
       Internal_Entity_Assoc_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Single_Actual_Array_Access;
            procedure Finalizer_Scope_161 with Inline_Always;
            procedure Finalizer_Scope_2064 with Inline_Always;
      Local_Names : Bare_Ada_Node_Array_Access;
Saved : Internal_Entity_Assoc_List;
Fld : Bare_Assoc_List;
Fld_1 : Internal_Entity_Info;
Item_0 : Internal_Entity_Basic_Assoc;
Bare_Item_0 : Bare_Basic_Assoc;
Fld_2 : Bare_Ada_Node_Array_Access;
Cast_Expr : Bare_Identifier;
Cast_Result : Bare_Base_Id;
New_Struct : Internal_Single_Actual;
Array_Lit : Internal_Single_Actual_Array_Access;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_1 : Bare_Base_Id;
New_Struct_1 : Internal_Single_Actual;
Is_A : Boolean;
Map_Result : Internal_Single_Actual_Array_Access;
Len : Integer;
Is_Equal : Boolean;
If_Result : Internal_Single_Actual_Array_Access;
Let_Result : Internal_Single_Actual_Array_Access;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Basic_Assoc;
Map_Result_1 : Internal_Single_Actual_Array_Access;
            procedure Finalizer_Scope_161 is
            begin
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_161;
            procedure Finalizer_Scope_2064 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Local_Names);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Map_Result);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_2064;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Assoc_List_Assoc_List_P_Unpacked_Params,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Assoc_List,
                                As_Bare_Assoc_List => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Single_Actual_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1146 '<Mapcat at nodes.lkt:2300:9>' Map_Result_1 ada/nodes.lkt:2300
Saved := Ent; 
Fld := Saved.Node;
      declare
         Map_Result_1_Vec : Internal_Single_Actual_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result_1 := Create_Internal_Single_Actual_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result_1 := No_Entity_Basic_Assoc;
else
Fld_1 := Saved.Info;
As_Entity := (Info => Fld_1, Node => Bare_Item_0); 
   If_Result_1 := As_Entity;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind pa Item_0
      --# expr-start 1145 '<Let at nodes.lkt:2302:17>' Let_Result ada/nodes.lkt:2302
--# scope-start
--# expr-start 1135 '<FieldAccess for names at nodes.lkt:2302:29>' Fld_2 ada/nodes.lkt:2302
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Item_0.Node);
--# end
--# expr-done 1135
Local_Names := Fld_2; Inc_Ref (Local_Names);
--# bind names Local_Names
--# expr-start 1144 '<If at nodes.lkt:2304:17>' If_Result ada/nodes.lkt:2304
--# expr-start 1137 '<Eq at nodes.lkt:2304:20>' Is_Equal ada/nodes.lkt:2304
--# expr-start 1136 '<length at nodes.lkt:2304:20>' Len ada/nodes.lkt:2304
Len := Length (Local_Names); 
--# expr-done 1136
Is_Equal := Len = 0; 
--# expr-done 1137
if Is_Equal then
   --# expr-start 1139 '<ArrayLiteral at nodes.lkt:2305:22>' Array_Lit ada/nodes.lkt:2305
--# expr-start 1138 '<New SingleActual at nodes.lkt:2305:23>' New_Struct ada/nodes.lkt:2305
Cast_Expr := No_Bare_Ada_Node; 
      Cast_Result := Cast_Expr;
New_Struct := (Assoc => Item_0, Name => Cast_Result); 
--# expr-done 1138
Array_Lit := Create_Internal_Single_Actual_Array (Internal_Internal_Single_Actual_Array'(1 => New_Struct)); 
--# expr-done 1139
   If_Result := Array_Lit;
else
   --# expr-start 1143 '<Map at nodes.lkt:2307:21>' Map_Result ada/nodes.lkt:2307
      declare
         Map_Result_Vec : Internal_Single_Actual_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Local_Names;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind i Item_1
         --# expr-start 1140 '<IsA BaseId at nodes.lkt:2309:32>' Is_A ada/nodes.lkt:2309
Is_A := Item_1 /= null 
and then Item_1.Kind in Ada_Base_Id; 
--# expr-done 1140
         if Is_A then
      --# expr-start 1142 '<New SingleActual at nodes.lkt:2308:32>' New_Struct_1 ada/nodes.lkt:2308
--# expr-start 1141 '<Cast to BaseId at nodes.lkt:2308:50>' Cast_Result_1 ada/nodes.lkt:2308
Cast_Expr_1 := Item_1; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Base_Id
   then
      Cast_Result_1 := Cast_Expr_1;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 1141
New_Struct_1 := (Assoc => Item_0, Name => Cast_Result_1); 
--# expr-done 1142
         declare
            Item_To_Append : constant Internal_Single_Actual := New_Struct_1;
         begin
            Internal_Single_Actual_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Single_Actual_Array
           (Items_Count => Natural (Internal_Single_Actual_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Single_Actual_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Single_Actual_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Single_Actual_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1143
   If_Result := Map_Result;
end if;
      Inc_Ref (If_Result);
--# expr-done 1144
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 1145
         for Item_To_Append of
               Let_Result.Items
         loop
            Internal_Single_Actual_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2064;
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Internal_Single_Actual_Array
           (Items_Count => Natural (Internal_Single_Actual_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Single_Actual_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Single_Actual_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Single_Actual_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 1146
         Property_Result := Map_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_161;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_161;
                     Finalizer_Scope_2064;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Single_Actual_Array_Access,
                        As_Internal_Single_Actual_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Assoc_List_P_Unpacked_Params;
--# end
--# property-start AssocList.zip_with_params ada/nodes.lkt:2319
pragma Warnings (Off, "is not referenced");
 function Assoc_List_P_Zip_With_Params
  (Node : Bare_Assoc_List
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Actual_Array_Access
is
   Self : Bare_Assoc_List  := Bare_Assoc_List (Node);
     Ent : Internal_Entity_Assoc_List :=
       Internal_Entity_Assoc_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_162 with Inline_Always;
            procedure Finalizer_Scope_2067 with Inline_Always;
            procedure Finalizer_Scope_2068 with Inline_Always;
            procedure Finalizer_Scope_2069 with Inline_Always;
            procedure Finalizer_Scope_2070 with Inline_Always;
            procedure Finalizer_Scope_2071 with Inline_Always;
            procedure Finalizer_Scope_2072 with Inline_Always;
            procedure Finalizer_Scope_2073 with Inline_Always;
            procedure Finalizer_Scope_2074 with Inline_Always;
            procedure Finalizer_Scope_2075 with Inline_Always;
            procedure Finalizer_Scope_2077 with Inline_Always;
            procedure Finalizer_Scope_2079 with Inline_Always;
            procedure Finalizer_Scope_2081 with Inline_Always;
            procedure Finalizer_Scope_2087 with Inline_Always;
      Local_Is_Dottable_Subp : Boolean;
Var_Expr_0 : Internal_Entity_Name;
Local_Params : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Var_Expr_1 : Internal_Entity;
Match_0 : Internal_Entity_Call_Expr;
Match_1 : Internal_Entity_Generic_Instantiation;
Match_2 : Internal_Entity_Composite_Constraint;
Match_3 : Internal_Entity_Base_Aggregate;
Match_4 : Internal_Entity;
Local_Others_Assoc : Internal_Entity_Basic_Assoc;
Local_Explicit_Matches : Internal_Param_Actual_Array_Access;
Var_Expr_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Local_Default_Subp_Matches : Internal_Param_Actual_Array_Access;
Var_Expr_6 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Local_Decl : Internal_Entity_Generic_Formal_Subp_Decl;
Local_Subp : Internal_Entity_Formal_Subp_Decl;
Var_Expr_8 : Internal_Entity_Generic_Formal_Subp_Decl;
Var_Expr_9 : Internal_Entity_Formal_Subp_Decl;
Local_Given_Matches : Internal_Param_Actual_Array_Access;
Local_Others_Matches : Internal_Param_Actual_Array_Access;
Var_Expr_11 : Internal_Entity_Basic_Assoc;
Var_Expr_33 : Internal_Entity_Base_Formal_Param_Holder;
Var_Expr_34 : Internal_Entity_Generic_Decl;
Var_Expr_35 : Internal_Entity_Base_Type_Decl;
Var_Expr_36 : Internal_Entity_Base_Record_Def;
Var_Expr_37 : Internal_Entity_Basic_Decl;
Bound_Imprecise_Fallback : Boolean;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Name;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Dyn_Var_Bind_Result : Boolean;
Fld_2 : Internal_Entity;
Fld_3 : Internal_Entity_Base_Formal_Param_Holder;
Fld_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_5 : Internal_Entity_Generic_Decl;
Fld_6 : Internal_Entity_Generic_Formal_Part;
Fld_7 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Cast_Expr : Bare_Assoc_List;
Cast_Result_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_10 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_11 : Internal_Entity_Base_Type_Decl;
Fld_12 : Internal_Entity_Base_Record_Def;
Fld_13 : Internal_Entity_Component_List;
Fld_14 : Internal_Entity_Base_Type_Decl;
Fld_15 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Dyn_Var_Bind_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Dyn_Var_Bind_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Match_Prefix : Internal_Entity;
Cast_Result_2 : Internal_Entity_Call_Expr;
Let_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_5 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Cast_Result_3 : Internal_Entity_Generic_Instantiation;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_6 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Cast_Result_4 : Internal_Entity_Composite_Constraint;
Let_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_7 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Cast_Result_5 : Internal_Entity_Base_Aggregate;
Let_Result_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_8 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Cast_Result_6 : Internal_Entity;
Let_Result_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_9 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Match_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_10 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_5 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Saved : Internal_Entity_Assoc_List;
Fld_16 : Bare_Assoc_List;
Fld_17 : Internal_Entity_Info;
Item_2 : Internal_Entity_Basic_Assoc;
Bare_Item_2 : Bare_Basic_Assoc;
Fld_18 : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Quantifier_Result : Boolean;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Find_Result : Internal_Entity_Basic_Assoc;
Fld_19 : Internal_Param_Match_Array_Access;
Fld_20 : Internal_Entity_Defining_Name;
Fld_21 : Internal_Single_Actual;
Fld_22 : Internal_Entity_Basic_Assoc;
Fld_23 : Internal_Entity_Expr;
New_Struct : Internal_Param_Actual;
Map_Result : Internal_Param_Actual_Array_Access;
Scope_Result_11 : Internal_Param_Actual_Array_Access;
Result_Var_6 : Internal_Param_Actual_Array_Access;
Cast_Expr_1 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_7 : Internal_Entity_Generic_Formal_Subp_Decl;
Cast_Expr_2 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_8 : Internal_Entity_Generic_Formal_Subp_Decl;
Fld_24 : Internal_Entity_Basic_Decl;
Cast_Result_9 : Internal_Entity_Formal_Subp_Decl;
Fld_25 : Internal_Entity_Defining_Name;
Fld_26 : Internal_Entity_Expr;
Fld_27 : Internal_Entity;
Cast_Result_10 : Internal_Entity_Generic_Instantiation;
Fld_28 : Internal_Entity_Basic_Decl;
Fld_29 : Internal_Entity_Defining_Name;
Scope_Result_12 : Internal_Entity_Defining_Name;
Result_Var_7 : Internal_Entity_Defining_Name;
Cast_Result_11 : Internal_Entity_Expr;
Fld_30 : Internal_Entity_Expr;
Is_A_1 : Boolean;
If_Result_1 : Internal_Entity_Expr;
New_Struct_1 : Internal_Param_Actual;
Let_Result_5 : Internal_Param_Actual;
Let_Result_6 : Internal_Param_Actual;
Cast_Expr_3 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_12 : Internal_Entity_Generic_Formal_Subp_Decl;
Fld_31 : Internal_Entity_Basic_Decl;
Cast_Result_13 : Internal_Entity_Formal_Subp_Decl;
Fld_32 : Internal_Entity_Expr;
Is_A_2 : Boolean;
Fld_33 : Internal_Entity_Defining_Name;
Fld_34 : Internal_Entity_Defining_Name;
Cast_Result_14 : Internal_Entity;
Cast_Result_15 : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result_1 : Boolean;
Not_Val : Boolean;
If_Result_2 : Boolean;
Scope_Result_13 : Boolean;
Result_Var_8 : Boolean;
Scope_Result_14 : Boolean;
Result_Var_9 : Boolean;
Map_Result_1 : Internal_Param_Actual_Array_Access;
Scope_Result_15 : Internal_Param_Actual_Array_Access;
Result_Var_10 : Internal_Param_Actual_Array_Access;
Concat_Result : Internal_Param_Actual_Array_Access;
Fld_35 : Internal_Entity_Defining_Name_Array_Access;
Fld_36 : Internal_Entity_Expr;
New_Struct_2 : Internal_Param_Actual;
Fld_37 : Internal_Entity_Defining_Name;
Cast_Result_16 : Internal_Entity;
Cast_Expr_4 : Internal_Entity_Defining_Name;
Cast_Result_17 : Internal_Entity;
Is_Equiv_1 : Boolean;
Quantifier_Result_2 : Boolean;
Not_Val_1 : Boolean;
Map_Result_2 : Internal_Param_Actual_Array_Access;
Scope_Result_16 : Internal_Param_Actual_Array_Access;
Result_Var_11 : Internal_Param_Actual_Array_Access;
Concat_Result_1 : Internal_Param_Actual_Array_Access;
Let_Result_7 : Internal_Param_Actual_Array_Access;
Let_Result_8 : Internal_Param_Actual_Array_Access;
Let_Result_9 : Internal_Param_Actual_Array_Access;
Let_Result_10 : Internal_Param_Actual_Array_Access;
Let_Result_11 : Internal_Param_Actual_Array_Access;
Let_Result_12 : Internal_Param_Actual_Array_Access;
Let_Result_13 : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_162 is
            begin
                     Dec_Ref (Scope_Result_10);
                     Dec_Ref (Result_Var_5);
                     Dec_Ref (Local_Params);
                     Dec_Ref (Scope_Result_11);
                     Dec_Ref (Result_Var_6);
                     Dec_Ref (Local_Explicit_Matches);
                     Dec_Ref (Scope_Result_15);
                     Dec_Ref (Result_Var_10);
                     Dec_Ref (Local_Default_Subp_Matches);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Local_Given_Matches);
                     Dec_Ref (Scope_Result_16);
                     Dec_Ref (Result_Var_11);
                     Dec_Ref (Local_Others_Matches);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Let_Result_7);
                     Dec_Ref (Let_Result_8);
                     Dec_Ref (Let_Result_9);
                     Dec_Ref (Let_Result_10);
                     Dec_Ref (Let_Result_11);
                     Dec_Ref (Let_Result_12);
                     Dec_Ref (Let_Result_13);
            end Finalizer_Scope_162;
            procedure Finalizer_Scope_2067 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_8);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Scope_Result_9);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_2067;
            procedure Finalizer_Scope_2068 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_2068;
            procedure Finalizer_Scope_2069 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_2069;
            procedure Finalizer_Scope_2070 is
            begin
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
            end Finalizer_Scope_2070;
            procedure Finalizer_Scope_2071 is
            begin
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_2071;
            procedure Finalizer_Scope_2072 is
            begin
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
            end Finalizer_Scope_2072;
            procedure Finalizer_Scope_2073 is
            begin
                     Dec_Ref (Fld_9);
            end Finalizer_Scope_2073;
            procedure Finalizer_Scope_2074 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_2);
            end Finalizer_Scope_2074;
            procedure Finalizer_Scope_2075 is
            begin
                     Dec_Ref (Fld_15);
            end Finalizer_Scope_2075;
            procedure Finalizer_Scope_2077 is
            begin
                     Dec_Ref (Fld_18);
            end Finalizer_Scope_2077;
            procedure Finalizer_Scope_2079 is
            begin
                     Dec_Ref (Var_Expr_4);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2079;
            procedure Finalizer_Scope_2081 is
            begin
                     Dec_Ref (Var_Expr_6);
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_2081;
            procedure Finalizer_Scope_2087 is
            begin
                     Dec_Ref (Fld_35);
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_2087;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 1221 '<Let at nodes.lkt:2322:9>' Let_Result_13 ada/nodes.lkt:2322
--# scope-start
--# expr-start 1150 '<bind at nodes.lkt:2323:13>' Dyn_Var_Bind_Result ada/nodes.lkt:2323
Bound_Imprecise_Fallback := False; 
--# expr-start 1148 '<Cast to Name at nodes.lkt:2325:13>' Cast_Result ada/nodes.lkt:2325
--# expr-start 1147 '<parent at nodes.lkt:2325:13>' Fld ada/nodes.lkt:2325
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1147
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 1148
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind e Var_Expr_0
--# expr-start 1149 '<FieldAccess for is_dot_call at nodes.lkt:2325:44>' Fld_1 ada/nodes.lkt:2325
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_dot_call
Fld_1 := Libadalang.Implementation.Name_P_Is_Dot_Call (Node => Var_Expr_0.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1149
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Dyn_Var_Bind_Result := Result_Var; 
--# expr-done 1150
Local_Is_Dottable_Subp := Dyn_Var_Bind_Result; 
--# bind is_dottable_subp Local_Is_Dottable_Subp
--# expr-start 1220 '<Let at nodes.lkt:2327:9>' Let_Result_12 ada/nodes.lkt:2327
--# scope-start
--# expr-start 1151 '<parent at nodes.lkt:2328:13>' Fld_2 ada/nodes.lkt:2328
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1151
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 1167 '<Match at nodes.lkt:2330:17>' Match_Result ada/nodes.lkt:2330
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind e Match_0
--# expr-start 1152 '<FieldAccess for called_subp_spec at nodes.lkt:2332:25>' Fld_3 ada/nodes.lkt:2332
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.called_subp_spec
Fld_3 := Libadalang.Implementation.Name_P_Called_Subp_Spec (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 1152
Var_Expr_33 := Fld_3;
if Var_Expr_33 /= No_Entity_Base_Formal_Param_Holder then
   --# scope-start
--# expr-start 1153 '<FieldAccess for abstract_formal_params at nodes.lkt:2332:25>' Fld_4 ada/nodes.lkt:2332
      if Var_Expr_33.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Var_Expr_33.Node, E_Info => Var_Expr_33.Info);
--# end
--# expr-done 1153
Scope_Result_1 := Fld_4;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2069;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Let_Result := Result_Var_1; Inc_Ref (Let_Result);
--# end
Scope_Result_5 := Let_Result;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_2068;
            Match_Result := Scope_Result_5; Inc_Ref (Match_Result);
         when Ada_Generic_Package_Instantiation .. Ada_Generic_Subp_Instantiation =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Generic_Instantiation
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind i Match_1
--# expr-start 1154 '<FieldAccess for designated_generic_decl at nodes.lkt:2334:25>' Fld_5 ada/nodes.lkt:2334
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.designated_generic_decl'
Fld_5 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Designated_Generic_Decl (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 1154
Var_Expr_34 := Fld_5;
if Var_Expr_34 /= No_Entity_Generic_Decl then
   --# scope-start
--# expr-start 1156 '<FieldAccess for abstract_formal_params at nodes.lkt:2334:25>' Fld_7 ada/nodes.lkt:2334
--# expr-start 1155 '<FieldAccess for formal_part at nodes.lkt:2334:25>' Fld_6 ada/nodes.lkt:2334
      if Var_Expr_34.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Generic_Formal_Part (Node => Var_Expr_34.Node.Generic_Decl_F_Formal_Part, Info => Var_Expr_34.Info);
--# expr-done 1155
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 1156
Scope_Result_2 := Fld_7;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2071;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
Let_Result_1 := Result_Var_2; Inc_Ref (Let_Result_1);
--# end
Scope_Result_6 := Let_Result_1;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_2070;
            Match_Result := Scope_Result_6; Inc_Ref (Match_Result);
         when Ada_Composite_Constraint =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Composite_Constraint
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind c Match_2
--# expr-start 1157 '<FieldAccess for subtype at nodes.lkt:2338:25>' Fld_8 ada/nodes.lkt:2338
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.subtype
Fld_8 := Libadalang.Implementation.Constraint_P_Subtype (Node => Match_2.Node, E_Info => Match_2.Info);
--# end
--# expr-done 1157
Var_Expr_35 := Fld_8;
if Var_Expr_35 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1158 '<FieldAccess for discriminants_list at nodes.lkt:2338:25>' Fld_9 ada/nodes.lkt:2338
      if Var_Expr_35.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_9 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Var_Expr_35.Node, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_35.Info);
--# end
--# expr-done 1158
Scope_Result_3 := Fld_9;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2073;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
Let_Result_2 := Result_Var_3; Inc_Ref (Let_Result_2);
--# end
Scope_Result_7 := Let_Result_2;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_2072;
            Match_Result := Scope_Result_7; Inc_Ref (Match_Result);
         when Ada_Aggregate .. Ada_Null_Record_Aggregate =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Base_Aggregate
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_5; 
--# bind a Match_3
--# expr-start 1166 '<bind at nodes.lkt:2341:29>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:2341
Cast_Expr := Self; 
      Cast_Result_1 := Cast_Expr;
Bound_Origin := Cast_Result_1; 
--# expr-start 1165 '<bind at nodes.lkt:2342:29>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:2342
--# expr-start 1159 '<FieldAccess for node_env at nodes.lkt:2342:40>' Fld_10 ada/nodes.lkt:2342
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Node_Env (Node => Self);
--# expr-done 1159
Bound_Env := Fld_10; Inc_Ref (Bound_Env);
--# expr-start 1161 '<FieldAccess for record_def at nodes.lkt:2344:29>' Fld_12 ada/nodes.lkt:2344
--# expr-start 1160 '<FieldAccess for expression_type at nodes.lkt:2344:29>' Fld_11 ada/nodes.lkt:2344
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_11 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Match_3.Node, E_Info => Match_3.Info);
--# end
--# expr-done 1160
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_12 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Fld_11.Node, Origin => Bound_Origin, E_Info => Fld_11.Info);
--# end
--# expr-done 1161
Var_Expr_36 := Fld_12;
if Var_Expr_36 /= No_Entity_Base_Record_Def then
   --# scope-start
--# expr-start 1164 '<FieldAccess for abstract_formal_params_for_assocs at nodes.lkt:2344:29>' Fld_15 ada/nodes.lkt:2344
--# expr-start 1162 '<FieldAccess for components at nodes.lkt:2344:29>' Fld_13 ada/nodes.lkt:2344
      if Var_Expr_36.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Component_List (Node => Var_Expr_36.Node.Base_Record_Def_F_Components, Info => Var_Expr_36.Info);
--# expr-done 1162
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1163 '<FieldAccess for ancestor_expr_type at nodes.lkt:2350:49>' Fld_14 ada/nodes.lkt:2350
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.ancestor_expr_type
Fld_14 := Libadalang.Implementation.Base_Aggregate_P_Ancestor_Expr_Type (Node => Match_3.Node, E_Info => Match_3.Info);
--# end
--# expr-done 1163
--# property-call-start ComponentList.abstract_formal_params_for_assocs
Fld_15 := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_For_Assocs (Node => Fld_13.Node, Assocs => Ent, Stop_Recurse_At => Fld_14, Env => Bound_Env, Origin => Bound_Origin, E_Info => Fld_13.Info);
--# end
--# expr-done 1164
Scope_Result_4 := Fld_15;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2075;
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_4);
Dyn_Var_Bind_Result_1 := Result_Var_4; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 1165
Dyn_Var_Bind_Result_2 := Dyn_Var_Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result_2);
--# expr-done 1166
Let_Result_3 := Dyn_Var_Bind_Result_2; Inc_Ref (Let_Result_3);
--# end
Scope_Result_8 := Let_Result_3;
   Inc_Ref (Scope_Result_8);
   --# end
      Finalizer_Scope_2074;
            Match_Result := Scope_Result_8; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Generic_Subp_Decl | Ada_Generic_Package_Renaming_Decl .. Ada_Constant_Present | Ada_Delta_Constraint .. Ada_Allocator | Ada_Bin_Op .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_6; 
--# bind _ Match_4
Let_Result_4 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type; Inc_Ref (Let_Result_4);
--# end
Scope_Result_9 := Let_Result_4;
   Inc_Ref (Scope_Result_9);
   --# end
            Match_Result := Scope_Result_9; Inc_Ref (Match_Result);
end case;
--# expr-done 1167
Scope_Result_10 := Match_Result;
   Inc_Ref (Scope_Result_10);
   --# end
      Finalizer_Scope_2067;
   Result_Var_5 := Scope_Result_10;
else
   Result_Var_5 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_5);
Local_Params := Result_Var_5; Inc_Ref (Local_Params);
--# bind params Local_Params
--# expr-start 1219 '<Let at nodes.lkt:2356:9>' Let_Result_11 ada/nodes.lkt:2356
--# scope-start
--# expr-start 1171 '<Find at nodes.lkt:2357:13>' Find_Result ada/nodes.lkt:2357
Saved := Ent; 
Fld_16 := Saved.Node;
      Find_Result := No_Entity_Basic_Assoc;
      if Fld_16 = null then
      Find_Result := No_Entity_Basic_Assoc;
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_16;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_2 := Untyped_Item_2; 
Is_Null := Bare_Item_2 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_17 := Saved.Info;
As_Entity := (Info => Fld_17, Node => Bare_Item_2); 
   If_Result := As_Entity;
end if;
                  Item_2 := If_Result; 
   --# scope-start
               --# bind assoc Item_2
      --# expr-start 1170 '<AnyQuantifier at nodes.lkt:2358:28>' Quantifier_Result ada/nodes.lkt:2358
   --# expr-start 1168 '<FieldAccess for names at nodes.lkt:2358:28>' Fld_18 ada/nodes.lkt:2358
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_18 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Item_2.Node);
--# end
--# expr-done 1168
      Quantifier_Result := False;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Fld_18;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_3
      --# expr-start 1169 '<IsA OthersDesignator at nodes.lkt:2358:53>' Is_A ada/nodes.lkt:2358
Is_A := Item_3 /= null 
and then Item_3.Kind in Ada_Others_Designator_Range; 
--# expr-done 1169
      Quantifier_Result := Is_A;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 1170
      if Quantifier_Result then
         Find_Result := Item_2; 
      end if;
   --# end
      Finalizer_Scope_2077;
               exit when Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 1171
Local_Others_Assoc := Find_Result; 
--# bind others_assoc Local_Others_Assoc
--# expr-start 1218 '<Let at nodes.lkt:2360:9>' Let_Result_10 ada/nodes.lkt:2360
--# scope-start
Var_Expr_4 := Local_Params;
      Inc_Ref (Var_Expr_4);
if Var_Expr_4 /= No_Internal_Entity_Base_Formal_Param_Decl_Array_Type then
   --# scope-start
   --# bind _ Var_Expr_4
--# expr-start 1178 '<Map at nodes.lkt:2363:17>' Map_Result ada/nodes.lkt:2363
   --# expr-start 1172 '<FieldAccess for match_formals at nodes.lkt:2363:17>' Fld_19 ada/nodes.lkt:2363
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.match_formals
Fld_19 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Self, Formal_Params => Local_Params, Params => Ent, Is_Dottable_Subp => Local_Is_Dottable_Subp);
--# end
--# expr-done 1172
      declare
         Map_Result_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_19;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_5
      --# expr-start 1177 '<New ParamActual at nodes.lkt:2365:21>' New_Struct ada/nodes.lkt:2365
--# expr-start 1175 '<FieldAccess for expr at nodes.lkt:2365:56>' Fld_23 ada/nodes.lkt:2365
--# expr-start 1174 '<FieldAccess for assoc at nodes.lkt:2365:56>' Fld_22 ada/nodes.lkt:2365
--# expr-start 1173 '<FieldAccess for actual at nodes.lkt:2365:56>' Fld_21 ada/nodes.lkt:2365
Fld_21 := Item_5.Actual;
--# expr-done 1173
Fld_22 := Fld_21.Assoc;
--# expr-done 1174
      if Fld_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_23 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_22.Node, E_Info => Fld_22.Info);
--# end
--# expr-done 1175
--# expr-start 1176 '<FieldAccess for formal at nodes.lkt:2365:39>' Fld_20 ada/nodes.lkt:2365
Fld_20 := Item_5.Formal;
--# expr-done 1176
New_Struct := (Actual => Fld_23, Param => Fld_20); 
--# expr-done 1177
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1178
Scope_Result_11 := Map_Result;
   Inc_Ref (Scope_Result_11);
   --# end
      Finalizer_Scope_2079;
   Result_Var_6 := Scope_Result_11;
else
   Result_Var_6 := No_Internal_Param_Actual_Array_Type;
end if;
      Inc_Ref (Result_Var_6);
Local_Explicit_Matches := Result_Var_6; Inc_Ref (Local_Explicit_Matches);
--# bind explicit_matches Local_Explicit_Matches
--# expr-start 1217 '<Let at nodes.lkt:2368:9>' Let_Result_9 ada/nodes.lkt:2368
--# scope-start
Var_Expr_6 := Local_Params;
      Inc_Ref (Var_Expr_6);
if Var_Expr_6 /= No_Internal_Entity_Base_Formal_Param_Decl_Array_Type then
   --# scope-start
   --# bind _ Var_Expr_6
--# expr-start 1206 '<Map at nodes.lkt:2371:17>' Map_Result_1 ada/nodes.lkt:2371
      declare
         Map_Result_1_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Formal_Param_Decl_Array_Access := Local_Params;
      begin
         for Item_7 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_7
--# expr-start 1179 '<Cast to GenericFormalSubpDecl at nodes.lkt:2395:21>' Cast_Result_12 ada/nodes.lkt:2395
Cast_Expr_3 := Item_7; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Generic_Formal_Subp_Decl_Range
   then
      Cast_Result_12 := Create_Internal_Entity_Generic_Formal_Subp_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_12 := No_Entity_Generic_Formal_Subp_Decl;
   end if;
--# expr-done 1179
Var_Expr_8 := Cast_Result_12;
if Var_Expr_8 /= No_Entity_Generic_Formal_Subp_Decl then
   --# scope-start
   --# bind fd Var_Expr_8
--# expr-start 1181 '<Cast to FormalSubpDecl at nodes.lkt:2397:25>' Cast_Result_13 ada/nodes.lkt:2397
--# expr-start 1180 '<FieldAccess for decl at nodes.lkt:2397:25>' Fld_31 ada/nodes.lkt:2397
      if Var_Expr_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Create_Internal_Entity_Basic_Decl (Node => Var_Expr_8.Node.Generic_Formal_F_Decl, Info => Var_Expr_8.Info);
--# expr-done 1180
   if Fld_31.Node = null
      or else Fld_31.Node.Kind in Ada_Formal_Subp_Decl
   then
      Cast_Result_13 := Create_Internal_Entity_Formal_Subp_Decl
        (Node => Fld_31.Node,
         Info => Fld_31.Info);
   else
         Cast_Result_13 := No_Entity_Formal_Subp_Decl;
   end if;
--# expr-done 1181
Var_Expr_9 := Cast_Result_13;
if Var_Expr_9 /= No_Entity_Formal_Subp_Decl then
   --# scope-start
   --# bind subp Var_Expr_9
--# expr-start 1189 '<BooleanBinaryOp And at nodes.lkt:2401:29>' If_Result_2 ada/nodes.lkt:2401
--# expr-start 1183 '<IsA BoxExpr, Name at nodes.lkt:2401:29>' Is_A_2 ada/nodes.lkt:2401
--# expr-start 1182 '<FieldAccess for default_expr at nodes.lkt:2401:29>' Fld_32 ada/nodes.lkt:2401
      if Var_Expr_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Create_Internal_Entity_Expr (Node => Var_Expr_9.Node.Formal_Subp_Decl_F_Default_Expr, Info => Var_Expr_9.Info);
--# expr-done 1182
Is_A_2 := Fld_32.Node /= null 
and then Fld_32.Node.Kind in Ada_Box_Expr_Range | Ada_Name; 
--# expr-done 1183
if Is_A_2 then
   --# expr-start 1188 '<Not at nodes.lkt:2404:33>' Not_Val ada/nodes.lkt:2404
--# expr-start 1187 '<AnyQuantifier at nodes.lkt:2404:37>' Quantifier_Result_1 ada/nodes.lkt:2404
      Quantifier_Result_1 := False;
      declare
         Collection : constant Internal_Param_Actual_Array_Access := Local_Explicit_Matches;
      begin
         for Item_10 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_10
      --# expr-start 1186 '<Eq at nodes.lkt:2405:40>' Is_Equiv ada/nodes.lkt:2405
--# expr-start 1184 '<FieldAccess for param at nodes.lkt:2405:40>' Fld_33 ada/nodes.lkt:2405
Fld_33 := Item_10.Param;
--# expr-done 1184
      Cast_Result_14 := Create_Internal_Entity
        (Node => Fld_33.Node,
         Info => Fld_33.Info);
--# expr-start 1185 '<FieldAccess for defining_name at nodes.lkt:2405:51>' Fld_34 ada/nodes.lkt:2405
      if Var_Expr_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_34 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_9.Node, E_Info => Var_Expr_9.Info);
--# end
--# expr-done 1185
      Cast_Result_15 := Create_Internal_Entity
        (Node => Fld_34.Node,
         Info => Fld_34.Info);
Is_Equiv := Equivalent (Cast_Result_14, Cast_Result_15); 
--# expr-done 1186
      Quantifier_Result_1 := Is_Equiv;
   --# end
               exit when Quantifier_Result_1;
         end loop;
      end;
--# expr-done 1187
Not_Val := not (Quantifier_Result_1); 
--# expr-done 1188
   If_Result_2 := Not_Val;
else
   If_Result_2 := False;
end if;
--# expr-done 1189
Scope_Result_13 := If_Result_2;
   --# end
   Result_Var_8 := Scope_Result_13;
else
   Result_Var_8 := False;
end if;
Scope_Result_14 := Result_Var_8;
   --# end
   Result_Var_9 := Scope_Result_14;
else
   Result_Var_9 := False;
end if;
         if Result_Var_9 then
      --# expr-start 1205 '<Let at nodes.lkt:2376:25>' Let_Result_6 ada/nodes.lkt:2376
--# scope-start
--# expr-start 1190 '<Cast to GenericFormalSubpDecl at nodes.lkt:2376:36>' Cast_Result_7 ada/nodes.lkt:2376
Cast_Expr_1 := Item_7; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Generic_Formal_Subp_Decl_Range
   then
      Cast_Result_7 := Create_Internal_Entity_Generic_Formal_Subp_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_7 := No_Entity_Generic_Formal_Subp_Decl;
   end if;
--# expr-done 1190
Local_Decl := Cast_Result_7; 
--# bind decl Local_Decl
--# expr-start 1204 '<Let at nodes.lkt:2377:25>' Let_Result_5 ada/nodes.lkt:2377
--# scope-start
--# expr-start 1193 '<Cast to FormalSubpDecl at nodes.lkt:2378:29>' Cast_Result_9 ada/nodes.lkt:2378
--# expr-start 1192 '<FieldAccess for decl at nodes.lkt:2378:29>' Fld_24 ada/nodes.lkt:2378
--# expr-start 1191 '<Cast to GenericFormalSubpDecl at nodes.lkt:2378:29>' Cast_Result_8 ada/nodes.lkt:2378
Cast_Expr_2 := Item_7; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Generic_Formal_Subp_Decl_Range
   then
      Cast_Result_8 := Create_Internal_Entity_Generic_Formal_Subp_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_8 := No_Entity_Generic_Formal_Subp_Decl;
   end if;
--# expr-done 1191
      if Cast_Result_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Create_Internal_Entity_Basic_Decl (Node => Cast_Result_8.Node.Generic_Formal_F_Decl, Info => Cast_Result_8.Info);
--# expr-done 1192
   if Fld_24.Node = null
      or else Fld_24.Node.Kind in Ada_Formal_Subp_Decl
   then
      Cast_Result_9 := Create_Internal_Entity_Formal_Subp_Decl
        (Node => Fld_24.Node,
         Info => Fld_24.Info);
   else
         Cast_Result_9 := No_Entity_Formal_Subp_Decl;
   end if;
--# expr-done 1193
Local_Subp := Cast_Result_9; 
--# bind subp Local_Subp
--# expr-start 1203 '<New ParamActual at nodes.lkt:2383:25>' New_Struct_1 ada/nodes.lkt:2383
--# expr-start 1201 '<If at nodes.lkt:2385:36>' If_Result_1 ada/nodes.lkt:2385
--# expr-start 1195 '<IsA Name at nodes.lkt:2385:39>' Is_A_1 ada/nodes.lkt:2385
--# expr-start 1194 '<FieldAccess for default_expr at nodes.lkt:2385:39>' Fld_30 ada/nodes.lkt:2385
      if Local_Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Create_Internal_Entity_Expr (Node => Local_Subp.Node.Formal_Subp_Decl_F_Default_Expr, Info => Local_Subp.Info);
--# expr-done 1194
Is_A_1 := Fld_30.Node /= null 
and then Fld_30.Node.Kind in Ada_Name; 
--# expr-done 1195
if Is_A_1 then
   --# expr-start 1196 '<FieldAccess for default_expr at nodes.lkt:2386:34>' Fld_26 ada/nodes.lkt:2386
      if Local_Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Create_Internal_Entity_Expr (Node => Local_Subp.Node.Formal_Subp_Decl_F_Default_Expr, Info => Local_Subp.Info);
--# expr-done 1196
   If_Result_1 := Fld_26;
else
--# expr-start 1199 '<FieldAccess for designated_subprogram_from at nodes.lkt:2388:33>' Fld_28 ada/nodes.lkt:2388
      if Local_Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1198 '<Cast to GenericInstantiation at nodes.lkt:2389:42>' Cast_Result_10 ada/nodes.lkt:2389
--# expr-start 1197 '<parent at nodes.lkt:2389:42>' Fld_27 ada/nodes.lkt:2389
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1197
   if Fld_27.Node = null
      or else Fld_27.Node.Kind in Ada_Generic_Instantiation
   then
      Cast_Result_10 := Create_Internal_Entity_Generic_Instantiation
        (Node => Fld_27.Node,
         Info => Fld_27.Info);
   else
         Cast_Result_10 := No_Entity_Generic_Instantiation;
   end if;
--# expr-done 1198
--# property-call-start FormalSubpDecl.designated_subprogram_from
Fld_28 := Libadalang.Implementation.Formal_Subp_Decl_P_Designated_Subprogram_From (Node => Local_Subp.Node, Inst => Cast_Result_10, E_Info => Local_Subp.Info);
--# end
--# expr-done 1199
Var_Expr_37 := Fld_28;
if Var_Expr_37 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 1200 '<FieldAccess for defining_name at nodes.lkt:2388:33>' Fld_29 ada/nodes.lkt:2388
      if Var_Expr_37.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_29 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_37.Node, E_Info => Var_Expr_37.Info);
--# end
--# expr-done 1200
Scope_Result_12 := Fld_29;
   --# end
   Result_Var_7 := Scope_Result_12;
else
   Result_Var_7 := No_Entity_Defining_Name;
end if;
      Cast_Result_11 := Create_Internal_Entity_Expr
        (Node => Result_Var_7.Node,
         Info => Result_Var_7.Info);
   If_Result_1 := Cast_Result_11;
end if;
--# expr-done 1201
--# expr-start 1202 '<FieldAccess for defining_name at nodes.lkt:2384:35>' Fld_25 ada/nodes.lkt:2384
      if Local_Decl.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_25 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Local_Decl.Node, E_Info => Local_Decl.Info);
--# end
--# expr-done 1202
New_Struct_1 := (Actual => If_Result_1, Param => Fld_25); 
--# expr-done 1203
Let_Result_5 := New_Struct_1; 
--# end
--# expr-done 1204
Let_Result_6 := Let_Result_5; 
--# end
--# expr-done 1205
         declare
            Item_To_Append : constant Internal_Param_Actual := Let_Result_6;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 1206
Scope_Result_15 := Map_Result_1;
   Inc_Ref (Scope_Result_15);
   --# end
      Finalizer_Scope_2081;
   Result_Var_10 := Scope_Result_15;
else
   Result_Var_10 := No_Internal_Param_Actual_Array_Type;
end if;
      Inc_Ref (Result_Var_10);
Local_Default_Subp_Matches := Result_Var_10; Inc_Ref (Local_Default_Subp_Matches);
--# bind default_subp_matches Local_Default_Subp_Matches
--# expr-start 1216 '<Let at nodes.lkt:2411:9>' Let_Result_8 ada/nodes.lkt:2411
--# scope-start
Concat_Result := Concat (Local_Explicit_Matches, Local_Default_Subp_Matches); 
Local_Given_Matches := Concat_Result; Inc_Ref (Local_Given_Matches);
--# bind given_matches Local_Given_Matches
--# expr-start 1215 '<Let at nodes.lkt:2412:9>' Let_Result_7 ada/nodes.lkt:2412
--# scope-start
Var_Expr_11 := Local_Others_Assoc;
if Var_Expr_11 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind oa Var_Expr_11
--# expr-start 1214 '<Map at nodes.lkt:2415:17>' Map_Result_2 ada/nodes.lkt:2415
   --# expr-start 1207 '<FieldAccess for unpack_formals at nodes.lkt:2415:17>' Fld_35 ada/nodes.lkt:2415
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.unpack_formals
Fld_35 := Libadalang.Implementation.Ada_Node_P_Unpack_Formals (Node => Self, Formal_Params => Local_Params);
--# end
--# expr-done 1207
      declare
         Map_Result_2_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_35;
      begin
         for Item_12 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_12
         --# expr-start 1211 '<Not at nodes.lkt:2417:28>' Not_Val_1 ada/nodes.lkt:2417
--# expr-start 1210 '<AnyQuantifier at nodes.lkt:2417:32>' Quantifier_Result_2 ada/nodes.lkt:2417
      Quantifier_Result_2 := False;
      declare
         Collection : constant Internal_Param_Actual_Array_Access := Local_Given_Matches;
      begin
         for Item_13 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_13
      --# expr-start 1209 '<Eq at nodes.lkt:2417:57>' Is_Equiv_1 ada/nodes.lkt:2417
--# expr-start 1208 '<FieldAccess for param at nodes.lkt:2417:57>' Fld_37 ada/nodes.lkt:2417
Fld_37 := Item_13.Param;
--# expr-done 1208
      Cast_Result_16 := Create_Internal_Entity
        (Node => Fld_37.Node,
         Info => Fld_37.Info);
Cast_Expr_4 := Item_12; 
      Cast_Result_17 := Create_Internal_Entity
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
Is_Equiv_1 := Equivalent (Cast_Result_16, Cast_Result_17); 
--# expr-done 1209
      Quantifier_Result_2 := Is_Equiv_1;
   --# end
               exit when Quantifier_Result_2;
         end loop;
      end;
--# expr-done 1210
Not_Val_1 := not (Quantifier_Result_2); 
--# expr-done 1211
         if Not_Val_1 then
      --# expr-start 1213 '<New ParamActual at nodes.lkt:2416:28>' New_Struct_2 ada/nodes.lkt:2416
--# expr-start 1212 '<FieldAccess for expr at nodes.lkt:2416:56>' Fld_36 ada/nodes.lkt:2416
      if Var_Expr_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_36 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_11.Node, E_Info => Var_Expr_11.Info);
--# end
--# expr-done 1212
New_Struct_2 := (Actual => Fld_36, Param => Item_12); 
--# expr-done 1213
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct_2;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 1214
Scope_Result_16 := Map_Result_2;
   Inc_Ref (Scope_Result_16);
   --# end
      Finalizer_Scope_2087;
   Result_Var_11 := Scope_Result_16;
else
   Result_Var_11 := No_Internal_Param_Actual_Array_Type;
end if;
      Inc_Ref (Result_Var_11);
Local_Others_Matches := Result_Var_11; Inc_Ref (Local_Others_Matches);
--# bind others_matches Local_Others_Matches
Concat_Result_1 := Concat (Local_Given_Matches, Local_Others_Matches); 
Let_Result_7 := Concat_Result_1; Inc_Ref (Let_Result_7);
--# end
--# expr-done 1215
Let_Result_8 := Let_Result_7; Inc_Ref (Let_Result_8);
--# end
--# expr-done 1216
Let_Result_9 := Let_Result_8; Inc_Ref (Let_Result_9);
--# end
--# expr-done 1217
Let_Result_10 := Let_Result_9; Inc_Ref (Let_Result_10);
--# end
--# expr-done 1218
Let_Result_11 := Let_Result_10; Inc_Ref (Let_Result_11);
--# end
--# expr-done 1219
Let_Result_12 := Let_Result_11; Inc_Ref (Let_Result_12);
--# end
--# expr-done 1220
Let_Result_13 := Let_Result_12; Inc_Ref (Let_Result_13);
--# end
--# expr-done 1221
         Property_Result := Let_Result_13;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_162;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_162;
                     Finalizer_Scope_2067;
                     Finalizer_Scope_2068;
                     Finalizer_Scope_2069;
                     Finalizer_Scope_2070;
                     Finalizer_Scope_2071;
                     Finalizer_Scope_2072;
                     Finalizer_Scope_2073;
                     Finalizer_Scope_2074;
                     Finalizer_Scope_2075;
                     Finalizer_Scope_2077;
                     Finalizer_Scope_2079;
                     Finalizer_Scope_2081;
                     Finalizer_Scope_2087;
            raise;
      end;
   return Property_Result;
end Assoc_List_P_Zip_With_Params;
--# end
   --
   --  Primitives for Bare_Case_Expr_Alternative_List
   --
   --
   --  Primitives for Bare_Case_Stmt_Alternative_List
   --
   --
   --  Primitives for Bare_Compilation_Unit_List
   --
   --
   --  Primitives for Bare_Concat_Operand_List
   --
   --
   --  Primitives for Bare_Contract_Case_Assoc_List
   --
   --
   --  Primitives for Bare_Defining_Name_List
   --
   --
   --  Primitives for Bare_Discriminant_Spec_List
   --
   --
   --  Primitives for Bare_Elsif_Expr_Part_List
   --
   --
   --  Primitives for Bare_Elsif_Stmt_Part_List
   --
   --
   --  Primitives for Bare_Enum_Literal_Decl_List
   --
   --
   --  Primitives for Bare_Expr_List
   --
   --
   --  Primitives for Bare_Expr_Alternatives_List
   --
   --
   --  Primitives for Bare_Format_String_Chunk_List
   --
   --
   --  Primitives for Bare_Identifier_List
   --
   --
   --  Primitives for Bare_Discriminant_Choice_List
   --
   --
   --  Primitives for Bare_Name_List
   --
   --
   --  Primitives for Bare_Parent_List
   --
   --
   --  Primitives for Bare_Param_Spec_List
   --
   --
   --  Primitives for Bare_Pragma_Node_List
   --
   --
   --  Primitives for Bare_Select_When_Part_List
   --
   --
   --  Primitives for Bare_Unconstrained_Array_Index_List
   --
   --
   --  Primitives for Bare_Variant_List
   --
   --
   --  Primitives for Bare_Aliased_Node
   --
--# property-start '[dispatcher]Aliased.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Aliased_Node_P_As_Bool
  (Node : Bare_Aliased_Node
  )
   return Boolean
is
   Self : Bare_Aliased_Node  := Bare_Aliased_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Aliased_Node (Self.Kind) is
               when Ada_Aliased_Absent =>
                  --# property-call-start Aliased.Absent.as_bool
                  Property_Result := Aliased_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Aliased_Present =>
                  --# property-call-start Aliased.Present.as_bool
                  Property_Result := Aliased_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Aliased_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Aliased_Absent
   --
--# property-start Aliased.Absent.as_bool ada/nodes.lkt:2439
pragma Warnings (Off, "is not referenced");
 function Aliased_Absent_P_As_Bool
  (Node : Bare_Aliased_Absent
  )
   return Boolean
is
   Self : Bare_Aliased_Absent  := Bare_Aliased_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aliased_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Aliased_Present
   --
--# property-start Aliased.Present.as_bool ada/nodes.lkt:2439
pragma Warnings (Off, "is not referenced");
 function Aliased_Present_P_As_Bool
  (Node : Bare_Aliased_Present
  )
   return Boolean
is
   Self : Bare_Aliased_Present  := Bare_Aliased_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aliased_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_All_Node
   --
--# property-start '[dispatcher]All.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_All_Node_P_As_Bool
  (Node : Bare_All_Node
  )
   return Boolean
is
   Self : Bare_All_Node  := Bare_All_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_All_Node (Self.Kind) is
               when Ada_All_Absent =>
                  --# property-call-start All.Absent.as_bool
                  Property_Result := All_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_All_Present =>
                  --# property-call-start All.Present.as_bool
                  Property_Result := All_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_All_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_All_Absent
   --
--# property-start All.Absent.as_bool ada/nodes.lkt:2444
pragma Warnings (Off, "is not referenced");
 function All_Absent_P_As_Bool
  (Node : Bare_All_Absent
  )
   return Boolean
is
   Self : Bare_All_Absent  := Bare_All_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end All_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_All_Present
   --
--# property-start All.Present.as_bool ada/nodes.lkt:2444
pragma Warnings (Off, "is not referenced");
 function All_Present_P_As_Bool
  (Node : Bare_All_Present
  )
   return Boolean
is
   Self : Bare_All_Present  := Bare_All_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end All_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Array_Indices
   --
--# property-start '[dispatcher]ArrayIndices.ndims' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Array_Indices_P_Ndims
  (Node : Bare_Array_Indices
  )
   return Integer
is
   Self : Bare_Array_Indices  := Bare_Array_Indices (Node);
      --# bind self Self
   Property_Result : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Array_Indices (Self.Kind) is
               when Ada_Constrained_Array_Indices =>
                  --# property-call-start ConstrainedArrayIndices.ndims
                  Property_Result := Constrained_Array_Indices_P_Ndims
                    (Self
                    );
                  --# end
               when Ada_Unconstrained_Array_Indices =>
                  --# property-call-start UnconstrainedArrayIndices.ndims
                  Property_Result := Unconstrained_Array_Indices_P_Ndims
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Array_Indices_P_Ndims;
--# end
--# property-start '[dispatcher]ArrayIndices.constrain_index_expr' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Array_Indices_P_Constrain_Index_Expr
  (Node : Bare_Array_Indices
      ; Index_Expr : Internal_Entity_Expr
      ; Dim : Integer
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Array_Indices  := Bare_Array_Indices (Node);
      --# bind self Self
   --# bind index_expr Index_Expr
   --# bind dim Dim
   --# bind origin Origin
   Property_Result : Logic_Equation;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Array_Indices (Self.Kind) is
               when Ada_Constrained_Array_Indices =>
                  --# property-call-start ConstrainedArrayIndices.constrain_index_expr
                  Property_Result := Constrained_Array_Indices_P_Constrain_Index_Expr
                    (Self
                        , Index_Expr
                        , Dim
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Unconstrained_Array_Indices =>
                  --# property-call-start UnconstrainedArrayIndices.constrain_index_expr
                  Property_Result := Unconstrained_Array_Indices_P_Constrain_Index_Expr
                    (Self
                        , Index_Expr
                        , Dim
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Array_Indices_P_Constrain_Index_Expr;
--# end
--# property-start '[dispatcher]ArrayIndices.index_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Array_Indices_P_Index_Type
  (Node : Bare_Array_Indices
      ; Dim : Integer
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Array_Indices  := Bare_Array_Indices (Node);
      --# bind self Self
   --# bind dim Dim
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Array_Indices (Self.Kind) is
               when Ada_Constrained_Array_Indices =>
                  --# property-call-start ConstrainedArrayIndices.index_type
                  Property_Result := Constrained_Array_Indices_P_Index_Type
                    (Self
                        , Dim
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Unconstrained_Array_Indices =>
                  --# property-call-start UnconstrainedArrayIndices.index_type
                  Property_Result := Unconstrained_Array_Indices_P_Index_Type
                    (Self
                        , Dim
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Array_Indices_P_Index_Type;
--# end
--# property-start '[dispatcher]ArrayIndices.is_static' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Array_Indices_P_Is_Static
  (Node : Bare_Array_Indices
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Array_Indices  := Bare_Array_Indices (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Array_Indices (Self.Kind) is
               when Ada_Constrained_Array_Indices =>
                  --# property-call-start ConstrainedArrayIndices.is_static
                  Property_Result := Constrained_Array_Indices_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Unconstrained_Array_Indices =>
                  --# property-call-start UnconstrainedArrayIndices.is_static
                  Property_Result := Unconstrained_Array_Indices_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Array_Indices_P_Is_Static;
--# end
   --
   --  Primitives for Bare_Constrained_Array_Indices
   --
      procedure Initialize_Fields_For_Constrained_Array_Indices
        (Self : Bare_Constrained_Array_Indices
         ; Constrained_Array_Indices_F_List : Bare_Constraint_List
        ) is
      begin
            Self.Constrained_Array_Indices_F_List := Constrained_Array_Indices_F_List;
      end Initialize_Fields_For_Constrained_Array_Indices;
   function Constrained_Array_Indices_F_List
     (Node : Bare_Constrained_Array_Indices) return Bare_Constraint_List
   is
   begin
         return Node.Constrained_Array_Indices_F_List;
   end;
--# property-start ConstrainedArrayIndices.ndims ada/nodes.lkt:2485
pragma Warnings (Off, "is not referenced");
 function Constrained_Array_Indices_P_Ndims
  (Node : Bare_Constrained_Array_Indices
  )
   return Integer
is
   Self : Bare_Constrained_Array_Indices  := Bare_Constrained_Array_Indices (Node);
      --# bind self Self
   Property_Result : Integer;
      Fld : Bare_Constraint_List;
Len : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1223 '<length at nodes.lkt:2485:24>' Len ada/nodes.lkt:2485
--# expr-start 1222 '<FieldAccess for list at nodes.lkt:2485:24>' Fld ada/nodes.lkt:2485
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Constrained_Array_Indices_F_List;
--# expr-done 1222
Len := Length (Fld); 
--# expr-done 1223
         Property_Result := Len;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Constrained_Array_Indices_P_Ndims;
--# end
--# property-start ConstrainedArrayIndices.constrain_index_expr ada/nodes.lkt:2488
pragma Warnings (Off, "is not referenced");
 function Constrained_Array_Indices_P_Constrain_Index_Expr
  (Node : Bare_Constrained_Array_Indices
      ; Index_Expr : Internal_Entity_Expr
      ; Dim : Integer
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Constrained_Array_Indices  := Bare_Constrained_Array_Indices (Node);
     Ent : Internal_Entity_Constrained_Array_Indices :=
       Internal_Entity_Constrained_Array_Indices'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind index_expr Index_Expr
   --# bind dim Dim
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_288 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_2 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_288 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_2);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_288;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1228 '<LogicBinaryOp And at nodes.lkt:2489:9>' And_Pred ada/nodes.lkt:2489
--# expr-start 1226 '<Bind at nodes.lkt:2489:9>' Bind_Result ada/nodes.lkt:2489
--# expr-start 1224 '<FieldAccess for expected_type_var at nodes.lkt:2489:9>' Fld ada/nodes.lkt:2489
      if Index_Expr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Index_Expr.Node);
--# expr-done 1224
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 1225 '<FieldAccess for index_type at nodes.lkt:2489:43>' Fld_1 ada/nodes.lkt:2489
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]ArrayIndices.index_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Index_Type (Node => Ent.Node, Dim => Dim, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1225
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2489:9") else null)); 
--# expr-done 1226
--# expr-start 1227 '<FieldAccess for matches_expected_type at nodes.lkt:2490:14>' Fld_2 ada/nodes.lkt:2490
      if Index_Expr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_2 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Index_Expr.Node, Origin => Origin);
--# end
--# expr-done 1227
And_Pred := Create_And (Bind_Result, Fld_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2489:9") else null)); 
--# expr-done 1228
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_288;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_288;
            raise;
      end;
   return Property_Result;
end Constrained_Array_Indices_P_Constrain_Index_Expr;
--# end
--# property-start ConstrainedArrayIndices.xref_equation ada/nodes.lkt:2493
pragma Warnings (Off, "is not referenced");
 function Constrained_Array_Indices_P_Xref_Equation
  (Node : Bare_Constrained_Array_Indices
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Constrained_Array_Indices  := Bare_Constrained_Array_Indices (Node);
     Ent : Internal_Entity_Constrained_Array_Indices :=
       Internal_Entity_Constrained_Array_Indices'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_289 with Inline_Always;
            procedure Finalizer_Scope_2091 with Inline_Always;
            procedure Finalizer_Scope_2092 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Expr;
Fld : Internal_Entity_Constraint_List;
Fld_1 : Bare_Constraint_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Fld_3 : Logic_Equation;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Expr;
Fld_4 : Logic_Var;
Pred : Logic_Equation;
Fld_5 : Logic_Var;
Pred_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Var;
Pred_2 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_289 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_289;
            procedure Finalizer_Scope_2091 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_2091;
            procedure Finalizer_Scope_2092 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Pred_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Pred_2);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_2092;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1242 '<LogicAll at nodes.lkt:2494:9>' Logic_Boolean_Op ada/nodes.lkt:2494
--# expr-start 1241 '<Map at nodes.lkt:2494:9>' Map_Result ada/nodes.lkt:2494
   --# expr-start 1229 '<FieldAccess for list at nodes.lkt:2494:9>' Fld ada/nodes.lkt:2494
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Constraint_List (Node => Ent.Node.Constrained_Array_Indices_F_List, Info => Ent.Info);
--# expr-done 1229
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Constraint_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind index Item_0
      --# expr-start 1240 '<LogicBinaryOp And at nodes.lkt:2496:13>' And_Pred_2 ada/nodes.lkt:2496
--# expr-start 1230 '<FieldAccess for sub_equation at nodes.lkt:2496:13>' Fld_3 ada/nodes.lkt:2496
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 1230
--# expr-start 1231 '<Cast to Expr at nodes.lkt:2497:18>' Cast_Result ada/nodes.lkt:2497
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Expr
   then
      Cast_Result := Create_Internal_Entity_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Expr;
   end if;
--# expr-done 1231
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Expr then
   --# scope-start
   --# bind expr Var_Expr_1
--# expr-start 1239 '<LogicBinaryOp And at nodes.lkt:2499:17>' And_Pred_1 ada/nodes.lkt:2499
--# expr-start 1236 '<LogicBinaryOp And at nodes.lkt:2500:21>' And_Pred ada/nodes.lkt:2500
--# expr-start 1233 '<Predicate on AdaNode.is_not_null at nodes.lkt:2500:21>' Pred ada/nodes.lkt:2500
--# expr-start 1232 '<FieldAccess for type_var at nodes.lkt:2500:42>' Fld_4 ada/nodes.lkt:2500
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 1232
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Pred := Solver.Create_Predicate (Fld_4, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 1233
--# expr-start 1235 '<Predicate on BaseTypeDecl.is_discrete_type at nodes.lkt:2501:26>' Pred_1 ada/nodes.lkt:2501
--# expr-start 1234 '<FieldAccess for type_var at nodes.lkt:2501:57>' Fld_5 ada/nodes.lkt:2501
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 1234
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Pred_1 := Solver.Create_Predicate (Fld_5, Create_Base_Type_Decl_P_Is_Discrete_Type_0_Predicate (Origin)); 
--# expr-done 1235
And_Pred := Create_And (Pred, Pred_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2500:21") else null)); 
--# expr-done 1236
--# expr-start 1238 '<Predicate on BaseTypeDecl.is_not_root_int_type at nodes.lkt:2503:22>' Pred_2 ada/nodes.lkt:2503
--# expr-start 1237 '<FieldAccess for type_var at nodes.lkt:2503:57>' Fld_6 ada/nodes.lkt:2503
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 1237
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
Pred_2 := Solver.Create_Predicate (Fld_6, Create_Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate); 
--# expr-done 1238
And_Pred_1 := Create_And (And_Pred, Pred_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2499:17") else null)); 
--# expr-done 1239
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2092;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2504:29") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (Fld_3, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2496:13") else null)); 
--# expr-done 1240
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_2;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2091;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1241
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2494:9") else null)); 
--# expr-done 1242
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_289;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_289;
                     Finalizer_Scope_2091;
                     Finalizer_Scope_2092;
            raise;
      end;
   return Property_Result;
end Constrained_Array_Indices_P_Xref_Equation;
--# end
--# property-start ConstrainedArrayIndices.index_type ada/nodes.lkt:2509
pragma Warnings (Off, "is not referenced");
 function Constrained_Array_Indices_P_Index_Type
  (Node : Bare_Constrained_Array_Indices
      ; Dim : Integer
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Constrained_Array_Indices  := Bare_Constrained_Array_Indices (Node);
     Ent : Internal_Entity_Constrained_Array_Indices :=
       Internal_Entity_Constrained_Array_Indices'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind dim Dim
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_290 with Inline_Always;
      Ignored : Boolean;
Var_Expr_1 : Internal_Entity;
Match_0 : Internal_Entity_Subtype_Indication;
Match_1 : Internal_Entity_Expr;
Match_2 : Internal_Entity;
Node_Parents : Bare_Ada_Node_Array_Access;
Fld : Boolean;
Find_Result : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Constraint_List;
Fld_3 : Bare_Constraint_List;
Fld_4 : Internal_Entity_Info;
Get_Result : Bare_Ada_Node;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity;
Cast_Result_1 : Internal_Entity_Subtype_Indication;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity_Expr;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Let_Result_3 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_290 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_290;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1253 '<Let at nodes.lkt:2511:9>' Let_Result_3 ada/nodes.lkt:2511
--# scope-start
--# expr-start 1247 '<FieldAccess for resolve_names at nodes.lkt:2512:13>' Fld_1 ada/nodes.lkt:2512
--# expr-start 1246 '<as_entity at nodes.lkt:2512:13>' If_Result ada/nodes.lkt:2512
--# expr-start 1245 '<Find at nodes.lkt:2512:13>' Find_Result ada/nodes.lkt:2512
   --# expr-start 1243 '<FieldAccess for parents at nodes.lkt:2512:13>' Node_Parents ada/nodes.lkt:2512
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 1243
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 1244 '<FieldAccess for xref_entry_point at nodes.lkt:2512:40>' Fld ada/nodes.lkt:2512
      if Item_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_entry_point'
Fld := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Entry_Point (Node => Item_0);
--# end
--# expr-done 1244
      if Fld then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Fld;
         end loop;
      end;
--# expr-done 1245
Is_Null := Find_Result = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Find_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 1246
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names
Fld_1 := Libadalang.Implementation.Ada_Node_P_Resolve_Names (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 1247
Ignored := Fld_1; 
--# bind _ Ignored
--# expr-start 1248 '<FieldAccess for list at nodes.lkt:2516:9>' Fld_2 ada/nodes.lkt:2516
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Constraint_List (Node => Ent.Node.Constrained_Array_Indices_F_List, Info => Ent.Info);
--# expr-done 1248
Fld_3 := Fld_2.Node;
Get_Result := Get (Self, Fld_3, Dim, True); 
Is_Null_1 := Get_Result = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
Fld_4 := Fld_2.Info;
As_Entity_1 := (Info => Fld_4, Node => Get_Result); 
   If_Result_1 := As_Entity_1;
end if;
Var_Expr_1 := If_Result_1;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 1252 '<Match at nodes.lkt:2518:13>' Match_Result ada/nodes.lkt:2518
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind st Match_0
--# expr-start 1249 '<FieldAccess for designated_type at nodes.lkt:2519:47>' Fld_5 ada/nodes.lkt:2519
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Match_0.Node, Origin => Origin, E_Info => Match_0.Info);
--# end
--# expr-done 1249
Let_Result := Fld_5; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind e Match_1
--# expr-start 1251 '<Cast to BaseTypeDecl at nodes.lkt:2520:33>' Cast_Result ada/nodes.lkt:2520
--# expr-start 1250 '<FieldAccess for type_val at nodes.lkt:2520:33>' Fld_6 ada/nodes.lkt:2520
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_6 := Libadalang.Implementation.Expr_P_Type_Val (Node => Match_1.Node);
--# end
--# expr-done 1250
   if Fld_6.Node = null
      or else Fld_6.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 1251
Let_Result_1 := Cast_Result; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Elsif_Stmt_Part | Ada_For_Loop_Iter_Filter .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Base_Type_Decl; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 1252
Scope_Result_3 := Match_Result;
   --# end
   Result_Var := Scope_Result_3;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Let_Result_3 := Result_Var; 
--# end
--# expr-done 1253
         Property_Result := Let_Result_3;
   --# end
      Finalizer_Scope_290;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_290;
            raise;
      end;
   return Property_Result;
end Constrained_Array_Indices_P_Index_Type;
--# end
--# property-start ConstrainedArrayIndices.is_static ada/nodes.lkt:2527
pragma Warnings (Off, "is not referenced");
 function Constrained_Array_Indices_P_Is_Static
  (Node : Bare_Constrained_Array_Indices
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Constrained_Array_Indices  := Bare_Constrained_Array_Indices (Node);
     Ent : Internal_Entity_Constrained_Array_Indices :=
       Internal_Entity_Constrained_Array_Indices'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Match_0 : Internal_Entity_Subtype_Indication;
Match_1 : Internal_Entity_Bin_Op;
Match_2 : Internal_Entity;
Fld : Internal_Entity_Constraint_List;
Fld_1 : Bare_Constraint_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Fld_3 : Boolean;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Boolean;
Fld_6 : Internal_Entity_Expr;
Fld_7 : Boolean;
If_Result : Boolean;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Subtype_Indication;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_1 : Internal_Entity_Bin_Op;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_2 : Internal_Entity;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Match_Result : Boolean;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result_1 : Internal_Entity;
Quantifier_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1262 '<AllQuantifier at nodes.lkt:2528:9>' Quantifier_Result ada/nodes.lkt:2528
   --# expr-start 1254 '<FieldAccess for list at nodes.lkt:2528:9>' Fld ada/nodes.lkt:2528
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Constraint_List (Node => Ent.Node.Constrained_Array_Indices_F_List, Info => Ent.Info);
--# expr-done 1254
Fld_1 := Fld.Node;
      Quantifier_Result := True;
      if Fld_1 = null then
      null;
      else
      declare
         Collection : constant Bare_Constraint_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result_1 := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result_1 := As_Entity;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind t Item_0
      --# expr-start 1261 '<Match at nodes.lkt:2530:13>' Match_Result ada/nodes.lkt:2530
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind st Match_0
--# expr-start 1255 '<FieldAccess for is_static_subtype at nodes.lkt:2531:47>' Fld_3 ada/nodes.lkt:2531
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubtypeIndication.is_static_subtype
Fld_3 := Libadalang.Implementation.Subtype_Indication_P_Is_Static_Subtype (Node => Match_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_0.Info);
--# end
--# expr-done 1255
Let_Result := Fld_3; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Bin_Op .. Ada_Relation_Op =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Bin_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind e Match_1
--# expr-start 1260 '<BooleanBinaryOp And at nodes.lkt:2533:21>' If_Result ada/nodes.lkt:2533
--# expr-start 1257 '<FieldAccess for is_static_expr at nodes.lkt:2533:21>' Fld_5 ada/nodes.lkt:2533
--# expr-start 1256 '<FieldAccess for left at nodes.lkt:2533:21>' Fld_4 ada/nodes.lkt:2533
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Match_1.Node.Bin_Op_F_Left, Info => Match_1.Info);
--# expr-done 1256
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_5 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_4.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_4.Info);
--# end
--# expr-done 1257
if Fld_5 then
   --# expr-start 1259 '<FieldAccess for is_static_expr at nodes.lkt:2533:49>' Fld_7 ada/nodes.lkt:2533
--# expr-start 1258 '<FieldAccess for right at nodes.lkt:2533:49>' Fld_6 ada/nodes.lkt:2533
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Match_1.Node.Bin_Op_F_Right, Info => Match_1.Info);
--# expr-done 1258
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_7 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_6.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_6.Info);
--# end
--# expr-done 1259
   If_Result := Fld_7;
else
   If_Result := False;
end if;
--# expr-done 1260
Let_Result_1 := If_Result; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := False; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 1261
      Quantifier_Result := Match_Result;
   --# end
               exit when not Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 1262
         Property_Result := Quantifier_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Constrained_Array_Indices_P_Is_Static;
--# end
   --
   --  Primitives for Bare_Unconstrained_Array_Indices
   --
      procedure Initialize_Fields_For_Unconstrained_Array_Indices
        (Self : Bare_Unconstrained_Array_Indices
         ; Unconstrained_Array_Indices_F_Types : Bare_Unconstrained_Array_Index_List
        ) is
      begin
            Self.Unconstrained_Array_Indices_F_Types := Unconstrained_Array_Indices_F_Types;
      end Initialize_Fields_For_Unconstrained_Array_Indices;
   function Unconstrained_Array_Indices_F_Types
     (Node : Bare_Unconstrained_Array_Indices) return Bare_Unconstrained_Array_Index_List
   is
   begin
         return Node.Unconstrained_Array_Indices_F_Types;
   end;
--# property-start UnconstrainedArrayIndices.ndims ada/nodes.lkt:2544
pragma Warnings (Off, "is not referenced");
 function Unconstrained_Array_Indices_P_Ndims
  (Node : Bare_Unconstrained_Array_Indices
  )
   return Integer
is
   Self : Bare_Unconstrained_Array_Indices  := Bare_Unconstrained_Array_Indices (Node);
      --# bind self Self
   Property_Result : Integer;
      Fld : Bare_Unconstrained_Array_Index_List;
Len : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1264 '<length at nodes.lkt:2544:24>' Len ada/nodes.lkt:2544
--# expr-start 1263 '<FieldAccess for types at nodes.lkt:2544:24>' Fld ada/nodes.lkt:2544
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Unconstrained_Array_Indices_F_Types;
--# expr-done 1263
Len := Length (Fld); 
--# expr-done 1264
         Property_Result := Len;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Unconstrained_Array_Indices_P_Ndims;
--# end
--# property-start UnconstrainedArrayIndices.constrain_index_expr ada/nodes.lkt:2547
pragma Warnings (Off, "is not referenced");
 function Unconstrained_Array_Indices_P_Constrain_Index_Expr
  (Node : Bare_Unconstrained_Array_Indices
      ; Index_Expr : Internal_Entity_Expr
      ; Dim : Integer
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Unconstrained_Array_Indices  := Bare_Unconstrained_Array_Indices (Node);
     Ent : Internal_Entity_Unconstrained_Array_Indices :=
       Internal_Entity_Unconstrained_Array_Indices'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind index_expr Index_Expr
   --# bind dim Dim
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_293 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_2 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_293 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_2);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_293;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1269 '<LogicBinaryOp And at nodes.lkt:2548:9>' And_Pred ada/nodes.lkt:2548
--# expr-start 1267 '<Bind at nodes.lkt:2548:9>' Bind_Result ada/nodes.lkt:2548
--# expr-start 1265 '<FieldAccess for expected_type_var at nodes.lkt:2548:9>' Fld ada/nodes.lkt:2548
      if Index_Expr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Index_Expr.Node);
--# expr-done 1265
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 1266 '<FieldAccess for index_type at nodes.lkt:2548:43>' Fld_1 ada/nodes.lkt:2548
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]ArrayIndices.index_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Index_Type (Node => Ent.Node, Dim => Dim, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1266
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2548:9") else null)); 
--# expr-done 1267
--# expr-start 1268 '<FieldAccess for matches_expected_type at nodes.lkt:2549:14>' Fld_2 ada/nodes.lkt:2549
      if Index_Expr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_2 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Index_Expr.Node, Origin => Origin);
--# end
--# expr-done 1268
And_Pred := Create_And (Bind_Result, Fld_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2548:9") else null)); 
--# expr-done 1269
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_293;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_293;
            raise;
      end;
   return Property_Result;
end Unconstrained_Array_Indices_P_Constrain_Index_Expr;
--# end
--# property-start UnconstrainedArrayIndices.index_type ada/nodes.lkt:2552
pragma Warnings (Off, "is not referenced");
 function Unconstrained_Array_Indices_P_Index_Type
  (Node : Bare_Unconstrained_Array_Indices
      ; Dim : Integer
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Unconstrained_Array_Indices  := Bare_Unconstrained_Array_Indices (Node);
     Ent : Internal_Entity_Unconstrained_Array_Indices :=
       Internal_Entity_Unconstrained_Array_Indices'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind dim Dim
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_38 : Internal_Entity_Unconstrained_Array_Index;
Fld : Internal_Entity_Unconstrained_Array_Index_List;
Fld_1 : Bare_Unconstrained_Array_Index_List;
Fld_2 : Internal_Entity_Info;
Get_Result : Bare_Unconstrained_Array_Index;
As_Entity : Internal_Entity_Unconstrained_Array_Index;
Is_Null : Boolean;
If_Result : Internal_Entity_Unconstrained_Array_Index;
Fld_3 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 1270 '<FieldAccess for types at nodes.lkt:2553:9>' Fld ada/nodes.lkt:2553
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Unconstrained_Array_Index_List (Node => Ent.Node.Unconstrained_Array_Indices_F_Types, Info => Ent.Info);
--# expr-done 1270
Fld_1 := Fld.Node;
Get_Result := Get (Self, Fld_1, Dim, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Unconstrained_Array_Index;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Get_Result); 
   If_Result := As_Entity;
end if;
Var_Expr_38 := If_Result;
if Var_Expr_38 /= No_Entity_Unconstrained_Array_Index then
   --# scope-start
--# expr-start 1271 '<FieldAccess for designated_type at nodes.lkt:2553:9>' Fld_3 ada/nodes.lkt:2553
      if Var_Expr_38.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UnconstrainedArrayIndex.designated_type
Fld_3 := Libadalang.Implementation.Unconstrained_Array_Index_P_Designated_Type (Node => Var_Expr_38.Node, Origin => Origin, E_Info => Var_Expr_38.Info);
--# end
--# expr-done 1271
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Unconstrained_Array_Indices_P_Index_Type;
--# end
--# property-start UnconstrainedArrayIndices.xref_equation ada/nodes.lkt:2556
pragma Warnings (Off, "is not referenced");
 function Unconstrained_Array_Indices_P_Xref_Equation
  (Node : Bare_Unconstrained_Array_Indices
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Unconstrained_Array_Indices  := Bare_Unconstrained_Array_Indices (Node);
     Ent : Internal_Entity_Unconstrained_Array_Indices :=
       Internal_Entity_Unconstrained_Array_Indices'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_295 with Inline_Always;
            procedure Finalizer_Scope_2103 with Inline_Always;
      Fld : Internal_Entity_Unconstrained_Array_Index_List;
Fld_1 : Bare_Unconstrained_Array_Index_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Unconstrained_Array_Index;
Bare_Item_0 : Bare_Unconstrained_Array_Index;
Fld_3 : Internal_Entity_Name;
Fld_4 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
Fld_7 : Internal_Entity_Expr;
Is_Null : Boolean;
If_Result : Logic_Equation;
And_Pred : Logic_Equation;
As_Entity : Internal_Entity_Unconstrained_Array_Index;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Unconstrained_Array_Index;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_295 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_295;
            procedure Finalizer_Scope_2103 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_6);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_2103;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1282 '<LogicAll at nodes.lkt:2557:9>' Logic_Boolean_Op ada/nodes.lkt:2557
--# expr-start 1281 '<Map at nodes.lkt:2557:9>' Map_Result ada/nodes.lkt:2557
   --# expr-start 1272 '<FieldAccess for types at nodes.lkt:2557:9>' Fld ada/nodes.lkt:2557
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Unconstrained_Array_Index_List (Node => Ent.Node.Unconstrained_Array_Indices_F_Types, Info => Ent.Info);
--# expr-done 1272
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Unconstrained_Array_Index_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Unconstrained_Array_Index;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result_1 := As_Entity;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind typ Item_0
      --# expr-start 1280 '<LogicBinaryOp And at nodes.lkt:2559:13>' And_Pred ada/nodes.lkt:2559
--# expr-start 1274 '<FieldAccess for xref_type_equation at nodes.lkt:2559:13>' Fld_4 ada/nodes.lkt:2559
--# expr-start 1273 '<FieldAccess for subtype_name at nodes.lkt:2559:13>' Fld_3 ada/nodes.lkt:2559
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Item_0.Node.Unconstrained_Array_Index_F_Subtype_Name, Info => Item_0.Info);
--# expr-done 1273
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_4 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 1274
--# expr-start 1279 '<If at nodes.lkt:2561:17>' If_Result ada/nodes.lkt:2561
--# expr-start 1276 '<IsNull at nodes.lkt:2561:20>' Is_Null ada/nodes.lkt:2561
--# expr-start 1275 '<FieldAccess for lower_bound at nodes.lkt:2561:20>' Fld_7 ada/nodes.lkt:2561
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Expr (Node => Item_0.Node.Unconstrained_Array_Index_F_Lower_Bound, Info => Item_0.Info);
--# expr-done 1275
Is_Null := Fld_7.Node = null; 
--# expr-done 1276
if Is_Null then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2561:49") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 1278 '<FieldAccess for sub_equation at nodes.lkt:2562:22>' Fld_6 ada/nodes.lkt:2562
--# expr-start 1277 '<FieldAccess for lower_bound at nodes.lkt:2562:22>' Fld_5 ada/nodes.lkt:2562
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Item_0.Node.Unconstrained_Array_Index_F_Lower_Bound, Info => Item_0.Info);
--# expr-done 1277
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_6 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_5.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_5.Info);
--# end
--# expr-done 1278
   If_Result := Fld_6;
end if;
      Inc_Ref (If_Result);
--# expr-done 1279
And_Pred := Create_And (Fld_4, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2559:13") else null)); 
--# expr-done 1280
         declare
            Item_To_Append : constant Logic_Equation := And_Pred;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2103;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1281
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2557:9") else null)); 
--# expr-done 1282
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_295;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_295;
                     Finalizer_Scope_2103;
            raise;
      end;
   return Property_Result;
end Unconstrained_Array_Indices_P_Xref_Equation;
--# end
--# property-start UnconstrainedArrayIndices.is_static ada/nodes.lkt:2567
pragma Warnings (Off, "is not referenced");
 function Unconstrained_Array_Indices_P_Is_Static
  (Node : Bare_Unconstrained_Array_Indices
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Unconstrained_Array_Indices  := Bare_Unconstrained_Array_Indices (Node);
     Ent : Internal_Entity_Unconstrained_Array_Indices :=
       Internal_Entity_Unconstrained_Array_Indices'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Unconstrained_Array_Index_List;
Fld_1 : Bare_Unconstrained_Array_Index_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Unconstrained_Array_Index;
Bare_Item_0 : Bare_Unconstrained_Array_Index;
Fld_3 : Internal_Entity_Name;
Fld_4 : Boolean;
As_Entity : Internal_Entity_Unconstrained_Array_Index;
Is_Null : Boolean;
If_Result : Internal_Entity_Unconstrained_Array_Index;
Quantifier_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1286 '<AllQuantifier at nodes.lkt:2568:9>' Quantifier_Result ada/nodes.lkt:2568
   --# expr-start 1283 '<FieldAccess for types at nodes.lkt:2568:9>' Fld ada/nodes.lkt:2568
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Unconstrained_Array_Index_List (Node => Ent.Node.Unconstrained_Array_Indices_F_Types, Info => Ent.Info);
--# expr-done 1283
Fld_1 := Fld.Node;
      Quantifier_Result := True;
      if Fld_1 = null then
      null;
      else
      declare
         Collection : constant Bare_Unconstrained_Array_Index_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Unconstrained_Array_Index;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind t Item_0
      --# expr-start 1285 '<FieldAccess for is_static_subtype at nodes.lkt:2568:31>' Fld_4 ada/nodes.lkt:2568
--# expr-start 1284 '<FieldAccess for subtype_name at nodes.lkt:2568:31>' Fld_3 ada/nodes.lkt:2568
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Item_0.Node.Unconstrained_Array_Index_F_Subtype_Name, Info => Item_0.Info);
--# expr-done 1284
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_static_subtype
Fld_4 := Libadalang.Implementation.Name_P_Is_Static_Subtype (Node => Fld_3.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_3.Info);
--# end
--# expr-done 1285
      Quantifier_Result := Fld_4;
   --# end
               exit when not Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 1286
         Property_Result := Quantifier_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Unconstrained_Array_Indices_P_Is_Static;
--# end
   --
   --  Primitives for Bare_Aspect_Assoc
   --
      procedure Initialize_Fields_For_Aspect_Assoc
        (Self : Bare_Aspect_Assoc
         ; Aspect_Assoc_F_Id : Bare_Name
         ; Aspect_Assoc_F_Expr : Bare_Expr
        ) is
      begin
            Self.Aspect_Assoc_F_Id := Aspect_Assoc_F_Id;
            Self.Aspect_Assoc_F_Expr := Aspect_Assoc_F_Expr;
      end Initialize_Fields_For_Aspect_Assoc;
   function Aspect_Assoc_F_Id
     (Node : Bare_Aspect_Assoc) return Bare_Name
   is
   begin
         return Node.Aspect_Assoc_F_Id;
   end;
   function Aspect_Assoc_F_Expr
     (Node : Bare_Aspect_Assoc) return Bare_Expr
   is
   begin
         return Node.Aspect_Assoc_F_Expr;
   end;
--# property-start AspectAssoc.xref_entry_point ada/nodes.lkt:2579
pragma Warnings (Off, "is not referenced");
 function Aspect_Assoc_P_Xref_Entry_Point
  (Node : Bare_Aspect_Assoc
  )
   return Boolean
is
   Self : Bare_Aspect_Assoc  := Bare_Aspect_Assoc (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aspect_Assoc_P_Xref_Entry_Point;
--# end
--# property-start AspectAssoc.xref_equation ada/nodes.lkt:2582
pragma Warnings (Off, "is not referenced");
 function Aspect_Assoc_P_Xref_Equation
  (Node : Bare_Aspect_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aspect_Assoc  := Bare_Aspect_Assoc (Node);
     Ent : Internal_Entity_Aspect_Assoc :=
       Internal_Entity_Aspect_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_298 with Inline_Always;
            procedure Finalizer_Scope_2105 with Inline_Always;
            procedure Finalizer_Scope_2107 with Inline_Always;
            procedure Finalizer_Scope_2108 with Inline_Always;
      Local_Target : Bare_Ada_Node;
Var_Expr_0 : Internal_Entity_Expr;
Var_Expr_39 : Bare_Type_Decl;
Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Fld_2 : Bare_Ada_Node;
Fld_3 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Aggregate;
Fld_4 : Internal_Entity_Assoc_List;
Fld_5 : Internal_Single_Actual_Array_Access;
Fld_6 : Internal_Entity_Basic_Assoc;
Fld_7 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_8 : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Cast_Expr : Bare_Ada_Node;
Cast_Result_2 : Bare_Type_Decl;
Fld_9 : Bare_Type_Def;
Fld_10 : Lexical_Env := Empty_Env;
Fld_11 : Lexical_Env := Empty_Env;
Fld_12 : Internal_Entity_Name;
Fld_13 : Symbol_Type;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_3 : Bare_Type_Decl;
Fld_14 : Bare_Type_Def;
Scope_Result : Bare_Type_Def;
Result_Var : Bare_Type_Def;
Is_A : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_15 : Bare_Expr;
Fld_16 : Logic_Var;
Fld_17 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_18 : Internal_Entity_Expr;
Fld_19 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_20 : Bare_Expr;
Fld_21 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Fld_22 : Internal_Entity_Expr;
Fld_23 : Logic_Equation;
Fld_24 : Internal_Entity_Expr;
Cast_Result_5 : Internal_Entity_Name;
Fld_25 : Logic_Equation;
Fld_26 : Internal_Entity_Expr;
Cast_Result_6 : Internal_Entity_Name;
Fld_27 : Logic_Var;
Cast_Expr_2 : Bare_Ada_Node;
Cast_Result_7 : Bare_Base_Type_Decl;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result_3 : Internal_Entity_Base_Type_Decl;
Pred : Logic_Equation;
And_Pred_2 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_28 : Internal_Entity_Expr;
Fld_29 : Logic_Equation;
Fld_30 : Internal_Entity_Expr;
Is_A_1 : Boolean;
If_Result_4 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Fld_31 : Logic_Equation;
Cast_Expr_3 : Bare_Ada_Node;
Cast_Result_8 : Bare_Type_Decl;
Fld_32 : Logic_Equation;
Fld_33 : Internal_Entity_Expr;
Cast_Result_9 : Internal_Entity_Identifier;
Fld_34 : Logic_Var;
Cast_Expr_4 : Bare_Ada_Node;
Cast_Result_10 : Bare_Type_Decl;
As_Entity_1 : Internal_Entity_Type_Decl;
Is_Null_1 : Boolean;
If_Result_5 : Internal_Entity_Type_Decl;
Fld_35 : Internal_Entity_Basic_Decl_Array_Access;
Get_Result : Internal_Entity_Basic_Decl;
Cast_Result_11 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_36 : Internal_Entity_Expr;
Cast_Result_12 : Internal_Entity_Identifier;
Fld_37 : Logic_Var;
Cast_Expr_5 : Bare_Ada_Node;
Cast_Result_13 : Bare_Type_Decl;
As_Entity_2 : Internal_Entity_Type_Decl;
Is_Null_2 : Boolean;
If_Result_6 : Internal_Entity_Type_Decl;
Fld_38 : Internal_Entity_Basic_Decl_Array_Access;
Get_Result_1 : Internal_Entity_Basic_Decl;
Cast_Result_14 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
Fld_39 : Internal_Entity_Expr;
Cast_Result_15 : Internal_Entity_Base_Aggregate;
Fld_40 : Internal_Entity_Assoc_List;
Fld_41 : Internal_Single_Actual_Array_Access;
Index_2 : Integer;
True_Rel_2 : Logic_Equation;
Fld_42 : Internal_Entity_Basic_Assoc;
Fld_43 : Internal_Entity_Expr;
Fld_44 : Logic_Equation;
Comp_Result : Boolean;
If_Result_7 : Logic_Equation;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
Cast_Expr_6 : Bare_Ada_Node;
Cast_Result_16 : Bare_Type_Decl;
Fld_45 : Logic_Equation;
Fld_46 : Internal_Entity_Expr;
Cast_Result_17 : Internal_Entity_Name;
Fld_47 : Logic_Equation;
Fld_48 : Internal_Entity_Expr;
Cast_Result_18 : Internal_Entity_Name;
Fld_49 : Logic_Equation;
Fld_50 : Internal_Entity_Expr;
Cast_Result_19 : Internal_Entity_Name;
Fld_51 : Logic_Var;
Cast_Expr_7 : Bare_Ada_Node;
Cast_Result_20 : Bare_Basic_Decl;
As_Entity_3 : Internal_Entity_Basic_Decl;
Is_Null_3 : Boolean;
If_Result_8 : Internal_Entity_Basic_Decl;
Pred_1 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Is_A_2 : Boolean;
If_Result_9 : Logic_Equation;
Fld_52 : Internal_Entity_Expr;
Fld_53 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_3 : Logic_Equation;
Result_Var_1 : Logic_Equation;
True_Rel_4 : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_54 : Internal_Entity_Name;
Sym_2 : Symbol_Type;
Fld_55 : Boolean;
If_Result_10 : Logic_Equation;
Fld_56 : Internal_Entity_Name;
Sym_3 : Symbol_Type;
Fld_57 : Boolean;
If_Result_11 : Logic_Equation;
Fld_58 : Internal_Entity_Name;
Sym_4 : Symbol_Type;
Fld_59 : Boolean;
If_Result_12 : Logic_Equation;
Fld_60 : Internal_Entity_Name;
Sym_5 : Symbol_Type;
Fld_61 : Boolean;
If_Result_13 : Logic_Equation;
Fld_62 : Internal_Entity_Name;
Sym_6 : Symbol_Type;
Fld_63 : Boolean;
If_Result_14 : Logic_Equation;
Fld_64 : Internal_Entity_Name;
Fld_65 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Is_Equal_2 : Boolean;
Is_Equal_3 : Boolean;
If_Result_15 : Boolean;
Is_Equal_4 : Boolean;
If_Result_16 : Boolean;
If_Result_17 : Logic_Equation;
Fld_66 : Internal_Entity_Name;
Sym_10 : Symbol_Type;
Fld_67 : Boolean;
If_Result_18 : Logic_Equation;
Fld_68 : Internal_Entity_Name;
Sym_11 : Symbol_Type;
Fld_69 : Boolean;
If_Result_19 : Logic_Equation;
Fld_70 : Internal_Entity_Name;
Sym_12 : Symbol_Type;
Fld_71 : Boolean;
Fld_72 : Internal_Entity_Name;
Sym_13 : Symbol_Type;
Fld_73 : Boolean;
If_Result_20 : Boolean;
If_Result_21 : Logic_Equation;
Fld_74 : Internal_Entity_Name;
Sym_14 : Symbol_Type;
Fld_75 : Boolean;
If_Result_22 : Logic_Equation;
Fld_76 : Internal_Entity_Name;
Fld_77 : Symbol_Type;
Sym_15 : Symbol_Type;
Sym_16 : Symbol_Type;
Is_Equal_5 : Boolean;
Is_Equal_6 : Boolean;
If_Result_23 : Boolean;
If_Result_24 : Logic_Equation;
Fld_78 : Internal_Entity_Name;
Fld_79 : Symbol_Type;
Sym_17 : Symbol_Type;
Sym_18 : Symbol_Type;
Sym_19 : Symbol_Type;
Sym_20 : Symbol_Type;
Sym_21 : Symbol_Type;
Sym_22 : Symbol_Type;
Sym_23 : Symbol_Type;
Sym_24 : Symbol_Type;
Sym_25 : Symbol_Type;
Is_Equal_7 : Boolean;
Is_Equal_8 : Boolean;
If_Result_25 : Boolean;
Is_Equal_9 : Boolean;
If_Result_26 : Boolean;
Is_Equal_10 : Boolean;
If_Result_27 : Boolean;
Is_Equal_11 : Boolean;
If_Result_28 : Boolean;
Is_Equal_12 : Boolean;
If_Result_29 : Boolean;
Is_Equal_13 : Boolean;
If_Result_30 : Boolean;
Is_Equal_14 : Boolean;
If_Result_31 : Boolean;
Is_Equal_15 : Boolean;
If_Result_32 : Boolean;
If_Result_33 : Logic_Equation;
Fld_80 : Internal_Entity_Name;
Fld_81 : Symbol_Type;
Sym_26 : Symbol_Type;
Sym_27 : Symbol_Type;
Is_Equal_16 : Boolean;
Is_Equal_17 : Boolean;
If_Result_34 : Boolean;
If_Result_35 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_298 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_19);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_21);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Fld_23);
                     Dec_Ref (Fld_25);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_29);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Fld_31);
                     Dec_Ref (Fld_32);
                     Dec_Ref (Fld_35);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_38);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Fld_41);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (Fld_45);
                     Dec_Ref (Fld_47);
                     Dec_Ref (Fld_49);
                     Dec_Ref (Pred_1);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (If_Result_9);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_3);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (True_Rel_4);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (If_Result_10);
                     Dec_Ref (If_Result_11);
                     Dec_Ref (If_Result_12);
                     Dec_Ref (If_Result_13);
                     Dec_Ref (If_Result_14);
                     Dec_Ref (If_Result_17);
                     Dec_Ref (If_Result_18);
                     Dec_Ref (If_Result_19);
                     Dec_Ref (If_Result_21);
                     Dec_Ref (If_Result_22);
                     Dec_Ref (If_Result_24);
                     Dec_Ref (If_Result_33);
                     Dec_Ref (If_Result_35);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_298;
            procedure Finalizer_Scope_2105 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_2105;
            procedure Finalizer_Scope_2107 is
            begin
                     Dec_Ref (True_Rel_2);
                     Dec_Ref (Fld_44);
                     Dec_Ref (If_Result_7);
            end Finalizer_Scope_2107;
            procedure Finalizer_Scope_2108 is
            begin
                     Dec_Ref (Fld_53);
            end Finalizer_Scope_2108;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1458 '<Let at nodes.lkt:2583:9>' Let_Result ada/nodes.lkt:2583
--# scope-start
--# expr-start 1289 '<parent at nodes.lkt:2583:22>' Fld_2 ada/nodes.lkt:2583
--# expr-start 1288 '<parent at nodes.lkt:2583:22>' Fld_1 ada/nodes.lkt:2583
--# expr-start 1287 '<parent at nodes.lkt:2583:22>' Fld ada/nodes.lkt:2583
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 1287
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 1288
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Fld_1.Parent; 
--# expr-done 1289
Local_Target := Fld_2; 
--# bind target Local_Target
--# expr-start 1457 '<If at nodes.lkt:2586:9>' If_Result_35 ada/nodes.lkt:2586
--# expr-start 1291 '<FieldAccess for name_symbol at nodes.lkt:2586:12>' Fld_81 ada/nodes.lkt:2586
--# expr-start 1290 '<FieldAccess for id at nodes.lkt:2586:12>' Fld_80 ada/nodes.lkt:2586
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_80 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1290
      if Fld_80.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_81 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_80.Node);
--# end
--# expr-done 1291
--# expr-start 1292 '<Symbol Aggregate at nodes.lkt:2586:37>' Sym_26 ada/nodes.lkt:2586
Sym_26 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aggregate); 
--# expr-done 1292
Is_Equal_17 := Fld_81 = Sym_26; 
if Is_Equal_17 then
   If_Result_34 := True;
else
--# expr-start 1293 '<Symbol Iterable at nodes.lkt:2586:52>' Sym_27 ada/nodes.lkt:2586
Sym_27 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterable); 
--# expr-done 1293
Is_Equal_16 := Fld_81 = Sym_27; 
   If_Result_34 := Is_Equal_16;
end if;
if If_Result_34 then
   --# expr-start 1303 '<LogicAll at nodes.lkt:2588:13>' Logic_Boolean_Op ada/nodes.lkt:2588
--# expr-start 1302 '<Map at nodes.lkt:2588:13>' Map_Result ada/nodes.lkt:2588
   --# expr-start 1297 '<FieldAccess for unpacked_params at nodes.lkt:2588:13>' Fld_5 ada/nodes.lkt:2588
--# expr-start 1296 '<FieldAccess for assocs at nodes.lkt:2588:13>' Fld_4 ada/nodes.lkt:2588
--# expr-start 1295 '<Cast to Aggregate at nodes.lkt:2588:13>' Cast_Result ada/nodes.lkt:2588
--# expr-start 1294 '<FieldAccess for expr at nodes.lkt:2588:13>' Fld_3 ada/nodes.lkt:2588
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1294
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result := Create_Internal_Entity_Aggregate
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result := No_Entity_Aggregate;
   end if;
--# expr-done 1295
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Assoc_List (Node => Cast_Result.Node.Base_Aggregate_F_Assocs, Info => Cast_Result.Info);
--# expr-done 1296
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.unpacked_params
Fld_5 := Libadalang.Implementation.Assoc_List_P_Unpacked_Params (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 1297
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Single_Actual_Array_Access := Fld_5;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind sa Item_3
      --# expr-start 1301 '<FieldAccess for xref_no_overloading at nodes.lkt:2590:17>' Fld_8 ada/nodes.lkt:2590
--# expr-start 1300 '<Cast to Name at nodes.lkt:2590:17>' Cast_Result_1 ada/nodes.lkt:2590
--# expr-start 1299 '<FieldAccess for expr at nodes.lkt:2590:17>' Fld_7 ada/nodes.lkt:2590
--# expr-start 1298 '<FieldAccess for assoc at nodes.lkt:2590:17>' Fld_6 ada/nodes.lkt:2590
Fld_6 := Item_3.Assoc;
--# expr-done 1298
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 1299
   if Fld_7.Node = null
      or else Fld_7.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1300
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_8 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Cast_Result_1.Node, Sequential => False, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 1301
         declare
            Item_To_Append : constant Logic_Equation := Fld_8;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2105;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1302
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2588:13") else null)); 
--# expr-done 1303
   If_Result_35 := Logic_Boolean_Op;
else
   --# expr-start 1456 '<If at nodes.lkt:2586:9>' If_Result_33 ada/nodes.lkt:2586
--# expr-start 1305 '<FieldAccess for name_symbol at nodes.lkt:2595:13>' Fld_79 ada/nodes.lkt:2595
--# expr-start 1304 '<FieldAccess for id at nodes.lkt:2595:13>' Fld_78 ada/nodes.lkt:2595
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_78 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1304
      if Fld_78.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_79 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_78.Node);
--# end
--# expr-done 1305
--# expr-start 1306 '<Symbol Pre at nodes.lkt:2595:38>' Sym_17 ada/nodes.lkt:2595
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre); 
--# expr-done 1306
Is_Equal_15 := Fld_79 = Sym_17; 
if Is_Equal_15 then
   If_Result_32 := True;
else
--# expr-start 1307 '<Symbol Post at nodes.lkt:2596:19>' Sym_18 ada/nodes.lkt:2596
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post); 
--# expr-done 1307
Is_Equal_14 := Fld_79 = Sym_18; 
if Is_Equal_14 then
   If_Result_31 := True;
else
--# expr-start 1308 '<Symbol Refined_Post at nodes.lkt:2597:19>' Sym_19 ada/nodes.lkt:2597
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Post); 
--# expr-done 1308
Is_Equal_13 := Fld_79 = Sym_19; 
if Is_Equal_13 then
   If_Result_30 := True;
else
--# expr-start 1309 '<Symbol Type_Invariant at nodes.lkt:2598:19>' Sym_20 ada/nodes.lkt:2598
Sym_20 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Type_Invariant); 
--# expr-done 1309
Is_Equal_12 := Fld_79 = Sym_20; 
if Is_Equal_12 then
   If_Result_29 := True;
else
--# expr-start 1310 '<Symbol Invariant at nodes.lkt:2599:19>' Sym_21 ada/nodes.lkt:2599
Sym_21 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Invariant); 
--# expr-done 1310
Is_Equal_11 := Fld_79 = Sym_21; 
if Is_Equal_11 then
   If_Result_28 := True;
else
--# expr-start 1311 '<Symbol Predicate at nodes.lkt:2600:19>' Sym_22 ada/nodes.lkt:2600
Sym_22 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Predicate); 
--# expr-done 1311
Is_Equal_10 := Fld_79 = Sym_22; 
if Is_Equal_10 then
   If_Result_27 := True;
else
--# expr-start 1312 '<Symbol Static_Predicate at nodes.lkt:2601:19>' Sym_23 ada/nodes.lkt:2601
Sym_23 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Static_Predicate); 
--# expr-done 1312
Is_Equal_9 := Fld_79 = Sym_23; 
if Is_Equal_9 then
   If_Result_26 := True;
else
--# expr-start 1313 '<Symbol Dynamic_Predicate at nodes.lkt:2602:19>' Sym_24 ada/nodes.lkt:2602
Sym_24 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Dynamic_Predicate); 
--# expr-done 1313
Is_Equal_8 := Fld_79 = Sym_24; 
if Is_Equal_8 then
   If_Result_25 := True;
else
--# expr-start 1314 '<Symbol Initial_Condition at nodes.lkt:2603:19>' Sym_25 ada/nodes.lkt:2603
Sym_25 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Initial_Condition); 
--# expr-done 1314
Is_Equal_7 := Fld_79 = Sym_25; 
   If_Result_25 := Is_Equal_7;
end if;
   If_Result_26 := If_Result_25;
end if;
   If_Result_27 := If_Result_26;
end if;
   If_Result_28 := If_Result_27;
end if;
   If_Result_29 := If_Result_28;
end if;
   If_Result_30 := If_Result_29;
end if;
   If_Result_31 := If_Result_30;
end if;
   If_Result_32 := If_Result_31;
end if;
if If_Result_32 then
   --# expr-start 1338 '<bind at nodes.lkt:2609:13>' Dyn_Var_Bind_Result ada/nodes.lkt:2609
--# expr-start 1327 '<If at nodes.lkt:2610:17>' If_Result_2 ada/nodes.lkt:2610
--# expr-start 1322 '<BooleanBinaryOp And at nodes.lkt:2611:21>' If_Result_1 ada/nodes.lkt:2611
--# expr-start 1316 '<FieldAccess for name_symbol at nodes.lkt:2611:21>' Fld_13 ada/nodes.lkt:2611
--# expr-start 1315 '<FieldAccess for id at nodes.lkt:2611:21>' Fld_12 ada/nodes.lkt:2611
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1315
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_13 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_12.Node);
--# end
--# expr-done 1316
--# expr-start 1317 '<Symbol Pre at nodes.lkt:2611:46>' Sym ada/nodes.lkt:2611
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre); 
--# expr-done 1317
Is_Equal_1 := Fld_13 = Sym; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 1318 '<Symbol Post at nodes.lkt:2611:55>' Sym_1 ada/nodes.lkt:2611
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post); 
--# expr-done 1318
Is_Equal := Fld_13 = Sym_1; 
   If_Result := Is_Equal;
end if;
if If_Result then
   --# expr-start 1321 '<IsA AccessToSubpDef at nodes.lkt:2612:25>' Is_A ada/nodes.lkt:2612
--# expr-start 1319 '<Cast to TypeDecl at nodes.lkt:2612:25>' Cast_Result_3 ada/nodes.lkt:2612
Cast_Expr_1 := Local_Target; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Type_Decl
   then
      Cast_Result_3 := Cast_Expr_1;
   else
         Cast_Result_3 := No_Bare_Ada_Node;
   end if;
--# expr-done 1319
Var_Expr_39 := Cast_Result_3;
if Var_Expr_39 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 1320 '<FieldAccess for type_def at nodes.lkt:2612:25>' Fld_14 ada/nodes.lkt:2612
      if Var_Expr_39 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Var_Expr_39.Type_Decl_F_Type_Def;
--# expr-done 1320
Scope_Result := Fld_14;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
Is_A := Result_Var /= null 
and then Result_Var.Kind in Ada_Access_To_Subp_Def_Range; 
--# expr-done 1321
   If_Result_1 := Is_A;
else
   If_Result_1 := False;
end if;
--# expr-done 1322
if If_Result_1 then
   --# expr-start 1325 '<FieldAccess for children_env at nodes.lkt:2613:22>' Fld_10 ada/nodes.lkt:2613
--# expr-start 1324 '<FieldAccess for type_def at nodes.lkt:2613:22>' Fld_9 ada/nodes.lkt:2613
--# expr-start 1323 '<Cast to TypeDecl at nodes.lkt:2613:22>' Cast_Result_2 ada/nodes.lkt:2613
Cast_Expr := Local_Target; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Type_Decl
   then
      Cast_Result_2 := Cast_Expr;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 1323
      if Cast_Result_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Cast_Result_2.Type_Decl_F_Type_Def;
--# expr-done 1324
      if Fld_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Children_Env (Node => Fld_9);
--# expr-done 1325
   If_Result_2 := Fld_10;
else
   --# expr-start 1326 '<FieldAccess for node_env at nodes.lkt:2614:22>' Fld_11 ada/nodes.lkt:2614
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1326
   If_Result_2 := Fld_11;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 1327
Bound_Env := If_Result_2; Inc_Ref (Bound_Env);
--# expr-start 1337 '<LogicBinaryOp And at nodes.lkt:2617:13>' And_Pred_1 ada/nodes.lkt:2617
--# expr-start 1334 '<LogicBinaryOp And at nodes.lkt:2617:13>' And_Pred ada/nodes.lkt:2617
--# expr-start 1331 '<Bind at nodes.lkt:2617:13>' Bind_Result ada/nodes.lkt:2617
--# expr-start 1329 '<FieldAccess for expected_type_var at nodes.lkt:2617:13>' Fld_16 ada/nodes.lkt:2617
--# expr-start 1328 '<FieldAccess for expr at nodes.lkt:2617:13>' Fld_15 ada/nodes.lkt:2617
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Self.Aspect_Assoc_F_Expr;
--# expr-done 1328
      if Fld_15 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_15);
--# expr-done 1329
Fld_16.Value := No_Entity;
Entity_Vars.Reset (Fld_16);
--# expr-start 1330 '<FieldAccess for bool_type at nodes.lkt:2617:46>' Fld_17 ada/nodes.lkt:2617
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_17 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 1330
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_17.Node,
         Info => Fld_17.Info);
Bind_Result := Solver.Create_Assign (Fld_16, Cast_Result_4, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2617:13") else null)); 
--# expr-done 1331
--# expr-start 1333 '<FieldAccess for sub_equation at nodes.lkt:2618:18>' Fld_19 ada/nodes.lkt:2618
--# expr-start 1332 '<FieldAccess for expr at nodes.lkt:2618:18>' Fld_18 ada/nodes.lkt:2618
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1332
      if Fld_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_19 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_18.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_18.Info);
--# end
--# expr-done 1333
And_Pred := Create_And (Bind_Result, Fld_19, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2617:13") else null)); 
--# expr-done 1334
--# expr-start 1336 '<FieldAccess for matches_expected_formal_type at nodes.lkt:2619:18>' Fld_21 ada/nodes.lkt:2619
--# expr-start 1335 '<FieldAccess for expr at nodes.lkt:2619:18>' Fld_20 ada/nodes.lkt:2619
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Self.Aspect_Assoc_F_Expr;
--# expr-done 1335
      if Fld_20 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_21 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_20, Origin => Origin);
--# end
--# expr-done 1336
And_Pred_1 := Create_And (And_Pred, Fld_21, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2617:13") else null)); 
--# expr-done 1337
Dyn_Var_Bind_Result := And_Pred_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 1338
   If_Result_33 := Dyn_Var_Bind_Result;
else
   --# expr-start 1455 '<If at nodes.lkt:2586:9>' If_Result_24 ada/nodes.lkt:2586
--# expr-start 1340 '<FieldAccess for name_symbol at nodes.lkt:2621:14>' Fld_77 ada/nodes.lkt:2621
--# expr-start 1339 '<FieldAccess for id at nodes.lkt:2621:14>' Fld_76 ada/nodes.lkt:2621
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_76 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1339
      if Fld_76.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_77 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_76.Node);
--# end
--# expr-done 1340
--# expr-start 1341 '<Symbol Contract_Cases at nodes.lkt:2621:39>' Sym_15 ada/nodes.lkt:2621
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Contract_Cases); 
--# expr-done 1341
Is_Equal_6 := Fld_77 = Sym_15; 
if Is_Equal_6 then
   If_Result_23 := True;
else
--# expr-start 1342 '<Symbol Subprogram_Variant at nodes.lkt:2621:59>' Sym_16 ada/nodes.lkt:2621
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Subprogram_Variant); 
--# expr-done 1342
Is_Equal_5 := Fld_77 = Sym_16; 
   If_Result_23 := Is_Equal_5;
end if;
if If_Result_23 then
   --# expr-start 1344 '<FieldAccess for sub_equation at nodes.lkt:2622:14>' Fld_23 ada/nodes.lkt:2622
--# expr-start 1343 '<FieldAccess for expr at nodes.lkt:2622:14>' Fld_22 ada/nodes.lkt:2622
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1343
      if Fld_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_23 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_22.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_22.Info);
--# end
--# expr-done 1344
   If_Result_24 := Fld_23;
else
   --# expr-start 1454 '<If at nodes.lkt:2586:9>' If_Result_22 ada/nodes.lkt:2586
--# expr-start 1347 '<FieldAccess for name_is at nodes.lkt:2625:14>' Fld_75 ada/nodes.lkt:2625
--# expr-start 1345 '<FieldAccess for id at nodes.lkt:2625:14>' Fld_74 ada/nodes.lkt:2625
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_74 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1345
      if Fld_74.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1346 '<Symbol Put_Image at nodes.lkt:2625:30>' Sym_14 ada/nodes.lkt:2625
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Put_Image); 
--# expr-done 1346
--# property-call-start Name.name_is
Fld_75 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_74.Node, Sym => Sym_14);
--# end
--# expr-done 1347
if Fld_75 then
   --# expr-start 1357 '<LogicBinaryOp And at nodes.lkt:2627:13>' And_Pred_2 ada/nodes.lkt:2627
--# expr-start 1350 '<FieldAccess for xref_no_overloading at nodes.lkt:2627:13>' Fld_25 ada/nodes.lkt:2627
--# expr-start 1349 '<Cast to Name at nodes.lkt:2627:13>' Cast_Result_5 ada/nodes.lkt:2627
--# expr-start 1348 '<FieldAccess for expr at nodes.lkt:2627:13>' Fld_24 ada/nodes.lkt:2627
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1348
   if Fld_24.Node = null
      or else Fld_24.Node.Kind in Ada_Name
   then
      Cast_Result_5 := Create_Internal_Entity_Name
        (Node => Fld_24.Node,
         Info => Fld_24.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1349
      if Cast_Result_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_25 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Cast_Result_5.Node, Sequential => False, All_Els => True, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_5.Info);
--# end
--# expr-done 1350
--# expr-start 1356 '<Predicate on BasicDecl.is_put_image_subprogram_for_type at nodes.lkt:2631:18>' Pred ada/nodes.lkt:2631
--# expr-start 1353 '<FieldAccess for ref_var at nodes.lkt:2631:62>' Fld_27 ada/nodes.lkt:2631
--# expr-start 1352 '<Cast to Name at nodes.lkt:2631:62>' Cast_Result_6 ada/nodes.lkt:2631
--# expr-start 1351 '<FieldAccess for expr at nodes.lkt:2631:62>' Fld_26 ada/nodes.lkt:2631
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1351
   if Fld_26.Node = null
      or else Fld_26.Node.Kind in Ada_Name
   then
      Cast_Result_6 := Create_Internal_Entity_Name
        (Node => Fld_26.Node,
         Info => Fld_26.Info);
   else
         Cast_Result_6 := No_Entity_Name;
   end if;
--# expr-done 1352
      if Cast_Result_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_27 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Cast_Result_6.Node);
--# end
--# expr-done 1353
Fld_27.Value := No_Entity;
Entity_Vars.Reset (Fld_27);
--# expr-start 1355 '<as_entity at nodes.lkt:2635:13>' If_Result_3 ada/nodes.lkt:2635
--# expr-start 1354 '<Cast to BaseTypeDecl at nodes.lkt:2635:13>' Cast_Result_7 ada/nodes.lkt:2635
Cast_Expr_2 := Local_Target; 
   if Cast_Expr_2 = null
      or else Cast_Expr_2.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_7 := Cast_Expr_2;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1354
Is_Null := Cast_Result_7 = null; 
if Is_Null then
   If_Result_3 := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Cast_Result_7); 
   If_Result_3 := As_Entity;
end if;
--# expr-done 1355
Pred := Solver.Create_Predicate (Fld_27, Create_Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate (If_Result_3)); 
--# expr-done 1356
And_Pred_2 := Create_And (Fld_25, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2627:13") else null)); 
--# expr-done 1357
   If_Result_22 := And_Pred_2;
else
   --# expr-start 1453 '<If at nodes.lkt:2586:9>' If_Result_21 ada/nodes.lkt:2586
--# expr-start 1364 '<BooleanBinaryOp Or at nodes.lkt:2639:14>' If_Result_20 ada/nodes.lkt:2639
--# expr-start 1360 '<FieldAccess for name_is at nodes.lkt:2639:14>' Fld_71 ada/nodes.lkt:2639
--# expr-start 1358 '<FieldAccess for id at nodes.lkt:2639:14>' Fld_70 ada/nodes.lkt:2639
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_70 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1358
      if Fld_70.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1359 '<Symbol Global at nodes.lkt:2639:30>' Sym_12 ada/nodes.lkt:2639
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Global); 
--# expr-done 1359
--# property-call-start Name.name_is
Fld_71 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_70.Node, Sym => Sym_12);
--# end
--# expr-done 1360
if Fld_71 then
   If_Result_20 := True;
else
   --# expr-start 1363 '<FieldAccess for name_is at nodes.lkt:2639:44>' Fld_73 ada/nodes.lkt:2639
--# expr-start 1361 '<FieldAccess for id at nodes.lkt:2639:44>' Fld_72 ada/nodes.lkt:2639
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_72 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1361
      if Fld_72.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1362 '<Symbol Refined_Global at nodes.lkt:2639:60>' Sym_13 ada/nodes.lkt:2639
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Global); 
--# expr-done 1362
--# property-call-start Name.name_is
Fld_73 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_72.Node, Sym => Sym_13);
--# end
--# expr-done 1363
   If_Result_20 := Fld_73;
end if;
--# expr-done 1364
if If_Result_20 then
   --# expr-start 1369 '<If at nodes.lkt:2641:13>' If_Result_4 ada/nodes.lkt:2641
--# expr-start 1366 '<IsA NullLiteral at nodes.lkt:2641:16>' Is_A_1 ada/nodes.lkt:2641
--# expr-start 1365 '<FieldAccess for expr at nodes.lkt:2641:16>' Fld_30 ada/nodes.lkt:2641
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1365
Is_A_1 := Fld_30.Node /= null 
and then Fld_30.Node.Kind in Ada_Null_Literal_Range; 
--# expr-done 1366
if Is_A_1 then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2641:46") else null)); 
   If_Result_4 := True_Rel;
else
   --# expr-start 1368 '<FieldAccess for sub_equation at nodes.lkt:2642:18>' Fld_29 ada/nodes.lkt:2642
--# expr-start 1367 '<FieldAccess for expr at nodes.lkt:2642:18>' Fld_28 ada/nodes.lkt:2642
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1367
      if Fld_28.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_29 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_28.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_28.Info);
--# end
--# expr-done 1368
   If_Result_4 := Fld_29;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 1369
   If_Result_21 := If_Result_4;
else
   --# expr-start 1452 '<If at nodes.lkt:2586:9>' If_Result_19 ada/nodes.lkt:2586
--# expr-start 1372 '<FieldAccess for name_is at nodes.lkt:2647:14>' Fld_69 ada/nodes.lkt:2647
--# expr-start 1370 '<FieldAccess for id at nodes.lkt:2647:14>' Fld_68 ada/nodes.lkt:2647
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_68 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1370
      if Fld_68.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1371 '<Symbol Convention at nodes.lkt:2647:30>' Sym_11 ada/nodes.lkt:2647
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Convention); 
--# expr-done 1371
--# property-call-start Name.name_is
Fld_69 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_68.Node, Sym => Sym_11);
--# end
--# expr-done 1372
if Fld_69 then
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2647:50") else null)); 
   If_Result_19 := True_Rel_1;
else
   --# expr-start 1451 '<If at nodes.lkt:2586:9>' If_Result_18 ada/nodes.lkt:2586
--# expr-start 1375 '<FieldAccess for name_is at nodes.lkt:2648:14>' Fld_67 ada/nodes.lkt:2648
--# expr-start 1373 '<FieldAccess for id at nodes.lkt:2648:14>' Fld_66 ada/nodes.lkt:2648
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_66 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1373
      if Fld_66.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1374 '<Symbol Stable_Properties at nodes.lkt:2648:30>' Sym_10 ada/nodes.lkt:2648
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Stable_Properties); 
--# expr-done 1374
--# property-call-start Name.name_is
Fld_67 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_66.Node, Sym => Sym_10);
--# end
--# expr-done 1375
if Fld_67 then
   --# expr-start 1376 '<FieldAccess for stable_properties_assoc_equation at nodes.lkt:2649:14>' Fld_31 ada/nodes.lkt:2649
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AspectAssoc.stable_properties_assoc_equation
Fld_31 := Libadalang.Implementation.Aspect_Assoc_P_Stable_Properties_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 1376
   If_Result_18 := Fld_31;
else
   --# expr-start 1450 '<If at nodes.lkt:2586:9>' If_Result_17 ada/nodes.lkt:2586
--# expr-start 1378 '<FieldAccess for name_symbol at nodes.lkt:2651:13>' Fld_65 ada/nodes.lkt:2651
--# expr-start 1377 '<FieldAccess for id at nodes.lkt:2651:13>' Fld_64 ada/nodes.lkt:2651
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_64 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1377
      if Fld_64.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_65 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_64.Node);
--# end
--# expr-done 1378
--# expr-start 1379 '<Symbol Integer_Literal at nodes.lkt:2651:38>' Sym_7 ada/nodes.lkt:2651
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Integer_Literal); 
--# expr-done 1379
Is_Equal_4 := Fld_65 = Sym_7; 
if Is_Equal_4 then
   If_Result_16 := True;
else
--# expr-start 1380 '<Symbol Real_Literal at nodes.lkt:2652:19>' Sym_8 ada/nodes.lkt:2652
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Real_Literal); 
--# expr-done 1380
Is_Equal_3 := Fld_65 = Sym_8; 
if Is_Equal_3 then
   If_Result_15 := True;
else
--# expr-start 1381 '<Symbol String_Literal at nodes.lkt:2653:19>' Sym_9 ada/nodes.lkt:2653
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String_Literal); 
--# expr-done 1381
Is_Equal_2 := Fld_65 = Sym_9; 
   If_Result_15 := Is_Equal_2;
end if;
   If_Result_16 := If_Result_15;
end if;
if If_Result_16 then
   --# expr-start 1383 '<FieldAccess for user_defined_literals_equation at nodes.lkt:2654:14>' Fld_32 ada/nodes.lkt:2654
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1382 '<Cast to TypeDecl at nodes.lkt:2654:50>' Cast_Result_8 ada/nodes.lkt:2654
Cast_Expr_3 := Local_Target; 
   if Cast_Expr_3 = null
      or else Cast_Expr_3.Kind in Ada_Type_Decl
   then
      Cast_Result_8 := Cast_Expr_3;
   else
         Cast_Result_8 := No_Bare_Ada_Node;
   end if;
--# expr-done 1382
--# property-call-start AspectAssoc.user_defined_literals_equation
Fld_32 := Libadalang.Implementation.Aspect_Assoc_P_User_Defined_Literals_Equation (Node => Ent.Node, Target => Cast_Result_8, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 1383
   If_Result_17 := Fld_32;
else
   --# expr-start 1449 '<If at nodes.lkt:2586:9>' If_Result_14 ada/nodes.lkt:2586
--# expr-start 1386 '<FieldAccess for name_is at nodes.lkt:2660:14>' Fld_63 ada/nodes.lkt:2660
--# expr-start 1384 '<FieldAccess for id at nodes.lkt:2660:14>' Fld_62 ada/nodes.lkt:2660
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_62 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1384
      if Fld_62.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1385 '<Symbol Constant_Indexing at nodes.lkt:2660:30>' Sym_6 ada/nodes.lkt:2660
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Constant_Indexing); 
--# expr-done 1385
--# property-call-start Name.name_is
Fld_63 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_62.Node, Sym => Sym_6);
--# end
--# expr-done 1386
if Fld_63 then
   --# expr-start 1394 '<Bind at nodes.lkt:2662:13>' Bind_Result_1 ada/nodes.lkt:2662
--# expr-start 1389 '<FieldAccess for ref_var at nodes.lkt:2662:13>' Fld_34 ada/nodes.lkt:2662
--# expr-start 1388 '<Cast to Identifier at nodes.lkt:2662:13>' Cast_Result_9 ada/nodes.lkt:2662
--# expr-start 1387 '<FieldAccess for expr at nodes.lkt:2662:13>' Fld_33 ada/nodes.lkt:2662
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1387
   if Fld_33.Node = null
      or else Fld_33.Node.Kind in Ada_Identifier_Range
   then
      Cast_Result_9 := Create_Internal_Entity_Identifier
        (Node => Fld_33.Node,
         Info => Fld_33.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1388
      if Cast_Result_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_34 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Cast_Result_9.Node);
--# end
--# expr-done 1389
Fld_34.Value := No_Entity;
Entity_Vars.Reset (Fld_34);
--# expr-start 1393 '<at at nodes.lkt:2663:16>' Get_Result ada/nodes.lkt:2663
--# expr-start 1392 '<FieldAccess for constant_indexing_fns at nodes.lkt:2663:16>' Fld_35 ada/nodes.lkt:2663
--# expr-start 1391 '<as_entity at nodes.lkt:2663:16>' If_Result_5 ada/nodes.lkt:2663
--# expr-start 1390 '<Cast to TypeDecl at nodes.lkt:2663:16>' Cast_Result_10 ada/nodes.lkt:2663
Cast_Expr_4 := Local_Target; 
   if Cast_Expr_4 = null
      or else Cast_Expr_4.Kind in Ada_Type_Decl
   then
      Cast_Result_10 := Cast_Expr_4;
   else
         Cast_Result_10 := No_Bare_Ada_Node;
   end if;
--# expr-done 1390
Is_Null_1 := Cast_Result_10 = null; 
if Is_Null_1 then
   If_Result_5 := No_Entity_Type_Decl;
else
As_Entity_1 := (Info => E_Info, Node => Cast_Result_10); 
   If_Result_5 := As_Entity_1;
end if;
--# expr-done 1391
      if If_Result_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.constant_indexing_fns'
Fld_35 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Constant_Indexing_Fns (Node => If_Result_5.Node, E_Info => If_Result_5.Info);
--# end
--# expr-done 1392
Get_Result := Get (Self, Fld_35, 0, True); 
--# expr-done 1393
      Cast_Result_11 := Create_Internal_Entity
        (Node => Get_Result.Node,
         Info => Get_Result.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_34, Cast_Result_11, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2662:13") else null)); 
--# expr-done 1394
   If_Result_14 := Bind_Result_1;
else
   --# expr-start 1448 '<If at nodes.lkt:2586:9>' If_Result_13 ada/nodes.lkt:2586
--# expr-start 1397 '<FieldAccess for name_is at nodes.lkt:2664:14>' Fld_61 ada/nodes.lkt:2664
--# expr-start 1395 '<FieldAccess for id at nodes.lkt:2664:14>' Fld_60 ada/nodes.lkt:2664
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_60 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1395
      if Fld_60.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1396 '<Symbol Variable_Indexing at nodes.lkt:2664:30>' Sym_5 ada/nodes.lkt:2664
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Variable_Indexing); 
--# expr-done 1396
--# property-call-start Name.name_is
Fld_61 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_60.Node, Sym => Sym_5);
--# end
--# expr-done 1397
if Fld_61 then
   --# expr-start 1405 '<Bind at nodes.lkt:2666:13>' Bind_Result_2 ada/nodes.lkt:2666
--# expr-start 1400 '<FieldAccess for ref_var at nodes.lkt:2666:13>' Fld_37 ada/nodes.lkt:2666
--# expr-start 1399 '<Cast to Identifier at nodes.lkt:2666:13>' Cast_Result_12 ada/nodes.lkt:2666
--# expr-start 1398 '<FieldAccess for expr at nodes.lkt:2666:13>' Fld_36 ada/nodes.lkt:2666
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_36 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1398
   if Fld_36.Node = null
      or else Fld_36.Node.Kind in Ada_Identifier_Range
   then
      Cast_Result_12 := Create_Internal_Entity_Identifier
        (Node => Fld_36.Node,
         Info => Fld_36.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1399
      if Cast_Result_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_37 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Cast_Result_12.Node);
--# end
--# expr-done 1400
Fld_37.Value := No_Entity;
Entity_Vars.Reset (Fld_37);
--# expr-start 1404 '<at at nodes.lkt:2667:16>' Get_Result_1 ada/nodes.lkt:2667
--# expr-start 1403 '<FieldAccess for variable_indexing_fns at nodes.lkt:2667:16>' Fld_38 ada/nodes.lkt:2667
--# expr-start 1402 '<as_entity at nodes.lkt:2667:16>' If_Result_6 ada/nodes.lkt:2667
--# expr-start 1401 '<Cast to TypeDecl at nodes.lkt:2667:16>' Cast_Result_13 ada/nodes.lkt:2667
Cast_Expr_5 := Local_Target; 
   if Cast_Expr_5 = null
      or else Cast_Expr_5.Kind in Ada_Type_Decl
   then
      Cast_Result_13 := Cast_Expr_5;
   else
         Cast_Result_13 := No_Bare_Ada_Node;
   end if;
--# expr-done 1401
Is_Null_2 := Cast_Result_13 = null; 
if Is_Null_2 then
   If_Result_6 := No_Entity_Type_Decl;
else
As_Entity_2 := (Info => E_Info, Node => Cast_Result_13); 
   If_Result_6 := As_Entity_2;
end if;
--# expr-done 1402
      if If_Result_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.variable_indexing_fns'
Fld_38 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Variable_Indexing_Fns (Node => If_Result_6.Node, E_Info => If_Result_6.Info);
--# end
--# expr-done 1403
Get_Result_1 := Get (Self, Fld_38, 0, True); 
--# expr-done 1404
      Cast_Result_14 := Create_Internal_Entity
        (Node => Get_Result_1.Node,
         Info => Get_Result_1.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_37, Cast_Result_14, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2666:13") else null)); 
--# expr-done 1405
   If_Result_13 := Bind_Result_2;
else
   --# expr-start 1447 '<If at nodes.lkt:2586:9>' If_Result_12 ada/nodes.lkt:2586
--# expr-start 1408 '<FieldAccess for name_is at nodes.lkt:2672:14>' Fld_59 ada/nodes.lkt:2672
--# expr-start 1406 '<FieldAccess for id at nodes.lkt:2672:14>' Fld_58 ada/nodes.lkt:2672
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_58 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1406
      if Fld_58.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1407 '<Symbol Annotate at nodes.lkt:2672:30>' Sym_4 ada/nodes.lkt:2672
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Annotate); 
--# expr-done 1407
--# property-call-start Name.name_is
Fld_59 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_58.Node, Sym => Sym_4);
--# end
--# expr-done 1408
if Fld_59 then
   --# expr-start 1418 '<LogicAll at nodes.lkt:2674:13>' Logic_Boolean_Op_1 ada/nodes.lkt:2674
--# expr-start 1417 '<Map at nodes.lkt:2674:13>' Map_Result_1 ada/nodes.lkt:2674
   --# expr-start 1412 '<FieldAccess for unpacked_params at nodes.lkt:2674:13>' Fld_41 ada/nodes.lkt:2674
--# expr-start 1411 '<FieldAccess for assocs at nodes.lkt:2674:13>' Fld_40 ada/nodes.lkt:2674
--# expr-start 1410 '<Cast to BaseAggregate at nodes.lkt:2674:13>' Cast_Result_15 ada/nodes.lkt:2674
--# expr-start 1409 '<FieldAccess for expr at nodes.lkt:2674:13>' Fld_39 ada/nodes.lkt:2674
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_39 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1409
   if Fld_39.Node = null
      or else Fld_39.Node.Kind in Ada_Base_Aggregate
   then
      Cast_Result_15 := Create_Internal_Entity_Base_Aggregate
        (Node => Fld_39.Node,
         Info => Fld_39.Info);
   else
         Cast_Result_15 := No_Entity_Base_Aggregate;
   end if;
--# expr-done 1410
      if Cast_Result_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_40 := Create_Internal_Entity_Assoc_List (Node => Cast_Result_15.Node.Base_Aggregate_F_Assocs, Info => Cast_Result_15.Info);
--# expr-done 1411
      if Fld_40.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.unpacked_params
Fld_41 := Libadalang.Implementation.Assoc_List_P_Unpacked_Params (Node => Fld_40.Node, E_Info => Fld_40.Info);
--# end
--# expr-done 1412
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
         Index_2 := 0;
      declare
         Collection : constant Internal_Single_Actual_Array_Access := Fld_41;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind sa Item_1
               --# bind i Index_2
      --# expr-start 1416 '<If at nodes.lkt:2676:17>' If_Result_7 ada/nodes.lkt:2676
Comp_Result := Index_2 < 2; 
if Comp_Result then
   True_Rel_2 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2676:31") else null)); 
   If_Result_7 := True_Rel_2;
else
   --# expr-start 1415 '<FieldAccess for annotate_argument_equation at nodes.lkt:2677:22>' Fld_44 ada/nodes.lkt:2677
--# expr-start 1414 '<FieldAccess for expr at nodes.lkt:2677:22>' Fld_43 ada/nodes.lkt:2677
--# expr-start 1413 '<FieldAccess for assoc at nodes.lkt:2677:22>' Fld_42 ada/nodes.lkt:2677
Fld_42 := Item_1.Assoc;
--# expr-done 1413
      if Fld_42.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_43 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_42.Node, E_Info => Fld_42.Info);
--# end
--# expr-done 1414
      if Fld_43.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.annotate_argument_equation
Fld_44 := Libadalang.Implementation.Expr_P_Annotate_Argument_Equation (Node => Fld_43.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_43.Info);
--# end
--# expr-done 1415
   If_Result_7 := Fld_44;
end if;
      Inc_Ref (If_Result_7);
--# expr-done 1416
         declare
            Item_To_Append : constant Logic_Equation := If_Result_7;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2107;
               Index_2 := Index_2 + 1;
         end loop;
      end;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 1417
Logic_Boolean_Op_1 := Solver.Create_All (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2674:13") else null)); 
--# expr-done 1418
   If_Result_12 := Logic_Boolean_Op_1;
else
   --# expr-start 1446 '<If at nodes.lkt:2586:9>' If_Result_11 ada/nodes.lkt:2586
--# expr-start 1421 '<FieldAccess for name_is at nodes.lkt:2679:14>' Fld_57 ada/nodes.lkt:2679
--# expr-start 1419 '<FieldAccess for id at nodes.lkt:2679:14>' Fld_56 ada/nodes.lkt:2679
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_56 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1419
      if Fld_56.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1420 '<Symbol Implicit_Dereference at nodes.lkt:2679:30>' Sym_3 ada/nodes.lkt:2679
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Implicit_Dereference); 
--# expr-done 1420
--# property-call-start Name.name_is
Fld_57 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_56.Node, Sym => Sym_3);
--# end
--# expr-done 1421
if Fld_57 then
   --# expr-start 1423 '<FieldAccess for implicit_dereference_equation at nodes.lkt:2680:14>' Fld_45 ada/nodes.lkt:2680
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1422 '<Cast to TypeDecl at nodes.lkt:2680:49>' Cast_Result_16 ada/nodes.lkt:2680
Cast_Expr_6 := Local_Target; 
   if Cast_Expr_6 = null
      or else Cast_Expr_6.Kind in Ada_Type_Decl
   then
      Cast_Result_16 := Cast_Expr_6;
   else
         Cast_Result_16 := No_Bare_Ada_Node;
   end if;
--# expr-done 1422
--# property-call-start AspectAssoc.implicit_dereference_equation
Fld_45 := Libadalang.Implementation.Aspect_Assoc_P_Implicit_Dereference_Equation (Node => Ent.Node, Target => Cast_Result_16, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 1423
   If_Result_11 := Fld_45;
else
   --# expr-start 1445 '<If at nodes.lkt:2586:9>' If_Result_10 ada/nodes.lkt:2586
--# expr-start 1426 '<FieldAccess for name_is at nodes.lkt:2685:14>' Fld_55 ada/nodes.lkt:2685
--# expr-start 1424 '<FieldAccess for id at nodes.lkt:2685:14>' Fld_54 ada/nodes.lkt:2685
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_54 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1424
      if Fld_54.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1425 '<Symbol Model_Of at nodes.lkt:2685:30>' Sym_2 ada/nodes.lkt:2685
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Model_Of); 
--# expr-done 1425
--# property-call-start Name.name_is
Fld_55 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_54.Node, Sym => Sym_2);
--# end
--# expr-done 1426
if Fld_55 then
   --# expr-start 1441 '<If at nodes.lkt:2687:13>' If_Result_9 ada/nodes.lkt:2687
--# expr-start 1427 '<IsA BaseTypeDecl at nodes.lkt:2687:16>' Is_A_2 ada/nodes.lkt:2687
Is_A_2 := Local_Target /= null 
and then Local_Target.Kind in Ada_Base_Type_Decl; 
--# expr-done 1427
if Is_A_2 then
   --# expr-start 1430 '<FieldAccess for xref_type_equation at nodes.lkt:2688:18>' Fld_47 ada/nodes.lkt:2688
--# expr-start 1429 '<Cast to Name at nodes.lkt:2688:18>' Cast_Result_17 ada/nodes.lkt:2688
--# expr-start 1428 '<FieldAccess for expr at nodes.lkt:2688:18>' Fld_46 ada/nodes.lkt:2688
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_46 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1428
   if Fld_46.Node = null
      or else Fld_46.Node.Kind in Ada_Name
   then
      Cast_Result_17 := Create_Internal_Entity_Name
        (Node => Fld_46.Node,
         Info => Fld_46.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1429
      if Cast_Result_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_47 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Cast_Result_17.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_17.Info);
--# end
--# expr-done 1430
   If_Result_9 := Fld_47;
else
   --# expr-start 1440 '<LogicBinaryOp And at nodes.lkt:2690:17>' And_Pred_3 ada/nodes.lkt:2690
--# expr-start 1433 '<FieldAccess for xref_no_overloading at nodes.lkt:2690:17>' Fld_49 ada/nodes.lkt:2690
--# expr-start 1432 '<Cast to Name at nodes.lkt:2690:17>' Cast_Result_18 ada/nodes.lkt:2690
--# expr-start 1431 '<FieldAccess for expr at nodes.lkt:2690:17>' Fld_48 ada/nodes.lkt:2690
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_48 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1431
   if Fld_48.Node = null
      or else Fld_48.Node.Kind in Ada_Name
   then
      Cast_Result_18 := Create_Internal_Entity_Name
        (Node => Fld_48.Node,
         Info => Fld_48.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1432
      if Cast_Result_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_49 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Cast_Result_18.Node, All_Els => True, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_18.Info);
--# end
--# expr-done 1433
--# expr-start 1439 '<Predicate on BasicDecl.subp_decl_match_signature at nodes.lkt:2691:22>' Pred_1 ada/nodes.lkt:2691
--# expr-start 1436 '<FieldAccess for ref_var at nodes.lkt:2691:59>' Fld_51 ada/nodes.lkt:2691
--# expr-start 1435 '<Cast to Name at nodes.lkt:2691:59>' Cast_Result_19 ada/nodes.lkt:2691
--# expr-start 1434 '<FieldAccess for expr at nodes.lkt:2691:59>' Fld_50 ada/nodes.lkt:2691
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_50 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1434
   if Fld_50.Node = null
      or else Fld_50.Node.Kind in Ada_Name
   then
      Cast_Result_19 := Create_Internal_Entity_Name
        (Node => Fld_50.Node,
         Info => Fld_50.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1435
      if Cast_Result_19.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_51 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Cast_Result_19.Node);
--# end
--# expr-done 1436
Fld_51.Value := No_Entity;
Entity_Vars.Reset (Fld_51);
--# expr-start 1438 '<as_entity at nodes.lkt:2695:17>' If_Result_8 ada/nodes.lkt:2695
--# expr-start 1437 '<Cast to BasicDecl at nodes.lkt:2695:17>' Cast_Result_20 ada/nodes.lkt:2695
Cast_Expr_7 := Local_Target; 
   if Cast_Expr_7 = null
      or else Cast_Expr_7.Kind in Ada_Basic_Decl
   then
      Cast_Result_20 := Cast_Expr_7;
   else
         Cast_Result_20 := No_Bare_Ada_Node;
   end if;
--# expr-done 1437
Is_Null_3 := Cast_Result_20 = null; 
if Is_Null_3 then
   If_Result_8 := No_Entity_Basic_Decl;
else
As_Entity_3 := (Info => E_Info, Node => Cast_Result_20); 
   If_Result_8 := As_Entity_3;
end if;
--# expr-done 1438
Pred_1 := Solver.Create_Predicate (Fld_51, Create_Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate (If_Result_8, Origin)); 
--# expr-done 1439
And_Pred_3 := Create_And (Fld_49, Pred_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2690:17") else null)); 
--# expr-done 1440
   If_Result_9 := And_Pred_3;
end if;
      Inc_Ref (If_Result_9);
--# expr-done 1441
   If_Result_10 := If_Result_9;
else
   --# expr-start 1444 '<LogicBinaryOp Or at nodes.lkt:2699:14>' Or_Pred ada/nodes.lkt:2699
--# expr-start 1442 '<FieldAccess for expr at nodes.lkt:2699:14>' Fld_52 ada/nodes.lkt:2699
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_52 := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1442
Var_Expr_0 := Fld_52;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind e Var_Expr_0
--# expr-start 1443 '<FieldAccess for sub_equation at nodes.lkt:2699:34>' Fld_53 ada/nodes.lkt:2699
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_53 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1443
Scope_Result_1 := Fld_53;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2108;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_3 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2699:64") else null)); 
   Result_Var_1 := True_Rel_3;
end if;
      Inc_Ref (Result_Var_1);
True_Rel_4 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2699:75") else null)); 
Or_Pred := Create_Or (Result_Var_1, True_Rel_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2699:14") else null)); 
--# expr-done 1444
   If_Result_10 := Or_Pred;
end if;
      Inc_Ref (If_Result_10);
--# expr-done 1445
   If_Result_11 := If_Result_10;
end if;
      Inc_Ref (If_Result_11);
--# expr-done 1446
   If_Result_12 := If_Result_11;
end if;
      Inc_Ref (If_Result_12);
--# expr-done 1447
   If_Result_13 := If_Result_12;
end if;
      Inc_Ref (If_Result_13);
--# expr-done 1448
   If_Result_14 := If_Result_13;
end if;
      Inc_Ref (If_Result_14);
--# expr-done 1449
   If_Result_17 := If_Result_14;
end if;
      Inc_Ref (If_Result_17);
--# expr-done 1450
   If_Result_18 := If_Result_17;
end if;
      Inc_Ref (If_Result_18);
--# expr-done 1451
   If_Result_19 := If_Result_18;
end if;
      Inc_Ref (If_Result_19);
--# expr-done 1452
   If_Result_21 := If_Result_19;
end if;
      Inc_Ref (If_Result_21);
--# expr-done 1453
   If_Result_22 := If_Result_21;
end if;
      Inc_Ref (If_Result_22);
--# expr-done 1454
   If_Result_24 := If_Result_22;
end if;
      Inc_Ref (If_Result_24);
--# expr-done 1455
   If_Result_33 := If_Result_24;
end if;
      Inc_Ref (If_Result_33);
--# expr-done 1456
   If_Result_35 := If_Result_33;
end if;
      Inc_Ref (If_Result_35);
--# expr-done 1457
Let_Result := If_Result_35; Inc_Ref (Let_Result);
--# end
--# expr-done 1458
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_298;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_298;
                     Finalizer_Scope_2105;
                     Finalizer_Scope_2107;
                     Finalizer_Scope_2108;
            raise;
      end;
   return Property_Result;
end Aspect_Assoc_P_Xref_Equation;
--# end
--# property-start AspectAssoc.implicit_dereference_equation ada/nodes.lkt:2705
pragma Warnings (Off, "is not referenced");
 function Aspect_Assoc_P_Implicit_Dereference_Equation
  (Node : Bare_Aspect_Assoc
      ; Target : Bare_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aspect_Assoc  := Bare_Aspect_Assoc (Node);
     Ent : Internal_Entity_Aspect_Assoc :=
       Internal_Entity_Aspect_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind target Target
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_299 with Inline_Always;
            procedure Finalizer_Scope_2109 with Inline_Always;
      Local_Id : Internal_Entity_Identifier;
Local_Discr : Internal_Entity_Base_Formal_Param_Decl;
Fld : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Identifier;
As_Entity : Internal_Entity_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Decl;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
Fld_3 : Bare_Identifier;
Sym : Symbol_Type;
Fld_4 : Boolean;
Quantifier_Result : Boolean;
Find_Result : Internal_Entity_Base_Formal_Param_Decl;
Fld_5 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_299 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_299;
            procedure Finalizer_Scope_2109 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2109;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1471 '<Let at nodes.lkt:2706:9>' Let_Result_1 ada/nodes.lkt:2706
--# scope-start
--# expr-start 1460 '<Cast to Identifier at nodes.lkt:2706:18>' Cast_Result ada/nodes.lkt:2706
--# expr-start 1459 '<FieldAccess for expr at nodes.lkt:2706:18>' Fld ada/nodes.lkt:2706
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1459
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Identifier_Range
   then
      Cast_Result := Create_Internal_Entity_Identifier
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1460
Local_Id := Cast_Result; 
--# bind id Local_Id
--# expr-start 1470 '<Let at nodes.lkt:2707:9>' Let_Result ada/nodes.lkt:2707
--# scope-start
--# expr-start 1467 '<Find at nodes.lkt:2708:13>' Find_Result ada/nodes.lkt:2708
   --# expr-start 1462 '<FieldAccess for discriminants_list at nodes.lkt:2708:13>' Fld_1 ada/nodes.lkt:2708
--# expr-start 1461 '<as_entity at nodes.lkt:2708:13>' If_Result ada/nodes.lkt:2708
Is_Null := Target = null; 
if Is_Null then
   If_Result := No_Entity_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Target); 
   If_Result := As_Entity;
end if;
--# expr-done 1461
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => If_Result.Node, Origin => Origin, E_Info => If_Result.Info);
--# end
--# expr-done 1462
      Find_Result := No_Entity_Base_Formal_Param_Decl;
      declare
         Collection : constant Internal_Entity_Base_Formal_Param_Decl_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind l Item_0
      --# expr-start 1466 '<AnyQuantifier at nodes.lkt:2709:24>' Quantifier_Result ada/nodes.lkt:2709
   --# expr-start 1463 '<FieldAccess for defining_names at nodes.lkt:2709:24>' Fld_2 ada/nodes.lkt:2709
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 1463
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_2;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_1
      --# expr-start 1465 '<FieldAccess for name_is at nodes.lkt:2709:54>' Fld_4 ada/nodes.lkt:2709
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1464 '<GetSymbol at nodes.lkt:2709:64>' Sym ada/nodes.lkt:2709
Fld_3 := Local_Id.Node; 
Sym := Get_Symbol (Fld_3); 
--# expr-done 1464
--# property-call-start Name.name_is
Fld_4 := Libadalang.Implementation.Name_P_Name_Is (Node => Item_1.Node, Sym => Sym);
--# end
--# expr-done 1465
      Quantifier_Result := Fld_4;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 1466
      if Quantifier_Result then
         Find_Result := Item_0; 
      end if;
   --# end
      Finalizer_Scope_2109;
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 1467
Local_Discr := Find_Result; 
--# bind discr Local_Discr
--# expr-start 1469 '<Bind at nodes.lkt:2712:9>' Bind_Result ada/nodes.lkt:2712
--# expr-start 1468 '<FieldAccess for ref_var at nodes.lkt:2712:9>' Fld_5 ada/nodes.lkt:2712
      if Local_Id.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_5 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Local_Id.Node);
--# end
--# expr-done 1468
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr := Local_Discr; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2712:9") else null)); 
--# expr-done 1469
Let_Result := Bind_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 1470
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 1471
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_299;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_299;
                     Finalizer_Scope_2109;
            raise;
      end;
   return Property_Result;
end Aspect_Assoc_P_Implicit_Dereference_Equation;
--# end
--# property-start AspectAssoc.stable_properties_assoc_equation ada/nodes.lkt:2718
pragma Warnings (Off, "is not referenced");
 function Aspect_Assoc_P_Stable_Properties_Assoc_Equation
  (Node : Bare_Aspect_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aspect_Assoc  := Bare_Aspect_Assoc (Node);
     Ent : Internal_Entity_Aspect_Assoc :=
       Internal_Entity_Aspect_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_300 with Inline_Always;
            procedure Finalizer_Scope_2111 with Inline_Always;
            procedure Finalizer_Scope_2113 with Inline_Always;
            procedure Finalizer_Scope_2114 with Inline_Always;
            procedure Finalizer_Scope_2119 with Inline_Always;
            procedure Finalizer_Scope_2121 with Inline_Always;
      Local_Identifiers : Internal_Entity_Identifier_Array_Access;
Match_0 : Internal_Entity_Aggregate;
Match_1 : Internal_Entity_Paren_Expr;
Match_2 : Internal_Entity_Expr;
Var_Expr_2 : Internal_Entity_Un_Op;
Fld : Internal_Entity_Expr;
Fld_1 : Internal_Entity_Assoc_List;
Fld_2 : Bare_Assoc_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Basic_Assoc;
Bare_Item_0 : Bare_Basic_Assoc;
Fld_4 : Internal_Entity_Expr;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Map_Result : Internal_Entity_Expr_Array_Access;
Fld_5 : Internal_Entity_Expr;
Array_Lit : Internal_Entity_Expr_Array_Access;
Array_Lit_1 : Internal_Entity_Expr_Array_Access;
Match_Prefix : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Aggregate;
Let_Result : Internal_Entity_Expr_Array_Access;
Scope_Result : Internal_Entity_Expr_Array_Access;
Cast_Result_1 : Internal_Entity_Paren_Expr;
Let_Result_1 : Internal_Entity_Expr_Array_Access;
Scope_Result_1 : Internal_Entity_Expr_Array_Access;
Cast_Result_2 : Internal_Entity_Expr;
Let_Result_2 : Internal_Entity_Expr_Array_Access;
Scope_Result_2 : Internal_Entity_Expr_Array_Access;
Match_Result : Internal_Entity_Expr_Array_Access;
Cast_Expr : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Un_Op;
Fld_6 : Internal_Entity_Expr;
Fld_7 : Internal_Entity_Op;
Is_A : Boolean;
If_Result_1 : Internal_Entity_Expr;
Scope_Result_3 : Internal_Entity_Expr;
Result_Var : Internal_Entity_Expr;
Map_Result_1 : Internal_Entity_Expr_Array_Access;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_4 : Internal_Entity_Identifier;
Map_Result_2 : Internal_Entity_Identifier_Array_Access;
Fld_8 : Symbol_Type;
Fld_9 : Bare_Ada_Node;
Fld_10 : Internal_Entity_Array_Access;
Is_A_1 : Boolean;
Cast_Expr_2 : Internal_Entity;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Fld_11 : Internal_Entity_Base_Subp_Spec;
Fld_12 : Boolean;
If_Result_2 : Boolean;
Map_Result_3 : Internal_Entity_Array_Access;
Fld_13 : Logic_Var;
Bind_Result : Logic_Equation;
Map_Result_4 : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Map_Result_5 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
Let_Result_3 : Logic_Equation;
            procedure Finalizer_Scope_300 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Match_Result);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Local_Identifiers);
                     Dec_Ref (Map_Result_5);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_300;
            procedure Finalizer_Scope_2111 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2111;
            procedure Finalizer_Scope_2113 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2113;
            procedure Finalizer_Scope_2114 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_2114;
            procedure Finalizer_Scope_2119 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Map_Result_4);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_2119;
            procedure Finalizer_Scope_2121 is
            begin
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_2121;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1503 '<Let at nodes.lkt:2720:9>' Let_Result_3 ada/nodes.lkt:2720
--# scope-start
--# expr-start 1487 '<Map at nodes.lkt:2721:13>' Map_Result_2 ada/nodes.lkt:2721
   --# expr-start 1485 '<Map at nodes.lkt:2721:13>' Map_Result_1 ada/nodes.lkt:2721
   --# expr-start 1479 '<Match at nodes.lkt:2721:13>' Match_Result ada/nodes.lkt:2721
--# expr-start 1472 '<FieldAccess for expr at nodes.lkt:2721:19>' Fld ada/nodes.lkt:2721
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1472
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Expr (Match_Prefix.Node.Kind) is
         when Ada_Aggregate .. Ada_Bracket_Aggregate =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Aggregate
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind a Match_0
--# expr-start 1475 '<Map at nodes.lkt:2723:38>' Map_Result ada/nodes.lkt:2723
   --# expr-start 1473 '<FieldAccess for assocs at nodes.lkt:2723:38>' Fld_1 ada/nodes.lkt:2723
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Assoc_List (Node => Match_0.Node.Base_Aggregate_F_Assocs, Info => Match_0.Info);
--# expr-done 1473
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Internal_Entity_Expr_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind i Item_0
      --# expr-start 1474 '<FieldAccess for expr at nodes.lkt:2723:58>' Fld_4 ada/nodes.lkt:2723
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 1474
         declare
            Item_To_Append : constant Internal_Entity_Expr := Fld_4;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1475
Let_Result := Map_Result; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2111;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Paren_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Paren_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind pe Match_1
--# expr-start 1477 '<ArrayLiteral at nodes.lkt:2726:39>' Array_Lit ada/nodes.lkt:2726
--# expr-start 1476 '<FieldAccess for expr at nodes.lkt:2726:40>' Fld_5 ada/nodes.lkt:2726
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Match_1.Node.Paren_Expr_F_Expr, Info => Match_1.Info);
--# expr-done 1476
Array_Lit := Create_Internal_Entity_Expr_Array (Internal_Internal_Entity_Expr_Array'(1 => Fld_5)); 
--# expr-done 1477
Let_Result_1 := Array_Lit; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2113;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Abstract_State_Decl_Expr .. Ada_Allocator | Ada_Delta_Aggregate .. Ada_Update_Attribute_Ref | Ada_Quantified_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
--# expr-start 1478 '<ArrayLiteral at nodes.lkt:2727:27>' Array_Lit_1 ada/nodes.lkt:2727
Array_Lit_1 := Create_Internal_Entity_Expr_Array (Internal_Internal_Entity_Expr_Array'(1 => No_Entity_Expr)); 
--# expr-done 1478
Let_Result_2 := Array_Lit_1; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2114;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
end case;
--# expr-done 1479
      declare
         Map_Result_1_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Match_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
--# expr-start 1480 '<Cast to UnOp at nodes.lkt:2731:17>' Cast_Result_3 ada/nodes.lkt:2731
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Un_Op_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Un_Op
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_3 := No_Entity_Un_Op;
   end if;
--# expr-done 1480
Var_Expr_2 := Cast_Result_3;
if Var_Expr_2 /= No_Entity_Un_Op then
   --# scope-start
   --# bind uo Var_Expr_2
--# expr-start 1484 '<If at nodes.lkt:2733:29>' If_Result_1 ada/nodes.lkt:2733
--# expr-start 1482 '<IsA Op.Not at nodes.lkt:2733:32>' Is_A ada/nodes.lkt:2733
--# expr-start 1481 '<FieldAccess for op at nodes.lkt:2733:32>' Fld_7 ada/nodes.lkt:2733
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Op (Node => Var_Expr_2.Node.Un_Op_F_Op, Info => Var_Expr_2.Info);
--# expr-done 1481
Is_A := Fld_7.Node /= null 
and then Fld_7.Node.Kind in Ada_Op_Not_Range; 
--# expr-done 1482
if Is_A then
   --# expr-start 1483 '<FieldAccess for expr at nodes.lkt:2733:53>' Fld_6 ada/nodes.lkt:2733
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Var_Expr_2.Node.Un_Op_F_Expr, Info => Var_Expr_2.Info);
--# expr-done 1483
   If_Result_1 := Fld_6;
else
   If_Result_1 := Item_1;
end if;
--# expr-done 1484
Scope_Result_3 := If_Result_1;
   --# end
   Result_Var := Scope_Result_3;
else
   Result_Var := Item_1;
end if;
         declare
            Item_To_Append : constant Internal_Entity_Expr := Result_Var;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 1485
      declare
         Map_Result_2_Vec : Internal_Entity_Identifier_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Map_Result_1;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_3
      --# expr-start 1486 '<Cast to Identifier at nodes.lkt:2737:25>' Cast_Result_4 ada/nodes.lkt:2737
Cast_Expr_1 := Item_3; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Identifier_Range
   then
      Cast_Result_4 := Create_Internal_Entity_Identifier
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1486
         declare
            Item_To_Append : constant Internal_Entity_Identifier := Cast_Result_4;
         begin
            Internal_Entity_Identifier_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Entity_Identifier_Array
           (Items_Count => Natural (Internal_Entity_Identifier_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Entity_Identifier_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Entity_Identifier_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Entity_Identifier_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 1487
Local_Identifiers := Map_Result_2; Inc_Ref (Local_Identifiers);
--# bind identifiers Local_Identifiers
--# expr-start 1502 '<LogicAll at nodes.lkt:2740:9>' Logic_Boolean_Op_1 ada/nodes.lkt:2740
--# expr-start 1501 '<Map at nodes.lkt:2740:9>' Map_Result_5 ada/nodes.lkt:2740
      declare
         Map_Result_5_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Identifier_Array_Access := Local_Identifiers;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind i Item_4
      --# expr-start 1500 '<LogicAny at nodes.lkt:2742:13>' Logic_Boolean_Op ada/nodes.lkt:2742
--# expr-start 1499 '<Map at nodes.lkt:2742:13>' Map_Result_4 ada/nodes.lkt:2742
   --# expr-start 1496 '<Map at nodes.lkt:2742:13>' Map_Result_3 ada/nodes.lkt:2742
   --# expr-start 1490 '<FieldAccess for env_get at nodes.lkt:2742:13>' Fld_10 ada/nodes.lkt:2742
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1488 '<FieldAccess for sym at nodes.lkt:2744:17>' Fld_8 ada/nodes.lkt:2744
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld_8 := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Item_4.Node);
--# end
--# expr-done 1488
--# expr-start 1489 '<FieldAccess for origin_node at nodes.lkt:2746:27>' Fld_9 ada/nodes.lkt:2746
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_9 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 1489
--# property-call-start AdaNode.env_get
Fld_10 := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Env, Symbol => Fld_8, Lookup => Recursive, From_Node => Fld_9, Categories => (Inherited_Primitives => True, Nocat => True));
--# end
--# expr-done 1490
      declare
         Map_Result_3_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_10;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind f Item_5
         --# expr-start 1495 '<BooleanBinaryOp And at nodes.lkt:2751:17>' If_Result_2 ada/nodes.lkt:2751
--# expr-start 1491 '<IsA SubpDecl, ExprFunction at nodes.lkt:2753:21>' Is_A_1 ada/nodes.lkt:2753
Is_A_1 := Item_5.Node /= null 
and then Item_5.Node.Kind in Ada_Subp_Decl_Range | Ada_Expr_Function_Range; 
--# expr-done 1491
if Is_A_1 then
   --# expr-start 1494 '<FieldAccess for denotes_the_property_function at nodes.lkt:2755:21>' Fld_12 ada/nodes.lkt:2755
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1493 '<FieldAccess for subp_spec_or_null at nodes.lkt:2756:21>' Fld_11 ada/nodes.lkt:2756
--# expr-start 1492 '<Cast to BasicDecl at nodes.lkt:2756:21>' Cast_Result_5 ada/nodes.lkt:2756
Cast_Expr_2 := Item_5; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_5 := No_Entity_Basic_Decl;
   end if;
--# expr-done 1492
      if Cast_Result_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_11 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Cast_Result_5.Node, E_Info => Cast_Result_5.Info);
--# end
--# expr-done 1493
--# property-call-start BaseId.denotes_the_property_function
Fld_12 := Libadalang.Implementation.Base_Id_P_Denotes_The_Property_Function (Node => Item_4.Node, Subp_Spec => Fld_11, E_Info => Item_4.Info);
--# end
--# expr-done 1494
   If_Result_2 := Fld_12;
else
   If_Result_2 := False;
end if;
--# expr-done 1495
         if If_Result_2 then
         declare
            Item_To_Append : constant Internal_Entity := Item_5;
         begin
            Internal_Entity_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_3 := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 1496
      declare
         Map_Result_4_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result_3;
      begin
         for Item_6 of
               Collection.Items
         loop
   --# scope-start
               --# bind f Item_6
      --# expr-start 1498 '<Bind at nodes.lkt:2759:31>' Bind_Result ada/nodes.lkt:2759
--# expr-start 1497 '<FieldAccess for ref_var at nodes.lkt:2759:31>' Fld_13 ada/nodes.lkt:2759
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_13 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Item_4.Node);
--# end
--# expr-done 1497
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
Bind_Result := Solver.Create_Assign (Fld_13, Item_6, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2759:31") else null)); 
--# expr-done 1498
         declare
            Item_To_Append : constant Logic_Equation := Bind_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_4_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2121;
         end loop;
      end;
         Map_Result_4 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_4_Vec)));
         for I in Map_Result_4.Items'Range loop
            Map_Result_4.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_4_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_4.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_4_Vec);
      end;
--# expr-done 1499
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result_4.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2742:13") else null)); 
--# expr-done 1500
         declare
            Item_To_Append : constant Logic_Equation := Logic_Boolean_Op;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_5_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2119;
         end loop;
      end;
         Map_Result_5 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_5_Vec)));
         for I in Map_Result_5.Items'Range loop
            Map_Result_5.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_5_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_5.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_5_Vec);
      end;
--# expr-done 1501
Logic_Boolean_Op_1 := Solver.Create_All (Relation_Array (Map_Result_5.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2740:9") else null)); 
--# expr-done 1502
Let_Result_3 := Logic_Boolean_Op_1; Inc_Ref (Let_Result_3);
--# end
--# expr-done 1503
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_300;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_300;
                     Finalizer_Scope_2111;
                     Finalizer_Scope_2113;
                     Finalizer_Scope_2114;
                     Finalizer_Scope_2119;
                     Finalizer_Scope_2121;
            raise;
      end;
   return Property_Result;
end Aspect_Assoc_P_Stable_Properties_Assoc_Equation;
--# end
--# property-start AspectAssoc.user_defined_literals_equation ada/nodes.lkt:2766
pragma Warnings (Off, "is not referenced");
 function Aspect_Assoc_P_User_Defined_Literals_Equation
  (Node : Bare_Aspect_Assoc
      ; Target : Bare_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aspect_Assoc  := Bare_Aspect_Assoc (Node);
     Ent : Internal_Entity_Aspect_Assoc :=
       Internal_Entity_Aspect_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind target Target
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_301 with Inline_Always;
      Fld : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Identifier;
Fld_1 : Logic_Var;
As_Entity : Internal_Entity_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Symbol_Type;
Fld_4 : Internal_Entity_Basic_Decl_Array_Access;
Get_Result : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_301 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_301;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1512 '<Bind at nodes.lkt:2767:9>' Bind_Result ada/nodes.lkt:2767
--# expr-start 1506 '<FieldAccess for ref_var at nodes.lkt:2767:9>' Fld_1 ada/nodes.lkt:2767
--# expr-start 1505 '<Cast to Identifier at nodes.lkt:2767:9>' Cast_Result ada/nodes.lkt:2767
--# expr-start 1504 '<FieldAccess for expr at nodes.lkt:2767:9>' Fld ada/nodes.lkt:2767
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Aspect_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1504
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Identifier_Range
   then
      Cast_Result := Create_Internal_Entity_Identifier
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1505
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Cast_Result.Node);
--# end
--# expr-done 1506
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 1511 '<at at nodes.lkt:2768:12>' Get_Result ada/nodes.lkt:2768
--# expr-start 1510 '<FieldAccess for user_defined_literal_fns at nodes.lkt:2768:12>' Fld_4 ada/nodes.lkt:2768
--# expr-start 1507 '<as_entity at nodes.lkt:2768:12>' If_Result ada/nodes.lkt:2768
Is_Null := Target = null; 
if Is_Null then
   If_Result := No_Entity_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Target); 
   If_Result := As_Entity;
end if;
--# expr-done 1507
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1509 '<FieldAccess for name_symbol at nodes.lkt:2768:54>' Fld_3 ada/nodes.lkt:2768
--# expr-start 1508 '<FieldAccess for id at nodes.lkt:2768:54>' Fld_2 ada/nodes.lkt:2768
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1508
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_2.Node);
--# end
--# expr-done 1509
--# property-call-start TypeDecl.user_defined_literal_fns
Fld_4 := Libadalang.Implementation.Type_Decl_P_User_Defined_Literal_Fns (Node => If_Result.Node, Aspect => Fld_3, E_Info => If_Result.Info);
--# end
--# expr-done 1510
Get_Result := Get (Self, Fld_4, 0, True); 
--# expr-done 1511
      Cast_Result_1 := Create_Internal_Entity
        (Node => Get_Result.Node,
         Info => Get_Result.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2767:9") else null)); 
--# expr-done 1512
         Property_Result := Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_301;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_301;
            raise;
      end;
   return Property_Result;
end Aspect_Assoc_P_User_Defined_Literals_Equation;
--# end
--# property-start AspectAssoc.aspect_name ada/nodes.lkt:2775
pragma Warnings (Off, "is not referenced");
 function Aspect_Assoc_P_Aspect_Name
  (Node : Bare_Aspect_Assoc
      ; N : Internal_Entity_Name
  )
   return String_Type
is
   Self : Bare_Aspect_Assoc  := Bare_Aspect_Assoc (Node);
      --# bind self Self
   --# bind n N
   Property_Result : String_Type;
            procedure Finalizer_Scope_302 with Inline_Always;
            procedure Finalizer_Scope_2122 with Inline_Always;
            procedure Finalizer_Scope_2123 with Inline_Always;
      Match_0 : Internal_Entity_Base_Id;
Match_1 : Internal_Entity_Attribute_Ref;
Match_2 : Internal_Entity_Name;
Fld : Symbol_Type;
Fld_1 : String_Type;
Fld_2 : Internal_Entity_Name;
Fld_3 : String_Type;
Str : String_Type;
Concat_Result : String_Type;
Fld_4 : Internal_Entity_Identifier;
Fld_5 : Symbol_Type;
Fld_6 : String_Type;
Concat_Result_1 : String_Type;
Match_Prefix : Internal_Entity_Name;
Cast_Result : Internal_Entity_Base_Id;
Let_Result : String_Type;
Scope_Result : String_Type;
Cast_Result_1 : Internal_Entity_Attribute_Ref;
Let_Result_1 : String_Type;
Scope_Result_1 : String_Type;
Cast_Result_2 : Internal_Entity_Name;
Let_Result_2 : String_Type;
Scope_Result_2 : String_Type;
Match_Result : String_Type;
            procedure Finalizer_Scope_302 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_302;
            procedure Finalizer_Scope_2122 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2122;
            procedure Finalizer_Scope_2123 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Concat_Result_1);
            end Finalizer_Scope_2123;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1521 '<Match at nodes.lkt:2778:5>' Match_Result ada/nodes.lkt:2778
      if N.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := N; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Char_Literal .. Ada_String_Literal =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Base_Id
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind bid Match_0
--# expr-start 1514 '<FieldAccess for image at nodes.lkt:2779:29>' Fld_1 ada/nodes.lkt:2779
--# expr-start 1513 '<FieldAccess for sym at nodes.lkt:2779:29>' Fld ada/nodes.lkt:2779
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Match_0.Node);
--# end
--# expr-done 1513
Fld_1 := Libadalang.Implementation.Image (Self => Fld);
--# expr-done 1514
Let_Result := Fld_1; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2122;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Attribute_Ref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind ar Match_1
--# expr-start 1516 '<FieldAccess for aspect_name at nodes.lkt:2781:13>' Fld_3 ada/nodes.lkt:2781
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1515 '<FieldAccess for prefix at nodes.lkt:2781:30>' Fld_2 ada/nodes.lkt:2781
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Match_1.Node.Attribute_Ref_F_Prefix, Info => Match_1.Info);
--# expr-done 1515
--# property-call-start AspectAssoc.aspect_name
Fld_3 := Libadalang.Implementation.Aspect_Assoc_P_Aspect_Name (Node => Self, N => Fld_2);
--# end
--# expr-done 1516
--# expr-start 1517 '<String at nodes.lkt:2781:43>' Str ada/nodes.lkt:2781
Str := Create_String ("'"); 
--# expr-done 1517
Concat_Result := Concat_String (Fld_3, Str); 
--# expr-start 1520 '<FieldAccess for image at nodes.lkt:2781:49>' Fld_6 ada/nodes.lkt:2781
--# expr-start 1519 '<FieldAccess for sym at nodes.lkt:2781:49>' Fld_5 ada/nodes.lkt:2781
--# expr-start 1518 '<FieldAccess for attribute at nodes.lkt:2781:49>' Fld_4 ada/nodes.lkt:2781
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Identifier (Node => Match_1.Node.Attribute_Ref_F_Attribute, Info => Match_1.Info);
--# expr-done 1518
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld_5 := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Fld_4.Node);
--# end
--# expr-done 1519
Fld_6 := Libadalang.Implementation.Image (Self => Fld_5);
--# expr-done 1520
Concat_Result_1 := Concat_String (Concat_Result, Fld_6); 
Let_Result_1 := Concat_Result_1; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2123;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := raise Precondition_Failure with "aspect_name called on an invalid aspect name"; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
end case;
--# expr-done 1521
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_302;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_302;
                     Finalizer_Scope_2122;
                     Finalizer_Scope_2123;
            raise;
      end;
   return Property_Result;
end Aspect_Assoc_P_Aspect_Name;
--# end
--# property-start AspectAssoc.is_ghost_code ada/nodes.lkt:2790
pragma Warnings (Off, "is not referenced");
 function Aspect_Assoc_P_Is_Ghost_Code
  (Node : Bare_Aspect_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Aspect_Assoc  := Bare_Aspect_Assoc (Node);
     Ent : Internal_Entity_Aspect_Assoc :=
       Internal_Entity_Aspect_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Name;
Fld_1 : Symbol_Type;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1523 '<FieldAccess for name_symbol at nodes.lkt:2791:9>' Fld_1 ada/nodes.lkt:2791
--# expr-start 1522 '<FieldAccess for id at nodes.lkt:2791:9>' Fld ada/nodes.lkt:2791
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Aspect_Assoc_F_Id, Info => Ent.Info);
--# expr-done 1522
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 1523
--# expr-start 1524 '<Symbol Pre at nodes.lkt:2791:34>' Sym ada/nodes.lkt:2791
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre); 
--# expr-done 1524
Is_Equal_2 := Fld_1 = Sym; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 1525 '<Symbol Post at nodes.lkt:2791:43>' Sym_1 ada/nodes.lkt:2791
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post); 
--# expr-done 1525
Is_Equal_1 := Fld_1 = Sym_1; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 1526 '<Symbol Contract_Cases at nodes.lkt:2791:53>' Sym_2 ada/nodes.lkt:2791
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Contract_Cases); 
--# expr-done 1526
Is_Equal := Fld_1 = Sym_2; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aspect_Assoc_P_Is_Ghost_Code;
--# end
   --
   --  Primitives for Bare_Aspect_Clause
   --
--# property-start AspectClause.xref_entry_point ada/nodes.lkt:2797
pragma Warnings (Off, "is not referenced");
 function Aspect_Clause_P_Xref_Entry_Point
  (Node : Bare_Aspect_Clause
  )
   return Boolean
is
   Self : Bare_Aspect_Clause  := Bare_Aspect_Clause (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aspect_Clause_P_Xref_Entry_Point;
--# end
   --
   --  Primitives for Bare_At_Clause
   --
      procedure Initialize_Fields_For_At_Clause
        (Self : Bare_At_Clause
         ; At_Clause_F_Name : Bare_Base_Id
         ; At_Clause_F_Expr : Bare_Expr
        ) is
      begin
            Self.At_Clause_F_Name := At_Clause_F_Name;
            Self.At_Clause_F_Expr := At_Clause_F_Expr;
      end Initialize_Fields_For_At_Clause;
   function At_Clause_F_Name
     (Node : Bare_At_Clause) return Bare_Base_Id
   is
   begin
         return Node.At_Clause_F_Name;
   end;
   function At_Clause_F_Expr
     (Node : Bare_At_Clause) return Bare_Expr
   is
   begin
         return Node.At_Clause_F_Expr;
   end;
--# property-start AtClause.xref_equation ada/nodes.lkt:2808
pragma Warnings (Off, "is not referenced");
 function At_Clause_P_Xref_Equation
  (Node : Bare_At_Clause
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_At_Clause  := Bare_At_Clause (Node);
     Ent : Internal_Entity_At_Clause :=
       Internal_Entity_At_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_305 with Inline_Always;
      Fld : Internal_Entity_Base_Id;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_305 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_305;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1531 '<LogicBinaryOp And at nodes.lkt:2809:9>' And_Pred ada/nodes.lkt:2809
--# expr-start 1528 '<FieldAccess for sub_equation at nodes.lkt:2809:9>' Fld_1 ada/nodes.lkt:2809
--# expr-start 1527 '<FieldAccess for name at nodes.lkt:2809:9>' Fld ada/nodes.lkt:2809
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Base_Id (Node => Ent.Node.At_Clause_F_Name, Info => Ent.Info);
--# expr-done 1527
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 1528
--# expr-start 1530 '<FieldAccess for sub_equation at nodes.lkt:2809:39>' Fld_3 ada/nodes.lkt:2809
--# expr-start 1529 '<FieldAccess for expr at nodes.lkt:2809:39>' Fld_2 ada/nodes.lkt:2809
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.At_Clause_F_Expr, Info => Ent.Info);
--# expr-done 1529
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 1530
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2809:9") else null)); 
--# expr-done 1531
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_305;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_305;
            raise;
      end;
   return Property_Result;
end At_Clause_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Attribute_Def_Clause
   --
      procedure Initialize_Fields_For_Attribute_Def_Clause
        (Self : Bare_Attribute_Def_Clause
         ; Attribute_Def_Clause_F_Attribute_Expr : Bare_Name
         ; Attribute_Def_Clause_F_Expr : Bare_Expr
        ) is
      begin
            Self.Attribute_Def_Clause_F_Attribute_Expr := Attribute_Def_Clause_F_Attribute_Expr;
            Self.Attribute_Def_Clause_F_Expr := Attribute_Def_Clause_F_Expr;
      end Initialize_Fields_For_Attribute_Def_Clause;
   function Attribute_Def_Clause_F_Attribute_Expr
     (Node : Bare_Attribute_Def_Clause) return Bare_Name
   is
   begin
         return Node.Attribute_Def_Clause_F_Attribute_Expr;
   end;
   function Attribute_Def_Clause_F_Expr
     (Node : Bare_Attribute_Def_Clause) return Bare_Expr
   is
   begin
         return Node.Attribute_Def_Clause_F_Expr;
   end;
--# property-start AttributeDefClause.xref_equation ada/nodes.lkt:2821
pragma Warnings (Off, "is not referenced");
 function Attribute_Def_Clause_P_Xref_Equation
  (Node : Bare_Attribute_Def_Clause
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Def_Clause  := Bare_Attribute_Def_Clause (Node);
     Ent : Internal_Entity_Attribute_Def_Clause :=
       Internal_Entity_Attribute_Def_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_306 with Inline_Always;
      Local_Attr : Internal_Entity_Attribute_Ref;
Local_Rel_Name : Symbol_Type;
Fld : Internal_Entity_Name;
Cast_Result : Internal_Entity_Attribute_Ref;
Fld_1 : Internal_Entity_Identifier;
Fld_2 : Symbol_Type;
Fld_3 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_4 : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_6 : Logic_Var;
Fld_7 : Internal_Entity_Name;
Fld_8 : Internal_Entity_Base_Type_Decl;
Sym : Symbol_Type;
Is_Equal : Boolean;
Pred : Logic_Equation;
And_Pred : Logic_Equation;
Fld_9 : Internal_Entity_Name;
Fld_10 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_11 : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Name;
Fld_12 : Logic_Equation;
Fld_13 : Internal_Entity_Expr;
Cast_Result_4 : Internal_Entity_Name;
Fld_14 : Logic_Var;
Fld_15 : Internal_Entity_Name;
Fld_16 : Internal_Entity_Base_Type_Decl;
Pred_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_17 : Internal_Entity_Name;
Fld_18 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_19 : Internal_Entity_Expr;
Fld_20 : Logic_Equation;
Fld_21 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_22 : Bare_Expr;
Fld_23 : Logic_Var;
Sym_1 : Symbol_Type;
Fld_24 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_25 : Bare_Expr;
Fld_26 : Logic_Var;
Fld_27 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
True_Rel : Logic_Equation;
Sym_2 : Symbol_Type;
Is_Equal_1 : Boolean;
If_Result : Logic_Equation;
Sym_3 : Symbol_Type;
Is_Equal_2 : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Sym_4 : Symbol_Type;
Is_Equal_3 : Boolean;
If_Result_2 : Logic_Equation;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Is_Equal_4 : Boolean;
Is_Equal_5 : Boolean;
If_Result_3 : Boolean;
Is_Equal_6 : Boolean;
If_Result_4 : Boolean;
Is_Equal_7 : Boolean;
If_Result_5 : Boolean;
If_Result_6 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_306 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_10);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Pred_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_18);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_20);
                     Dec_Ref (Fld_21);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_306;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1592 '<Let at nodes.lkt:2822:9>' Let_Result_1 ada/nodes.lkt:2822
--# scope-start
--# expr-start 1533 '<Cast to AttributeRef at nodes.lkt:2822:20>' Cast_Result ada/nodes.lkt:2822
--# expr-start 1532 '<FieldAccess for attribute_expr at nodes.lkt:2822:20>' Fld ada/nodes.lkt:2822
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Def_Clause_F_Attribute_Expr, Info => Ent.Info);
--# expr-done 1532
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Attribute_Ref_Range
   then
      Cast_Result := Create_Internal_Entity_Attribute_Ref
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1533
Local_Attr := Cast_Result; 
--# bind attr Local_Attr
--# expr-start 1591 '<Let at nodes.lkt:2823:9>' Let_Result ada/nodes.lkt:2823
--# scope-start
--# expr-start 1535 '<FieldAccess for name_symbol at nodes.lkt:2823:24>' Fld_2 ada/nodes.lkt:2823
--# expr-start 1534 '<FieldAccess for attribute at nodes.lkt:2823:24>' Fld_1 ada/nodes.lkt:2823
      if Local_Attr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Identifier (Node => Local_Attr.Node.Attribute_Ref_F_Attribute, Info => Local_Attr.Info);
--# expr-done 1534
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_1.Node);
--# end
--# expr-done 1535
Local_Rel_Name := Fld_2; 
--# bind rel_name Local_Rel_Name
--# expr-start 1590 '<If at nodes.lkt:2825:9>' If_Result_6 ada/nodes.lkt:2825
--# expr-start 1536 '<Symbol Read at nodes.lkt:2825:24>' Sym_5 ada/nodes.lkt:2825
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Read); 
--# expr-done 1536
Is_Equal_7 := Local_Rel_Name = Sym_5; 
if Is_Equal_7 then
   If_Result_5 := True;
else
--# expr-start 1537 '<Symbol Write at nodes.lkt:2825:34>' Sym_6 ada/nodes.lkt:2825
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Write); 
--# expr-done 1537
Is_Equal_6 := Local_Rel_Name = Sym_6; 
if Is_Equal_6 then
   If_Result_4 := True;
else
--# expr-start 1538 '<Symbol Input at nodes.lkt:2825:45>' Sym_7 ada/nodes.lkt:2825
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Input); 
--# expr-done 1538
Is_Equal_5 := Local_Rel_Name = Sym_7; 
if Is_Equal_5 then
   If_Result_3 := True;
else
--# expr-start 1539 '<Symbol Output at nodes.lkt:2825:56>' Sym_8 ada/nodes.lkt:2825
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Output); 
--# expr-done 1539
Is_Equal_4 := Local_Rel_Name = Sym_8; 
   If_Result_3 := Is_Equal_4;
end if;
   If_Result_4 := If_Result_3;
end if;
   If_Result_5 := If_Result_4;
end if;
if If_Result_5 then
   --# expr-start 1554 '<LogicBinaryOp And at nodes.lkt:2827:13>' And_Pred_1 ada/nodes.lkt:2827
--# expr-start 1551 '<LogicBinaryOp And at nodes.lkt:2828:17>' And_Pred ada/nodes.lkt:2828
--# expr-start 1542 '<FieldAccess for xref_no_overloading at nodes.lkt:2828:17>' Fld_4 ada/nodes.lkt:2828
--# expr-start 1541 '<Cast to Name at nodes.lkt:2828:17>' Cast_Result_1 ada/nodes.lkt:2828
--# expr-start 1540 '<FieldAccess for expr at nodes.lkt:2828:17>' Fld_3 ada/nodes.lkt:2828
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Attribute_Def_Clause_F_Expr, Info => Ent.Info);
--# expr-done 1540
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1541
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_4 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Cast_Result_1.Node, All_Els => True, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 1542
--# expr-start 1550 '<Predicate on BasicDecl.is_stream_subprogram_for_type at nodes.lkt:2829:22>' Pred ada/nodes.lkt:2829
--# expr-start 1545 '<FieldAccess for ref_var at nodes.lkt:2829:63>' Fld_6 ada/nodes.lkt:2829
--# expr-start 1544 '<Cast to Name at nodes.lkt:2829:63>' Cast_Result_2 ada/nodes.lkt:2829
--# expr-start 1543 '<FieldAccess for expr at nodes.lkt:2829:63>' Fld_5 ada/nodes.lkt:2829
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Attribute_Def_Clause_F_Expr, Info => Ent.Info);
--# expr-done 1543
   if Fld_5.Node = null
      or else Fld_5.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 1544
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Cast_Result_2.Node);
--# end
--# expr-done 1545
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
--# expr-start 1547 '<FieldAccess for name_designated_type at nodes.lkt:2833:17>' Fld_8 ada/nodes.lkt:2833
--# expr-start 1546 '<FieldAccess for prefix at nodes.lkt:2833:17>' Fld_7 ada/nodes.lkt:2833
      if Local_Attr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Name (Node => Local_Attr.Node.Attribute_Ref_F_Prefix, Info => Local_Attr.Info);
--# expr-done 1546
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_8 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 1547
--# expr-start 1549 '<Eq at nodes.lkt:2834:17>' Is_Equal ada/nodes.lkt:2834
--# expr-start 1548 '<Symbol Input at nodes.lkt:2834:29>' Sym ada/nodes.lkt:2834
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Input); 
--# expr-done 1548
Is_Equal := Local_Rel_Name = Sym; 
--# expr-done 1549
Pred := Solver.Create_Predicate (Fld_6, Create_Basic_Decl_P_Is_Stream_Subprogram_For_Type_0_Predicate (Fld_8, Is_Equal)); 
--# expr-done 1550
And_Pred := Create_And (Fld_4, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2828:17") else null)); 
--# expr-done 1551
--# expr-start 1553 '<FieldAccess for sub_equation at nodes.lkt:2836:18>' Fld_10 ada/nodes.lkt:2836
--# expr-start 1552 '<FieldAccess for prefix at nodes.lkt:2836:18>' Fld_9 ada/nodes.lkt:2836
      if Local_Attr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Name (Node => Local_Attr.Node.Attribute_Ref_F_Prefix, Info => Local_Attr.Info);
--# expr-done 1552
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_10 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_9.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_9.Info);
--# end
--# expr-done 1553
And_Pred_1 := Create_And (And_Pred, Fld_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2827:13") else null)); 
--# expr-done 1554
   If_Result_6 := And_Pred_1;
else
   --# expr-start 1589 '<If at nodes.lkt:2825:9>' If_Result_2 ada/nodes.lkt:2825
--# expr-start 1555 '<Symbol Put_Image at nodes.lkt:2837:26>' Sym_4 ada/nodes.lkt:2837
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Put_Image); 
--# expr-done 1555
Is_Equal_3 := Local_Rel_Name = Sym_4; 
if Is_Equal_3 then
   --# expr-start 1568 '<LogicBinaryOp And at nodes.lkt:2839:13>' And_Pred_3 ada/nodes.lkt:2839
--# expr-start 1565 '<LogicBinaryOp And at nodes.lkt:2840:17>' And_Pred_2 ada/nodes.lkt:2840
--# expr-start 1558 '<FieldAccess for xref_no_overloading at nodes.lkt:2840:17>' Fld_12 ada/nodes.lkt:2840
--# expr-start 1557 '<Cast to Name at nodes.lkt:2840:17>' Cast_Result_3 ada/nodes.lkt:2840
--# expr-start 1556 '<FieldAccess for expr at nodes.lkt:2840:17>' Fld_11 ada/nodes.lkt:2840
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Expr (Node => Ent.Node.Attribute_Def_Clause_F_Expr, Info => Ent.Info);
--# expr-done 1556
   if Fld_11.Node = null
      or else Fld_11.Node.Kind in Ada_Name
   then
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Fld_11.Node,
         Info => Fld_11.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1557
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_12 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Cast_Result_3.Node, All_Els => True, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_3.Info);
--# end
--# expr-done 1558
--# expr-start 1564 '<Predicate on BasicDecl.is_put_image_subprogram_for_type at nodes.lkt:2841:22>' Pred_1 ada/nodes.lkt:2841
--# expr-start 1561 '<FieldAccess for ref_var at nodes.lkt:2841:66>' Fld_14 ada/nodes.lkt:2841
--# expr-start 1560 '<Cast to Name at nodes.lkt:2841:66>' Cast_Result_4 ada/nodes.lkt:2841
--# expr-start 1559 '<FieldAccess for expr at nodes.lkt:2841:66>' Fld_13 ada/nodes.lkt:2841
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Expr (Node => Ent.Node.Attribute_Def_Clause_F_Expr, Info => Ent.Info);
--# expr-done 1559
   if Fld_13.Node = null
      or else Fld_13.Node.Kind in Ada_Name
   then
      Cast_Result_4 := Create_Internal_Entity_Name
        (Node => Fld_13.Node,
         Info => Fld_13.Info);
   else
         Cast_Result_4 := No_Entity_Name;
   end if;
--# expr-done 1560
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_14 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Cast_Result_4.Node);
--# end
--# expr-done 1561
Fld_14.Value := No_Entity;
Entity_Vars.Reset (Fld_14);
--# expr-start 1563 '<FieldAccess for name_designated_type at nodes.lkt:2845:17>' Fld_16 ada/nodes.lkt:2845
--# expr-start 1562 '<FieldAccess for prefix at nodes.lkt:2845:17>' Fld_15 ada/nodes.lkt:2845
      if Local_Attr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Name (Node => Local_Attr.Node.Attribute_Ref_F_Prefix, Info => Local_Attr.Info);
--# expr-done 1562
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_16 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_15.Node, E_Info => Fld_15.Info);
--# end
--# expr-done 1563
Pred_1 := Solver.Create_Predicate (Fld_14, Create_Basic_Decl_P_Is_Put_Image_Subprogram_For_Type_0_Predicate (Fld_16)); 
--# expr-done 1564
And_Pred_2 := Create_And (Fld_12, Pred_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2840:17") else null)); 
--# expr-done 1565
--# expr-start 1567 '<FieldAccess for sub_equation at nodes.lkt:2847:18>' Fld_18 ada/nodes.lkt:2847
--# expr-start 1566 '<FieldAccess for prefix at nodes.lkt:2847:18>' Fld_17 ada/nodes.lkt:2847
      if Local_Attr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Name (Node => Local_Attr.Node.Attribute_Ref_F_Prefix, Info => Local_Attr.Info);
--# expr-done 1566
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_18 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_17.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_17.Info);
--# end
--# expr-done 1567
And_Pred_3 := Create_And (And_Pred_2, Fld_18, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2839:13") else null)); 
--# expr-done 1568
   If_Result_2 := And_Pred_3;
else
   --# expr-start 1588 '<LogicBinaryOp And at nodes.lkt:2849:13>' And_Pred_5 ada/nodes.lkt:2849
--# expr-start 1572 '<LogicBinaryOp And at nodes.lkt:2849:14>' And_Pred_4 ada/nodes.lkt:2849
--# expr-start 1570 '<FieldAccess for sub_equation at nodes.lkt:2849:14>' Fld_20 ada/nodes.lkt:2849
--# expr-start 1569 '<FieldAccess for expr at nodes.lkt:2849:14>' Fld_19 ada/nodes.lkt:2849
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Expr (Node => Ent.Node.Attribute_Def_Clause_F_Expr, Info => Ent.Info);
--# expr-done 1569
      if Fld_19.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_20 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_19.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_19.Info);
--# end
--# expr-done 1570
--# expr-start 1571 '<FieldAccess for sub_equation at nodes.lkt:2849:44>' Fld_21 ada/nodes.lkt:2849
      if Local_Attr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_21 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Attr.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Attr.Info);
--# end
--# expr-done 1571
And_Pred_4 := Create_And (Fld_20, Fld_21, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2849:14") else null)); 
--# expr-done 1572
--# expr-start 1587 '<If at nodes.lkt:2851:17>' If_Result_1 ada/nodes.lkt:2851
--# expr-start 1574 '<Eq at nodes.lkt:2851:20>' Is_Equal_2 ada/nodes.lkt:2851
--# expr-start 1573 '<Symbol External_Tag at nodes.lkt:2851:32>' Sym_3 ada/nodes.lkt:2851
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_External_Tag); 
--# expr-done 1573
Is_Equal_2 := Local_Rel_Name = Sym_3; 
--# expr-done 1574
if Is_Equal_2 then
   --# expr-start 1579 '<Bind at nodes.lkt:2853:21>' Bind_Result ada/nodes.lkt:2853
--# expr-start 1576 '<FieldAccess for expected_type_var at nodes.lkt:2853:21>' Fld_23 ada/nodes.lkt:2853
--# expr-start 1575 '<FieldAccess for expr at nodes.lkt:2853:21>' Fld_22 ada/nodes.lkt:2853
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Self.Attribute_Def_Clause_F_Expr;
--# expr-done 1575
      if Fld_22 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_22);
--# expr-done 1576
Fld_23.Value := No_Entity;
Entity_Vars.Reset (Fld_23);
--# expr-start 1578 '<FieldAccess for std_entity at nodes.lkt:2853:54>' Fld_24 ada/nodes.lkt:2853
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1577 '<Symbol String at nodes.lkt:2853:70>' Sym_1 ada/nodes.lkt:2853
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String); 
--# expr-done 1577
--# property-call-start AdaNode.std_entity
Fld_24 := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_1);
--# end
--# expr-done 1578
Bind_Result := Solver.Create_Assign (Fld_23, Fld_24, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2853:21") else null)); 
--# expr-done 1579
   If_Result_1 := Bind_Result;
else
   --# expr-start 1586 '<If at nodes.lkt:2851:17>' If_Result ada/nodes.lkt:2851
--# expr-start 1581 '<Eq at nodes.lkt:2854:22>' Is_Equal_1 ada/nodes.lkt:2854
--# expr-start 1580 '<Symbol Address at nodes.lkt:2854:34>' Sym_2 ada/nodes.lkt:2854
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Address); 
--# expr-done 1580
Is_Equal_1 := Local_Rel_Name = Sym_2; 
--# expr-done 1581
if Is_Equal_1 then
   --# expr-start 1585 '<Bind at nodes.lkt:2856:21>' Bind_Result_1 ada/nodes.lkt:2856
--# expr-start 1583 '<FieldAccess for expected_type_var at nodes.lkt:2856:21>' Fld_26 ada/nodes.lkt:2856
--# expr-start 1582 '<FieldAccess for expr at nodes.lkt:2856:21>' Fld_25 ada/nodes.lkt:2856
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Self.Attribute_Def_Clause_F_Expr;
--# expr-done 1582
      if Fld_25 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_25);
--# expr-done 1583
Fld_26.Value := No_Entity;
Entity_Vars.Reset (Fld_26);
--# expr-start 1584 '<FieldAccess for system_address_type at nodes.lkt:2856:54>' Fld_27 ada/nodes.lkt:2856
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.system_address_type
Fld_27 := Libadalang.Implementation.Ada_Node_P_System_Address_Type (Node => Ent.Node);
--# end
--# expr-done 1584
      Cast_Result_5 := Create_Internal_Entity
        (Node => Fld_27.Node,
         Info => Fld_27.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_26, Cast_Result_5, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2856:21") else null)); 
--# expr-done 1585
   If_Result := Bind_Result_1;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2857:22") else null)); 
   If_Result := True_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 1586
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 1587
And_Pred_5 := Create_And (And_Pred_4, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2849:13") else null)); 
--# expr-done 1588
   If_Result_2 := And_Pred_5;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 1589
   If_Result_6 := If_Result_2;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 1590
Let_Result := If_Result_6; Inc_Ref (Let_Result);
--# end
--# expr-done 1591
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 1592
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_306;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_306;
            raise;
      end;
   return Property_Result;
end Attribute_Def_Clause_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Enum_Rep_Clause
   --
      procedure Initialize_Fields_For_Enum_Rep_Clause
        (Self : Bare_Enum_Rep_Clause
         ; Enum_Rep_Clause_F_Type_Name : Bare_Name
         ; Enum_Rep_Clause_F_Aggregate : Bare_Base_Aggregate
        ) is
      begin
            Self.Enum_Rep_Clause_F_Type_Name := Enum_Rep_Clause_F_Type_Name;
            Self.Enum_Rep_Clause_F_Aggregate := Enum_Rep_Clause_F_Aggregate;
      end Initialize_Fields_For_Enum_Rep_Clause;
   function Enum_Rep_Clause_F_Type_Name
     (Node : Bare_Enum_Rep_Clause) return Bare_Name
   is
   begin
         return Node.Enum_Rep_Clause_F_Type_Name;
   end;
   function Enum_Rep_Clause_F_Aggregate
     (Node : Bare_Enum_Rep_Clause) return Bare_Base_Aggregate
   is
   begin
         return Node.Enum_Rep_Clause_F_Aggregate;
   end;
--# property-start EnumRepClause.xref_equation ada/nodes.lkt:2870
pragma Warnings (Off, "is not referenced");
 function Enum_Rep_Clause_P_Xref_Equation
  (Node : Bare_Enum_Rep_Clause
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Enum_Rep_Clause  := Bare_Enum_Rep_Clause (Node);
     Ent : Internal_Entity_Enum_Rep_Clause :=
       Internal_Entity_Enum_Rep_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_307 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_307 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_307;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1594 '<FieldAccess for xref_type_equation at nodes.lkt:2871:9>' Fld_1 ada/nodes.lkt:2871
--# expr-start 1593 '<FieldAccess for type_name at nodes.lkt:2871:9>' Fld ada/nodes.lkt:2871
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Enum_Rep_Clause_F_Type_Name, Info => Ent.Info);
--# expr-done 1593
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_1 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 1594
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_307;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_307;
            raise;
      end;
   return Property_Result;
end Enum_Rep_Clause_P_Xref_Equation;
--# end
--# property-start EnumRepClause.params ada/nodes.lkt:2878
pragma Warnings (Off, "is not referenced");
 function Enum_Rep_Clause_P_Params
  (Node : Bare_Enum_Rep_Clause
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Actual_Array_Access
is
   Self : Bare_Enum_Rep_Clause  := Bare_Enum_Rep_Clause (Node);
     Ent : Internal_Entity_Enum_Rep_Clause :=
       Internal_Entity_Enum_Rep_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_308 with Inline_Always;
      Local_El : Internal_Entity_Enum_Literal_Decl_List;
Local_Ra : Internal_Entity_Assoc_List;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Type_Decl;
Fld_3 : Internal_Entity_Type_Def;
Cast_Result_2 : Internal_Entity_Enum_Type_Def;
Fld_4 : Internal_Entity_Enum_Literal_Decl_List;
Fld_5 : Internal_Entity_Base_Aggregate;
Fld_6 : Internal_Entity_Assoc_List;
Saved : Internal_Entity_Enum_Literal_Decl_List;
Fld_7 : Bare_Enum_Literal_Decl_List;
Fld_8 : Internal_Entity_Info;
Item_0 : Internal_Entity_Enum_Literal_Decl;
Bare_Item_0 : Bare_Enum_Literal_Decl;
Index_1 : Integer;
Fld_9 : Internal_Entity_Defining_Name;
Fld_10 : Internal_Entity_Defining_Name;
Fld_11 : Internal_Entity_Expr;
New_Struct : Internal_Param_Actual;
As_Entity : Internal_Entity_Enum_Literal_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Enum_Literal_Decl;
Map_Result : Internal_Param_Actual_Array_Access;
Let_Result : Internal_Param_Actual_Array_Access;
Let_Result_1 : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_308 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_308;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 1611 '<Let at nodes.lkt:2880:9>' Let_Result_1 ada/nodes.lkt:2880
--# scope-start
--# expr-start 1602 '<FieldAccess for enum_literals at nodes.lkt:2881:13>' Fld_4 ada/nodes.lkt:2881
--# expr-start 1601 '<Cast to EnumTypeDef at nodes.lkt:2881:13>' Cast_Result_2 ada/nodes.lkt:2881
--# expr-start 1600 '<FieldAccess for type_def at nodes.lkt:2881:13>' Fld_3 ada/nodes.lkt:2881
--# expr-start 1599 '<Cast to TypeDecl at nodes.lkt:2881:13>' Cast_Result_1 ada/nodes.lkt:2881
--# expr-start 1598 '<FieldAccess for root_type at nodes.lkt:2881:13>' Fld_2 ada/nodes.lkt:2881
--# expr-start 1597 '<Cast to BaseTypeDecl at nodes.lkt:2881:13>' Cast_Result ada/nodes.lkt:2881
--# expr-start 1596 '<FieldAccess for referenced_decl at nodes.lkt:2881:13>' Fld_1 ada/nodes.lkt:2881
--# expr-start 1595 '<FieldAccess for type_name at nodes.lkt:2881:13>' Fld ada/nodes.lkt:2881
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Enum_Rep_Clause_F_Type_Name, Info => Ent.Info);
--# expr-done 1595
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_1 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld.Node, Imprecise_Fallback => False, E_Info => Fld.Info);
--# end
--# expr-done 1596
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 1597
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.root_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Root_Type (Node => Cast_Result.Node, Origin => No_Bare_Ada_Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 1598
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Type_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result_1 := No_Entity_Type_Decl;
   end if;
--# expr-done 1599
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Type_Def (Node => Cast_Result_1.Node.Type_Decl_F_Type_Def, Info => Cast_Result_1.Info);
--# expr-done 1600
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Enum_Type_Def_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Enum_Type_Def
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result_2 := No_Entity_Enum_Type_Def;
   end if;
--# expr-done 1601
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Enum_Literal_Decl_List (Node => Cast_Result_2.Node.Enum_Type_Def_F_Enum_Literals, Info => Cast_Result_2.Info);
--# expr-done 1602
Local_El := Fld_4; 
--# bind el Local_El
--# expr-start 1610 '<Let at nodes.lkt:2887:9>' Let_Result ada/nodes.lkt:2887
--# scope-start
--# expr-start 1604 '<FieldAccess for assocs at nodes.lkt:2887:18>' Fld_6 ada/nodes.lkt:2887
--# expr-start 1603 '<FieldAccess for aggregate at nodes.lkt:2887:18>' Fld_5 ada/nodes.lkt:2887
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Base_Aggregate (Node => Ent.Node.Enum_Rep_Clause_F_Aggregate, Info => Ent.Info);
--# expr-done 1603
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Assoc_List (Node => Fld_5.Node.Base_Aggregate_F_Assocs, Info => Fld_5.Info);
--# expr-done 1604
Local_Ra := Fld_6; 
--# bind ra Local_Ra
--# expr-start 1609 '<Map at nodes.lkt:2889:9>' Map_Result ada/nodes.lkt:2889
Saved := Local_El; 
Fld_7 := Saved.Node;
      declare
         Map_Result_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      if Fld_7 = null then
      Map_Result := Create_Internal_Param_Actual_Array (0);
      else
         Index_1 := 0;
      declare
         Collection : constant Bare_Enum_Literal_Decl_List := Fld_7;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Enum_Literal_Decl;
else
Fld_8 := Saved.Info;
As_Entity := (Info => Fld_8, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind l Item_0
               --# bind i Index_1
      --# expr-start 1608 '<New ParamActual at nodes.lkt:2891:13>' New_Struct ada/nodes.lkt:2891
--# expr-start 1606 '<FieldAccess for actual_for_param_at at nodes.lkt:2891:46>' Fld_11 ada/nodes.lkt:2891
      if Local_Ra.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1605 '<FieldAccess for name at nodes.lkt:2891:69>' Fld_10 ada/nodes.lkt:2891
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Defining_Name (Node => Item_0.Node.Enum_Literal_Decl_F_Name, Info => Item_0.Info);
--# expr-done 1605
--# property-call-start AssocList.actual_for_param_at
Fld_11 := Libadalang.Implementation.Assoc_List_P_Actual_For_Param_At (Node => Local_Ra.Node, Param => Fld_10, Pos => Index_1, E_Info => Local_Ra.Info);
--# end
--# expr-done 1606
--# expr-start 1607 '<FieldAccess for name at nodes.lkt:2891:31>' Fld_9 ada/nodes.lkt:2891
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Defining_Name (Node => Item_0.Node.Enum_Literal_Decl_F_Name, Info => Item_0.Info);
--# expr-done 1607
New_Struct := (Actual => Fld_11, Param => Fld_9); 
--# expr-done 1608
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
               Index_1 := Index_1 + 1;
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1609
Let_Result := Map_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 1610
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 1611
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_308;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_308;
            raise;
      end;
   return Property_Result;
end Enum_Rep_Clause_P_Params;
--# end
   --
   --  Primitives for Bare_Record_Rep_Clause
   --
      procedure Initialize_Fields_For_Record_Rep_Clause
        (Self : Bare_Record_Rep_Clause
         ; Record_Rep_Clause_F_Name : Bare_Name
         ; Record_Rep_Clause_F_At_Expr : Bare_Expr
         ; Record_Rep_Clause_F_Components : Bare_Ada_Node_List
        ) is
      begin
            Self.Record_Rep_Clause_F_Name := Record_Rep_Clause_F_Name;
            Self.Record_Rep_Clause_F_At_Expr := Record_Rep_Clause_F_At_Expr;
            Self.Record_Rep_Clause_F_Components := Record_Rep_Clause_F_Components;
      end Initialize_Fields_For_Record_Rep_Clause;
   function Record_Rep_Clause_F_Name
     (Node : Bare_Record_Rep_Clause) return Bare_Name
   is
   begin
         return Node.Record_Rep_Clause_F_Name;
   end;
   function Record_Rep_Clause_F_At_Expr
     (Node : Bare_Record_Rep_Clause) return Bare_Expr
   is
   begin
         return Node.Record_Rep_Clause_F_At_Expr;
   end;
   function Record_Rep_Clause_F_Components
     (Node : Bare_Record_Rep_Clause) return Bare_Ada_Node_List
   is
   begin
         return Node.Record_Rep_Clause_F_Components;
   end;
--# property-start RecordRepClause.xref_equation ada/nodes.lkt:2907
pragma Warnings (Off, "is not referenced");
 function Record_Rep_Clause_P_Xref_Equation
  (Node : Bare_Record_Rep_Clause
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Record_Rep_Clause  := Bare_Record_Rep_Clause (Node);
     Ent : Internal_Entity_Record_Rep_Clause :=
       Internal_Entity_Record_Rep_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_309 with Inline_Always;
            procedure Finalizer_Scope_2126 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_309 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_309;
            procedure Finalizer_Scope_2126 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2126;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1616 '<LogicBinaryOp And at nodes.lkt:2908:9>' And_Pred ada/nodes.lkt:2908
--# expr-start 1613 '<FieldAccess for xref_type_equation at nodes.lkt:2908:9>' Fld_1 ada/nodes.lkt:2908
--# expr-start 1612 '<FieldAccess for name at nodes.lkt:2908:9>' Fld ada/nodes.lkt:2908
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Record_Rep_Clause_F_Name, Info => Ent.Info);
--# expr-done 1612
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_1 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 1613
--# expr-start 1614 '<FieldAccess for at_expr at nodes.lkt:2909:14>' Fld_2 ada/nodes.lkt:2909
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Record_Rep_Clause_F_At_Expr, Info => Ent.Info);
--# expr-done 1614
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind e Var_Expr_0
--# expr-start 1615 '<FieldAccess for sub_equation at nodes.lkt:2909:37>' Fld_3 ada/nodes.lkt:2909
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1615
Scope_Result := Fld_3;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2126;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2909:67") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred := Create_And (Fld_1, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:2908:9") else null)); 
--# expr-done 1616
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_309;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_309;
                     Finalizer_Scope_2126;
            raise;
      end;
   return Property_Result;
end Record_Rep_Clause_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Aspect_Spec
   --
      procedure Initialize_Fields_For_Aspect_Spec
        (Self : Bare_Aspect_Spec
         ; Aspect_Spec_F_Aspect_Assocs : Bare_Aspect_Assoc_List
        ) is
      begin
            Self.Aspect_Spec_F_Aspect_Assocs := Aspect_Spec_F_Aspect_Assocs;
      end Initialize_Fields_For_Aspect_Spec;
   function Aspect_Spec_F_Aspect_Assocs
     (Node : Bare_Aspect_Spec) return Bare_Aspect_Assoc_List
   is
   begin
         return Node.Aspect_Spec_F_Aspect_Assocs;
   end;
   --
   --  Primitives for Bare_Base_Assoc
   --
--# property-start '[dispatcher]BaseAssoc.assoc_expr' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Assoc_P_Assoc_Expr
  (Node : Bare_Base_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Base_Assoc  := Bare_Base_Assoc (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Assoc (Self.Kind) is
               when Ada_Contract_Case_Assoc =>
                  --# property-call-start ContractCaseAssoc.assoc_expr
                  Property_Result := Contract_Case_Assoc_P_Assoc_Expr
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Pragma_Argument_Assoc =>
                  --# property-call-start PragmaArgumentAssoc.assoc_expr
                  Property_Result := Pragma_Argument_Assoc_P_Assoc_Expr
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Assoc_P_Assoc_Expr;
--# end
   --
   --  Primitives for Bare_Contract_Case_Assoc
   --
      procedure Initialize_Fields_For_Contract_Case_Assoc
        (Self : Bare_Contract_Case_Assoc
         ; Contract_Case_Assoc_F_Guard : Bare_Ada_Node
         ; Contract_Case_Assoc_F_Consequence : Bare_Expr
        ) is
      begin
            Self.Contract_Case_Assoc_F_Guard := Contract_Case_Assoc_F_Guard;
            Self.Contract_Case_Assoc_F_Consequence := Contract_Case_Assoc_F_Consequence;
      end Initialize_Fields_For_Contract_Case_Assoc;
   function Contract_Case_Assoc_F_Guard
     (Node : Bare_Contract_Case_Assoc) return Bare_Ada_Node
   is
   begin
         return Node.Contract_Case_Assoc_F_Guard;
   end;
   function Contract_Case_Assoc_F_Consequence
     (Node : Bare_Contract_Case_Assoc) return Bare_Expr
   is
   begin
         return Node.Contract_Case_Assoc_F_Consequence;
   end;
--# property-start ContractCaseAssoc.assoc_expr ada/nodes.lkt:2935
pragma Warnings (Off, "is not referenced");
 function Contract_Case_Assoc_P_Assoc_Expr
  (Node : Bare_Contract_Case_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Contract_Case_Assoc  := Bare_Contract_Case_Assoc (Node);
     Ent : Internal_Entity_Contract_Case_Assoc :=
       Internal_Entity_Contract_Case_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Fld : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1617 '<FieldAccess for consequence at nodes.lkt:2935:38>' Fld ada/nodes.lkt:2935
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Contract_Case_Assoc_F_Consequence, Info => Ent.Info);
--# expr-done 1617
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Contract_Case_Assoc_P_Assoc_Expr;
--# end
   --
   --  Primitives for Bare_Pragma_Argument_Assoc
   --
      procedure Initialize_Fields_For_Pragma_Argument_Assoc
        (Self : Bare_Pragma_Argument_Assoc
         ; Pragma_Argument_Assoc_F_Name : Bare_Name
         ; Pragma_Argument_Assoc_F_Expr : Bare_Expr
        ) is
      begin
            Self.Pragma_Argument_Assoc_F_Name := Pragma_Argument_Assoc_F_Name;
            Self.Pragma_Argument_Assoc_F_Expr := Pragma_Argument_Assoc_F_Expr;
      end Initialize_Fields_For_Pragma_Argument_Assoc;
   function Pragma_Argument_Assoc_F_Name
     (Node : Bare_Pragma_Argument_Assoc) return Bare_Name
   is
   begin
         return Node.Pragma_Argument_Assoc_F_Name;
   end;
   function Pragma_Argument_Assoc_F_Expr
     (Node : Bare_Pragma_Argument_Assoc) return Bare_Expr
   is
   begin
         return Node.Pragma_Argument_Assoc_F_Expr;
   end;
--# property-start PragmaArgumentAssoc.assoc_expr ada/nodes.lkt:2946
pragma Warnings (Off, "is not referenced");
 function Pragma_Argument_Assoc_P_Assoc_Expr
  (Node : Bare_Pragma_Argument_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Pragma_Argument_Assoc  := Bare_Pragma_Argument_Assoc (Node);
     Ent : Internal_Entity_Pragma_Argument_Assoc :=
       Internal_Entity_Pragma_Argument_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Fld : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1618 '<FieldAccess for expr at nodes.lkt:2946:38>' Fld ada/nodes.lkt:2946
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Pragma_Argument_Assoc_F_Expr, Info => Ent.Info);
--# expr-done 1618
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Pragma_Argument_Assoc_P_Assoc_Expr;
--# end
   --
   --  Primitives for Bare_Base_Formal_Param_Holder
   --
--# property-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params
  (Node : Bare_Base_Formal_Param_Holder
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Formal_Param_Holder (Self.Kind) is
               when Ada_Entry_Spec .. Ada_Subp_Spec =>
                  --# property-call-start BaseSubpSpec.abstract_formal_params
                  Property_Result := Base_Subp_Spec_P_Abstract_Formal_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Binary_Spec =>
                  --# property-call-start SyntheticBinarySpec.abstract_formal_params
                  Property_Result := Synthetic_Binary_Spec_P_Abstract_Formal_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Unary_Spec =>
                  --# property-call-start SyntheticUnarySpec.abstract_formal_params
                  Property_Result := Synthetic_Unary_Spec_P_Abstract_Formal_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Component_List =>
                  --# property-call-start ComponentList.abstract_formal_params
                  Property_Result := Component_List_P_Abstract_Formal_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Unknown_Discriminant_Part =>
                  --# property-call-start DiscriminantPart.abstract_formal_params
                  Property_Result := Discriminant_Part_P_Abstract_Formal_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Known_Discriminant_Part =>
                  --# property-call-start KnownDiscriminantPart.abstract_formal_params
                  Property_Result := Known_Discriminant_Part_P_Abstract_Formal_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Completion_Formal_Params =>
                  --# property-call-start EntryCompletionFormalParams.abstract_formal_params
                  Property_Result := Entry_Completion_Formal_Params_P_Abstract_Formal_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Formal_Part =>
                  --# property-call-start GenericFormalPart.abstract_formal_params
                  Property_Result := Generic_Formal_Part_P_Abstract_Formal_Params
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params;
--# end
--# property-start BaseFormalParamHolder.unpacked_formal_params ada/nodes.lkt:2969
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Unpacked_Formal_Params
  (Node : Bare_Base_Formal_Param_Holder
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_314 with Inline_Always;
      Fld : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_314 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_314;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1620 '<FieldAccess for unpack_formals at nodes.lkt:2970:9>' Fld_1 ada/nodes.lkt:2970
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1619 '<FieldAccess for abstract_formal_params at nodes.lkt:2970:29>' Fld ada/nodes.lkt:2970
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1619
--# property-call-start AdaNode.unpack_formals
Fld_1 := Libadalang.Implementation.Ada_Node_P_Unpack_Formals (Node => Self, Formal_Params => Fld);
--# end
--# expr-done 1620
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_314;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_314;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Unpacked_Formal_Params;
--# end
--# property-start BaseFormalParamHolder.formal_params ada/nodes.lkt:2976
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Formal_Params
  (Node : Bare_Base_Formal_Param_Holder
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_315 with Inline_Always;
            procedure Finalizer_Scope_2127 with Inline_Always;
            procedure Finalizer_Scope_2129 with Inline_Always;
      Match_0 : Internal_Entity_Component_List;
Match_1 : Internal_Entity_Base_Formal_Param_Holder;
Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_2 : Internal_Entity;
Bare_Item_2 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Is_A : Boolean;
Map_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_3 : Internal_Entity_Defining_Name_Array_Access;
Fld_4 : Internal_Entity_Defining_Name_Array_Access;
Match_Prefix : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result_1 : Internal_Entity_Component_List;
Let_Result : Internal_Entity_Defining_Name_Array_Access;
Scope_Result : Internal_Entity_Defining_Name_Array_Access;
Cast_Result_2 : Internal_Entity_Base_Formal_Param_Holder;
Let_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Scope_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Match_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_315 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_315;
            procedure Finalizer_Scope_2127 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2127;
            procedure Finalizer_Scope_2129 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_2129;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 1627 '<Match at nodes.lkt:2976:56>' Match_Result ada/nodes.lkt:2976
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Base_Formal_Param_Holder (Match_Prefix.Node.Kind) is
         when Ada_Component_List =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Component_List
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind r Match_0
--# expr-start 1625 '<FieldAccess for unpack_formals at nodes.lkt:2978:13>' Fld_3 ada/nodes.lkt:2978
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1624 '<FilterMap at nodes.lkt:2978:33>' Map_Result ada/nodes.lkt:2978
   --# expr-start 1621 '<FieldAccess for components at nodes.lkt:2978:33>' Fld ada/nodes.lkt:2978
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Match_0.Node.Component_List_F_Components, Info => Match_0.Info);
--# expr-done 1621
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_2 := Untyped_Item_2; 
Is_Null := Bare_Item_2 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_2); 
   If_Result := As_Entity;
end if;
                  Item_2 := If_Result; 
   --# scope-start
               --# bind e Item_2
         --# expr-start 1622 '<IsA BaseFormalParamDecl at ???>' Is_A None
Is_A := Item_2.Node /= null 
and then Item_2.Node.Kind in Ada_Base_Formal_Param_Decl; 
--# expr-done 1622
         if Is_A then
      --# expr-start 1623 '<Cast to BaseFormalParamDecl at ???>' Cast_Result None
Cast_Expr := Item_2; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Formal_Param_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Formal_Param_Decl;
   end if;
--# expr-done 1623
         declare
            Item_To_Append : constant Internal_Entity_Base_Formal_Param_Decl := Cast_Result;
         begin
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1624
--# property-call-start AdaNode.unpack_formals
Fld_3 := Libadalang.Implementation.Ada_Node_P_Unpack_Formals (Node => Self, Formal_Params => Map_Result);
--# end
--# expr-done 1625
Let_Result := Fld_3; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2127;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Entry_Spec .. Ada_Synthetic_Unary_Spec | Ada_Known_Discriminant_Part .. Ada_Generic_Formal_Part =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind _ Match_1
--# expr-start 1626 '<FieldAccess for unpacked_formal_params at nodes.lkt:2979:19>' Fld_4 ada/nodes.lkt:2979
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1626
Let_Result_1 := Fld_4; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2129;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
end case;
--# expr-done 1627
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_315;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_315;
                     Finalizer_Scope_2127;
                     Finalizer_Scope_2129;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Formal_Params;
--# end
--# property-start BaseFormalParamHolder.match_param_list ada/nodes.lkt:2982
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Match_Param_List
  (Node : Bare_Base_Formal_Param_Holder
      ; Params : Internal_Entity_Assoc_List
      ; Is_Dottable_Subp : Boolean
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Match_Array_Access
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind params Params
   --# bind is_dottable_subp Is_Dottable_Subp
   Property_Result : Internal_Param_Match_Array_Access;
            procedure Finalizer_Scope_316 with Inline_Always;
      Fld : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_1 : Internal_Param_Match_Array_Access;
            procedure Finalizer_Scope_316 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_316;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1629 '<FieldAccess for match_formals at nodes.lkt:2986:9>' Fld_1 ada/nodes.lkt:2986
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1628 '<FieldAccess for abstract_formal_params at nodes.lkt:2987:13>' Fld ada/nodes.lkt:2987
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1628
--# property-call-start AdaNode.match_formals
Fld_1 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Self, Formal_Params => Fld, Params => Params, Is_Dottable_Subp => Is_Dottable_Subp);
--# end
--# expr-done 1629
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_316;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_316;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Match_Param_List;
--# end
--# property-start BaseFormalParamHolder.nb_min_params ada/nodes.lkt:2995
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Nb_Min_Params
  (Node : Bare_Base_Formal_Param_Holder
  )
   return Integer
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
      --# bind self Self
   Property_Result : Integer;
            procedure Finalizer_Scope_317 with Inline_Always;
      As_Entity : Internal_Entity_Base_Formal_Param_Holder;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Formal_Param_Holder;
Fld : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl;
Fld_2 : Boolean;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
Len : Integer;
            procedure Finalizer_Scope_317 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_317;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 1635 '<length at nodes.lkt:2996:9>' Len ada/nodes.lkt:2996
--# expr-start 1634 '<Map at nodes.lkt:2996:9>' Map_Result ada/nodes.lkt:2996
   --# expr-start 1631 '<FieldAccess for unpacked_formal_params at nodes.lkt:2996:9>' Fld ada/nodes.lkt:2996
--# expr-start 1630 '<as_bare_entity at nodes.lkt:2996:9>' If_Result ada/nodes.lkt:2996
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Base_Formal_Param_Holder;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 1630
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 1631
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
         --# expr-start 1633 '<FieldAccess for is_mandatory at nodes.lkt:2997:20>' Fld_2 ada/nodes.lkt:2997
--# expr-start 1632 '<FieldAccess for formal_decl at nodes.lkt:2997:20>' Fld_1 ada/nodes.lkt:2997
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 1632
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamDecl.is_mandatory'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Decl_P_Is_Mandatory (Node => Fld_1.Node);
--# end
--# expr-done 1633
         if Fld_2 then
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_0;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1634
Len := Length (Map_Result); 
--# expr-done 1635
         Property_Result := Len;
   --# end
      Finalizer_Scope_317;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_317;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Nb_Min_Params;
--# end
--# property-start BaseFormalParamHolder.nb_max_params ada/nodes.lkt:3004
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Nb_Max_Params
  (Node : Bare_Base_Formal_Param_Holder
  )
   return Integer
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
      --# bind self Self
   Property_Result : Integer;
            procedure Finalizer_Scope_318 with Inline_Always;
      As_Entity : Internal_Entity_Base_Formal_Param_Holder;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Formal_Param_Holder;
Fld : Internal_Entity_Defining_Name_Array_Access;
Len : Integer;
            procedure Finalizer_Scope_318 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_318;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 1638 '<length at nodes.lkt:3005:9>' Len ada/nodes.lkt:3005
--# expr-start 1637 '<FieldAccess for unpacked_formal_params at nodes.lkt:3005:9>' Fld ada/nodes.lkt:3005
--# expr-start 1636 '<as_bare_entity at nodes.lkt:3005:9>' If_Result ada/nodes.lkt:3005
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Base_Formal_Param_Holder;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 1636
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 1637
Len := Length (Fld); 
--# expr-done 1638
         Property_Result := Len;
   --# end
      Finalizer_Scope_318;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_318;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Nb_Max_Params;
--# end
--# property-start BaseFormalParamHolder.paramless ada/nodes.lkt:3010
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Paramless
  (Node : Bare_Base_Formal_Param_Holder
      ; Dottable_Subp : Boolean
      ; Can_Be : Boolean
         := True
  )
   return Boolean
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
      --# bind self Self
   --# bind dottable_subp Dottable_Subp
   --# bind can_be Can_Be
   Property_Result : Boolean;
      Local_Nb_Params : Integer;
Fld : Integer;
Fld_1 : Integer;
If_Result : Integer;
Is_Equal : Boolean;
If_Result_1 : Boolean;
Is_Equal_1 : Boolean;
If_Result_2 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1646 '<Let at nodes.lkt:3011:9>' Let_Result ada/nodes.lkt:3011
--# scope-start
--# expr-start 1641 '<If at nodes.lkt:3012:13>' If_Result ada/nodes.lkt:3012
if Can_Be then
   --# expr-start 1639 '<FieldAccess for nb_min_params at nodes.lkt:3012:28>' Fld ada/nodes.lkt:3012
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.nb_min_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Nb_Min_Params (Node => Self);
--# end
--# expr-done 1639
   If_Result := Fld;
else
   --# expr-start 1640 '<FieldAccess for nb_max_params at nodes.lkt:3012:54>' Fld_1 ada/nodes.lkt:3012
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.nb_max_params
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Nb_Max_Params (Node => Self);
--# end
--# expr-done 1640
   If_Result := Fld_1;
end if;
--# expr-done 1641
Local_Nb_Params := If_Result; 
--# bind nb_params Local_Nb_Params
--# expr-start 1645 '<BooleanBinaryOp Or at nodes.lkt:3014:9>' If_Result_2 ada/nodes.lkt:3014
--# expr-start 1643 '<BooleanBinaryOp And at nodes.lkt:3014:10>' If_Result_1 ada/nodes.lkt:3014
if Dottable_Subp then
   --# expr-start 1642 '<Eq at nodes.lkt:3014:28>' Is_Equal ada/nodes.lkt:3014
Is_Equal := Local_Nb_Params = 1; 
--# expr-done 1642
   If_Result_1 := Is_Equal;
else
   If_Result_1 := False;
end if;
--# expr-done 1643
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 1644 '<Eq at nodes.lkt:3014:47>' Is_Equal_1 ada/nodes.lkt:3014
Is_Equal_1 := Local_Nb_Params = 0; 
--# expr-done 1644
   If_Result_2 := Is_Equal_1;
end if;
--# expr-done 1645
Let_Result := If_Result_2; 
--# end
--# expr-done 1646
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Paramless;
--# end
--# property-start BaseFormalParamHolder.is_matching_param_list ada/nodes.lkt:3020
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Is_Matching_Param_List
  (Node : Bare_Base_Formal_Param_Holder
      ; Params : Internal_Entity_Assoc_List
      ; Is_Dottable_Subp : Boolean
      ; Env : Lexical_Env
  )
   return Boolean
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
      --# bind self Self
   --# bind params Params
   --# bind is_dottable_subp Is_Dottable_Subp
   --# bind env Env
   Property_Result : Boolean;
            procedure Finalizer_Scope_320 with Inline_Always;
      Local_Bare : Internal_Entity_Base_Formal_Param_Holder;
Local_Match_List : Internal_Param_Match_Array_Access;
Local_Nb_Max_Params : Integer;
Local_Nb_Min_Params : Integer;
As_Entity : Internal_Entity_Base_Formal_Param_Holder;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Formal_Param_Holder;
Fld : Internal_Param_Match_Array_Access;
Fld_1 : Integer;
Arith_Result : Integer;
Fld_2 : Integer;
If_Result_1 : Integer;
Fld_3 : Integer;
Arith_Result_1 : Integer;
Fld_4 : Integer;
As_Entity_1 : Internal_Entity_Base_Formal_Param_Holder;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity_Base_Formal_Param_Holder;
Fld_5 : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl;
Fld_7 : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Integer;
Fld_8 : Bare_Assoc_List;
Len : Integer;
Comp_Result : Boolean;
Fld_9 : Boolean;
Quantifier_Result : Boolean;
If_Result_5 : Boolean;
Fld_10 : Internal_Entity_Defining_Name;
Fld_11 : Internal_Entity_Base_Formal_Param_Decl;
Fld_12 : Boolean;
Map_Result : Internal_Param_Match_Array_Access;
Len_1 : Integer;
Is_Equal : Boolean;
If_Result_6 : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
Let_Result_2 : Boolean;
Let_Result_3 : Boolean;
            procedure Finalizer_Scope_320 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Match_List);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_320;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1677 '<Let at nodes.lkt:3024:9>' Let_Result_3 ada/nodes.lkt:3024
--# scope-start
--# expr-start 1647 '<as_bare_entity at nodes.lkt:3024:20>' If_Result ada/nodes.lkt:3024
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Base_Formal_Param_Holder;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 1647
Local_Bare := If_Result; 
--# bind bare Local_Bare
--# expr-start 1676 '<Let at nodes.lkt:3025:9>' Let_Result_2 ada/nodes.lkt:3025
--# scope-start
--# expr-start 1648 '<FieldAccess for match_param_list at nodes.lkt:3025:26>' Fld ada/nodes.lkt:3025
      if Local_Bare.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.match_param_list
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Param_List (Node => Local_Bare.Node, Params => Params, Is_Dottable_Subp => Is_Dottable_Subp, E_Info => Local_Bare.Info);
--# end
--# expr-done 1648
Local_Match_List := Fld; Inc_Ref (Local_Match_List);
--# bind match_list Local_Match_List
--# expr-start 1675 '<Let at nodes.lkt:3033:9>' Let_Result_1 ada/nodes.lkt:3033
--# scope-start
--# expr-start 1652 '<If at nodes.lkt:3034:13>' If_Result_1 ada/nodes.lkt:3034
if Is_Dottable_Subp then
   --# expr-start 1650 '<Arithmetic - at nodes.lkt:3034:38>' Arith_Result ada/nodes.lkt:3034
--# expr-start 1649 '<FieldAccess for nb_max_params at nodes.lkt:3034:38>' Fld_1 ada/nodes.lkt:3034
      if Local_Bare.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.nb_max_params
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Nb_Max_Params (Node => Local_Bare.Node);
--# end
--# expr-done 1649
Arith_Result := (Fld_1 - 1); 
--# expr-done 1650
   If_Result_1 := Arith_Result;
else
   --# expr-start 1651 '<FieldAccess for nb_max_params at nodes.lkt:3035:18>' Fld_2 ada/nodes.lkt:3035
      if Local_Bare.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.nb_max_params
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Nb_Max_Params (Node => Local_Bare.Node);
--# end
--# expr-done 1651
   If_Result_1 := Fld_2;
end if;
--# expr-done 1652
Local_Nb_Max_Params := If_Result_1; 
--# bind nb_max_params Local_Nb_Max_Params
--# expr-start 1674 '<Let at nodes.lkt:3036:9>' Let_Result ada/nodes.lkt:3036
--# scope-start
--# expr-start 1662 '<If at nodes.lkt:3037:13>' If_Result_4 ada/nodes.lkt:3037
--# expr-start 1658 '<BooleanBinaryOp And at nodes.lkt:3038:17>' If_Result_3 ada/nodes.lkt:3038
if Is_Dottable_Subp then
   --# expr-start 1657 '<FieldAccess for is_mandatory at nodes.lkt:3044:21>' Fld_7 ada/nodes.lkt:3044
--# expr-start 1656 '<FieldAccess for formal_decl at nodes.lkt:3044:21>' Fld_6 ada/nodes.lkt:3044
--# expr-start 1655 '<at at nodes.lkt:3044:21>' Get_Result ada/nodes.lkt:3044
--# expr-start 1654 '<FieldAccess for unpacked_formal_params at nodes.lkt:3044:21>' Fld_5 ada/nodes.lkt:3044
--# expr-start 1653 '<as_bare_entity at nodes.lkt:3044:21>' If_Result_2 ada/nodes.lkt:3044
Is_Null_1 := Self = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity_Base_Formal_Param_Holder;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Self); 
   If_Result_2 := As_Entity_1;
end if;
--# expr-done 1653
      if If_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_5 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => If_Result_2.Node, E_Info => If_Result_2.Info);
--# end
--# expr-done 1654
Get_Result := Get (Self, Fld_5, 0, True); 
--# expr-done 1655
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_6 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 1656
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamDecl.is_mandatory'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Decl_P_Is_Mandatory (Node => Fld_6.Node);
--# end
--# expr-done 1657
   If_Result_3 := Fld_7;
else
   If_Result_3 := False;
end if;
--# expr-done 1658
if If_Result_3 then
   --# expr-start 1660 '<Arithmetic - at nodes.lkt:3048:18>' Arith_Result_1 ada/nodes.lkt:3048
--# expr-start 1659 '<FieldAccess for nb_min_params at nodes.lkt:3048:18>' Fld_3 ada/nodes.lkt:3048
      if Local_Bare.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.nb_min_params
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Nb_Min_Params (Node => Local_Bare.Node);
--# end
--# expr-done 1659
Arith_Result_1 := (Fld_3 - 1); 
--# expr-done 1660
   If_Result_4 := Arith_Result_1;
else
   --# expr-start 1661 '<FieldAccess for nb_min_params at nodes.lkt:3049:18>' Fld_4 ada/nodes.lkt:3049
      if Local_Bare.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.nb_min_params
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Nb_Min_Params (Node => Local_Bare.Node);
--# end
--# expr-done 1661
   If_Result_4 := Fld_4;
end if;
--# expr-done 1662
Local_Nb_Min_Params := If_Result_4; 
--# bind nb_min_params Local_Nb_Min_Params
--# expr-start 1673 '<BooleanBinaryOp And at nodes.lkt:3051:9>' If_Result_6 ada/nodes.lkt:3051
--# expr-start 1666 '<BooleanBinaryOp And at nodes.lkt:3051:9>' If_Result_5 ada/nodes.lkt:3051
--# expr-start 1663 '<length at nodes.lkt:3051:9>' Len ada/nodes.lkt:3051
Fld_8 := Params.Node; 
Len := Length (Fld_8); 
--# expr-done 1663
Comp_Result := Len <= Local_Nb_Max_Params; 
if Comp_Result then
   --# expr-start 1665 '<AllQuantifier at nodes.lkt:3052:13>' Quantifier_Result ada/nodes.lkt:3052
      Quantifier_Result := True;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Local_Match_List;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_0
      --# expr-start 1664 '<FieldAccess for has_matched at nodes.lkt:3052:35>' Fld_9 ada/nodes.lkt:3052
Fld_9 := Item_0.Has_Matched;
--# expr-done 1664
      Quantifier_Result := Fld_9;
   --# end
               exit when not Quantifier_Result;
         end loop;
      end;
--# expr-done 1665
   If_Result_5 := Quantifier_Result;
else
   If_Result_5 := False;
end if;
--# expr-done 1666
if If_Result_5 then
   --# expr-start 1672 '<Eq at nodes.lkt:3053:13>' Is_Equal ada/nodes.lkt:3053
--# expr-start 1671 '<length at nodes.lkt:3053:13>' Len_1 ada/nodes.lkt:3053
--# expr-start 1670 '<Map at nodes.lkt:3053:13>' Map_Result ada/nodes.lkt:3053
      declare
         Map_Result_Vec : Internal_Param_Match_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Local_Match_List;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_1
         --# expr-start 1669 '<FieldAccess for is_mandatory at nodes.lkt:3053:38>' Fld_12 ada/nodes.lkt:3053
--# expr-start 1668 '<FieldAccess for formal_decl at nodes.lkt:3053:38>' Fld_11 ada/nodes.lkt:3053
--# expr-start 1667 '<FieldAccess for formal at nodes.lkt:3053:38>' Fld_10 ada/nodes.lkt:3053
Fld_10 := Item_1.Formal;
--# expr-done 1667
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_11 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_10.Node, E_Info => Fld_10.Info);
--# end
--# expr-done 1668
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamDecl.is_mandatory'
Fld_12 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Decl_P_Is_Mandatory (Node => Fld_11.Node);
--# end
--# expr-done 1669
         if Fld_12 then
         declare
            Item_To_Append : constant Internal_Param_Match := Item_1;
         begin
            Internal_Param_Match_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Param_Match_Array
           (Items_Count => Natural (Internal_Param_Match_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Match_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Match_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Match_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1670
Len_1 := Length (Map_Result); 
--# expr-done 1671
Is_Equal := Len_1 = Local_Nb_Min_Params; 
--# expr-done 1672
   If_Result_6 := Is_Equal;
else
   If_Result_6 := False;
end if;
--# expr-done 1673
Let_Result := If_Result_6; 
--# end
--# expr-done 1674
Let_Result_1 := Let_Result; 
--# end
--# expr-done 1675
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 1676
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 1677
         Property_Result := Let_Result_3;
   --# end
      Finalizer_Scope_320;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_320;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Is_Matching_Param_List;
--# end
--# property-start BaseFormalParamHolder.param_types ada/nodes.lkt:3061
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Param_Types
  (Node : Bare_Base_Formal_Param_Holder
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_321 with Inline_Always;
      Fld : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl;
Fld_2 : Internal_Entity_Type_Expr;
Fld_3 : Internal_Entity_Base_Type_Decl;
Map_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_321 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_321;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 1682 '<Map at nodes.lkt:3062:9>' Map_Result ada/nodes.lkt:3062
   --# expr-start 1678 '<FieldAccess for unpacked_formal_params at nodes.lkt:3062:9>' Fld ada/nodes.lkt:3062
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1678
      declare
         Map_Result_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind fp Item_0
      --# expr-start 1681 '<FieldAccess for real_designated_type at nodes.lkt:3064:13>' Fld_3 ada/nodes.lkt:3064
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1680 '<FieldAccess for type_expression at nodes.lkt:3064:39>' Fld_2 ada/nodes.lkt:3064
--# expr-start 1679 '<FieldAccess for formal_decl at nodes.lkt:3064:39>' Fld_1 ada/nodes.lkt:3064
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 1679
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 1680
--# property-call-start BaseFormalParamHolder.real_designated_type
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Real_Designated_Type (Node => Ent.Node, Typ => Fld_2, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1681
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Fld_3;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1682
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_321;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_321;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Param_Types;
--# end
--# property-start BaseFormalParamHolder.param_modes ada/nodes.lkt:3068
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Param_Modes
  (Node : Bare_Base_Formal_Param_Holder
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Mode_Array_Access
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Mode_Array_Access;
            procedure Finalizer_Scope_322 with Inline_Always;
      Fld : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result : Internal_Entity_Param_Spec;
Fld_2 : Internal_Entity_Mode;
Map_Result : Internal_Entity_Mode_Array_Access;
            procedure Finalizer_Scope_322 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_322;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1687 '<Map at nodes.lkt:3069:9>' Map_Result ada/nodes.lkt:3069
   --# expr-start 1683 '<FieldAccess for unpacked_formal_params at nodes.lkt:3069:9>' Fld ada/nodes.lkt:3069
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1683
      declare
         Map_Result_Vec : Internal_Entity_Mode_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind fp Item_0
      --# expr-start 1686 '<FieldAccess for mode at nodes.lkt:3070:21>' Fld_2 ada/nodes.lkt:3070
--# expr-start 1685 '<Cast to ParamSpec at nodes.lkt:3070:21>' Cast_Result ada/nodes.lkt:3070
--# expr-start 1684 '<FieldAccess for formal_decl at nodes.lkt:3070:21>' Fld_1 ada/nodes.lkt:3070
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 1684
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Param_Spec_Range
   then
      Cast_Result := Create_Internal_Entity_Param_Spec
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Param_Spec;
   end if;
--# expr-done 1685
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Mode (Node => Cast_Result.Node.Param_Spec_F_Mode, Info => Cast_Result.Info);
--# expr-done 1686
         declare
            Item_To_Append : constant Internal_Entity_Mode := Fld_2;
         begin
            Internal_Entity_Mode_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Mode_Array
           (Items_Count => Natural (Internal_Entity_Mode_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Mode_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Mode_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Mode_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1687
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_322;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_322;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Param_Modes;
--# end
--# property-start BaseFormalParamHolder.shed_subp_rebindings ada/nodes.lkt:3075
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Shed_Subp_Rebindings
  (Node : Bare_Base_Formal_Param_Holder
      ; R : Env_Rebindings
  )
   return Env_Rebindings
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
      --# bind self Self
   --# bind r R
   Property_Result : Env_Rebindings;
            procedure Finalizer_Scope_2135 with Inline_Always;
            procedure Finalizer_Scope_2136 with Inline_Always;
      Var_Expr_0 : Lexical_Env := Empty_Env;
Var_Expr_40 : Env_Rebindings;
Fld : Env_Rebindings;
Fld_1 : Env_Rebindings;
Fld_2 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Is_A : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result : Env_Rebindings;
            procedure Finalizer_Scope_2135 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2135;
            procedure Finalizer_Scope_2136 is
            begin
                     Dec_Ref (Var_Expr_0);
            end Finalizer_Scope_2136;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1693 '<If at nodes.lkt:3076:9>' If_Result ada/nodes.lkt:3076
Var_Expr_40 := R;
if Var_Expr_40 /= null then
   --# scope-start
--# expr-start 1688 '<FieldAccess for new_env at nodes.lkt:3076:12>' Fld_2 ada/nodes.lkt:3076
      if Var_Expr_40 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_40.New_Env;
Inc_Ref (Fld_2);
--# expr-done 1688
Var_Expr_0 := Fld_2;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_Env then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 1690 '<IsA GenericSubpInstantiation at nodes.lkt:3076:34>' Is_A ada/nodes.lkt:3076
--# expr-start 1689 '<env_node at nodes.lkt:3076:34>' Env_Node ada/nodes.lkt:3076
Env_Node := AST_Envs.Env_Node (Var_Expr_0); 
--# expr-done 1689
Is_A := Env_Node /= null 
and then Env_Node.Kind in Ada_Generic_Subp_Instantiation_Range; 
--# expr-done 1690
Scope_Result := Is_A;
   --# end
      Finalizer_Scope_2136;
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
      Finalizer_Scope_2135;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
if Result_Var_1 then
   --# expr-start 1692 '<FieldAccess for shed_subp_rebindings at nodes.lkt:3077:14>' Fld_1 ada/nodes.lkt:3077
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1691 '<FieldAccess for get_parent at nodes.lkt:3077:40>' Fld ada/nodes.lkt:3077
      if R = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := R.Parent;
--# expr-done 1691
--# property-call-start BaseFormalParamHolder.shed_subp_rebindings
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Shed_Subp_Rebindings (Node => Self, R => Fld);
--# end
--# expr-done 1692
   If_Result := Fld_1;
else
   If_Result := R;
end if;
--# expr-done 1693
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2135;
                     Finalizer_Scope_2136;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Shed_Subp_Rebindings;
--# end
--# property-start BaseFormalParamHolder.corresponding_actual_param ada/nodes.lkt:3083
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Corresponding_Actual_Param
  (Node : Bare_Base_Formal_Param_Holder
      ; Name : Internal_Entity_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_324 with Inline_Always;
            procedure Finalizer_Scope_2137 with Inline_Always;
      Local_Actual_Spec : Internal_Entity_Base_Formal_Param_Holder;
Fld : Internal_Entity_Base_Formal_Param_Holder;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
Index_1 : Integer;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
Fld_3 : Bare_Defining_Name;
Fld_4 : Bare_Defining_Name;
Cast_Result : Bare_Defining_Name;
Is_Equal : Boolean;
If_Result : Internal_Entity_Defining_Name_Array_Access;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
Get_Result_1 : Internal_Entity_Defining_Name;
Cast_Expr : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result_1 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
If_Result_1 : Internal_Entity_Defining_Name;
Let_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_324 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_324;
            procedure Finalizer_Scope_2137 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2137;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1707 '<Let at nodes.lkt:3086:9>' Let_Result ada/nodes.lkt:3086
--# scope-start
--# expr-start 1694 '<FieldAccess for corresponding_actual at nodes.lkt:3086:27>' Fld ada/nodes.lkt:3086
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.corresponding_actual'
Fld := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Corresponding_Actual (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1694
Local_Actual_Spec := Fld; 
--# bind actual_spec Local_Actual_Spec
--# expr-start 1706 '<If at nodes.lkt:3088:9>' If_Result_1 ada/nodes.lkt:3088
--# expr-start 1695 '<Eq at nodes.lkt:3088:12>' Is_Equiv ada/nodes.lkt:3088
Cast_Expr := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Local_Actual_Spec; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 1695
if Is_Equiv then
   If_Result_1 := Name;
else
   --# expr-start 1705 '<at at nodes.lkt:3090:13>' Get_Result_1 ada/nodes.lkt:3090
--# expr-start 1704 '<Mapcat at nodes.lkt:3090:13>' Map_Result ada/nodes.lkt:3090
   --# expr-start 1696 '<FieldAccess for unpacked_formal_params at nodes.lkt:3090:13>' Fld_1 ada/nodes.lkt:3090
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1696
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
         Index_1 := 0;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind param Item_0
               --# bind i Index_1
      --# expr-start 1703 '<If at nodes.lkt:3092:17>' If_Result ada/nodes.lkt:3092
--# expr-start 1699 '<Eq at nodes.lkt:3092:20>' Is_Equal ada/nodes.lkt:3092
--# expr-start 1697 '<FieldAccess for node at nodes.lkt:3092:20>' Fld_3 ada/nodes.lkt:3092
Fld_3 := Item_0.Node;
--# expr-done 1697
      Cast_Result := Fld_3;
--# expr-start 1698 '<FieldAccess for node at nodes.lkt:3092:34>' Fld_4 ada/nodes.lkt:3092
Fld_4 := Name.Node;
--# expr-done 1698
Is_Equal := Cast_Result = Fld_4; 
--# expr-done 1699
if Is_Equal then
   --# expr-start 1702 '<ArrayLiteral at nodes.lkt:3093:22>' Array_Lit ada/nodes.lkt:3093
--# expr-start 1701 '<at at nodes.lkt:3093:23>' Get_Result ada/nodes.lkt:3093
--# expr-start 1700 '<FieldAccess for unpacked_formal_params at nodes.lkt:3093:23>' Fld_2 ada/nodes.lkt:3093
      if Local_Actual_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Local_Actual_Spec.Node, E_Info => Local_Actual_Spec.Info);
--# end
--# expr-done 1700
Get_Result := Get (Self, Fld_2, Index_1, True); 
--# expr-done 1701
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Get_Result)); 
--# expr-done 1702
   If_Result := Array_Lit;
else
   If_Result := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 1703
         for Item_To_Append of
               If_Result.Items
         loop
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2137;
               Index_1 := Index_1 + 1;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1704
Get_Result_1 := Get (Self, Map_Result, 0, True); 
--# expr-done 1705
   If_Result_1 := Get_Result_1;
end if;
--# expr-done 1706
Let_Result := If_Result_1; 
--# end
--# expr-done 1707
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_324;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_324;
                     Finalizer_Scope_2137;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Corresponding_Actual_Param;
--# end
--# property-start BaseFormalParamHolder.real_type ada/nodes.lkt:3104
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Real_Type
  (Node : Bare_Base_Formal_Param_Holder
      ; Typ : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Local_Prim_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Anonymous_Type_Decl;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Var_Expr_2 : Internal_Entity_Base_Type_Decl;
Match_0 : Internal_Entity_Formal_Type_Decl;
Match_1 : Internal_Entity;
Var_Expr_41 : Internal_Entity_Base_Type_Decl;
Var_Expr_42 : Internal_Entity_Base_Type_Decl;
Var_Expr : Bare_Ada_Node;
Fld : Internal_Entity_Info;
Fld_1 : Internal_Metadata;
Fld_2 : Bare_Ada_Node;
Fld_3 : Internal_Entity_Info;
Fld_4 : Env_Rebindings;
Fld_5 : Internal_Entity_Info;
Fld_6 : Boolean;
Fld_7 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_8 : Internal_Entity_Info;
Fld_9 : Internal_Metadata;
Fld_10 : Bare_Ada_Node;
Scope_Result : Bare_Ada_Node;
Fld_11 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Fld_12 : Internal_Entity_Info;
Fld_13 : Env_Rebindings;
Fld_14 : Env_Rebindings;
Fld_15 : Internal_Entity_Info;
Fld_16 : Boolean;
Fld_17 : Internal_Entity;
Fld_18 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity;
Cast_Result_3 : Internal_Entity_Formal_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
Fld_19 : Internal_Entity_Base_Type_Decl;
Fld_20 : Internal_Entity_Base_Type_Decl;
Fld_21 : Internal_Entity_Base_Type_Decl;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_4 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Cast_Expr_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_7 : Internal_Entity_Anonymous_Type_Decl;
Fld_22 : Internal_Entity_Type_Def;
Is_A : Boolean;
Not_Val : Boolean;
Scope_Result_5 : Boolean;
Result_Var_3 : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_23 : Internal_Entity_Base_Type_Decl;
Fld_24 : Bare_Base_Type_Decl;
Scope_Result_6 : Bare_Base_Type_Decl;
Result_Var_4 : Bare_Base_Type_Decl;
Fld_25 : Internal_Entity_Base_Type_Decl;
Fld_26 : Bare_Base_Type_Decl;
Scope_Result_7 : Bare_Base_Type_Decl;
Result_Var_5 : Bare_Base_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Is_Equal : Boolean;
If_Result_2 : Internal_Entity_Base_Type_Decl;
Fld_27 : Bare_Base_Type_Decl;
Is_Null : Boolean;
If_Result_3 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1749 '<Let at nodes.lkt:3106:9>' Let_Result_2 ada/nodes.lkt:3106
--# scope-start
--# expr-start 1716 '<Cast to BaseTypeDecl at nodes.lkt:3107:13>' Cast_Result ada/nodes.lkt:3107
--# expr-start 1715 '<FieldAccess for entity_no_md at nodes.lkt:3107:13>' Fld_7 ada/nodes.lkt:3107
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1710 '<FieldAccess for primitive at nodes.lkt:3108:17>' Fld_2 ada/nodes.lkt:3108
--# expr-start 1709 '<FieldAccess for md at nodes.lkt:3108:17>' Fld_1 ada/nodes.lkt:3108
--# expr-start 1708 '<FieldAccess for info at nodes.lkt:3108:17>' Fld ada/nodes.lkt:3108
Fld := Ent.Info;
--# expr-done 1708
Fld_1 := Fld.Md;
--# expr-done 1709
Fld_2 := Fld_1.Primitive;
--# expr-done 1710
--# expr-start 1712 '<FieldAccess for rebindings at nodes.lkt:3109:17>' Fld_4 ada/nodes.lkt:3109
--# expr-start 1711 '<FieldAccess for info at nodes.lkt:3109:17>' Fld_3 ada/nodes.lkt:3109
Fld_3 := Ent.Info;
--# expr-done 1711
Fld_4 := Fld_3.Rebindings;
--# expr-done 1712
--# expr-start 1714 '<FieldAccess for from_rebound at nodes.lkt:3110:17>' Fld_6 ada/nodes.lkt:3110
--# expr-start 1713 '<FieldAccess for info at nodes.lkt:3110:17>' Fld_5 ada/nodes.lkt:3110
Fld_5 := Ent.Info;
--# expr-done 1713
Fld_6 := Fld_5.From_Rebound;
--# expr-done 1714
--# property-call-start AdaNode.entity_no_md
Fld_7 := Libadalang.Implementation.Ada_Node_P_Entity_No_Md (Node => Ent.Node, N => Fld_2, Rebindings => Fld_4, From_Rebound => Fld_6);
--# end
--# expr-done 1715
   if Fld_7.Node = null
      or else Fld_7.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 1716
Local_Prim_Type := Cast_Result; 
--# bind prim_type Local_Prim_Type
--# expr-start 1748 '<If at nodes.lkt:3114:9>' If_Result_3 ada/nodes.lkt:3114
--# expr-start 1718 '<IsNull at nodes.lkt:3114:12>' Is_Null ada/nodes.lkt:3114
--# expr-start 1717 '<FieldAccess for node at nodes.lkt:3114:12>' Fld_27 ada/nodes.lkt:3114
Fld_27 := Local_Prim_Type.Node;
--# expr-done 1717
Is_Null := Fld_27 = null; 
--# expr-done 1718
if Is_Null then
   If_Result_3 := Typ;
else
   --# expr-start 1747 '<If at nodes.lkt:3114:9>' If_Result_2 ada/nodes.lkt:3114
--# expr-start 1723 '<Eq at nodes.lkt:3115:14>' Is_Equal ada/nodes.lkt:3115
Var_Expr_41 := Local_Prim_Type;
if Var_Expr_41 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1720 '<FieldAccess for node at nodes.lkt:3115:14>' Fld_24 ada/nodes.lkt:3115
--# expr-start 1719 '<FieldAccess for canonical_type at nodes.lkt:3115:14>' Fld_23 ada/nodes.lkt:3115
      if Var_Expr_41.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_23 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Var_Expr_41.Node, Origin => Origin, E_Info => Var_Expr_41.Info);
--# end
--# expr-done 1719
Fld_24 := Fld_23.Node;
--# expr-done 1720
Scope_Result_6 := Fld_24;
   --# end
   Result_Var_4 := Scope_Result_6;
else
   Result_Var_4 := No_Bare_Ada_Node;
end if;
      Cast_Result_8 := Result_Var_4;
Var_Expr_42 := Typ;
if Var_Expr_42 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1722 '<FieldAccess for node at nodes.lkt:3115:50>' Fld_26 ada/nodes.lkt:3115
--# expr-start 1721 '<FieldAccess for canonical_type at nodes.lkt:3115:50>' Fld_25 ada/nodes.lkt:3115
      if Var_Expr_42.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_25 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Var_Expr_42.Node, Origin => Origin, E_Info => Var_Expr_42.Info);
--# end
--# expr-done 1721
Fld_26 := Fld_25.Node;
--# expr-done 1722
Scope_Result_7 := Fld_26;
   --# end
   Result_Var_5 := Scope_Result_7;
else
   Result_Var_5 := No_Bare_Ada_Node;
end if;
Is_Equal := Cast_Result_8 = Result_Var_5; 
--# expr-done 1723
if Is_Equal then
   --# expr-start 1736 '<Match at nodes.lkt:3117:13>' Match_Result ada/nodes.lkt:3117
--# expr-start 1733 '<FieldAccess for entity_no_md at nodes.lkt:3118:17>' Fld_17 ada/nodes.lkt:3118
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1726 '<FieldAccess for primitive_real_type at nodes.lkt:3119:21>' Fld_10 ada/nodes.lkt:3119
--# expr-start 1725 '<FieldAccess for md at nodes.lkt:3119:21>' Fld_9 ada/nodes.lkt:3119
--# expr-start 1724 '<FieldAccess for info at nodes.lkt:3119:21>' Fld_8 ada/nodes.lkt:3119
Fld_8 := Ent.Info;
--# expr-done 1724
Fld_9 := Fld_8.Md;
--# expr-done 1725
Fld_10 := Fld_9.Primitive_Real_Type;
--# expr-done 1726
Var_Expr := Fld_10;
if Var_Expr /= No_Bare_Ada_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
--# expr-start 1727 '<FieldAccess for node at nodes.lkt:3119:58>' Fld_11 ada/nodes.lkt:3119
Fld_11 := Typ.Node;
--# expr-done 1727
      Cast_Result_1 := Fld_11;
   Result_Var := Cast_Result_1;
end if;
--# expr-start 1730 '<FieldAccess for shed_subp_rebindings at nodes.lkt:3127:21>' Fld_14 ada/nodes.lkt:3127
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1729 '<FieldAccess for rebindings at nodes.lkt:3127:47>' Fld_13 ada/nodes.lkt:3127
--# expr-start 1728 '<FieldAccess for info at nodes.lkt:3127:47>' Fld_12 ada/nodes.lkt:3127
Fld_12 := Ent.Info;
--# expr-done 1728
Fld_13 := Fld_12.Rebindings;
--# expr-done 1729
--# property-call-start BaseFormalParamHolder.shed_subp_rebindings
Fld_14 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Shed_Subp_Rebindings (Node => Self, R => Fld_13);
--# end
--# expr-done 1730
--# expr-start 1732 '<FieldAccess for from_rebound at nodes.lkt:3128:21>' Fld_16 ada/nodes.lkt:3128
--# expr-start 1731 '<FieldAccess for info at nodes.lkt:3128:21>' Fld_15 ada/nodes.lkt:3128
Fld_15 := Ent.Info;
--# expr-done 1731
Fld_16 := Fld_15.From_Rebound;
--# expr-done 1732
--# property-call-start AdaNode.entity_no_md
Fld_17 := Libadalang.Implementation.Ada_Node_P_Entity_No_Md (Node => Ent.Node, N => Result_Var, Rebindings => Fld_14, From_Rebound => Fld_16);
--# end
--# expr-done 1733
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_17; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Formal_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_3; 
--# bind ft Match_0
--# expr-start 1734 '<FieldAccess for get_actual at nodes.lkt:3135:52>' Fld_18 ada/nodes.lkt:3135
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start FormalTypeDecl.get_actual
Fld_18 := Libadalang.Implementation.Formal_Type_Decl_P_Get_Actual (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 1734
Let_Result := Fld_18; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Concrete_Type_Decl | Ada_Abstract_Subp_Decl .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_4; 
--# bind other Match_1
--# expr-start 1735 '<Cast to BaseTypeDecl at nodes.lkt:3136:31>' Cast_Result_2 ada/nodes.lkt:3136
Cast_Expr := Match_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_2 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 1735
Let_Result_1 := Cast_Result_2; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 1736
   If_Result_2 := Match_Result;
else
   --# expr-start 1746 '<If at nodes.lkt:3114:9>' If_Result_1 ada/nodes.lkt:3114
--# expr-start 1737 '<Cast to AnonymousTypeDecl at nodes.lkt:3143:13>' Cast_Result_7 ada/nodes.lkt:3143
Cast_Expr_3 := Typ; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Anonymous_Type_Decl_Range
   then
      Cast_Result_7 := Create_Internal_Entity_Anonymous_Type_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_7 := No_Entity_Anonymous_Type_Decl;
   end if;
--# expr-done 1737
Var_Expr_0 := Cast_Result_7;
if Var_Expr_0 /= No_Entity_Anonymous_Type_Decl then
   --# scope-start
   --# bind td Var_Expr_0
--# expr-start 1740 '<Not at nodes.lkt:3144:25>' Not_Val ada/nodes.lkt:3144
--# expr-start 1739 '<IsA AccessToSubpDef at nodes.lkt:3144:29>' Is_A ada/nodes.lkt:3144
--# expr-start 1738 '<FieldAccess for type_def at nodes.lkt:3144:29>' Fld_22 ada/nodes.lkt:3144
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Create_Internal_Entity_Type_Def (Node => Var_Expr_0.Node.Type_Decl_F_Type_Def, Info => Var_Expr_0.Info);
--# expr-done 1738
Is_A := Fld_22.Node /= null 
and then Fld_22.Node.Kind in Ada_Access_To_Subp_Def_Range; 
--# expr-done 1739
Not_Val := not (Is_A); 
--# expr-done 1740
Scope_Result_5 := Not_Val;
   --# end
   Result_Var_3 := Scope_Result_5;
else
   Result_Var_3 := False;
end if;
if Result_Var_3 then
--# expr-start 1741 '<FieldAccess for accessed_type at nodes.lkt:3147:13>' Fld_19 ada/nodes.lkt:3147
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_19 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Typ.Node, Origin => Origin, E_Info => Typ.Info);
--# end
--# expr-done 1741
Var_Expr_1 := Fld_19;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind at Var_Expr_1
--# expr-start 1742 '<FieldAccess for real_type at nodes.lkt:3149:17>' Fld_20 ada/nodes.lkt:3149
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.real_type
Fld_20 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Real_Type (Node => Ent.Node, Typ => Var_Expr_1, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1742
Var_Expr_2 := Fld_20;
if Var_Expr_2 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind rat Var_Expr_2
--# expr-start 1745 '<If at nodes.lkt:3151:21>' If_Result ada/nodes.lkt:3151
--# expr-start 1743 '<Eq at nodes.lkt:3151:24>' Is_Equiv ada/nodes.lkt:3151
Cast_Expr_1 := Var_Expr_1; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Cast_Expr_2 := Var_Expr_2; 
      Cast_Result_6 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Is_Equiv := Equivalent (Cast_Result_5, Cast_Result_6); 
--# expr-done 1743
if Is_Equiv then
   If_Result := Typ;
else
   --# expr-start 1744 '<FieldAccess for anonymous_access_type at nodes.lkt:3151:48>' Fld_21 ada/nodes.lkt:3151
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.anonymous_access_type
Fld_21 := Libadalang.Implementation.Base_Type_Decl_P_Anonymous_Access_Type (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 1744
   If_Result := Fld_21;
end if;
--# expr-done 1745
Scope_Result_3 := If_Result;
   --# end
   Result_Var_1 := Scope_Result_3;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_4 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_4;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
   If_Result_1 := Result_Var_2;
else
   If_Result_1 := Typ;
end if;
--# expr-done 1746
   If_Result_2 := If_Result_1;
end if;
--# expr-done 1747
   If_Result_3 := If_Result_2;
end if;
--# expr-done 1748
Let_Result_2 := If_Result_3; 
--# end
--# expr-done 1749
         Property_Result := Let_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Real_Type;
--# end
--# property-start BaseFormalParamHolder.real_designated_type ada/nodes.lkt:3216
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Real_Designated_Type
  (Node : Bare_Base_Formal_Param_Holder
      ; Typ : Internal_Entity_Type_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Local_Md : Internal_Metadata;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Local_Rt : Internal_Entity_Base_Type_Decl;
Local_Base_Rebindings : Env_Rebindings;
Var_Expr_43 : Internal_Entity_Base_Type_Decl;
Var_Expr_44 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Info;
Fld_1 : Internal_Metadata;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Bare_Ada_Node;
Cast_Result_1 : Bare_Base_Type_Decl;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_6 : Bare_Ada_Node;
Cast_Result_2 : Bare_Base_Type_Decl;
Fld_7 : Env_Rebindings;
Scope_Result_1 : Env_Rebindings;
Result_Var_1 : Env_Rebindings;
Fld_8 : Bare_Type_Expr;
Fld_9 : Internal_Entity_Info;
Fld_10 : Env_Rebindings;
Fld_11 : Env_Rebindings;
Fld_12 : Internal_Entity_Info;
Fld_13 : Boolean;
New_Struct : Internal_Entity_Info;
New_Struct_1 : Internal_Entity_Type_Expr;
Fld_14 : Internal_Entity_Base_Type_Decl;
Is_Equal : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Is_Equiv : Boolean;
If_Result_2 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_15 : Boolean;
If_Result_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1779 '<Let at nodes.lkt:3217:9>' Let_Result_2 ada/nodes.lkt:3217
--# scope-start
--# expr-start 1751 '<FieldAccess for md at nodes.lkt:3217:18>' Fld_1 ada/nodes.lkt:3217
--# expr-start 1750 '<FieldAccess for info at nodes.lkt:3217:18>' Fld ada/nodes.lkt:3217
Fld := Ent.Info;
--# expr-done 1750
Fld_1 := Fld.Md;
--# expr-done 1751
Local_Md := Fld_1; 
--# bind md Local_Md
--# expr-start 1754 '<Cast to BaseTypeDecl at nodes.lkt:3219:9>' Cast_Result ada/nodes.lkt:3219
--# expr-start 1752 '<FieldAccess for designated_type at nodes.lkt:3219:9>' Fld_2 ada/nodes.lkt:3219
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Typ.Node, Origin => Origin, E_Info => Typ.Info);
--# end
--# expr-done 1752
Var_Expr_43 := Fld_2;
if Var_Expr_43 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1753 '<FieldAccess for without_md at nodes.lkt:3219:9>' Fld_3 ada/nodes.lkt:3219
      if Var_Expr_43.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.without_md
Fld_3 := Libadalang.Implementation.Ada_Node_P_Without_Md (Node => Var_Expr_43.Node, E_Info => Var_Expr_43.Info);
--# end
--# expr-done 1753
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 1754
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind t Var_Expr_0
--# expr-start 1778 '<If at nodes.lkt:3229:13>' If_Result_3 ada/nodes.lkt:3229
--# expr-start 1755 '<FieldAccess for dottable_subp at nodes.lkt:3229:16>' Fld_15 ada/nodes.lkt:3229
Fld_15 := Local_Md.Dottable_Subp;
--# expr-done 1755
if Fld_15 then
   If_Result_3 := Var_Expr_0;
else
   --# expr-start 1777 '<Let at nodes.lkt:3231:17>' Let_Result_1 ada/nodes.lkt:3231
--# scope-start
--# expr-start 1756 '<FieldAccess for real_type at nodes.lkt:3231:26>' Fld_4 ada/nodes.lkt:3231
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.real_type
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Real_Type (Node => Ent.Node, Typ => Var_Expr_0, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1756
Local_Rt := Fld_4; 
--# bind rt Local_Rt
--# expr-start 1776 '<Let at nodes.lkt:3232:17>' Let_Result ada/nodes.lkt:3232
--# scope-start
--# expr-start 1759 '<as_bare_entity at nodes.lkt:3233:21>' If_Result ada/nodes.lkt:3233
--# expr-start 1758 '<Cast to BaseTypeDecl at nodes.lkt:3233:21>' Cast_Result_1 ada/nodes.lkt:3233
--# expr-start 1757 '<FieldAccess for primitive_real_type at nodes.lkt:3233:21>' Fld_5 ada/nodes.lkt:3233
Fld_5 := Local_Md.Primitive_Real_Type;
--# expr-done 1757
   if Fld_5 = null
      or else Fld_5.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Fld_5;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 1758
Is_Null := Cast_Result_1 = null; 
if Is_Null then
   If_Result := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Cast_Result_1); 
   If_Result := As_Entity;
end if;
--# expr-done 1759
Var_Expr_44 := If_Result;
if Var_Expr_44 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1762 '<FieldAccess for find_base_type_rebindings at nodes.lkt:3233:21>' Fld_7 ada/nodes.lkt:3233
      if Var_Expr_44.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1761 '<Cast to BaseTypeDecl at nodes.lkt:3237:49>' Cast_Result_2 ada/nodes.lkt:3237
--# expr-start 1760 '<FieldAccess for primitive at nodes.lkt:3237:49>' Fld_6 ada/nodes.lkt:3237
Fld_6 := Local_Md.Primitive;
--# expr-done 1760
   if Fld_6 = null
      or else Fld_6.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_2 := Fld_6;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 1761
--# property-call-start BaseTypeDecl.find_base_type_rebindings
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Find_Base_Type_Rebindings (Node => Var_Expr_44.Node, Target => Cast_Result_2, Origin => Origin, E_Info => Var_Expr_44.Info);
--# end
--# expr-done 1762
Scope_Result_1 := Fld_7;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := null;
end if;
Local_Base_Rebindings := Result_Var_1; 
--# bind base_rebindings Local_Base_Rebindings
--# expr-start 1775 '<If at nodes.lkt:3239:17>' If_Result_2 ada/nodes.lkt:3239
--# expr-start 1763 '<Eq at nodes.lkt:3239:20>' Is_Equiv ada/nodes.lkt:3239
Cast_Expr := Var_Expr_0; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Local_Rt; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_3, Cast_Result_4); 
--# expr-done 1763
if Is_Equiv then
   --# expr-start 1774 '<If at nodes.lkt:3241:21>' If_Result_1 ada/nodes.lkt:3241
--# expr-start 1764 '<IsNull at nodes.lkt:3241:24>' Is_Equal ada/nodes.lkt:3241
Is_Equal := Local_Base_Rebindings = null; 
--# expr-done 1764
if Is_Equal then
   If_Result_1 := Var_Expr_0;
else
   --# expr-start 1773 '<FieldAccess for designated_type at nodes.lkt:3243:25>' Fld_14 ada/nodes.lkt:3243
--# expr-start 1772 '<New TypeExpr.entity at nodes.lkt:3243:25>' New_Struct_1 ada/nodes.lkt:3243
--# expr-start 1770 '<New EntityInfo at nodes.lkt:3245:34>' New_Struct ada/nodes.lkt:3245
--# expr-start 1766 '<FieldAccess for from_rebound at nodes.lkt:3251:46>' Fld_13 ada/nodes.lkt:3251
--# expr-start 1765 '<FieldAccess for info at nodes.lkt:3251:46>' Fld_12 ada/nodes.lkt:3251
Fld_12 := Typ.Info;
--# expr-done 1765
Fld_13 := Fld_12.From_Rebound;
--# expr-done 1766
--# expr-start 1769 '<FieldAccess for insert_rebindings at nodes.lkt:3247:44>' Fld_11 ada/nodes.lkt:3247
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1768 '<FieldAccess for rebindings at nodes.lkt:3248:37>' Fld_10 ada/nodes.lkt:3248
--# expr-start 1767 '<FieldAccess for info at nodes.lkt:3248:37>' Fld_9 ada/nodes.lkt:3248
Fld_9 := Typ.Info;
--# expr-done 1767
Fld_10 := Fld_9.Rebindings;
--# expr-done 1768
--# property-call-start AdaNode.insert_rebindings
Fld_11 := Libadalang.Implementation.Ada_Node_P_Insert_Rebindings (Node => Self, Base => Fld_10, To_Insert => Local_Base_Rebindings);
--# end
--# expr-done 1769
New_Struct := (From_Rebound => Fld_13, Md => No_Metadata, Rebindings => Fld_11); 
--# expr-done 1770
--# expr-start 1771 '<FieldAccess for node at nodes.lkt:3244:34>' Fld_8 ada/nodes.lkt:3244
Fld_8 := Typ.Node;
--# expr-done 1771
New_Struct_1 := (Info => New_Struct, Node => Fld_8); 
--# expr-done 1772
      if New_Struct_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_14 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => New_Struct_1.Node, Origin => Origin, E_Info => New_Struct_1.Info);
--# end
--# expr-done 1773
   If_Result_1 := Fld_14;
end if;
--# expr-done 1774
   If_Result_2 := If_Result_1;
else
   If_Result_2 := Local_Rt;
end if;
--# expr-done 1775
Let_Result := If_Result_2; 
--# end
--# expr-done 1776
Let_Result_1 := Let_Result; 
--# end
--# expr-done 1777
   If_Result_3 := Let_Result_1;
end if;
--# expr-done 1778
Scope_Result_2 := If_Result_3;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
Let_Result_2 := Result_Var_2; 
--# end
--# expr-done 1779
         Property_Result := Let_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Real_Designated_Type;
--# end
--# property-start BaseFormalParamHolder.call_argument_equation ada/nodes.lkt:3265
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Call_Argument_Equation
  (Node : Bare_Base_Formal_Param_Holder
      ; Param : Internal_Entity_Base_Formal_Param_Decl
      ; Arg : Internal_Entity_Expr
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind param Param
   --# bind arg Arg
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_327 with Inline_Always;
      Local_Param_Type : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Type_Expr;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_327 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_327;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1786 '<Let at nodes.lkt:3269:9>' Let_Result ada/nodes.lkt:3269
--# scope-start
--# expr-start 1781 '<FieldAccess for real_designated_type at nodes.lkt:3269:26>' Fld_1 ada/nodes.lkt:3269
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1780 '<FieldAccess for type_expression at nodes.lkt:3269:52>' Fld ada/nodes.lkt:3269
      if Param.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Param.Node, E_Info => Param.Info);
--# end
--# expr-done 1780
--# property-call-start BaseFormalParamHolder.real_designated_type
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Real_Designated_Type (Node => Ent.Node, Typ => Fld, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1781
Local_Param_Type := Fld_1; 
--# bind param_type Local_Param_Type
--# expr-start 1785 '<LogicBinaryOp And at nodes.lkt:3271:9>' And_Pred ada/nodes.lkt:3271
--# expr-start 1783 '<Bind at nodes.lkt:3271:9>' Bind_Result ada/nodes.lkt:3271
--# expr-start 1782 '<FieldAccess for expected_type_var at nodes.lkt:3271:9>' Fld_2 ada/nodes.lkt:3271
      if Arg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Arg.Node);
--# expr-done 1782
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Cast_Expr := Local_Param_Type; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Logic_Ctx := Allocate_Logic_Context (Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld_2, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:3271:9") else null)); 
--# expr-done 1783
--# expr-start 1784 '<FieldAccess for matches_expected_formal_type at nodes.lkt:3272:14>' Fld_3 ada/nodes.lkt:3272
      if Arg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_3 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Arg.Node, Origin => Origin);
--# end
--# expr-done 1784
And_Pred := Create_And (Bind_Result, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:3271:9") else null)); 
--# expr-done 1785
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 1786
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_327;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_327;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Call_Argument_Equation;
--# end
--# property-start BaseFormalParamHolder.match_formal_params ada/nodes.lkt:3277
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Match_Formal_Params
  (Node : Bare_Base_Formal_Param_Holder
      ; Other : Internal_Entity_Base_Formal_Param_Holder
      ; Match_Names : Boolean
         := True
      ; Ignore_First_Param : Boolean
         := False
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind match_names Match_Names
   --# bind ignore_first_param Ignore_First_Param
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_328 with Inline_Always;
            procedure Finalizer_Scope_2149 with Inline_Always;
            procedure Finalizer_Scope_2151 with Inline_Always;
      Local_Self_Params : Internal_Entity_Defining_Name_Array_Access;
Var_Expr_0 : Internal_Entity_Defining_Name_Array_Access;
Local_Other_Params : Internal_Entity_Defining_Name_Array_Access;
Local_Self_Types : Internal_Entity_Base_Type_Decl_Array_Access;
Var_Expr_3 : Internal_Entity_Base_Type_Decl_Array_Access;
Local_Other_Types : Internal_Entity_Base_Type_Decl_Array_Access;
Var_Expr_45 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Defining_Name_Array_Access;
Index_2 : Integer;
Is_Equal : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
If_Result : Internal_Entity_Defining_Name_Array_Access;
Scope_Result : Internal_Entity_Defining_Name_Array_Access;
Result_Var : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
Fld_2 : Internal_Entity_Base_Type_Decl_Array_Access;
Index_5 : Integer;
Is_Equal_1 : Boolean;
Not_Val_1 : Boolean;
Map_Result_1 : Internal_Entity_Base_Type_Decl_Array_Access;
If_Result_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Scope_Result_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Result_Var_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_3 : Internal_Entity_Base_Type_Decl_Array_Access;
Len : Integer;
Len_1 : Integer;
Is_Equal_2 : Boolean;
Len_2 : Integer;
Len_3 : Integer;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
Index_7 : Integer;
Not_Val_2 : Boolean;
Fld_4 : Internal_Entity_Name;
Get_Result : Internal_Entity_Defining_Name;
Fld_5 : Internal_Entity_Name;
Fld_6 : Bare_Name;
Fld_7 : Boolean;
If_Result_3 : Boolean;
Get_Result_1 : Internal_Entity_Base_Type_Decl;
Get_Result_2 : Internal_Entity_Base_Type_Decl;
Fld_8 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_4 : Boolean;
Quantifier_Result : Boolean;
If_Result_5 : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
Let_Result_2 : Boolean;
Let_Result_3 : Boolean;
            procedure Finalizer_Scope_328 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Self_Params);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Other_Params);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Local_Self_Types);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Local_Other_Types);
            end Finalizer_Scope_328;
            procedure Finalizer_Scope_2149 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Map_Result);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2149;
            procedure Finalizer_Scope_2151 is
            begin
                     Dec_Ref (Var_Expr_3);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_2151;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1822 '<Let at nodes.lkt:3284:9>' Let_Result_3 ada/nodes.lkt:3284
--# scope-start
--# expr-start 1787 '<FieldAccess for unpacked_formal_params at nodes.lkt:3285:13>' Fld ada/nodes.lkt:3285
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1787
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= No_Internal_Entity_Defining_Name_Array_Type then
   --# scope-start
   --# bind params Var_Expr_0
--# expr-start 1791 '<If at nodes.lkt:3287:17>' If_Result ada/nodes.lkt:3287
if Ignore_First_Param then
   --# expr-start 1790 '<Map at nodes.lkt:3287:44>' Map_Result ada/nodes.lkt:3287
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
         Index_2 := 0;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Var_Expr_0;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
               --# bind i Index_2
         --# expr-start 1789 '<Not at nodes.lkt:3287:69>' Not_Val ada/nodes.lkt:3287
--# expr-start 1788 '<Eq at nodes.lkt:3287:69>' Is_Equal ada/nodes.lkt:3287
Is_Equal := Index_2 = 0; 
--# expr-done 1788
Not_Val := not (Is_Equal); 
--# expr-done 1789
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_1;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
               Index_2 := Index_2 + 1;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1790
   If_Result := Map_Result;
else
   If_Result := Var_Expr_0;
end if;
      Inc_Ref (If_Result);
--# expr-done 1791
Scope_Result := If_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2149;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Self_Params := Result_Var; Inc_Ref (Local_Self_Params);
--# bind self_params Local_Self_Params
--# expr-start 1821 '<Let at nodes.lkt:3290:9>' Let_Result_2 ada/nodes.lkt:3290
--# scope-start
--# expr-start 1792 '<FieldAccess for unpacked_formal_params at nodes.lkt:3290:28>' Fld_1 ada/nodes.lkt:3290
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Other.Node, E_Info => Other.Info);
--# end
--# expr-done 1792
Local_Other_Params := Fld_1; Inc_Ref (Local_Other_Params);
--# bind other_params Local_Other_Params
--# expr-start 1820 '<Let at nodes.lkt:3291:9>' Let_Result_1 ada/nodes.lkt:3291
--# scope-start
--# expr-start 1793 '<FieldAccess for param_types at nodes.lkt:3292:13>' Fld_2 ada/nodes.lkt:3292
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.param_types
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Param_Types (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1793
Var_Expr_3 := Fld_2;
      Inc_Ref (Var_Expr_3);
if Var_Expr_3 /= No_Internal_Entity_Base_Type_Decl_Array_Type then
   --# scope-start
   --# bind types Var_Expr_3
--# expr-start 1797 '<If at nodes.lkt:3294:17>' If_Result_1 ada/nodes.lkt:3294
if Ignore_First_Param then
   --# expr-start 1796 '<Map at nodes.lkt:3294:44>' Map_Result_1 ada/nodes.lkt:3294
      declare
         Map_Result_1_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
         Index_5 := 0;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Var_Expr_3;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_4
               --# bind i Index_5
         --# expr-start 1795 '<Not at nodes.lkt:3294:68>' Not_Val_1 ada/nodes.lkt:3294
--# expr-start 1794 '<Eq at nodes.lkt:3294:68>' Is_Equal_1 ada/nodes.lkt:3294
Is_Equal_1 := Index_5 = 0; 
--# expr-done 1794
Not_Val_1 := not (Is_Equal_1); 
--# expr-done 1795
         if Not_Val_1 then
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Item_4;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
               Index_5 := Index_5 + 1;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 1796
   If_Result_1 := Map_Result_1;
else
   If_Result_1 := Var_Expr_3;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 1797
Scope_Result_1 := If_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2151;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Base_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Local_Self_Types := Result_Var_1; Inc_Ref (Local_Self_Types);
--# bind self_types Local_Self_Types
--# expr-start 1819 '<Let at nodes.lkt:3297:9>' Let_Result ada/nodes.lkt:3297
--# scope-start
--# expr-start 1798 '<FieldAccess for param_types at nodes.lkt:3297:27>' Fld_3 ada/nodes.lkt:3297
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.param_types
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Param_Types (Node => Other.Node, Origin => Origin, E_Info => Other.Info);
--# end
--# expr-done 1798
Local_Other_Types := Fld_3; Inc_Ref (Local_Other_Types);
--# bind other_types Local_Other_Types
--# expr-start 1818 '<BooleanBinaryOp And at nodes.lkt:3299:9>' If_Result_5 ada/nodes.lkt:3299
--# expr-start 1805 '<BooleanBinaryOp And at nodes.lkt:3299:9>' If_Result_2 ada/nodes.lkt:3299
--# expr-start 1801 '<Eq at nodes.lkt:3299:9>' Is_Equal_2 ada/nodes.lkt:3299
--# expr-start 1799 '<length at nodes.lkt:3299:9>' Len ada/nodes.lkt:3299
Len := Length (Local_Self_Params); 
--# expr-done 1799
--# expr-start 1800 '<length at nodes.lkt:3299:33>' Len_1 ada/nodes.lkt:3299
Len_1 := Length (Local_Other_Params); 
--# expr-done 1800
Is_Equal_2 := Len = Len_1; 
--# expr-done 1801
if Is_Equal_2 then
   --# expr-start 1804 '<Eq at nodes.lkt:3300:13>' Is_Equal_3 ada/nodes.lkt:3300
--# expr-start 1802 '<length at nodes.lkt:3300:13>' Len_2 ada/nodes.lkt:3300
Len_2 := Length (Local_Self_Types); 
--# expr-done 1802
--# expr-start 1803 '<length at nodes.lkt:3300:36>' Len_3 ada/nodes.lkt:3300
Len_3 := Length (Local_Other_Types); 
--# expr-done 1803
Is_Equal_3 := Len_2 = Len_3; 
--# expr-done 1804
   If_Result_2 := Is_Equal_3;
else
   If_Result_2 := False;
end if;
--# expr-done 1805
if If_Result_2 then
   --# expr-start 1817 '<AllQuantifier at nodes.lkt:3301:13>' Quantifier_Result ada/nodes.lkt:3301
      Quantifier_Result := True;
         Index_7 := 0;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Local_Self_Params;
      begin
         for Item_6 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_6
               --# bind i Index_7
      --# expr-start 1816 '<BooleanBinaryOp And at nodes.lkt:3303:13>' If_Result_4 ada/nodes.lkt:3303
--# expr-start 1812 '<BooleanBinaryOp Or at nodes.lkt:3303:14>' If_Result_3 ada/nodes.lkt:3303
--# expr-start 1806 '<Not at nodes.lkt:3303:14>' Not_Val_2 ada/nodes.lkt:3303
Not_Val_2 := not (Match_Names); 
--# expr-done 1806
if Not_Val_2 then
   If_Result_3 := True;
else
   --# expr-start 1811 '<FieldAccess for matches at nodes.lkt:3303:33>' Fld_7 ada/nodes.lkt:3303
--# expr-start 1807 '<FieldAccess for name at nodes.lkt:3303:33>' Fld_4 ada/nodes.lkt:3303
      if Item_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Item_6.Node.Defining_Name_F_Name, Info => Item_6.Info);
--# expr-done 1807
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1810 '<FieldAccess for node at nodes.lkt:3303:48>' Fld_6 ada/nodes.lkt:3303
--# expr-start 1809 '<FieldAccess for name at nodes.lkt:3303:48>' Fld_5 ada/nodes.lkt:3303
--# expr-start 1808 '<at at nodes.lkt:3303:48>' Get_Result ada/nodes.lkt:3303
Get_Result := Get (Self, Local_Other_Params, Index_7, True); 
--# expr-done 1808
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Name (Node => Get_Result.Node.Defining_Name_F_Name, Info => Get_Result.Info);
--# expr-done 1809
Fld_6 := Fld_5.Node;
--# expr-done 1810
--# property-call-start Name.matches
Fld_7 := Libadalang.Implementation.Name_P_Matches (Node => Fld_4.Node, N => Fld_6);
--# end
--# expr-done 1811
   If_Result_3 := Fld_7;
end if;
--# expr-done 1812
if If_Result_3 then
--# expr-start 1813 '<at at nodes.lkt:3304:17>' Get_Result_1 ada/nodes.lkt:3304
Get_Result_1 := Get (Self, Local_Self_Types, Index_7, True); 
--# expr-done 1813
Var_Expr_45 := Get_Result_1;
if Var_Expr_45 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1815 '<FieldAccess for matching_type at nodes.lkt:3304:17>' Fld_8 ada/nodes.lkt:3304
      if Var_Expr_45.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1814 '<at at nodes.lkt:3304:47>' Get_Result_2 ada/nodes.lkt:3304
Get_Result_2 := Get (Self, Local_Other_Types, Index_7, True); 
--# expr-done 1814
--# property-call-start BaseTypeDecl.matching_type
Fld_8 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Var_Expr_45.Node, Expected_Type => Get_Result_2, Origin => Origin, E_Info => Var_Expr_45.Info);
--# end
--# expr-done 1815
Scope_Result_2 := Fld_8;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_4 := Result_Var_2;
else
   If_Result_4 := False;
end if;
--# expr-done 1816
      Quantifier_Result := If_Result_4;
   --# end
               exit when not Quantifier_Result;
               Index_7 := Index_7 + 1;
         end loop;
      end;
--# expr-done 1817
   If_Result_5 := Quantifier_Result;
else
   If_Result_5 := False;
end if;
--# expr-done 1818
Let_Result := If_Result_5; 
--# end
--# expr-done 1819
Let_Result_1 := Let_Result; 
--# end
--# expr-done 1820
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 1821
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 1822
         Property_Result := Let_Result_3;
   --# end
      Finalizer_Scope_328;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_328;
                     Finalizer_Scope_2149;
                     Finalizer_Scope_2151;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Match_Formal_Params;
--# end
--# property-start '[dispatcher]BaseFormalParamHolder.corresponding_actual' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Formal_Param_Holder_P_Corresponding_Actual
  (Node : Bare_Base_Formal_Param_Holder
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Formal_Param_Holder (Self.Kind) is
               when Ada_Entry_Spec .. Ada_Subp_Spec | Ada_Component_List .. Ada_Generic_Formal_Part =>
                  --# property-call-start BaseFormalParamHolder.corresponding_actual
                  Property_Result := Base_Formal_Param_Holder_P_Corresponding_Actual
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Binary_Spec =>
                  --# property-call-start SyntheticBinarySpec.corresponding_actual
                  Property_Result := Synthetic_Binary_Spec_P_Corresponding_Actual
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Unary_Spec =>
                  --# property-call-start SyntheticUnarySpec.corresponding_actual
                  Property_Result := Synthetic_Unary_Spec_P_Corresponding_Actual
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Formal_Param_Holder_P_Corresponding_Actual;
--# end
--# property-start '[dispatcher]BaseFormalParamHolder.match_other' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Formal_Param_Holder_P_Match_Other
  (Node : Bare_Base_Formal_Param_Holder
      ; Other : Internal_Entity_Base_Formal_Param_Holder
      ; Match_Names : Boolean
         := True
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind match_names Match_Names
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Formal_Param_Holder (Self.Kind) is
               when Ada_Component_List .. Ada_Generic_Formal_Part =>
                  --# property-call-start BaseFormalParamHolder.match_other
                  Property_Result := Base_Formal_Param_Holder_P_Match_Other
                    (Self
                        , Other
                        , Match_Names
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Spec .. Ada_Synthetic_Unary_Spec =>
                  --# property-call-start BaseSubpSpec.match_other
                  Property_Result := Base_Subp_Spec_P_Match_Other
                    (Self
                        , Other
                        , Match_Names
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Formal_Param_Holder_P_Match_Other;
--# end
--# property-start BaseFormalParamHolder.corresponding_actual ada/nodes.lkt:3312
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Corresponding_Actual
  (Node : Bare_Base_Formal_Param_Holder
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_46 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Base_Formal_Param_Holder;
Scope_Result : Internal_Entity_Base_Formal_Param_Holder;
Result_Var : Internal_Entity_Base_Formal_Param_Holder;
Scope_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Result_Var_1 : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 1824 '<Cast to BasicDecl at nodes.lkt:3313:9>' Cast_Result ada/nodes.lkt:3313
--# expr-start 1823 '<parent at nodes.lkt:3313:9>' Fld ada/nodes.lkt:3313
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 1823
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 1824
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind bd Var_Expr_0
--# expr-start 1825 '<FieldAccess for corresponding_actual at nodes.lkt:3314:21>' Fld_1 ada/nodes.lkt:3314
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.corresponding_actual'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Corresponding_Actual (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1825
Var_Expr_46 := Fld_1;
if Var_Expr_46 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 1826 '<FieldAccess for formal_param_holder_or_null at nodes.lkt:3314:21>' Fld_2 ada/nodes.lkt:3314
      if Var_Expr_46.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.formal_param_holder_or_null
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Formal_Param_Holder_Or_Null (Node => Var_Expr_46.Node, E_Info => Var_Expr_46.Info);
--# end
--# expr-done 1826
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Formal_Param_Holder;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Ent;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Corresponding_Actual;
--# end
--# property-start BaseFormalParamHolder.match_other ada/nodes.lkt:3323
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Holder_P_Match_Other
  (Node : Bare_Base_Formal_Param_Holder
      ; Other : Internal_Entity_Base_Formal_Param_Holder
      ; Match_Names : Boolean
         := True
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Formal_Param_Holder  := Bare_Base_Formal_Param_Holder (Node);
     Ent : Internal_Entity_Base_Formal_Param_Holder :=
       Internal_Entity_Base_Formal_Param_Holder'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind match_names Match_Names
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1827 '<FieldAccess for match_formal_params at nodes.lkt:3326:15>' Fld ada/nodes.lkt:3326
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.match_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Formal_Params (Node => Ent.Node, Other => Other, Match_Names => Match_Names, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1827
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Holder_P_Match_Other;
--# end
   --
   --  Primitives for Bare_Base_Subp_Spec
   --
--# property-start '[dispatcher]BaseSubpSpec.name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Subp_Spec_P_Name
  (Node : Bare_Base_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Subp_Spec (Self.Kind) is
               when Ada_Entry_Spec =>
                  --# property-call-start EntrySpec.name
                  Property_Result := Entry_Spec_P_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Subp_Spec =>
                  --# property-call-start EnumSubpSpec.name
                  Property_Result := Enum_Subp_Spec_P_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subp_Spec =>
                  --# property-call-start SubpSpec.name
                  Property_Result := Subp_Spec_P_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Binary_Spec =>
                  --# property-call-start SyntheticBinarySpec.name
                  Property_Result := Synthetic_Binary_Spec_P_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Unary_Spec =>
                  --# property-call-start SyntheticUnarySpec.name
                  Property_Result := Synthetic_Unary_Spec_P_Name
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Subp_Spec_P_Name;
--# end
--# property-start '[dispatcher]BaseSubpSpec.returns' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Subp_Spec_P_Returns
  (Node : Bare_Base_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Subp_Spec (Self.Kind) is
               when Ada_Entry_Spec =>
                  --# property-call-start EntrySpec.returns
                  Property_Result := Entry_Spec_P_Returns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Subp_Spec =>
                  --# property-call-start EnumSubpSpec.returns
                  Property_Result := Enum_Subp_Spec_P_Returns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subp_Spec =>
                  --# property-call-start SubpSpec.returns
                  Property_Result := Subp_Spec_P_Returns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Binary_Spec =>
                  --# property-call-start SyntheticBinarySpec.returns
                  Property_Result := Synthetic_Binary_Spec_P_Returns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Unary_Spec =>
                  --# property-call-start SyntheticUnarySpec.returns
                  Property_Result := Synthetic_Unary_Spec_P_Returns
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Subp_Spec_P_Returns;
--# end
--# property-start BaseSubpSpec.abstract_formal_params ada/nodes.lkt:3344
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Abstract_Formal_Params
  (Node : Bare_Base_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_333 with Inline_Always;
      Fld : Internal_Entity_Param_Spec_Array_Access;
Cast_Expr : Internal_Entity_Param_Spec;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
Map_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_333 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_333;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 1830 '<Map at nodes.lkt:3345:9>' Map_Result ada/nodes.lkt:3345
   --# expr-start 1828 '<FieldAccess for params at nodes.lkt:3345:9>' Fld ada/nodes.lkt:3345
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.params'
Fld := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1828
      declare
         Map_Result_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Param_Spec_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 1829 '<Cast to BaseFormalParamDecl at nodes.lkt:3345:34>' Cast_Result ada/nodes.lkt:3345
Cast_Expr := Item_0; 
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-done 1829
         declare
            Item_To_Append : constant Internal_Entity_Base_Formal_Param_Decl := Cast_Result;
         begin
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1830
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_333;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_333;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Abstract_Formal_Params;
--# end
--# property-start BaseSubpSpec.match_return_type ada/nodes.lkt:3348
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Match_Return_Type
  (Node : Bare_Base_Subp_Spec
      ; Other : Internal_Entity_Base_Subp_Spec
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Self_Ret : Internal_Entity_Base_Type_Decl;
Local_Other_Ret : Internal_Entity_Base_Type_Decl;
Var_Expr_47 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Type_Expr;
Is_Null : Boolean;
Fld_3 : Internal_Entity_Type_Expr;
Is_Null_1 : Boolean;
If_Result : Boolean;
Fld_4 : Internal_Entity_Type_Expr;
Is_Null_2 : Boolean;
Not_Val : Boolean;
Fld_5 : Internal_Entity_Type_Expr;
Is_Null_3 : Boolean;
Not_Val_1 : Boolean;
If_Result_1 : Boolean;
Fld_6 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_7 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Dyn_Var_Bind_Result : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1851 '<Let at nodes.lkt:3354:9>' Let_Result_1 ada/nodes.lkt:3354
--# scope-start
--# expr-start 1831 '<FieldAccess for return_type at nodes.lkt:3354:24>' Fld ada/nodes.lkt:3354
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1831
Local_Self_Ret := Fld; 
--# bind self_ret Local_Self_Ret
--# expr-start 1850 '<Let at nodes.lkt:3355:9>' Let_Result ada/nodes.lkt:3355
--# scope-start
--# expr-start 1832 '<FieldAccess for return_type at nodes.lkt:3355:25>' Fld_1 ada/nodes.lkt:3355
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Other.Node, Origin => Origin, E_Info => Other.Info);
--# end
--# expr-done 1832
Local_Other_Ret := Fld_1; 
--# bind other_ret Local_Other_Ret
--# expr-start 1849 '<BooleanBinaryOp Or at nodes.lkt:3357:9>' If_Result_3 ada/nodes.lkt:3357
--# expr-start 1837 '<BooleanBinaryOp And at nodes.lkt:3357:10>' If_Result ada/nodes.lkt:3357
--# expr-start 1834 '<IsNull at nodes.lkt:3357:10>' Is_Null ada/nodes.lkt:3357
--# expr-start 1833 '<FieldAccess for returns at nodes.lkt:3357:10>' Fld_2 ada/nodes.lkt:3357
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1833
Is_Null := Fld_2.Node = null; 
--# expr-done 1834
if Is_Null then
   --# expr-start 1836 '<IsNull at nodes.lkt:3357:37>' Is_Null_1 ada/nodes.lkt:3357
--# expr-start 1835 '<FieldAccess for returns at nodes.lkt:3357:37>' Fld_3 ada/nodes.lkt:3357
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Other.Node, E_Info => Other.Info);
--# end
--# expr-done 1835
Is_Null_1 := Fld_3.Node = null; 
--# expr-done 1836
   If_Result := Is_Null_1;
else
   If_Result := False;
end if;
--# expr-done 1837
if If_Result then
   If_Result_3 := True;
else
   --# expr-start 1848 '<BooleanBinaryOp And at nodes.lkt:3359:13>' If_Result_2 ada/nodes.lkt:3359
--# expr-start 1844 '<BooleanBinaryOp And at nodes.lkt:3359:13>' If_Result_1 ada/nodes.lkt:3359
--# expr-start 1840 '<Not at nodes.lkt:3359:13>' Not_Val ada/nodes.lkt:3359
--# expr-start 1839 '<IsNull at nodes.lkt:3359:17>' Is_Null_2 ada/nodes.lkt:3359
--# expr-start 1838 '<FieldAccess for returns at nodes.lkt:3359:17>' Fld_4 ada/nodes.lkt:3359
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1838
Is_Null_2 := Fld_4.Node = null; 
--# expr-done 1839
Not_Val := not (Is_Null_2); 
--# expr-done 1840
if Not_Val then
   --# expr-start 1843 '<Not at nodes.lkt:3359:44>' Not_Val_1 ada/nodes.lkt:3359
--# expr-start 1842 '<IsNull at nodes.lkt:3359:48>' Is_Null_3 ada/nodes.lkt:3359
--# expr-start 1841 '<FieldAccess for returns at nodes.lkt:3359:48>' Fld_5 ada/nodes.lkt:3359
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Other.Node, E_Info => Other.Info);
--# end
--# expr-done 1841
Is_Null_3 := Fld_5.Node = null; 
--# expr-done 1842
Not_Val_1 := not (Is_Null_3); 
--# expr-done 1843
   If_Result_1 := Not_Val_1;
else
   If_Result_1 := False;
end if;
--# expr-done 1844
if If_Result_1 then
   --# expr-start 1847 '<bind at nodes.lkt:3361:17>' Dyn_Var_Bind_Result ada/nodes.lkt:3361
--# expr-start 1845 '<FieldAccess for origin_node at nodes.lkt:3361:31>' Fld_6 ada/nodes.lkt:3361
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_6 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 1845
Bound_Origin := Fld_6; 
Var_Expr_47 := Local_Self_Ret;
if Var_Expr_47 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1846 '<FieldAccess for matching_type at nodes.lkt:3363:17>' Fld_7 ada/nodes.lkt:3363
      if Var_Expr_47.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Var_Expr_47.Node, Expected_Type => Local_Other_Ret, Origin => Bound_Origin, E_Info => Var_Expr_47.Info);
--# end
--# expr-done 1846
Scope_Result := Fld_7;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Dyn_Var_Bind_Result := Result_Var; 
--# expr-done 1847
   If_Result_2 := Dyn_Var_Bind_Result;
else
   If_Result_2 := False;
end if;
--# expr-done 1848
   If_Result_3 := If_Result_2;
end if;
--# expr-done 1849
Let_Result := If_Result_3; 
--# end
--# expr-done 1850
Let_Result_1 := Let_Result; 
--# end
--# expr-done 1851
         Property_Result := Let_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Match_Return_Type;
--# end
--# property-start BaseSubpSpec.match_signature ada/nodes.lkt:3387
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Match_Signature
  (Node : Bare_Base_Subp_Spec
      ; Other : Internal_Entity_Base_Subp_Spec
      ; Match_Name : Boolean
      ; Use_Entity_Info : Boolean
         := True
      ; Ignore_First_Param : Boolean
         := False
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind match_name Match_Name
   --# bind use_entity_info Use_Entity_Info
   --# bind ignore_first_param Ignore_First_Param
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Ent : Internal_Entity_Base_Subp_Spec;
As_Entity : Internal_Entity_Base_Subp_Spec;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Subp_Spec;
If_Result_1 : Internal_Entity_Base_Subp_Spec;
Not_Val : Boolean;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Bare_Defining_Name;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Bare_Defining_Name;
Cast_Result : Bare_Name;
Fld_4 : Boolean;
If_Result_2 : Boolean;
Fld_5 : Boolean;
If_Result_3 : Boolean;
Cast_Expr : Internal_Entity_Base_Subp_Spec;
Cast_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Fld_6 : Boolean;
If_Result_4 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1865 '<Let at nodes.lkt:3393:9>' Let_Result ada/nodes.lkt:3393
--# scope-start
--# expr-start 1853 '<If at nodes.lkt:3393:19>' If_Result_1 ada/nodes.lkt:3393
if Use_Entity_Info then
   If_Result_1 := Ent;
else
   --# expr-start 1852 '<as_bare_entity at nodes.lkt:3393:53>' If_Result ada/nodes.lkt:3393
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Base_Subp_Spec;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 1852
   If_Result_1 := If_Result;
end if;
--# expr-done 1853
Local_Ent := If_Result_1; 
--# bind ent Local_Ent
--# expr-start 1864 '<BooleanBinaryOp And at nodes.lkt:3395:9>' If_Result_4 ada/nodes.lkt:3395
--# expr-start 1862 '<BooleanBinaryOp And at nodes.lkt:3395:9>' If_Result_3 ada/nodes.lkt:3395
--# expr-start 1860 '<BooleanBinaryOp Or at nodes.lkt:3397:13>' If_Result_2 ada/nodes.lkt:3397
--# expr-start 1854 '<Not at nodes.lkt:3397:13>' Not_Val ada/nodes.lkt:3397
Not_Val := not (Match_Name); 
--# expr-done 1854
if Not_Val then
   If_Result_2 := True;
else
   --# expr-start 1859 '<FieldAccess for matches at nodes.lkt:3397:31>' Fld_4 ada/nodes.lkt:3397
--# expr-start 1856 '<FieldAccess for node at nodes.lkt:3397:31>' Fld_1 ada/nodes.lkt:3397
--# expr-start 1855 '<FieldAccess for name at nodes.lkt:3397:31>' Fld ada/nodes.lkt:3397
      if Local_Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Local_Ent.Node, E_Info => Local_Ent.Info);
--# end
--# expr-done 1855
Fld_1 := Fld.Node;
--# expr-done 1856
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1858 '<FieldAccess for node at nodes.lkt:3397:55>' Fld_3 ada/nodes.lkt:3397
--# expr-start 1857 '<FieldAccess for name at nodes.lkt:3397:55>' Fld_2 ada/nodes.lkt:3397
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Other.Node, E_Info => Other.Info);
--# end
--# expr-done 1857
Fld_3 := Fld_2.Node;
--# expr-done 1858
      Cast_Result := Fld_3;
--# property-call-start Name.matches
Fld_4 := Libadalang.Implementation.Name_P_Matches (Node => Fld_1, N => Cast_Result);
--# end
--# expr-done 1859
   If_Result_2 := Fld_4;
end if;
--# expr-done 1860
if If_Result_2 then
   --# expr-start 1861 '<FieldAccess for match_return_type at nodes.lkt:3399:13>' Fld_5 ada/nodes.lkt:3399
      if Local_Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.match_return_type
Fld_5 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Return_Type (Node => Local_Ent.Node, Other => Other, Origin => Origin, E_Info => Local_Ent.Info);
--# end
--# expr-done 1861
   If_Result_3 := Fld_5;
else
   If_Result_3 := False;
end if;
--# expr-done 1862
if If_Result_3 then
   --# expr-start 1863 '<FieldAccess for match_formal_params at nodes.lkt:3400:13>' Fld_6 ada/nodes.lkt:3400
      if Local_Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Other; 
      Cast_Result_1 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# property-call-start BaseFormalParamHolder.match_formal_params
Fld_6 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Formal_Params (Node => Local_Ent.Node, Other => Cast_Result_1, Match_Names => Match_Name, Ignore_First_Param => Ignore_First_Param, Origin => Origin, E_Info => Local_Ent.Info);
--# end
--# expr-done 1863
   If_Result_4 := Fld_6;
else
   If_Result_4 := False;
end if;
--# expr-done 1864
Let_Result := If_Result_4; 
--# end
--# expr-done 1865
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Match_Signature;
--# end
--# property-start BaseSubpSpec.match_other ada/nodes.lkt:3404
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Match_Other
  (Node : Bare_Base_Subp_Spec
      ; Other : Internal_Entity_Base_Formal_Param_Holder
      ; Match_Names : Boolean
         := True
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind match_names Match_Names
   --# bind origin Origin
   Property_Result : Boolean;
      Cast_Expr : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result : Internal_Entity_Base_Subp_Spec;
Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1867 '<FieldAccess for match_signature at nodes.lkt:3407:15>' Fld ada/nodes.lkt:3407
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1866 '<Cast to BaseSubpSpec at nodes.lkt:3407:36>' Cast_Result ada/nodes.lkt:3407
Cast_Expr := Other; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Subp_Spec
   then
      Cast_Result := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 1866
--# property-call-start BaseSubpSpec.match_signature
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Ent.Node, Other => Cast_Result, Match_Name => Match_Names, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1867
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Match_Other;
--# end
--# property-start BaseSubpSpec.match_expected_user_defined_function ada/nodes.lkt:3410
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Match_Expected_User_Defined_Function
  (Node : Bare_Base_Subp_Spec
      ; Fn : Internal_User_Defined_Function_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind fn Fn
   Property_Result : Boolean;
            procedure Finalizer_Scope_337 with Inline_Always;
            procedure Finalizer_Scope_2159 with Inline_Always;
            procedure Finalizer_Scope_2160 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
Fld_3 : Internal_Entity_Defining_Name_Array_Access;
Len : Integer;
Fld_4 : Internal_Entity_Base_Type_Decl_Array_Access;
Len_1 : Integer;
Is_Equal : Boolean;
Index_2 : Integer;
Fld_5 : Internal_Entity_Base_Formal_Param_Decl;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Internal_Entity_Base_Type_Decl_Array_Access;
Get_Result : Internal_Entity_Base_Type_Decl;
Fld_8 : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result_1 : Boolean;
            procedure Finalizer_Scope_337 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_337;
            procedure Finalizer_Scope_2159 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2159;
            procedure Finalizer_Scope_2160 is
            begin
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_2160;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1885 '<BooleanBinaryOp And at nodes.lkt:3413:9>' If_Result_1 ada/nodes.lkt:3413
--# expr-start 1870 '<FieldAccess for matching_type at nodes.lkt:3413:9>' Fld_2 ada/nodes.lkt:3413
--# expr-start 1868 '<FieldAccess for return_type at nodes.lkt:3413:9>' Fld ada/nodes.lkt:3413
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Ent.Node, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 1868
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1869 '<FieldAccess for subp_return_type at nodes.lkt:3413:42>' Fld_1 ada/nodes.lkt:3413
Fld_1 := Fn.Subp_Return_Type;
--# expr-done 1869
--# property-call-start BaseTypeDecl.matching_type
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Fld.Node, Expected_Type => Fld_1, Origin => No_Bare_Ada_Node, E_Info => Fld.Info);
--# end
--# expr-done 1870
if Fld_2 then
--# expr-start 1871 '<FieldAccess for unpacked_formal_params at nodes.lkt:3414:13>' Fld_3 ada/nodes.lkt:3414
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1871
Var_Expr_0 := Fld_3;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= No_Internal_Entity_Defining_Name_Array_Type then
   --# scope-start
   --# bind params Var_Expr_0
--# expr-start 1884 '<BooleanBinaryOp And at nodes.lkt:3416:13>' If_Result ada/nodes.lkt:3416
--# expr-start 1875 '<Eq at nodes.lkt:3416:13>' Is_Equal ada/nodes.lkt:3416
--# expr-start 1872 '<length at nodes.lkt:3416:13>' Len ada/nodes.lkt:3416
Len := Length (Var_Expr_0); 
--# expr-done 1872
--# expr-start 1874 '<length at nodes.lkt:3416:32>' Len_1 ada/nodes.lkt:3416
--# expr-start 1873 '<FieldAccess for subp_params_types at nodes.lkt:3416:32>' Fld_4 ada/nodes.lkt:3416
Fld_4 := Fn.Subp_Params_Types;
Inc_Ref (Fld_4);
--# expr-done 1873
Len_1 := Length (Fld_4); 
--# expr-done 1874
Is_Equal := Len = Len_1; 
--# expr-done 1875
if Is_Equal then
   --# expr-start 1883 '<IsNull at nodes.lkt:3417:17>' Is_Equal_1 ada/nodes.lkt:3417
--# expr-start 1882 '<Map at nodes.lkt:3417:17>' Map_Result ada/nodes.lkt:3417
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
         Index_2 := 0;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Var_Expr_0;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
               --# bind i Index_2
         --# expr-start 1881 '<Not at nodes.lkt:3419:17>' Not_Val ada/nodes.lkt:3419
--# expr-start 1880 '<FieldAccess for matching_type at nodes.lkt:3419:21>' Fld_8 ada/nodes.lkt:3419
--# expr-start 1877 '<FieldAccess for formal_type at nodes.lkt:3419:21>' Fld_6 ada/nodes.lkt:3419
--# expr-start 1876 '<FieldAccess for formal_decl at nodes.lkt:3419:21>' Fld_5 ada/nodes.lkt:3419
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_5 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 1876
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_6 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_5.Node, Origin => No_Bare_Ada_Node, E_Info => Fld_5.Info);
--# end
--# expr-done 1877
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1879 '<at at nodes.lkt:3420:21>' Get_Result ada/nodes.lkt:3420
--# expr-start 1878 '<FieldAccess for subp_params_types at nodes.lkt:3420:21>' Fld_7 ada/nodes.lkt:3420
Fld_7 := Fn.Subp_Params_Types;
Inc_Ref (Fld_7);
--# expr-done 1878
Get_Result := Get (Self, Fld_7, Index_2, True); 
--# expr-done 1879
--# property-call-start BaseTypeDecl.matching_type
Fld_8 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Fld_6.Node, Expected_Type => Get_Result, Origin => No_Bare_Ada_Node, E_Info => Fld_6.Info);
--# end
--# expr-done 1880
Not_Val := not (Fld_8); 
--# expr-done 1881
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_1;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
      Finalizer_Scope_2160;
               Index_2 := Index_2 + 1;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1882
Is_Equal_1 := Equivalent (Map_Result, No_Internal_Entity_Defining_Name_Array_Type); 
--# expr-done 1883
   If_Result := Is_Equal_1;
else
   If_Result := False;
end if;
--# expr-done 1884
Scope_Result := If_Result;
   --# end
      Finalizer_Scope_2159;
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result_1 := Result_Var;
else
   If_Result_1 := False;
end if;
--# expr-done 1885
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_337;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_337;
                     Finalizer_Scope_2159;
                     Finalizer_Scope_2160;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Match_Expected_User_Defined_Function;
--# end
--# property-start BaseSubpSpec.defining_env ada/nodes.lkt:3428
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Defining_Env
  (Node : Bare_Base_Subp_Spec
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_338 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Type_Expr;
Is_Null : Boolean;
If_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_338 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_338;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1890 '<If at nodes.lkt:3429:9>' If_Result ada/nodes.lkt:3429
--# expr-start 1887 '<IsNull at nodes.lkt:3429:12>' Is_Null ada/nodes.lkt:3429
--# expr-start 1886 '<FieldAccess for returns at nodes.lkt:3429:12>' Fld_2 ada/nodes.lkt:3429
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1886
Is_Null := Fld_2.Node = null; 
--# expr-done 1887
if Is_Null then
   If_Result := Empty_Env;
else
   --# expr-start 1889 '<FieldAccess for defining_env at nodes.lkt:3430:14>' Fld_1 ada/nodes.lkt:3430
--# expr-start 1888 '<FieldAccess for return_type at nodes.lkt:3430:14>' Fld ada/nodes.lkt:3430
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 1888
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => False, Dottable_Type => No_Bare_Ada_Node, E_Info => Fld.Info);
--# end
--# expr-done 1889
   If_Result := Fld_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 1890
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_338;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_338;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Defining_Env;
--# end
--# property-start BaseSubpSpec.potential_dottable_type ada/nodes.lkt:3435
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Potential_Dottable_Type
  (Node : Bare_Base_Subp_Spec
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_339 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Formal_Param_Decl;
Var_Expr_48 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Get_Result : Internal_Entity_Base_Formal_Param_Decl;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_339 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_339;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 1892 '<at at nodes.lkt:3436:9>' Get_Result ada/nodes.lkt:3436
--# expr-start 1891 '<FieldAccess for abstract_formal_params at nodes.lkt:3436:9>' Fld ada/nodes.lkt:3436
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1891
Get_Result := Get (Self, Fld, 0, True); 
--# expr-done 1892
Var_Expr_0 := Get_Result;
if Var_Expr_0 /= No_Entity_Base_Formal_Param_Decl then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 1893 '<FieldAccess for type_expression at nodes.lkt:3437:20>' Fld_1 ada/nodes.lkt:3437
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1893
Var_Expr_48 := Fld_1;
if Var_Expr_48 /= No_Entity_Type_Expr then
   --# scope-start
--# expr-start 1894 '<FieldAccess for element_type at nodes.lkt:3437:20>' Fld_2 ada/nodes.lkt:3437
      if Var_Expr_48.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.element_type
Fld_2 := Libadalang.Implementation.Type_Expr_P_Element_Type (Node => Var_Expr_48.Node, Origin => Origin, E_Info => Var_Expr_48.Info);
--# end
--# expr-done 1894
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var_1;
   --# end
      Finalizer_Scope_339;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_339;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Potential_Dottable_Type;
--# end
--# property-start BaseSubpSpec.get_candidate_type_for_primitive ada/nodes.lkt:3446
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Get_Candidate_Type_For_Primitive
  (Node : Bare_Base_Subp_Spec
      ; Type_Expr : Internal_Entity_Type_Expr
      ; Canonicalize : Boolean
         := True
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind type_expr Type_Expr
   --# bind canonicalize Canonicalize
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_340 with Inline_Always;
      Local_Decl_Scope : Bare_Declarative_Part;
Local_Typ : Internal_Entity_Base_Type_Decl;
Match_0 : Internal_Entity_Anonymous_Type;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Boolean;
Match_1 : Internal_Entity_Type_Expr;
Local_Canon_Type : Internal_Entity_Base_Type_Decl;
Local_Final_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_2 : Internal_Entity_Incomplete_Type_Decl;
Local_Type_Scope : Bare_Declarative_Part;
Var_Expr_3 : Internal_Entity_Base_Type_Decl;
Var_Expr_4 : Bare_Declarative_Part;
Var_Expr_5 : Bare_Declarative_Part;
Var_Expr_6 : Bare_Declarative_Part;
Var_Expr_49 : Internal_Entity_Generic_Instantiation;
Var_Expr_50 : Internal_Entity;
Var_Expr_51 : Internal_Entity_Base_Type_Decl;
Var_Expr_52 : Internal_Entity_Type_Decl;
Var_Expr_53 : Internal_Entity_Base_Type_Decl;
Var_Expr_54 : Bare_Declarative_Part;
Var_Expr_55 : Bare_Base_Package_Decl;
Fld : Internal_Entity_Generic_Instantiation_Array_Access;
Get_Result : Internal_Entity_Generic_Instantiation;
Fld_1 : Internal_Entity;
Fld_2 : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Fld_3 : Bare_Ada_Node;
Fld_4 : Bare_Ada_Node;
Fld_5 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Fld_6 : Bare_Ada_Node;
Is_A : Boolean;
If_Result_1 : Internal_Entity;
Cast_Result : Internal_Entity_Declarative_Part;
Fld_7 : Bare_Declarative_Part;
Fld_8 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Boolean;
Not_Val : Boolean;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var_3 : Internal_Entity_Base_Type_Decl;
Fld_11 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity_Type_Expr;
Cast_Result_1 : Internal_Entity_Anonymous_Type;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity_Type_Expr;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_5 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
Fld_12 : Bare_Ada_Node;
Bound_Origin_1 : Bare_Ada_Node;
Fld_13 : Internal_Entity_Base_Type_Decl;
Scope_Result_6 : Internal_Entity_Base_Type_Decl;
Result_Var_4 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result_1 : Internal_Entity_Base_Type_Decl;
If_Result_2 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity_Incomplete_Type_Decl;
Fld_14 : Internal_Entity_Base_Type_Decl;
Scope_Result_7 : Internal_Entity_Base_Type_Decl;
Result_Var_5 : Internal_Entity_Base_Type_Decl;
Fld_15 : Bare_Base_Type_Decl;
Fld_16 : Bare_Ada_Node;
Fld_17 : Bare_Ada_Node;
Cast_Result_4 : Bare_Declarative_Part;
Scope_Result_8 : Bare_Declarative_Part;
Result_Var_6 : Bare_Declarative_Part;
Fld_18 : Bare_Ada_Node;
Is_A_1 : Boolean;
Scope_Result_9 : Boolean;
Result_Var_7 : Boolean;
Fld_19 : Bare_Ada_Node;
Is_A_2 : Boolean;
Scope_Result_10 : Boolean;
Result_Var_8 : Boolean;
If_Result_3 : Boolean;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity_Type_Decl;
Fld_20 : Boolean;
Scope_Result_11 : Boolean;
Result_Var_9 : Boolean;
If_Result_4 : Boolean;
Fld_21 : Boolean;
Scope_Result_12 : Boolean;
Result_Var_10 : Boolean;
Not_Val_1 : Boolean;
If_Result_5 : Boolean;
Cast_Expr_2 : Bare_Declarative_Part;
Cast_Result_6 : Bare_Ada_Node;
Fld_22 : Bare_Ada_Node;
Scope_Result_13 : Bare_Ada_Node;
Result_Var_11 : Bare_Ada_Node;
Cast_Result_7 : Bare_Base_Package_Decl;
Fld_23 : Bare_Public_Part;
Scope_Result_14 : Bare_Public_Part;
Result_Var_12 : Bare_Public_Part;
Cast_Result_8 : Bare_Ada_Node;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result_6 : Boolean;
Scope_Result_15 : Boolean;
Result_Var_13 : Boolean;
If_Result_7 : Boolean;
If_Result_8 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Let_Result_3 : Internal_Entity_Base_Type_Decl;
Let_Result_4 : Internal_Entity_Base_Type_Decl;
Let_Result_5 : Internal_Entity_Base_Type_Decl;
Let_Result_6 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_340 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_340;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1945 '<Let at nodes.lkt:3450:9>' Let_Result_6 ada/nodes.lkt:3450
--# scope-start
--# expr-start 1907 '<FieldAccess for node at nodes.lkt:3451:13>' Fld_7 ada/nodes.lkt:3451
--# expr-start 1906 '<Cast to DeclarativePart at nodes.lkt:3451:13>' Cast_Result ada/nodes.lkt:3451
--# expr-start 1905 '<If at nodes.lkt:3452:17>' If_Result_1 ada/nodes.lkt:3452
--# expr-start 1896 '<IsA GenericSubpInternal at nodes.lkt:3452:20>' Is_A ada/nodes.lkt:3452
--# expr-start 1895 '<parent at nodes.lkt:3452:20>' Fld_6 ada/nodes.lkt:3452
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Parent; 
--# expr-done 1895
Is_A := Fld_6 /= null 
and then Fld_6.Kind in Ada_Generic_Subp_Internal_Range; 
--# expr-done 1896
if Is_A then
--# expr-start 1898 '<at at nodes.lkt:3456:21>' Get_Result ada/nodes.lkt:3456
--# expr-start 1897 '<FieldAccess for generic_instantiations at nodes.lkt:3456:21>' Fld ada/nodes.lkt:3456
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.generic_instantiations
Fld := Libadalang.Implementation.Ada_Node_P_Generic_Instantiations (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1897
Get_Result := Get (Self, Fld, 0, True); 
--# expr-done 1898
Var_Expr_49 := Get_Result;
if Var_Expr_49 /= No_Entity_Generic_Instantiation then
   --# scope-start
--# expr-start 1899 '<parent at nodes.lkt:3456:21>' Fld_1 ada/nodes.lkt:3456
      if Var_Expr_49.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Var_Expr_49.Node, E_Info => Var_Expr_49.Info);
--# expr-done 1899
Var_Expr_50 := Fld_1;
if Var_Expr_50 /= No_Entity then
   --# scope-start
--# expr-start 1900 '<parent at nodes.lkt:3456:21>' Fld_2 ada/nodes.lkt:3456
      if Var_Expr_50.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Var_Expr_50.Node, E_Info => Var_Expr_50.Info);
--# expr-done 1900
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
   If_Result_1 := Result_Var_1;
else
   --# expr-start 1904 '<as_entity at nodes.lkt:3458:22>' If_Result ada/nodes.lkt:3458
--# expr-start 1903 '<parent at nodes.lkt:3458:22>' Fld_5 ada/nodes.lkt:3458
--# expr-start 1902 '<parent at nodes.lkt:3458:22>' Fld_4 ada/nodes.lkt:3458
--# expr-start 1901 '<parent at nodes.lkt:3458:22>' Fld_3 ada/nodes.lkt:3458
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Parent; 
--# expr-done 1901
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Fld_3.Parent; 
--# expr-done 1902
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Fld_4.Parent; 
--# expr-done 1903
Is_Null := Fld_5 = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Fld_5); 
   If_Result := As_Entity;
end if;
--# expr-done 1904
   If_Result_1 := If_Result;
end if;
--# expr-done 1905
   if If_Result_1.Node = null
      or else If_Result_1.Node.Kind in Ada_Declarative_Part_Range
   then
      Cast_Result := Create_Internal_Entity_Declarative_Part
        (Node => If_Result_1.Node,
         Info => If_Result_1.Info);
   else
         Cast_Result := No_Entity_Declarative_Part;
   end if;
--# expr-done 1906
Fld_7 := Cast_Result.Node;
--# expr-done 1907
Local_Decl_Scope := Fld_7; 
--# bind decl_scope Local_Decl_Scope
--# expr-start 1944 '<Let at nodes.lkt:3462:9>' Let_Result_5 ada/nodes.lkt:3462
--# scope-start
--# expr-start 1914 '<bind at nodes.lkt:3463:13>' Dyn_Var_Bind_Result ada/nodes.lkt:3463
--# expr-start 1908 '<FieldAccess for origin_node at nodes.lkt:3463:27>' Fld_8 ada/nodes.lkt:3463
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_8 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 1908
Bound_Origin := Fld_8; 
--# expr-start 1913 '<Match at nodes.lkt:3465:13>' Match_Result ada/nodes.lkt:3465
      if Type_Expr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Type_Expr; 
case Ada_Type_Expr (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Type =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Anonymous_Type
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind at Match_0
--# expr-start 1909 '<FieldAccess for element_type at nodes.lkt:3467:21>' Fld_9 ada/nodes.lkt:3467
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.element_type
Fld_9 := Libadalang.Implementation.Type_Expr_P_Element_Type (Node => Match_0.Node, Origin => Bound_Origin, E_Info => Match_0.Info);
--# end
--# expr-done 1909
Var_Expr_0 := Fld_9;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind et Var_Expr_0
--# expr-start 1911 '<Not at nodes.lkt:3468:34>' Not_Val ada/nodes.lkt:3468
--# expr-start 1910 '<FieldAccess for is_classwide at nodes.lkt:3468:38>' Fld_10 ada/nodes.lkt:3468
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_10 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1910
Not_Val := not (Fld_10); 
--# expr-done 1911
Var_Expr_1 := Not_Val;
if Var_Expr_1 /= False then
   --# scope-start
   --# bind _ Var_Expr_1
Scope_Result_2 := Var_Expr_0;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_3 := Result_Var_2;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Entity_Base_Type_Decl;
end if;
Let_Result := Result_Var_3; 
--# end
Scope_Result_4 := Let_Result;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Enum_Lit_Synth_Type_Expr .. Ada_Synthetic_Type_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Type_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind other Match_1
--# expr-start 1912 '<FieldAccess for designated_type at nodes.lkt:3473:31>' Fld_11 ada/nodes.lkt:3473
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_11 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Match_1.Node, Origin => Bound_Origin, E_Info => Match_1.Info);
--# end
--# expr-done 1912
Let_Result_1 := Fld_11; 
--# end
Scope_Result_5 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 1913
Dyn_Var_Bind_Result := Match_Result; 
--# expr-done 1914
Local_Typ := Dyn_Var_Bind_Result; 
--# bind typ Local_Typ
--# expr-start 1943 '<Let at nodes.lkt:3477:9>' Let_Result_4 ada/nodes.lkt:3477
--# scope-start
--# expr-start 1918 '<If at nodes.lkt:3478:13>' If_Result_2 ada/nodes.lkt:3478
if Canonicalize then
   --# expr-start 1917 '<bind at nodes.lkt:3480:17>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:3480
--# expr-start 1915 '<FieldAccess for origin_node at nodes.lkt:3480:31>' Fld_12 ada/nodes.lkt:3480
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_12 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 1915
Bound_Origin_1 := Fld_12; 
Var_Expr_51 := Local_Typ;
if Var_Expr_51 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1916 '<FieldAccess for canonical_type at nodes.lkt:3482:17>' Fld_13 ada/nodes.lkt:3482
      if Var_Expr_51.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_13 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Var_Expr_51.Node, Origin => Bound_Origin_1, E_Info => Var_Expr_51.Info);
--# end
--# expr-done 1916
Scope_Result_6 := Fld_13;
   --# end
   Result_Var_4 := Scope_Result_6;
else
   Result_Var_4 := No_Entity_Base_Type_Decl;
end if;
Dyn_Var_Bind_Result_1 := Result_Var_4; 
--# expr-done 1917
   If_Result_2 := Dyn_Var_Bind_Result_1;
else
   If_Result_2 := Local_Typ;
end if;
--# expr-done 1918
Local_Canon_Type := If_Result_2; 
--# bind canon_type Local_Canon_Type
--# expr-start 1942 '<Let at nodes.lkt:3485:9>' Let_Result_3 ada/nodes.lkt:3485
--# scope-start
--# expr-start 1919 '<Cast to IncompleteTypeDecl at nodes.lkt:3486:13>' Cast_Result_3 ada/nodes.lkt:3486
Cast_Expr := Local_Canon_Type; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Incomplete_Type_Decl_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Incomplete_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_3 := No_Entity_Incomplete_Type_Decl;
   end if;
--# expr-done 1919
Var_Expr_2 := Cast_Result_3;
if Var_Expr_2 /= No_Entity_Incomplete_Type_Decl then
   --# scope-start
   --# bind i Var_Expr_2
--# expr-start 1920 '<FieldAccess for next_part at nodes.lkt:3487:24>' Fld_14 ada/nodes.lkt:3487
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.next_part
Fld_14 := Libadalang.Implementation.Base_Type_Decl_P_Next_Part (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 1920
Scope_Result_7 := Fld_14;
   --# end
   Result_Var_5 := Scope_Result_7;
else
   Result_Var_5 := Local_Canon_Type;
end if;
Local_Final_Type := Result_Var_5; 
--# bind final_type Local_Final_Type
--# expr-start 1941 '<Let at nodes.lkt:3490:9>' Let_Result_2 ada/nodes.lkt:3490
--# scope-start
Var_Expr_3 := Local_Final_Type;
if Var_Expr_3 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_3
--# expr-start 1924 '<Cast to DeclarativePart at nodes.lkt:3491:36>' Cast_Result_4 ada/nodes.lkt:3491
--# expr-start 1923 '<parent at nodes.lkt:3491:36>' Fld_17 ada/nodes.lkt:3491
--# expr-start 1922 '<parent at nodes.lkt:3491:36>' Fld_16 ada/nodes.lkt:3491
--# expr-start 1921 '<FieldAccess for node at nodes.lkt:3491:36>' Fld_15 ada/nodes.lkt:3491
Fld_15 := Var_Expr_3.Node;
--# expr-done 1921
      if Fld_15 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Fld_15.Parent; 
--# expr-done 1922
      if Fld_16 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Fld_16.Parent; 
--# expr-done 1923
   if Fld_17 = null
      or else Fld_17.Kind in Ada_Declarative_Part_Range
   then
      Cast_Result_4 := Fld_17;
   else
         Cast_Result_4 := No_Bare_Ada_Node;
   end if;
--# expr-done 1924
Scope_Result_8 := Cast_Result_4;
   --# end
   Result_Var_6 := Scope_Result_8;
else
   Result_Var_6 := No_Bare_Ada_Node;
end if;
Local_Type_Scope := Result_Var_6; 
--# bind type_scope Local_Type_Scope
--# expr-start 1940 '<If at nodes.lkt:3493:9>' If_Result_8 ada/nodes.lkt:3493
--# expr-start 1939 '<BooleanBinaryOp And at nodes.lkt:3494:13>' If_Result_7 ada/nodes.lkt:3494
--# expr-start 1935 '<BooleanBinaryOp And at nodes.lkt:3494:13>' If_Result_5 ada/nodes.lkt:3494
--# expr-start 1932 '<BooleanBinaryOp Or at nodes.lkt:3495:17>' If_Result_4 ada/nodes.lkt:3495
--# expr-start 1929 '<BooleanBinaryOp And at nodes.lkt:3498:21>' If_Result_3 ada/nodes.lkt:3498
Var_Expr_4 := Local_Type_Scope;
if Var_Expr_4 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_4
--# expr-start 1926 '<IsA BasePackageDecl at nodes.lkt:3498:43>' Is_A_1 ada/nodes.lkt:3498
--# expr-start 1925 '<parent at nodes.lkt:3498:43>' Fld_18 ada/nodes.lkt:3498
      if Var_Expr_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Var_Expr_4.Parent; 
--# expr-done 1925
Is_A_1 := Fld_18 /= null 
and then Fld_18.Kind in Ada_Base_Package_Decl; 
--# expr-done 1926
Scope_Result_9 := Is_A_1;
   --# end
   Result_Var_7 := Scope_Result_9;
else
   Result_Var_7 := False;
end if;
if Result_Var_7 then
Var_Expr_5 := Local_Decl_Scope;
if Var_Expr_5 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v2 Var_Expr_5
--# expr-start 1928 '<IsA BasePackageDecl at nodes.lkt:3499:47>' Is_A_2 ada/nodes.lkt:3499
--# expr-start 1927 '<parent at nodes.lkt:3499:47>' Fld_19 ada/nodes.lkt:3499
      if Var_Expr_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Var_Expr_5.Parent; 
--# expr-done 1927
Is_A_2 := Fld_19 /= null 
and then Fld_19.Kind in Ada_Base_Package_Decl; 
--# expr-done 1928
Scope_Result_10 := Is_A_2;
   --# end
   Result_Var_8 := Scope_Result_10;
else
   Result_Var_8 := False;
end if;
   If_Result_3 := Result_Var_8;
else
   If_Result_3 := False;
end if;
--# expr-done 1929
if If_Result_3 then
   If_Result_4 := True;
else
--# expr-start 1930 '<Cast to TypeDecl at nodes.lkt:3514:21>' Cast_Result_5 ada/nodes.lkt:3514
Cast_Expr_1 := Local_Final_Type; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Type_Decl
   then
      Cast_Result_5 := Create_Internal_Entity_Type_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_5 := No_Entity_Type_Decl;
   end if;
--# expr-done 1930
Var_Expr_52 := Cast_Result_5;
if Var_Expr_52 /= No_Entity_Type_Decl then
   --# scope-start
--# expr-start 1931 '<FieldAccess for is_derived_tagged_type at nodes.lkt:3514:21>' Fld_20 ada/nodes.lkt:3514
      if Var_Expr_52.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDecl.is_derived_tagged_type
Fld_20 := Libadalang.Implementation.Type_Decl_P_Is_Derived_Tagged_Type (Node => Var_Expr_52.Node, E_Info => Var_Expr_52.Info);
--# end
--# expr-done 1931
Scope_Result_11 := Fld_20;
   --# end
   Result_Var_9 := Scope_Result_11;
else
   Result_Var_9 := False;
end if;
   If_Result_4 := Result_Var_9;
end if;
--# expr-done 1932
if If_Result_4 then
   --# expr-start 1934 '<Not at nodes.lkt:3519:17>' Not_Val_1 ada/nodes.lkt:3519
Var_Expr_53 := Local_Final_Type;
if Var_Expr_53 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1933 '<FieldAccess for is_classwide at nodes.lkt:3519:21>' Fld_21 ada/nodes.lkt:3519
      if Var_Expr_53.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_21 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Var_Expr_53.Node, E_Info => Var_Expr_53.Info);
--# end
--# expr-done 1933
Scope_Result_12 := Fld_21;
   --# end
   Result_Var_10 := Scope_Result_12;
else
   Result_Var_10 := False;
end if;
Not_Val_1 := not (Result_Var_10); 
--# expr-done 1934
   If_Result_5 := Not_Val_1;
else
   If_Result_5 := False;
end if;
--# expr-done 1935
if If_Result_5 then
Var_Expr_6 := Local_Type_Scope;
if Var_Expr_6 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind ds Var_Expr_6
Cast_Expr_2 := Local_Decl_Scope; 
      Cast_Result_6 := Cast_Expr_2;
Is_Equal_1 := Var_Expr_6 = Cast_Result_6; 
if Is_Equal_1 then
   If_Result_6 := True;
else
--# expr-start 1937 '<Cast to BasePackageDecl at nodes.lkt:3528:27>' Cast_Result_7 ada/nodes.lkt:3528
Var_Expr_54 := Local_Decl_Scope;
if Var_Expr_54 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 1936 '<parent at nodes.lkt:3528:27>' Fld_22 ada/nodes.lkt:3528
      if Var_Expr_54 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Var_Expr_54.Parent; 
--# expr-done 1936
Scope_Result_13 := Fld_22;
   --# end
   Result_Var_11 := Scope_Result_13;
else
   Result_Var_11 := No_Bare_Ada_Node;
end if;
   if Result_Var_11 = null
      or else Result_Var_11.Kind in Ada_Base_Package_Decl
   then
      Cast_Result_7 := Result_Var_11;
   else
         Cast_Result_7 := No_Bare_Ada_Node;
   end if;
--# expr-done 1937
Var_Expr_55 := Cast_Result_7;
if Var_Expr_55 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 1938 '<FieldAccess for public_part at nodes.lkt:3528:27>' Fld_23 ada/nodes.lkt:3528
      if Var_Expr_55 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Var_Expr_55.Base_Package_Decl_F_Public_Part;
--# expr-done 1938
Scope_Result_14 := Fld_23;
   --# end
   Result_Var_12 := Scope_Result_14;
else
   Result_Var_12 := No_Bare_Ada_Node;
end if;
      Cast_Result_8 := Result_Var_12;
Is_Equal := Var_Expr_6 = Cast_Result_8; 
   If_Result_6 := Is_Equal;
end if;
Scope_Result_15 := If_Result_6;
   --# end
   Result_Var_13 := Scope_Result_15;
else
   Result_Var_13 := False;
end if;
   If_Result_7 := Result_Var_13;
else
   If_Result_7 := False;
end if;
--# expr-done 1939
if If_Result_7 then
   If_Result_8 := Local_Final_Type;
else
   If_Result_8 := No_Entity_Base_Type_Decl;
end if;
--# expr-done 1940
Let_Result_2 := If_Result_8; 
--# end
--# expr-done 1941
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 1942
Let_Result_4 := Let_Result_3; 
--# end
--# expr-done 1943
Let_Result_5 := Let_Result_4; 
--# end
--# expr-done 1944
Let_Result_6 := Let_Result_5; 
--# end
--# expr-done 1945
         Property_Result := Let_Result_6;
   --# end
      Finalizer_Scope_340;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_340;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Get_Candidate_Type_For_Primitive;
--# end
--# property-start BaseSubpSpec.candidate_primitive_subp_types ada/nodes.lkt:3539
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Candidate_Primitive_Subp_Types
  (Node : Bare_Base_Subp_Spec
      ; Canonicalize : Boolean
         := True
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind canonicalize Canonicalize
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_341 with Inline_Always;
            procedure Finalizer_Scope_2181 with Inline_Always;
      Local_Params : Internal_Entity_Defining_Name_Array_Access;
Local_Types : Internal_Entity_Type_Expr_Array_Access;
Var_Expr_1 : Internal_Entity_Type_Expr;
Var_Expr_5 : Internal_Entity_Incomplete_Type_Decl;
Fld : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl;
Fld_2 : Internal_Entity_Type_Expr;
Map_Result : Internal_Entity_Type_Expr_Array_Access;
Fld_3 : Internal_Entity_Type_Expr;
Array_Lit : Internal_Entity_Type_Expr_Array_Access;
Scope_Result : Internal_Entity_Type_Expr_Array_Access;
Result_Var : Internal_Entity_Type_Expr_Array_Access;
Concat_Result : Internal_Entity_Type_Expr_Array_Access;
Fld_4 : Internal_Entity_Base_Type_Decl;
Map_Result_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Is_Null : Boolean;
Not_Val : Boolean;
Map_Result_2 : Internal_Entity_Base_Type_Decl_Array_Access;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Incomplete_Type_Decl;
Fld_5 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Map_Result_3 : Internal_Entity_Base_Type_Decl_Array_Access;
Unique_Array : Internal_Entity_Base_Type_Decl_Array_Access;
Let_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_341 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Params);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Local_Types);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_341;
            procedure Finalizer_Scope_2181 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2181;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Subp_Spec_Base_Subp_Spec_P_Candidate_Primitive_Subp_Types,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Subp_Spec,
                                As_Bare_Base_Subp_Spec => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Canonicalize);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1962 '<Let at nodes.lkt:3544:9>' Let_Result_1 ada/nodes.lkt:3544
--# scope-start
--# expr-start 1946 '<FieldAccess for unpacked_formal_params at nodes.lkt:3544:22>' Fld ada/nodes.lkt:3544
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1946
Local_Params := Fld; Inc_Ref (Local_Params);
--# bind params Local_Params
--# expr-start 1961 '<Let at nodes.lkt:3545:9>' Let_Result ada/nodes.lkt:3545
--# scope-start
--# expr-start 1949 '<Map at nodes.lkt:3546:13>' Map_Result ada/nodes.lkt:3546
      declare
         Map_Result_Vec : Internal_Entity_Type_Expr_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Local_Params;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 1948 '<FieldAccess for type_expression at nodes.lkt:3546:31>' Fld_2 ada/nodes.lkt:3546
--# expr-start 1947 '<FieldAccess for formal_decl at nodes.lkt:3546:31>' Fld_1 ada/nodes.lkt:3546
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 1947
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 1948
         declare
            Item_To_Append : constant Internal_Entity_Type_Expr := Fld_2;
         begin
            Internal_Entity_Type_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Type_Expr_Array
           (Items_Count => Natural (Internal_Entity_Type_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Type_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Type_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Type_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1949
--# expr-start 1950 '<FieldAccess for returns at nodes.lkt:3547:15>' Fld_3 ada/nodes.lkt:3547
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1950
Var_Expr_1 := Fld_3;
if Var_Expr_1 /= No_Entity_Type_Expr then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 1951 '<ArrayLiteral at nodes.lkt:3547:41>' Array_Lit ada/nodes.lkt:3547
Array_Lit := Create_Internal_Entity_Type_Expr_Array (Internal_Internal_Entity_Type_Expr_Array'(1 => Var_Expr_1)); 
--# expr-done 1951
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2181;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Type_Expr_Array_Type;
end if;
      Inc_Ref (Result_Var);
Concat_Result := Concat (Map_Result, Result_Var); 
Local_Types := Concat_Result; Inc_Ref (Local_Types);
--# bind types Local_Types
--# expr-start 1960 '<unique at nodes.lkt:3549:9>' Unique_Array ada/nodes.lkt:3549
--# expr-start 1959 '<Map at nodes.lkt:3549:9>' Map_Result_3 ada/nodes.lkt:3549
   --# expr-start 1956 '<Map at nodes.lkt:3549:9>' Map_Result_2 ada/nodes.lkt:3549
   --# expr-start 1953 '<Map at nodes.lkt:3549:9>' Map_Result_1 ada/nodes.lkt:3549
      declare
         Map_Result_1_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Type_Expr_Array_Access := Local_Types;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_2
      --# expr-start 1952 '<FieldAccess for get_candidate_type_for_primitive at nodes.lkt:3551:13>' Fld_4 ada/nodes.lkt:3551
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.get_candidate_type_for_primitive
Fld_4 := Libadalang.Implementation.Base_Subp_Spec_P_Get_Candidate_Type_For_Primitive (Node => Ent.Node, Type_Expr => Item_2, Canonicalize => Canonicalize, E_Info => Ent.Info);
--# end
--# expr-done 1952
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Fld_4;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 1953
      declare
         Map_Result_2_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Map_Result_1;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_3
         --# expr-start 1955 '<Not at nodes.lkt:3553:24>' Not_Val ada/nodes.lkt:3553
--# expr-start 1954 '<IsNull at nodes.lkt:3553:28>' Is_Null ada/nodes.lkt:3553
Is_Null := Item_3.Node = null; 
--# expr-done 1954
Not_Val := not (Is_Null); 
--# expr-done 1955
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Item_3;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 1956
      declare
         Map_Result_3_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Map_Result_2;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_4
--# expr-start 1957 '<Cast to IncompleteTypeDecl at nodes.lkt:3556:13>' Cast_Result ada/nodes.lkt:3556
Cast_Expr := Item_4; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Incomplete_Type_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Incomplete_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Incomplete_Type_Decl;
   end if;
--# expr-done 1957
Var_Expr_5 := Cast_Result;
if Var_Expr_5 /= No_Entity_Incomplete_Type_Decl then
   --# scope-start
   --# bind i Var_Expr_5
--# expr-start 1958 '<FieldAccess for next_part at nodes.lkt:3556:48>' Fld_5 ada/nodes.lkt:3556
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.next_part
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Next_Part (Node => Var_Expr_5.Node, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 1958
Scope_Result_1 := Fld_5;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Item_4;
end if;
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Result_Var_1;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_3 := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 1959
Unique_Array := Make_Unique (Map_Result_3); 
--# expr-done 1960
Let_Result := Unique_Array; Inc_Ref (Let_Result);
--# end
--# expr-done 1961
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 1962
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_341;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_341;
                     Finalizer_Scope_2181;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl_Array_Access,
                        As_Internal_Entity_Base_Type_Decl_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Subp_Spec_P_Candidate_Primitive_Subp_Types;
--# end
--# property-start BaseSubpSpec.candidate_primitive_subp_first_type ada/nodes.lkt:3563
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Candidate_Primitive_Subp_First_Type
  (Node : Bare_Base_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_342 with Inline_Always;
            procedure Finalizer_Scope_2186 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld : Internal_Entity_Base_Type_Decl_Array_Access;
Get_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_342 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_342;
            procedure Finalizer_Scope_2186 is
            begin
                     Dec_Ref (Var_Expr_0);
            end Finalizer_Scope_2186;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 1963 '<FieldAccess for candidate_primitive_subp_types at nodes.lkt:3564:9>' Fld ada/nodes.lkt:3564
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_types
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_Types (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1963
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= No_Internal_Entity_Base_Type_Decl_Array_Type then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 1964 '<at at nodes.lkt:3564:57>' Get_Result ada/nodes.lkt:3564
Get_Result := Get (Self, Var_Expr_0, 0, True); 
--# expr-done 1964
Scope_Result := Get_Result;
   --# end
      Finalizer_Scope_2186;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      Finalizer_Scope_342;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_342;
                     Finalizer_Scope_2186;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Candidate_Primitive_Subp_First_Type;
--# end
--# property-start BaseSubpSpec.candidate_primitive_subp_tagged_type ada/nodes.lkt:3570
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Candidate_Primitive_Subp_Tagged_Type
  (Node : Bare_Base_Subp_Spec
      ; Canonicalize : Boolean
         := True
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind canonicalize Canonicalize
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_343 with Inline_Always;
      Cast_Expr : Bare_Base_Subp_Spec;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
Find_Result : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_343 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_343;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Subp_Spec_Base_Subp_Spec_P_Candidate_Primitive_Subp_Tagged_Type,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Subp_Spec,
                                As_Bare_Base_Subp_Spec => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Canonicalize);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 1969 '<bind at nodes.lkt:3573:9>' Dyn_Var_Bind_Result ada/nodes.lkt:3573
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 1968 '<Find at nodes.lkt:3575:9>' Find_Result ada/nodes.lkt:3575
   --# expr-start 1965 '<FieldAccess for candidate_primitive_subp_types at nodes.lkt:3575:9>' Fld ada/nodes.lkt:3575
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_types
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_Types (Node => Ent.Node, Canonicalize => Canonicalize, E_Info => Ent.Info);
--# end
--# expr-done 1965
      Find_Result := No_Entity_Base_Type_Decl;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 1967 '<FieldAccess for is_tagged_type at nodes.lkt:3576:20>' Fld_2 ada/nodes.lkt:3576
--# expr-start 1966 '<FieldAccess for full_view at nodes.lkt:3576:20>' Fld_1 ada/nodes.lkt:3576
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.full_view
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Full_View (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 1966
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_tagged_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Tagged_Type (Node => Fld_1.Node, Origin => Bound_Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 1967
      if Fld_2 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Fld_2;
         end loop;
      end;
--# expr-done 1968
Dyn_Var_Bind_Result := Find_Result; 
--# expr-done 1969
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      Finalizer_Scope_343;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_343;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Subp_Spec_P_Candidate_Primitive_Subp_Tagged_Type;
--# end
--# property-start BaseSubpSpec.decl_spec ada/nodes.lkt:3588
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Decl_Spec
  (Node : Bare_Base_Subp_Spec
      ; Follow_Generic : Boolean
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind follow_generic Follow_Generic
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Base_Subp_Spec;
      Local_Bd : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Entity_Basic_Decl;
Var_Expr_56 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Base_Subp_Spec;
Not_Val : Boolean;
Is_A : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Base_Subp_Spec;
Scope_Result_1 : Internal_Entity_Base_Subp_Spec;
Result_Var_1 : Internal_Entity_Base_Subp_Spec;
Scope_Result_2 : Internal_Entity_Base_Subp_Spec;
Result_Var_2 : Internal_Entity_Base_Subp_Spec;
Let_Result : Internal_Entity_Base_Subp_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1978 '<Let at nodes.lkt:3591:9>' Let_Result ada/nodes.lkt:3591
--# scope-start
--# expr-start 1970 '<FieldAccess for name at nodes.lkt:3591:18>' Fld ada/nodes.lkt:3591
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1970
Var_Expr_56 := Fld;
if Var_Expr_56 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 1971 '<FieldAccess for basic_decl at nodes.lkt:3591:18>' Fld_1 ada/nodes.lkt:3591
      if Var_Expr_56.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Var_Expr_56.Node, E_Info => Var_Expr_56.Info);
--# end
--# expr-done 1971
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
Local_Bd := Result_Var; 
--# bind bd Local_Bd
Var_Expr_0 := Local_Bd;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind bd Var_Expr_0
--# expr-start 1972 '<FieldAccess for canonical_part at nodes.lkt:3595:13>' Fld_2 ada/nodes.lkt:3595
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1972
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind dp Var_Expr_1
--# expr-start 1977 '<If at nodes.lkt:3597:17>' If_Result_1 ada/nodes.lkt:3597
--# expr-start 1975 '<BooleanBinaryOp And at nodes.lkt:3597:20>' If_Result ada/nodes.lkt:3597
--# expr-start 1973 '<Not at nodes.lkt:3597:20>' Not_Val ada/nodes.lkt:3597
Not_Val := not (Follow_Generic); 
--# expr-done 1973
if Not_Val then
   --# expr-start 1974 '<IsA GenericSubpInternal at nodes.lkt:3597:43>' Is_A ada/nodes.lkt:3597
Is_A := Var_Expr_1.Node /= null 
and then Var_Expr_1.Node.Kind in Ada_Generic_Subp_Internal_Range; 
--# expr-done 1974
   If_Result := Is_A;
else
   If_Result := False;
end if;
--# expr-done 1975
if If_Result then
   If_Result_1 := No_Entity_Base_Subp_Spec;
else
   --# expr-start 1976 '<FieldAccess for subp_spec_or_null at nodes.lkt:3599:22>' Fld_3 ada/nodes.lkt:3599
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_1.Node, Follow_Generic => Follow_Generic, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 1976
   If_Result_1 := Fld_3;
end if;
--# expr-done 1977
Scope_Result_1 := If_Result_1;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Ent;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Ent;
end if;
Let_Result := Result_Var_2; 
--# end
--# expr-done 1978
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Decl_Spec;
--# end
--# property-start BaseSubpSpec.primitive_decl_spec ada/nodes.lkt:3610
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Primitive_Decl_Spec
  (Node : Bare_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Base_Subp_Spec;
      Fld : Internal_Entity_Base_Subp_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 1979 '<FieldAccess for decl_spec at nodes.lkt:3611:9>' Fld ada/nodes.lkt:3611
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.decl_spec
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Decl_Spec (Node => Ent.Node, Follow_Generic => False, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 1979
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Primitive_Decl_Spec;
--# end
--# property-start BaseSubpSpec.as_primitive_subp_type ada/nodes.lkt:3618
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_As_Primitive_Subp_Type
  (Node : Bare_Base_Subp_Spec
      ; Typ : Internal_Entity_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_2192 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Defining_Name;
Var_Expr_2 : Boolean;
Var_Expr_57 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Fld_3 : Bare_Ada_Node;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Bare_Basic_Decl;
Cast_Result : Bare_Ada_Node;
Is_Equal : Boolean;
Quantifier_Result : Boolean;
Fld_6 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_2192 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Env_Get_Result);
            end Finalizer_Scope_2192;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 1980 '<FieldAccess for name at nodes.lkt:3622:9>' Fld ada/nodes.lkt:3622
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 1980
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind name Var_Expr_0
Var_Expr_57 := Typ;
if Var_Expr_57 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 1988 '<AnyQuantifier at nodes.lkt:3624:13>' Quantifier_Result ada/nodes.lkt:3624
   --# expr-start 1983 '<EnvGet at nodes.lkt:3624:13>' Env_Get_Result ada/nodes.lkt:3624
--# expr-start 1981 '<FieldAccess for primitives_env at nodes.lkt:3624:13>' Fld_1 ada/nodes.lkt:3624
      if Var_Expr_57.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.primitives_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Primitives_Env (Node => Var_Expr_57.Node, E_Info => Var_Expr_57.Info);
--# end
--# expr-done 1981
--# expr-start 1982 '<FieldAccess for name_symbol at nodes.lkt:3624:39>' Fld_2 ada/nodes.lkt:3624
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Var_Expr_0.Node);
--# end
--# expr-done 1982
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_1, Key => Thin (Fld_2), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 1983
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind b Item_1
      --# expr-start 1987 '<Eq at nodes.lkt:3625:24>' Is_Equal ada/nodes.lkt:3625
--# expr-start 1984 '<FieldAccess for node at nodes.lkt:3625:24>' Fld_3 ada/nodes.lkt:3625
Fld_3 := Item_1.Node;
--# expr-done 1984
--# expr-start 1986 '<FieldAccess for node at nodes.lkt:3625:34>' Fld_5 ada/nodes.lkt:3625
--# expr-start 1985 '<FieldAccess for basic_decl at nodes.lkt:3625:34>' Fld_4 ada/nodes.lkt:3625
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_4 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1985
Fld_5 := Fld_4.Node;
--# expr-done 1986
      Cast_Result := Fld_5;
Is_Equal := Fld_3 = Cast_Result; 
--# expr-done 1987
      Quantifier_Result := Is_Equal;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 1988
Var_Expr_2 := Quantifier_Result;
if Var_Expr_2 /= False then
   --# scope-start
   --# bind _ Var_Expr_2
--# expr-start 1989 '<FieldAccess for real_type at nodes.lkt:3634:24>' Fld_6 ada/nodes.lkt:3634
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.real_type
Fld_6 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Real_Type (Node => Ent.Node, Typ => Typ, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 1989
Scope_Result := Fld_6;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Scope_Result_1 := Result_Var;
   --# end
      Finalizer_Scope_2192;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2192;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_As_Primitive_Subp_Type;
--# end
--# property-start BaseSubpSpec.primitive_subp_types ada/nodes.lkt:3641
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Primitive_Subp_Types
  (Node : Bare_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_347 with Inline_Always;
            procedure Finalizer_Scope_2195 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_2 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_347 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_347;
            procedure Finalizer_Scope_2195 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2195;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 1990 '<FieldAccess for primitive_decl_spec at nodes.lkt:3642:9>' Fld ada/nodes.lkt:3642
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.primitive_decl_spec
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Primitive_Decl_Spec (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 1990
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 1995 '<Map at nodes.lkt:3644:13>' Map_Result ada/nodes.lkt:3644
   --# expr-start 1991 '<FieldAccess for candidate_primitive_subp_types at nodes.lkt:3644:13>' Fld_1 ada/nodes.lkt:3644
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_types
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_Types (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1991
      declare
         Map_Result_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld_1;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind c Item_1
         --# expr-start 1994 '<Not at nodes.lkt:3645:24>' Not_Val ada/nodes.lkt:3645
--# expr-start 1993 '<IsNull at nodes.lkt:3645:28>' Is_Null ada/nodes.lkt:3645
--# expr-start 1992 '<FieldAccess for as_primitive_subp_type at nodes.lkt:3645:28>' Fld_2 ada/nodes.lkt:3645
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.as_primitive_subp_type
Fld_2 := Libadalang.Implementation.Base_Subp_Spec_P_As_Primitive_Subp_Type (Node => Var_Expr_0.Node, Typ => Item_1, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1992
Is_Null := Fld_2.Node = null; 
--# expr-done 1993
Not_Val := not (Is_Null); 
--# expr-done 1994
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Item_1;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 1995
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2195;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_347;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_347;
                     Finalizer_Scope_2195;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Primitive_Subp_Types;
--# end
--# property-start BaseSubpSpec.primitive_subp_first_type ada/nodes.lkt:3652
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Primitive_Subp_First_Type
  (Node : Bare_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 1996 '<FieldAccess for primitive_decl_spec at nodes.lkt:3653:9>' Fld ada/nodes.lkt:3653
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.primitive_decl_spec
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Primitive_Decl_Spec (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 1996
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 1998 '<FieldAccess for as_primitive_subp_type at nodes.lkt:3655:13>' Fld_2 ada/nodes.lkt:3655
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 1997 '<FieldAccess for candidate_primitive_subp_first_type at nodes.lkt:3656:17>' Fld_1 ada/nodes.lkt:3656
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_first_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_First_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1997
--# property-call-start BaseSubpSpec.as_primitive_subp_type
Fld_2 := Libadalang.Implementation.Base_Subp_Spec_P_As_Primitive_Subp_Type (Node => Var_Expr_0.Node, Typ => Fld_1, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 1998
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Primitive_Subp_First_Type;
--# end
--# property-start BaseSubpSpec.primitive_subp_tagged_type ada/nodes.lkt:3664
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Primitive_Subp_Tagged_Type
  (Node : Bare_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 1999 '<FieldAccess for primitive_decl_spec at nodes.lkt:3665:9>' Fld ada/nodes.lkt:3665
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.primitive_decl_spec
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Primitive_Decl_Spec (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 1999
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 2001 '<FieldAccess for as_primitive_subp_type at nodes.lkt:3667:13>' Fld_2 ada/nodes.lkt:3667
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2000 '<FieldAccess for candidate_primitive_subp_tagged_type at nodes.lkt:3668:17>' Fld_1 ada/nodes.lkt:3668
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_tagged_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_Tagged_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2000
--# property-call-start BaseSubpSpec.as_primitive_subp_type
Fld_2 := Libadalang.Implementation.Base_Subp_Spec_P_As_Primitive_Subp_Type (Node => Var_Expr_0.Node, Typ => Fld_1, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2001
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Primitive_Subp_Tagged_Type;
--# end
--# property-start BaseSubpSpec.has_controlling_result ada/nodes.lkt:3676
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Has_Controlling_Result
  (Node : Bare_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2008 '<Let at nodes.lkt:3677:9>' Let_Result ada/nodes.lkt:3677
--# scope-start
--# expr-start 2002 '<FieldAccess for candidate_primitive_subp_tagged_type at nodes.lkt:3677:19>' Fld ada/nodes.lkt:3677
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_tagged_type
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_Tagged_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2002
Local_Typ := Fld; 
--# bind typ Local_Typ
--# expr-start 2007 '<BooleanBinaryOp And at nodes.lkt:3679:9>' If_Result ada/nodes.lkt:3679
--# expr-start 2004 '<Not at nodes.lkt:3679:9>' Not_Val ada/nodes.lkt:3679
--# expr-start 2003 '<IsNull at nodes.lkt:3679:13>' Is_Null ada/nodes.lkt:3679
Is_Null := Local_Typ.Node = null; 
--# expr-done 2003
Not_Val := not (Is_Null); 
--# expr-done 2004
if Not_Val then
   --# expr-start 2006 '<Eq at nodes.lkt:3679:29>' Is_Equiv ada/nodes.lkt:3679
Cast_Expr := Local_Typ; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 2005 '<FieldAccess for return_type at nodes.lkt:3679:36>' Fld_1 ada/nodes.lkt:3679
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Ent.Node, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 2005
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 2006
   If_Result := Is_Equiv;
else
   If_Result := False;
end if;
--# expr-done 2007
Let_Result := If_Result; 
--# end
--# expr-done 2008
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Has_Controlling_Result;
--# end
--# property-start BaseSubpSpec.dottable_subp_of ada/nodes.lkt:3688
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Dottable_Subp_Of
  (Node : Bare_Base_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_58 : Internal_Entity_Base_Type_Decl;
Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Fld_3 : Integer;
Comp_Result : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Subp_Spec_Base_Subp_Spec_P_Dottable_Subp_Of,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Subp_Spec,
                                As_Bare_Base_Subp_Spec => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 2014 '<bind at nodes.lkt:3691:9>' Dyn_Var_Bind_Result ada/nodes.lkt:3691
--# expr-start 2009 '<FieldAccess for origin_node at nodes.lkt:3691:23>' Fld ada/nodes.lkt:3691
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 2009
Bound_Origin := Fld; 
--# expr-start 2013 '<If at nodes.lkt:3693:9>' If_Result ada/nodes.lkt:3693
--# expr-start 2010 '<FieldAccess for nb_max_params at nodes.lkt:3693:12>' Fld_3 ada/nodes.lkt:3693
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.nb_max_params
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Nb_Max_Params (Node => Ent.Node);
--# end
--# expr-done 2010
Comp_Result := Fld_3 > 0; 
if Comp_Result then
--# expr-start 2011 '<FieldAccess for potential_dottable_type at nodes.lkt:3694:14>' Fld_1 ada/nodes.lkt:3694
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.potential_dottable_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Potential_Dottable_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 2011
Var_Expr_58 := Fld_1;
if Var_Expr_58 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 2012 '<FieldAccess for specific_type at nodes.lkt:3694:14>' Fld_2 ada/nodes.lkt:3694
      if Var_Expr_58.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Var_Expr_58.Node, E_Info => Var_Expr_58.Info);
--# end
--# expr-done 2012
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
   If_Result := Result_Var;
else
   If_Result := No_Entity_Base_Type_Decl;
end if;
--# expr-done 2013
Dyn_Var_Bind_Result := If_Result; 
--# expr-done 2014
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Subp_Spec_P_Dottable_Subp_Of;
--# end
--# property-start BaseSubpSpec.return_type ada/nodes.lkt:3702
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Return_Type
  (Node : Bare_Base_Subp_Spec
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_Type_Expr;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2015 '<FieldAccess for returns at nodes.lkt:3703:9>' Fld ada/nodes.lkt:3703
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2015
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Type_Expr then
   --# scope-start
   --# bind rt Var_Expr_0
--# expr-start 2016 '<FieldAccess for real_designated_type at nodes.lkt:3703:35>' Fld_1 ada/nodes.lkt:3703
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.real_designated_type
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Real_Designated_Type (Node => Ent.Node, Typ => Var_Expr_0, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 2016
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Return_Type;
--# end
--# property-start BaseSubpSpec.xref_entry_point ada/nodes.lkt:3705
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Xref_Entry_Point
  (Node : Bare_Base_Subp_Spec
  )
   return Boolean
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Xref_Entry_Point;
--# end
--# property-start BaseSubpSpec.xref_equation ada/nodes.lkt:3708
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Xref_Equation
  (Node : Bare_Base_Subp_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
     Ent : Internal_Entity_Base_Subp_Spec :=
       Internal_Entity_Base_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_354 with Inline_Always;
            procedure Finalizer_Scope_2201 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_Type_Expr;
Fld_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_354 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_354;
            procedure Finalizer_Scope_2201 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2201;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 2017 '<FieldAccess for returns at nodes.lkt:3709:9>' Fld ada/nodes.lkt:3709
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2017
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Type_Expr then
   --# scope-start
   --# bind r Var_Expr_0
--# expr-start 2018 '<FieldAccess for sub_equation at nodes.lkt:3709:34>' Fld_1 ada/nodes.lkt:3709
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2018
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2201;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:3709:64") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_354;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_354;
                     Finalizer_Scope_2201;
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Xref_Equation;
--# end
--# property-start '[dispatcher]BaseSubpSpec.params' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Subp_Spec_P_Params
  (Node : Bare_Base_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Param_Spec_Array_Access
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Param_Spec_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Subp_Spec (Self.Kind) is
               when Ada_Synthetic_Binary_Spec .. Ada_Synthetic_Unary_Spec =>
                  --# property-call-start BaseSubpSpec.params
                  Property_Result := Base_Subp_Spec_P_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Spec =>
                  --# property-call-start EntrySpec.params
                  Property_Result := Entry_Spec_P_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Subp_Spec =>
                  --# property-call-start EnumSubpSpec.params
                  Property_Result := Enum_Subp_Spec_P_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subp_Spec =>
                  --# property-call-start SubpSpec.params
                  Property_Result := Subp_Spec_P_Params
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Subp_Spec_P_Params;
--# end
--# property-start BaseSubpSpec.params ada/nodes.lkt:3713
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Spec_P_Params
  (Node : Bare_Base_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Param_Spec_Array_Access
is
   Self : Bare_Base_Subp_Spec  := Bare_Base_Subp_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Param_Spec_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property BaseSubpSpec.params not implemented";
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Spec_P_Params;
--# end
   --
   --  Primitives for Bare_Entry_Spec
   --
      procedure Initialize_Fields_For_Entry_Spec
        (Self : Bare_Entry_Spec
         ; Entry_Spec_F_Entry_Name : Bare_Defining_Name
         ; Entry_Spec_F_Family_Type : Bare_Ada_Node
         ; Entry_Spec_F_Entry_Params : Bare_Params
        ) is
      begin
            Self.Entry_Spec_F_Entry_Name := Entry_Spec_F_Entry_Name;
            Self.Entry_Spec_F_Family_Type := Entry_Spec_F_Family_Type;
            Self.Entry_Spec_F_Entry_Params := Entry_Spec_F_Entry_Params;
      end Initialize_Fields_For_Entry_Spec;
   function Entry_Spec_F_Entry_Name
     (Node : Bare_Entry_Spec) return Bare_Defining_Name
   is
   begin
         return Node.Entry_Spec_F_Entry_Name;
   end;
   function Entry_Spec_F_Family_Type
     (Node : Bare_Entry_Spec) return Bare_Ada_Node
   is
   begin
         return Node.Entry_Spec_F_Family_Type;
   end;
   function Entry_Spec_F_Entry_Params
     (Node : Bare_Entry_Spec) return Bare_Params
   is
   begin
         return Node.Entry_Spec_F_Entry_Params;
   end;
--# property-start EntrySpec.name ada/nodes.lkt:3735
pragma Warnings (Off, "is not referenced");
 function Entry_Spec_P_Name
  (Node : Bare_Entry_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Entry_Spec  := Bare_Entry_Spec (Node);
     Ent : Internal_Entity_Entry_Spec :=
       Internal_Entity_Entry_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2019 '<FieldAccess for entry_name at nodes.lkt:3735:40>' Fld ada/nodes.lkt:3735
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Entry_Spec_F_Entry_Name, Info => Ent.Info);
--# expr-done 2019
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Spec_P_Name;
--# end
--# property-start EntrySpec.params ada/nodes.lkt:3737
pragma Warnings (Off, "is not referenced");
 function Entry_Spec_P_Params
  (Node : Bare_Entry_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Param_Spec_Array_Access
is
   Self : Bare_Entry_Spec  := Bare_Entry_Spec (Node);
     Ent : Internal_Entity_Entry_Spec :=
       Internal_Entity_Entry_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Param_Spec_Array_Access;
            procedure Finalizer_Scope_357 with Inline_Always;
            procedure Finalizer_Scope_2202 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Params;
Fld : Internal_Entity_Params;
Fld_1 : Internal_Entity_Param_Spec_List;
Fld_2 : Bare_Param_Spec_List;
Fld_3 : Internal_Entity_Info;
Item_1 : Internal_Entity_Param_Spec;
Bare_Item_1 : Bare_Param_Spec;
As_Entity : Internal_Entity_Param_Spec;
Is_Null : Boolean;
If_Result : Internal_Entity_Param_Spec;
Map_Result : Internal_Entity_Param_Spec_Array_Access;
Scope_Result : Internal_Entity_Param_Spec_Array_Access;
Result_Var : Internal_Entity_Param_Spec_Array_Access;
            procedure Finalizer_Scope_357 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_357;
            procedure Finalizer_Scope_2202 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2202;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 2020 '<FieldAccess for entry_params at nodes.lkt:3738:9>' Fld ada/nodes.lkt:3738
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Params (Node => Ent.Node.Entry_Spec_F_Entry_Params, Info => Ent.Info);
--# expr-done 2020
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Params then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 2022 '<Map at nodes.lkt:3739:20>' Map_Result ada/nodes.lkt:3739
   --# expr-start 2021 '<FieldAccess for params at nodes.lkt:3739:20>' Fld_1 ada/nodes.lkt:3739
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Param_Spec_List (Node => Var_Expr_0.Node.Params_F_Params, Info => Var_Expr_0.Info);
--# expr-done 2021
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Internal_Entity_Param_Spec_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Internal_Entity_Param_Spec_Array (0);
      else
      declare
         Collection : constant Bare_Param_Spec_List := Fld_2;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Param_Spec;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind p Item_1
         declare
            Item_To_Append : constant Internal_Entity_Param_Spec := Item_1;
         begin
            Internal_Entity_Param_Spec_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Param_Spec_Array
           (Items_Count => Natural (Internal_Entity_Param_Spec_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Param_Spec_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Param_Spec_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Param_Spec_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2022
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2202;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Param_Spec_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_357;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_357;
                     Finalizer_Scope_2202;
            raise;
      end;
   return Property_Result;
end Entry_Spec_P_Params;
--# end
--# property-start EntrySpec.returns ada/nodes.lkt:3743
pragma Warnings (Off, "is not referenced");
 function Entry_Spec_P_Returns
  (Node : Bare_Entry_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Entry_Spec  := Bare_Entry_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Type_Expr;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Spec_P_Returns;
--# end
--# property-start EntrySpec.xref_equation ada/nodes.lkt:3746
pragma Warnings (Off, "is not referenced");
 function Entry_Spec_P_Xref_Equation
  (Node : Bare_Entry_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Entry_Spec  := Bare_Entry_Spec (Node);
     Ent : Internal_Entity_Entry_Spec :=
       Internal_Entity_Entry_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_359 with Inline_Always;
            procedure Finalizer_Scope_2204 with Inline_Always;
      Var_Expr_0 : Internal_Entity;
Fld : Internal_Entity;
Fld_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_359 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_359;
            procedure Finalizer_Scope_2204 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2204;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 2023 '<FieldAccess for family_type at nodes.lkt:3747:9>' Fld ada/nodes.lkt:3747
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Ent.Node.Entry_Spec_F_Family_Type, Info => Ent.Info);
--# expr-done 2023
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity then
   --# scope-start
   --# bind r Var_Expr_0
--# expr-start 2024 '<FieldAccess for sub_equation at nodes.lkt:3747:36>' Fld_1 ada/nodes.lkt:3747
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2024
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2204;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:3747:66") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_359;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_359;
                     Finalizer_Scope_2204;
            raise;
      end;
   return Property_Result;
end Entry_Spec_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Enum_Subp_Spec
   --
--# property-start EnumSubpSpec.enum_decl ada/nodes.lkt:3756
pragma Warnings (Off, "is not referenced");
 function Enum_Subp_Spec_P_Enum_Decl
  (Node : Bare_Enum_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Enum_Literal_Decl
is
   Self : Bare_Enum_Subp_Spec  := Bare_Enum_Subp_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Enum_Literal_Decl;
      Fld : Bare_Ada_Node;
Cast_Result : Bare_Enum_Literal_Decl;
As_Entity : Internal_Entity_Enum_Literal_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Enum_Literal_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2027 '<as_entity at nodes.lkt:3757:9>' If_Result ada/nodes.lkt:3757
--# expr-start 2026 '<Cast to EnumLiteralDecl at nodes.lkt:3757:9>' Cast_Result ada/nodes.lkt:3757
--# expr-start 2025 '<parent at nodes.lkt:3757:9>' Fld ada/nodes.lkt:3757
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 2025
   if Fld = null
      or else Fld.Kind in Ada_Enum_Literal_Decl_Range
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 2026
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Enum_Literal_Decl;
else
As_Entity := (Info => E_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 2027
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Subp_Spec_P_Enum_Decl;
--# end
--# property-start EnumSubpSpec.name ada/nodes.lkt:3759
pragma Warnings (Off, "is not referenced");
 function Enum_Subp_Spec_P_Name
  (Node : Bare_Enum_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Enum_Subp_Spec  := Bare_Enum_Subp_Spec (Node);
     Ent : Internal_Entity_Enum_Subp_Spec :=
       Internal_Entity_Enum_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Enum_Literal_Decl;
Fld_1 : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2029 '<FieldAccess for enum_decl_name at nodes.lkt:3759:40>' Fld_1 ada/nodes.lkt:3759
--# expr-start 2028 '<FieldAccess for enum_decl at nodes.lkt:3759:40>' Fld ada/nodes.lkt:3759
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EnumSubpSpec.enum_decl
Fld := Libadalang.Implementation.Enum_Subp_Spec_P_Enum_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2028
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]EnumLiteralDecl.enum_decl_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Enum_Literal_Decl_P_Enum_Decl_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 2029
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Subp_Spec_P_Name;
--# end
--# property-start EnumSubpSpec.returns ada/nodes.lkt:3761
pragma Warnings (Off, "is not referenced");
 function Enum_Subp_Spec_P_Returns
  (Node : Bare_Enum_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Enum_Subp_Spec  := Bare_Enum_Subp_Spec (Node);
     Ent : Internal_Entity_Enum_Subp_Spec :=
       Internal_Entity_Enum_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Enum_Literal_Decl;
Fld_1 : Internal_Entity_Enum_Lit_Synth_Type_Expr;
Cast_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 2031 '<FieldAccess for synth_type_expr at nodes.lkt:3761:39>' Fld_1 ada/nodes.lkt:3761
--# expr-start 2030 '<FieldAccess for enum_decl at nodes.lkt:3761:39>' Fld ada/nodes.lkt:3761
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EnumSubpSpec.enum_decl
Fld := Libadalang.Implementation.Enum_Subp_Spec_P_Enum_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2030
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EnumLiteralDecl.synth_type_expr
Fld_1 := Libadalang.Implementation.Enum_Literal_Decl_P_Synth_Type_Expr (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 2031
      Cast_Result := Create_Internal_Entity_Type_Expr
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Subp_Spec_P_Returns;
--# end
--# property-start EnumSubpSpec.params ada/nodes.lkt:3763
pragma Warnings (Off, "is not referenced");
 function Enum_Subp_Spec_P_Params
  (Node : Bare_Enum_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Param_Spec_Array_Access
is
   Self : Bare_Enum_Subp_Spec  := Bare_Enum_Subp_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Param_Spec_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Param_Spec_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Subp_Spec_P_Params;
--# end
   --
   --  Primitives for Bare_Subp_Spec
   --
      procedure Initialize_Fields_For_Subp_Spec
        (Self : Bare_Subp_Spec
         ; Subp_Spec_F_Subp_Kind : Bare_Subp_Kind
         ; Subp_Spec_F_Subp_Name : Bare_Defining_Name
         ; Subp_Spec_F_Subp_Params : Bare_Params
         ; Subp_Spec_F_Subp_Returns : Bare_Type_Expr
        ) is
      begin
            Self.Subp_Spec_F_Subp_Kind := Subp_Spec_F_Subp_Kind;
            Self.Subp_Spec_F_Subp_Name := Subp_Spec_F_Subp_Name;
            Self.Subp_Spec_F_Subp_Params := Subp_Spec_F_Subp_Params;
            Self.Subp_Spec_F_Subp_Returns := Subp_Spec_F_Subp_Returns;
      Self.Bare_Subp_Spec_Lf_State_Synthetic_Neq_Subprogram := Uninitialized;
      Self.Bare_Subp_Spec_Lf_Stg_Synthetic_Neq_Subprogram := No_Bare_Ada_Node;
      end Initialize_Fields_For_Subp_Spec;
   function Subp_Spec_F_Subp_Kind
     (Node : Bare_Subp_Spec) return Bare_Subp_Kind
   is
   begin
         return Node.Subp_Spec_F_Subp_Kind;
   end;
   function Subp_Spec_F_Subp_Name
     (Node : Bare_Subp_Spec) return Bare_Defining_Name
   is
   begin
         return Node.Subp_Spec_F_Subp_Name;
   end;
   function Subp_Spec_F_Subp_Params
     (Node : Bare_Subp_Spec) return Bare_Params
   is
   begin
         return Node.Subp_Spec_F_Subp_Params;
   end;
   function Subp_Spec_F_Subp_Returns
     (Node : Bare_Subp_Spec) return Bare_Type_Expr
   is
   begin
         return Node.Subp_Spec_F_Subp_Returns;
   end;
--# property-start SubpSpec.name ada/nodes.lkt:3780
pragma Warnings (Off, "is not referenced");
 function Subp_Spec_P_Name
  (Node : Bare_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Subp_Spec  := Bare_Subp_Spec (Node);
     Ent : Internal_Entity_Subp_Spec :=
       Internal_Entity_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2032 '<FieldAccess for subp_name at nodes.lkt:3780:40>' Fld ada/nodes.lkt:3780
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Subp_Spec_F_Subp_Name, Info => Ent.Info);
--# expr-done 2032
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subp_Spec_P_Name;
--# end
--# property-start SubpSpec.params ada/nodes.lkt:3782
pragma Warnings (Off, "is not referenced");
 function Subp_Spec_P_Params
  (Node : Bare_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Param_Spec_Array_Access
is
   Self : Bare_Subp_Spec  := Bare_Subp_Spec (Node);
     Ent : Internal_Entity_Subp_Spec :=
       Internal_Entity_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Param_Spec_Array_Access;
            procedure Finalizer_Scope_365 with Inline_Always;
            procedure Finalizer_Scope_2205 with Inline_Always;
      Var_Expr_59 : Internal_Entity_Params;
Fld : Internal_Entity_Params;
Fld_1 : Internal_Entity_Param_Spec_List;
Fld_2 : Bare_Param_Spec_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Param_Spec;
Bare_Item_0 : Bare_Param_Spec;
As_Entity : Internal_Entity_Param_Spec;
Is_Null : Boolean;
If_Result : Internal_Entity_Param_Spec;
Map_Result : Internal_Entity_Param_Spec_Array_Access;
Scope_Result : Internal_Entity_Param_Spec_Array_Access;
Result_Var : Internal_Entity_Param_Spec_Array_Access;
            procedure Finalizer_Scope_365 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_365;
            procedure Finalizer_Scope_2205 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2205;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 2033 '<FieldAccess for subp_params at nodes.lkt:3783:9>' Fld ada/nodes.lkt:3783
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Params (Node => Ent.Node.Subp_Spec_F_Subp_Params, Info => Ent.Info);
--# expr-done 2033
Var_Expr_59 := Fld;
if Var_Expr_59 /= No_Entity_Params then
   --# scope-start
--# expr-start 2035 '<Map at nodes.lkt:3783:9>' Map_Result ada/nodes.lkt:3783
   --# expr-start 2034 '<FieldAccess for params at nodes.lkt:3783:9>' Fld_1 ada/nodes.lkt:3783
      if Var_Expr_59.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Param_Spec_List (Node => Var_Expr_59.Node.Params_F_Params, Info => Var_Expr_59.Info);
--# expr-done 2034
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Internal_Entity_Param_Spec_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Internal_Entity_Param_Spec_Array (0);
      else
      declare
         Collection : constant Bare_Param_Spec_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Param_Spec;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind p Item_0
         declare
            Item_To_Append : constant Internal_Entity_Param_Spec := Item_0;
         begin
            Internal_Entity_Param_Spec_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Param_Spec_Array
           (Items_Count => Natural (Internal_Entity_Param_Spec_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Param_Spec_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Param_Spec_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Param_Spec_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2035
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2205;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Param_Spec_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_365;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_365;
                     Finalizer_Scope_2205;
            raise;
      end;
   return Property_Result;
end Subp_Spec_P_Params;
--# end
--# property-start SubpSpec.returns ada/nodes.lkt:3785
pragma Warnings (Off, "is not referenced");
 function Subp_Spec_P_Returns
  (Node : Bare_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Subp_Spec  := Bare_Subp_Spec (Node);
     Ent : Internal_Entity_Subp_Spec :=
       Internal_Entity_Subp_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2036 '<FieldAccess for subp_returns at nodes.lkt:3785:39>' Fld ada/nodes.lkt:3785
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Subp_Spec_F_Subp_Returns, Info => Ent.Info);
--# expr-done 2036
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subp_Spec_P_Returns;
--# end
--# property-start SubpSpec.synthetic_neq_subprogram ada/nodes.lkt:3793
pragma Warnings (Off, "is not referenced");
 function Subp_Spec_F_Synthetic_Neq_Subprogram
  (Node : Bare_Subp_Spec
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Subp_Spec  := Bare_Subp_Spec (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_367 with Inline_Always;
      Local_Params : Internal_Entity_Defining_Name_Array_Access;
Local_Left_Type : Internal_Entity_Type_Expr;
Local_Right_Type : Internal_Entity_Type_Expr;
Local_Ret_Type : Bare_Type_Expr;
As_Entity : Internal_Entity_Subp_Spec;
Is_Null : Boolean;
If_Result : Internal_Entity_Subp_Spec;
Fld : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl;
Fld_2 : Internal_Entity_Type_Expr;
Get_Result_1 : Internal_Entity_Defining_Name;
Fld_3 : Internal_Entity_Base_Formal_Param_Decl;
Fld_4 : Internal_Entity_Type_Expr;
Fld_5 : Bare_Type_Expr;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Fld_6 : Bare_Type_Expr;
Builder : Bare_Type_Expr_Node_Builder;
Builder_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Sym_2 : Symbol_Type;
Fld_7 : Bare_Type_Expr;
Builder_2 : Bare_Type_Expr_Node_Builder;
Builder_3 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Builder_4 : Bare_Type_Expr_Node_Builder;
Builder_5 : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_6 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_8 : Bare_Ada_Node;
Let_Result : Bare_Synthetic_Subp_Decl;
Let_Result_1 : Bare_Synthetic_Subp_Decl;
Let_Result_2 : Bare_Synthetic_Subp_Decl;
Let_Result_3 : Bare_Synthetic_Subp_Decl;
Cast_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_367 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Params);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Builder_3);
                     Dec_Ref (Builder_4);
                     Dec_Ref (Builder_5);
                     Dec_Ref (Builder_6);
            end Finalizer_Scope_367;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Subp_Spec_Lf_State_Synthetic_Neq_Subprogram is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Subp_Spec_Lf_Stg_Synthetic_Neq_Subprogram;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Subp_Spec_Lf_State_Synthetic_Neq_Subprogram,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 2062 '<Let at nodes.lkt:3794:9>' Let_Result_3 ada/nodes.lkt:3794
--# scope-start
--# expr-start 2038 '<FieldAccess for unpacked_formal_params at nodes.lkt:3794:22>' Fld ada/nodes.lkt:3794
--# expr-start 2037 '<as_bare_entity at nodes.lkt:3794:22>' If_Result ada/nodes.lkt:3794
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Subp_Spec;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 2037
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 2038
Local_Params := Fld; Inc_Ref (Local_Params);
--# bind params Local_Params
--# expr-start 2061 '<Let at nodes.lkt:3795:9>' Let_Result_2 ada/nodes.lkt:3795
--# scope-start
--# expr-start 2041 '<FieldAccess for type_expression at nodes.lkt:3795:25>' Fld_2 ada/nodes.lkt:3795
--# expr-start 2040 '<FieldAccess for formal_decl at nodes.lkt:3795:25>' Fld_1 ada/nodes.lkt:3795
--# expr-start 2039 '<at_or_raise at nodes.lkt:3795:25>' Get_Result ada/nodes.lkt:3795
Get_Result := Get (Self, Local_Params, 0, False); 
--# expr-done 2039
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 2040
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 2041
Local_Left_Type := Fld_2; 
--# bind left_type Local_Left_Type
--# expr-start 2060 '<Let at nodes.lkt:3796:9>' Let_Result_1 ada/nodes.lkt:3796
--# scope-start
--# expr-start 2044 '<FieldAccess for type_expression at nodes.lkt:3796:26>' Fld_4 ada/nodes.lkt:3796
--# expr-start 2043 '<FieldAccess for formal_decl at nodes.lkt:3796:26>' Fld_3 ada/nodes.lkt:3796
--# expr-start 2042 '<at_or_raise at nodes.lkt:3796:26>' Get_Result_1 ada/nodes.lkt:3796
Get_Result_1 := Get (Self, Local_Params, 1, False); 
--# expr-done 2042
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_3 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 2043
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 2044
Local_Right_Type := Fld_4; 
--# bind right_type Local_Right_Type
--# expr-start 2059 '<Let at nodes.lkt:3797:9>' Let_Result ada/nodes.lkt:3797
--# scope-start
--# expr-start 2045 '<FieldAccess for subp_returns at nodes.lkt:3797:24>' Fld_5 ada/nodes.lkt:3797
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Subp_Spec_F_Subp_Returns;
--# expr-done 2045
Local_Ret_Type := Fld_5; 
--# bind ret_type Local_Ret_Type
--# expr-start 2057 '<CreateSynthNodeBuilder at nodes.lkt:3799:9>' Builder_6 ada/nodes.lkt:3799
--# expr-start 2056 '<CreateSynthNodeBuilder at nodes.lkt:3800:18>' Builder_5 ada/nodes.lkt:3800
--# expr-start 2046 '<Symbol "/=" at nodes.lkt:3801:29>' Sym ada/nodes.lkt:3801
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 2046
--# expr-start 2050 '<CreateSynthNodeBuilder at nodes.lkt:3802:28>' Builder_1 ada/nodes.lkt:3802
--# expr-start 2047 '<Symbol left at nodes.lkt:3803:32>' Sym_1 ada/nodes.lkt:3803
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Left); 
--# expr-done 2047
--# expr-start 2049 '<CreateCopyNodeBuilder at nodes.lkt:3804:32>' Builder ada/nodes.lkt:3804
--# expr-start 2048 '<FieldAccess for node at nodes.lkt:3804:32>' Fld_6 ada/nodes.lkt:3804
Fld_6 := Local_Left_Type.Node;
--# expr-done 2048
Builder := Create_Copy_Node_Builder (Fld_6); 
--# expr-done 2049
Builder_1 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym_1, Builder); 
--# expr-done 2050
--# expr-start 2054 '<CreateSynthNodeBuilder at nodes.lkt:3806:29>' Builder_3 ada/nodes.lkt:3806
--# expr-start 2051 '<Symbol right at nodes.lkt:3807:32>' Sym_2 ada/nodes.lkt:3807
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Right); 
--# expr-done 2051
--# expr-start 2053 '<CreateCopyNodeBuilder at nodes.lkt:3808:32>' Builder_2 ada/nodes.lkt:3808
--# expr-start 2052 '<FieldAccess for node at nodes.lkt:3808:32>' Fld_7 ada/nodes.lkt:3808
Fld_7 := Local_Right_Type.Node;
--# expr-done 2052
Builder_2 := Create_Copy_Node_Builder (Fld_7); 
--# expr-done 2053
Builder_3 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym_2, Builder_2); 
--# expr-done 2054
--# expr-start 2055 '<CreateCopyNodeBuilder at nodes.lkt:3810:34>' Builder_4 ada/nodes.lkt:3810
Builder_4 := Create_Copy_Node_Builder (Local_Ret_Type); 
--# expr-done 2055
Builder_5 := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Builder_1, Builder_3, Builder_4); 
--# expr-done 2056
Builder_6 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_5); 
--# expr-done 2057
--# expr-start 2058 '<parent at nodes.lkt:3812:24>' Fld_8 ada/nodes.lkt:3812
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.Parent; 
--# expr-done 2058
Let_Result := Node_Builder_Type'(Builder_6).all.Build (Parent => Fld_8, Self_Node => Self); 
--# end
--# expr-done 2059
Let_Result_1 := Let_Result; 
--# end
--# expr-done 2060
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 2061
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 2062
      Cast_Result := Let_Result_3;
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_367;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_367;
               Self.Bare_Subp_Spec_Lf_State_Synthetic_Neq_Subprogram :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Subp_Spec_Lf_State_Synthetic_Neq_Subprogram := Initialized;
      Self.Bare_Subp_Spec_Lf_Stg_Synthetic_Neq_Subprogram := Property_Result;
   return Property_Result;
end Subp_Spec_F_Synthetic_Neq_Subprogram;
--# end
   --
   --  Primitives for Bare_Synthetic_Binary_Spec
   --
      procedure Initialize_Fields_For_Synthetic_Binary_Spec
        (Self : Bare_Synthetic_Binary_Spec
         ; Synthetic_Binary_Spec_F_Left_Param : Bare_Synthetic_Formal_Param_Decl
         ; Synthetic_Binary_Spec_F_Right_Param : Bare_Synthetic_Formal_Param_Decl
         ; Synthetic_Binary_Spec_F_Return_Type_Expr : Bare_Type_Expr
        ) is
      begin
            Self.Synthetic_Binary_Spec_F_Left_Param := Synthetic_Binary_Spec_F_Left_Param;
            Self.Synthetic_Binary_Spec_F_Right_Param := Synthetic_Binary_Spec_F_Right_Param;
            Self.Synthetic_Binary_Spec_F_Return_Type_Expr := Synthetic_Binary_Spec_F_Return_Type_Expr;
      Self.Synthetic_Binary_Spec_Subp_Symbol := No_Symbol;
      end Initialize_Fields_For_Synthetic_Binary_Spec;
   function Synthetic_Binary_Spec_F_Left_Param
     (Node : Bare_Synthetic_Binary_Spec) return Bare_Synthetic_Formal_Param_Decl
   is
   begin
         return Node.Synthetic_Binary_Spec_F_Left_Param;
   end;
   function Synthetic_Binary_Spec_F_Right_Param
     (Node : Bare_Synthetic_Binary_Spec) return Bare_Synthetic_Formal_Param_Decl
   is
   begin
         return Node.Synthetic_Binary_Spec_F_Right_Param;
   end;
   function Synthetic_Binary_Spec_F_Return_Type_Expr
     (Node : Bare_Synthetic_Binary_Spec) return Bare_Type_Expr
   is
   begin
         return Node.Synthetic_Binary_Spec_F_Return_Type_Expr;
   end;
--# property-start SyntheticBinarySpec.name ada/nodes.lkt:3828
pragma Warnings (Off, "is not referenced");
 function Synthetic_Binary_Spec_P_Name
  (Node : Bare_Synthetic_Binary_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Synthetic_Binary_Spec  := Bare_Synthetic_Binary_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Symbol_Type;
Fld_1 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2065 '<as_entity at nodes.lkt:3829:9>' If_Result ada/nodes.lkt:3829
--# expr-start 2064 '<FieldAccess for synthesize_defining_name at nodes.lkt:3829:9>' Fld_1 ada/nodes.lkt:3829
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2063 '<FieldAccess for subp_symbol at nodes.lkt:3829:39>' Fld ada/nodes.lkt:3829
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Synthetic_Binary_Spec_Subp_Symbol;
--# expr-done 2063
--# property-call-start AdaNode.synthesize_defining_name
Fld_1 := Libadalang.Implementation.Ada_Node_P_Synthesize_Defining_Name (Node => Self, Sym => Fld);
--# end
--# expr-done 2064
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 2065
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Binary_Spec_P_Name;
--# end
--# property-start SyntheticBinarySpec.returns ada/nodes.lkt:3831
pragma Warnings (Off, "is not referenced");
 function Synthetic_Binary_Spec_P_Returns
  (Node : Bare_Synthetic_Binary_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Synthetic_Binary_Spec  := Bare_Synthetic_Binary_Spec (Node);
     Ent : Internal_Entity_Synthetic_Binary_Spec :=
       Internal_Entity_Synthetic_Binary_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2066 '<FieldAccess for return_type_expr at nodes.lkt:3831:39>' Fld ada/nodes.lkt:3831
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Synthetic_Binary_Spec_F_Return_Type_Expr, Info => Ent.Info);
--# expr-done 2066
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Binary_Spec_P_Returns;
--# end
--# property-start SyntheticBinarySpec.corresponding_actual ada/nodes.lkt:3833
pragma Warnings (Off, "is not referenced");
 function Synthetic_Binary_Spec_P_Corresponding_Actual
  (Node : Bare_Synthetic_Binary_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Synthetic_Binary_Spec  := Bare_Synthetic_Binary_Spec (Node);
     Ent : Internal_Entity_Synthetic_Binary_Spec :=
       Internal_Entity_Synthetic_Binary_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
      Cast_Expr : Internal_Entity_Synthetic_Binary_Spec;
Cast_Result : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Binary_Spec_P_Corresponding_Actual;
--# end
--# property-start SyntheticBinarySpec.abstract_formal_params ada/nodes.lkt:3835
pragma Warnings (Off, "is not referenced");
 function Synthetic_Binary_Spec_P_Abstract_Formal_Params
  (Node : Bare_Synthetic_Binary_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Synthetic_Binary_Spec  := Bare_Synthetic_Binary_Spec (Node);
     Ent : Internal_Entity_Synthetic_Binary_Spec :=
       Internal_Entity_Synthetic_Binary_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_371 with Inline_Always;
      Fld : Internal_Entity_Synthetic_Formal_Param_Decl;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
Fld_1 : Internal_Entity_Synthetic_Formal_Param_Decl;
Cast_Result_1 : Internal_Entity_Base_Formal_Param_Decl;
Array_Lit : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_371 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_371;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2071 '<ArrayLiteral at nodes.lkt:3836:9>' Array_Lit ada/nodes.lkt:3836
--# expr-start 2068 '<Cast to BaseFormalParamDecl at nodes.lkt:3837:13>' Cast_Result ada/nodes.lkt:3837
--# expr-start 2067 '<FieldAccess for left_param at nodes.lkt:3837:13>' Fld ada/nodes.lkt:3837
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Synthetic_Formal_Param_Decl (Node => Ent.Node.Synthetic_Binary_Spec_F_Left_Param, Info => Ent.Info);
--# expr-done 2067
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
--# expr-done 2068
--# expr-start 2070 '<Cast to BaseFormalParamDecl at nodes.lkt:3838:13>' Cast_Result_1 ada/nodes.lkt:3838
--# expr-start 2069 '<FieldAccess for right_param at nodes.lkt:3838:13>' Fld_1 ada/nodes.lkt:3838
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Synthetic_Formal_Param_Decl (Node => Ent.Node.Synthetic_Binary_Spec_F_Right_Param, Info => Ent.Info);
--# expr-done 2069
      Cast_Result_1 := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
--# expr-done 2070
Array_Lit := Create_Internal_Entity_Base_Formal_Param_Decl_Array (Internal_Internal_Entity_Base_Formal_Param_Decl_Array'(1 => Cast_Result, 2 => Cast_Result_1)); 
--# expr-done 2071
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_371;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_371;
            raise;
      end;
   return Property_Result;
end Synthetic_Binary_Spec_P_Abstract_Formal_Params;
--# end
   --
   --  Primitives for Bare_Synthetic_Unary_Spec
   --
      procedure Initialize_Fields_For_Synthetic_Unary_Spec
        (Self : Bare_Synthetic_Unary_Spec
         ; Synthetic_Unary_Spec_F_Right_Param : Bare_Synthetic_Formal_Param_Decl
         ; Synthetic_Unary_Spec_F_Return_Type_Expr : Bare_Synthetic_Type_Expr
        ) is
      begin
            Self.Synthetic_Unary_Spec_F_Right_Param := Synthetic_Unary_Spec_F_Right_Param;
            Self.Synthetic_Unary_Spec_F_Return_Type_Expr := Synthetic_Unary_Spec_F_Return_Type_Expr;
      Self.Synthetic_Unary_Spec_Subp_Symbol := No_Symbol;
      end Initialize_Fields_For_Synthetic_Unary_Spec;
   function Synthetic_Unary_Spec_F_Right_Param
     (Node : Bare_Synthetic_Unary_Spec) return Bare_Synthetic_Formal_Param_Decl
   is
   begin
         return Node.Synthetic_Unary_Spec_F_Right_Param;
   end;
   function Synthetic_Unary_Spec_F_Return_Type_Expr
     (Node : Bare_Synthetic_Unary_Spec) return Bare_Synthetic_Type_Expr
   is
   begin
         return Node.Synthetic_Unary_Spec_F_Return_Type_Expr;
   end;
--# property-start SyntheticUnarySpec.name ada/nodes.lkt:3851
pragma Warnings (Off, "is not referenced");
 function Synthetic_Unary_Spec_P_Name
  (Node : Bare_Synthetic_Unary_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Synthetic_Unary_Spec  := Bare_Synthetic_Unary_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Symbol_Type;
Fld_1 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2074 '<as_entity at nodes.lkt:3852:9>' If_Result ada/nodes.lkt:3852
--# expr-start 2073 '<FieldAccess for synthesize_defining_name at nodes.lkt:3852:9>' Fld_1 ada/nodes.lkt:3852
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2072 '<FieldAccess for subp_symbol at nodes.lkt:3852:39>' Fld ada/nodes.lkt:3852
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Synthetic_Unary_Spec_Subp_Symbol;
--# expr-done 2072
--# property-call-start AdaNode.synthesize_defining_name
Fld_1 := Libadalang.Implementation.Ada_Node_P_Synthesize_Defining_Name (Node => Self, Sym => Fld);
--# end
--# expr-done 2073
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 2074
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Unary_Spec_P_Name;
--# end
--# property-start SyntheticUnarySpec.returns ada/nodes.lkt:3854
pragma Warnings (Off, "is not referenced");
 function Synthetic_Unary_Spec_P_Returns
  (Node : Bare_Synthetic_Unary_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Synthetic_Unary_Spec  := Bare_Synthetic_Unary_Spec (Node);
     Ent : Internal_Entity_Synthetic_Unary_Spec :=
       Internal_Entity_Synthetic_Unary_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Synthetic_Type_Expr;
Cast_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 2075 '<FieldAccess for return_type_expr at nodes.lkt:3854:39>' Fld ada/nodes.lkt:3854
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Synthetic_Type_Expr (Node => Ent.Node.Synthetic_Unary_Spec_F_Return_Type_Expr, Info => Ent.Info);
--# expr-done 2075
      Cast_Result := Create_Internal_Entity_Type_Expr
        (Node => Fld.Node,
         Info => Fld.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Unary_Spec_P_Returns;
--# end
--# property-start SyntheticUnarySpec.corresponding_actual ada/nodes.lkt:3856
pragma Warnings (Off, "is not referenced");
 function Synthetic_Unary_Spec_P_Corresponding_Actual
  (Node : Bare_Synthetic_Unary_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Synthetic_Unary_Spec  := Bare_Synthetic_Unary_Spec (Node);
     Ent : Internal_Entity_Synthetic_Unary_Spec :=
       Internal_Entity_Synthetic_Unary_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
      Cast_Expr : Internal_Entity_Synthetic_Unary_Spec;
Cast_Result : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Unary_Spec_P_Corresponding_Actual;
--# end
--# property-start SyntheticUnarySpec.abstract_formal_params ada/nodes.lkt:3858
pragma Warnings (Off, "is not referenced");
 function Synthetic_Unary_Spec_P_Abstract_Formal_Params
  (Node : Bare_Synthetic_Unary_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Synthetic_Unary_Spec  := Bare_Synthetic_Unary_Spec (Node);
     Ent : Internal_Entity_Synthetic_Unary_Spec :=
       Internal_Entity_Synthetic_Unary_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_375 with Inline_Always;
      Fld : Internal_Entity_Synthetic_Formal_Param_Decl;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
Array_Lit : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_375 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_375;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2078 '<ArrayLiteral at nodes.lkt:3859:9>' Array_Lit ada/nodes.lkt:3859
--# expr-start 2077 '<Cast to BaseFormalParamDecl at nodes.lkt:3859:10>' Cast_Result ada/nodes.lkt:3859
--# expr-start 2076 '<FieldAccess for right_param at nodes.lkt:3859:10>' Fld ada/nodes.lkt:3859
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Synthetic_Formal_Param_Decl (Node => Ent.Node.Synthetic_Unary_Spec_F_Right_Param, Info => Ent.Info);
--# expr-done 2076
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
--# expr-done 2077
Array_Lit := Create_Internal_Entity_Base_Formal_Param_Decl_Array (Internal_Internal_Entity_Base_Formal_Param_Decl_Array'(1 => Cast_Result)); 
--# expr-done 2078
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_375;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_375;
            raise;
      end;
   return Property_Result;
end Synthetic_Unary_Spec_P_Abstract_Formal_Params;
--# end
   --
   --  Primitives for Bare_Component_List
   --
      procedure Initialize_Fields_For_Component_List
        (Self : Bare_Component_List
         ; Component_List_F_Components : Bare_Ada_Node_List
         ; Component_List_F_Variant_Part : Bare_Variant_Part
        ) is
      begin
            Self.Component_List_F_Components := Component_List_F_Components;
            Self.Component_List_F_Variant_Part := Component_List_F_Variant_Part;
      end Initialize_Fields_For_Component_List;
   function Component_List_F_Components
     (Node : Bare_Component_List) return Bare_Ada_Node_List
   is
   begin
         return Node.Component_List_F_Components;
   end;
   function Component_List_F_Variant_Part
     (Node : Bare_Component_List) return Bare_Variant_Part
   is
   begin
         return Node.Component_List_F_Variant_Part;
   end;
--# property-start ComponentList.type_def ada/nodes.lkt:3870
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Type_Def
  (Node : Bare_Component_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Def
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Def;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Type_Def;
As_Entity : Internal_Entity_Type_Def;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2082 '<as_entity at nodes.lkt:3870:39>' If_Result ada/nodes.lkt:3870
--# expr-start 2081 '<Cast to TypeDef at nodes.lkt:3870:39>' Cast_Result ada/nodes.lkt:3870
--# expr-start 2080 '<parent at nodes.lkt:3870:39>' Fld_1 ada/nodes.lkt:3870
--# expr-start 2079 '<parent at nodes.lkt:3870:39>' Fld ada/nodes.lkt:3870
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 2079
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 2080
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Type_Def
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 2081
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Type_Def;
else
As_Entity := (Info => E_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 2082
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_List_P_Type_Def;
--# end
--# property-start ComponentList.type_decl ada/nodes.lkt:3872
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Type_Decl
  (Node : Bare_Component_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Decl
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
     Ent : Internal_Entity_Component_List :=
       Internal_Entity_Component_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Decl;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2085 '<Cast to TypeDecl at nodes.lkt:3872:41>' Cast_Result ada/nodes.lkt:3872
--# expr-start 2084 '<parent at nodes.lkt:3872:41>' Fld_1 ada/nodes.lkt:3872
--# expr-start 2083 '<FieldAccess for type_def at nodes.lkt:3872:41>' Fld ada/nodes.lkt:3872
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_def
Fld := Libadalang.Implementation.Component_List_P_Type_Def (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2083
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 2084
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Type_Decl;
   end if;
--# expr-done 2085
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_List_P_Type_Decl;
--# end
--# property-start ComponentList.parent_component_list ada/nodes.lkt:3874
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Parent_Component_List
  (Node : Bare_Component_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Component_List
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
     Ent : Internal_Entity_Component_List :=
       Internal_Entity_Component_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Component_List;
      Var_Expr_60 : Internal_Entity_Derived_Type_Def;
Var_Expr_61 : Internal_Entity_Base_Record_Def;
Cast_Expr : Bare_Component_List;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Type_Def;
Cast_Result_1 : Internal_Entity_Derived_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Record_Def;
Fld_3 : Internal_Entity_Component_List;
Scope_Result : Internal_Entity_Component_List;
Result_Var : Internal_Entity_Component_List;
Scope_Result_1 : Internal_Entity_Component_List;
Result_Var_1 : Internal_Entity_Component_List;
Dyn_Var_Bind_Result : Internal_Entity_Component_List;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2091 '<bind at nodes.lkt:3875:9>' Dyn_Var_Bind_Result ada/nodes.lkt:3875
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 2087 '<Cast to DerivedTypeDef at nodes.lkt:3877:9>' Cast_Result_1 ada/nodes.lkt:3877
--# expr-start 2086 '<FieldAccess for type_def at nodes.lkt:3877:9>' Fld ada/nodes.lkt:3877
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_def
Fld := Libadalang.Implementation.Component_List_P_Type_Def (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2086
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Derived_Type_Def_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Derived_Type_Def
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result_1 := No_Entity_Derived_Type_Def;
   end if;
--# expr-done 2087
Var_Expr_60 := Cast_Result_1;
if Var_Expr_60 /= No_Entity_Derived_Type_Def then
   --# scope-start
--# expr-start 2089 '<FieldAccess for record_def at nodes.lkt:3877:9>' Fld_2 ada/nodes.lkt:3877
--# expr-start 2088 '<FieldAccess for base_type at nodes.lkt:3877:9>' Fld_1 ada/nodes.lkt:3877
      if Var_Expr_60.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Var_Expr_60.Node, Origin => Bound_Origin, E_Info => Var_Expr_60.Info);
--# end
--# expr-done 2088
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Fld_1.Node, Origin => Bound_Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 2089
Var_Expr_61 := Fld_2;
if Var_Expr_61 /= No_Entity_Base_Record_Def then
   --# scope-start
--# expr-start 2090 '<FieldAccess for comps at nodes.lkt:3877:9>' Fld_3 ada/nodes.lkt:3877
      if Var_Expr_61.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseRecordDef.comps
Fld_3 := Libadalang.Implementation.Base_Record_Def_P_Comps (Node => Var_Expr_61.Node, E_Info => Var_Expr_61.Info);
--# end
--# expr-done 2090
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Component_List;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Component_List;
end if;
Dyn_Var_Bind_Result := Result_Var_1; 
--# expr-done 2091
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_List_P_Parent_Component_List;
--# end
--# property-start ComponentList.abstract_formal_params_for_assocs ada/nodes.lkt:3881
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Abstract_Formal_Params_For_Assocs
  (Node : Bare_Component_List
      ; Assocs : Internal_Entity_Assoc_List
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
     Ent : Internal_Entity_Component_List :=
       Internal_Entity_Component_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind assocs Assocs
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_379 with Inline_Always;
      Local_Td : Internal_Entity_Type_Decl;
Local_Discriminants : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Local_Discriminants_Matches : Internal_Param_Match_Array_Access;
Fld : Internal_Entity_Type_Decl;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_2 : Internal_Param_Match_Array_Access;
Fld_3 : Internal_Entity_Defining_Name;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_4 : Internal_Entity_Defining_Name;
Fld_5 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Expr : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
If_Result : Boolean;
Map_Result : Internal_Param_Match_Array_Access;
Fld_6 : Internal_Entity_Base_Record_Def;
Fld_7 : Internal_Entity_Component_List;
Fld_8 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_379 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Discriminants);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Local_Discriminants_Matches);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_379;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2109 '<Let at nodes.lkt:3885:9>' Let_Result_2 ada/nodes.lkt:3885
--# scope-start
--# expr-start 2092 '<FieldAccess for type_decl at nodes.lkt:3885:18>' Fld ada/nodes.lkt:3885
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_decl
Fld := Libadalang.Implementation.Component_List_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2092
Local_Td := Fld; 
--# bind td Local_Td
--# expr-start 2108 '<Let at nodes.lkt:3886:9>' Let_Result_1 ada/nodes.lkt:3886
--# scope-start
--# expr-start 2093 '<FieldAccess for discriminants_list at nodes.lkt:3886:29>' Fld_1 ada/nodes.lkt:3886
      if Local_Td.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Local_Td.Node, Stop_Recurse_At => Stop_Recurse_At, Origin => Origin, E_Info => Local_Td.Info);
--# end
--# expr-done 2093
Local_Discriminants := Fld_1; Inc_Ref (Local_Discriminants);
--# bind discriminants Local_Discriminants
--# expr-start 2107 '<Let at nodes.lkt:3888:9>' Let_Result ada/nodes.lkt:3888
--# scope-start
--# expr-start 2103 '<Map at nodes.lkt:3889:13>' Map_Result ada/nodes.lkt:3889
   --# expr-start 2094 '<FieldAccess for match_formals at nodes.lkt:3889:13>' Fld_2 ada/nodes.lkt:3889
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.match_formals
Fld_2 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Self, Formal_Params => Local_Discriminants, Params => Assocs, Is_Dottable_Subp => False, Match_Others => True);
--# end
--# expr-done 2094
      declare
         Map_Result_Vec : Internal_Param_Match_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_2;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_0
         --# expr-start 2102 '<BooleanBinaryOp And at nodes.lkt:3899:17>' If_Result ada/nodes.lkt:3899
--# expr-start 2097 '<Not at nodes.lkt:3899:17>' Not_Val ada/nodes.lkt:3899
--# expr-start 2096 '<IsNull at nodes.lkt:3899:21>' Is_Null ada/nodes.lkt:3899
--# expr-start 2095 '<FieldAccess for formal at nodes.lkt:3899:21>' Fld_3 ada/nodes.lkt:3899
Fld_3 := Item_0.Formal;
--# expr-done 2095
Is_Null := Fld_3.Node = null; 
--# expr-done 2096
Not_Val := not (Is_Null); 
--# expr-done 2097
if Not_Val then
   --# expr-start 2101 '<Contains at nodes.lkt:3900:21>' Quantifier_Result ada/nodes.lkt:3900
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Base_Formal_Param_Decl_Array_Access := Local_Discriminants;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_3
      --# expr-start 2100 '<Eq at ???>' Is_Equiv None
Cast_Expr := Item_3; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 2099 '<FieldAccess for formal_decl at nodes.lkt:3900:44>' Fld_5 ada/nodes.lkt:3900
--# expr-start 2098 '<FieldAccess for formal at nodes.lkt:3900:44>' Fld_4 ada/nodes.lkt:3900
Fld_4 := Item_0.Formal;
--# expr-done 2098
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_5 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 2099
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 2100
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 2101
   If_Result := Quantifier_Result;
else
   If_Result := False;
end if;
--# expr-done 2102
         if If_Result then
         declare
            Item_To_Append : constant Internal_Param_Match := Item_0;
         begin
            Internal_Param_Match_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Param_Match_Array
           (Items_Count => Natural (Internal_Param_Match_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Match_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Match_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Match_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2103
Local_Discriminants_Matches := Map_Result; Inc_Ref (Local_Discriminants_Matches);
--# bind discriminants_matches Local_Discriminants_Matches
--# expr-start 2106 '<FieldAccess for abstract_formal_params_impl at nodes.lkt:3907:9>' Fld_8 ada/nodes.lkt:3907
--# expr-start 2105 '<FieldAccess for comps at nodes.lkt:3907:9>' Fld_7 ada/nodes.lkt:3907
--# expr-start 2104 '<FieldAccess for record_def at nodes.lkt:3907:9>' Fld_6 ada/nodes.lkt:3907
      if Local_Td.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Local_Td.Node, Origin => Origin, E_Info => Local_Td.Info);
--# end
--# expr-done 2104
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseRecordDef.comps
Fld_7 := Libadalang.Implementation.Base_Record_Def_P_Comps (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 2105
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.abstract_formal_params_impl
Fld_8 := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_Impl (Node => Fld_7.Node, Discriminants => Local_Discriminants_Matches, Stop_Recurse_At => Stop_Recurse_At, Assocs => Assocs, E_Info => Fld_7.Info);
--# end
--# expr-done 2106
Let_Result := Fld_8; Inc_Ref (Let_Result);
--# end
--# expr-done 2107
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2108
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 2109
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_379;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_379;
            raise;
      end;
   return Property_Result;
end Component_List_P_Abstract_Formal_Params_For_Assocs;
--# end
--# property-start ComponentList.abstract_formal_params_for_delta_assocs ada/nodes.lkt:3918
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Abstract_Formal_Params_For_Delta_Assocs
  (Node : Bare_Component_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
     Ent : Internal_Entity_Component_List :=
       Internal_Entity_Component_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_380 with Inline_Always;
            procedure Finalizer_Scope_2215 with Inline_Always;
            procedure Finalizer_Scope_2216 with Inline_Always;
            procedure Finalizer_Scope_2218 with Inline_Always;
      Local_Variant_Part_Components : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Local_Self_Components : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Local_Parent_Components : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Var_Expr_62 : Internal_Entity_Variant_Part;
Var_Expr_63 : Internal_Entity_Component_List;
Fld : Internal_Entity_Variant_Part;
Fld_1 : Internal_Entity_Variant_List;
Fld_2 : Bare_Variant_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Variant;
Bare_Item_0 : Bare_Variant;
Fld_4 : Internal_Entity_Component_List;
Fld_5 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
As_Entity : Internal_Entity_Variant;
Is_Null : Boolean;
If_Result : Internal_Entity_Variant;
Map_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_6 : Internal_Entity_Ada_Node_List;
Fld_7 : Bare_Ada_Node_List;
Fld_8 : Internal_Entity_Info;
Item_4 : Internal_Entity;
Bare_Item_4 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Is_A : Boolean;
Map_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_9 : Internal_Entity_Component_List;
Fld_10 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Concat_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Concat_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_380 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Variant_Part_Components);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_Self_Components);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Local_Parent_Components);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_380;
            procedure Finalizer_Scope_2215 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2215;
            procedure Finalizer_Scope_2216 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2216;
            procedure Finalizer_Scope_2218 is
            begin
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_2218;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2123 '<Let at nodes.lkt:3921:9>' Let_Result_2 ada/nodes.lkt:3921
--# scope-start
--# expr-start 2110 '<FieldAccess for variant_part at nodes.lkt:3922:13>' Fld ada/nodes.lkt:3922
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Variant_Part (Node => Ent.Node.Component_List_F_Variant_Part, Info => Ent.Info);
--# expr-done 2110
Var_Expr_62 := Fld;
if Var_Expr_62 /= No_Entity_Variant_Part then
   --# scope-start
--# expr-start 2114 '<Mapcat at nodes.lkt:3922:13>' Map_Result ada/nodes.lkt:3922
   --# expr-start 2111 '<FieldAccess for variant at nodes.lkt:3922:13>' Fld_1 ada/nodes.lkt:3922
      if Var_Expr_62.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Variant_List (Node => Var_Expr_62.Node.Variant_Part_F_Variant, Info => Var_Expr_62.Info);
--# expr-done 2111
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Variant_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Variant;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind v Item_0
      --# expr-start 2113 '<FieldAccess for abstract_formal_params_for_delta_assocs at nodes.lkt:3923:24>' Fld_5 ada/nodes.lkt:3923
--# expr-start 2112 '<FieldAccess for components at nodes.lkt:3923:24>' Fld_4 ada/nodes.lkt:3923
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Component_List (Node => Item_0.Node.Variant_F_Components, Info => Item_0.Info);
--# expr-done 2112
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.abstract_formal_params_for_delta_assocs
Fld_5 := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_For_Delta_Assocs (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 2113
         for Item_To_Append of
               Fld_5.Items
         loop
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2216;
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2114
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2215;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Variant_Part_Components := Result_Var; Inc_Ref (Local_Variant_Part_Components);
--# bind variant_part_components Local_Variant_Part_Components
--# expr-start 2122 '<Let at nodes.lkt:3925:9>' Let_Result_1 ada/nodes.lkt:3925
--# scope-start
--# expr-start 2118 '<FilterMap at nodes.lkt:3925:31>' Map_Result_1 ada/nodes.lkt:3925
   --# expr-start 2115 '<FieldAccess for components at nodes.lkt:3925:31>' Fld_6 ada/nodes.lkt:3925
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Ada_Node_List (Node => Ent.Node.Component_List_F_Components, Info => Ent.Info);
--# expr-done 2115
Fld_7 := Fld_6.Node;
      declare
         Map_Result_1_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      if Fld_7 = null then
      Map_Result_1 := Create_Internal_Entity_Base_Formal_Param_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_7;
      begin
         for Untyped_Item_4 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_4 := Untyped_Item_4; 
Is_Null_1 := Bare_Item_4 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
Fld_8 := Fld_6.Info;
As_Entity_1 := (Info => Fld_8, Node => Bare_Item_4); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_4 := If_Result_1; 
   --# scope-start
               --# bind e Item_4
         --# expr-start 2116 '<IsA BaseFormalParamDecl at ???>' Is_A None
Is_A := Item_4.Node /= null 
and then Item_4.Node.Kind in Ada_Base_Formal_Param_Decl; 
--# expr-done 2116
         if Is_A then
      --# expr-start 2117 '<Cast to BaseFormalParamDecl at ???>' Cast_Result None
Cast_Expr := Item_4; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Formal_Param_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Formal_Param_Decl;
   end if;
--# expr-done 2117
         declare
            Item_To_Append : constant Internal_Entity_Base_Formal_Param_Decl := Cast_Result;
         begin
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 2118
Local_Self_Components := Map_Result_1; Inc_Ref (Local_Self_Components);
--# bind self_components Local_Self_Components
--# expr-start 2121 '<Let at nodes.lkt:3926:9>' Let_Result ada/nodes.lkt:3926
--# scope-start
--# expr-start 2119 '<FieldAccess for parent_component_list at nodes.lkt:3927:13>' Fld_9 ada/nodes.lkt:3927
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.parent_component_list
Fld_9 := Libadalang.Implementation.Component_List_P_Parent_Component_List (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2119
Var_Expr_63 := Fld_9;
if Var_Expr_63 /= No_Entity_Component_List then
   --# scope-start
--# expr-start 2120 '<FieldAccess for abstract_formal_params_for_delta_assocs at nodes.lkt:3927:13>' Fld_10 ada/nodes.lkt:3927
      if Var_Expr_63.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.abstract_formal_params_for_delta_assocs
Fld_10 := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_For_Delta_Assocs (Node => Var_Expr_63.Node, E_Info => Var_Expr_63.Info);
--# end
--# expr-done 2120
Scope_Result_1 := Fld_10;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2218;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Local_Parent_Components := Result_Var_1; Inc_Ref (Local_Parent_Components);
--# bind parent_components Local_Parent_Components
Concat_Result := Concat (Local_Variant_Part_Components, Local_Self_Components); 
Concat_Result_1 := Concat (Concat_Result, Local_Parent_Components); 
Let_Result := Concat_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 2121
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2122
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 2123
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_380;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_380;
                     Finalizer_Scope_2215;
                     Finalizer_Scope_2216;
                     Finalizer_Scope_2218;
            raise;
      end;
   return Property_Result;
end Component_List_P_Abstract_Formal_Params_For_Delta_Assocs;
--# end
--# property-start ComponentList.abstract_formal_params_impl ada/nodes.lkt:3950
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Abstract_Formal_Params_Impl
  (Node : Bare_Component_List
      ; Discriminants : Internal_Param_Match_Array_Access
      ; Include_Discriminants : Boolean
         := True
      ; Recurse : Boolean
         := True
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Assocs : Internal_Entity_Assoc_List
         := No_Entity_Assoc_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
     Ent : Internal_Entity_Component_List :=
       Internal_Entity_Component_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind discriminants Discriminants
   --# bind include_discriminants Include_Discriminants
   --# bind recurse Recurse
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind assocs Assocs
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_381 with Inline_Always;
            procedure Finalizer_Scope_2220 with Inline_Always;
            procedure Finalizer_Scope_2221 with Inline_Always;
            procedure Finalizer_Scope_2223 with Inline_Always;
      Local_Self_Comps : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Local_Ret : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Var_Expr_0 : Internal_Entity_Component_List;
Var_Expr_1 : Internal_Entity_Composite_Constraint;
Var_Expr_2 : Internal_Entity_Type_Decl;
Var_Expr_64 : Internal_Entity_Variant_Part;
Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_5 : Internal_Entity;
Bare_Item_5 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Is_A : Boolean;
Map_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_3 : Internal_Entity_Variant_Part;
Fld_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Concat_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_5 : Internal_Entity_Component_List;
Fld_6 : Internal_Entity_Type_Decl;
Fld_7 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_8 : Internal_Entity_Type_Def;
Cast_Result_1 : Internal_Entity_Derived_Type_Def;
Fld_9 : Internal_Entity_Subtype_Indication;
Fld_10 : Internal_Entity_Constraint;
Cast_Result_2 : Internal_Entity_Composite_Constraint;
Fld_11 : Internal_Entity_Assoc_List;
Scope_Result_1 : Internal_Entity_Assoc_List;
Result_Var_1 : Internal_Entity_Assoc_List;
Fld_12 : Internal_Param_Match_Array_Access;
Fld_13 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Concat_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_14 : Internal_Entity_Type_Decl;
Fld_15 : Boolean;
If_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
If_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_16 : Internal_Entity_Type_Decl;
Fld_17 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Concat_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
If_Result_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_381 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Local_Self_Comps);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Local_Ret);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Concat_Result_2);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_381;
            procedure Finalizer_Scope_2220 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_2220;
            procedure Finalizer_Scope_2221 is
            begin
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_2221;
            procedure Finalizer_Scope_2223 is
            begin
                     Dec_Ref (Fld_17);
            end Finalizer_Scope_2223;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2149 '<Let at nodes.lkt:3959:9>' Let_Result_1 ada/nodes.lkt:3959
--# scope-start
--# expr-start 2127 '<FilterMap at nodes.lkt:3960:13>' Map_Result ada/nodes.lkt:3960
   --# expr-start 2124 '<FieldAccess for components at nodes.lkt:3960:13>' Fld ada/nodes.lkt:3960
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Ent.Node.Component_List_F_Components, Info => Ent.Info);
--# expr-done 2124
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_5 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_5 := Untyped_Item_5; 
Is_Null := Bare_Item_5 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_5); 
   If_Result := As_Entity;
end if;
                  Item_5 := If_Result; 
   --# scope-start
               --# bind e Item_5
         --# expr-start 2125 '<IsA BaseFormalParamDecl at ???>' Is_A None
Is_A := Item_5.Node /= null 
and then Item_5.Node.Kind in Ada_Base_Formal_Param_Decl; 
--# expr-done 2125
         if Is_A then
      --# expr-start 2126 '<Cast to BaseFormalParamDecl at ???>' Cast_Result None
Cast_Expr := Item_5; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Formal_Param_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Formal_Param_Decl;
   end if;
--# expr-done 2126
         declare
            Item_To_Append : constant Internal_Entity_Base_Formal_Param_Decl := Cast_Result;
         begin
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2127
--# expr-start 2128 '<FieldAccess for variant_part at nodes.lkt:3963:15>' Fld_3 ada/nodes.lkt:3963
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Variant_Part (Node => Ent.Node.Component_List_F_Variant_Part, Info => Ent.Info);
--# expr-done 2128
Var_Expr_64 := Fld_3;
if Var_Expr_64 /= No_Entity_Variant_Part then
   --# scope-start
--# expr-start 2129 '<FieldAccess for get_components at nodes.lkt:3963:15>' Fld_4 ada/nodes.lkt:3963
      if Var_Expr_64.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start VariantPart.get_components
Fld_4 := Libadalang.Implementation.Variant_Part_P_Get_Components (Node => Var_Expr_64.Node, Discriminants => Discriminants, E_Info => Var_Expr_64.Info);
--# end
--# expr-done 2129
Scope_Result := Fld_4;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2220;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
Concat_Result := Concat (Map_Result, Result_Var); 
Local_Self_Comps := Concat_Result; Inc_Ref (Local_Self_Comps);
--# bind self_comps Local_Self_Comps
--# expr-start 2148 '<Let at nodes.lkt:3968:9>' Let_Result ada/nodes.lkt:3968
--# scope-start
--# expr-start 2144 '<If at nodes.lkt:3969:13>' If_Result_2 ada/nodes.lkt:3969
if Recurse then
--# expr-start 2130 '<FieldAccess for parent_component_list at nodes.lkt:3971:17>' Fld_5 ada/nodes.lkt:3971
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.parent_component_list
Fld_5 := Libadalang.Implementation.Component_List_P_Parent_Component_List (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2130
Var_Expr_0 := Fld_5;
if Var_Expr_0 /= No_Entity_Component_List then
   --# scope-start
   --# bind pcl Var_Expr_0
--# expr-start 2143 '<If at nodes.lkt:3973:21>' If_Result_1 ada/nodes.lkt:3973
--# expr-start 2132 '<FieldAccess for matching_type at nodes.lkt:3973:24>' Fld_15 ada/nodes.lkt:3973
--# expr-start 2131 '<FieldAccess for type_decl at nodes.lkt:3973:24>' Fld_14 ada/nodes.lkt:3973
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_decl
Fld_14 := Libadalang.Implementation.Component_List_P_Type_Decl (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2131
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_15 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Fld_14.Node, Expected_Type => Stop_Recurse_At, Origin => No_Bare_Ada_Node, E_Info => Fld_14.Info);
--# end
--# expr-done 2132
if Fld_15 then
   If_Result_1 := Local_Self_Comps;
else
   --# expr-start 2142 '<FieldAccess for abstract_formal_params_impl at nodes.lkt:3976:25>' Fld_13 ada/nodes.lkt:3976
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2141 '<FieldAccess for match_formals at nodes.lkt:3977:29>' Fld_12 ada/nodes.lkt:3977
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2134 '<FieldAccess for discriminants_list at nodes.lkt:3978:33>' Fld_7 ada/nodes.lkt:3978
--# expr-start 2133 '<FieldAccess for type_decl at nodes.lkt:3978:33>' Fld_6 ada/nodes.lkt:3978
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_decl
Fld_6 := Libadalang.Implementation.Component_List_P_Type_Decl (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2133
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Fld_6.Node, Stop_Recurse_At => Stop_Recurse_At, Origin => No_Bare_Ada_Node, E_Info => Fld_6.Info);
--# end
--# expr-done 2134
--# expr-start 2139 '<Cast to CompositeConstraint at nodes.lkt:3981:33>' Cast_Result_2 ada/nodes.lkt:3981
--# expr-start 2138 '<FieldAccess for constraint at nodes.lkt:3981:33>' Fld_10 ada/nodes.lkt:3981
--# expr-start 2137 '<FieldAccess for subtype_indication at nodes.lkt:3981:33>' Fld_9 ada/nodes.lkt:3981
--# expr-start 2136 '<Cast to DerivedTypeDef at nodes.lkt:3981:33>' Cast_Result_1 ada/nodes.lkt:3981
--# expr-start 2135 '<FieldAccess for type_def at nodes.lkt:3981:33>' Fld_8 ada/nodes.lkt:3981
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_def
Fld_8 := Libadalang.Implementation.Component_List_P_Type_Def (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2135
   if Fld_8.Node = null
      or else Fld_8.Node.Kind in Ada_Derived_Type_Def_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Derived_Type_Def
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
   else
         Cast_Result_1 := No_Entity_Derived_Type_Def;
   end if;
--# expr-done 2136
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Subtype_Indication (Node => Cast_Result_1.Node.Derived_Type_Def_F_Subtype_Indication, Info => Cast_Result_1.Info);
--# expr-done 2137
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Constraint (Node => Fld_9.Node.Subtype_Indication_F_Constraint, Info => Fld_9.Info);
--# expr-done 2138
   if Fld_10.Node = null
      or else Fld_10.Node.Kind in Ada_Composite_Constraint_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Composite_Constraint
        (Node => Fld_10.Node,
         Info => Fld_10.Info);
   else
         Cast_Result_2 := No_Entity_Composite_Constraint;
   end if;
--# expr-done 2139
Var_Expr_1 := Cast_Result_2;
if Var_Expr_1 /= No_Entity_Composite_Constraint then
   --# scope-start
   --# bind cc Var_Expr_1
--# expr-start 2140 '<FieldAccess for constraints at nodes.lkt:3987:45>' Fld_11 ada/nodes.lkt:3987
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Assoc_List (Node => Var_Expr_1.Node.Composite_Constraint_F_Constraints, Info => Var_Expr_1.Info);
--# expr-done 2140
Scope_Result_1 := Fld_11;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Assocs;
end if;
--# property-call-start AdaNode.match_formals
Fld_12 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Var_Expr_0.Node, Formal_Params => Fld_7, Params => Result_Var_1, Is_Dottable_Subp => False);
--# end
--# expr-done 2141
--# property-call-start ComponentList.abstract_formal_params_impl
Fld_13 := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_Impl (Node => Var_Expr_0.Node, Discriminants => Fld_12, Include_Discriminants => False, Stop_Recurse_At => Stop_Recurse_At, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2142
Concat_Result_1 := Concat (Fld_13, Local_Self_Comps); 
   If_Result_1 := Concat_Result_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2143
Scope_Result_2 := If_Result_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2221;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Local_Self_Comps;
end if;
      Inc_Ref (Result_Var_2);
   If_Result_2 := Result_Var_2;
else
   If_Result_2 := Local_Self_Comps;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 2144
Local_Ret := If_Result_2; Inc_Ref (Local_Ret);
--# bind ret Local_Ret
--# expr-start 2147 '<If at nodes.lkt:4004:9>' If_Result_3 ada/nodes.lkt:4004
if Include_Discriminants then
--# expr-start 2145 '<FieldAccess for type_decl at nodes.lkt:4006:13>' Fld_16 ada/nodes.lkt:4006
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_decl
Fld_16 := Libadalang.Implementation.Component_List_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2145
Var_Expr_2 := Fld_16;
if Var_Expr_2 /= No_Entity_Type_Decl then
   --# scope-start
   --# bind decl Var_Expr_2
--# expr-start 2146 '<FieldAccess for discriminants_list at nodes.lkt:4007:27>' Fld_17 ada/nodes.lkt:4007
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_17 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Var_Expr_2.Node, Stop_Recurse_At => Stop_Recurse_At, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 2146
Scope_Result_3 := Fld_17;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2223;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
Concat_Result_2 := Concat (Result_Var_3, Local_Ret); 
   If_Result_3 := Concat_Result_2;
else
   If_Result_3 := Local_Ret;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 2147
Let_Result := If_Result_3; Inc_Ref (Let_Result);
--# end
--# expr-done 2148
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2149
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_381;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_381;
                     Finalizer_Scope_2220;
                     Finalizer_Scope_2221;
                     Finalizer_Scope_2223;
            raise;
      end;
   return Property_Result;
end Component_List_P_Abstract_Formal_Params_Impl;
--# end
--# property-start ComponentList.abstract_formal_params ada/nodes.lkt:4013
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Abstract_Formal_Params
  (Node : Bare_Component_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
     Ent : Internal_Entity_Component_List :=
       Internal_Entity_Component_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_382 with Inline_Always;
      Fld : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_382 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_382;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2150 '<FieldAccess for abstract_formal_params_impl at nodes.lkt:4014:9>' Fld ada/nodes.lkt:4014
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.abstract_formal_params_impl
Fld := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_Impl (Node => Ent.Node, Discriminants => No_Internal_Param_Match_Array_Type, E_Info => Ent.Info);
--# end
--# expr-done 2150
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_382;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_382;
            raise;
      end;
   return Property_Result;
end Component_List_P_Abstract_Formal_Params;
--# end
--# property-start ComponentList.shapes ada/nodes.lkt:4017
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Shapes
  (Node : Bare_Component_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Shape_Array_Access
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
     Ent : Internal_Entity_Component_List :=
       Internal_Entity_Component_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Shape_Array_Access;
            procedure Finalizer_Scope_383 with Inline_Always;
            procedure Finalizer_Scope_2225 with Inline_Always;
            procedure Finalizer_Scope_2226 with Inline_Always;
            procedure Finalizer_Scope_2227 with Inline_Always;
      Local_Self_Comps : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Var_Expr_0 : Internal_Entity_Variant_Part;
Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_6 : Internal_Entity;
Bare_Item_6 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Is_A : Boolean;
Map_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_3 : Internal_Entity_Variant_Part;
Fld_4 : Internal_Entity_Variant_List;
Fld_5 : Bare_Variant_List;
Fld_6 : Internal_Entity_Info;
Item_1 : Internal_Entity_Variant;
Bare_Item_1 : Bare_Variant;
Fld_7 : Internal_Entity_Component_List;
Fld_8 : Internal_Shape_Array_Access;
Fld_9 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Concat_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_10 : Internal_Entity_Identifier;
Fld_11 : Internal_Entity_Alternatives_List;
New_Struct : Internal_Discriminant_Values;
Array_Lit : Internal_Discriminant_Values_Array_Access;
Fld_12 : Internal_Discriminant_Values_Array_Access;
Concat_Result_1 : Internal_Discriminant_Values_Array_Access;
New_Struct_1 : Internal_Shape := No_Shape;
Map_Result_1 : Internal_Shape_Array_Access;
As_Entity_1 : Internal_Entity_Variant;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Variant;
Map_Result_2 : Internal_Shape_Array_Access;
Scope_Result : Internal_Shape_Array_Access;
New_Struct_2 : Internal_Shape := No_Shape;
Array_Lit_1 : Internal_Shape_Array_Access;
Result_Var : Internal_Shape_Array_Access;
Let_Result : Internal_Shape_Array_Access;
            procedure Finalizer_Scope_383 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Local_Self_Comps);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (New_Struct_2);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_383;
            procedure Finalizer_Scope_2225 is
            begin
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_2225;
            procedure Finalizer_Scope_2226 is
            begin
                     Dec_Ref (Fld_8);
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_2226;
            procedure Finalizer_Scope_2227 is
            begin
                     Dec_Ref (Fld_9);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_2227;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2170 '<Let at nodes.lkt:4018:9>' Let_Result ada/nodes.lkt:4018
--# scope-start
--# expr-start 2154 '<FilterMap at nodes.lkt:4018:26>' Map_Result ada/nodes.lkt:4018
   --# expr-start 2151 '<FieldAccess for components at nodes.lkt:4018:26>' Fld ada/nodes.lkt:4018
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Ent.Node.Component_List_F_Components, Info => Ent.Info);
--# expr-done 2151
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_6 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_6 := Untyped_Item_6; 
Is_Null := Bare_Item_6 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_6); 
   If_Result := As_Entity;
end if;
                  Item_6 := If_Result; 
   --# scope-start
               --# bind e Item_6
         --# expr-start 2152 '<IsA BaseFormalParamDecl at ???>' Is_A None
Is_A := Item_6.Node /= null 
and then Item_6.Node.Kind in Ada_Base_Formal_Param_Decl; 
--# expr-done 2152
         if Is_A then
      --# expr-start 2153 '<Cast to BaseFormalParamDecl at ???>' Cast_Result None
Cast_Expr := Item_6; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Formal_Param_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Formal_Param_Decl;
   end if;
--# expr-done 2153
         declare
            Item_To_Append : constant Internal_Entity_Base_Formal_Param_Decl := Cast_Result;
         begin
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2154
Local_Self_Comps := Map_Result; Inc_Ref (Local_Self_Comps);
--# bind self_comps Local_Self_Comps
--# expr-start 2155 '<FieldAccess for variant_part at nodes.lkt:4020:9>' Fld_3 ada/nodes.lkt:4020
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Variant_Part (Node => Ent.Node.Component_List_F_Variant_Part, Info => Ent.Info);
--# expr-done 2155
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Entity_Variant_Part then
   --# scope-start
   --# bind vpart Var_Expr_0
--# expr-start 2167 '<Mapcat at nodes.lkt:4022:13>' Map_Result_2 ada/nodes.lkt:4022
   --# expr-start 2156 '<FieldAccess for variant at nodes.lkt:4022:13>' Fld_4 ada/nodes.lkt:4022
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Variant_List (Node => Var_Expr_0.Node.Variant_Part_F_Variant, Info => Var_Expr_0.Info);
--# expr-done 2156
Fld_5 := Fld_4.Node;
      declare
         Map_Result_2_Vec : Internal_Shape_Vectors.Vector;
      begin
      if Fld_5 = null then
      Map_Result_2 := Create_Internal_Shape_Array (0);
      else
      declare
         Collection : constant Bare_Variant_List := Fld_5;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_1 := Bare_Item_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Variant;
else
Fld_6 := Fld_4.Info;
As_Entity_1 := (Info => Fld_6, Node => Bare_Item_1); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_1 := If_Result_1; 
   --# scope-start
               --# bind v Item_1
      --# expr-start 2166 '<Map at nodes.lkt:4024:17>' Map_Result_1 ada/nodes.lkt:4024
   --# expr-start 2158 '<FieldAccess for shapes at nodes.lkt:4024:17>' Fld_8 ada/nodes.lkt:4024
--# expr-start 2157 '<FieldAccess for components at nodes.lkt:4024:17>' Fld_7 ada/nodes.lkt:4024
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Component_List (Node => Item_1.Node.Variant_F_Components, Info => Item_1.Info);
--# expr-done 2157
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.shapes
Fld_8 := Libadalang.Implementation.Component_List_P_Shapes (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 2158
      declare
         Map_Result_1_Vec : Internal_Shape_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Shape_Array_Access := Fld_8;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind s Item_2
      --# expr-start 2165 '<New Shape at nodes.lkt:4026:21>' New_Struct_1 ada/nodes.lkt:4026
--# expr-start 2159 '<FieldAccess for components at nodes.lkt:4027:49>' Fld_9 ada/nodes.lkt:4027
Fld_9 := Item_2.Components;
Inc_Ref (Fld_9);
--# expr-done 2159
Concat_Result := Concat (Local_Self_Comps, Fld_9); 
--# expr-start 2163 '<ArrayLiteral at nodes.lkt:4028:46>' Array_Lit ada/nodes.lkt:4028
--# expr-start 2162 '<New DiscriminantValues at nodes.lkt:4029:29>' New_Struct ada/nodes.lkt:4029
--# expr-start 2160 '<FieldAccess for discr_name at nodes.lkt:4030:46>' Fld_10 ada/nodes.lkt:4030
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Identifier (Node => Var_Expr_0.Node.Variant_Part_F_Discr_Name, Info => Var_Expr_0.Info);
--# expr-done 2160
--# expr-start 2161 '<FieldAccess for choices at nodes.lkt:4031:40>' Fld_11 ada/nodes.lkt:4031
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Alternatives_List (Node => Item_1.Node.Variant_F_Choices, Info => Item_1.Info);
--# expr-done 2161
New_Struct := (Discriminant => Fld_10, Values => Fld_11); 
--# expr-done 2162
Array_Lit := Create_Internal_Discriminant_Values_Array (Internal_Internal_Discriminant_Values_Array'(1 => New_Struct)); 
--# expr-done 2163
--# expr-start 2164 '<FieldAccess for discriminants_values at nodes.lkt:4034:27>' Fld_12 ada/nodes.lkt:4034
Fld_12 := Item_2.Discriminants_Values;
Inc_Ref (Fld_12);
--# expr-done 2164
Concat_Result_1 := Concat (Array_Lit, Fld_12); 
Inc_Ref (Concat_Result);
Inc_Ref (Concat_Result_1);
New_Struct_1 := (Components => Concat_Result, Discriminants_Values => Concat_Result_1); 
--# expr-done 2165
         declare
            Item_To_Append : constant Internal_Shape := New_Struct_1;
         begin
               Inc_Ref (Item_To_Append);
            Internal_Shape_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2227;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Shape_Array
           (Items_Count => Natural (Internal_Shape_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Shape_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Shape_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Shape_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 2166
         for Item_To_Append of
               Map_Result_1.Items
         loop
               Inc_Ref (Item_To_Append);
            Internal_Shape_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2226;
         end loop;
      end;
      end if;
         Map_Result_2 := Create_Internal_Shape_Array
           (Items_Count => Natural (Internal_Shape_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Shape_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Shape_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Shape_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 2167
Scope_Result := Map_Result_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2225;
   Result_Var := Scope_Result;
else
   --# expr-start 2169 '<ArrayLiteral at nodes.lkt:4038:25>' Array_Lit_1 ada/nodes.lkt:4038
--# expr-start 2168 '<New Shape at nodes.lkt:4039:17>' New_Struct_2 ada/nodes.lkt:4039
Inc_Ref (Local_Self_Comps);
Inc_Ref (No_Internal_Discriminant_Values_Array_Type);
New_Struct_2 := (Components => Local_Self_Comps, Discriminants_Values => No_Internal_Discriminant_Values_Array_Type); 
--# expr-done 2168
Array_Lit_1 := Create_Internal_Shape_Array (Internal_Internal_Shape_Array'(1 => New_Struct_2)); 
--# expr-done 2169
   Result_Var := Array_Lit_1;
end if;
      Inc_Ref (Result_Var);
Let_Result := Result_Var; Inc_Ref (Let_Result);
--# end
--# expr-done 2170
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_383;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_383;
                     Finalizer_Scope_2225;
                     Finalizer_Scope_2226;
                     Finalizer_Scope_2227;
            raise;
      end;
   return Property_Result;
end Component_List_P_Shapes;
--# end
--# property-start ComponentList.has_limited_component ada/nodes.lkt:4049
pragma Warnings (Off, "is not referenced");
 function Component_List_P_Has_Limited_Component
  (Node : Bare_Component_List
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Component_List  := Bare_Component_List (Node);
     Ent : Internal_Entity_Component_List :=
       Internal_Entity_Component_List'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_65 : Internal_Entity_Base_Formal_Param_Decl;
Var_Expr_66 : Internal_Entity_Base_Type_Decl;
Var_Expr_67 : Internal_Entity_Variant_Part;
Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Quantifier_Result : Boolean;
Fld_5 : Internal_Entity_Variant_Part;
Fld_6 : Internal_Entity_Variant_List;
Fld_7 : Bare_Variant_List;
Fld_8 : Internal_Entity_Info;
Item_1 : Internal_Entity_Variant;
Bare_Item_1 : Bare_Variant;
Fld_9 : Internal_Entity_Component_List;
Fld_10 : Boolean;
As_Entity_1 : Internal_Entity_Variant;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Variant;
Quantifier_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_2 : Boolean;
Dyn_Var_Bind_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2182 '<bind at nodes.lkt:4050:9>' Dyn_Var_Bind_Result ada/nodes.lkt:4050
Bound_Origin := No_Bare_Ada_Node; 
--# expr-start 2181 '<BooleanBinaryOp Or at nodes.lkt:4052:9>' If_Result_2 ada/nodes.lkt:4052
--# expr-start 2175 '<AnyQuantifier at nodes.lkt:4052:9>' Quantifier_Result ada/nodes.lkt:4052
   --# expr-start 2171 '<FieldAccess for components at nodes.lkt:4052:9>' Fld ada/nodes.lkt:4052
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Ent.Node.Component_List_F_Components, Info => Ent.Info);
--# expr-done 2171
Fld_1 := Fld.Node;
      Quantifier_Result := False;
      if Fld_1 = null then
      null;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind c Item_0
--# expr-start 2172 '<Cast to BaseFormalParamDecl at nodes.lkt:4053:20>' Cast_Result ada/nodes.lkt:4053
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Formal_Param_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Formal_Param_Decl;
   end if;
--# expr-done 2172
Var_Expr_65 := Cast_Result;
if Var_Expr_65 /= No_Entity_Base_Formal_Param_Decl then
   --# scope-start
--# expr-start 2173 '<FieldAccess for formal_type at nodes.lkt:4053:20>' Fld_3 ada/nodes.lkt:4053
      if Var_Expr_65.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Var_Expr_65.Node, Origin => Bound_Origin, E_Info => Var_Expr_65.Info);
--# end
--# expr-done 2173
Var_Expr_66 := Fld_3;
if Var_Expr_66 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 2174 '<FieldAccess for is_limited_type at nodes.lkt:4053:20>' Fld_4 ada/nodes.lkt:4053
      if Var_Expr_66.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_limited_type
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Is_Limited_Type (Node => Var_Expr_66.Node, E_Info => Var_Expr_66.Info);
--# end
--# expr-done 2174
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
      Quantifier_Result := Result_Var_1;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 2175
if Quantifier_Result then
   If_Result_2 := True;
else
--# expr-start 2176 '<FieldAccess for variant_part at nodes.lkt:4055:12>' Fld_5 ada/nodes.lkt:4055
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Variant_Part (Node => Ent.Node.Component_List_F_Variant_Part, Info => Ent.Info);
--# expr-done 2176
Var_Expr_67 := Fld_5;
if Var_Expr_67 /= No_Entity_Variant_Part then
   --# scope-start
--# expr-start 2180 '<AnyQuantifier at nodes.lkt:4055:12>' Quantifier_Result_1 ada/nodes.lkt:4055
   --# expr-start 2177 '<FieldAccess for variant at nodes.lkt:4055:12>' Fld_6 ada/nodes.lkt:4055
      if Var_Expr_67.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Variant_List (Node => Var_Expr_67.Node.Variant_Part_F_Variant, Info => Var_Expr_67.Info);
--# expr-done 2177
Fld_7 := Fld_6.Node;
      Quantifier_Result_1 := False;
      if Fld_7 = null then
      null;
      else
      declare
         Collection : constant Bare_Variant_List := Fld_7;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_1 := Bare_Item_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Variant;
else
Fld_8 := Fld_6.Info;
As_Entity_1 := (Info => Fld_8, Node => Bare_Item_1); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_1 := If_Result_1; 
   --# scope-start
               --# bind v Item_1
      --# expr-start 2179 '<FieldAccess for has_limited_component at nodes.lkt:4056:20>' Fld_10 ada/nodes.lkt:4056
--# expr-start 2178 '<FieldAccess for components at nodes.lkt:4056:20>' Fld_9 ada/nodes.lkt:4056
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Component_List (Node => Item_1.Node.Variant_F_Components, Info => Item_1.Info);
--# expr-done 2178
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.has_limited_component
Fld_10 := Libadalang.Implementation.Component_List_P_Has_Limited_Component (Node => Fld_9.Node, E_Info => Fld_9.Info);
--# end
--# expr-done 2179
      Quantifier_Result_1 := Fld_10;
   --# end
               exit when Quantifier_Result_1;
         end loop;
      end;
      end if;
--# expr-done 2180
Scope_Result_2 := Quantifier_Result_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_2 := Result_Var_2;
end if;
--# expr-done 2181
Dyn_Var_Bind_Result := If_Result_2; 
--# expr-done 2182
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_List_P_Has_Limited_Component;
--# end
   --
   --  Primitives for Bare_Discriminant_Part
   --
--# property-start DiscriminantPart.abstract_formal_params ada/nodes.lkt:4064
pragma Warnings (Off, "is not referenced");
 function Discriminant_Part_P_Abstract_Formal_Params
  (Node : Bare_Discriminant_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Discriminant_Part  := Bare_Discriminant_Part (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Discriminant_Part_P_Abstract_Formal_Params;
--# end
   --
   --  Primitives for Bare_Known_Discriminant_Part
   --
      procedure Initialize_Fields_For_Known_Discriminant_Part
        (Self : Bare_Known_Discriminant_Part
         ; Known_Discriminant_Part_F_Discr_Specs : Bare_Discriminant_Spec_List
        ) is
      begin
            Self.Known_Discriminant_Part_F_Discr_Specs := Known_Discriminant_Part_F_Discr_Specs;
      end Initialize_Fields_For_Known_Discriminant_Part;
   function Known_Discriminant_Part_F_Discr_Specs
     (Node : Bare_Known_Discriminant_Part) return Bare_Discriminant_Spec_List
   is
   begin
         return Node.Known_Discriminant_Part_F_Discr_Specs;
   end;
--# property-start KnownDiscriminantPart.abstract_formal_params ada/nodes.lkt:4073
pragma Warnings (Off, "is not referenced");
 function Known_Discriminant_Part_P_Abstract_Formal_Params
  (Node : Bare_Known_Discriminant_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Known_Discriminant_Part  := Bare_Known_Discriminant_Part (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_386 with Inline_Always;
      Fld : Bare_Discriminant_Spec_List;
Item_0 : Bare_Discriminant_Spec;
Cast_Expr : Bare_Discriminant_Spec;
Cast_Result : Bare_Base_Formal_Param_Decl;
As_Entity : Internal_Entity_Base_Formal_Param_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Formal_Param_Decl;
Map_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_386 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_386;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2186 '<Map at nodes.lkt:4074:9>' Map_Result ada/nodes.lkt:4074
   --# expr-start 2183 '<FieldAccess for discr_specs at nodes.lkt:4074:9>' Fld ada/nodes.lkt:4074
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Known_Discriminant_Part_F_Discr_Specs;
--# expr-done 2183
      declare
         Map_Result_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Discriminant_Spec_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind e Item_0
      --# expr-start 2185 '<as_entity at nodes.lkt:4074:37>' If_Result ada/nodes.lkt:4074
--# expr-start 2184 '<Cast to BaseFormalParamDecl at nodes.lkt:4074:37>' Cast_Result ada/nodes.lkt:4074
Cast_Expr := Item_0; 
      Cast_Result := Cast_Expr;
--# expr-done 2184
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Base_Formal_Param_Decl;
else
As_Entity := (Info => E_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 2185
         declare
            Item_To_Append : constant Internal_Entity_Base_Formal_Param_Decl := If_Result;
         begin
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2186
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_386;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_386;
            raise;
      end;
   return Property_Result;
end Known_Discriminant_Part_P_Abstract_Formal_Params;
--# end
   --
   --  Primitives for Bare_Unknown_Discriminant_Part
   --
   --
   --  Primitives for Bare_Entry_Completion_Formal_Params
   --
      procedure Initialize_Fields_For_Entry_Completion_Formal_Params
        (Self : Bare_Entry_Completion_Formal_Params
         ; Entry_Completion_Formal_Params_F_Params : Bare_Params
        ) is
      begin
            Self.Entry_Completion_Formal_Params_F_Params := Entry_Completion_Formal_Params_F_Params;
      end Initialize_Fields_For_Entry_Completion_Formal_Params;
   function Entry_Completion_Formal_Params_F_Params
     (Node : Bare_Entry_Completion_Formal_Params) return Bare_Params
   is
   begin
         return Node.Entry_Completion_Formal_Params_F_Params;
   end;
--# property-start EntryCompletionFormalParams.abstract_formal_params ada/nodes.lkt:4088
pragma Warnings (Off, "is not referenced");
 function Entry_Completion_Formal_Params_P_Abstract_Formal_Params
  (Node : Bare_Entry_Completion_Formal_Params
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Entry_Completion_Formal_Params  := Bare_Entry_Completion_Formal_Params (Node);
     Ent : Internal_Entity_Entry_Completion_Formal_Params :=
       Internal_Entity_Entry_Completion_Formal_Params'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_387 with Inline_Always;
            procedure Finalizer_Scope_2234 with Inline_Always;
      Var_Expr_68 : Internal_Entity_Params;
Fld : Internal_Entity_Params;
Fld_1 : Internal_Entity_Param_Spec_List;
Fld_2 : Bare_Param_Spec_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Param_Spec;
Bare_Item_0 : Bare_Param_Spec;
Cast_Expr : Internal_Entity_Param_Spec;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
As_Entity : Internal_Entity_Param_Spec;
Is_Null : Boolean;
If_Result : Internal_Entity_Param_Spec;
Map_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_387 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_387;
            procedure Finalizer_Scope_2234 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2234;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 2187 '<FieldAccess for params at nodes.lkt:4089:9>' Fld ada/nodes.lkt:4089
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Params (Node => Ent.Node.Entry_Completion_Formal_Params_F_Params, Info => Ent.Info);
--# expr-done 2187
Var_Expr_68 := Fld;
if Var_Expr_68 /= No_Entity_Params then
   --# scope-start
--# expr-start 2190 '<Map at nodes.lkt:4089:9>' Map_Result ada/nodes.lkt:4089
   --# expr-start 2188 '<FieldAccess for params at nodes.lkt:4089:9>' Fld_1 ada/nodes.lkt:4089
      if Var_Expr_68.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Param_Spec_List (Node => Var_Expr_68.Node.Params_F_Params, Info => Var_Expr_68.Info);
--# expr-done 2188
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Param_Spec_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Param_Spec;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind p Item_0
      --# expr-start 2189 '<Cast to BaseFormalParamDecl at nodes.lkt:4089:40>' Cast_Result ada/nodes.lkt:4089
Cast_Expr := Item_0; 
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-done 2189
         declare
            Item_To_Append : constant Internal_Entity_Base_Formal_Param_Decl := Cast_Result;
         begin
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2190
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2234;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_387;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_387;
                     Finalizer_Scope_2234;
            raise;
      end;
   return Property_Result;
end Entry_Completion_Formal_Params_P_Abstract_Formal_Params;
--# end
   --
   --  Primitives for Bare_Generic_Formal_Part
   --
      procedure Initialize_Fields_For_Generic_Formal_Part
        (Self : Bare_Generic_Formal_Part
         ; Generic_Formal_Part_F_Decls : Bare_Ada_Node_List
        ) is
      begin
            Self.Generic_Formal_Part_F_Decls := Generic_Formal_Part_F_Decls;
      end Initialize_Fields_For_Generic_Formal_Part;
   function Generic_Formal_Part_F_Decls
     (Node : Bare_Generic_Formal_Part) return Bare_Ada_Node_List
   is
   begin
         return Node.Generic_Formal_Part_F_Decls;
   end;
--# property-start GenericFormalPart.abstract_formal_params ada/nodes.lkt:4097
pragma Warnings (Off, "is not referenced");
 function Generic_Formal_Part_P_Abstract_Formal_Params
  (Node : Bare_Generic_Formal_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Generic_Formal_Part  := Bare_Generic_Formal_Part (Node);
     Ent : Internal_Entity_Generic_Formal_Part :=
       Internal_Entity_Generic_Formal_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_388 with Inline_Always;
      Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_7 : Internal_Entity;
Bare_Item_7 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Is_A : Boolean;
Map_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_388 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_388;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2194 '<FilterMap at nodes.lkt:4098:9>' Map_Result ada/nodes.lkt:4098
   --# expr-start 2191 '<FieldAccess for decls at nodes.lkt:4098:9>' Fld ada/nodes.lkt:4098
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Ent.Node.Generic_Formal_Part_F_Decls, Info => Ent.Info);
--# expr-done 2191
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Formal_Param_Decl_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_7 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_7 := Untyped_Item_7; 
Is_Null := Bare_Item_7 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_7); 
   If_Result := As_Entity;
end if;
                  Item_7 := If_Result; 
   --# scope-start
               --# bind e Item_7
         --# expr-start 2192 '<IsA BaseFormalParamDecl at ???>' Is_A None
Is_A := Item_7.Node /= null 
and then Item_7.Node.Kind in Ada_Base_Formal_Param_Decl; 
--# expr-done 2192
         if Is_A then
      --# expr-start 2193 '<Cast to BaseFormalParamDecl at ???>' Cast_Result None
Cast_Expr := Item_7; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Formal_Param_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Formal_Param_Decl;
   end if;
--# expr-done 2193
         declare
            Item_To_Append : constant Internal_Entity_Base_Formal_Param_Decl := Cast_Result;
         begin
            Internal_Entity_Base_Formal_Param_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Formal_Param_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Formal_Param_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Formal_Param_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Formal_Param_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Formal_Param_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2194
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_388;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_388;
            raise;
      end;
   return Property_Result;
end Generic_Formal_Part_P_Abstract_Formal_Params;
--# end
--# property-start GenericFormalPart.use_clauses_envs ada/nodes.lkt:4104
pragma Warnings (Off, "is not referenced");
 function Generic_Formal_Part_P_Use_Clauses_Envs
  (Node : Bare_Generic_Formal_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Generic_Formal_Part  := Bare_Generic_Formal_Part (Node);
     Ent : Internal_Entity_Generic_Formal_Part :=
       Internal_Entity_Generic_Formal_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_389 with Inline_Always;
            procedure Finalizer_Scope_2237 with Inline_Always;
      Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Use_Clause;
Fld_3 : Lexical_Env := Empty_Env;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Is_A : Boolean;
Map_Result : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_389 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_389;
            procedure Finalizer_Scope_2237 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2237;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2200 '<env_group at nodes.lkt:4105:9>' Group_Env ada/nodes.lkt:4105
--# expr-start 2199 '<Map at nodes.lkt:4105:9>' Map_Result ada/nodes.lkt:4105
   --# expr-start 2195 '<FieldAccess for decls at nodes.lkt:4105:9>' Fld ada/nodes.lkt:4105
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Ent.Node.Generic_Formal_Part_F_Decls, Info => Ent.Info);
--# expr-done 2195
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Lexical_Env_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind u Item_0
         --# expr-start 2196 '<IsA UseClause at nodes.lkt:4107:20>' Is_A ada/nodes.lkt:4107
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Use_Clause; 
--# expr-done 2196
         if Is_A then
      --# expr-start 2198 '<FieldAccess for used_envs at nodes.lkt:4106:20>' Fld_3 ada/nodes.lkt:4106
--# expr-start 2197 '<Cast to UseClause at nodes.lkt:4106:20>' Cast_Result ada/nodes.lkt:4106
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Use_Clause
   then
      Cast_Result := Create_Internal_Entity_Use_Clause
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Use_Clause;
   end if;
--# expr-done 2197
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UseClause.used_envs
Fld_3 := Libadalang.Implementation.Use_Clause_P_Used_Envs (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 2198
         declare
            Item_To_Append : constant Lexical_Env := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
      Finalizer_Scope_2237;
         end loop;
      end;
      end if;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2199
Group_Env := Group (Map_Result, No_Metadata); 
--# expr-done 2200
         Property_Result := Group_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_389;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_389;
                     Finalizer_Scope_2237;
            raise;
      end;
   return Property_Result;
end Generic_Formal_Part_P_Use_Clauses_Envs;
--# end
   --
   --  Primitives for Bare_Base_Record_Def
   --
      procedure Initialize_Fields_For_Base_Record_Def
        (Self : Bare_Base_Record_Def
         ; Base_Record_Def_F_Components : Bare_Component_List
        ) is
      begin
            Self.Base_Record_Def_F_Components := Base_Record_Def_F_Components;
      end Initialize_Fields_For_Base_Record_Def;
   function Base_Record_Def_F_Components
     (Node : Bare_Base_Record_Def) return Bare_Component_List
   is
   begin
         return Node.Base_Record_Def_F_Components;
   end;
--# property-start BaseRecordDef.comps ada/nodes.lkt:4119
pragma Warnings (Off, "is not referenced");
 function Base_Record_Def_P_Comps
  (Node : Bare_Base_Record_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Component_List
is
   Self : Bare_Base_Record_Def  := Bare_Base_Record_Def (Node);
     Ent : Internal_Entity_Base_Record_Def :=
       Internal_Entity_Base_Record_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Component_List;
      Fld : Internal_Entity_Component_List;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2201 '<FieldAccess for components at nodes.lkt:4119:42>' Fld ada/nodes.lkt:4119
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Component_List (Node => Ent.Node.Base_Record_Def_F_Components, Info => Ent.Info);
--# expr-done 2201
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Record_Def_P_Comps;
--# end
   --
   --  Primitives for Bare_Null_Record_Def
   --
      procedure Initialize_Fields_For_Null_Record_Def
        (Self : Bare_Null_Record_Def
         ; Base_Record_Def_F_Components : Bare_Component_List
        ) is
      begin
            Initialize_Fields_For_Base_Record_Def
              (Self, Base_Record_Def_F_Components);
      end Initialize_Fields_For_Null_Record_Def;
   --
   --  Primitives for Bare_Record_Def
   --
      procedure Initialize_Fields_For_Record_Def
        (Self : Bare_Record_Def
         ; Base_Record_Def_F_Components : Bare_Component_List
        ) is
      begin
            Initialize_Fields_For_Base_Record_Def
              (Self, Base_Record_Def_F_Components);
      end Initialize_Fields_For_Record_Def;
   --
   --  Primitives for Bare_Basic_Assoc
   --
--# property-start '[dispatcher]BasicAssoc.expr' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Assoc_P_Expr
  (Node : Bare_Basic_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Basic_Assoc  := Bare_Basic_Assoc (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Assoc (Self.Kind) is
               when Ada_Aggregate_Assoc .. Ada_Multi_Dim_Array_Assoc =>
                  --# property-call-start AggregateAssoc.expr
                  Property_Result := Aggregate_Assoc_P_Expr
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Composite_Constraint_Assoc =>
                  --# property-call-start CompositeConstraintAssoc.expr
                  Property_Result := Composite_Constraint_Assoc_P_Expr
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Iterated_Assoc =>
                  --# property-call-start IteratedAssoc.expr
                  Property_Result := Iterated_Assoc_P_Expr
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Param_Assoc =>
                  --# property-call-start ParamAssoc.expr
                  Property_Result := Param_Assoc_P_Expr
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Assoc_P_Expr;
--# end
--# property-start '[dispatcher]BasicAssoc.names' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Assoc_P_Names
  (Node : Bare_Basic_Assoc
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Basic_Assoc  := Bare_Basic_Assoc (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Assoc (Self.Kind) is
               when Ada_Aggregate_Assoc .. Ada_Multi_Dim_Array_Assoc =>
                  --# property-call-start AggregateAssoc.names
                  Property_Result := Aggregate_Assoc_P_Names
                    (Self
                    );
                  --# end
               when Ada_Composite_Constraint_Assoc =>
                  --# property-call-start CompositeConstraintAssoc.names
                  Property_Result := Composite_Constraint_Assoc_P_Names
                    (Self
                    );
                  --# end
               when Ada_Iterated_Assoc =>
                  --# property-call-start IteratedAssoc.names
                  Property_Result := Iterated_Assoc_P_Names
                    (Self
                    );
                  --# end
               when Ada_Param_Assoc =>
                  --# property-call-start ParamAssoc.names
                  Property_Result := Param_Assoc_P_Names
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Assoc_P_Names;
--# end
--# property-start BasicAssoc.get_params ada/nodes.lkt:4143
pragma Warnings (Off, "is not referenced");
 function Basic_Assoc_P_Get_Params
  (Node : Bare_Basic_Assoc
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Basic_Assoc  := Bare_Basic_Assoc (Node);
     Ent : Internal_Entity_Basic_Assoc :=
       Internal_Entity_Basic_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_159 with Inline_Always;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Assoc_List;
Fld_1 : Internal_Param_Actual_Array_Access;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_159 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_159;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 2209 '<Map at nodes.lkt:4144:9>' Map_Result ada/nodes.lkt:4144
   --# expr-start 2204 '<FieldAccess for zip_with_params at nodes.lkt:4144:9>' Fld_1 ada/nodes.lkt:4144
--# expr-start 2203 '<Cast to AssocList at nodes.lkt:4144:9>' Cast_Result ada/nodes.lkt:4144
--# expr-start 2202 '<parent at nodes.lkt:4144:9>' Fld ada/nodes.lkt:4144
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2202
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Assoc_List_Range
   then
      Cast_Result := Create_Internal_Entity_Assoc_List
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 2203
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.zip_with_params
Fld_1 := Libadalang.Implementation.Assoc_List_P_Zip_With_Params (Node => Cast_Result.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result.Info);
--# end
--# expr-done 2204
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Actual_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_0
         --# expr-start 2207 '<Eq at nodes.lkt:4146:20>' Is_Equiv ada/nodes.lkt:4146
--# expr-start 2205 '<FieldAccess for actual at nodes.lkt:4146:20>' Fld_3 ada/nodes.lkt:4146
Fld_3 := Item_0.Actual;
--# expr-done 2205
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
--# expr-start 2206 '<FieldAccess for expr at nodes.lkt:4146:32>' Fld_4 ada/nodes.lkt:4146
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2206
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 2207
         if Is_Equiv then
      --# expr-start 2208 '<FieldAccess for param at nodes.lkt:4145:20>' Fld_2 ada/nodes.lkt:4145
Fld_2 := Item_0.Param;
--# expr-done 2208
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Fld_2;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2209
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_159;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_159;
            raise;
      end;
   return Property_Result;
end Basic_Assoc_P_Get_Params;
--# end
   --
   --  Primitives for Bare_Aggregate_Assoc
   --
      procedure Initialize_Fields_For_Aggregate_Assoc
        (Self : Bare_Aggregate_Assoc
         ; Aggregate_Assoc_F_Designators : Bare_Alternatives_List
         ; Aggregate_Assoc_F_R_Expr : Bare_Expr
        ) is
      begin
            Self.Aggregate_Assoc_F_Designators := Aggregate_Assoc_F_Designators;
            Self.Aggregate_Assoc_F_R_Expr := Aggregate_Assoc_F_R_Expr;
      end Initialize_Fields_For_Aggregate_Assoc;
   function Aggregate_Assoc_F_Designators
     (Node : Bare_Aggregate_Assoc) return Bare_Alternatives_List
   is
   begin
         return Node.Aggregate_Assoc_F_Designators;
   end;
   function Aggregate_Assoc_F_R_Expr
     (Node : Bare_Aggregate_Assoc) return Bare_Expr
   is
   begin
         return Node.Aggregate_Assoc_F_R_Expr;
   end;
--# property-start AggregateAssoc.expr ada/nodes.lkt:4157
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Expr
  (Node : Bare_Aggregate_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Fld : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2210 '<FieldAccess for r_expr at nodes.lkt:4157:32>' Fld ada/nodes.lkt:4157
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Aggregate_Assoc_F_R_Expr, Info => Ent.Info);
--# expr-done 2210
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Expr;
--# end
--# property-start AggregateAssoc.names ada/nodes.lkt:4159
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Names
  (Node : Bare_Aggregate_Assoc
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_392 with Inline_Always;
      Fld : Bare_Alternatives_List;
Item_0 : Bare_Ada_Node;
Map_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_392 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_392;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2212 '<Map at nodes.lkt:4159:35>' Map_Result ada/nodes.lkt:4159
   --# expr-start 2211 '<FieldAccess for designators at nodes.lkt:4159:35>' Fld ada/nodes.lkt:4159
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Aggregate_Assoc_F_Designators;
--# expr-done 2211
      declare
         Map_Result_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind d Item_0
         declare
            Item_To_Append : constant Bare_Ada_Node := Item_0;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2212
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_392;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_392;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Names;
--# end
--# property-start AggregateAssoc.xref_stop_resolution ada/nodes.lkt:4162
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Xref_Stop_Resolution
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Xref_Stop_Resolution;
--# end
--# property-start AggregateAssoc.base_aggregate ada/nodes.lkt:4164
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Base_Aggregate
  (Node : Bare_Aggregate_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Aggregate
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Aggregate;
      Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Aggregate;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2215 '<Cast to BaseAggregate at nodes.lkt:4165:9>' Cast_Result ada/nodes.lkt:4165
--# expr-start 2214 '<parent at nodes.lkt:4165:9>' Fld_1 ada/nodes.lkt:4165
--# expr-start 2213 '<parent at nodes.lkt:4165:9>' Fld ada/nodes.lkt:4165
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2213
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 2214
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Base_Aggregate
   then
      Cast_Result := Create_Internal_Entity_Base_Aggregate
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 2215
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Base_Aggregate;
--# end
--# property-start AggregateAssoc.xref_equation ada/nodes.lkt:4168
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Xref_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_395 with Inline_Always;
      Local_Agg : Internal_Entity_Base_Aggregate;
Local_Mra : Internal_Multidim_Aggregate_Info;
Local_Td : Internal_Entity_Base_Type_Decl;
Local_Atd : Internal_Entity_Array_Type_Def;
Var_Expr_69 : Internal_Entity_Base_Type_Decl;
Var_Expr_70 : Internal_Entity_Aspect_Assoc;
Var_Expr_71 : Internal_Entity_Aspect_Assoc;
Var_Expr_72 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Aggregate;
Fld_1 : Internal_Multidim_Aggregate_Info;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Aggregate;
Fld_4 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Is_Equal : Boolean;
Not_Val : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_5 : Internal_Entity_Array_Type_Def;
Scope_Result : Internal_Entity_Array_Type_Def;
Result_Var : Internal_Entity_Array_Type_Def;
Fld_6 : Logic_Equation;
Fld_7 : Logic_Equation;
Fld_8 : Logic_Equation;
Fld_9 : Logic_Equation;
Fld_10 : Logic_Equation;
Fld_11 : Logic_Equation;
Fld_12 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_13 : Logic_Equation;
Fld_14 : Logic_Equation;
Fld_15 : Logic_Equation;
Is_Null : Boolean;
If_Result_1 : Logic_Equation;
Is_A : Boolean;
If_Result_2 : Logic_Equation;
Fld_16 : Internal_Entity;
Is_A_1 : Boolean;
If_Result_3 : Logic_Equation;
Is_A_2 : Boolean;
Sym : Symbol_Type;
Fld_17 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : Logic_Equation;
Fld_18 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Aspect_Assoc;
Fld_19 : Internal_Entity_Name;
Sym_1 : Symbol_Type;
Fld_20 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_6 : Logic_Equation;
Fld_21 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Aspect_Assoc;
Fld_22 : Internal_Entity_Name;
Sym_2 : Symbol_Type;
Fld_23 : Boolean;
Scope_Result_3 : Boolean;
Result_Var_3 : Boolean;
If_Result_7 : Logic_Equation;
Sym_3 : Symbol_Type;
Fld_24 : Boolean;
If_Result_8 : Logic_Equation;
Sym_4 : Symbol_Type;
Fld_25 : Boolean;
If_Result_9 : Logic_Equation;
Sym_5 : Symbol_Type;
Fld_26 : Boolean;
Sym_6 : Symbol_Type;
Fld_27 : Boolean;
If_Result_10 : Boolean;
If_Result_11 : Logic_Equation;
Sym_7 : Symbol_Type;
Fld_28 : Boolean;
Sym_8 : Symbol_Type;
Fld_29 : Boolean;
If_Result_12 : Boolean;
If_Result_13 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
            procedure Finalizer_Scope_395 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (If_Result_7);
                     Dec_Ref (If_Result_8);
                     Dec_Ref (If_Result_9);
                     Dec_Ref (If_Result_11);
                     Dec_Ref (If_Result_13);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_395;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2281 '<Let at nodes.lkt:4169:9>' Let_Result_3 ada/nodes.lkt:4169
--# scope-start
--# expr-start 2216 '<FieldAccess for base_aggregate at nodes.lkt:4169:19>' Fld ada/nodes.lkt:4169
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.base_aggregate
Fld := Libadalang.Implementation.Aggregate_Assoc_P_Base_Aggregate (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2216
Local_Agg := Fld; 
--# bind agg Local_Agg
--# expr-start 2280 '<Let at nodes.lkt:4170:9>' Let_Result_2 ada/nodes.lkt:4170
--# scope-start
--# expr-start 2217 '<FieldAccess for multidim_root_aggregate at nodes.lkt:4170:19>' Fld_1 ada/nodes.lkt:4170
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.multidim_root_aggregate
Fld_1 := Libadalang.Implementation.Base_Aggregate_P_Multidim_Root_Aggregate (Node => Local_Agg.Node, Origin => Origin, E_Info => Local_Agg.Info);
--# end
--# expr-done 2217
Local_Mra := Fld_1; 
--# bind mra Local_Mra
--# expr-start 2279 '<Let at nodes.lkt:4174:9>' Let_Result_1 ada/nodes.lkt:4174
--# scope-start
--# expr-start 2224 '<If at nodes.lkt:4175:13>' If_Result ada/nodes.lkt:4175
--# expr-start 2219 '<Not at nodes.lkt:4175:16>' Not_Val ada/nodes.lkt:4175
--# expr-start 2218 '<IsNull at nodes.lkt:4175:20>' Is_Equal ada/nodes.lkt:4175
Is_Equal := Local_Mra = No_Multidim_Aggregate_Info; 
--# expr-done 2218
Not_Val := not (Is_Equal); 
--# expr-done 2219
if Not_Val then
   --# expr-start 2220 '<FieldAccess for typ at nodes.lkt:4175:37>' Fld_2 ada/nodes.lkt:4175
Fld_2 := Local_Mra.Typ;
--# expr-done 2220
   If_Result := Fld_2;
else
   --# expr-start 2223 '<Cast to BaseTypeDecl at nodes.lkt:4176:18>' Cast_Result ada/nodes.lkt:4176
--# expr-start 2222 '<FieldAccess for type_val at nodes.lkt:4176:18>' Fld_4 ada/nodes.lkt:4176
--# expr-start 2221 '<FieldAccess for base_aggregate at nodes.lkt:4176:18>' Fld_3 ada/nodes.lkt:4176
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.base_aggregate
Fld_3 := Libadalang.Implementation.Aggregate_Assoc_P_Base_Aggregate (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2221
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_4 := Libadalang.Implementation.Expr_P_Type_Val (Node => Fld_3.Node);
--# end
--# expr-done 2222
   if Fld_4.Node = null
      or else Fld_4.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 2223
   If_Result := Cast_Result;
end if;
--# expr-done 2224
Local_Td := If_Result; 
--# bind td Local_Td
--# expr-start 2278 '<Let at nodes.lkt:4178:9>' Let_Result ada/nodes.lkt:4178
--# scope-start
Var_Expr_69 := Local_Td;
if Var_Expr_69 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 2225 '<FieldAccess for array_def at nodes.lkt:4178:19>' Fld_5 ada/nodes.lkt:4178
      if Var_Expr_69.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.array_def'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Array_Def (Node => Var_Expr_69.Node, Origin => Origin, E_Info => Var_Expr_69.Info);
--# end
--# expr-done 2225
Scope_Result := Fld_5;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Array_Type_Def;
end if;
Local_Atd := Result_Var; 
--# bind atd Local_Atd
--# expr-start 2277 '<If at nodes.lkt:4180:9>' If_Result_13 ada/nodes.lkt:4180
--# expr-start 2230 '<BooleanBinaryOp Or at nodes.lkt:4180:12>' If_Result_12 ada/nodes.lkt:4180
--# expr-start 2227 '<FieldAccess for in_aspect at nodes.lkt:4180:12>' Fld_28 ada/nodes.lkt:4180
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2226 '<Symbol Global at nodes.lkt:4180:26>' Sym_7 ada/nodes.lkt:4180
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Global); 
--# expr-done 2226
--# property-call-start AdaNode.in_aspect
Fld_28 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Local_Agg.Node, Name => Sym_7);
--# end
--# expr-done 2227
if Fld_28 then
   If_Result_12 := True;
else
   --# expr-start 2229 '<FieldAccess for in_aspect at nodes.lkt:4180:40>' Fld_29 ada/nodes.lkt:4180
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2228 '<Symbol Refined_Global at nodes.lkt:4180:54>' Sym_8 ada/nodes.lkt:4180
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Global); 
--# expr-done 2228
--# property-call-start AdaNode.in_aspect
Fld_29 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Local_Agg.Node, Name => Sym_8);
--# end
--# expr-done 2229
   If_Result_12 := Fld_29;
end if;
--# expr-done 2230
if If_Result_12 then
   --# expr-start 2231 '<FieldAccess for globals_assoc_equation at nodes.lkt:4181:14>' Fld_6 ada/nodes.lkt:4181
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.globals_assoc_equation
Fld_6 := Libadalang.Implementation.Aggregate_Assoc_P_Globals_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2231
   If_Result_13 := Fld_6;
else
   --# expr-start 2276 '<If at nodes.lkt:4180:9>' If_Result_11 ada/nodes.lkt:4180
--# expr-start 2236 '<BooleanBinaryOp Or at nodes.lkt:4182:14>' If_Result_10 ada/nodes.lkt:4182
--# expr-start 2233 '<FieldAccess for in_aspect at nodes.lkt:4182:14>' Fld_26 ada/nodes.lkt:4182
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2232 '<Symbol Depends at nodes.lkt:4182:28>' Sym_5 ada/nodes.lkt:4182
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Depends); 
--# expr-done 2232
--# property-call-start AdaNode.in_aspect
Fld_26 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Local_Agg.Node, Name => Sym_5);
--# end
--# expr-done 2233
if Fld_26 then
   If_Result_10 := True;
else
   --# expr-start 2235 '<FieldAccess for in_aspect at nodes.lkt:4182:43>' Fld_27 ada/nodes.lkt:4182
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2234 '<Symbol Refined_Depends at nodes.lkt:4182:57>' Sym_6 ada/nodes.lkt:4182
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Depends); 
--# expr-done 2234
--# property-call-start AdaNode.in_aspect
Fld_27 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Local_Agg.Node, Name => Sym_6);
--# end
--# expr-done 2235
   If_Result_10 := Fld_27;
end if;
--# expr-done 2236
if If_Result_10 then
   --# expr-start 2237 '<FieldAccess for depends_assoc_equation at nodes.lkt:4183:14>' Fld_7 ada/nodes.lkt:4183
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.depends_assoc_equation
Fld_7 := Libadalang.Implementation.Aggregate_Assoc_P_Depends_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2237
   If_Result_11 := Fld_7;
else
   --# expr-start 2275 '<If at nodes.lkt:4180:9>' If_Result_9 ada/nodes.lkt:4180
--# expr-start 2239 '<FieldAccess for in_aspect at nodes.lkt:4184:14>' Fld_25 ada/nodes.lkt:4184
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2238 '<Symbol Test_Case at nodes.lkt:4184:28>' Sym_4 ada/nodes.lkt:4184
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Test_Case); 
--# expr-done 2238
--# property-call-start AdaNode.in_aspect
Fld_25 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Local_Agg.Node, Name => Sym_4);
--# end
--# expr-done 2239
if Fld_25 then
   --# expr-start 2240 '<FieldAccess for test_case_assoc_equation at nodes.lkt:4184:47>' Fld_8 ada/nodes.lkt:4184
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.test_case_assoc_equation
Fld_8 := Libadalang.Implementation.Aggregate_Assoc_P_Test_Case_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2240
   If_Result_9 := Fld_8;
else
   --# expr-start 2274 '<If at nodes.lkt:4180:9>' If_Result_8 ada/nodes.lkt:4180
--# expr-start 2242 '<FieldAccess for in_aspect at nodes.lkt:4185:14>' Fld_24 ada/nodes.lkt:4185
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2241 '<Symbol Refined_State at nodes.lkt:4185:28>' Sym_3 ada/nodes.lkt:4185
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_State); 
--# expr-done 2241
--# property-call-start AdaNode.in_aspect
Fld_24 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Local_Agg.Node, Name => Sym_3);
--# end
--# expr-done 2242
if Fld_24 then
   --# expr-start 2243 '<FieldAccess for exprs_assoc_equation at nodes.lkt:4189:13>' Fld_9 ada/nodes.lkt:4189
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.exprs_assoc_equation
Fld_9 := Libadalang.Implementation.Aggregate_Assoc_P_Exprs_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2243
   If_Result_8 := Fld_9;
else
   --# expr-start 2273 '<If at nodes.lkt:4180:9>' If_Result_7 ada/nodes.lkt:4180
--# expr-start 2245 '<Cast to AspectAssoc at nodes.lkt:4196:14>' Cast_Result_2 ada/nodes.lkt:4196
--# expr-start 2244 '<parent at nodes.lkt:4196:14>' Fld_21 ada/nodes.lkt:4196
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Libadalang.Implementation.Parent (Node => Local_Agg.Node, E_Info => Local_Agg.Info);
--# expr-done 2244
   if Fld_21.Node = null
      or else Fld_21.Node.Kind in Ada_Aspect_Assoc_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Aspect_Assoc
        (Node => Fld_21.Node,
         Info => Fld_21.Info);
   else
         Cast_Result_2 := No_Entity_Aspect_Assoc;
   end if;
--# expr-done 2245
Var_Expr_70 := Cast_Result_2;
if Var_Expr_70 /= No_Entity_Aspect_Assoc then
   --# scope-start
--# expr-start 2248 '<FieldAccess for name_is at nodes.lkt:4196:14>' Fld_23 ada/nodes.lkt:4196
--# expr-start 2246 '<FieldAccess for id at nodes.lkt:4196:14>' Fld_22 ada/nodes.lkt:4196
      if Var_Expr_70.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Create_Internal_Entity_Name (Node => Var_Expr_70.Node.Aspect_Assoc_F_Id, Info => Var_Expr_70.Info);
--# expr-done 2246
      if Fld_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2247 '<Symbol Contract_Cases at nodes.lkt:4196:53>' Sym_2 ada/nodes.lkt:4196
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Contract_Cases); 
--# expr-done 2247
--# property-call-start Name.name_is
Fld_23 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_22.Node, Sym => Sym_2);
--# end
--# expr-done 2248
Scope_Result_3 := Fld_23;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := False;
end if;
if Result_Var_3 then
   --# expr-start 2249 '<FieldAccess for contract_cases_assoc_equation at nodes.lkt:4197:14>' Fld_10 ada/nodes.lkt:4197
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.contract_cases_assoc_equation
Fld_10 := Libadalang.Implementation.Aggregate_Assoc_P_Contract_Cases_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2249
   If_Result_7 := Fld_10;
else
   --# expr-start 2272 '<If at nodes.lkt:4180:9>' If_Result_6 ada/nodes.lkt:4180
--# expr-start 2251 '<Cast to AspectAssoc at nodes.lkt:4198:14>' Cast_Result_1 ada/nodes.lkt:4198
--# expr-start 2250 '<parent at nodes.lkt:4198:14>' Fld_18 ada/nodes.lkt:4198
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Libadalang.Implementation.Parent (Node => Local_Agg.Node, E_Info => Local_Agg.Info);
--# expr-done 2250
   if Fld_18.Node = null
      or else Fld_18.Node.Kind in Ada_Aspect_Assoc_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Aspect_Assoc
        (Node => Fld_18.Node,
         Info => Fld_18.Info);
   else
         Cast_Result_1 := No_Entity_Aspect_Assoc;
   end if;
--# expr-done 2251
Var_Expr_71 := Cast_Result_1;
if Var_Expr_71 /= No_Entity_Aspect_Assoc then
   --# scope-start
--# expr-start 2254 '<FieldAccess for name_is at nodes.lkt:4198:14>' Fld_20 ada/nodes.lkt:4198
--# expr-start 2252 '<FieldAccess for id at nodes.lkt:4198:14>' Fld_19 ada/nodes.lkt:4198
      if Var_Expr_71.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Name (Node => Var_Expr_71.Node.Aspect_Assoc_F_Id, Info => Var_Expr_71.Info);
--# expr-done 2252
      if Fld_19.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2253 '<Symbol Subprogram_Variant at nodes.lkt:4198:53>' Sym_1 ada/nodes.lkt:4198
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Subprogram_Variant); 
--# expr-done 2253
--# property-call-start Name.name_is
Fld_20 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_19.Node, Sym => Sym_1);
--# end
--# expr-done 2254
Scope_Result_2 := Fld_20;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
if Result_Var_2 then
   --# expr-start 2255 '<FieldAccess for subprogram_variant_assoc_equation at nodes.lkt:4199:14>' Fld_11 ada/nodes.lkt:4199
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.subprogram_variant_assoc_equation
Fld_11 := Libadalang.Implementation.Aggregate_Assoc_P_Subprogram_Variant_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2255
   If_Result_6 := Fld_11;
else
   --# expr-start 2271 '<If at nodes.lkt:4180:9>' If_Result_5 ada/nodes.lkt:4180
--# expr-start 2259 '<BooleanBinaryOp And at nodes.lkt:4200:14>' If_Result_4 ada/nodes.lkt:4200
--# expr-start 2256 '<IsA BracketAggregate at nodes.lkt:4200:14>' Is_A_2 ada/nodes.lkt:4200
Is_A_2 := Local_Agg.Node /= null 
and then Local_Agg.Node.Kind in Ada_Bracket_Aggregate_Range; 
--# expr-done 2256
if Is_A_2 then
Var_Expr_72 := Local_Td;
if Var_Expr_72 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 2258 '<FieldAccess for has_aspect at nodes.lkt:4200:42>' Fld_17 ada/nodes.lkt:4200
      if Var_Expr_72.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2257 '<Symbol Aggregate at nodes.lkt:4200:57>' Sym ada/nodes.lkt:4200
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aggregate); 
--# expr-done 2257
--# property-call-start BasicDecl.has_aspect
Fld_17 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Var_Expr_72.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Var_Expr_72.Info);
--# end
--# expr-done 2258
Scope_Result_1 := Fld_17;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_4 := Result_Var_1;
else
   If_Result_4 := False;
end if;
--# expr-done 2259
if If_Result_4 then
   --# expr-start 2260 '<FieldAccess for container_aggregate_equation at nodes.lkt:4201:14>' Fld_12 ada/nodes.lkt:4201
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.container_aggregate_equation
Fld_12 := Libadalang.Implementation.Aggregate_Assoc_P_Container_Aggregate_Equation (Node => Ent.Node, Td => Local_Td, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2260
   If_Result_5 := Fld_12;
else
   --# expr-start 2270 '<If at nodes.lkt:4180:9>' If_Result_3 ada/nodes.lkt:4180
--# expr-start 2262 '<IsA AspectClause, AspectAssoc, PragmaArgumentAssoc at nodes.lkt:4202:14>' Is_A_1 ada/nodes.lkt:4202
--# expr-start 2261 '<parent at nodes.lkt:4202:14>' Fld_16 ada/nodes.lkt:4202
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Parent (Node => Local_Agg.Node, E_Info => Local_Agg.Info);
--# expr-done 2261
Is_A_1 := Fld_16.Node /= null 
and then Fld_16.Node.Kind in Ada_Aspect_Clause | Ada_Aspect_Assoc_Range | Ada_Pragma_Argument_Assoc_Range; 
--# expr-done 2262
if Is_A_1 then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4203:14") else null)); 
   If_Result_3 := True_Rel;
else
   --# expr-start 2269 '<If at nodes.lkt:4180:9>' If_Result_2 ada/nodes.lkt:4180
--# expr-start 2263 '<IsA DeltaAggregate at nodes.lkt:4204:14>' Is_A ada/nodes.lkt:4204
Is_A := Local_Agg.Node /= null 
and then Local_Agg.Node.Kind in Ada_Delta_Aggregate_Range; 
--# expr-done 2263
if Is_A then
   --# expr-start 2264 '<FieldAccess for delta_aggregate_assoc_equation at nodes.lkt:4204:41>' Fld_13 ada/nodes.lkt:4204
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.delta_aggregate_assoc_equation
Fld_13 := Libadalang.Implementation.Aggregate_Assoc_P_Delta_Aggregate_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2264
   If_Result_2 := Fld_13;
else
   --# expr-start 2268 '<If at nodes.lkt:4180:9>' If_Result_1 ada/nodes.lkt:4180
--# expr-start 2265 '<IsNull at nodes.lkt:4205:14>' Is_Null ada/nodes.lkt:4205
Is_Null := Local_Atd.Node = null; 
--# expr-done 2265
if Is_Null then
   --# expr-start 2266 '<FieldAccess for record_assoc_equation at nodes.lkt:4205:31>' Fld_14 ada/nodes.lkt:4205
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.record_assoc_equation
Fld_14 := Libadalang.Implementation.Aggregate_Assoc_P_Record_Assoc_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2266
   If_Result_1 := Fld_14;
else
   --# expr-start 2267 '<FieldAccess for array_assoc_equation at nodes.lkt:4206:14>' Fld_15 ada/nodes.lkt:4206
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.array_assoc_equation
Fld_15 := Libadalang.Implementation.Aggregate_Assoc_P_Array_Assoc_Equation (Node => Ent.Node, Atd => Local_Atd, Mra => Local_Mra, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 2267
   If_Result_1 := Fld_15;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2268
   If_Result_2 := If_Result_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 2269
   If_Result_3 := If_Result_2;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 2270
   If_Result_5 := If_Result_3;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 2271
   If_Result_6 := If_Result_5;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 2272
   If_Result_7 := If_Result_6;
end if;
      Inc_Ref (If_Result_7);
--# expr-done 2273
   If_Result_8 := If_Result_7;
end if;
      Inc_Ref (If_Result_8);
--# expr-done 2274
   If_Result_9 := If_Result_8;
end if;
      Inc_Ref (If_Result_9);
--# expr-done 2275
   If_Result_11 := If_Result_9;
end if;
      Inc_Ref (If_Result_11);
--# expr-done 2276
   If_Result_13 := If_Result_11;
end if;
      Inc_Ref (If_Result_13);
--# expr-done 2277
Let_Result := If_Result_13; Inc_Ref (Let_Result);
--# end
--# expr-done 2278
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2279
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 2280
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 2281
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_395;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_395;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Xref_Equation;
--# end
--# property-start AggregateAssoc.container_aggregate_equation ada/nodes.lkt:4212
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Container_Aggregate_Equation
  (Node : Bare_Aggregate_Assoc
      ; Td : Internal_Entity_Base_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind td Td
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_396 with Inline_Always;
      Local_Aggregate_Aspect : Internal_Entity_Aggregate;
Local_Entity_Name : Bare_Name;
Local_Element_Type : Internal_Entity_Base_Type_Decl;
Local_Key_Type : Internal_Entity_Base_Type_Decl;
Sym : Symbol_Type;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Aggregate;
Fld_2 : Bare_Ada_Node_Array_Access;
Get_Result : Bare_Ada_Node;
Cast_Result_1 : Bare_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_7 : Internal_Entity_Expr;
Fld_8 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Logic_Equation;
And_Pred_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_11 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld_12 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_13 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Is_Null_1 : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
            procedure Finalizer_Scope_396 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_8);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_10);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_12);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_13);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_396;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2313 '<Let at nodes.lkt:4213:9>' Let_Result_3 ada/nodes.lkt:4213
--# scope-start
--# expr-start 2285 '<Cast to Aggregate at nodes.lkt:4213:32>' Cast_Result ada/nodes.lkt:4213
--# expr-start 2284 '<FieldAccess for value at nodes.lkt:4213:32>' Fld_1 ada/nodes.lkt:4213
--# expr-start 2283 '<FieldAccess for get_aspect at nodes.lkt:4213:32>' Fld ada/nodes.lkt:4213
      if Td.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2282 '<Symbol Aggregate at nodes.lkt:4213:46>' Sym ada/nodes.lkt:4213
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aggregate); 
--# expr-done 2282
--# property-call-start BasicDecl.get_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Td.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Td.Info);
--# end
--# expr-done 2283
Fld_1 := Fld.Value;
--# expr-done 2284
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result := Create_Internal_Entity_Aggregate
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Aggregate;
   end if;
--# expr-done 2285
Local_Aggregate_Aspect := Cast_Result; 
--# bind aggregate_aspect Local_Aggregate_Aspect
--# expr-start 2312 '<Let at nodes.lkt:4214:9>' Let_Result_2 ada/nodes.lkt:4214
--# scope-start
--# expr-start 2288 '<Cast to Name at nodes.lkt:4214:27>' Cast_Result_1 ada/nodes.lkt:4214
--# expr-start 2287 '<at at nodes.lkt:4214:27>' Get_Result ada/nodes.lkt:4214
--# expr-start 2286 '<FieldAccess for names at nodes.lkt:4214:27>' Fld_2 ada/nodes.lkt:4214
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2286
Get_Result := Get (Self, Fld_2, 0, True); 
--# expr-done 2287
   if Get_Result = null
      or else Get_Result.Kind in Ada_Name
   then
      Cast_Result_1 := Get_Result;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 2288
Local_Entity_Name := Cast_Result_1; 
--# bind entity_name Local_Entity_Name
--# expr-start 2311 '<Let at nodes.lkt:4215:9>' Let_Result_1 ada/nodes.lkt:4215
--# scope-start
--# expr-start 2289 '<FieldAccess for element_type at nodes.lkt:4215:28>' Fld_3 ada/nodes.lkt:4215
      if Local_Aggregate_Aspect.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Aggregate.element_type
Fld_3 := Libadalang.Implementation.Aggregate_P_Element_Type (Node => Local_Aggregate_Aspect.Node, E_Info => Local_Aggregate_Aspect.Info);
--# end
--# expr-done 2289
Local_Element_Type := Fld_3; 
--# bind element_type Local_Element_Type
--# expr-start 2310 '<Let at nodes.lkt:4216:9>' Let_Result ada/nodes.lkt:4216
--# scope-start
--# expr-start 2290 '<FieldAccess for key_type at nodes.lkt:4216:24>' Fld_4 ada/nodes.lkt:4216
      if Local_Aggregate_Aspect.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Aggregate.key_type
Fld_4 := Libadalang.Implementation.Aggregate_P_Key_Type (Node => Local_Aggregate_Aspect.Node, E_Info => Local_Aggregate_Aspect.Info);
--# end
--# expr-done 2290
Local_Key_Type := Fld_4; 
--# bind key_type Local_Key_Type
--# expr-start 2309 '<LogicBinaryOp And at nodes.lkt:4218:9>' And_Pred_4 ada/nodes.lkt:4218
--# expr-start 2299 '<LogicBinaryOp And at nodes.lkt:4218:9>' And_Pred_1 ada/nodes.lkt:4218
--# expr-start 2296 '<LogicBinaryOp And at nodes.lkt:4218:9>' And_Pred ada/nodes.lkt:4218
--# expr-start 2293 '<Bind at nodes.lkt:4218:9>' Bind_Result ada/nodes.lkt:4218
--# expr-start 2292 '<FieldAccess for expected_type_var at nodes.lkt:4218:9>' Fld_6 ada/nodes.lkt:4218
--# expr-start 2291 '<FieldAccess for expr at nodes.lkt:4218:9>' Fld_5 ada/nodes.lkt:4218
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2291
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_5.Node);
--# expr-done 2292
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
Cast_Expr := Local_Element_Type; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_6, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4218:9") else null)); 
--# expr-done 2293
--# expr-start 2295 '<FieldAccess for sub_equation at nodes.lkt:4219:14>' Fld_8 ada/nodes.lkt:4219
--# expr-start 2294 '<FieldAccess for expr at nodes.lkt:4219:14>' Fld_7 ada/nodes.lkt:4219
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2294
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_7.Info);
--# end
--# expr-done 2295
And_Pred := Create_And (Bind_Result, Fld_8, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4218:9") else null)); 
--# expr-done 2296
--# expr-start 2298 '<FieldAccess for matches_expected_type at nodes.lkt:4220:14>' Fld_10 ada/nodes.lkt:4220
--# expr-start 2297 '<FieldAccess for expr at nodes.lkt:4220:14>' Fld_9 ada/nodes.lkt:4220
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2297
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_10 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_9.Node, Origin => Origin);
--# end
--# expr-done 2298
And_Pred_1 := Create_And (And_Pred, Fld_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4218:9") else null)); 
--# expr-done 2299
--# expr-start 2308 '<If at nodes.lkt:4222:13>' If_Result_1 ada/nodes.lkt:4222
--# expr-start 2300 '<IsNull at nodes.lkt:4222:16>' Is_Null_1 ada/nodes.lkt:4222
Is_Null_1 := Local_Entity_Name = null; 
--# expr-done 2300
if Is_Null_1 then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4222:41") else null)); 
   If_Result_1 := True_Rel;
else
   --# expr-start 2307 '<LogicBinaryOp And at nodes.lkt:4224:17>' And_Pred_3 ada/nodes.lkt:4224
--# expr-start 2305 '<LogicBinaryOp And at nodes.lkt:4224:17>' And_Pred_2 ada/nodes.lkt:4224
--# expr-start 2302 '<Bind at nodes.lkt:4224:17>' Bind_Result_1 ada/nodes.lkt:4224
--# expr-start 2301 '<FieldAccess for expected_type_var at nodes.lkt:4224:17>' Fld_11 ada/nodes.lkt:4224
      if Local_Entity_Name = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Local_Entity_Name);
--# expr-done 2301
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
Cast_Expr_1 := Local_Key_Type; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_11, Cast_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4224:17") else null)); 
--# expr-done 2302
--# expr-start 2304 '<FieldAccess for sub_equation at nodes.lkt:4225:22>' Fld_12 ada/nodes.lkt:4225
--# expr-start 2303 '<as_entity at nodes.lkt:4225:22>' If_Result ada/nodes.lkt:4225
Is_Null := Local_Entity_Name = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
As_Entity := (Info => E_Info, Node => Local_Entity_Name); 
   If_Result := As_Entity;
end if;
--# expr-done 2303
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_12 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => If_Result.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => If_Result.Info);
--# end
--# expr-done 2304
And_Pred_2 := Create_And (Bind_Result_1, Fld_12, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4224:17") else null)); 
--# expr-done 2305
--# expr-start 2306 '<FieldAccess for matches_expected_type at nodes.lkt:4226:22>' Fld_13 ada/nodes.lkt:4226
      if Local_Entity_Name = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_13 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Local_Entity_Name, Origin => Origin);
--# end
--# expr-done 2306
And_Pred_3 := Create_And (And_Pred_2, Fld_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4224:17") else null)); 
--# expr-done 2307
   If_Result_1 := And_Pred_3;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2308
And_Pred_4 := Create_And (And_Pred_1, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4218:9") else null)); 
--# expr-done 2309
Let_Result := And_Pred_4; Inc_Ref (Let_Result);
--# end
--# expr-done 2310
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2311
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 2312
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 2313
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_396;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_396;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Container_Aggregate_Equation;
--# end
--# property-start AggregateAssoc.delta_aggregate_assoc_equation ada/nodes.lkt:4235
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Delta_Aggregate_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_397 with Inline_Always;
            procedure Finalizer_Scope_2246 with Inline_Always;
            procedure Finalizer_Scope_2250 with Inline_Always;
            procedure Finalizer_Scope_2251 with Inline_Always;
      Local_Agg : Internal_Entity_Base_Aggregate;
Local_Agg_Type : Internal_Entity_Base_Type_Decl;
Local_Positional_Assoc : Boolean;
Local_Agg_Components : Internal_Entity_Defining_Name_Array_Access;
Var_Expr_1 : Boolean;
Local_Matches : Internal_Entity_Expr_Array_Access;
Var_Expr_3 : Bare_Name;
Var_Expr_7 : Internal_Entity_Expr;
Var_Expr_73 : Bare_Name;
Fld : Internal_Entity_Base_Aggregate;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
Fld_3 : Bare_Ada_Node_Array_Access;
Cast_Expr : Bare_Ada_Node;
Cast_Result_1 : Bare_Name;
Fld_4 : Bare_Name;
Is_Null : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Quantifier_Result : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
Fld_5 : Boolean;
Not_Val_1 : Boolean;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_7 : Internal_Entity_Defining_Name_Array_Access;
Scope_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Result_Var_1 : Internal_Entity_Defining_Name_Array_Access;
Fld_8 : Bare_Ada_Node_Array_Access;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_2 : Bare_Name;
Fld_9 : Bare_Name;
Fld_10 : Internal_Entity_Name;
Fld_11 : Boolean;
Find_Result : Internal_Entity_Defining_Name;
Scope_Result_2 : Internal_Entity_Defining_Name;
Result_Var_2 : Internal_Entity_Defining_Name;
Node_For_Entity : Bare_Expr;
As_Entity : Internal_Entity_Expr;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Expr;
Is_A : Boolean;
If_Result_2 : Internal_Entity_Expr;
Map_Result : Internal_Entity_Expr_Array_Access;
Fld_12 : Bare_Ada_Node_Array_Access;
Index_6 : Integer;
Get_Result : Internal_Entity_Expr;
Fld_13 : Lexical_Env := Empty_Env;
Scope_Result_3 : Lexical_Env := Empty_Env;
Result_Var_3 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Cast_Expr_2 : Bare_Ada_Node;
Cast_Result_4 : Bare_Expr;
As_Entity_1 : Internal_Entity_Expr;
Is_Null_2 : Boolean;
If_Result_3 : Internal_Entity_Expr;
Fld_14 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Cast_Expr_3 : Bare_Aggregate_Assoc;
Cast_Result_5 : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Cast_Expr_4 : Bare_Ada_Node;
Cast_Result_6 : Bare_Expr;
Fld_15 : Logic_Var;
Fld_16 : Bare_Ada_Node_Array_Access;
Get_Result_1 : Bare_Ada_Node;
Cast_Result_7 : Bare_Expr;
Fld_17 : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
True_Rel : Logic_Equation;
Comp_Result : Boolean;
If_Result_4 : Logic_Equation;
And_Pred : Logic_Equation;
Cast_Expr_5 : Bare_Ada_Node;
Cast_Result_8 : Bare_Expr;
Fld_18 : Logic_Var;
Fld_19 : Internal_Entity_Base_Type_Decl;
Cast_Result_9 : Internal_Entity;
Bind_Result : Logic_Equation;
Cast_Expr_6 : Bare_Ada_Node;
Cast_Result_10 : Bare_Expr;
Fld_20 : Logic_Equation;
And_Pred_1 : Logic_Equation;
True_Rel_1 : Logic_Equation;
If_Result_5 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Fld_21 : Internal_Entity_Expr;
Fld_22 : Logic_Var;
Fld_23 : Internal_Entity_Base_Type_Decl;
Cast_Result_11 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_24 : Internal_Entity_Expr;
Fld_25 : Logic_Var;
Fld_26 : Bare_Ada_Node_Array_Access;
Get_Result_2 : Bare_Ada_Node;
Cast_Result_12 : Bare_Expr;
Fld_27 : Logic_Var;
Bind_Result_2 : Logic_Equation;
If_Result_6 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_28 : Internal_Entity_Expr;
Fld_29 : Logic_Equation;
Fld_30 : Internal_Entity_Expr;
Fld_31 : Logic_Equation;
And_Pred_4 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
Let_Result_4 : Logic_Equation;
            procedure Finalizer_Scope_397 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Local_Agg_Components);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Local_Matches);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_26);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_29);
                     Dec_Ref (Fld_31);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_397;
            procedure Finalizer_Scope_2246 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_2246;
            procedure Finalizer_Scope_2250 is
            begin
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_20);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_2250;
            procedure Finalizer_Scope_2251 is
            begin
                     Dec_Ref (Fld_13);
            end Finalizer_Scope_2251;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2391 '<Let at nodes.lkt:4236:9>' Let_Result_4 ada/nodes.lkt:4236
--# scope-start
--# expr-start 2314 '<FieldAccess for base_aggregate at nodes.lkt:4236:19>' Fld ada/nodes.lkt:4236
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.base_aggregate
Fld := Libadalang.Implementation.Aggregate_Assoc_P_Base_Aggregate (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2314
Local_Agg := Fld; 
--# bind agg Local_Agg
--# expr-start 2390 '<Let at nodes.lkt:4237:9>' Let_Result_3 ada/nodes.lkt:4237
--# scope-start
--# expr-start 2316 '<Cast to BaseTypeDecl at nodes.lkt:4237:24>' Cast_Result ada/nodes.lkt:4237
--# expr-start 2315 '<FieldAccess for type_val at nodes.lkt:4237:24>' Fld_1 ada/nodes.lkt:4237
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_1 := Libadalang.Implementation.Expr_P_Type_Val (Node => Local_Agg.Node);
--# end
--# expr-done 2315
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 2316
Local_Agg_Type := Cast_Result; 
--# bind agg_type Local_Agg_Type
--# expr-start 2389 '<Let at nodes.lkt:4242:9>' Let_Result_2 ada/nodes.lkt:4242
--# scope-start
--# expr-start 2324 '<BooleanBinaryOp And at nodes.lkt:4243:13>' If_Result ada/nodes.lkt:4243
--# expr-start 2317 '<FieldAccess for is_array at nodes.lkt:4243:13>' Fld_2 ada/nodes.lkt:4243
      if Local_Agg_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_array
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Is_Array (Node => Local_Agg_Type.Node, Origin => Origin, E_Info => Local_Agg_Type.Info);
--# end
--# expr-done 2317
if Fld_2 then
   --# expr-start 2323 '<Not at nodes.lkt:4244:17>' Not_Val ada/nodes.lkt:4244
--# expr-start 2322 '<AnyQuantifier at nodes.lkt:4244:21>' Quantifier_Result ada/nodes.lkt:4244
   --# expr-start 2318 '<FieldAccess for names at nodes.lkt:4244:21>' Fld_3 ada/nodes.lkt:4244
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2318
      Quantifier_Result := False;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Fld_3;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
--# expr-start 2319 '<Cast to Name at nodes.lkt:4247:24>' Cast_Result_1 ada/nodes.lkt:4247
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Name
   then
      Cast_Result_1 := Cast_Expr;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 2319
Var_Expr_73 := Cast_Result_1;
if Var_Expr_73 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 2321 '<IsNull at nodes.lkt:4247:24>' Is_Null ada/nodes.lkt:4247
--# expr-start 2320 '<FieldAccess for leftmost_name at nodes.lkt:4247:24>' Fld_4 ada/nodes.lkt:4247
      if Var_Expr_73 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.leftmost_name
Fld_4 := Libadalang.Implementation.Name_P_Leftmost_Name (Node => Var_Expr_73);
--# end
--# expr-done 2320
Is_Null := Fld_4 = null; 
--# expr-done 2321
Scope_Result := Is_Null;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      Quantifier_Result := Result_Var;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 2322
Not_Val := not (Quantifier_Result); 
--# expr-done 2323
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 2324
Local_Positional_Assoc := If_Result; 
--# bind positional_assoc Local_Positional_Assoc
--# expr-start 2388 '<Let at nodes.lkt:4250:9>' Let_Result_1 ada/nodes.lkt:4250
--# scope-start
--# expr-start 2326 '<Not at nodes.lkt:4251:14>' Not_Val_1 ada/nodes.lkt:4251
--# expr-start 2325 '<FieldAccess for is_array at nodes.lkt:4251:18>' Fld_5 ada/nodes.lkt:4251
      if Local_Agg_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_array
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Is_Array (Node => Local_Agg_Type.Node, Origin => Origin, E_Info => Local_Agg_Type.Info);
--# end
--# expr-done 2325
Not_Val_1 := not (Fld_5); 
--# expr-done 2326
Var_Expr_1 := Not_Val_1;
if Var_Expr_1 /= False then
   --# scope-start
   --# bind _ Var_Expr_1
--# expr-start 2328 '<FieldAccess for unpack_formals at nodes.lkt:4252:24>' Fld_7 ada/nodes.lkt:4252
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2327 '<FieldAccess for all_components at nodes.lkt:4252:44>' Fld_6 ada/nodes.lkt:4252
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.all_components
Fld_6 := Libadalang.Implementation.Base_Aggregate_P_All_Components (Node => Local_Agg.Node, Origin => Origin, Env => Env, E_Info => Local_Agg.Info);
--# end
--# expr-done 2327
--# property-call-start AdaNode.unpack_formals
Fld_7 := Libadalang.Implementation.Ada_Node_P_Unpack_Formals (Node => Self, Formal_Params => Fld_6);
--# end
--# expr-done 2328
Scope_Result_1 := Fld_7;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2246;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Local_Agg_Components := Result_Var_1; Inc_Ref (Local_Agg_Components);
--# bind agg_components Local_Agg_Components
--# expr-start 2387 '<Let at nodes.lkt:4258:9>' Let_Result ada/nodes.lkt:4258
--# scope-start
--# expr-start 2339 '<Map at nodes.lkt:4259:13>' Map_Result ada/nodes.lkt:4259
   --# expr-start 2329 '<FieldAccess for names at nodes.lkt:4259:13>' Fld_8 ada/nodes.lkt:4259
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_8 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2329
      declare
         Map_Result_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Fld_8;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_2
      --# expr-start 2338 '<If at nodes.lkt:4261:17>' If_Result_2 ada/nodes.lkt:4261
--# expr-start 2330 '<IsA Name at nodes.lkt:4261:20>' Is_A ada/nodes.lkt:4261
Is_A := Item_2 /= null 
and then Item_2.Kind in Ada_Name; 
--# expr-done 2330
if Is_A then
--# expr-start 2332 '<FieldAccess for leftmost_name at nodes.lkt:4264:21>' Fld_9 ada/nodes.lkt:4264
--# expr-start 2331 '<Cast to Name at nodes.lkt:4264:21>' Cast_Result_2 ada/nodes.lkt:4264
Cast_Expr_1 := Item_2; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Name
   then
      Cast_Result_2 := Cast_Expr_1;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 2331
      if Cast_Result_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.leftmost_name
Fld_9 := Libadalang.Implementation.Name_P_Leftmost_Name (Node => Cast_Result_2);
--# end
--# expr-done 2332
Var_Expr_3 := Fld_9;
if Var_Expr_3 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind id Var_Expr_3
--# expr-start 2335 '<Find at nodes.lkt:4267:33>' Find_Result ada/nodes.lkt:4267
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Local_Agg_Components;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind c Item_4
      --# expr-start 2334 '<FieldAccess for matches at nodes.lkt:4267:60>' Fld_11 ada/nodes.lkt:4267
--# expr-start 2333 '<FieldAccess for name at nodes.lkt:4267:60>' Fld_10 ada/nodes.lkt:4267
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Name (Node => Item_4.Node.Defining_Name_F_Name, Info => Item_4.Info);
--# expr-done 2333
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.matches
Fld_11 := Libadalang.Implementation.Name_P_Matches (Node => Fld_10.Node, N => Var_Expr_3);
--# end
--# expr-done 2334
      if Fld_11 then
         Find_Result := Item_4; 
      end if;
   --# end
               exit when Fld_11;
         end loop;
      end;
--# expr-done 2335
Scope_Result_2 := Find_Result;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Defining_Name;
end if;
      Cast_Result_3 := Create_Internal_Entity_Expr
        (Node => Result_Var_2.Node,
         Info => Result_Var_2.Info);
   If_Result_2 := Cast_Result_3;
else
   --# expr-start 2337 '<as_entity at nodes.lkt:4270:22>' If_Result_1 ada/nodes.lkt:4270
--# expr-start 2336 '<No Expr at nodes.lkt:4270:22>' Node_For_Entity ada/nodes.lkt:4270
Node_For_Entity := No_Bare_Ada_Node;
--# expr-done 2336
Is_Null_1 := Node_For_Entity = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Expr;
else
As_Entity := (Info => E_Info, Node => Node_For_Entity); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 2337
   If_Result_2 := If_Result_1;
end if;
--# expr-done 2338
         declare
            Item_To_Append : constant Internal_Entity_Expr := If_Result_2;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2339
Local_Matches := Map_Result; Inc_Ref (Local_Matches);
--# bind matches Local_Matches
--# expr-start 2386 '<LogicBinaryOp And at nodes.lkt:4273:9>' And_Pred_5 ada/nodes.lkt:4273
--# expr-start 2380 '<LogicBinaryOp And at nodes.lkt:4273:9>' And_Pred_3 ada/nodes.lkt:4273
--# expr-start 2367 '<LogicAll at nodes.lkt:4273:9>' Logic_Boolean_Op ada/nodes.lkt:4273
--# expr-start 2366 '<Map at nodes.lkt:4273:9>' Map_Result_1 ada/nodes.lkt:4273
   --# expr-start 2340 '<FieldAccess for names at nodes.lkt:4273:9>' Fld_12 ada/nodes.lkt:4273
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2340
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
         Index_6 := 0;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Fld_12;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_5
               --# bind i Index_6
      --# expr-start 2365 '<LogicBinaryOp And at nodes.lkt:4275:13>' And_Pred_2 ada/nodes.lkt:4275
--# expr-start 2356 '<LogicBinaryOp And at nodes.lkt:4275:13>' And_Pred ada/nodes.lkt:4275
--# expr-start 2346 '<bind at nodes.lkt:4277:17>' Dyn_Var_Bind_Result ada/nodes.lkt:4277
--# expr-start 2341 '<at_or_raise at nodes.lkt:4278:21>' Get_Result ada/nodes.lkt:4278
Get_Result := Get (Self, Local_Matches, Index_6, False); 
--# expr-done 2341
Var_Expr_7 := Get_Result;
if Var_Expr_7 /= No_Entity_Expr then
   --# scope-start
   --# bind l Var_Expr_7
--# expr-start 2342 '<FieldAccess for children_env at nodes.lkt:4278:42>' Fld_13 ada/nodes.lkt:4278
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Children_Env (Node => Var_Expr_7.Node, E_Info => Var_Expr_7.Info);
--# expr-done 2342
Scope_Result_3 := Fld_13;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2251;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := Env;
end if;
      Inc_Ref (Result_Var_3);
Bound_Env := Result_Var_3; Inc_Ref (Bound_Env);
--# expr-start 2345 '<FieldAccess for sub_equation at nodes.lkt:4280:17>' Fld_14 ada/nodes.lkt:4280
--# expr-start 2344 '<as_entity at nodes.lkt:4280:17>' If_Result_3 ada/nodes.lkt:4280
--# expr-start 2343 '<Cast to Expr at nodes.lkt:4280:17>' Cast_Result_4 ada/nodes.lkt:4280
Cast_Expr_2 := Item_5; 
   if Cast_Expr_2 = null
      or else Cast_Expr_2.Kind in Ada_Expr
   then
      Cast_Result_4 := Cast_Expr_2;
   else
         Cast_Result_4 := No_Bare_Ada_Node;
   end if;
--# expr-done 2343
Is_Null_2 := Cast_Result_4 = null; 
if Is_Null_2 then
   If_Result_3 := No_Entity_Expr;
else
As_Entity_1 := (Info => E_Info, Node => Cast_Result_4); 
   If_Result_3 := As_Entity_1;
end if;
--# expr-done 2344
      if If_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_14 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => If_Result_3.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => If_Result_3.Info);
--# end
--# expr-done 2345
Dyn_Var_Bind_Result := Fld_14; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 2346
--# expr-start 2355 '<If at nodes.lkt:4284:17>' If_Result_4 ada/nodes.lkt:4284
Comp_Result := Index_6 > 0; 
if Comp_Result then
   --# expr-start 2354 '<bind at nodes.lkt:4286:21>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:4286
Cast_Expr_3 := Self; 
      Cast_Result_5 := Cast_Expr_3;
Bound_Error_Location := Cast_Result_5; 
--# expr-start 2353 '<Predicate on BaseTypeDecl.matching_type at nodes.lkt:4287:21>' Pred ada/nodes.lkt:4287
--# expr-start 2348 '<FieldAccess for type_var at nodes.lkt:4287:49>' Fld_15 ada/nodes.lkt:4287
--# expr-start 2347 '<Cast to Expr at nodes.lkt:4287:49>' Cast_Result_6 ada/nodes.lkt:4287
Cast_Expr_4 := Item_5; 
   if Cast_Expr_4 = null
      or else Cast_Expr_4.Kind in Ada_Expr
   then
      Cast_Result_6 := Cast_Expr_4;
   else
         Cast_Result_6 := No_Bare_Ada_Node;
   end if;
--# expr-done 2347
      if Cast_Result_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Cast_Result_6);
--# expr-done 2348
Fld_15.Value := No_Entity;
Entity_Vars.Reset (Fld_15);
--# expr-start 2352 '<FieldAccess for type_var at nodes.lkt:4288:21>' Fld_17 ada/nodes.lkt:4288
--# expr-start 2351 '<Cast to Expr at nodes.lkt:4288:21>' Cast_Result_7 ada/nodes.lkt:4288
--# expr-start 2350 '<at_or_raise at nodes.lkt:4288:21>' Get_Result_1 ada/nodes.lkt:4288
--# expr-start 2349 '<FieldAccess for names at nodes.lkt:4288:21>' Fld_16 ada/nodes.lkt:4288
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_16 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2349
Get_Result_1 := Get (Self, Fld_16, 0, False); 
--# expr-done 2350
   if Get_Result_1 = null
      or else Get_Result_1.Kind in Ada_Expr
   then
      Cast_Result_7 := Get_Result_1;
   else
         Cast_Result_7 := No_Bare_Ada_Node;
   end if;
--# expr-done 2351
      if Cast_Result_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Cast_Result_7);
--# expr-done 2352
Fld_17.Value := No_Entity;
Entity_Vars.Reset (Fld_17);
Pred := Solver.Create_N_Predicate ((Fld_15, Fld_17), Create_Base_Type_Decl_P_Matching_Type_0_Predicate (Origin, Bound_Error_Location)); 
--# expr-done 2353
Dyn_Var_Bind_Result_1 := Pred; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 2354
   If_Result_4 := Dyn_Var_Bind_Result_1;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4290:22") else null)); 
   If_Result_4 := True_Rel;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 2355
And_Pred := Create_And (Dyn_Var_Bind_Result, If_Result_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4275:13") else null)); 
--# expr-done 2356
--# expr-start 2364 '<If at nodes.lkt:4300:17>' If_Result_5 ada/nodes.lkt:4300
if Local_Positional_Assoc then
   --# expr-start 2363 '<LogicBinaryOp And at nodes.lkt:4302:21>' And_Pred_1 ada/nodes.lkt:4302
--# expr-start 2360 '<Bind at nodes.lkt:4302:21>' Bind_Result ada/nodes.lkt:4302
--# expr-start 2358 '<FieldAccess for expected_type_var at nodes.lkt:4302:21>' Fld_18 ada/nodes.lkt:4302
--# expr-start 2357 '<Cast to Expr at nodes.lkt:4302:21>' Cast_Result_8 ada/nodes.lkt:4302
Cast_Expr_5 := Item_5; 
   if Cast_Expr_5 = null
      or else Cast_Expr_5.Kind in Ada_Expr
   then
      Cast_Result_8 := Cast_Expr_5;
   else
         Cast_Result_8 := No_Bare_Ada_Node;
   end if;
--# expr-done 2357
      if Cast_Result_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Cast_Result_8);
--# expr-done 2358
Fld_18.Value := No_Entity;
Entity_Vars.Reset (Fld_18);
--# expr-start 2359 '<FieldAccess for index_type at nodes.lkt:4302:55>' Fld_19 ada/nodes.lkt:4302
      if Local_Agg_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.index_type
Fld_19 := Libadalang.Implementation.Base_Type_Decl_P_Index_Type (Node => Local_Agg_Type.Node, Dim => 0, Origin => Origin, E_Info => Local_Agg_Type.Info);
--# end
--# expr-done 2359
      Cast_Result_9 := Create_Internal_Entity
        (Node => Fld_19.Node,
         Info => Fld_19.Info);
Bind_Result := Solver.Create_Assign (Fld_18, Cast_Result_9, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4302:21") else null)); 
--# expr-done 2360
--# expr-start 2362 '<FieldAccess for matches_expected_type at nodes.lkt:4303:26>' Fld_20 ada/nodes.lkt:4303
--# expr-start 2361 '<Cast to Expr at nodes.lkt:4303:26>' Cast_Result_10 ada/nodes.lkt:4303
Cast_Expr_6 := Item_5; 
   if Cast_Expr_6 = null
      or else Cast_Expr_6.Kind in Ada_Expr
   then
      Cast_Result_10 := Cast_Expr_6;
   else
         Cast_Result_10 := No_Bare_Ada_Node;
   end if;
--# expr-done 2361
      if Cast_Result_10 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_20 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Cast_Result_10, Origin => Origin);
--# end
--# expr-done 2362
And_Pred_1 := Create_And (Bind_Result, Fld_20, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4302:21") else null)); 
--# expr-done 2363
   If_Result_5 := And_Pred_1;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4304:22") else null)); 
   If_Result_5 := True_Rel_1;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 2364
And_Pred_2 := Create_And (And_Pred, If_Result_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4275:13") else null)); 
--# expr-done 2365
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_2;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2250;
               Index_6 := Index_6 + 1;
         end loop;
      end;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 2366
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4273:9") else null)); 
--# expr-done 2367
--# expr-start 2379 '<If at nodes.lkt:4310:13>' If_Result_6 ada/nodes.lkt:4310
if Local_Positional_Assoc then
   --# expr-start 2371 '<Bind at nodes.lkt:4311:18>' Bind_Result_1 ada/nodes.lkt:4311
--# expr-start 2369 '<FieldAccess for expected_type_var at nodes.lkt:4311:18>' Fld_22 ada/nodes.lkt:4311
--# expr-start 2368 '<FieldAccess for expr at nodes.lkt:4311:18>' Fld_21 ada/nodes.lkt:4311
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_21 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2368
      if Fld_21.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_21.Node);
--# expr-done 2369
Fld_22.Value := No_Entity;
Entity_Vars.Reset (Fld_22);
--# expr-start 2370 '<FieldAccess for comp_type at nodes.lkt:4311:53>' Fld_23 ada/nodes.lkt:4311
      if Local_Agg_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_23 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Local_Agg_Type.Node, Origin => Origin, E_Info => Local_Agg_Type.Info);
--# end
--# expr-done 2370
      Cast_Result_11 := Create_Internal_Entity
        (Node => Fld_23.Node,
         Info => Fld_23.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_22, Cast_Result_11, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4311:18") else null)); 
--# expr-done 2371
   If_Result_6 := Bind_Result_1;
else
   --# expr-start 2378 '<Bind at nodes.lkt:4313:17>' Bind_Result_2 ada/nodes.lkt:4313
--# expr-start 2373 '<FieldAccess for expected_type_var at nodes.lkt:4313:17>' Fld_25 ada/nodes.lkt:4313
--# expr-start 2372 '<FieldAccess for expr at nodes.lkt:4313:17>' Fld_24 ada/nodes.lkt:4313
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_24 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2372
      if Fld_24.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_24.Node);
--# expr-done 2373
Fld_25.Value := No_Entity;
Entity_Vars.Reset (Fld_25);
--# expr-start 2377 '<FieldAccess for type_var at nodes.lkt:4314:21>' Fld_27 ada/nodes.lkt:4314
--# expr-start 2376 '<Cast to Expr at nodes.lkt:4314:21>' Cast_Result_12 ada/nodes.lkt:4314
--# expr-start 2375 '<at_or_raise at nodes.lkt:4314:21>' Get_Result_2 ada/nodes.lkt:4314
--# expr-start 2374 '<FieldAccess for names at nodes.lkt:4314:21>' Fld_26 ada/nodes.lkt:4314
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_26 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2374
Get_Result_2 := Get (Self, Fld_26, 0, False); 
--# expr-done 2375
   if Get_Result_2 = null
      or else Get_Result_2.Kind in Ada_Expr
   then
      Cast_Result_12 := Get_Result_2;
   else
         Cast_Result_12 := No_Bare_Ada_Node;
   end if;
--# expr-done 2376
      if Cast_Result_12 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Cast_Result_12);
--# expr-done 2377
Fld_27.Value := No_Entity;
Entity_Vars.Reset (Fld_27);
Bind_Result_2 := Solver.Create_Unify (Fld_25, Fld_27, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4313:17") else null)); 
--# expr-done 2378
   If_Result_6 := Bind_Result_2;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 2379
And_Pred_3 := Create_And (Logic_Boolean_Op, If_Result_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4273:9") else null)); 
--# expr-done 2380
--# expr-start 2385 '<LogicBinaryOp And at nodes.lkt:4318:13>' And_Pred_4 ada/nodes.lkt:4318
--# expr-start 2382 '<FieldAccess for sub_equation at nodes.lkt:4318:13>' Fld_29 ada/nodes.lkt:4318
--# expr-start 2381 '<FieldAccess for expr at nodes.lkt:4318:13>' Fld_28 ada/nodes.lkt:4318
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_28 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2381
      if Fld_28.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_29 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_28.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_28.Info);
--# end
--# expr-done 2382
--# expr-start 2384 '<FieldAccess for matches_expected_type at nodes.lkt:4318:45>' Fld_31 ada/nodes.lkt:4318
--# expr-start 2383 '<FieldAccess for expr at nodes.lkt:4318:45>' Fld_30 ada/nodes.lkt:4318
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_30 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2383
      if Fld_30.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_31 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_30.Node, Origin => Origin);
--# end
--# expr-done 2384
And_Pred_4 := Create_And (Fld_29, Fld_31, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4318:13") else null)); 
--# expr-done 2385
And_Pred_5 := Create_And (And_Pred_3, And_Pred_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4273:9") else null)); 
--# expr-done 2386
Let_Result := And_Pred_5; Inc_Ref (Let_Result);
--# end
--# expr-done 2387
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2388
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 2389
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 2390
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 2391
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_397;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_397;
                     Finalizer_Scope_2246;
                     Finalizer_Scope_2250;
                     Finalizer_Scope_2251;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Delta_Aggregate_Assoc_Equation;
--# end
--# property-start AggregateAssoc.record_assoc_equation ada/nodes.lkt:4326
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Record_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_398 with Inline_Always;
            procedure Finalizer_Scope_2255 with Inline_Always;
            procedure Finalizer_Scope_2256 with Inline_Always;
            procedure Finalizer_Scope_2257 with Inline_Always;
      Local_Agg : Internal_Entity_Base_Aggregate;
Local_Discr_Matches : Internal_Param_Match_Array_Access;
Local_Matches : Internal_Param_Match_Array_Access;
Local_Is_Others_Assoc : Boolean;
Local_Is_Box_Expr : Boolean;
Var_Expr_3 : Internal_Entity_Defining_Name;
Var_Expr_5 : Bare_Base_Id;
Fld : Internal_Entity_Base_Aggregate;
Fld_1 : Internal_Param_Match_Array_Access;
Fld_2 : Internal_Single_Actual;
Fld_3 : Internal_Entity_Basic_Assoc;
Cast_Result : Internal_Entity;
Cast_Expr : Internal_Entity_Aggregate_Assoc;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Map_Result : Internal_Param_Match_Array_Access;
Fld_4 : Internal_Param_Match_Array_Access;
Fld_5 : Internal_Single_Actual;
Fld_6 : Internal_Entity_Basic_Assoc;
Cast_Result_2 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Aggregate_Assoc;
Cast_Result_3 : Internal_Entity;
Is_Equiv_1 : Boolean;
Map_Result_1 : Internal_Param_Match_Array_Access;
Is_Equal : Boolean;
Not_Val : Boolean;
If_Result : Internal_Param_Match_Array_Access;
Fld_7 : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Quantifier_Result : Boolean;
Fld_8 : Internal_Entity_Expr;
Is_A_1 : Boolean;
True_Rel : Logic_Equation;
Fld_9 : Internal_Single_Actual;
Fld_10 : Internal_Entity_Basic_Assoc;
Fld_11 : Internal_Entity_Expr;
Fld_12 : Logic_Var;
Fld_13 : Internal_Entity_Defining_Name;
Fld_14 : Internal_Entity_Base_Formal_Param_Decl;
Fld_15 : Internal_Entity_Type_Expr;
Fld_16 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_17 : Internal_Single_Actual;
Fld_18 : Internal_Entity_Basic_Assoc;
Fld_19 : Internal_Entity_Expr;
Fld_20 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_21 : Internal_Single_Actual;
Fld_22 : Internal_Entity_Basic_Assoc;
Fld_23 : Internal_Entity_Expr;
Fld_24 : Logic_Equation;
And_Pred_1 : Logic_Equation;
If_Result_1 : Logic_Equation;
Fld_25 : Internal_Single_Actual;
Fld_26 : Bare_Base_Id;
Fld_27 : Logic_Var;
Fld_28 : Internal_Entity_Defining_Name;
Fld_29 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_5 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
Map_Result_2 : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
True_Rel_2 : Logic_Equation;
Fld_30 : Internal_Entity_Defining_Name;
Fld_31 : Internal_Entity_Expr;
Fld_32 : Logic_Var;
Fld_33 : Internal_Entity_Base_Formal_Param_Decl;
Fld_34 : Internal_Entity_Type_Expr;
Fld_35 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
Fld_36 : Internal_Entity_Expr;
Fld_37 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_38 : Internal_Entity_Expr;
Fld_39 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_3 : Logic_Equation;
Result_Var_1 : Logic_Equation;
If_Result_2 : Logic_Equation;
Not_Val_1 : Boolean;
If_Result_3 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
Let_Result_4 : Logic_Equation;
            procedure Finalizer_Scope_398 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Local_Discr_Matches);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Local_Matches);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (True_Rel_2);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_3);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_398;
            procedure Finalizer_Scope_2255 is
            begin
                     Dec_Ref (True_Rel);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_20);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_24);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_2255;
            procedure Finalizer_Scope_2256 is
            begin
                     Dec_Ref (Bind_Result_1);
            end Finalizer_Scope_2256;
            procedure Finalizer_Scope_2257 is
            begin
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Fld_37);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_39);
                     Dec_Ref (And_Pred_4);
            end Finalizer_Scope_2257;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2460 '<Let at nodes.lkt:4327:9>' Let_Result_4 ada/nodes.lkt:4327
--# scope-start
--# expr-start 2392 '<FieldAccess for base_aggregate at nodes.lkt:4327:19>' Fld ada/nodes.lkt:4327
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.base_aggregate
Fld := Libadalang.Implementation.Aggregate_Assoc_P_Base_Aggregate (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2392
Local_Agg := Fld; 
--# bind agg Local_Agg
--# expr-start 2459 '<Let at nodes.lkt:4329:9>' Let_Result_3 ada/nodes.lkt:4329
--# scope-start
--# expr-start 2397 '<Map at nodes.lkt:4330:13>' Map_Result ada/nodes.lkt:4330
   --# expr-start 2393 '<FieldAccess for matched_discriminants at nodes.lkt:4330:13>' Fld_1 ada/nodes.lkt:4330
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.matched_discriminants
Fld_1 := Libadalang.Implementation.Base_Aggregate_P_Matched_Discriminants (Node => Local_Agg.Node, Origin => Origin, E_Info => Local_Agg.Info);
--# end
--# expr-done 2393
      declare
         Map_Result_Vec : Internal_Param_Match_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_0
         --# expr-start 2396 '<Eq at nodes.lkt:4331:25>' Is_Equiv ada/nodes.lkt:4331
--# expr-start 2395 '<FieldAccess for assoc at nodes.lkt:4331:25>' Fld_3 ada/nodes.lkt:4331
--# expr-start 2394 '<FieldAccess for actual at nodes.lkt:4331:25>' Fld_2 ada/nodes.lkt:4331
Fld_2 := Item_0.Actual;
--# expr-done 2394
Fld_3 := Fld_2.Assoc;
--# expr-done 2395
      Cast_Result := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Cast_Expr := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 2396
         if Is_Equiv then
         declare
            Item_To_Append : constant Internal_Param_Match := Item_0;
         begin
            Internal_Param_Match_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Param_Match_Array
           (Items_Count => Natural (Internal_Param_Match_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Match_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Match_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Match_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2397
Local_Discr_Matches := Map_Result; Inc_Ref (Local_Discr_Matches);
--# bind discr_matches Local_Discr_Matches
--# expr-start 2458 '<Let at nodes.lkt:4342:9>' Let_Result_2 ada/nodes.lkt:4342
--# scope-start
--# expr-start 2405 '<If at nodes.lkt:4343:13>' If_Result ada/nodes.lkt:4343
--# expr-start 2399 '<Not at nodes.lkt:4343:16>' Not_Val ada/nodes.lkt:4343
--# expr-start 2398 '<IsNull at nodes.lkt:4343:20>' Is_Equal ada/nodes.lkt:4343
Is_Equal := Equivalent (Local_Discr_Matches, No_Internal_Param_Match_Array_Type); 
--# expr-done 2398
Not_Val := not (Is_Equal); 
--# expr-done 2399
if Not_Val then
   If_Result := Local_Discr_Matches;
else
   --# expr-start 2404 '<Map at nodes.lkt:4345:17>' Map_Result_1 ada/nodes.lkt:4345
   --# expr-start 2400 '<FieldAccess for matched_components at nodes.lkt:4345:17>' Fld_4 ada/nodes.lkt:4345
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.matched_components
Fld_4 := Libadalang.Implementation.Base_Aggregate_P_Matched_Components (Node => Local_Agg.Node, Origin => Origin, Env => Env, E_Info => Local_Agg.Info);
--# end
--# expr-done 2400
      declare
         Map_Result_1_Vec : Internal_Param_Match_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_4;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_1
         --# expr-start 2403 '<Eq at nodes.lkt:4346:29>' Is_Equiv_1 ada/nodes.lkt:4346
--# expr-start 2402 '<FieldAccess for assoc at nodes.lkt:4346:29>' Fld_6 ada/nodes.lkt:4346
--# expr-start 2401 '<FieldAccess for actual at nodes.lkt:4346:29>' Fld_5 ada/nodes.lkt:4346
Fld_5 := Item_1.Actual;
--# expr-done 2401
Fld_6 := Fld_5.Assoc;
--# expr-done 2402
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
Cast_Expr_1 := Ent; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv_1 := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 2403
         if Is_Equiv_1 then
         declare
            Item_To_Append : constant Internal_Param_Match := Item_1;
         begin
            Internal_Param_Match_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Param_Match_Array
           (Items_Count => Natural (Internal_Param_Match_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Param_Match_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Param_Match_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Param_Match_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 2404
   If_Result := Map_Result_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 2405
Local_Matches := If_Result; Inc_Ref (Local_Matches);
--# bind matches Local_Matches
--# expr-start 2457 '<Let at nodes.lkt:4349:9>' Let_Result_1 ada/nodes.lkt:4349
--# scope-start
--# expr-start 2408 '<AnyQuantifier at nodes.lkt:4349:31>' Quantifier_Result ada/nodes.lkt:4349
   --# expr-start 2406 '<FieldAccess for names at nodes.lkt:4349:31>' Fld_7 ada/nodes.lkt:4349
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2406
      Quantifier_Result := False;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Fld_7;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_2
      --# expr-start 2407 '<IsA OthersDesignator at nodes.lkt:4349:55>' Is_A ada/nodes.lkt:4349
Is_A := Item_2 /= null 
and then Item_2.Kind in Ada_Others_Designator_Range; 
--# expr-done 2407
      Quantifier_Result := Is_A;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 2408
Local_Is_Others_Assoc := Quantifier_Result; 
--# bind is_others_assoc Local_Is_Others_Assoc
--# expr-start 2456 '<Let at nodes.lkt:4353:9>' Let_Result ada/nodes.lkt:4353
--# scope-start
--# expr-start 2410 '<IsA BoxExpr at nodes.lkt:4353:27>' Is_A_1 ada/nodes.lkt:4353
--# expr-start 2409 '<FieldAccess for expr at nodes.lkt:4353:27>' Fld_8 ada/nodes.lkt:4353
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_8 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2409
Is_A_1 := Fld_8.Node /= null 
and then Fld_8.Node.Kind in Ada_Box_Expr_Range; 
--# expr-done 2410
Local_Is_Box_Expr := Is_A_1; 
--# bind is_box_expr Local_Is_Box_Expr
--# expr-start 2455 '<If at nodes.lkt:4355:9>' If_Result_3 ada/nodes.lkt:4355
--# expr-start 2411 '<Not at nodes.lkt:4355:12>' Not_Val_1 ada/nodes.lkt:4355
Not_Val_1 := not (Local_Is_Others_Assoc); 
--# expr-done 2411
if Not_Val_1 then
   --# expr-start 2440 '<LogicAll at nodes.lkt:4357:13>' Logic_Boolean_Op ada/nodes.lkt:4357
--# expr-start 2439 '<Map at nodes.lkt:4357:13>' Map_Result_2 ada/nodes.lkt:4357
      declare
         Map_Result_2_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Local_Matches;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind match_var Item_4
      --# expr-start 2438 '<LogicBinaryOp And at nodes.lkt:4359:17>' And_Pred_2 ada/nodes.lkt:4359
--# expr-start 2431 '<If at nodes.lkt:4362:21>' If_Result_1 ada/nodes.lkt:4362
if Local_Is_Box_Expr then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4362:41") else null)); 
   If_Result_1 := True_Rel;
else
   --# expr-start 2430 '<LogicBinaryOp And at nodes.lkt:4364:25>' And_Pred_1 ada/nodes.lkt:4364
--# expr-start 2425 '<LogicBinaryOp And at nodes.lkt:4365:29>' And_Pred ada/nodes.lkt:4365
--# expr-start 2420 '<Bind at nodes.lkt:4365:29>' Bind_Result ada/nodes.lkt:4365
--# expr-start 2415 '<FieldAccess for expected_type_var at nodes.lkt:4365:29>' Fld_12 ada/nodes.lkt:4365
--# expr-start 2414 '<FieldAccess for expr at nodes.lkt:4365:29>' Fld_11 ada/nodes.lkt:4365
--# expr-start 2413 '<FieldAccess for assoc at nodes.lkt:4365:29>' Fld_10 ada/nodes.lkt:4365
--# expr-start 2412 '<FieldAccess for actual at nodes.lkt:4365:29>' Fld_9 ada/nodes.lkt:4365
Fld_9 := Item_4.Actual;
--# expr-done 2412
Fld_10 := Fld_9.Assoc;
--# expr-done 2413
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_10.Node, E_Info => Fld_10.Info);
--# end
--# expr-done 2414
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_11.Node);
--# expr-done 2415
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
--# expr-start 2419 '<FieldAccess for designated_type at nodes.lkt:4366:32>' Fld_16 ada/nodes.lkt:4366
--# expr-start 2418 '<FieldAccess for type_expression at nodes.lkt:4366:32>' Fld_15 ada/nodes.lkt:4366
--# expr-start 2417 '<FieldAccess for formal_decl at nodes.lkt:4366:32>' Fld_14 ada/nodes.lkt:4366
--# expr-start 2416 '<FieldAccess for formal at nodes.lkt:4366:32>' Fld_13 ada/nodes.lkt:4366
Fld_13 := Item_4.Formal;
--# expr-done 2416
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_14 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_13.Node, E_Info => Fld_13.Info);
--# end
--# expr-done 2417
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_15 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_14.Node, E_Info => Fld_14.Info);
--# end
--# expr-done 2418
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_16 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Fld_15.Node, Origin => Origin, E_Info => Fld_15.Info);
--# end
--# expr-done 2419
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
Bind_Result := Solver.Create_Assign (Fld_12, Cast_Result_4, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4365:29") else null)); 
--# expr-done 2420
--# expr-start 2424 '<FieldAccess for sub_equation at nodes.lkt:4368:34>' Fld_20 ada/nodes.lkt:4368
--# expr-start 2423 '<FieldAccess for expr at nodes.lkt:4368:34>' Fld_19 ada/nodes.lkt:4368
--# expr-start 2422 '<FieldAccess for assoc at nodes.lkt:4368:34>' Fld_18 ada/nodes.lkt:4368
--# expr-start 2421 '<FieldAccess for actual at nodes.lkt:4368:34>' Fld_17 ada/nodes.lkt:4368
Fld_17 := Item_4.Actual;
--# expr-done 2421
Fld_18 := Fld_17.Assoc;
--# expr-done 2422
      if Fld_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_19 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_18.Node, E_Info => Fld_18.Info);
--# end
--# expr-done 2423
      if Fld_19.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_20 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_19.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_19.Info);
--# end
--# expr-done 2424
And_Pred := Create_And (Bind_Result, Fld_20, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4365:29") else null)); 
--# expr-done 2425
--# expr-start 2429 '<FieldAccess for matches_expected_assign_type at nodes.lkt:4370:30>' Fld_24 ada/nodes.lkt:4370
--# expr-start 2428 '<FieldAccess for expr at nodes.lkt:4370:30>' Fld_23 ada/nodes.lkt:4370
--# expr-start 2427 '<FieldAccess for assoc at nodes.lkt:4370:30>' Fld_22 ada/nodes.lkt:4370
--# expr-start 2426 '<FieldAccess for actual at nodes.lkt:4370:30>' Fld_21 ada/nodes.lkt:4370
Fld_21 := Item_4.Actual;
--# expr-done 2426
Fld_22 := Fld_21.Assoc;
--# expr-done 2427
      if Fld_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_23 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_22.Node, E_Info => Fld_22.Info);
--# end
--# expr-done 2428
      if Fld_23.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_24 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Fld_23.Node, Origin => Origin);
--# end
--# expr-done 2429
And_Pred_1 := Create_And (And_Pred, Fld_24, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4364:25") else null)); 
--# expr-done 2430
   If_Result_1 := And_Pred_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2431
--# expr-start 2433 '<FieldAccess for name at nodes.lkt:4373:22>' Fld_26 ada/nodes.lkt:4373
--# expr-start 2432 '<FieldAccess for actual at nodes.lkt:4373:22>' Fld_25 ada/nodes.lkt:4373
Fld_25 := Item_4.Actual;
--# expr-done 2432
Fld_26 := Fld_25.Name;
--# expr-done 2433
Var_Expr_5 := Fld_26;
if Var_Expr_5 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind n Var_Expr_5
--# expr-start 2437 '<Bind at nodes.lkt:4374:28>' Bind_Result_1 ada/nodes.lkt:4374
--# expr-start 2434 '<FieldAccess for ref_var at nodes.lkt:4374:28>' Fld_27 ada/nodes.lkt:4374
      if Var_Expr_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_27 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Var_Expr_5);
--# end
--# expr-done 2434
Fld_27.Value := No_Entity;
Entity_Vars.Reset (Fld_27);
--# expr-start 2436 '<FieldAccess for formal_decl at nodes.lkt:4374:43>' Fld_29 ada/nodes.lkt:4374
--# expr-start 2435 '<FieldAccess for formal at nodes.lkt:4374:43>' Fld_28 ada/nodes.lkt:4374
Fld_28 := Item_4.Formal;
--# expr-done 2435
      if Fld_28.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_29 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_28.Node, E_Info => Fld_28.Info);
--# end
--# expr-done 2436
      Cast_Result_5 := Create_Internal_Entity
        (Node => Fld_29.Node,
         Info => Fld_29.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_27, Cast_Result_5, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4374:28") else null)); 
--# expr-done 2437
Scope_Result := Bind_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2256;
   Result_Var := Scope_Result;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4375:33") else null)); 
   Result_Var := True_Rel_1;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (If_Result_1, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4359:17") else null)); 
--# expr-done 2438
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_2;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2255;
         end loop;
      end;
         Map_Result_2 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_2_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 2439
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result_2.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4357:13") else null)); 
--# expr-done 2440
   If_Result_3 := Logic_Boolean_Op;
else
   --# expr-start 2454 '<If at nodes.lkt:4383:13>' If_Result_2 ada/nodes.lkt:4383
if Local_Is_Box_Expr then
   True_Rel_2 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4383:33") else null)); 
   If_Result_2 := True_Rel_2;
else
--# expr-start 2441 '<FieldAccess for first_unmatched_formal at nodes.lkt:4385:17>' Fld_30 ada/nodes.lkt:4385
      if Local_Agg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.first_unmatched_formal
Fld_30 := Libadalang.Implementation.Base_Aggregate_P_First_Unmatched_Formal (Node => Local_Agg.Node, Origin => Origin, Env => Env, E_Info => Local_Agg.Info);
--# end
--# expr-done 2441
Var_Expr_3 := Fld_30;
if Var_Expr_3 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind unmatched_formal Var_Expr_3
--# expr-start 2453 '<LogicBinaryOp And at nodes.lkt:4387:21>' And_Pred_4 ada/nodes.lkt:4387
--# expr-start 2450 '<LogicBinaryOp And at nodes.lkt:4388:25>' And_Pred_3 ada/nodes.lkt:4388
--# expr-start 2447 '<Bind at nodes.lkt:4388:25>' Bind_Result_2 ada/nodes.lkt:4388
--# expr-start 2443 '<FieldAccess for expected_type_var at nodes.lkt:4388:25>' Fld_32 ada/nodes.lkt:4388
--# expr-start 2442 '<FieldAccess for expr at nodes.lkt:4388:25>' Fld_31 ada/nodes.lkt:4388
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_31 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2442
      if Fld_31.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_31.Node);
--# expr-done 2443
Fld_32.Value := No_Entity;
Entity_Vars.Reset (Fld_32);
--# expr-start 2446 '<FieldAccess for designated_type at nodes.lkt:4389:28>' Fld_35 ada/nodes.lkt:4389
--# expr-start 2445 '<FieldAccess for type_expression at nodes.lkt:4389:28>' Fld_34 ada/nodes.lkt:4389
--# expr-start 2444 '<FieldAccess for formal_decl at nodes.lkt:4389:28>' Fld_33 ada/nodes.lkt:4389
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_33 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 2444
      if Fld_33.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_34 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_33.Node, E_Info => Fld_33.Info);
--# end
--# expr-done 2445
      if Fld_34.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_35 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Fld_34.Node, Origin => Origin, E_Info => Fld_34.Info);
--# end
--# expr-done 2446
      Cast_Result_6 := Create_Internal_Entity
        (Node => Fld_35.Node,
         Info => Fld_35.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_32, Cast_Result_6, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4388:25") else null)); 
--# expr-done 2447
--# expr-start 2449 '<FieldAccess for sub_equation at nodes.lkt:4391:30>' Fld_37 ada/nodes.lkt:4391
--# expr-start 2448 '<FieldAccess for expr at nodes.lkt:4391:30>' Fld_36 ada/nodes.lkt:4391
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_36 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2448
      if Fld_36.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_37 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_36.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_36.Info);
--# end
--# expr-done 2449
And_Pred_3 := Create_And (Bind_Result_2, Fld_37, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4388:25") else null)); 
--# expr-done 2450
--# expr-start 2452 '<FieldAccess for matches_expected_type at nodes.lkt:4393:26>' Fld_39 ada/nodes.lkt:4393
--# expr-start 2451 '<FieldAccess for expr at nodes.lkt:4393:26>' Fld_38 ada/nodes.lkt:4393
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_38 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2451
      if Fld_38.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_39 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_38.Node, Origin => Origin);
--# end
--# expr-done 2452
And_Pred_4 := Create_And (And_Pred_3, Fld_39, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4387:21") else null)); 
--# expr-done 2453
Scope_Result_1 := And_Pred_4;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2257;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_3 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4394:33") else null)); 
   Result_Var_1 := True_Rel_3;
end if;
      Inc_Ref (Result_Var_1);
   If_Result_2 := Result_Var_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 2454
   If_Result_3 := If_Result_2;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 2455
Let_Result := If_Result_3; Inc_Ref (Let_Result);
--# end
--# expr-done 2456
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2457
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 2458
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 2459
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 2460
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_398;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_398;
                     Finalizer_Scope_2255;
                     Finalizer_Scope_2256;
                     Finalizer_Scope_2257;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Record_Assoc_Equation;
--# end
--# property-start AggregateAssoc.array_assoc_equation ada/nodes.lkt:4402
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Array_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Atd : Internal_Entity_Array_Type_Def
      ; Mra : Internal_Multidim_Aggregate_Info
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind atd Atd
   --# bind mra Mra
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_399 with Inline_Always;
            procedure Finalizer_Scope_2258 with Inline_Always;
            procedure Finalizer_Scope_2259 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Expr;
Fld : Internal_Entity_Expr;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
True_Rel : Logic_Equation;
Is_Equal : Boolean;
Fld_7 : Integer;
Fld_8 : Integer;
Arith_Result : Integer;
Is_Equal_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Logic_Equation;
Fld_9 : Internal_Entity_Alternatives_List;
Fld_10 : Bare_Alternatives_List;
Fld_11 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Fld_12 : Logic_Equation;
Cast_Expr : Internal_Entity;
Cast_Result_1 : Internal_Entity_Name;
Fld_13 : Logic_Equation;
Cast_Expr_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Expr;
Fld_14 : Logic_Var;
Fld_15 : Integer;
Fld_16 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_17 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var : Logic_Equation;
Is_A : Boolean;
Cast_Expr_2 : Internal_Entity;
Cast_Result_4 : Internal_Entity_Name;
Fld_18 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Logic_Equation;
And_Pred_3 : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_4 : Internal_Entity;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_4 : Logic_Equation;
            procedure Finalizer_Scope_399 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_4);
            end Finalizer_Scope_399;
            procedure Finalizer_Scope_2258 is
            begin
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_2258;
            procedure Finalizer_Scope_2259 is
            begin
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_17);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_2259;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2499 '<LogicBinaryOp And at nodes.lkt:4406:9>' And_Pred_4 ada/nodes.lkt:4406
--# expr-start 2477 '<If at nodes.lkt:4409:13>' If_Result_1 ada/nodes.lkt:4409
--# expr-start 2466 '<BooleanBinaryOp Or at nodes.lkt:4409:16>' If_Result ada/nodes.lkt:4409
--# expr-start 2461 '<IsNull at nodes.lkt:4409:16>' Is_Equal ada/nodes.lkt:4409
Is_Equal := Mra = No_Multidim_Aggregate_Info; 
--# expr-done 2461
if Is_Equal then
   If_Result := True;
else
   --# expr-start 2465 '<Eq at nodes.lkt:4409:31>' Is_Equal_1 ada/nodes.lkt:4409
--# expr-start 2462 '<FieldAccess for rank at nodes.lkt:4409:31>' Fld_7 ada/nodes.lkt:4409
Fld_7 := Mra.Rank;
--# expr-done 2462
--# expr-start 2464 '<Arithmetic - at nodes.lkt:4409:43>' Arith_Result ada/nodes.lkt:4409
--# expr-start 2463 '<FieldAccess for array_ndims at nodes.lkt:4409:43>' Fld_8 ada/nodes.lkt:4409
      if Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.array_ndims'
Fld_8 := Libadalang.Implementation.Dispatcher_Type_Def_P_Array_Ndims (Node => Atd.Node, Origin => Origin, E_Info => Atd.Info);
--# end
--# expr-done 2463
Arith_Result := (Fld_8 - 1); 
--# expr-done 2464
Is_Equal_1 := Fld_7 = Arith_Result; 
--# expr-done 2465
   If_Result := Is_Equal_1;
end if;
--# expr-done 2466
if If_Result then
   --# expr-start 2476 '<LogicBinaryOp And at nodes.lkt:4412:17>' And_Pred_1 ada/nodes.lkt:4412
--# expr-start 2473 '<LogicBinaryOp And at nodes.lkt:4413:21>' And_Pred ada/nodes.lkt:4413
--# expr-start 2470 '<Bind at nodes.lkt:4413:21>' Bind_Result ada/nodes.lkt:4413
--# expr-start 2468 '<FieldAccess for expected_type_var at nodes.lkt:4413:21>' Fld_1 ada/nodes.lkt:4413
--# expr-start 2467 '<FieldAccess for expr at nodes.lkt:4413:21>' Fld ada/nodes.lkt:4413
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2467
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld.Node);
--# expr-done 2468
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 2469 '<FieldAccess for comp_type at nodes.lkt:4413:56>' Fld_2 ada/nodes.lkt:4413
      if Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArrayTypeDef.comp_type
Fld_2 := Libadalang.Implementation.Array_Type_Def_P_Comp_Type (Node => Atd.Node, Origin => Origin, E_Info => Atd.Info);
--# end
--# expr-done 2469
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4413:21") else null)); 
--# expr-done 2470
--# expr-start 2472 '<FieldAccess for sub_equation at nodes.lkt:4414:26>' Fld_4 ada/nodes.lkt:4414
--# expr-start 2471 '<FieldAccess for expr at nodes.lkt:4414:26>' Fld_3 ada/nodes.lkt:4414
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2471
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 2472
And_Pred := Create_And (Bind_Result, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4413:21") else null)); 
--# expr-done 2473
--# expr-start 2475 '<FieldAccess for matches_expected_type at nodes.lkt:4416:22>' Fld_6 ada/nodes.lkt:4416
--# expr-start 2474 '<FieldAccess for expr at nodes.lkt:4416:22>' Fld_5 ada/nodes.lkt:4416
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2474
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 2475
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4412:17") else null)); 
--# expr-done 2476
   If_Result_1 := And_Pred_1;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4421:17") else null)); 
   If_Result_1 := True_Rel;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2477
--# expr-start 2498 '<LogicAll at nodes.lkt:4424:14>' Logic_Boolean_Op ada/nodes.lkt:4424
--# expr-start 2497 '<Map at nodes.lkt:4424:14>' Map_Result ada/nodes.lkt:4424
   --# expr-start 2478 '<FieldAccess for designators at nodes.lkt:4424:14>' Fld_9 ada/nodes.lkt:4424
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Alternatives_List (Node => Ent.Node.Aggregate_Assoc_F_Designators, Info => Ent.Info);
--# expr-done 2478
Fld_10 := Fld_9.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_10 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld_10;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_4 := No_Entity;
else
Fld_11 := Fld_9.Info;
As_Entity := (Info => Fld_11, Node => Bare_Item_0); 
   If_Result_4 := As_Entity;
end if;
                  Item_0 := If_Result_4; 
   --# scope-start
               --# bind n Item_0
      --# expr-start 2496 '<LogicBinaryOp And at nodes.lkt:4426:13>' And_Pred_3 ada/nodes.lkt:4426
--# expr-start 2479 '<FieldAccess for sub_equation at nodes.lkt:4426:13>' Fld_12 ada/nodes.lkt:4426
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_12 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 2479
--# expr-start 2495 '<If at nodes.lkt:4428:17>' If_Result_3 ada/nodes.lkt:4428
--# expr-start 2485 '<BooleanBinaryOp And at nodes.lkt:4428:20>' If_Result_2 ada/nodes.lkt:4428
--# expr-start 2480 '<IsA Name at nodes.lkt:4428:20>' Is_A ada/nodes.lkt:4428
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Name; 
--# expr-done 2480
if Is_A then
   --# expr-start 2484 '<Not at nodes.lkt:4428:34>' Not_Val ada/nodes.lkt:4428
--# expr-start 2483 '<IsNull at nodes.lkt:4428:38>' Is_Null ada/nodes.lkt:4428
--# expr-start 2482 '<FieldAccess for name_designated_type at nodes.lkt:4428:38>' Fld_18 ada/nodes.lkt:4428
--# expr-start 2481 '<Cast to Name at nodes.lkt:4428:38>' Cast_Result_4 ada/nodes.lkt:4428
Cast_Expr_2 := Item_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Name
   then
      Cast_Result_4 := Create_Internal_Entity_Name
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_4 := No_Entity_Name;
   end if;
--# expr-done 2481
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_18 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Cast_Result_4.Node, E_Info => Cast_Result_4.Info);
--# end
--# expr-done 2482
Is_Null := Fld_18.Node = null; 
--# expr-done 2483
Not_Val := not (Is_Null); 
--# expr-done 2484
   If_Result_2 := Not_Val;
else
   If_Result_2 := False;
end if;
--# expr-done 2485
if If_Result_2 then
   --# expr-start 2487 '<FieldAccess for xref_type_equation at nodes.lkt:4429:22>' Fld_13 ada/nodes.lkt:4429
--# expr-start 2486 '<Cast to Name at nodes.lkt:4429:22>' Cast_Result_1 ada/nodes.lkt:4429
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Name;
   end if;
--# expr-done 2486
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_13 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Cast_Result_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 2487
   If_Result_3 := Fld_13;
else
--# expr-start 2488 '<Cast to Expr at nodes.lkt:4431:21>' Cast_Result_2 ada/nodes.lkt:4431
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Expr
   then
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_2 := No_Entity_Expr;
   end if;
--# expr-done 2488
Var_Expr_1 := Cast_Result_2;
if Var_Expr_1 /= No_Entity_Expr then
   --# scope-start
   --# bind n Var_Expr_1
--# expr-start 2494 '<LogicBinaryOp And at nodes.lkt:4433:25>' And_Pred_2 ada/nodes.lkt:4433
--# expr-start 2492 '<Bind at nodes.lkt:4433:25>' Bind_Result_1 ada/nodes.lkt:4433
--# expr-start 2489 '<FieldAccess for expected_type_var at nodes.lkt:4433:25>' Fld_14 ada/nodes.lkt:4433
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 2489
Fld_14.Value := No_Entity;
Entity_Vars.Reset (Fld_14);
--# expr-start 2491 '<FieldAccess for index_type at nodes.lkt:4433:50>' Fld_16 ada/nodes.lkt:4433
      if Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2490 '<FieldAccess for rank at nodes.lkt:4433:65>' Fld_15 ada/nodes.lkt:4433
Fld_15 := Mra.Rank;
--# expr-done 2490
--# property-call-start ArrayTypeDef.index_type
Fld_16 := Libadalang.Implementation.Array_Type_Def_P_Index_Type (Node => Atd.Node, Dim => Fld_15, Origin => Origin, E_Info => Atd.Info);
--# end
--# expr-done 2491
      Cast_Result_3 := Create_Internal_Entity
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_14, Cast_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4433:25") else null)); 
--# expr-done 2492
--# expr-start 2493 '<FieldAccess for matches_expected_type at nodes.lkt:4434:30>' Fld_17 ada/nodes.lkt:4434
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_17 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Var_Expr_1.Node, Origin => Origin);
--# end
--# expr-done 2493
And_Pred_2 := Create_And (Bind_Result_1, Fld_17, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4433:25") else null)); 
--# expr-done 2494
Scope_Result := And_Pred_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2259;
   Result_Var := Scope_Result;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4435:37") else null)); 
   Result_Var := True_Rel_1;
end if;
      Inc_Ref (Result_Var);
   If_Result_3 := Result_Var;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 2495
And_Pred_3 := Create_And (Fld_12, If_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4426:13") else null)); 
--# expr-done 2496
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2258;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2497
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4424:14") else null)); 
--# expr-done 2498
And_Pred_4 := Create_And (If_Result_1, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4406:9") else null)); 
--# expr-done 2499
         Property_Result := And_Pred_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_399;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_399;
                     Finalizer_Scope_2258;
                     Finalizer_Scope_2259;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Array_Assoc_Equation;
--# end
--# property-start AggregateAssoc.globals_assoc_equation ada/nodes.lkt:4443
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Globals_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_400 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_400 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_400;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2501 '<FieldAccess for sub_equation at nodes.lkt:4447:9>' Fld_1 ada/nodes.lkt:4447
--# expr-start 2500 '<FieldAccess for expr at nodes.lkt:4447:9>' Fld ada/nodes.lkt:4447
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2500
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 2501
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_400;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_400;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Globals_Assoc_Equation;
--# end
--# property-start AggregateAssoc.depends_assoc_equation ada/nodes.lkt:4452
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Depends_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_401 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Local_N : Bare_Ada_Node;
Var_Expr_74 : Internal_Entity_Un_Op;
True_Rel : Logic_Equation;
Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Is_A : Boolean;
Fld_3 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Un_Op;
Fld_4 : Internal_Entity_Expr;
Is_A_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Logic_Equation;
Fld_5 : Bare_Ada_Node_Array_Access;
Get_Result : Bare_Ada_Node;
True_Rel_1 : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result_2 : Internal_Entity;
Fld_6 : Logic_Equation;
Is_Null_1 : Boolean;
Is_A_2 : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Logic_Equation;
Let_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_401 is
            begin
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Fld_5);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Fld_6);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (Let_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_401;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2521 '<LogicBinaryOp And at nodes.lkt:4453:9>' And_Pred ada/nodes.lkt:4453
--# expr-start 2511 '<If at nodes.lkt:4460:13>' If_Result_1 ada/nodes.lkt:4460
--# expr-start 2508 '<BooleanBinaryOp Or at nodes.lkt:4461:17>' If_Result ada/nodes.lkt:4461
--# expr-start 2503 '<IsA NullLiteral at nodes.lkt:4461:17>' Is_A ada/nodes.lkt:4461
--# expr-start 2502 '<FieldAccess for expr at nodes.lkt:4461:17>' Fld_2 ada/nodes.lkt:4461
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2502
Is_A := Fld_2.Node /= null 
and then Fld_2.Node.Kind in Ada_Null_Literal_Range; 
--# expr-done 2503
if Is_A then
   If_Result := True;
else
--# expr-start 2505 '<Cast to UnOp at nodes.lkt:4462:20>' Cast_Result ada/nodes.lkt:4462
--# expr-start 2504 '<FieldAccess for expr at nodes.lkt:4462:20>' Fld_3 ada/nodes.lkt:4462
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2504
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Un_Op_Range
   then
      Cast_Result := Create_Internal_Entity_Un_Op
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result := No_Entity_Un_Op;
   end if;
--# expr-done 2505
Var_Expr_74 := Cast_Result;
if Var_Expr_74 /= No_Entity_Un_Op then
   --# scope-start
--# expr-start 2506 '<FieldAccess for expr at nodes.lkt:4462:20>' Fld_4 ada/nodes.lkt:4462
      if Var_Expr_74.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Var_Expr_74.Node.Un_Op_F_Expr, Info => Var_Expr_74.Info);
--# expr-done 2506
Var_Expr_0 := Fld_4;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 2507 '<IsA NullLiteral at nodes.lkt:4462:58>' Is_A_1 ada/nodes.lkt:4462
Is_A_1 := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Null_Literal_Range; 
--# expr-done 2507
Scope_Result := Is_A_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result := Result_Var_1;
end if;
--# expr-done 2508
if If_Result then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4463:18") else null)); 
   If_Result_1 := True_Rel;
else
   --# expr-start 2510 '<FieldAccess for sub_equation at nodes.lkt:4464:18>' Fld_1 ada/nodes.lkt:4464
--# expr-start 2509 '<FieldAccess for expr at nodes.lkt:4464:18>' Fld ada/nodes.lkt:4464
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2509
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 2510
   If_Result_1 := Fld_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2511
--# expr-start 2520 '<Let at nodes.lkt:4472:13>' Let_Result ada/nodes.lkt:4472
--# scope-start
--# expr-start 2513 '<at at nodes.lkt:4472:21>' Get_Result ada/nodes.lkt:4472
--# expr-start 2512 '<FieldAccess for names at nodes.lkt:4472:21>' Fld_5 ada/nodes.lkt:4472
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2512
Get_Result := Get (Self, Fld_5, 0, True); 
--# expr-done 2513
Local_N := Get_Result; 
--# bind n Local_N
--# expr-start 2519 '<If at nodes.lkt:4474:13>' If_Result_4 ada/nodes.lkt:4474
--# expr-start 2516 '<BooleanBinaryOp Or at nodes.lkt:4474:16>' If_Result_3 ada/nodes.lkt:4474
--# expr-start 2514 '<IsNull at nodes.lkt:4474:16>' Is_Null_1 ada/nodes.lkt:4474
Is_Null_1 := Local_N = null; 
--# expr-done 2514
if Is_Null_1 then
   If_Result_3 := True;
else
   --# expr-start 2515 '<IsA NullLiteral at nodes.lkt:4474:29>' Is_A_2 ada/nodes.lkt:4474
Is_A_2 := Local_N /= null 
and then Local_N.Kind in Ada_Null_Literal_Range; 
--# expr-done 2515
   If_Result_3 := Is_A_2;
end if;
--# expr-done 2516
if If_Result_3 then
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4474:51") else null)); 
   If_Result_4 := True_Rel_1;
else
   --# expr-start 2518 '<FieldAccess for sub_equation at nodes.lkt:4475:18>' Fld_6 ada/nodes.lkt:4475
--# expr-start 2517 '<as_entity at nodes.lkt:4475:18>' If_Result_2 ada/nodes.lkt:4475
Is_Null := Local_N = null; 
if Is_Null then
   If_Result_2 := No_Entity;
else
As_Entity := (Info => E_Info, Node => Local_N); 
   If_Result_2 := As_Entity;
end if;
--# expr-done 2517
      if If_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_6 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => If_Result_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => If_Result_2.Info);
--# end
--# expr-done 2518
   If_Result_4 := Fld_6;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 2519
Let_Result := If_Result_4; Inc_Ref (Let_Result);
--# end
--# expr-done 2520
And_Pred := Create_And (If_Result_1, Let_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4453:9") else null)); 
--# expr-done 2521
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_401;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_401;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Depends_Assoc_Equation;
--# end
--# property-start AggregateAssoc.test_case_assoc_equation ada/nodes.lkt:4481
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Test_Case_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_402 with Inline_Always;
      Var_Expr_0 : Bare_Base_Id;
Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_2 : Bare_Ada_Node_Array_Access;
Get_Result : Bare_Ada_Node;
Cast_Result : Bare_Base_Id;
Fld_3 : Symbol_Type;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_402 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_2);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_402;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2530 '<If at nodes.lkt:4484:9>' If_Result_1 ada/nodes.lkt:4484
--# expr-start 2524 '<Cast to BaseId at nodes.lkt:4485:13>' Cast_Result ada/nodes.lkt:4485
--# expr-start 2523 '<at at nodes.lkt:4485:13>' Get_Result ada/nodes.lkt:4485
--# expr-start 2522 '<FieldAccess for names at nodes.lkt:4485:13>' Fld_2 ada/nodes.lkt:4485
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Ent.Node);
--# end
--# expr-done 2522
Get_Result := Get (Self, Fld_2, 0, True); 
--# expr-done 2523
   if Get_Result = null
      or else Get_Result.Kind in Ada_Base_Id
   then
      Cast_Result := Get_Result;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 2524
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind name Var_Expr_0
--# expr-start 2525 '<FieldAccess for name_symbol at nodes.lkt:4486:27>' Fld_3 ada/nodes.lkt:4486
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Var_Expr_0);
--# end
--# expr-done 2525
--# expr-start 2526 '<Symbol Requires at nodes.lkt:4486:49>' Sym ada/nodes.lkt:4486
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Requires); 
--# expr-done 2526
Is_Equal_1 := Fld_3 = Sym; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 2527 '<Symbol Ensures at nodes.lkt:4486:63>' Sym_1 ada/nodes.lkt:4486
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ensures); 
--# expr-done 2527
Is_Equal := Fld_3 = Sym_1; 
   If_Result := Is_Equal;
end if;
Scope_Result := If_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   --# expr-start 2529 '<FieldAccess for sub_equation at nodes.lkt:4488:14>' Fld_1 ada/nodes.lkt:4488
--# expr-start 2528 '<FieldAccess for expr at nodes.lkt:4488:14>' Fld ada/nodes.lkt:4488
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2528
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 2529
   If_Result_1 := Fld_1;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4489:14") else null)); 
   If_Result_1 := True_Rel;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2530
         Property_Result := If_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_402;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_402;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Test_Case_Assoc_Equation;
--# end
--# property-start AggregateAssoc.contract_cases_assoc_equation ada/nodes.lkt:4495
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Contract_Cases_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_403 with Inline_Always;
            procedure Finalizer_Scope_2263 with Inline_Always;
            procedure Finalizer_Scope_2264 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Expr;
Fld : Internal_Entity_Alternatives_List;
Fld_1 : Bare_Alternatives_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Expr;
Fld_3 : Logic_Var;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Fld_7 : Internal_Entity_Expr;
Fld_8 : Logic_Var;
Fld_9 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_10 : Internal_Entity_Expr;
Fld_11 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Logic_Equation;
And_Pred_4 : Logic_Equation;
            procedure Finalizer_Scope_403 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_11);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_13);
                     Dec_Ref (And_Pred_4);
            end Finalizer_Scope_403;
            procedure Finalizer_Scope_2263 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2263;
            procedure Finalizer_Scope_2264 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_2264;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2552 '<LogicBinaryOp And at nodes.lkt:4496:9>' And_Pred_4 ada/nodes.lkt:4496
--# expr-start 2549 '<LogicBinaryOp And at nodes.lkt:4496:9>' And_Pred_3 ada/nodes.lkt:4496
--# expr-start 2546 '<LogicBinaryOp And at nodes.lkt:4496:9>' And_Pred_2 ada/nodes.lkt:4496
--# expr-start 2541 '<LogicAll at nodes.lkt:4496:9>' Logic_Boolean_Op ada/nodes.lkt:4496
--# expr-start 2540 '<Map at nodes.lkt:4496:9>' Map_Result ada/nodes.lkt:4496
   --# expr-start 2531 '<FieldAccess for designators at nodes.lkt:4496:9>' Fld ada/nodes.lkt:4496
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Alternatives_List (Node => Ent.Node.Aggregate_Assoc_F_Designators, Info => Ent.Info);
--# expr-done 2531
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind d Item_0
--# expr-start 2532 '<Cast to Expr at nodes.lkt:4498:13>' Cast_Result ada/nodes.lkt:4498
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Expr
   then
      Cast_Result := Create_Internal_Entity_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Expr;
   end if;
--# expr-done 2532
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Expr then
   --# scope-start
   --# bind e Var_Expr_1
--# expr-start 2539 '<LogicBinaryOp And at nodes.lkt:4500:17>' And_Pred_1 ada/nodes.lkt:4500
--# expr-start 2537 '<LogicBinaryOp And at nodes.lkt:4501:21>' And_Pred ada/nodes.lkt:4501
--# expr-start 2535 '<Bind at nodes.lkt:4501:21>' Bind_Result ada/nodes.lkt:4501
--# expr-start 2533 '<FieldAccess for expected_type_var at nodes.lkt:4501:21>' Fld_3 ada/nodes.lkt:4501
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 2533
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 2534 '<FieldAccess for bool_type at nodes.lkt:4501:46>' Fld_4 ada/nodes.lkt:4501
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_4 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 2534
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Bind_Result := Solver.Create_Assign (Fld_3, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4501:21") else null)); 
--# expr-done 2535
--# expr-start 2536 '<FieldAccess for sub_equation at nodes.lkt:4502:26>' Fld_5 ada/nodes.lkt:4502
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 2536
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4501:21") else null)); 
--# expr-done 2537
--# expr-start 2538 '<FieldAccess for matches_expected_formal_type at nodes.lkt:4504:22>' Fld_6 ada/nodes.lkt:4504
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Var_Expr_1.Node, Origin => Origin);
--# end
--# expr-done 2538
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4500:17") else null)); 
--# expr-done 2539
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2264;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4505:29") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         declare
            Item_To_Append : constant Logic_Equation := Result_Var;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2263;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2540
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4496:9") else null)); 
--# expr-done 2541
--# expr-start 2545 '<Bind at nodes.lkt:4510:13>' Bind_Result_1 ada/nodes.lkt:4510
--# expr-start 2543 '<FieldAccess for expected_type_var at nodes.lkt:4510:13>' Fld_8 ada/nodes.lkt:4510
--# expr-start 2542 '<FieldAccess for expr at nodes.lkt:4510:13>' Fld_7 ada/nodes.lkt:4510
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2542
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_7.Node);
--# expr-done 2543
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
--# expr-start 2544 '<FieldAccess for bool_type at nodes.lkt:4510:48>' Fld_9 ada/nodes.lkt:4510
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_9 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 2544
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_9.Node,
         Info => Fld_9.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_8, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4510:13") else null)); 
--# expr-done 2545
And_Pred_2 := Create_And (Logic_Boolean_Op, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4496:9") else null)); 
--# expr-done 2546
--# expr-start 2548 '<FieldAccess for sub_equation at nodes.lkt:4512:14>' Fld_11 ada/nodes.lkt:4512
--# expr-start 2547 '<FieldAccess for expr at nodes.lkt:4512:14>' Fld_10 ada/nodes.lkt:4512
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2547
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_11 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_10.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_10.Info);
--# end
--# expr-done 2548
And_Pred_3 := Create_And (And_Pred_2, Fld_11, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4496:9") else null)); 
--# expr-done 2549
--# expr-start 2551 '<FieldAccess for matches_expected_formal_type at nodes.lkt:4513:14>' Fld_13 ada/nodes.lkt:4513
--# expr-start 2550 '<FieldAccess for expr at nodes.lkt:4513:14>' Fld_12 ada/nodes.lkt:4513
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2550
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_13 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_12.Node, Origin => Origin);
--# end
--# expr-done 2551
And_Pred_4 := Create_And (And_Pred_3, Fld_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4496:9") else null)); 
--# expr-done 2552
         Property_Result := And_Pred_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_403;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_403;
                     Finalizer_Scope_2263;
                     Finalizer_Scope_2264;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Contract_Cases_Assoc_Equation;
--# end
--# property-start AggregateAssoc.subprogram_variant_assoc_equation ada/nodes.lkt:4518
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Subprogram_Variant_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_404 with Inline_Always;
            procedure Finalizer_Scope_2265 with Inline_Always;
            procedure Finalizer_Scope_2266 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Base_Id;
Fld : Internal_Entity_Alternatives_List;
Fld_1 : Bare_Alternatives_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Id;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Var;
Pred : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Var;
Fld_7 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Equation;
And_Pred : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_10 : Internal_Entity_Expr;
Fld_11 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Logic_Equation;
False_Rel : Logic_Equation;
Fld_14 : Symbol_Type;
Sym : Symbol_Type;
Is_Equal : Boolean;
If_Result : Logic_Equation;
Fld_15 : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Is_Equal_1 : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Logic_Equation;
Scope_Result : Logic_Equation;
False_Rel_1 : Logic_Equation;
Result_Var : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result_3 : Internal_Entity;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_404 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_404;
            procedure Finalizer_Scope_2265 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (False_Rel_1);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2265;
            procedure Finalizer_Scope_2266 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Fld_11);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_13);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_2);
            end Finalizer_Scope_2266;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2579 '<LogicAll at nodes.lkt:4519:9>' Logic_Boolean_Op ada/nodes.lkt:4519
--# expr-start 2578 '<Map at nodes.lkt:4519:9>' Map_Result ada/nodes.lkt:4519
   --# expr-start 2553 '<FieldAccess for designators at nodes.lkt:4519:9>' Fld ada/nodes.lkt:4519
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Alternatives_List (Node => Ent.Node.Aggregate_Assoc_F_Designators, Info => Ent.Info);
--# expr-done 2553
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result_3 := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result_3 := As_Entity;
end if;
                  Item_0 := If_Result_3; 
   --# scope-start
               --# bind d Item_0
--# expr-start 2554 '<Cast to BaseId at nodes.lkt:4521:13>' Cast_Result ada/nodes.lkt:4521
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Id
   then
      Cast_Result := Create_Internal_Entity_Base_Id
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Id;
   end if;
--# expr-done 2554
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Base_Id then
   --# scope-start
   --# bind name Var_Expr_1
--# expr-start 2577 '<If at nodes.lkt:4523:17>' If_Result_2 ada/nodes.lkt:4523
--# expr-start 2555 '<FieldAccess for name_symbol at nodes.lkt:4523:20>' Fld_15 ada/nodes.lkt:4523
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_15 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Var_Expr_1.Node);
--# end
--# expr-done 2555
--# expr-start 2556 '<Symbol Increases at nodes.lkt:4523:42>' Sym_1 ada/nodes.lkt:4523
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Increases); 
--# expr-done 2556
Is_Equal_2 := Fld_15 = Sym_1; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 2557 '<Symbol Decreases at nodes.lkt:4523:57>' Sym_2 ada/nodes.lkt:4523
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Decreases); 
--# expr-done 2557
Is_Equal_1 := Fld_15 = Sym_2; 
   If_Result_1 := Is_Equal_1;
end if;
if If_Result_1 then
   --# expr-start 2571 '<LogicBinaryOp And at nodes.lkt:4525:21>' And_Pred_1 ada/nodes.lkt:4525
--# expr-start 2568 '<LogicBinaryOp Or at nodes.lkt:4528:25>' Or_Pred ada/nodes.lkt:4528
--# expr-start 2560 '<Predicate on BaseTypeDecl.is_discrete_type at nodes.lkt:4528:25>' Pred ada/nodes.lkt:4528
--# expr-start 2559 '<FieldAccess for type_var at nodes.lkt:4528:56>' Fld_4 ada/nodes.lkt:4528
--# expr-start 2558 '<FieldAccess for expr at nodes.lkt:4528:56>' Fld_3 ada/nodes.lkt:4528
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2558
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_3.Node);
--# expr-done 2559
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Pred := Solver.Create_Predicate (Fld_4, Create_Base_Type_Decl_P_Is_Discrete_Type_0_Predicate (Origin)); 
--# expr-done 2560
--# expr-start 2567 '<LogicBinaryOp And at nodes.lkt:4530:29>' And_Pred ada/nodes.lkt:4530
--# expr-start 2564 '<Bind at nodes.lkt:4530:29>' Bind_Result ada/nodes.lkt:4530
--# expr-start 2562 '<FieldAccess for expected_type_var at nodes.lkt:4530:29>' Fld_6 ada/nodes.lkt:4530
--# expr-start 2561 '<FieldAccess for expr at nodes.lkt:4530:29>' Fld_5 ada/nodes.lkt:4530
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2561
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_5.Node);
--# expr-done 2562
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
--# expr-start 2563 '<FieldAccess for big_integer_type at nodes.lkt:4531:32>' Fld_7 ada/nodes.lkt:4531
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.big_integer_type
Fld_7 := Libadalang.Implementation.Ada_Node_P_Big_Integer_Type (Node => Ent.Node);
--# end
--# expr-done 2563
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
Bind_Result := Solver.Create_Assign (Fld_6, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4530:29") else null)); 
--# expr-done 2564
--# expr-start 2566 '<FieldAccess for matches_expected_type at nodes.lkt:4532:34>' Fld_9 ada/nodes.lkt:4532
--# expr-start 2565 '<FieldAccess for expr at nodes.lkt:4532:34>' Fld_8 ada/nodes.lkt:4532
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_8 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2565
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_9 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_8.Node, Origin => Origin);
--# end
--# expr-done 2566
And_Pred := Create_And (Bind_Result, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4530:29") else null)); 
--# expr-done 2567
Or_Pred := Create_Or (Pred, And_Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4528:25") else null)); 
--# expr-done 2568
--# expr-start 2570 '<FieldAccess for sub_equation at nodes.lkt:4535:26>' Fld_11 ada/nodes.lkt:4535
--# expr-start 2569 '<FieldAccess for expr at nodes.lkt:4535:26>' Fld_10 ada/nodes.lkt:4535
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2569
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_11 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_10.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_10.Info);
--# end
--# expr-done 2570
And_Pred_1 := Create_And (Or_Pred, Fld_11, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4525:21") else null)); 
--# expr-done 2571
   If_Result_2 := And_Pred_1;
else
   --# expr-start 2576 '<If at nodes.lkt:4523:17>' If_Result ada/nodes.lkt:4523
--# expr-start 2572 '<FieldAccess for name_symbol at nodes.lkt:4536:22>' Fld_14 ada/nodes.lkt:4536
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_14 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Var_Expr_1.Node);
--# end
--# expr-done 2572
--# expr-start 2573 '<Symbol Structural at nodes.lkt:4536:44>' Sym ada/nodes.lkt:4536
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Structural); 
--# expr-done 2573
Is_Equal := Fld_14 = Sym; 
if Is_Equal then
   --# expr-start 2575 '<FieldAccess for sub_equation at nodes.lkt:4541:21>' Fld_13 ada/nodes.lkt:4541
--# expr-start 2574 '<FieldAccess for expr at nodes.lkt:4541:21>' Fld_12 ada/nodes.lkt:4541
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2574
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_13 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_12.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_12.Info);
--# end
--# expr-done 2575
   If_Result := Fld_13;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4544:22") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 2576
   If_Result_2 := If_Result;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 2577
Scope_Result := If_Result_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2266;
   Result_Var := Scope_Result;
else
   False_Rel_1 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4545:29") else null)); 
   Result_Var := False_Rel_1;
end if;
      Inc_Ref (Result_Var);
         declare
            Item_To_Append : constant Logic_Equation := Result_Var;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2265;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2578
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4519:9") else null)); 
--# expr-done 2579
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_404;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_404;
                     Finalizer_Scope_2265;
                     Finalizer_Scope_2266;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Subprogram_Variant_Assoc_Equation;
--# end
--# property-start AggregateAssoc.exprs_assoc_equation ada/nodes.lkt:4553
pragma Warnings (Off, "is not referenced");
 function Aggregate_Assoc_P_Exprs_Assoc_Equation
  (Node : Bare_Aggregate_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Aggregate_Assoc  := Bare_Aggregate_Assoc (Node);
     Ent : Internal_Entity_Aggregate_Assoc :=
       Internal_Entity_Aggregate_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_405 with Inline_Always;
            procedure Finalizer_Scope_2267 with Inline_Always;
            procedure Finalizer_Scope_2268 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Name;
Fld : Internal_Entity_Alternatives_List;
Fld_1 : Bare_Alternatives_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Fld_3 : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Fld_4 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_5 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_405 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_405;
            procedure Finalizer_Scope_2267 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2267;
            procedure Finalizer_Scope_2268 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2268;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2587 '<LogicBinaryOp And at nodes.lkt:4554:9>' And_Pred ada/nodes.lkt:4554
--# expr-start 2583 '<LogicAll at nodes.lkt:4554:9>' Logic_Boolean_Op ada/nodes.lkt:4554
--# expr-start 2582 '<Map at nodes.lkt:4554:9>' Map_Result ada/nodes.lkt:4554
   --# expr-start 2580 '<FieldAccess for designators at nodes.lkt:4554:9>' Fld ada/nodes.lkt:4554
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Alternatives_List (Node => Ent.Node.Aggregate_Assoc_F_Designators, Info => Ent.Info);
--# expr-done 2580
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind d Item_0
      --# expr-start 2581 '<FieldAccess for sub_equation at nodes.lkt:4554:43>' Fld_3 ada/nodes.lkt:4554
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 2581
         declare
            Item_To_Append : constant Logic_Equation := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2267;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2582
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4554:9") else null)); 
--# expr-done 2583
--# expr-start 2585 '<Cast to Name at nodes.lkt:4555:14>' Cast_Result ada/nodes.lkt:4555
--# expr-start 2584 '<FieldAccess for expr at nodes.lkt:4555:14>' Fld_4 ada/nodes.lkt:4555
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2584
   if Fld_4.Node = null
      or else Fld_4.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 2585
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Name then
   --# scope-start
   --# bind n Var_Expr_1
--# expr-start 2586 '<FieldAccess for sub_equation at nodes.lkt:4556:20>' Fld_5 ada/nodes.lkt:4556
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 2586
Scope_Result := Fld_5;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2268;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4557:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred := Create_And (Logic_Boolean_Op, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4554:9") else null)); 
--# expr-done 2587
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_405;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_405;
                     Finalizer_Scope_2267;
                     Finalizer_Scope_2268;
            raise;
      end;
   return Property_Result;
end Aggregate_Assoc_P_Exprs_Assoc_Equation;
--# end
   --
   --  Primitives for Bare_Multi_Dim_Array_Assoc
   --
      procedure Initialize_Fields_For_Multi_Dim_Array_Assoc
        (Self : Bare_Multi_Dim_Array_Assoc
         ; Aggregate_Assoc_F_Designators : Bare_Alternatives_List
         ; Aggregate_Assoc_F_R_Expr : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Aggregate_Assoc
              (Self, Aggregate_Assoc_F_Designators, Aggregate_Assoc_F_R_Expr);
      end Initialize_Fields_For_Multi_Dim_Array_Assoc;
   --
   --  Primitives for Bare_Composite_Constraint_Assoc
   --
      procedure Initialize_Fields_For_Composite_Constraint_Assoc
        (Self : Bare_Composite_Constraint_Assoc
         ; Composite_Constraint_Assoc_F_Ids : Bare_Discriminant_Choice_List
         ; Composite_Constraint_Assoc_F_Constraint_Expr : Bare_Ada_Node
        ) is
      begin
            Self.Composite_Constraint_Assoc_F_Ids := Composite_Constraint_Assoc_F_Ids;
            Self.Composite_Constraint_Assoc_F_Constraint_Expr := Composite_Constraint_Assoc_F_Constraint_Expr;
      end Initialize_Fields_For_Composite_Constraint_Assoc;
   function Composite_Constraint_Assoc_F_Ids
     (Node : Bare_Composite_Constraint_Assoc) return Bare_Discriminant_Choice_List
   is
   begin
         return Node.Composite_Constraint_Assoc_F_Ids;
   end;
   function Composite_Constraint_Assoc_F_Constraint_Expr
     (Node : Bare_Composite_Constraint_Assoc) return Bare_Ada_Node
   is
   begin
         return Node.Composite_Constraint_Assoc_F_Constraint_Expr;
   end;
--# property-start CompositeConstraintAssoc.expr ada/nodes.lkt:4572
pragma Warnings (Off, "is not referenced");
 function Composite_Constraint_Assoc_P_Expr
  (Node : Bare_Composite_Constraint_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Composite_Constraint_Assoc  := Bare_Composite_Constraint_Assoc (Node);
     Ent : Internal_Entity_Composite_Constraint_Assoc :=
       Internal_Entity_Composite_Constraint_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2589 '<Cast to Expr at nodes.lkt:4572:32>' Cast_Result ada/nodes.lkt:4572
--# expr-start 2588 '<FieldAccess for constraint_expr at nodes.lkt:4572:32>' Fld ada/nodes.lkt:4572
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Ent.Node.Composite_Constraint_Assoc_F_Constraint_Expr, Info => Ent.Info);
--# expr-done 2588
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Expr
   then
      Cast_Result := Create_Internal_Entity_Expr
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 2589
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Composite_Constraint_Assoc_P_Expr;
--# end
--# property-start CompositeConstraintAssoc.names ada/nodes.lkt:4574
pragma Warnings (Off, "is not referenced");
 function Composite_Constraint_Assoc_P_Names
  (Node : Bare_Composite_Constraint_Assoc
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Composite_Constraint_Assoc  := Bare_Composite_Constraint_Assoc (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_407 with Inline_Always;
      Fld : Bare_Discriminant_Choice_List;
Item_0 : Bare_Identifier;
Cast_Expr : Bare_Identifier;
Cast_Result : Bare_Ada_Node;
Map_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_407 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_407;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2592 '<Map at nodes.lkt:4574:35>' Map_Result ada/nodes.lkt:4574
   --# expr-start 2590 '<FieldAccess for ids at nodes.lkt:4574:35>' Fld ada/nodes.lkt:4574
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Composite_Constraint_Assoc_F_Ids;
--# expr-done 2590
      declare
         Map_Result_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Discriminant_Choice_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind i Item_0
      --# expr-start 2591 '<Cast to AdaNode at nodes.lkt:4574:55>' Cast_Result ada/nodes.lkt:4574
Cast_Expr := Item_0; 
      Cast_Result := Cast_Expr;
--# expr-done 2591
         declare
            Item_To_Append : constant Bare_Ada_Node := Cast_Result;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2592
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_407;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_407;
            raise;
      end;
   return Property_Result;
end Composite_Constraint_Assoc_P_Names;
--# end
   --
   --  Primitives for Bare_Iterated_Assoc
   --
      procedure Initialize_Fields_For_Iterated_Assoc
        (Self : Bare_Iterated_Assoc
         ; Iterated_Assoc_F_Spec : Bare_For_Loop_Spec
         ; Iterated_Assoc_F_Key_Expr : Bare_Expr
         ; Iterated_Assoc_F_R_Expr : Bare_Expr
        ) is
      begin
            Self.Iterated_Assoc_F_Spec := Iterated_Assoc_F_Spec;
            Self.Iterated_Assoc_F_Key_Expr := Iterated_Assoc_F_Key_Expr;
            Self.Iterated_Assoc_F_R_Expr := Iterated_Assoc_F_R_Expr;
      end Initialize_Fields_For_Iterated_Assoc;
   function Iterated_Assoc_F_Spec
     (Node : Bare_Iterated_Assoc) return Bare_For_Loop_Spec
   is
   begin
         return Node.Iterated_Assoc_F_Spec;
   end;
   function Iterated_Assoc_F_Key_Expr
     (Node : Bare_Iterated_Assoc) return Bare_Expr
   is
   begin
         return Node.Iterated_Assoc_F_Key_Expr;
   end;
   function Iterated_Assoc_F_R_Expr
     (Node : Bare_Iterated_Assoc) return Bare_Expr
   is
   begin
         return Node.Iterated_Assoc_F_R_Expr;
   end;
--# property-start IteratedAssoc.expr ada/nodes.lkt:4587
pragma Warnings (Off, "is not referenced");
 function Iterated_Assoc_P_Expr
  (Node : Bare_Iterated_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Iterated_Assoc  := Bare_Iterated_Assoc (Node);
     Ent : Internal_Entity_Iterated_Assoc :=
       Internal_Entity_Iterated_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Fld : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2593 '<FieldAccess for r_expr at nodes.lkt:4587:32>' Fld ada/nodes.lkt:4587
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Iterated_Assoc_F_R_Expr, Info => Ent.Info);
--# expr-done 2593
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Iterated_Assoc_P_Expr;
--# end
--# property-start IteratedAssoc.names ada/nodes.lkt:4589
pragma Warnings (Off, "is not referenced");
 function Iterated_Assoc_P_Names
  (Node : Bare_Iterated_Assoc
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Iterated_Assoc  := Bare_Iterated_Assoc (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Bare_Ada_Node_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Iterated_Assoc_P_Names;
--# end
--# property-start IteratedAssoc.base_aggregate ada/nodes.lkt:4591
pragma Warnings (Off, "is not referenced");
 function Iterated_Assoc_P_Base_Aggregate
  (Node : Bare_Iterated_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Aggregate
is
   Self : Bare_Iterated_Assoc  := Bare_Iterated_Assoc (Node);
     Ent : Internal_Entity_Iterated_Assoc :=
       Internal_Entity_Iterated_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Aggregate;
      Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Aggregate;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2596 '<Cast to BaseAggregate at nodes.lkt:4592:9>' Cast_Result ada/nodes.lkt:4592
--# expr-start 2595 '<parent at nodes.lkt:4592:9>' Fld_1 ada/nodes.lkt:4592
--# expr-start 2594 '<parent at nodes.lkt:4592:9>' Fld ada/nodes.lkt:4592
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2594
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 2595
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Base_Aggregate
   then
      Cast_Result := Create_Internal_Entity_Base_Aggregate
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 2596
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Iterated_Assoc_P_Base_Aggregate;
--# end
--# property-start IteratedAssoc.xref_stop_resolution ada/nodes.lkt:4595
pragma Warnings (Off, "is not referenced");
 function Iterated_Assoc_P_Xref_Stop_Resolution
  (Node : Bare_Iterated_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Iterated_Assoc  := Bare_Iterated_Assoc (Node);
     Ent : Internal_Entity_Iterated_Assoc :=
       Internal_Entity_Iterated_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2599 '<IsA BaseAggregate at nodes.lkt:4595:40>' Is_A ada/nodes.lkt:4595
--# expr-start 2598 '<parent at nodes.lkt:4595:40>' Fld_1 ada/nodes.lkt:4595
--# expr-start 2597 '<parent at nodes.lkt:4595:40>' Fld ada/nodes.lkt:4595
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2597
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 2598
Is_A := Fld_1.Node /= null 
and then Fld_1.Node.Kind in Ada_Base_Aggregate; 
--# expr-done 2599
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Iterated_Assoc_P_Xref_Stop_Resolution;
--# end
--# property-start IteratedAssoc.xref_equation ada/nodes.lkt:4598
pragma Warnings (Off, "is not referenced");
 function Iterated_Assoc_P_Xref_Equation
  (Node : Bare_Iterated_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Iterated_Assoc  := Bare_Iterated_Assoc (Node);
     Ent : Internal_Entity_Iterated_Assoc :=
       Internal_Entity_Iterated_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_412 with Inline_Always;
            procedure Finalizer_Scope_2273 with Inline_Always;
      Local_Aggregate : Internal_Entity_Base_Aggregate;
Local_Root_Agg : Internal_Multidim_Aggregate_Info;
Local_Type_Decl : Internal_Entity_Base_Type_Decl;
Local_Array_Type_Def : Internal_Entity_Array_Type_Def;
Local_Container_Aggregate : Internal_Entity_Aggregate;
Local_Comp_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Array_Type_Def;
Local_Index_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Array_Type_Def;
Local_Spec_Success : Boolean;
Var_Expr_2 : Internal_Entity_Expr;
Var_Expr_75 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Aggregate;
Fld_1 : Internal_Multidim_Aggregate_Info;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Is_Equal : Boolean;
Not_Val : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Array_Type_Def;
Scope_Result : Internal_Entity_Array_Type_Def;
Result_Var : Internal_Entity_Array_Type_Def;
Sym : Symbol_Type;
Fld_5 : Internal_Aspect;
Fld_6 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Aggregate;
Fld_7 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_8 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Fld_9 : Integer;
Fld_10 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Fld_11 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Fld_12 : Internal_Entity_For_Loop_Spec;
Fld_13 : Internal_Entity_For_Loop_Spec;
Fld_14 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Expr;
Fld_15 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_16 : Internal_Entity_For_Loop_Spec;
Fld_17 : Internal_Entity;
Cast_Result_4 : Internal_Entity_Expr;
Fld_18 : Logic_Equation;
And_Pred : Logic_Equation;
True_Rel : Logic_Equation;
Fld_19 : Bare_For_Loop_Spec;
Fld_20 : Bare_Iter_Type;
Is_A : Boolean;
If_Result_1 : Logic_Equation;
Fld_21 : Boolean;
Fld_22 : Internal_Entity_Expr;
Fld_23 : Logic_Equation;
Fld_24 : Internal_Entity_Expr;
Fld_25 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_26 : Internal_Entity_Expr;
Fld_27 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_28 : Internal_Entity_Expr;
Fld_29 : Logic_Equation;
Fld_30 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_31 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_3 : Logic_Equation;
And_Pred_5 : Logic_Equation;
True_Rel_2 : Logic_Equation;
Is_Equal_1 : Boolean;
Fld_32 : Integer;
Fld_33 : Integer;
Arith_Result : Integer;
Is_Equal_2 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Logic_Equation;
False_Rel : Logic_Equation;
If_Result_4 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
Let_Result_4 : Logic_Equation;
Let_Result_5 : Logic_Equation;
Let_Result_6 : Logic_Equation;
Let_Result_7 : Logic_Equation;
            procedure Finalizer_Scope_412 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_18);
                     Dec_Ref (And_Pred);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Fld_23);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_27);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (True_Rel_2);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Let_Result_7);
            end Finalizer_Scope_412;
            procedure Finalizer_Scope_2273 is
            begin
                     Dec_Ref (Fld_29);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_31);
                     Dec_Ref (And_Pred_4);
            end Finalizer_Scope_2273;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2666 '<Let at nodes.lkt:4599:9>' Let_Result_7 ada/nodes.lkt:4599
--# scope-start
--# expr-start 2600 '<FieldAccess for base_aggregate at nodes.lkt:4599:25>' Fld ada/nodes.lkt:4599
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start IteratedAssoc.base_aggregate
Fld := Libadalang.Implementation.Iterated_Assoc_P_Base_Aggregate (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2600
Local_Aggregate := Fld; 
--# bind aggregate Local_Aggregate
--# expr-start 2665 '<Let at nodes.lkt:4600:9>' Let_Result_6 ada/nodes.lkt:4600
--# scope-start
--# expr-start 2601 '<FieldAccess for multidim_root_aggregate at nodes.lkt:4600:24>' Fld_1 ada/nodes.lkt:4600
      if Local_Aggregate.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.multidim_root_aggregate
Fld_1 := Libadalang.Implementation.Base_Aggregate_P_Multidim_Root_Aggregate (Node => Local_Aggregate.Node, Origin => Origin, E_Info => Local_Aggregate.Info);
--# end
--# expr-done 2601
Local_Root_Agg := Fld_1; 
--# bind root_agg Local_Root_Agg
--# expr-start 2664 '<Let at nodes.lkt:4604:9>' Let_Result_5 ada/nodes.lkt:4604
--# scope-start
--# expr-start 2607 '<If at nodes.lkt:4605:13>' If_Result ada/nodes.lkt:4605
--# expr-start 2603 '<Not at nodes.lkt:4605:16>' Not_Val ada/nodes.lkt:4605
--# expr-start 2602 '<IsNull at nodes.lkt:4605:20>' Is_Equal ada/nodes.lkt:4605
Is_Equal := Local_Root_Agg = No_Multidim_Aggregate_Info; 
--# expr-done 2602
Not_Val := not (Is_Equal); 
--# expr-done 2603
if Not_Val then
   --# expr-start 2604 '<FieldAccess for typ at nodes.lkt:4605:42>' Fld_2 ada/nodes.lkt:4605
Fld_2 := Local_Root_Agg.Typ;
--# expr-done 2604
   If_Result := Fld_2;
else
   --# expr-start 2606 '<Cast to BaseTypeDecl at nodes.lkt:4606:18>' Cast_Result ada/nodes.lkt:4606
--# expr-start 2605 '<FieldAccess for type_val at nodes.lkt:4606:18>' Fld_3 ada/nodes.lkt:4606
      if Local_Aggregate.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_3 := Libadalang.Implementation.Expr_P_Type_Val (Node => Local_Aggregate.Node);
--# end
--# expr-done 2605
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 2606
   If_Result := Cast_Result;
end if;
--# expr-done 2607
Local_Type_Decl := If_Result; 
--# bind type_decl Local_Type_Decl
--# expr-start 2663 '<Let at nodes.lkt:4607:9>' Let_Result_4 ada/nodes.lkt:4607
--# scope-start
Var_Expr_75 := Local_Type_Decl;
if Var_Expr_75 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 2608 '<FieldAccess for array_def at nodes.lkt:4607:30>' Fld_4 ada/nodes.lkt:4607
      if Var_Expr_75.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.array_def'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Array_Def (Node => Var_Expr_75.Node, Origin => Origin, E_Info => Var_Expr_75.Info);
--# end
--# expr-done 2608
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Array_Type_Def;
end if;
Local_Array_Type_Def := Result_Var; 
--# bind array_type_def Local_Array_Type_Def
--# expr-start 2662 '<Let at nodes.lkt:4609:9>' Let_Result_3 ada/nodes.lkt:4609
--# scope-start
--# expr-start 2612 '<Cast to Aggregate at nodes.lkt:4610:13>' Cast_Result_1 ada/nodes.lkt:4610
--# expr-start 2611 '<FieldAccess for value at nodes.lkt:4610:13>' Fld_6 ada/nodes.lkt:4610
--# expr-start 2610 '<FieldAccess for get_aspect at nodes.lkt:4610:13>' Fld_5 ada/nodes.lkt:4610
      if Local_Type_Decl.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2609 '<Symbol Aggregate at nodes.lkt:4610:34>' Sym ada/nodes.lkt:4610
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aggregate); 
--# expr-done 2609
--# property-call-start BasicDecl.get_aspect
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Local_Type_Decl.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Local_Type_Decl.Info);
--# end
--# expr-done 2610
Fld_6 := Fld_5.Value;
--# expr-done 2611
   if Fld_6.Node = null
      or else Fld_6.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Aggregate
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
   else
         Cast_Result_1 := No_Entity_Aggregate;
   end if;
--# expr-done 2612
Local_Container_Aggregate := Cast_Result_1; 
--# bind container_aggregate Local_Container_Aggregate
--# expr-start 2661 '<Let at nodes.lkt:4612:9>' Let_Result_2 ada/nodes.lkt:4612
--# scope-start
Var_Expr_0 := Local_Array_Type_Def;
if Var_Expr_0 /= No_Entity_Array_Type_Def then
   --# scope-start
   --# bind atd Var_Expr_0
--# expr-start 2613 '<FieldAccess for comp_type at nodes.lkt:4614:26>' Fld_7 ada/nodes.lkt:4614
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArrayTypeDef.comp_type
Fld_7 := Libadalang.Implementation.Array_Type_Def_P_Comp_Type (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2613
Scope_Result_1 := Fld_7;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 2614 '<FieldAccess for element_type at nodes.lkt:4615:29>' Fld_8 ada/nodes.lkt:4615
      if Local_Container_Aggregate.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Aggregate.element_type
Fld_8 := Libadalang.Implementation.Aggregate_P_Element_Type (Node => Local_Container_Aggregate.Node, E_Info => Local_Container_Aggregate.Info);
--# end
--# expr-done 2614
   Result_Var_1 := Fld_8;
end if;
Local_Comp_Type := Result_Var_1; 
--# bind comp_type Local_Comp_Type
--# expr-start 2660 '<Let at nodes.lkt:4618:9>' Let_Result_1 ada/nodes.lkt:4618
--# scope-start
Var_Expr_1 := Local_Array_Type_Def;
if Var_Expr_1 /= No_Entity_Array_Type_Def then
   --# scope-start
   --# bind atd Var_Expr_1
--# expr-start 2616 '<FieldAccess for index_type at nodes.lkt:4620:26>' Fld_10 ada/nodes.lkt:4620
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2615 '<FieldAccess for rank at nodes.lkt:4620:41>' Fld_9 ada/nodes.lkt:4620
Fld_9 := Local_Root_Agg.Rank;
--# expr-done 2615
--# property-call-start ArrayTypeDef.index_type
Fld_10 := Libadalang.Implementation.Array_Type_Def_P_Index_Type (Node => Var_Expr_1.Node, Dim => Fld_9, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 2616
Scope_Result_2 := Fld_10;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   --# expr-start 2617 '<FieldAccess for key_type at nodes.lkt:4621:29>' Fld_11 ada/nodes.lkt:4621
      if Local_Container_Aggregate.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Aggregate.key_type
Fld_11 := Libadalang.Implementation.Aggregate_P_Key_Type (Node => Local_Container_Aggregate.Node, E_Info => Local_Container_Aggregate.Info);
--# end
--# expr-done 2617
   Result_Var_2 := Fld_11;
end if;
Local_Index_Type := Result_Var_2; 
--# bind index_type Local_Index_Type
--# expr-start 2659 '<Let at nodes.lkt:4629:9>' Let_Result ada/nodes.lkt:4629
--# scope-start
--# expr-start 2633 '<FieldAccess for resolve_names_internal_with_eq at nodes.lkt:4630:13>' Fld_21 ada/nodes.lkt:4630
--# expr-start 2618 '<FieldAccess for spec at nodes.lkt:4630:13>' Fld_12 ada/nodes.lkt:4630
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_For_Loop_Spec (Node => Ent.Node.Iterated_Assoc_F_Spec, Info => Ent.Info);
--# expr-done 2618
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2632 '<If at nodes.lkt:4631:17>' If_Result_1 ada/nodes.lkt:4631
--# expr-start 2621 '<IsA IterType.In at nodes.lkt:4631:20>' Is_A ada/nodes.lkt:4631
--# expr-start 2620 '<FieldAccess for loop_type at nodes.lkt:4631:20>' Fld_20 ada/nodes.lkt:4631
--# expr-start 2619 '<FieldAccess for spec at nodes.lkt:4631:20>' Fld_19 ada/nodes.lkt:4631
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Self.Iterated_Assoc_F_Spec;
--# expr-done 2619
      if Fld_19 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Fld_19.For_Loop_Spec_F_Loop_Type;
--# expr-done 2620
Is_A := Fld_20 /= null 
and then Fld_20.Kind in Ada_Iter_Type_In_Range; 
--# expr-done 2621
if Is_A then
   --# expr-start 2631 '<LogicBinaryOp And at nodes.lkt:4633:21>' And_Pred ada/nodes.lkt:4633
--# expr-start 2626 '<Bind at nodes.lkt:4633:21>' Bind_Result ada/nodes.lkt:4633
--# expr-start 2625 '<FieldAccess for expected_type_var at nodes.lkt:4633:21>' Fld_15 ada/nodes.lkt:4633
--# expr-start 2624 '<Cast to Expr at nodes.lkt:4633:21>' Cast_Result_2 ada/nodes.lkt:4633
--# expr-start 2623 '<FieldAccess for iter_expr at nodes.lkt:4633:21>' Fld_14 ada/nodes.lkt:4633
--# expr-start 2622 '<FieldAccess for spec at nodes.lkt:4633:21>' Fld_13 ada/nodes.lkt:4633
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_For_Loop_Spec (Node => Ent.Node.Iterated_Assoc_F_Spec, Info => Ent.Info);
--# expr-done 2622
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity (Node => Fld_13.Node.For_Loop_Spec_F_Iter_Expr, Info => Fld_13.Info);
--# expr-done 2623
   if Fld_14.Node = null
      or else Fld_14.Node.Kind in Ada_Expr
   then
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Fld_14.Node,
         Info => Fld_14.Info);
   else
         Cast_Result_2 := No_Entity_Expr;
   end if;
--# expr-done 2624
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Cast_Result_2.Node);
--# expr-done 2625
Fld_15.Value := No_Entity;
Entity_Vars.Reset (Fld_15);
Cast_Expr := Local_Index_Type; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_15, Cast_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4633:21") else null)); 
--# expr-done 2626
--# expr-start 2630 '<FieldAccess for matches_expected_type at nodes.lkt:4635:26>' Fld_18 ada/nodes.lkt:4635
--# expr-start 2629 '<Cast to Expr at nodes.lkt:4635:26>' Cast_Result_4 ada/nodes.lkt:4635
--# expr-start 2628 '<FieldAccess for iter_expr at nodes.lkt:4635:26>' Fld_17 ada/nodes.lkt:4635
--# expr-start 2627 '<FieldAccess for spec at nodes.lkt:4635:26>' Fld_16 ada/nodes.lkt:4635
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Create_Internal_Entity_For_Loop_Spec (Node => Ent.Node.Iterated_Assoc_F_Spec, Info => Ent.Info);
--# expr-done 2627
      if Fld_16.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity (Node => Fld_16.Node.For_Loop_Spec_F_Iter_Expr, Info => Fld_16.Info);
--# expr-done 2628
   if Fld_17.Node = null
      or else Fld_17.Node.Kind in Ada_Expr
   then
      Cast_Result_4 := Create_Internal_Entity_Expr
        (Node => Fld_17.Node,
         Info => Fld_17.Info);
   else
         Cast_Result_4 := No_Entity_Expr;
   end if;
--# expr-done 2629
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_18 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Cast_Result_4.Node, Origin => Origin);
--# end
--# expr-done 2630
And_Pred := Create_And (Bind_Result, Fld_18, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4633:21") else null)); 
--# expr-done 2631
   If_Result_1 := And_Pred;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4636:22") else null)); 
   If_Result_1 := True_Rel;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2632
--# property-call-start AdaNode.resolve_names_internal_with_eq
Fld_21 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal_With_Eq (Node => Fld_12.Node, Additional_Equation => If_Result_1, Env => Env, Origin => Origin, E_Info => Fld_12.Info);
--# end
--# expr-done 2633
Local_Spec_Success := Fld_21; 
--# bind spec_success Local_Spec_Success
--# expr-start 2658 '<If at nodes.lkt:4639:9>' If_Result_4 ada/nodes.lkt:4639
if Local_Spec_Success then
   --# expr-start 2657 '<If at nodes.lkt:4642:13>' If_Result_3 ada/nodes.lkt:4642
--# expr-start 2639 '<BooleanBinaryOp Or at nodes.lkt:4643:17>' If_Result_2 ada/nodes.lkt:4643
--# expr-start 2634 '<IsNull at nodes.lkt:4643:17>' Is_Equal_1 ada/nodes.lkt:4643
Is_Equal_1 := Local_Root_Agg = No_Multidim_Aggregate_Info; 
--# expr-done 2634
if Is_Equal_1 then
   If_Result_2 := True;
else
   --# expr-start 2638 '<Eq at nodes.lkt:4644:20>' Is_Equal_2 ada/nodes.lkt:4644
--# expr-start 2635 '<FieldAccess for rank at nodes.lkt:4644:20>' Fld_32 ada/nodes.lkt:4644
Fld_32 := Local_Root_Agg.Rank;
--# expr-done 2635
--# expr-start 2637 '<Arithmetic - at nodes.lkt:4644:37>' Arith_Result ada/nodes.lkt:4644
--# expr-start 2636 '<FieldAccess for array_ndims at nodes.lkt:4644:37>' Fld_33 ada/nodes.lkt:4644
      if Local_Array_Type_Def.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.array_ndims'
Fld_33 := Libadalang.Implementation.Dispatcher_Type_Def_P_Array_Ndims (Node => Local_Array_Type_Def.Node, Origin => Origin, E_Info => Local_Array_Type_Def.Info);
--# end
--# expr-done 2636
Arith_Result := (Fld_33 - 1); 
--# expr-done 2637
Is_Equal_2 := Fld_32 = Arith_Result; 
--# expr-done 2638
   If_Result_2 := Is_Equal_2;
end if;
--# expr-done 2639
if If_Result_2 then
   --# expr-start 2656 '<LogicBinaryOp And at nodes.lkt:4647:17>' And_Pred_5 ada/nodes.lkt:4647
--# expr-start 2648 '<LogicBinaryOp And at nodes.lkt:4648:21>' And_Pred_2 ada/nodes.lkt:4648
--# expr-start 2645 '<LogicBinaryOp And at nodes.lkt:4649:25>' And_Pred_1 ada/nodes.lkt:4649
--# expr-start 2641 '<FieldAccess for sub_equation at nodes.lkt:4649:25>' Fld_23 ada/nodes.lkt:4649
--# expr-start 2640 '<FieldAccess for expr at nodes.lkt:4649:25>' Fld_22 ada/nodes.lkt:4649
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_22 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2640
      if Fld_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_23 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_22.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_22.Info);
--# end
--# expr-done 2641
--# expr-start 2644 '<Bind at nodes.lkt:4650:30>' Bind_Result_1 ada/nodes.lkt:4650
--# expr-start 2643 '<FieldAccess for expected_type_var at nodes.lkt:4650:30>' Fld_25 ada/nodes.lkt:4650
--# expr-start 2642 '<FieldAccess for expr at nodes.lkt:4650:30>' Fld_24 ada/nodes.lkt:4650
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_24 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2642
      if Fld_24.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_24.Node);
--# expr-done 2643
Fld_25.Value := No_Entity;
Entity_Vars.Reset (Fld_25);
Cast_Expr_1 := Local_Comp_Type; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_25, Cast_Result_5, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4650:30") else null)); 
--# expr-done 2644
And_Pred_1 := Create_And (Fld_23, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4649:25") else null)); 
--# expr-done 2645
--# expr-start 2647 '<FieldAccess for matches_expected_type at nodes.lkt:4652:26>' Fld_27 ada/nodes.lkt:4652
--# expr-start 2646 '<FieldAccess for expr at nodes.lkt:4652:26>' Fld_26 ada/nodes.lkt:4652
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_26 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2646
      if Fld_26.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_27 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_26.Node, Origin => Origin);
--# end
--# expr-done 2647
And_Pred_2 := Create_And (And_Pred_1, Fld_27, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4648:21") else null)); 
--# expr-done 2648
--# expr-start 2649 '<FieldAccess for key_expr at nodes.lkt:4656:21>' Fld_28 ada/nodes.lkt:4656
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Create_Internal_Entity_Expr (Node => Ent.Node.Iterated_Assoc_F_Key_Expr, Info => Ent.Info);
--# expr-done 2649
Var_Expr_2 := Fld_28;
if Var_Expr_2 /= No_Entity_Expr then
   --# scope-start
   --# bind ke Var_Expr_2
--# expr-start 2655 '<LogicBinaryOp And at nodes.lkt:4658:25>' And_Pred_4 ada/nodes.lkt:4658
--# expr-start 2653 '<LogicBinaryOp And at nodes.lkt:4659:29>' And_Pred_3 ada/nodes.lkt:4659
--# expr-start 2650 '<FieldAccess for sub_equation at nodes.lkt:4659:29>' Fld_29 ada/nodes.lkt:4659
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_29 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 2650
--# expr-start 2652 '<Bind at nodes.lkt:4660:34>' Bind_Result_2 ada/nodes.lkt:4660
--# expr-start 2651 '<FieldAccess for expected_type_var at nodes.lkt:4660:34>' Fld_30 ada/nodes.lkt:4660
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_2.Node);
--# expr-done 2651
Fld_30.Value := No_Entity;
Entity_Vars.Reset (Fld_30);
Cast_Expr_2 := Local_Index_Type; 
      Cast_Result_6 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_30, Cast_Result_6, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4660:34") else null)); 
--# expr-done 2652
And_Pred_3 := Create_And (Fld_29, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4659:29") else null)); 
--# expr-done 2653
--# expr-start 2654 '<FieldAccess for matches_expected_type at nodes.lkt:4662:30>' Fld_31 ada/nodes.lkt:4662
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_31 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Var_Expr_2.Node, Origin => Origin);
--# end
--# expr-done 2654
And_Pred_4 := Create_And (And_Pred_3, Fld_31, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4658:25") else null)); 
--# expr-done 2655
Scope_Result_3 := And_Pred_4;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2273;
   Result_Var_3 := Scope_Result_3;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4663:37") else null)); 
   Result_Var_3 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_3);
And_Pred_5 := Create_And (And_Pred_2, Result_Var_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4647:17") else null)); 
--# expr-done 2656
   If_Result_3 := And_Pred_5;
else
   True_Rel_2 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4670:17") else null)); 
   If_Result_3 := True_Rel_2;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 2657
   If_Result_4 := If_Result_3;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4672:14") else null)); 
   If_Result_4 := False_Rel;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 2658
Let_Result := If_Result_4; Inc_Ref (Let_Result);
--# end
--# expr-done 2659
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2660
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 2661
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 2662
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 2663
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 2664
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 2665
Let_Result_7 := Let_Result_6; Inc_Ref (Let_Result_7);
--# end
--# expr-done 2666
         Property_Result := Let_Result_7;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_412;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_412;
                     Finalizer_Scope_2273;
            raise;
      end;
   return Property_Result;
end Iterated_Assoc_P_Xref_Equation;
--# end
--# property-start IteratedAssoc.xref_equation_for_reduce ada/nodes.lkt:4678
pragma Warnings (Off, "is not referenced");
 function Iterated_Assoc_P_Xref_Equation_For_Reduce
  (Node : Bare_Iterated_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Iterated_Assoc  := Bare_Iterated_Assoc (Node);
     Ent : Internal_Entity_Iterated_Assoc :=
       Internal_Entity_Iterated_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_413 with Inline_Always;
      Local_Expected_Typ : Logic_Var;
Local_Spec_Success : Boolean;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Value_Sequence;
Fld_1 : Internal_Entity_Iterated_Assoc;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Var;
Fld_4 : Internal_Entity_For_Loop_Spec;
Fld_5 : Internal_Entity_For_Loop_Spec;
Fld_6 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Expr;
Fld_7 : Logic_Var;
Bind_Result : Logic_Equation;
Fld_8 : Internal_Entity_For_Loop_Spec;
Fld_9 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Expr;
Fld_10 : Logic_Equation;
And_Pred : Logic_Equation;
True_Rel : Logic_Equation;
Fld_11 : Bare_For_Loop_Spec;
Fld_12 : Bare_Iter_Type;
Is_A : Boolean;
If_Result : Logic_Equation;
Fld_13 : Boolean;
Fld_14 : Internal_Entity_Expr;
Fld_15 : Logic_Equation;
Fld_16 : Internal_Entity_Expr;
Fld_17 : Logic_Var;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_18 : Internal_Entity_Expr;
Fld_19 : Logic_Equation;
And_Pred_2 : Logic_Equation;
False_Rel : Logic_Equation;
If_Result_1 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_413 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_10);
                     Dec_Ref (And_Pred);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_19);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_413;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2699 '<Let at nodes.lkt:4681:9>' Let_Result_1 ada/nodes.lkt:4681
--# scope-start
--# expr-start 2671 '<FieldAccess for expected_type_var at nodes.lkt:4682:13>' Fld_3 ada/nodes.lkt:4682
--# expr-start 2670 '<FieldAccess for expr at nodes.lkt:4682:13>' Fld_2 ada/nodes.lkt:4682
--# expr-start 2669 '<FieldAccess for iter_assoc at nodes.lkt:4682:13>' Fld_1 ada/nodes.lkt:4682
--# expr-start 2668 '<Cast to ValueSequence at nodes.lkt:4682:13>' Cast_Result ada/nodes.lkt:4682
--# expr-start 2667 '<parent at nodes.lkt:4682:13>' Fld ada/nodes.lkt:4682
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2667
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Value_Sequence_Range
   then
      Cast_Result := Create_Internal_Entity_Value_Sequence
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Value_Sequence;
   end if;
--# expr-done 2668
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Iterated_Assoc (Node => Cast_Result.Node.Value_Sequence_F_Iter_Assoc, Info => Cast_Result.Info);
--# expr-done 2669
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 2670
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2.Node);
--# expr-done 2671
Local_Expected_Typ := Fld_3; 
--# bind expected_typ Local_Expected_Typ
--# expr-start 2698 '<Let at nodes.lkt:4685:9>' Let_Result ada/nodes.lkt:4685
--# scope-start
--# expr-start 2687 '<FieldAccess for resolve_names_internal_with_eq at nodes.lkt:4686:13>' Fld_13 ada/nodes.lkt:4686
--# expr-start 2672 '<FieldAccess for spec at nodes.lkt:4686:13>' Fld_4 ada/nodes.lkt:4686
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_For_Loop_Spec (Node => Ent.Node.Iterated_Assoc_F_Spec, Info => Ent.Info);
--# expr-done 2672
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2686 '<If at nodes.lkt:4687:17>' If_Result ada/nodes.lkt:4687
--# expr-start 2675 '<IsA IterType.In at nodes.lkt:4687:20>' Is_A ada/nodes.lkt:4687
--# expr-start 2674 '<FieldAccess for loop_type at nodes.lkt:4687:20>' Fld_12 ada/nodes.lkt:4687
--# expr-start 2673 '<FieldAccess for spec at nodes.lkt:4687:20>' Fld_11 ada/nodes.lkt:4687
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Iterated_Assoc_F_Spec;
--# expr-done 2673
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Fld_11.For_Loop_Spec_F_Loop_Type;
--# expr-done 2674
Is_A := Fld_12 /= null 
and then Fld_12.Kind in Ada_Iter_Type_In_Range; 
--# expr-done 2675
if Is_A then
   --# expr-start 2685 '<LogicBinaryOp And at nodes.lkt:4689:21>' And_Pred ada/nodes.lkt:4689
--# expr-start 2680 '<Bind at nodes.lkt:4689:21>' Bind_Result ada/nodes.lkt:4689
--# expr-start 2679 '<FieldAccess for expected_type_var at nodes.lkt:4689:21>' Fld_7 ada/nodes.lkt:4689
--# expr-start 2678 '<Cast to Expr at nodes.lkt:4689:21>' Cast_Result_1 ada/nodes.lkt:4689
--# expr-start 2677 '<FieldAccess for iter_expr at nodes.lkt:4689:21>' Fld_6 ada/nodes.lkt:4689
--# expr-start 2676 '<FieldAccess for spec at nodes.lkt:4689:21>' Fld_5 ada/nodes.lkt:4689
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_For_Loop_Spec (Node => Ent.Node.Iterated_Assoc_F_Spec, Info => Ent.Info);
--# expr-done 2676
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity (Node => Fld_5.Node.For_Loop_Spec_F_Iter_Expr, Info => Fld_5.Info);
--# expr-done 2677
   if Fld_6.Node = null
      or else Fld_6.Node.Kind in Ada_Expr
   then
      Cast_Result_1 := Create_Internal_Entity_Expr
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
   else
         Cast_Result_1 := No_Entity_Expr;
   end if;
--# expr-done 2678
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Cast_Result_1.Node);
--# expr-done 2679
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
Local_Expected_Typ.Value := No_Entity;
Entity_Vars.Reset (Local_Expected_Typ);
Bind_Result := Solver.Create_Unify (Fld_7, Local_Expected_Typ, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4689:21") else null)); 
--# expr-done 2680
--# expr-start 2684 '<FieldAccess for matches_expected_type at nodes.lkt:4691:26>' Fld_10 ada/nodes.lkt:4691
--# expr-start 2683 '<Cast to Expr at nodes.lkt:4691:26>' Cast_Result_2 ada/nodes.lkt:4691
--# expr-start 2682 '<FieldAccess for iter_expr at nodes.lkt:4691:26>' Fld_9 ada/nodes.lkt:4691
--# expr-start 2681 '<FieldAccess for spec at nodes.lkt:4691:26>' Fld_8 ada/nodes.lkt:4691
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_For_Loop_Spec (Node => Ent.Node.Iterated_Assoc_F_Spec, Info => Ent.Info);
--# expr-done 2681
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity (Node => Fld_8.Node.For_Loop_Spec_F_Iter_Expr, Info => Fld_8.Info);
--# expr-done 2682
   if Fld_9.Node = null
      or else Fld_9.Node.Kind in Ada_Expr
   then
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Fld_9.Node,
         Info => Fld_9.Info);
   else
         Cast_Result_2 := No_Entity_Expr;
   end if;
--# expr-done 2683
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_10 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Cast_Result_2.Node, Origin => Origin);
--# end
--# expr-done 2684
And_Pred := Create_And (Bind_Result, Fld_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4689:21") else null)); 
--# expr-done 2685
   If_Result := And_Pred;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4692:22") else null)); 
   If_Result := True_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 2686
--# property-call-start AdaNode.resolve_names_internal_with_eq
Fld_13 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal_With_Eq (Node => Fld_4.Node, Additional_Equation => If_Result, Env => Env, Origin => Origin, E_Info => Fld_4.Info);
--# end
--# expr-done 2687
Local_Spec_Success := Fld_13; 
--# bind spec_success Local_Spec_Success
--# expr-start 2697 '<If at nodes.lkt:4695:9>' If_Result_1 ada/nodes.lkt:4695
if Local_Spec_Success then
   --# expr-start 2696 '<LogicBinaryOp And at nodes.lkt:4697:13>' And_Pred_2 ada/nodes.lkt:4697
--# expr-start 2693 '<LogicBinaryOp And at nodes.lkt:4698:17>' And_Pred_1 ada/nodes.lkt:4698
--# expr-start 2689 '<FieldAccess for sub_equation at nodes.lkt:4698:17>' Fld_15 ada/nodes.lkt:4698
--# expr-start 2688 '<FieldAccess for expr at nodes.lkt:4698:17>' Fld_14 ada/nodes.lkt:4698
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_14 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2688
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_15 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_14.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_14.Info);
--# end
--# expr-done 2689
--# expr-start 2692 '<Bind at nodes.lkt:4699:22>' Bind_Result_1 ada/nodes.lkt:4699
--# expr-start 2691 '<FieldAccess for expected_type_var at nodes.lkt:4699:22>' Fld_17 ada/nodes.lkt:4699
--# expr-start 2690 '<FieldAccess for expr at nodes.lkt:4699:22>' Fld_16 ada/nodes.lkt:4699
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_16 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2690
      if Fld_16.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_16.Node);
--# expr-done 2691
Fld_17.Value := No_Entity;
Entity_Vars.Reset (Fld_17);
Local_Expected_Typ.Value := No_Entity;
Entity_Vars.Reset (Local_Expected_Typ);
Bind_Result_1 := Solver.Create_Unify (Fld_17, Local_Expected_Typ, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4699:22") else null)); 
--# expr-done 2692
And_Pred_1 := Create_And (Fld_15, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4698:17") else null)); 
--# expr-done 2693
--# expr-start 2695 '<FieldAccess for matches_expected_type at nodes.lkt:4701:18>' Fld_19 ada/nodes.lkt:4701
--# expr-start 2694 '<FieldAccess for expr at nodes.lkt:4701:18>' Fld_18 ada/nodes.lkt:4701
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_18 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2694
      if Fld_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_19 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_18.Node, Origin => Origin);
--# end
--# expr-done 2695
And_Pred_2 := Create_And (And_Pred_1, Fld_19, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4697:13") else null)); 
--# expr-done 2696
   If_Result_1 := And_Pred_2;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4702:14") else null)); 
   If_Result_1 := False_Rel;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2697
Let_Result := If_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 2698
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2699
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_413;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_413;
            raise;
      end;
   return Property_Result;
end Iterated_Assoc_P_Xref_Equation_For_Reduce;
--# end
   --
   --  Primitives for Bare_Param_Assoc
   --
      procedure Initialize_Fields_For_Param_Assoc
        (Self : Bare_Param_Assoc
         ; Param_Assoc_F_Designator : Bare_Ada_Node
         ; Param_Assoc_F_R_Expr : Bare_Expr
        ) is
      begin
            Self.Param_Assoc_F_Designator := Param_Assoc_F_Designator;
            Self.Param_Assoc_F_R_Expr := Param_Assoc_F_R_Expr;
      end Initialize_Fields_For_Param_Assoc;
   function Param_Assoc_F_Designator
     (Node : Bare_Param_Assoc) return Bare_Ada_Node
   is
   begin
         return Node.Param_Assoc_F_Designator;
   end;
   function Param_Assoc_F_R_Expr
     (Node : Bare_Param_Assoc) return Bare_Expr
   is
   begin
         return Node.Param_Assoc_F_R_Expr;
   end;
--# property-start ParamAssoc.expr ada/nodes.lkt:4714
pragma Warnings (Off, "is not referenced");
 function Param_Assoc_P_Expr
  (Node : Bare_Param_Assoc
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Param_Assoc  := Bare_Param_Assoc (Node);
     Ent : Internal_Entity_Param_Assoc :=
       Internal_Entity_Param_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Fld : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2700 '<FieldAccess for r_expr at nodes.lkt:4714:32>' Fld ada/nodes.lkt:4714
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Param_Assoc_F_R_Expr, Info => Ent.Info);
--# expr-done 2700
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Param_Assoc_P_Expr;
--# end
--# property-start ParamAssoc.names ada/nodes.lkt:4716
pragma Warnings (Off, "is not referenced");
 function Param_Assoc_P_Names
  (Node : Bare_Param_Assoc
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Param_Assoc  := Bare_Param_Assoc (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_415 with Inline_Always;
      Fld : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Fld_1 : Bare_Ada_Node;
Is_Null : Boolean;
If_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_415 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_415;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2705 '<If at nodes.lkt:4717:9>' If_Result ada/nodes.lkt:4717
--# expr-start 2702 '<IsNull at nodes.lkt:4717:12>' Is_Null ada/nodes.lkt:4717
--# expr-start 2701 '<FieldAccess for designator at nodes.lkt:4717:12>' Fld_1 ada/nodes.lkt:4717
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Param_Assoc_F_Designator;
--# expr-done 2701
Is_Null := Fld_1 = null; 
--# expr-done 2702
if Is_Null then
   If_Result := No_Bare_Ada_Node_Array_Type;
else
   --# expr-start 2704 '<ArrayLiteral at nodes.lkt:4718:14>' Array_Lit ada/nodes.lkt:4718
--# expr-start 2703 '<FieldAccess for designator at nodes.lkt:4718:15>' Fld ada/nodes.lkt:4718
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Param_Assoc_F_Designator;
--# expr-done 2703
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Fld)); 
--# expr-done 2704
   If_Result := Array_Lit;
end if;
      Inc_Ref (If_Result);
--# expr-done 2705
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_415;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_415;
            raise;
      end;
   return Property_Result;
end Param_Assoc_P_Names;
--# end
--# property-start ParamAssoc.xref_entry_point ada/nodes.lkt:4720
pragma Warnings (Off, "is not referenced");
 function Param_Assoc_P_Xref_Entry_Point
  (Node : Bare_Param_Assoc
  )
   return Boolean
is
   Self : Bare_Param_Assoc  := Bare_Param_Assoc (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2706 '<FieldAccess for is_static_attribute_assoc at nodes.lkt:4720:36>' Fld ada/nodes.lkt:4720
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ParamAssoc.is_static_attribute_assoc
Fld := Libadalang.Implementation.Param_Assoc_P_Is_Static_Attribute_Assoc (Node => Self);
--# end
--# expr-done 2706
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Param_Assoc_P_Xref_Entry_Point;
--# end
--# property-start ParamAssoc.xref_equation ada/nodes.lkt:4723
pragma Warnings (Off, "is not referenced");
 function Param_Assoc_P_Xref_Equation
  (Node : Bare_Param_Assoc
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Param_Assoc  := Bare_Param_Assoc (Node);
     Ent : Internal_Entity_Param_Assoc :=
       Internal_Entity_Param_Assoc'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_417 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
False_Rel : Logic_Equation;
Fld_2 : Boolean;
If_Result : Logic_Equation;
            procedure Finalizer_Scope_417 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_417;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2710 '<If at nodes.lkt:4724:9>' If_Result ada/nodes.lkt:4724
--# expr-start 2707 '<FieldAccess for xref_entry_point at nodes.lkt:4724:12>' Fld_2 ada/nodes.lkt:4724
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_entry_point'
Fld_2 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Entry_Point (Node => Self);
--# end
--# expr-done 2707
if Fld_2 then
   --# expr-start 2709 '<FieldAccess for sub_equation at nodes.lkt:4724:41>' Fld_1 ada/nodes.lkt:4724
--# expr-start 2708 '<FieldAccess for expr at nodes.lkt:4724:41>' Fld ada/nodes.lkt:4724
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2708
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 2709
   If_Result := Fld_1;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4724:73") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 2710
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_417;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_417;
            raise;
      end;
   return Property_Result;
end Param_Assoc_P_Xref_Equation;
--# end
--# property-start ParamAssoc.is_static_attribute_assoc ada/nodes.lkt:4726
pragma Warnings (Off, "is not referenced");
 function Param_Assoc_P_Is_Static_Attribute_Assoc
  (Node : Bare_Param_Assoc
  )
   return Boolean
is
   Self : Bare_Param_Assoc  := Bare_Param_Assoc (Node);
      --# bind self Self
   Property_Result : Boolean;
      Var_Expr_0 : Bare_Attribute_Ref;
Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Attribute_Ref;
Fld_2 : Bare_Identifier;
Fld_3 : Symbol_Type;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
Is_Equal_4 : Boolean;
If_Result_3 : Boolean;
Is_Equal_5 : Boolean;
If_Result_4 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 2713 '<Cast to AttributeRef at nodes.lkt:4727:9>' Cast_Result ada/nodes.lkt:4727
--# expr-start 2712 '<parent at nodes.lkt:4727:9>' Fld_1 ada/nodes.lkt:4727
--# expr-start 2711 '<parent at nodes.lkt:4727:9>' Fld ada/nodes.lkt:4727
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 2711
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 2712
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Attribute_Ref_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 2713
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind ar Var_Expr_0
--# expr-start 2715 '<FieldAccess for name_symbol at nodes.lkt:4729:13>' Fld_3 ada/nodes.lkt:4729
--# expr-start 2714 '<FieldAccess for attribute at nodes.lkt:4729:13>' Fld_2 ada/nodes.lkt:4729
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_0.Attribute_Ref_F_Attribute;
--# expr-done 2714
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_2);
--# end
--# expr-done 2715
--# expr-start 2716 '<Symbol First at nodes.lkt:4729:43>' Sym ada/nodes.lkt:4729
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_First); 
--# expr-done 2716
Is_Equal_5 := Fld_3 = Sym; 
if Is_Equal_5 then
   If_Result_4 := True;
else
--# expr-start 2717 '<Symbol Last at nodes.lkt:4730:19>' Sym_1 ada/nodes.lkt:4730
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Last); 
--# expr-done 2717
Is_Equal_4 := Fld_3 = Sym_1; 
if Is_Equal_4 then
   If_Result_3 := True;
else
--# expr-start 2718 '<Symbol Range at nodes.lkt:4731:19>' Sym_2 ada/nodes.lkt:4731
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Range); 
--# expr-done 2718
Is_Equal_3 := Fld_3 = Sym_2; 
if Is_Equal_3 then
   If_Result_2 := True;
else
--# expr-start 2719 '<Symbol Length at nodes.lkt:4732:19>' Sym_3 ada/nodes.lkt:4732
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Length); 
--# expr-done 2719
Is_Equal_2 := Fld_3 = Sym_3; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 2720 '<Symbol Has_Same_Storage at nodes.lkt:4733:19>' Sym_4 ada/nodes.lkt:4733
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Has_Same_Storage); 
--# expr-done 2720
Is_Equal_1 := Fld_3 = Sym_4; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 2721 '<Symbol Overlaps_Storage at nodes.lkt:4734:19>' Sym_5 ada/nodes.lkt:4734
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Overlaps_Storage); 
--# expr-done 2721
Is_Equal := Fld_3 = Sym_5; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
   If_Result_2 := If_Result_1;
end if;
   If_Result_3 := If_Result_2;
end if;
   If_Result_4 := If_Result_3;
end if;
Scope_Result := If_Result_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Param_Assoc_P_Is_Static_Attribute_Assoc;
--# end
   --
   --  Primitives for Bare_Basic_Decl
   --
   function Basic_Decl_F_Aspects
     (Node : Bare_Basic_Decl) return Bare_Aspect_Spec
   is
         Kind : constant Ada_Basic_Decl := Node.Kind;
   begin
         case Kind is
               when Ada_Abstract_State_Decl =>
         return Node.Abstract_State_Decl_F_Aspects;
               when Ada_Anonymous_Expr_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Component_Decl =>
         return Node.Component_Decl_F_Aspects;
               when Ada_Discriminant_Spec =>
         return Node.Discriminant_Spec_F_Aspects;
               when Ada_Generic_Formal_Obj_Decl | Ada_Generic_Formal_Package | Ada_Generic_Formal_Subp_Decl | Ada_Generic_Formal_Type_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Param_Spec =>
         return Node.Param_Spec_F_Aspects;
               when Ada_Synthetic_Formal_Param_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Generic_Package_Internal | Ada_Package_Decl =>
         return Node.Base_Package_Decl_F_Aspects;
               when Ada_Discrete_Base_Subtype_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Subtype_Decl =>
         return Node.Subtype_Decl_F_Aspects;
               when Ada_Classwide_Type_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Incomplete_Type_Decl | Ada_Incomplete_Formal_Type_Decl | Ada_Incomplete_Tagged_Type_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Protected_Type_Decl =>
         return Node.Protected_Type_Decl_F_Aspects;
               when Ada_Task_Type_Decl | Ada_Single_Task_Type_Decl =>
         return Node.Task_Type_Decl_F_Aspects;
               when Ada_Anonymous_Type_Decl | Ada_Synth_Anonymous_Type_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Concrete_Type_Decl =>
         return Node.Concrete_Type_Decl_F_Aspects;
               when Ada_Formal_Type_Decl =>
         return Node.Formal_Type_Decl_F_Aspects;
               when Ada_Abstract_Subp_Decl =>
         return Node.Abstract_Subp_Decl_F_Aspects;
               when Ada_Abstract_Formal_Subp_Decl | Ada_Concrete_Formal_Subp_Decl =>
         return Node.Formal_Subp_Decl_F_Aspects;
               when Ada_Subp_Decl =>
         return Node.Subp_Decl_F_Aspects;
               when Ada_Entry_Decl =>
         return Node.Entry_Decl_F_Aspects;
               when Ada_Enum_Literal_Decl | Ada_Synthetic_Char_Enum_Lit =>
                     return No_Bare_Ada_Node;
               when Ada_Generic_Subp_Internal =>
         return Node.Generic_Subp_Internal_F_Aspects;
               when Ada_Synthetic_Subp_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Accept_Stmt_Body =>
                     return No_Bare_Ada_Node;
               when Ada_Expr_Function =>
         return Node.Expr_Function_F_Aspects;
               when Ada_Null_Subp_Decl =>
         return Node.Null_Subp_Decl_F_Aspects;
               when Ada_Subp_Body =>
         return Node.Subp_Body_F_Aspects;
               when Ada_Subp_Renaming_Decl =>
         return Node.Subp_Renaming_Decl_F_Aspects;
               when Ada_Package_Body_Stub =>
         return Node.Package_Body_Stub_F_Aspects;
               when Ada_Protected_Body_Stub =>
         return Node.Protected_Body_Stub_F_Aspects;
               when Ada_Subp_Body_Stub =>
         return Node.Subp_Body_Stub_F_Aspects;
               when Ada_Task_Body_Stub =>
         return Node.Task_Body_Stub_F_Aspects;
               when Ada_Entry_Body =>
         return Node.Entry_Body_F_Aspects;
               when Ada_Package_Body =>
         return Node.Package_Body_F_Aspects;
               when Ada_Protected_Body =>
         return Node.Protected_Body_F_Aspects;
               when Ada_Task_Body =>
         return Node.Task_Body_F_Aspects;
               when Ada_Entry_Index_Spec =>
         return Node.Entry_Index_Spec_F_Aspects;
               when Ada_Error_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Exception_Decl =>
         return Node.Exception_Decl_F_Aspects;
               when Ada_Exception_Handler =>
                     return No_Bare_Ada_Node;
               when Ada_For_Loop_Var_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Generic_Package_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Generic_Subp_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Generic_Package_Instantiation =>
         return Node.Generic_Package_Instantiation_F_Aspects;
               when Ada_Generic_Subp_Instantiation =>
         return Node.Generic_Subp_Instantiation_F_Aspects;
               when Ada_Generic_Package_Renaming_Decl =>
         return Node.Generic_Package_Renaming_Decl_F_Aspects;
               when Ada_Generic_Subp_Renaming_Decl =>
         return Node.Generic_Subp_Renaming_Decl_F_Aspects;
               when Ada_Label_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Named_Stmt_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Number_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Object_Decl | Ada_Extended_Return_Stmt_Object_Decl | Ada_No_Type_Object_Renaming_Decl =>
         return Node.Object_Decl_F_Aspects;
               when Ada_Package_Renaming_Decl =>
         return Node.Package_Renaming_Decl_F_Aspects;
               when Ada_Single_Protected_Decl =>
         return Node.Single_Protected_Decl_F_Aspects;
               when Ada_Single_Task_Decl =>
                     return No_Bare_Ada_Node;
               when Ada_Synthetic_Object_Decl =>
                     return No_Bare_Ada_Node;
         end case;
   end;
--# property-start BasicDecl.spark_mode_aspect ada/nodes.lkt:4750
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Spark_Mode_Aspect
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Aspect;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Aspect;
Var_Expr_2 : Internal_Entity_Pragma_Node;
Var_Expr_76 : Internal_Entity_Declarative_Part;
Sym : Symbol_Type;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld_3 : Bare_Declarative_Part;
As_Entity : Internal_Entity_Declarative_Part;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Declarative_Part;
Fld_4 : Internal_Aspect;
Scope_Result_1 : Internal_Aspect;
Fld_5 : Bare_Compilation_Unit;
Fld_6 : Internal_Entity_Pragma_Node;
Fld_7 : Internal_Aspect;
Scope_Result_2 : Internal_Aspect;
Result_Var_1 : Internal_Aspect;
Result_Var_2 : Internal_Aspect;
Scope_Result_3 : Internal_Aspect;
Result_Var_3 : Internal_Aspect;
Sym_1 : Symbol_Type;
Fld_8 : Boolean;
If_Result_2 : Internal_Aspect;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Basic_Decl_Basic_Decl_P_Spark_Mode_Aspect,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Basic_Decl,
                                As_Bare_Basic_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Aspect;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 2736 '<If at nodes.lkt:4753:9>' If_Result_2 ada/nodes.lkt:4753
--# expr-start 2723 '<FieldAccess for has_aspect at nodes.lkt:4753:12>' Fld_8 ada/nodes.lkt:4753
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2722 '<Symbol SPARK_Mode at nodes.lkt:4753:28>' Sym_1 ada/nodes.lkt:4753
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 2722
--# property-call-start BasicDecl.has_aspect
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Ent.Node, Name => Sym_1, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 2723
if Fld_8 then
   --# expr-start 2725 '<FieldAccess for get_aspect at nodes.lkt:4754:14>' Fld ada/nodes.lkt:4754
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2724 '<Symbol SPARK_Mode at nodes.lkt:4754:30>' Sym ada/nodes.lkt:4754
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 2724
--# property-call-start BasicDecl.get_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 2725
   If_Result_2 := Fld;
else
--# expr-start 2731 '<as_entity at nodes.lkt:4758:13>' If_Result_1 ada/nodes.lkt:4758
--# expr-start 2730 '<FieldAccess for declarative_scope at nodes.lkt:4758:13>' Fld_3 ada/nodes.lkt:4758
--# expr-start 2729 '<If at nodes.lkt:4759:17>' If_Result ada/nodes.lkt:4759
--# expr-start 2726 '<FieldAccess for previous_part_for_decl at nodes.lkt:4759:20>' Fld_2 ada/nodes.lkt:4759
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_decl'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 2726
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 2727 '<IsA BodyStub at nodes.lkt:4759:61>' Is_A ada/nodes.lkt:4759
Is_A := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Body_Stub; 
--# expr-done 2727
Scope_Result := Is_A;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   --# expr-start 2728 '<FieldAccess for previous_part_for_decl at nodes.lkt:4760:22>' Fld_1 ada/nodes.lkt:4760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 2728
   If_Result := Fld_1;
else
   If_Result := Ent;
end if;
--# expr-done 2729
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld_3 := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => If_Result.Node);
--# end
--# expr-done 2730
Is_Null := Fld_3 = null; 
if Is_Null then
   If_Result_1 := No_Entity_Declarative_Part;
else
As_Entity := (Info => E_Info, Node => Fld_3); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 2731
Var_Expr_76 := If_Result_1;
if Var_Expr_76 /= No_Entity_Declarative_Part then
   --# scope-start
--# expr-start 2732 '<FieldAccess for spark_mode_aspect at nodes.lkt:4758:13>' Fld_4 ada/nodes.lkt:4758
      if Var_Expr_76.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.spark_mode_aspect'
Fld_4 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Spark_Mode_Aspect (Node => Var_Expr_76.Node, E_Info => Var_Expr_76.Info);
--# end
--# expr-done 2732
Var_Expr_1 := Fld_4;
if Var_Expr_1 /= No_Aspect then
   --# scope-start
   --# bind asp Var_Expr_1
Scope_Result_1 := Var_Expr_1;
   --# end
   Result_Var_2 := Scope_Result_1;
else
--# expr-start 2734 '<FieldAccess for spark_config_pragma at nodes.lkt:4769:29>' Fld_6 ada/nodes.lkt:4769
--# expr-start 2733 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:4769:29>' Fld_5 ada/nodes.lkt:4769
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld_5 := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Ent.Node);
--# end
--# expr-done 2733
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.spark_config_pragma
Fld_6 := Libadalang.Implementation.Compilation_Unit_P_Spark_Config_Pragma (Node => Fld_5);
--# end
--# expr-done 2734
Var_Expr_2 := Fld_6;
if Var_Expr_2 /= No_Entity_Pragma_Node then
   --# scope-start
   --# bind p Var_Expr_2
--# expr-start 2735 '<FieldAccess for as_aspect at nodes.lkt:4772:28>' Fld_7 ada/nodes.lkt:4772
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.as_aspect
Fld_7 := Libadalang.Implementation.Pragma_Node_P_As_Aspect (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 2735
Scope_Result_2 := Fld_7;
   --# end
   Result_Var_1 := Scope_Result_2;
else
   Result_Var_1 := No_Aspect;
end if;
   Result_Var_2 := Result_Var_1;
end if;
Scope_Result_3 := Result_Var_2;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Aspect;
end if;
   If_Result_2 := Result_Var_3;
end if;
--# expr-done 2736
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Aspect,
                        As_Internal_Aspect => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Basic_Decl_P_Spark_Mode_Aspect;
--# end
--# property-start BasicDecl.subp_constrain_prefix ada/nodes.lkt:4782
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Subp_Constrain_Prefix
  (Node : Bare_Basic_Decl
      ; Prefix : Bare_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind prefix Prefix
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_420 with Inline_Always;
      Var_Expr_77 : Internal_Entity_Defining_Name;
Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Subp_Spec;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_3 : Internal_Entity_Base_Formal_Param_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
True_Rel : Logic_Equation;
Fld_6 : Internal_Entity_Info;
Fld_7 : Internal_Metadata;
Fld_8 : Boolean;
If_Result : Logic_Equation;
            procedure Finalizer_Scope_420 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_420;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2749 '<If at nodes.lkt:4786:9>' If_Result ada/nodes.lkt:4786
--# expr-start 2739 '<FieldAccess for dottable_subp at nodes.lkt:4786:12>' Fld_8 ada/nodes.lkt:4786
--# expr-start 2738 '<FieldAccess for md at nodes.lkt:4786:12>' Fld_7 ada/nodes.lkt:4786
--# expr-start 2737 '<FieldAccess for info at nodes.lkt:4786:12>' Fld_6 ada/nodes.lkt:4786
Fld_6 := Ent.Info;
--# expr-done 2737
Fld_7 := Fld_6.Md;
--# expr-done 2738
Fld_8 := Fld_7.Dottable_Subp;
--# expr-done 2739
if Fld_8 then
   --# expr-start 2748 '<LogicBinaryOp And at nodes.lkt:4788:13>' And_Pred ada/nodes.lkt:4788
--# expr-start 2746 '<Bind at nodes.lkt:4788:13>' Bind_Result ada/nodes.lkt:4788
--# expr-start 2740 '<FieldAccess for expected_type_var at nodes.lkt:4788:13>' Fld ada/nodes.lkt:4788
      if Prefix = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Prefix);
--# expr-done 2740
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 2743 '<at at nodes.lkt:4789:16>' Get_Result ada/nodes.lkt:4789
--# expr-start 2742 '<FieldAccess for unpacked_formal_params at nodes.lkt:4789:16>' Fld_2 ada/nodes.lkt:4789
--# expr-start 2741 '<FieldAccess for subp_spec_or_null at nodes.lkt:4789:16>' Fld_1 ada/nodes.lkt:4789
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2741
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 2742
Get_Result := Get (Self, Fld_2, 0, True); 
--# expr-done 2743
Var_Expr_77 := Get_Result;
if Var_Expr_77 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 2745 '<FieldAccess for formal_type at nodes.lkt:4789:16>' Fld_4 ada/nodes.lkt:4789
--# expr-start 2744 '<FieldAccess for formal_decl at nodes.lkt:4789:16>' Fld_3 ada/nodes.lkt:4789
      if Var_Expr_77.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_3 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Var_Expr_77.Node, E_Info => Var_Expr_77.Info);
--# end
--# expr-done 2744
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_3.Node, Origin => Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 2745
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
      Cast_Result := Create_Internal_Entity
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4788:13") else null)); 
--# expr-done 2746
--# expr-start 2747 '<FieldAccess for matches_expected_prefix_type at nodes.lkt:4792:18>' Fld_5 ada/nodes.lkt:4792
      if Prefix = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_prefix_type
Fld_5 := Libadalang.Implementation.Expr_P_Matches_Expected_Prefix_Type (Node => Prefix, Origin => Origin);
--# end
--# expr-done 2747
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4788:13") else null)); 
--# expr-done 2748
   If_Result := And_Pred;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:4793:14") else null)); 
   If_Result := True_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 2749
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_420;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_420;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Subp_Constrain_Prefix;
--# end
--# property-start BasicDecl.env_hook_basic_decl ada/nodes.lkt:4796
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Env_Hook_Basic_Decl
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
            procedure Finalizer_Scope_2280 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Dotted_Name;
Var_Expr_1 : Internal_Unit;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Name;
Cast_Result : Internal_Entity_Dotted_Name;
Fld_2 : Internal_Entity_Name;
Fld_3 : Symbol_Type_Array_Access;
Is_A : Boolean;
Not_Val : Boolean;
Fld_4 : Internal_Unit;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Is_A_1 : Boolean;
If_Result_1 : Boolean;
            procedure Finalizer_Scope_2280 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2280;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2760 '<If at nodes.lkt:4799:9>' If_Result_1 ada/nodes.lkt:4799
--# expr-start 2750 '<IsA PackageDecl, BasicSubpDecl, PackageRenamingDecl, GenericPackageDecl, GenericPackageInstantiation, GenericSubpInstantiation, GenericSubpDecl, SubpBody at nodes.lkt:4800:13>' Is_A_1 ada/nodes.lkt:4800
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Package_Decl_Range | Ada_Basic_Subp_Decl | Ada_Package_Renaming_Decl_Range | Ada_Generic_Package_Decl_Range | Ada_Generic_Package_Instantiation_Range | Ada_Generic_Subp_Instantiation_Range | Ada_Generic_Subp_Decl_Range | Ada_Subp_Body_Range; 
--# expr-done 2750
if Is_A_1 then
--# expr-start 2754 '<Cast to DottedName at nodes.lkt:4809:13>' Cast_Result ada/nodes.lkt:4809
--# expr-start 2753 '<FieldAccess for name at nodes.lkt:4809:13>' Fld_1 ada/nodes.lkt:4809
--# expr-start 2752 '<FieldAccess for defining_name at nodes.lkt:4809:13>' Fld ada/nodes.lkt:4809
--# expr-start 2751 '<as_bare_entity at nodes.lkt:4809:13>' If_Result ada/nodes.lkt:4809
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 2751
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 2752
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Defining_Name_F_Name, Info => Fld.Info);
--# expr-done 2753
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Create_Internal_Entity_Dotted_Name
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Dotted_Name;
   end if;
--# expr-done 2754
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Dotted_Name then
   --# scope-start
   --# bind dn Var_Expr_0
--# expr-start 2759 '<FieldAccess for get_unit at nodes.lkt:4811:17>' Fld_4 ada/nodes.lkt:4811
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2756 '<FieldAccess for as_symbol_array at nodes.lkt:4812:21>' Fld_3 ada/nodes.lkt:4812
--# expr-start 2755 '<FieldAccess for prefix at nodes.lkt:4812:21>' Fld_2 ada/nodes.lkt:4812
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Dotted_Name_F_Prefix, Info => Var_Expr_0.Info);
--# expr-done 2755
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Fld_2.Node);
--# end
--# expr-done 2756
--# expr-start 2758 '<Not at nodes.lkt:4815:40>' Not_Val ada/nodes.lkt:4815
--# expr-start 2757 '<IsA SubpBody at nodes.lkt:4815:44>' Is_A ada/nodes.lkt:4815
Is_A := Self /= null 
and then Self.Kind in Ada_Subp_Body_Range; 
--# expr-done 2757
Not_Val := not (Is_A); 
--# expr-done 2758
Fld_4 := Libadalang.Implementation.Extensions.Ada_Node_P_Get_Unit (Node => Self, Name => Fld_3, Kind => Unit_Specification, Load_If_Needed => True, Not_Found_Is_Error => Not_Val);
--# expr-done 2759
Var_Expr_1 := Fld_4;
if Var_Expr_1 /= null then
   --# scope-start
   --# bind _ Var_Expr_1
Scope_Result := False;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
      Finalizer_Scope_2280;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_1 := Result_Var_1;
else
   If_Result_1 := False;
end if;
--# expr-done 2760
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2280;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Env_Hook_Basic_Decl;
--# end
--# property-start BasicDecl.populate_body_unit ada/nodes.lkt:4824
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Populate_Body_Unit
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
            procedure Finalizer_Scope_422 with Inline_Always;
      Var_Expr_0 : Internal_Unit;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Name;
Fld_2 : Symbol_Type_Array_Access;
Fld_3 : Internal_Unit;
Scope_Result : Boolean;
Result_Var : Boolean;
Fld_4 : Boolean;
If_Result_1 : Boolean;
            procedure Finalizer_Scope_422 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_422;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2767 '<If at nodes.lkt:4825:9>' If_Result_1 ada/nodes.lkt:4825
--# expr-start 2761 '<FieldAccess for is_library_item at nodes.lkt:4825:12>' Fld_4 ada/nodes.lkt:4825
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Self);
--# end
--# expr-done 2761
if Fld_4 then
--# expr-start 2766 '<FieldAccess for get_unit at nodes.lkt:4827:13>' Fld_3 ada/nodes.lkt:4827
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2765 '<FieldAccess for as_symbol_array at nodes.lkt:4828:17>' Fld_2 ada/nodes.lkt:4828
--# expr-start 2764 '<FieldAccess for name at nodes.lkt:4828:17>' Fld_1 ada/nodes.lkt:4828
--# expr-start 2763 '<FieldAccess for defining_name at nodes.lkt:4828:17>' Fld ada/nodes.lkt:4828
--# expr-start 2762 '<as_bare_entity at nodes.lkt:4828:17>' If_Result ada/nodes.lkt:4828
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 2762
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 2763
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Defining_Name_F_Name, Info => Fld.Info);
--# expr-done 2764
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Fld_1.Node);
--# end
--# expr-done 2765
Fld_3 := Libadalang.Implementation.Extensions.Ada_Node_P_Get_Unit (Node => Self, Name => Fld_2, Kind => Unit_Body, Load_If_Needed => True, Not_Found_Is_Error => False);
--# expr-done 2766
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= null then
   --# scope-start
   --# bind _ Var_Expr_0
Scope_Result := False;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result_1 := Result_Var;
else
   If_Result_1 := False;
end if;
--# expr-done 2767
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_422;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_422;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Populate_Body_Unit;
--# end
--# property-start BasicDecl.has_top_level_env_name_impl ada/nodes.lkt:4838
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Has_Top_Level_Env_Name_Impl
  (Node : Bare_Basic_Decl
      ; Allow_Bodies : Boolean
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind allow_bodies Allow_Bodies
   Property_Result : Boolean;
            procedure Finalizer_Scope_423 with Inline_Always;
      Local_Is_Decl : Boolean;
Local_Is_Body : Boolean;
Var_Expr_0 : Bare_Ada_Node;
Var_Expr_1 : Bare_Basic_Decl;
Var_Expr_2 : Bare_Basic_Decl;
Is_A : Boolean;
Is_A_1 : Boolean;
Fld : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
Fld_1 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Basic_Decl;
Is_A_2 : Boolean;
Not_Val : Boolean;
If_Result_2 : Boolean;
Is_A_3 : Boolean;
Not_Val_1 : Boolean;
If_Result_3 : Boolean;
Fld_2 : Boolean;
Cast_Expr_1 : Bare_Basic_Decl;
Cast_Result_1 : Bare_Basic_Decl;
Is_Equal : Boolean;
If_Result_4 : Boolean;
Scope_Result : Boolean;
Is_A_4 : Boolean;
Fld_3 : Bare_Ada_Node;
Cast_Result_2 : Bare_Basic_Decl;
Fld_4 : Boolean;
Scope_Result_1 : Boolean;
Result_Var : Boolean;
If_Result_5 : Boolean;
Result_Var_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_6 : Boolean;
If_Result_7 : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
            procedure Finalizer_Scope_423 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_423;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2793 '<Let at nodes.lkt:4839:9>' Let_Result_1 ada/nodes.lkt:4839
--# scope-start
--# expr-start 2768 '<IsA BasePackageDecl, BasicSubpDecl, GenericDecl, TaskTypeDecl, ProtectedTypeDecl, SingleTaskDecl, SingleProtectedDecl at nodes.lkt:4840:13>' Is_A ada/nodes.lkt:4840
Is_A := Self /= null 
and then Self.Kind in Ada_Base_Package_Decl | Ada_Basic_Subp_Decl | Ada_Generic_Decl | Ada_Task_Type_Decl_Range | Ada_Protected_Type_Decl_Range | Ada_Single_Task_Decl_Range | Ada_Single_Protected_Decl_Range; 
--# expr-done 2768
Local_Is_Decl := Is_A; 
--# bind is_decl Local_Is_Decl
--# expr-start 2792 '<Let at nodes.lkt:4847:9>' Let_Result ada/nodes.lkt:4847
--# scope-start
--# expr-start 2769 '<IsA Body at nodes.lkt:4847:23>' Is_A_1 ada/nodes.lkt:4847
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Body_Node; 
--# expr-done 2769
Local_Is_Body := Is_A_1; 
--# bind is_body Local_Is_Body
--# expr-start 2791 '<BooleanBinaryOp Or at nodes.lkt:4849:9>' If_Result_7 ada/nodes.lkt:4849
--# expr-start 2770 '<FieldAccess for is_compilation_unit_root at nodes.lkt:4849:9>' Fld ada/nodes.lkt:4849
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Self);
--# end
--# expr-done 2770
if Fld then
   If_Result_7 := True;
else
   --# expr-start 2790 '<BooleanBinaryOp And at nodes.lkt:4851:13>' If_Result_6 ada/nodes.lkt:4851
--# expr-start 2772 '<BooleanBinaryOp Or at nodes.lkt:4851:14>' If_Result_1 ada/nodes.lkt:4851
if Local_Is_Decl then
   If_Result_1 := True;
else
   --# expr-start 2771 '<BooleanBinaryOp And at nodes.lkt:4851:26>' If_Result ada/nodes.lkt:4851
if Allow_Bodies then
   If_Result := Local_Is_Body;
else
   If_Result := False;
end if;
--# expr-done 2771
   If_Result_1 := If_Result;
end if;
--# expr-done 2772
if If_Result_1 then
--# expr-start 2774 '<env_node at nodes.lkt:4852:17>' Env_Node ada/nodes.lkt:4852
--# expr-start 2773 '<FieldAccess for node_env at nodes.lkt:4852:17>' Fld_1 ada/nodes.lkt:4852
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Node_Env (Node => Self);
--# expr-done 2773
Env_Node := AST_Envs.Env_Node (Fld_1); 
--# expr-done 2774
Var_Expr_0 := Env_Node;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind env_node Var_Expr_0
--# expr-start 2775 '<Cast to BasicDecl at nodes.lkt:4854:17>' Cast_Result ada/nodes.lkt:4854
Cast_Expr := Var_Expr_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Basic_Decl
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 2775
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind p Var_Expr_1
--# expr-start 2784 '<If at nodes.lkt:4856:21>' If_Result_4 ada/nodes.lkt:4856
--# expr-start 2776 '<Eq at nodes.lkt:4856:24>' Is_Equal ada/nodes.lkt:4856
Cast_Expr_1 := Self; 
      Cast_Result_1 := Cast_Expr_1;
Is_Equal := Cast_Result_1 = Var_Expr_1; 
--# expr-done 2776
if Is_Equal then
   If_Result_4 := True;
else
   --# expr-start 2783 '<FieldAccess for has_top_level_env_name_impl at nodes.lkt:4858:25>' Fld_2 ada/nodes.lkt:4858
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2782 '<BooleanBinaryOp And at nodes.lkt:4859:42>' If_Result_3 ada/nodes.lkt:4859
--# expr-start 2779 '<BooleanBinaryOp And at nodes.lkt:4859:42>' If_Result_2 ada/nodes.lkt:4859
if Allow_Bodies then
   --# expr-start 2778 '<Not at nodes.lkt:4860:33>' Not_Val ada/nodes.lkt:4860
--# expr-start 2777 '<IsA BaseSubpBody at nodes.lkt:4860:37>' Is_A_2 ada/nodes.lkt:4860
Is_A_2 := Self /= null 
and then Self.Kind in Ada_Base_Subp_Body; 
--# expr-done 2777
Not_Val := not (Is_A_2); 
--# expr-done 2778
   If_Result_2 := Not_Val;
else
   If_Result_2 := False;
end if;
--# expr-done 2779
if If_Result_2 then
   --# expr-start 2781 '<Not at nodes.lkt:4861:33>' Not_Val_1 ada/nodes.lkt:4861
--# expr-start 2780 '<IsA BaseSubpBody at nodes.lkt:4861:37>' Is_A_3 ada/nodes.lkt:4861
Is_A_3 := Var_Expr_1 /= null 
and then Var_Expr_1.Kind in Ada_Base_Subp_Body; 
--# expr-done 2780
Not_Val_1 := not (Is_A_3); 
--# expr-done 2781
   If_Result_3 := Not_Val_1;
else
   If_Result_3 := False;
end if;
--# expr-done 2782
--# property-call-start BasicDecl.has_top_level_env_name_impl
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Has_Top_Level_Env_Name_Impl (Node => Var_Expr_1, Allow_Bodies => If_Result_3);
--# end
--# expr-done 2783
   If_Result_4 := Fld_2;
end if;
--# expr-done 2784
Scope_Result := If_Result_4;
   --# end
   Result_Var_1 := Scope_Result;
else
   --# expr-start 2789 '<BooleanBinaryOp And at nodes.lkt:4863:33>' If_Result_5 ada/nodes.lkt:4863
--# expr-start 2785 '<IsA PrivatePart at nodes.lkt:4863:33>' Is_A_4 ada/nodes.lkt:4863
Is_A_4 := Var_Expr_0 /= null 
and then Var_Expr_0.Kind in Ada_Private_Part_Range; 
--# expr-done 2785
if Is_A_4 then
--# expr-start 2787 '<Cast to BasicDecl at nodes.lkt:4864:25>' Cast_Result_2 ada/nodes.lkt:4864
--# expr-start 2786 '<parent at nodes.lkt:4864:25>' Fld_3 ada/nodes.lkt:4864
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Var_Expr_0.Parent; 
--# expr-done 2786
   if Fld_3 = null
      or else Fld_3.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Fld_3;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 2787
Var_Expr_2 := Cast_Result_2;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind bd Var_Expr_2
--# expr-start 2788 '<FieldAccess for has_top_level_env_name_impl at nodes.lkt:4865:33>' Fld_4 ada/nodes.lkt:4865
      if Var_Expr_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.has_top_level_env_name_impl
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Has_Top_Level_Env_Name_Impl (Node => Var_Expr_2, Allow_Bodies => Allow_Bodies);
--# end
--# expr-done 2788
Scope_Result_1 := Fld_4;
   --# end
   Result_Var := Scope_Result_1;
else
   Result_Var := False;
end if;
   If_Result_5 := Result_Var;
else
   If_Result_5 := False;
end if;
--# expr-done 2789
   Result_Var_1 := If_Result_5;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := True;
end if;
   If_Result_6 := Result_Var_2;
else
   If_Result_6 := False;
end if;
--# expr-done 2790
   If_Result_7 := If_Result_6;
end if;
--# expr-done 2791
Let_Result := If_Result_7; 
--# end
--# expr-done 2792
Let_Result_1 := Let_Result; 
--# end
--# expr-done 2793
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_423;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_423;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Has_Top_Level_Env_Name_Impl;
--# end
--# property-start BasicDecl.has_top_level_env_name ada/nodes.lkt:4934
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Has_Top_Level_Env_Name
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
            procedure Finalizer_Scope_424 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Var_Expr_1 : Bare_Basic_Decl;
Var_Expr_2 : Bare_Basic_Decl;
Fld : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Basic_Decl;
Fld_1 : Boolean;
Scope_Result : Boolean;
Is_A : Boolean;
Fld_2 : Bare_Ada_Node;
Cast_Result_1 : Bare_Basic_Decl;
Fld_3 : Boolean;
Scope_Result_1 : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
Result_Var_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
            procedure Finalizer_Scope_424 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_424;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 2795 '<env_node at nodes.lkt:4939:9>' Env_Node ada/nodes.lkt:4939
--# expr-start 2794 '<FieldAccess for children_env at nodes.lkt:4939:9>' Fld ada/nodes.lkt:4939
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Self);
--# expr-done 2794
Env_Node := AST_Envs.Env_Node (Fld); 
--# expr-done 2795
Var_Expr_0 := Env_Node;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind env_node Var_Expr_0
--# expr-start 2796 '<Cast to BasicDecl at nodes.lkt:4941:13>' Cast_Result ada/nodes.lkt:4941
Cast_Expr := Var_Expr_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Basic_Decl
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 2796
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind bd Var_Expr_1
--# expr-start 2797 '<FieldAccess for has_top_level_env_name_impl at nodes.lkt:4942:25>' Fld_1 ada/nodes.lkt:4942
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.has_top_level_env_name_impl
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Has_Top_Level_Env_Name_Impl (Node => Var_Expr_1, Allow_Bodies => True);
--# end
--# expr-done 2797
Scope_Result := Fld_1;
   --# end
   Result_Var_1 := Scope_Result;
else
   --# expr-start 2802 '<BooleanBinaryOp And at nodes.lkt:4943:29>' If_Result ada/nodes.lkt:4943
--# expr-start 2798 '<IsA PrivatePart at nodes.lkt:4943:29>' Is_A ada/nodes.lkt:4943
Is_A := Var_Expr_0 /= null 
and then Var_Expr_0.Kind in Ada_Private_Part_Range; 
--# expr-done 2798
if Is_A then
--# expr-start 2800 '<Cast to BasicDecl at nodes.lkt:4944:21>' Cast_Result_1 ada/nodes.lkt:4944
--# expr-start 2799 '<parent at nodes.lkt:4944:21>' Fld_2 ada/nodes.lkt:4944
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_0.Parent; 
--# expr-done 2799
   if Fld_2 = null
      or else Fld_2.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Fld_2;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 2800
Var_Expr_2 := Cast_Result_1;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind bd Var_Expr_2
--# expr-start 2801 '<FieldAccess for has_top_level_env_name_impl at nodes.lkt:4945:29>' Fld_3 ada/nodes.lkt:4945
      if Var_Expr_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.has_top_level_env_name_impl
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Has_Top_Level_Env_Name_Impl (Node => Var_Expr_2, Allow_Bodies => True);
--# end
--# expr-done 2801
Scope_Result_1 := Fld_3;
   --# end
   Result_Var := Scope_Result_1;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
else
   If_Result := False;
end if;
--# expr-done 2802
   Result_Var_1 := If_Result;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := True;
end if;
         Property_Result := Result_Var_2;
   --# end
      Finalizer_Scope_424;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_424;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Has_Top_Level_Env_Name;
--# end
--# property-start BasicDecl.env_spec_fully_qualified_name_impl ada/nodes.lkt:4952
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Env_Spec_Fully_Qualified_Name_Impl
  (Node : Bare_Basic_Decl
      ; Self_Env : Lexical_Env
  )
   return String_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind self_env Self_Env
   Property_Result : String_Type;
            procedure Finalizer_Scope_425 with Inline_Always;
            procedure Finalizer_Scope_2291 with Inline_Always;
      Var_Expr_0 : Bare_Basic_Decl;
Var_Expr : Bare_Basic_Decl;
Var_Expr_78 : Bare_Private_Part;
Fld : Bare_Compilation_Unit;
Fld_1 : Symbol_Type_Array_Access;
Str : String_Type;
Fld_2 : String_Type;
Fld_3 : Bare_Ada_Node;
Cast_Result : Bare_Basic_Decl;
Fld_4 : Bare_Ada_Node;
Fld_5 : Lexical_Env := Empty_Env;
Fld_6 : String_Type;
Env_Node : Bare_Ada_Node;
Cast_Result_1 : Bare_Basic_Decl;
Scope_Result : Bare_Basic_Decl;
Env_Node_1 : Bare_Ada_Node;
Cast_Result_2 : Bare_Private_Part;
Fld_7 : Bare_Ada_Node;
Scope_Result_1 : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Cast_Result_3 : Bare_Basic_Decl;
Result_Var_1 : Bare_Basic_Decl;
Fld_8 : Lexical_Env := Empty_Env;
Fld_9 : String_Type;
Str_1 : String_Type;
Concat_Result : String_Type;
Fld_10 : Symbol_Type;
Fld_11 : String_Type;
Concat_Result_1 : String_Type;
Scope_Result_2 : String_Type;
Result_Var_2 : String_Type;
Is_A : Boolean;
If_Result : String_Type;
Fld_12 : Boolean;
If_Result_1 : String_Type;
            procedure Finalizer_Scope_425 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Str);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_425;
            procedure Finalizer_Scope_2291 is
            begin
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Str_1);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Concat_Result_1);
            end Finalizer_Scope_2291;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2826 '<If at nodes.lkt:4955:9>' If_Result_1 ada/nodes.lkt:4955
--# expr-start 2803 '<FieldAccess for is_compilation_unit_root at nodes.lkt:4955:12>' Fld_12 ada/nodes.lkt:4955
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Self);
--# end
--# expr-done 2803
if Fld_12 then
   --# expr-start 2807 '<FieldAccess for sym_join at nodes.lkt:4957:13>' Fld_2 ada/nodes.lkt:4957
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2805 '<FieldAccess for syntactic_fully_qualified_name at nodes.lkt:4958:17>' Fld_1 ada/nodes.lkt:4958
--# expr-start 2804 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:4958:17>' Fld ada/nodes.lkt:4958
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Self);
--# end
--# expr-done 2804
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.syntactic_fully_qualified_name
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Syntactic_Fully_Qualified_Name (Node => Fld);
--# end
--# expr-done 2805
--# expr-start 2806 '<String at nodes.lkt:4960:17>' Str ada/nodes.lkt:4960
Str := Create_String ("."); 
--# expr-done 2806
--# property-call-start AdaNode.sym_join
Fld_2 := Libadalang.Implementation.Ada_Node_P_Sym_Join (Node => Self, Syms => Fld_1, Sep => Str);
--# end
--# expr-done 2807
   If_Result_1 := Fld_2;
else
   --# expr-start 2825 '<If at nodes.lkt:4955:9>' If_Result ada/nodes.lkt:4955
--# expr-start 2808 '<IsA GenericPackageInternal, GenericSubpInternal at nodes.lkt:4965:14>' Is_A ada/nodes.lkt:4965
Is_A := Self /= null 
and then Self.Kind in Ada_Generic_Package_Internal_Range | Ada_Generic_Subp_Internal_Range; 
--# expr-done 2808
if Is_A then
   --# expr-start 2813 '<FieldAccess for env_spec_fully_qualified_name_impl at nodes.lkt:4967:13>' Fld_6 ada/nodes.lkt:4967
--# expr-start 2810 '<Cast to BasicDecl at nodes.lkt:4967:13>' Cast_Result ada/nodes.lkt:4967
--# expr-start 2809 '<parent at nodes.lkt:4967:13>' Fld_3 ada/nodes.lkt:4967
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Parent; 
--# expr-done 2809
   if Fld_3 = null
      or else Fld_3.Kind in Ada_Basic_Decl
   then
      Cast_Result := Fld_3;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 2810
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2812 '<FieldAccess for node_env at nodes.lkt:4968:26>' Fld_5 ada/nodes.lkt:4968
--# expr-start 2811 '<parent at nodes.lkt:4968:26>' Fld_4 ada/nodes.lkt:4968
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Parent; 
--# expr-done 2811
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Node_Env (Node => Fld_4);
--# expr-done 2812
--# property-call-start BasicDecl.env_spec_fully_qualified_name_impl
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Env_Spec_Fully_Qualified_Name_Impl (Node => Cast_Result, Self_Env => Fld_5);
--# end
--# expr-done 2813
   If_Result := Fld_6;
else
--# expr-start 2815 '<Cast to BasicDecl at nodes.lkt:4973:17>' Cast_Result_1 ada/nodes.lkt:4973
--# expr-start 2814 '<env_node at nodes.lkt:4973:17>' Env_Node ada/nodes.lkt:4973
Env_Node := AST_Envs.Env_Node (Self_Env); 
--# expr-done 2814
   if Env_Node = null
      or else Env_Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Env_Node;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 2815
Var_Expr := Cast_Result_1;
if Var_Expr /= No_Bare_Ada_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result;
else
   --# expr-start 2819 '<Cast to BasicDecl at nodes.lkt:4974:21>' Cast_Result_3 ada/nodes.lkt:4974
--# expr-start 2817 '<Cast to PrivatePart at nodes.lkt:4974:21>' Cast_Result_2 ada/nodes.lkt:4974
--# expr-start 2816 '<env_node at nodes.lkt:4974:21>' Env_Node_1 ada/nodes.lkt:4974
Env_Node_1 := AST_Envs.Env_Node (Self_Env); 
--# expr-done 2816
   if Env_Node_1 = null
      or else Env_Node_1.Kind in Ada_Private_Part_Range
   then
      Cast_Result_2 := Env_Node_1;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 2817
Var_Expr_78 := Cast_Result_2;
if Var_Expr_78 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 2818 '<parent at nodes.lkt:4974:21>' Fld_7 ada/nodes.lkt:4974
      if Var_Expr_78 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Var_Expr_78.Parent; 
--# expr-done 2818
Scope_Result_1 := Fld_7;
   --# end
   Result_Var := Scope_Result_1;
else
   Result_Var := No_Bare_Ada_Node;
end if;
   if Result_Var = null
      or else Result_Var.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Result_Var;
   else
         Cast_Result_3 := No_Bare_Ada_Node;
   end if;
--# expr-done 2819
   Result_Var_1 := Cast_Result_3;
end if;
Var_Expr_0 := Result_Var_1;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind bd Var_Expr_0
--# expr-start 2821 '<FieldAccess for env_spec_fully_qualified_name_impl at nodes.lkt:4979:17>' Fld_9 ada/nodes.lkt:4979
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2820 '<FieldAccess for node_env at nodes.lkt:4979:64>' Fld_8 ada/nodes.lkt:4979
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Node_Env (Node => Var_Expr_0);
--# expr-done 2820
--# property-call-start BasicDecl.env_spec_fully_qualified_name_impl
Fld_9 := Libadalang.Implementation.Basic_Decl_P_Env_Spec_Fully_Qualified_Name_Impl (Node => Var_Expr_0, Self_Env => Fld_8);
--# end
--# expr-done 2821
--# expr-start 2822 '<String at nodes.lkt:4980:19>' Str_1 ada/nodes.lkt:4980
Str_1 := Create_String ("."); 
--# expr-done 2822
Concat_Result := Concat_String (Fld_9, Str_1); 
--# expr-start 2824 '<FieldAccess for image at nodes.lkt:4981:19>' Fld_11 ada/nodes.lkt:4981
--# expr-start 2823 '<FieldAccess for name_symbol at nodes.lkt:4981:19>' Fld_10 ada/nodes.lkt:4981
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_10 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 2823
Fld_11 := Libadalang.Implementation.Image (Self => Fld_10);
--# expr-done 2824
Concat_Result_1 := Concat_String (Concat_Result, Fld_11); 
Scope_Result_2 := Concat_Result_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2291;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Empty_String;
end if;
      Inc_Ref (Result_Var_2);
   If_Result := Result_Var_2;
end if;
      Inc_Ref (If_Result);
--# expr-done 2825
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 2826
         Property_Result := If_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_425;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_425;
                     Finalizer_Scope_2291;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Env_Spec_Fully_Qualified_Name_Impl;
--# end
--# property-start BasicDecl.env_spec_fully_qualified_name ada/nodes.lkt:4988
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Env_Spec_Fully_Qualified_Name
  (Node : Bare_Basic_Decl
  )
   return String_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : String_Type;
            procedure Finalizer_Scope_426 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Fld_1 : String_Type;
            procedure Finalizer_Scope_426 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_426;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2828 '<FieldAccess for env_spec_fully_qualified_name_impl at nodes.lkt:4991:9>' Fld_1 ada/nodes.lkt:4991
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2827 '<FieldAccess for children_env at nodes.lkt:4991:49>' Fld ada/nodes.lkt:4991
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Self);
--# expr-done 2827
--# property-call-start BasicDecl.env_spec_fully_qualified_name_impl
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Env_Spec_Fully_Qualified_Name_Impl (Node => Self, Self_Env => Fld);
--# end
--# expr-done 2828
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_426;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_426;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Env_Spec_Fully_Qualified_Name;
--# end
--# property-start BasicDecl.top_level_env_name ada/nodes.lkt:4996
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Top_Level_Env_Name
  (Node : Bare_Basic_Decl
  )
   return String_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : String_Type;
            procedure Finalizer_Scope_427 with Inline_Always;
      Fld : String_Type;
Fld_1 : Boolean;
If_Result : String_Type;
            procedure Finalizer_Scope_427 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_427;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2831 '<If at nodes.lkt:4997:9>' If_Result ada/nodes.lkt:4997
--# expr-start 2829 '<FieldAccess for has_top_level_env_name at nodes.lkt:4997:12>' Fld_1 ada/nodes.lkt:4997
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.has_top_level_env_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Has_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 2829
if Fld_1 then
   --# expr-start 2830 '<FieldAccess for env_spec_fully_qualified_name at nodes.lkt:4998:14>' Fld ada/nodes.lkt:4998
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.env_spec_fully_qualified_name
Fld := Libadalang.Implementation.Basic_Decl_P_Env_Spec_Fully_Qualified_Name (Node => Self);
--# end
--# expr-done 2830
   If_Result := Fld;
else
   If_Result := Empty_String;
end if;
      Inc_Ref (If_Result);
--# expr-done 2831
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_427;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_427;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Top_Level_Env_Name;
--# end
--# property-start BasicDecl.child_decl_initial_env ada/nodes.lkt:5007
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Child_Decl_Initial_Env
  (Node : Bare_Basic_Decl
      ; Private_Part : Boolean
         := False
  )
   return Internal_Designated_Env
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind private_part Private_Part
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_428 with Inline_Always;
            procedure Finalizer_Scope_2292 with Inline_Always;
      Var_Expr_0 : Symbol_Type;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
Fld_1 : Lexical_Env := Empty_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_428 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_1);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_428;
            procedure Finalizer_Scope_2292 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2292;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 2832 '<FieldAccess for child_decl_initial_env_name at nodes.lkt:5008:9>' Fld ada/nodes.lkt:5008
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.child_decl_initial_env_name'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Child_Decl_Initial_Env_Name (Node => Self, Private_Part => Private_Part);
--# end
--# expr-done 2832
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind name Var_Expr_0
--# expr-start 2833 '<New DesignatedEnv at nodes.lkt:5010:13>' New_Struct ada/nodes.lkt:5010
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Var_Expr_0, Kind => Named_Env); 
--# expr-done 2833
Scope_Result := New_Struct;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2292;
   Result_Var := Scope_Result;
else
   --# expr-start 2835 '<New DesignatedEnv at nodes.lkt:5015:25>' New_Struct_1 ada/nodes.lkt:5015
--# expr-start 2834 '<FieldAccess for default_initial_env at nodes.lkt:5018:28>' Fld_1 ada/nodes.lkt:5018
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.default_initial_env
Fld_1 := Libadalang.Implementation.Ada_Node_P_Default_Initial_Env (Node => Self);
--# end
--# expr-done 2834
Inc_Ref (Fld_1);
New_Struct_1 := (Direct_Env => Fld_1, Env_Name => No_Symbol, Kind => Direct_Env); 
--# expr-done 2835
   Result_Var := New_Struct_1;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_428;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_428;
                     Finalizer_Scope_2292;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Child_Decl_Initial_Env;
--# end
--# property-start BasicDecl.basic_decl_env_assocs ada/nodes.lkt:5028
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Basic_Decl_Env_Assocs
  (Node : Bare_Basic_Decl
      ; Dest_Env : Internal_Designated_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind dest_env Dest_Env
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_429 with Inline_Always;
      Local_Name : Symbol_Type;
Local_Base_Assoc : Internal_Env_Assoc_Array_Access;
Local_Implicit_Neq_Assoc : Internal_Env_Assoc_Array_Access;
Fld : Symbol_Type;
Fld_1 : Symbol_Type;
Cast_Expr : Bare_Basic_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Sym : Symbol_Type;
Fld_2 : Internal_Entity_Base_Subp_Spec;
Cast_Result_1 : Internal_Entity_Subp_Spec;
Fld_3 : Bare_Subp_Spec;
Fld_4 : Bare_Basic_Subp_Decl;
Cast_Result_2 : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit_1 : Internal_Env_Assoc_Array_Access;
Sym_1 : Symbol_Type;
Is_Equal : Boolean;
If_Result : Internal_Env_Assoc_Array_Access;
Concat_Result : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_429 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Local_Base_Assoc);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Local_Implicit_Neq_Assoc);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_429;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2852 '<Let at nodes.lkt:5029:9>' Let_Result_2 ada/nodes.lkt:5029
--# scope-start
--# expr-start 2836 '<FieldAccess for name_symbol at nodes.lkt:5029:20>' Fld ada/nodes.lkt:5029
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 2836
Local_Name := Fld; 
--# bind name Local_Name
--# expr-start 2851 '<Let at nodes.lkt:5030:9>' Let_Result_1 ada/nodes.lkt:5030
--# scope-start
--# expr-start 2839 '<ArrayLiteral at nodes.lkt:5031:13>' Array_Lit ada/nodes.lkt:5031
--# expr-start 2838 '<New EnvAssoc at nodes.lkt:5032:17>' New_Struct ada/nodes.lkt:5032
--# expr-start 2837 '<FieldAccess for name_symbol at nodes.lkt:5033:25>' Fld_1 ada/nodes.lkt:5033
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 2837
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (Dest_Env);
New_Struct := (Dest_Env => Dest_Env, Key => Fld_1, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 2838
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => New_Struct)); 
--# expr-done 2839
Local_Base_Assoc := Array_Lit; Inc_Ref (Local_Base_Assoc);
--# bind base_assoc Local_Base_Assoc
--# expr-start 2850 '<Let at nodes.lkt:5039:9>' Let_Result ada/nodes.lkt:5039
--# scope-start
--# expr-start 2849 '<If at nodes.lkt:5040:13>' If_Result ada/nodes.lkt:5040
--# expr-start 2841 '<Eq at nodes.lkt:5040:16>' Is_Equal ada/nodes.lkt:5040
--# expr-start 2840 '<Symbol "=" at nodes.lkt:5040:24>' Sym_1 ada/nodes.lkt:5040
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 2840
Is_Equal := Local_Name = Sym_1; 
--# expr-done 2841
if Is_Equal then
   --# expr-start 2848 '<ArrayLiteral at nodes.lkt:5041:18>' Array_Lit_1 ada/nodes.lkt:5041
--# expr-start 2847 '<New EnvAssoc at nodes.lkt:5041:19>' New_Struct_1 ada/nodes.lkt:5041
--# expr-start 2842 '<Symbol "/=" at nodes.lkt:5042:21>' Sym ada/nodes.lkt:5042
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 2842
--# expr-start 2846 '<FieldAccess for synthetic_neq_subprogram at nodes.lkt:5043:23>' Fld_4 ada/nodes.lkt:5043
--# expr-start 2845 '<FieldAccess for node at nodes.lkt:5043:23>' Fld_3 ada/nodes.lkt:5043
--# expr-start 2844 '<Cast to SubpSpec at nodes.lkt:5043:23>' Cast_Result_1 ada/nodes.lkt:5043
--# expr-start 2843 '<FieldAccess for subp_spec_or_null at nodes.lkt:5043:23>' Fld_2 ada/nodes.lkt:5043
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, Follow_Generic => False, E_Info => Ent.Info);
--# end
--# expr-done 2843
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Subp_Spec_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Subp_Spec
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result_1 := No_Entity_Subp_Spec;
   end if;
--# expr-done 2844
Fld_3 := Cast_Result_1.Node;
--# expr-done 2845
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubpSpec.synthetic_neq_subprogram
Fld_4 := Libadalang.Implementation.Subp_Spec_F_Synthetic_Neq_Subprogram (Node => Fld_3);
--# end
--# expr-done 2846
      Cast_Result_2 := Fld_4;
Inc_Ref (Dest_Env);
New_Struct_1 := (Dest_Env => Dest_Env, Key => Sym, Metadata => No_Metadata, Value => Cast_Result_2); 
--# expr-done 2847
Array_Lit_1 := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => New_Struct_1)); 
--# expr-done 2848
   If_Result := Array_Lit_1;
else
   If_Result := No_Internal_Env_Assoc_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 2849
Local_Implicit_Neq_Assoc := If_Result; Inc_Ref (Local_Implicit_Neq_Assoc);
--# bind implicit_neq_assoc Local_Implicit_Neq_Assoc
Concat_Result := Concat (Local_Base_Assoc, Local_Implicit_Neq_Assoc); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 2850
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2851
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 2852
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_429;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_429;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Basic_Decl_Env_Assocs;
--# end
--# property-start BasicDecl.child_decl_env_assocs ada/nodes.lkt:5061
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Child_Decl_Env_Assocs
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_430 with Inline_Always;
            procedure Finalizer_Scope_2293 with Inline_Always;
      Local_Dest_Env : Internal_Designated_Env := No_Designated_Env;
Var_Expr_0 : Symbol_Type;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
Fld_1 : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_430 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Dest_Env);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_430;
            procedure Finalizer_Scope_2293 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2293;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2857 '<Let at nodes.lkt:5062:9>' Let_Result ada/nodes.lkt:5062
--# scope-start
--# expr-start 2853 '<FieldAccess for child_decl_initial_env_name at nodes.lkt:5063:13>' Fld ada/nodes.lkt:5063
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.child_decl_initial_env_name'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Child_Decl_Initial_Env_Name (Node => Self, Private_Part => False);
--# end
--# expr-done 2853
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind non_null_name Var_Expr_0
--# expr-start 2854 '<New DesignatedEnv at nodes.lkt:5065:17>' New_Struct ada/nodes.lkt:5065
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Var_Expr_0, Kind => Named_Env); 
--# expr-done 2854
Scope_Result := New_Struct;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2293;
   Result_Var := Scope_Result;
else
   --# expr-start 2855 '<New DesignatedEnv at nodes.lkt:5070:29>' New_Struct_1 ada/nodes.lkt:5070
Inc_Ref (Empty_Env);
New_Struct_1 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 2855
   Result_Var := New_Struct_1;
end if;
      Inc_Ref (Result_Var);
Local_Dest_Env := Result_Var; Inc_Ref (Local_Dest_Env);
--# bind dest_env Local_Dest_Env
--# expr-start 2856 '<FieldAccess for basic_decl_env_assocs at nodes.lkt:5077:9>' Fld_1 ada/nodes.lkt:5077
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.basic_decl_env_assocs
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Basic_Decl_Env_Assocs (Node => Ent.Node, Dest_Env => Local_Dest_Env, E_Info => Ent.Info);
--# end
--# expr-done 2856
Let_Result := Fld_1; Inc_Ref (Let_Result);
--# end
--# expr-done 2857
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_430;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_430;
                     Finalizer_Scope_2293;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Child_Decl_Env_Assocs;
--# end
--# property-start BasicDecl.is_formal ada/nodes.lkt:5082
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Formal
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2859 '<IsA GenericFormal at nodes.lkt:5082:29>' Is_A ada/nodes.lkt:5082
--# expr-start 2858 '<parent at nodes.lkt:5082:29>' Fld ada/nodes.lkt:5082
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 2858
Is_A := Fld /= null 
and then Fld.Kind in Ada_Generic_Formal; 
--# expr-done 2859
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Formal;
--# end
--# property-start BasicDecl.canonical_part ada/nodes.lkt:5113
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Canonical_Part
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Basic_Decl_Basic_Decl_P_Canonical_Part,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Basic_Decl,
                                As_Bare_Basic_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Imprecise_Fallback);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Basic_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
--# expr-start 2860 '<FieldAccess for previous_part_for_decl at nodes.lkt:5114:9>' Fld ada/nodes.lkt:5114
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_decl'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 2860
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind pp Var_Expr_0
--# expr-start 2861 '<FieldAccess for canonical_part at nodes.lkt:5115:21>' Fld_1 ada/nodes.lkt:5115
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2861
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := Ent;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Basic_Decl,
                        As_Internal_Entity_Basic_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Basic_Decl_P_Canonical_Part;
--# end
--# property-start BasicDecl.all_previous_parts ada/nodes.lkt:5122
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_All_Previous_Parts
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_435 with Inline_Always;
            procedure Finalizer_Scope_2295 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
Array_Lit : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result : Internal_Entity_Basic_Decl_Array_Access;
Result_Var : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_435 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_435;
            procedure Finalizer_Scope_2295 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2295;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 2862 '<FieldAccess for previous_part_for_decl at nodes.lkt:5123:9>' Fld ada/nodes.lkt:5123
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_decl'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 2862
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind pp Var_Expr_0
--# expr-start 2866 '<If at nodes.lkt:5125:13>' If_Result ada/nodes.lkt:5125
--# expr-start 2863 '<Eq at nodes.lkt:5125:16>' Is_Equiv ada/nodes.lkt:5125
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Var_Expr_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 2863
if Is_Equiv then
   If_Result := No_Internal_Entity_Basic_Decl_Array_Type;
else
   --# expr-start 2864 '<FieldAccess for all_previous_parts at nodes.lkt:5126:18>' Fld_1 ada/nodes.lkt:5126
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.all_previous_parts
Fld_1 := Libadalang.Implementation.Basic_Decl_P_All_Previous_Parts (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2864
--# expr-start 2865 '<ArrayLiteral at nodes.lkt:5126:44>' Array_Lit ada/nodes.lkt:5126
Array_Lit := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Var_Expr_0)); 
--# expr-done 2865
Concat_Result := Concat (Fld_1, Array_Lit); 
   If_Result := Concat_Result;
end if;
      Inc_Ref (If_Result);
--# expr-done 2866
Scope_Result := If_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2295;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_435;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_435;
                     Finalizer_Scope_2295;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_All_Previous_Parts;
--# end
--# property-start BasicDecl.all_next_parts ada/nodes.lkt:5132
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_All_Next_Parts
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_436 with Inline_Always;
            procedure Finalizer_Scope_2296 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Array_Lit : Internal_Entity_Basic_Decl_Array_Access;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result : Internal_Entity_Basic_Decl_Array_Access;
Result_Var : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_436 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_436;
            procedure Finalizer_Scope_2296 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2296;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 2867 '<FieldAccess for next_part_for_decl at nodes.lkt:5133:9>' Fld ada/nodes.lkt:5133
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 2867
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind np Var_Expr_0
--# expr-start 2871 '<If at nodes.lkt:5135:13>' If_Result ada/nodes.lkt:5135
--# expr-start 2868 '<Eq at nodes.lkt:5135:16>' Is_Equiv ada/nodes.lkt:5135
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Var_Expr_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 2868
if Is_Equiv then
   If_Result := No_Internal_Entity_Basic_Decl_Array_Type;
else
   --# expr-start 2869 '<ArrayLiteral at nodes.lkt:5136:18>' Array_Lit ada/nodes.lkt:5136
Array_Lit := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Var_Expr_0)); 
--# expr-done 2869
--# expr-start 2870 '<FieldAccess for all_next_parts at nodes.lkt:5136:25>' Fld_1 ada/nodes.lkt:5136
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.all_next_parts
Fld_1 := Libadalang.Implementation.Basic_Decl_P_All_Next_Parts (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 2870
Concat_Result := Concat (Array_Lit, Fld_1); 
   If_Result := Concat_Result;
end if;
      Inc_Ref (If_Result);
--# expr-done 2871
Scope_Result := If_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2296;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_436;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_436;
                     Finalizer_Scope_2296;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_All_Next_Parts;
--# end
--# property-start BasicDecl.all_parts ada/nodes.lkt:5143
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_All_Parts
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_437 with Inline_Always;
      Local_Prevs : Internal_Entity_Basic_Decl_Array_Access;
Local_Nexts : Internal_Entity_Basic_Decl_Array_Access;
Fld : Internal_Entity_Basic_Decl_Array_Access;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
Array_Lit : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_437 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Prevs);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Nexts);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_437;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 2876 '<Let at nodes.lkt:5144:9>' Let_Result_1 ada/nodes.lkt:5144
--# scope-start
--# expr-start 2872 '<FieldAccess for all_previous_parts at nodes.lkt:5144:21>' Fld ada/nodes.lkt:5144
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.all_previous_parts
Fld := Libadalang.Implementation.Basic_Decl_P_All_Previous_Parts (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 2872
Local_Prevs := Fld; Inc_Ref (Local_Prevs);
--# bind prevs Local_Prevs
--# expr-start 2875 '<Let at nodes.lkt:5145:9>' Let_Result ada/nodes.lkt:5145
--# scope-start
--# expr-start 2873 '<FieldAccess for all_next_parts at nodes.lkt:5145:21>' Fld_1 ada/nodes.lkt:5145
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.all_next_parts
Fld_1 := Libadalang.Implementation.Basic_Decl_P_All_Next_Parts (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 2873
Local_Nexts := Fld_1; Inc_Ref (Local_Nexts);
--# bind nexts Local_Nexts
--# expr-start 2874 '<ArrayLiteral at nodes.lkt:5147:17>' Array_Lit ada/nodes.lkt:5147
Array_Lit := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Ent)); 
--# expr-done 2874
Concat_Result := Concat (Local_Prevs, Array_Lit); 
Concat_Result_1 := Concat (Concat_Result, Local_Nexts); 
Let_Result := Concat_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 2875
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 2876
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_437;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_437;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_All_Parts;
--# end
--# property-start BasicDecl.unshed_rebindings ada/nodes.lkt:5154
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Unshed_Rebindings
  (Node : Bare_Basic_Decl
      ; Rebindings : Env_Rebindings
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind rebindings Rebindings
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_438 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Env_Rebindings;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Cast_Expr : Bare_Basic_Decl;
Cast_Result : Bare_Ada_Node;
Is_Equal : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Is_Equal_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_438 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_438;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2885 '<If at nodes.lkt:5155:9>' If_Result_1 ada/nodes.lkt:5155
--# expr-start 2877 '<Eq at nodes.lkt:5155:12>' Is_Equal_1 ada/nodes.lkt:5155
Is_Equal_1 := Rebindings = null; 
--# expr-done 2877
if Is_Equal_1 then
   If_Result_1 := Ent;
else
   --# expr-start 2884 '<If at nodes.lkt:5155:9>' If_Result ada/nodes.lkt:5155
--# expr-start 2880 '<Eq at nodes.lkt:5156:14>' Is_Equal ada/nodes.lkt:5156
--# expr-start 2879 '<env_node at nodes.lkt:5156:14>' Env_Node ada/nodes.lkt:5156
--# expr-start 2878 '<FieldAccess for old_env at nodes.lkt:5156:14>' Fld_3 ada/nodes.lkt:5156
      if Rebindings = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Rebindings.Old_Env;
Inc_Ref (Fld_3);
--# expr-done 2878
Env_Node := AST_Envs.Env_Node (Fld_3); 
--# expr-done 2879
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Is_Equal := Env_Node = Cast_Result; 
--# expr-done 2880
if Is_Equal then
   --# expr-start 2881 '<FieldAccess for unshed_rebindings_helper at nodes.lkt:5157:14>' Fld ada/nodes.lkt:5157
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.unshed_rebindings_helper
Fld := Libadalang.Implementation.Basic_Decl_P_Unshed_Rebindings_Helper (Node => Ent.Node, Rebindings => Rebindings, E_Info => Ent.Info);
--# end
--# expr-done 2881
   If_Result := Fld;
else
   --# expr-start 2883 '<FieldAccess for unshed_rebindings at nodes.lkt:5158:14>' Fld_2 ada/nodes.lkt:5158
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2882 '<FieldAccess for get_parent at nodes.lkt:5158:37>' Fld_1 ada/nodes.lkt:5158
      if Rebindings = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Rebindings.Parent;
--# expr-done 2882
--# property-call-start BasicDecl.unshed_rebindings
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Unshed_Rebindings (Node => Ent.Node, Rebindings => Fld_1, E_Info => Ent.Info);
--# end
--# expr-done 2883
   If_Result := Fld_2;
end if;
--# expr-done 2884
   If_Result_1 := If_Result;
end if;
--# expr-done 2885
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_438;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_438;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Unshed_Rebindings;
--# end
--# property-start BasicDecl.unshed_rebindings_helper ada/nodes.lkt:5163
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Unshed_Rebindings_Helper
  (Node : Bare_Basic_Decl
      ; Rebindings : Env_Rebindings
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind rebindings Rebindings
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Info;
Fld_1 : Internal_Metadata;
Fld_2 : Internal_Entity_Info;
Fld_3 : Boolean;
New_Struct : Internal_Entity_Info;
New_Struct_1 : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Info;
Fld_5 : Env_Rebindings;
Fld_6 : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld_7 : Internal_Entity_Info;
Fld_8 : Env_Rebindings;
Is_Equal : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2899 '<If at nodes.lkt:5168:9>' If_Result_1 ada/nodes.lkt:5168
--# expr-start 2888 '<Eq at nodes.lkt:5168:12>' Is_Equal ada/nodes.lkt:5168
--# expr-start 2887 '<FieldAccess for rebindings at nodes.lkt:5168:12>' Fld_8 ada/nodes.lkt:5168
--# expr-start 2886 '<FieldAccess for info at nodes.lkt:5168:12>' Fld_7 ada/nodes.lkt:5168
Fld_7 := Ent.Info;
--# expr-done 2886
Fld_8 := Fld_7.Rebindings;
--# expr-done 2887
Is_Equal := Fld_8 = Rebindings; 
--# expr-done 2888
if Is_Equal then
   If_Result_1 := Ent;
else
   --# expr-start 2898 '<If at nodes.lkt:5168:9>' If_Result ada/nodes.lkt:5168
--# expr-start 2891 '<FieldAccess for has_parent_rebindings at nodes.lkt:5169:14>' Fld_6 ada/nodes.lkt:5169
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2890 '<FieldAccess for rebindings at nodes.lkt:5169:53>' Fld_5 ada/nodes.lkt:5169
--# expr-start 2889 '<FieldAccess for info at nodes.lkt:5169:53>' Fld_4 ada/nodes.lkt:5169
Fld_4 := Ent.Info;
--# expr-done 2889
Fld_5 := Fld_4.Rebindings;
--# expr-done 2890
--# property-call-start AdaNode.has_parent_rebindings
Fld_6 := Libadalang.Implementation.Ada_Node_P_Has_Parent_Rebindings (Node => Self, Base => Rebindings, Parent => Fld_5);
--# end
--# expr-done 2891
if Fld_6 then
   --# expr-start 2897 '<New BasicDecl.entity at nodes.lkt:5171:13>' New_Struct_1 ada/nodes.lkt:5171
--# expr-start 2896 '<New EntityInfo at nodes.lkt:5173:22>' New_Struct ada/nodes.lkt:5173
--# expr-start 2893 '<FieldAccess for from_rebound at nodes.lkt:5176:34>' Fld_3 ada/nodes.lkt:5176
--# expr-start 2892 '<FieldAccess for info at nodes.lkt:5176:34>' Fld_2 ada/nodes.lkt:5176
Fld_2 := Ent.Info;
--# expr-done 2892
Fld_3 := Fld_2.From_Rebound;
--# expr-done 2893
--# expr-start 2895 '<FieldAccess for md at nodes.lkt:5174:24>' Fld_1 ada/nodes.lkt:5174
--# expr-start 2894 '<FieldAccess for info at nodes.lkt:5174:24>' Fld ada/nodes.lkt:5174
Fld := Ent.Info;
--# expr-done 2894
Fld_1 := Fld.Md;
--# expr-done 2895
New_Struct := (From_Rebound => Fld_3, Md => Fld_1, Rebindings => Rebindings); 
--# expr-done 2896
New_Struct_1 := (Info => New_Struct, Node => Self); 
--# expr-done 2897
   If_Result := New_Struct_1;
else
   If_Result := raise Property_Error with "Incorrect rebindings";
end if;
--# expr-done 2898
   If_Result_1 := If_Result;
end if;
--# expr-done 2899
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Unshed_Rebindings_Helper;
--# end
--# property-start BasicDecl.decl_private_part ada/nodes.lkt:5181
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Decl_Private_Part
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Private_Part
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Private_Part;
      Match_0 : Internal_Entity_Base_Package_Decl;
Match_1 : Internal_Entity_Task_Type_Decl;
Match_2 : Internal_Entity_Single_Task_Decl;
Match_3 : Internal_Entity_Protected_Type_Decl;
Match_4 : Internal_Entity_Single_Protected_Decl;
Match_5 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Private_Part;
Fld_1 : Internal_Entity_Task_Def;
Fld_2 : Internal_Entity_Private_Part;
Fld_3 : Internal_Entity_Single_Task_Type_Decl;
Fld_4 : Internal_Entity_Task_Def;
Fld_5 : Internal_Entity_Private_Part;
Fld_6 : Internal_Entity_Protected_Def;
Fld_7 : Internal_Entity_Private_Part;
Fld_8 : Internal_Entity_Protected_Def;
Fld_9 : Internal_Entity_Private_Part;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Base_Package_Decl;
Let_Result : Internal_Entity_Private_Part;
Scope_Result : Internal_Entity_Private_Part;
Cast_Result_1 : Internal_Entity_Task_Type_Decl;
Let_Result_1 : Internal_Entity_Private_Part;
Scope_Result_1 : Internal_Entity_Private_Part;
Cast_Result_2 : Internal_Entity_Single_Task_Decl;
Let_Result_2 : Internal_Entity_Private_Part;
Scope_Result_2 : Internal_Entity_Private_Part;
Cast_Result_3 : Internal_Entity_Protected_Type_Decl;
Let_Result_3 : Internal_Entity_Private_Part;
Scope_Result_3 : Internal_Entity_Private_Part;
Cast_Result_4 : Internal_Entity_Single_Protected_Decl;
Let_Result_4 : Internal_Entity_Private_Part;
Scope_Result_4 : Internal_Entity_Private_Part;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Let_Result_5 : Internal_Entity_Private_Part;
Scope_Result_5 : Internal_Entity_Private_Part;
Match_Result : Internal_Entity_Private_Part;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2910 '<Match at nodes.lkt:5181:52>' Match_Result ada/nodes.lkt:5181
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Generic_Package_Internal .. Ada_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Base_Package_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind bpd Match_0
--# expr-start 2900 '<FieldAccess for private_part at nodes.lkt:5182:38>' Fld ada/nodes.lkt:5182
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Private_Part (Node => Match_0.Node.Base_Package_Decl_F_Private_Part, Info => Match_0.Info);
--# expr-done 2900
Let_Result := Fld; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Task_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind ttd Match_1
--# expr-start 2902 '<FieldAccess for private_part at nodes.lkt:5183:35>' Fld_2 ada/nodes.lkt:5183
--# expr-start 2901 '<FieldAccess for definition at nodes.lkt:5183:35>' Fld_1 ada/nodes.lkt:5183
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Task_Def (Node => Match_1.Node.Task_Type_Decl_F_Definition, Info => Match_1.Info);
--# expr-done 2901
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Private_Part (Node => Fld_1.Node.Task_Def_F_Private_Part, Info => Fld_1.Info);
--# expr-done 2902
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Single_Task_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Single_Task_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind td Match_2
--# expr-start 2905 '<FieldAccess for private_part at nodes.lkt:5184:36>' Fld_5 ada/nodes.lkt:5184
--# expr-start 2904 '<FieldAccess for definition at nodes.lkt:5184:36>' Fld_4 ada/nodes.lkt:5184
--# expr-start 2903 '<FieldAccess for task_type at nodes.lkt:5184:36>' Fld_3 ada/nodes.lkt:5184
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Single_Task_Type_Decl (Node => Match_2.Node.Single_Task_Decl_F_Task_Type, Info => Match_2.Info);
--# expr-done 2903
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Task_Def (Node => Fld_3.Node.Task_Type_Decl_F_Definition, Info => Fld_3.Info);
--# expr-done 2904
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Private_Part (Node => Fld_4.Node.Task_Def_F_Private_Part, Info => Fld_4.Info);
--# expr-done 2905
Let_Result_2 := Fld_5; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Protected_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Protected_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_3; 
--# bind ptd Match_3
--# expr-start 2907 '<FieldAccess for private_part at nodes.lkt:5185:40>' Fld_7 ada/nodes.lkt:5185
--# expr-start 2906 '<FieldAccess for definition at nodes.lkt:5185:40>' Fld_6 ada/nodes.lkt:5185
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Protected_Def (Node => Match_3.Node.Protected_Type_Decl_F_Definition, Info => Match_3.Info);
--# expr-done 2906
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Private_Part (Node => Fld_6.Node.Protected_Def_F_Private_Part, Info => Fld_6.Info);
--# expr-done 2907
Let_Result_3 := Fld_7; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Single_Protected_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Single_Protected_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_4; 
--# bind spd Match_4
--# expr-start 2909 '<FieldAccess for private_part at nodes.lkt:5186:42>' Fld_9 ada/nodes.lkt:5186
--# expr-start 2908 '<FieldAccess for definition at nodes.lkt:5186:42>' Fld_8 ada/nodes.lkt:5186
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Protected_Def (Node => Match_4.Node.Single_Protected_Decl_F_Definition, Info => Match_4.Info);
--# expr-done 2908
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Private_Part (Node => Fld_8.Node.Protected_Def_F_Private_Part, Info => Fld_8.Info);
--# expr-done 2909
Let_Result_4 := Fld_9; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Abstract_State_Decl .. Ada_Synthetic_Formal_Param_Decl | Ada_Discrete_Base_Subtype_Decl .. Ada_Incomplete_Tagged_Type_Decl | Ada_Anonymous_Type_Decl .. Ada_Package_Renaming_Decl | Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_5; 
--# bind _ Match_5
Let_Result_5 := No_Entity_Private_Part; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 2910
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Decl_Private_Part;
--# end
--# property-start BasicDecl.immediate_declarative_region ada/nodes.lkt:5191
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Immediate_Declarative_Region
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_441 with Inline_Always;
            procedure Finalizer_Scope_2303 with Inline_Always;
            procedure Finalizer_Scope_2304 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl_Array_Access;
Array_Lit : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
Fld_1 : Internal_Entity_Declarative_Part_Array_Access;
Fld_2 : Lexical_Env := Empty_Env;
Map_Result : Lexical_Env_Array_Access;
Map_Result_1 : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_441 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_441;
            procedure Finalizer_Scope_2303 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2303;
            procedure Finalizer_Scope_2304 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2304;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Basic_Decl_Basic_Decl_P_Immediate_Declarative_Region,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Basic_Decl,
                                As_Bare_Basic_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Lexical_Env;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 2917 '<env_group at nodes.lkt:5192:9>' Group_Env ada/nodes.lkt:5192
--# expr-start 2916 '<Mapcat at nodes.lkt:5192:9>' Map_Result_1 ada/nodes.lkt:5192
   --# expr-start 2911 '<FieldAccess for all_previous_parts at nodes.lkt:5192:10>' Fld ada/nodes.lkt:5192
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.all_previous_parts
Fld := Libadalang.Implementation.Basic_Decl_P_All_Previous_Parts (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 2911
--# expr-start 2912 '<ArrayLiteral at nodes.lkt:5192:38>' Array_Lit ada/nodes.lkt:5192
Array_Lit := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Ent)); 
--# expr-done 2912
Concat_Result := Concat (Fld, Array_Lit); 
      declare
         Map_Result_1_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Concat_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind part Item_0
      --# expr-start 2915 '<Map at nodes.lkt:5193:23>' Map_Result ada/nodes.lkt:5193
   --# expr-start 2913 '<FieldAccess for declarative_parts at nodes.lkt:5193:23>' Fld_1 ada/nodes.lkt:5193
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.declarative_parts'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Declarative_Parts (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 2913
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Declarative_Part_Array_Access := Fld_1;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
      --# expr-start 2914 '<FieldAccess for children_env at nodes.lkt:5193:59>' Fld_2 ada/nodes.lkt:5193
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Item_1.Node, E_Info => Item_1.Info);
--# expr-done 2914
         declare
            Item_To_Append : constant Lexical_Env := Fld_2;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2304;
         end loop;
      end;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 2915
         for Item_To_Append of
               Map_Result.Items
         loop
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2303;
         end loop;
      end;
         Map_Result_1 := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_1_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 2916
Group_Env := Group (Map_Result_1, No_Metadata); 
--# expr-done 2917
         Property_Result := Group_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_441;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_441;
                     Finalizer_Scope_2303;
                     Finalizer_Scope_2304;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Lexical_Env,
                        As_Lexical_Env => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Basic_Decl_P_Immediate_Declarative_Region;
--# end
--# property-start BasicDecl.pragma_regions ada/nodes.lkt:5199
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Pragma_Regions
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Ada_Node_List_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Ada_Node_List_Array_Access;
            procedure Finalizer_Scope_442 with Inline_Always;
            procedure Finalizer_Scope_2305 with Inline_Always;
            procedure Finalizer_Scope_2306 with Inline_Always;
            procedure Finalizer_Scope_2310 with Inline_Always;
            procedure Finalizer_Scope_2311 with Inline_Always;
      Local_Enclosing_Scope : Internal_Entity_Ada_Node_List_Array_Access;
Var_Expr_0 : Internal_Entity_Ada_Node_List;
Local_Private_Scope : Internal_Entity_Ada_Node_List_Array_Access;
Var_Expr_1 : Bare_Public_Part;
Match_0 : Bare_Base_Package_Decl;
Match_1 : Bare_Protected_Def;
Match_2 : Bare_Ada_Node;
Var_Expr_2 : Bare_Private_Part;
Local_Inner_Scope : Internal_Entity_Ada_Node_List_Array_Access;
Var_Expr_3 : Internal_Entity_Declarative_Part;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Ada_Node_List;
Array_Lit : Internal_Entity_Ada_Node_List_Array_Access;
Scope_Result : Internal_Entity_Ada_Node_List_Array_Access;
Result_Var : Internal_Entity_Ada_Node_List_Array_Access;
Fld_1 : Bare_Declarative_Part;
Cast_Result_1 : Bare_Public_Part;
Fld_2 : Bare_Ada_Node;
Fld_3 : Bare_Private_Part;
Fld_4 : Bare_Private_Part;
Match_Prefix : Bare_Ada_Node;
Cast_Result_2 : Bare_Base_Package_Decl;
Let_Result : Bare_Private_Part;
Scope_Result_1 : Bare_Private_Part;
Cast_Result_3 : Bare_Protected_Def;
Let_Result_1 : Bare_Private_Part;
Scope_Result_2 : Bare_Private_Part;
Cast_Result_4 : Bare_Ada_Node;
Let_Result_2 : Bare_Private_Part;
Scope_Result_3 : Bare_Private_Part;
Match_Result : Bare_Private_Part;
Fld_5 : Bare_Ada_Node_List;
As_Entity : Internal_Entity_Ada_Node_List;
Is_Null : Boolean;
If_Result : Internal_Entity_Ada_Node_List;
Array_Lit_1 : Internal_Entity_Ada_Node_List_Array_Access;
Scope_Result_4 : Internal_Entity_Ada_Node_List_Array_Access;
Result_Var_1 : Internal_Entity_Ada_Node_List_Array_Access;
Scope_Result_5 : Internal_Entity_Ada_Node_List_Array_Access;
Result_Var_2 : Internal_Entity_Ada_Node_List_Array_Access;
Fld_6 : Internal_Entity_Declarative_Part_Array_Access;
Get_Result : Internal_Entity_Declarative_Part;
Fld_7 : Internal_Entity_Ada_Node_List;
Array_Lit_2 : Internal_Entity_Ada_Node_List_Array_Access;
Scope_Result_6 : Internal_Entity_Ada_Node_List_Array_Access;
Result_Var_3 : Internal_Entity_Ada_Node_List_Array_Access;
Concat_Result : Internal_Entity_Ada_Node_List_Array_Access;
Concat_Result_1 : Internal_Entity_Ada_Node_List_Array_Access;
Let_Result_3 : Internal_Entity_Ada_Node_List_Array_Access;
Let_Result_4 : Internal_Entity_Ada_Node_List_Array_Access;
Let_Result_5 : Internal_Entity_Ada_Node_List_Array_Access;
            procedure Finalizer_Scope_442 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Enclosing_Scope);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Local_Private_Scope);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Local_Inner_Scope);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
            end Finalizer_Scope_442;
            procedure Finalizer_Scope_2305 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2305;
            procedure Finalizer_Scope_2306 is
            begin
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_2306;
            procedure Finalizer_Scope_2310 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_2310;
            procedure Finalizer_Scope_2311 is
            begin
                     Dec_Ref (Array_Lit_2);
            end Finalizer_Scope_2311;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2936 '<Let at nodes.lkt:5204:9>' Let_Result_5 ada/nodes.lkt:5204
--# scope-start
--# expr-start 2919 '<Cast to AdaNode.list at nodes.lkt:5205:13>' Cast_Result ada/nodes.lkt:5205
--# expr-start 2918 '<parent at nodes.lkt:5205:13>' Fld ada/nodes.lkt:5205
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2918
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Ada_Node_List_Range
   then
      Cast_Result := Create_Internal_Entity_Ada_Node_List
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Ada_Node_List;
   end if;
--# expr-done 2919
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Ada_Node_List then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 2920 '<ArrayLiteral at nodes.lkt:5205:57>' Array_Lit ada/nodes.lkt:5205
Array_Lit := Create_Internal_Entity_Ada_Node_List_Array (Internal_Internal_Entity_Ada_Node_List_Array'(1 => Var_Expr_0)); 
--# expr-done 2920
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2305;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Ada_Node_List_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Enclosing_Scope := Result_Var; Inc_Ref (Local_Enclosing_Scope);
--# bind enclosing_scope Local_Enclosing_Scope
--# expr-start 2935 '<Let at nodes.lkt:5208:9>' Let_Result_4 ada/nodes.lkt:5208
--# scope-start
--# expr-start 2922 '<Cast to PublicPart at nodes.lkt:5209:13>' Cast_Result_1 ada/nodes.lkt:5209
--# expr-start 2921 '<FieldAccess for declarative_scope at nodes.lkt:5209:13>' Fld_1 ada/nodes.lkt:5209
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld_1 := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 2921
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Public_Part_Range
   then
      Cast_Result_1 := Fld_1;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 2922
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind pp Var_Expr_1
--# expr-start 2926 '<Match at nodes.lkt:5211:17>' Match_Result ada/nodes.lkt:5211
--# expr-start 2923 '<parent at nodes.lkt:5211:23>' Fld_2 ada/nodes.lkt:5211
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_1.Parent; 
--# expr-done 2923
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_2; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Generic_Package_Internal .. Ada_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_0 := Cast_Result_2; 
--# bind pkg Match_0
--# expr-start 2924 '<FieldAccess for private_part at nodes.lkt:5212:50>' Fld_3 ada/nodes.lkt:5212
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Match_0.Base_Package_Decl_F_Private_Part;
--# expr-done 2924
Let_Result := Fld_3; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Protected_Def =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_1 := Cast_Result_3; 
--# bind ptd Match_1
--# expr-start 2925 '<FieldAccess for private_part at nodes.lkt:5213:47>' Fld_4 ada/nodes.lkt:5213
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Match_1.Protected_Def_F_Private_Part;
--# expr-done 2925
Let_Result_1 := Fld_4; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Abort_Absent .. Ada_Synthetic_Formal_Param_Decl | Ada_Discrete_Base_Subtype_Decl .. Ada_Private_Present | Ada_Protected_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix;
Match_2 := Cast_Result_4; 
--# bind _ Match_2
Let_Result_2 := No_Bare_Ada_Node; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 2926
Var_Expr_2 := Match_Result;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v2 Var_Expr_2
--# expr-start 2929 '<ArrayLiteral at nodes.lkt:5216:29>' Array_Lit_1 ada/nodes.lkt:5216
--# expr-start 2928 '<as_entity at nodes.lkt:5216:30>' If_Result ada/nodes.lkt:5216
--# expr-start 2927 '<FieldAccess for decls at nodes.lkt:5216:30>' Fld_5 ada/nodes.lkt:5216
      if Var_Expr_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Var_Expr_2.Declarative_Part_F_Decls;
--# expr-done 2927
Is_Null := Fld_5 = null; 
if Is_Null then
   If_Result := No_Entity_Ada_Node_List;
else
As_Entity := (Info => E_Info, Node => Fld_5); 
   If_Result := As_Entity;
end if;
--# expr-done 2928
Array_Lit_1 := Create_Internal_Entity_Ada_Node_List_Array (Internal_Internal_Entity_Ada_Node_List_Array'(1 => If_Result)); 
--# expr-done 2929
Scope_Result_4 := Array_Lit_1;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2310;
   Result_Var_1 := Scope_Result_4;
else
   Result_Var_1 := No_Internal_Entity_Ada_Node_List_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Scope_Result_5 := Result_Var_1;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_2306;
   Result_Var_2 := Scope_Result_5;
else
   Result_Var_2 := No_Internal_Entity_Ada_Node_List_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
Local_Private_Scope := Result_Var_2; Inc_Ref (Local_Private_Scope);
--# bind private_scope Local_Private_Scope
--# expr-start 2934 '<Let at nodes.lkt:5219:9>' Let_Result_3 ada/nodes.lkt:5219
--# scope-start
--# expr-start 2931 '<at at nodes.lkt:5219:27>' Get_Result ada/nodes.lkt:5219
--# expr-start 2930 '<FieldAccess for declarative_parts at nodes.lkt:5219:27>' Fld_6 ada/nodes.lkt:5219
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.declarative_parts'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Declarative_Parts (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2930
Get_Result := Get (Self, Fld_6, 0, True); 
--# expr-done 2931
Var_Expr_3 := Get_Result;
if Var_Expr_3 /= No_Entity_Declarative_Part then
   --# scope-start
   --# bind v3 Var_Expr_3
--# expr-start 2933 '<ArrayLiteral at nodes.lkt:5219:67>' Array_Lit_2 ada/nodes.lkt:5219
--# expr-start 2932 '<FieldAccess for decls at nodes.lkt:5219:68>' Fld_7 ada/nodes.lkt:5219
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Ada_Node_List (Node => Var_Expr_3.Node.Declarative_Part_F_Decls, Info => Var_Expr_3.Info);
--# expr-done 2932
Array_Lit_2 := Create_Internal_Entity_Ada_Node_List_Array (Internal_Internal_Entity_Ada_Node_List_Array'(1 => Fld_7)); 
--# expr-done 2933
Scope_Result_6 := Array_Lit_2;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_2311;
   Result_Var_3 := Scope_Result_6;
else
   Result_Var_3 := No_Internal_Entity_Ada_Node_List_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
Local_Inner_Scope := Result_Var_3; Inc_Ref (Local_Inner_Scope);
--# bind inner_scope Local_Inner_Scope
Concat_Result := Concat (Local_Enclosing_Scope, Local_Private_Scope); 
Concat_Result_1 := Concat (Concat_Result, Local_Inner_Scope); 
Let_Result_3 := Concat_Result_1; Inc_Ref (Let_Result_3);
--# end
--# expr-done 2934
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 2935
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 2936
         Property_Result := Let_Result_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_442;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_442;
                     Finalizer_Scope_2305;
                     Finalizer_Scope_2306;
                     Finalizer_Scope_2310;
                     Finalizer_Scope_2311;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Pragma_Regions;
--# end
--# property-start BasicDecl.get_aspect_assoc ada/nodes.lkt:5226
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_Aspect_Assoc
  (Node : Bare_Basic_Decl
      ; Name : Symbol_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Aspect_Assoc
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   Property_Result : Internal_Entity_Aspect_Assoc;
            procedure Finalizer_Scope_2313 with Inline_Always;
      Var_Expr_79 : Internal_Entity_Aspect_Spec;
Fld : Internal_Entity_Aspect_Spec;
Fld_1 : Internal_Entity_Aspect_Assoc_List;
Fld_2 : Bare_Aspect_Assoc_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Aspect_Assoc;
Bare_Item_0 : Bare_Aspect_Assoc;
Fld_4 : Internal_Entity_Name;
Fld_5 : String_Type;
Fld_6 : String_Type;
Is_Equal : Boolean;
As_Entity : Internal_Entity_Aspect_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Aspect_Assoc;
Find_Result : Internal_Entity_Aspect_Assoc;
Scope_Result : Internal_Entity_Aspect_Assoc;
Result_Var : Internal_Entity_Aspect_Assoc;
            procedure Finalizer_Scope_2313 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_2313;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2937 '<FieldAccess for get_aspect_spec at nodes.lkt:5227:9>' Fld ada/nodes.lkt:5227
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.get_aspect_spec'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Get_Aspect_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2937
Var_Expr_79 := Fld;
if Var_Expr_79 /= No_Entity_Aspect_Spec then
   --# scope-start
--# expr-start 2943 '<Find at nodes.lkt:5227:9>' Find_Result ada/nodes.lkt:5227
   --# expr-start 2938 '<FieldAccess for aspect_assocs at nodes.lkt:5227:9>' Fld_1 ada/nodes.lkt:5227
      if Var_Expr_79.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Aspect_Assoc_List (Node => Var_Expr_79.Node.Aspect_Spec_F_Aspect_Assocs, Info => Var_Expr_79.Info);
--# expr-done 2938
Fld_2 := Fld_1.Node;
      Find_Result := No_Entity_Aspect_Assoc;
      if Fld_2 = null then
      Find_Result := No_Entity_Aspect_Assoc;
      else
      declare
         Collection : constant Bare_Aspect_Assoc_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Aspect_Assoc;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind asp Item_0
      --# expr-start 2942 '<Eq at nodes.lkt:5228:22>' Is_Equal ada/nodes.lkt:5228
--# expr-start 2940 '<FieldAccess for aspect_name at nodes.lkt:5228:22>' Fld_5 ada/nodes.lkt:5228
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2939 '<FieldAccess for id at nodes.lkt:5228:38>' Fld_4 ada/nodes.lkt:5228
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Item_0.Node.Aspect_Assoc_F_Id, Info => Item_0.Info);
--# expr-done 2939
--# property-call-start AspectAssoc.aspect_name
Fld_5 := Libadalang.Implementation.Aspect_Assoc_P_Aspect_Name (Node => Item_0.Node, N => Fld_4);
--# end
--# expr-done 2940
--# expr-start 2941 '<FieldAccess for image at nodes.lkt:5228:49>' Fld_6 ada/nodes.lkt:5228
Fld_6 := Libadalang.Implementation.Image (Self => Name);
--# expr-done 2941
Is_Equal := Equivalent (Fld_5, Fld_6); 
--# expr-done 2942
      if Is_Equal then
         Find_Result := Item_0; 
      end if;
   --# end
      Finalizer_Scope_2313;
               exit when Is_Equal;
         end loop;
      end;
      end if;
--# expr-done 2943
Scope_Result := Find_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Aspect_Assoc;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2313;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_Aspect_Assoc;
--# end
--# property-start BasicDecl.get_aspect_spec_expr ada/nodes.lkt:5234
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_Aspect_Spec_Expr
  (Node : Bare_Basic_Decl
      ; Name : Symbol_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   Property_Result : Internal_Entity_Expr;
      Var_Expr_80 : Internal_Entity_Aspect_Assoc;
Fld : Internal_Entity_Aspect_Assoc;
Fld_1 : Internal_Entity_Expr;
Scope_Result : Internal_Entity_Expr;
Result_Var : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2944 '<FieldAccess for get_aspect_assoc at nodes.lkt:5235:9>' Fld ada/nodes.lkt:5235
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.get_aspect_assoc
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect_Assoc (Node => Ent.Node, Name => Name, E_Info => Ent.Info);
--# end
--# expr-done 2944
Var_Expr_80 := Fld;
if Var_Expr_80 /= No_Entity_Aspect_Assoc then
   --# scope-start
--# expr-start 2945 '<FieldAccess for expr at nodes.lkt:5235:9>' Fld_1 ada/nodes.lkt:5235
      if Var_Expr_80.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Expr (Node => Var_Expr_80.Node.Aspect_Assoc_F_Expr, Info => Var_Expr_80.Info);
--# expr-done 2945
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Expr;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_Aspect_Spec_Expr;
--# end
--# property-start BasicDecl.library_item_pragmas ada/nodes.lkt:5238
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Library_Item_Pragmas
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Pragma_Node_List
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Pragma_Node_List;
      Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Compilation_Unit;
Fld_2 : Internal_Entity_Pragma_Node_List;
Fld_3 : Internal_Entity;
Fld_4 : Internal_Entity;
Fld_5 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Compilation_Unit;
Fld_6 : Internal_Entity_Pragma_Node_List;
Fld_7 : Internal_Entity;
Fld_8 : Internal_Entity;
Is_A : Boolean;
If_Result : Internal_Entity_Pragma_Node_List;
Fld_9 : Internal_Entity;
Is_A_1 : Boolean;
If_Result_1 : Internal_Entity_Pragma_Node_List;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 2961 '<If at nodes.lkt:5239:9>' If_Result_1 ada/nodes.lkt:5239
--# expr-start 2947 '<IsA LibraryItem at nodes.lkt:5239:12>' Is_A_1 ada/nodes.lkt:5239
--# expr-start 2946 '<parent at nodes.lkt:5239:12>' Fld_9 ada/nodes.lkt:5239
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2946
Is_A_1 := Fld_9.Node /= null 
and then Fld_9.Node.Kind in Ada_Library_Item_Range; 
--# expr-done 2947
if Is_A_1 then
   --# expr-start 2951 '<FieldAccess for pragmas at nodes.lkt:5240:14>' Fld_2 ada/nodes.lkt:5240
--# expr-start 2950 '<Cast to CompilationUnit at nodes.lkt:5240:14>' Cast_Result ada/nodes.lkt:5240
--# expr-start 2949 '<parent at nodes.lkt:5240:14>' Fld_1 ada/nodes.lkt:5240
--# expr-start 2948 '<parent at nodes.lkt:5240:14>' Fld ada/nodes.lkt:5240
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2948
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 2949
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Create_Internal_Entity_Compilation_Unit
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Compilation_Unit;
   end if;
--# expr-done 2950
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Pragma_Node_List (Node => Cast_Result.Node.Compilation_Unit_F_Pragmas, Info => Cast_Result.Info);
--# expr-done 2951
   If_Result_1 := Fld_2;
else
   --# expr-start 2960 '<If at nodes.lkt:5239:9>' If_Result ada/nodes.lkt:5239
--# expr-start 2954 '<IsA LibraryItem at nodes.lkt:5241:14>' Is_A ada/nodes.lkt:5241
--# expr-start 2953 '<parent at nodes.lkt:5241:14>' Fld_8 ada/nodes.lkt:5241
--# expr-start 2952 '<parent at nodes.lkt:5241:14>' Fld_7 ada/nodes.lkt:5241
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2952
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Parent (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# expr-done 2953
Is_A := Fld_8.Node /= null 
and then Fld_8.Node.Kind in Ada_Library_Item_Range; 
--# expr-done 2954
if Is_A then
   --# expr-start 2959 '<FieldAccess for pragmas at nodes.lkt:5242:14>' Fld_6 ada/nodes.lkt:5242
--# expr-start 2958 '<Cast to CompilationUnit at nodes.lkt:5242:14>' Cast_Result_1 ada/nodes.lkt:5242
--# expr-start 2957 '<parent at nodes.lkt:5242:14>' Fld_5 ada/nodes.lkt:5242
--# expr-start 2956 '<parent at nodes.lkt:5242:14>' Fld_4 ada/nodes.lkt:5242
--# expr-start 2955 '<parent at nodes.lkt:5242:14>' Fld_3 ada/nodes.lkt:5242
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 2955
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Parent (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# expr-done 2956
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Parent (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# expr-done 2957
   if Fld_5.Node = null
      or else Fld_5.Node.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Compilation_Unit
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   else
         Cast_Result_1 := No_Entity_Compilation_Unit;
   end if;
--# expr-done 2958
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Pragma_Node_List (Node => Cast_Result_1.Node.Compilation_Unit_F_Pragmas, Info => Cast_Result_1.Info);
--# expr-done 2959
   If_Result := Fld_6;
else
   If_Result := No_Entity_Pragma_Node_List;
end if;
--# expr-done 2960
   If_Result_1 := If_Result;
end if;
--# expr-done 2961
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Library_Item_Pragmas;
--# end
--# property-start BasicDecl.get_aspect ada/nodes.lkt:5253
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_Aspect
  (Node : Bare_Basic_Decl
      ; Name : Symbol_Type
      ; Previous_Parts_Only : Boolean
         := False
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind previous_parts_only Previous_Parts_Only
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Aspect;
      Var_Expr_81 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Aspect;
Scope_Result : Internal_Aspect;
Result_Var : Internal_Aspect;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2962 '<FieldAccess for defining_name_or_raise at nodes.lkt:5254:9>' Fld ada/nodes.lkt:5254
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2962
Var_Expr_81 := Fld;
if Var_Expr_81 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 2963 '<FieldAccess for get_aspect at nodes.lkt:5254:9>' Fld_1 ada/nodes.lkt:5254
      if Var_Expr_81.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_aspect
Fld_1 := Libadalang.Implementation.Defining_Name_P_Get_Aspect (Node => Var_Expr_81.Node, Name => Name, Previous_Parts_Only => Previous_Parts_Only, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_81.Info);
--# end
--# expr-done 2963
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Aspect;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_Aspect;
--# end
--# property-start BasicDecl.has_aspect ada/nodes.lkt:5265
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Has_Aspect
  (Node : Bare_Basic_Decl
      ; Name : Symbol_Type
      ; Previous_Parts_Only : Boolean
         := False
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind previous_parts_only Previous_Parts_Only
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Var_Expr_82 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2964 '<FieldAccess for defining_name_or_raise at nodes.lkt:5266:9>' Fld ada/nodes.lkt:5266
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2964
Var_Expr_82 := Fld;
if Var_Expr_82 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 2965 '<FieldAccess for has_aspect at nodes.lkt:5266:9>' Fld_1 ada/nodes.lkt:5266
      if Var_Expr_82.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.has_aspect
Fld_1 := Libadalang.Implementation.Defining_Name_P_Has_Aspect (Node => Var_Expr_82.Node, Name => Name, Previous_Parts_Only => Previous_Parts_Only, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_82.Info);
--# end
--# expr-done 2965
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Has_Aspect;
--# end
--# property-start BasicDecl.get_pragma ada/nodes.lkt:5274
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_Pragma
  (Node : Bare_Basic_Decl
      ; Name : Symbol_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Pragma_Node
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   Property_Result : Internal_Entity_Pragma_Node;
      Var_Expr_83 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Pragma_Node;
Scope_Result : Internal_Entity_Pragma_Node;
Result_Var : Internal_Entity_Pragma_Node;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2966 '<FieldAccess for defining_name_or_raise at nodes.lkt:5275:9>' Fld ada/nodes.lkt:5275
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2966
Var_Expr_83 := Fld;
if Var_Expr_83 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 2967 '<FieldAccess for get_pragma at nodes.lkt:5275:9>' Fld_1 ada/nodes.lkt:5275
      if Var_Expr_83.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_pragma
Fld_1 := Libadalang.Implementation.Defining_Name_P_Get_Pragma (Node => Var_Expr_83.Node, Name => Name, E_Info => Var_Expr_83.Info);
--# end
--# expr-done 2967
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Pragma_Node;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_Pragma;
--# end
--# property-start BasicDecl.get_representation_clause ada/nodes.lkt:5281
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_Representation_Clause
  (Node : Bare_Basic_Decl
      ; Name : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Attribute_Def_Clause
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Attribute_Def_Clause;
      Var_Expr_84 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Attribute_Def_Clause;
Scope_Result : Internal_Entity_Attribute_Def_Clause;
Result_Var : Internal_Entity_Attribute_Def_Clause;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2968 '<FieldAccess for defining_name_or_raise at nodes.lkt:5282:9>' Fld ada/nodes.lkt:5282
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2968
Var_Expr_84 := Fld;
if Var_Expr_84 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 2969 '<FieldAccess for get_representation_clause at nodes.lkt:5282:9>' Fld_1 ada/nodes.lkt:5282
      if Var_Expr_84.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_representation_clause
Fld_1 := Libadalang.Implementation.Defining_Name_P_Get_Representation_Clause (Node => Var_Expr_84.Node, Name => Name, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_84.Info);
--# end
--# expr-done 2969
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Attribute_Def_Clause;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_Representation_Clause;
--# end
--# property-start BasicDecl.get_at_clause ada/nodes.lkt:5287
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_At_Clause
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_At_Clause
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_At_Clause;
      Var_Expr_85 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_At_Clause;
Scope_Result : Internal_Entity_At_Clause;
Result_Var : Internal_Entity_At_Clause;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2970 '<FieldAccess for defining_name_or_raise at nodes.lkt:5288:9>' Fld ada/nodes.lkt:5288
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2970
Var_Expr_85 := Fld;
if Var_Expr_85 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 2971 '<FieldAccess for get_at_clause at nodes.lkt:5288:9>' Fld_1 ada/nodes.lkt:5288
      if Var_Expr_85.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_at_clause
Fld_1 := Libadalang.Implementation.Defining_Name_P_Get_At_Clause (Node => Var_Expr_85.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_85.Info);
--# end
--# expr-done 2971
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_At_Clause;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_At_Clause;
--# end
--# property-start BasicDecl.get_annotations ada/nodes.lkt:5297
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_Annotations
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Aspect_Array_Access;
            procedure Finalizer_Scope_451 with Inline_Always;
            procedure Finalizer_Scope_2320 with Inline_Always;
      Var_Expr_86 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Aspect_Array_Access;
Scope_Result : Internal_Aspect_Array_Access;
Result_Var : Internal_Aspect_Array_Access;
            procedure Finalizer_Scope_451 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_451;
            procedure Finalizer_Scope_2320 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2320;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2972 '<FieldAccess for defining_name_or_raise at nodes.lkt:5298:9>' Fld ada/nodes.lkt:5298
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2972
Var_Expr_86 := Fld;
if Var_Expr_86 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 2973 '<FieldAccess for get_annotations at nodes.lkt:5298:9>' Fld_1 ada/nodes.lkt:5298
      if Var_Expr_86.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_annotations
Fld_1 := Libadalang.Implementation.Defining_Name_P_Get_Annotations (Node => Var_Expr_86.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_86.Info);
--# end
--# expr-done 2973
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2320;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Aspect_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_451;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_451;
                     Finalizer_Scope_2320;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_Annotations;
--# end
--# property-start BasicDecl.is_ghost_code ada/nodes.lkt:5302
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Ghost_Code
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_87 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 2974 '<FieldAccess for defining_name_or_raise at nodes.lkt:5302:33>' Fld ada/nodes.lkt:5302
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 2974
Var_Expr_87 := Fld;
if Var_Expr_87 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 2975 '<FieldAccess for is_ghost_code at nodes.lkt:5302:33>' Fld_1 ada/nodes.lkt:5302
      if Var_Expr_87.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.is_ghost_code
Fld_1 := Libadalang.Implementation.Defining_Name_P_Is_Ghost_Code (Node => Var_Expr_87.Node, E_Info => Var_Expr_87.Info);
--# end
--# expr-done 2975
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Ghost_Code;
--# end
--# property-start BasicDecl.get_instantiation ada/nodes.lkt:5313
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_Instantiation
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Generic_Instantiation
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Generic_Instantiation;
            procedure Finalizer_Scope_2322 with Inline_Always;
      Local_Inst_Node : Bare_Generic_Instantiation;
Var_Expr_0 : Env_Rebindings;
Local_Designated_Decl : Internal_Entity_Generic_Decl;
Var_Expr_88 : Internal_Entity_Generic_Instantiation;
Fld : Internal_Entity_Info;
Fld_1 : Env_Rebindings;
Fld_2 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Cast_Result : Bare_Generic_Instantiation;
Scope_Result : Bare_Generic_Instantiation;
Result_Var : Bare_Generic_Instantiation;
As_Entity : Internal_Entity_Generic_Instantiation;
Is_Null : Boolean;
If_Result : Internal_Entity_Generic_Instantiation;
Fld_3 : Internal_Entity_Generic_Decl;
Scope_Result_1 : Internal_Entity_Generic_Decl;
Result_Var_1 : Internal_Entity_Generic_Decl;
New_Struct : Internal_Metadata;
Fld_4 : Internal_Entity_Info;
Fld_5 : Env_Rebindings;
Fld_6 : Internal_Entity_Info;
Fld_7 : Env_Rebindings;
Fld_8 : Env_Rebindings;
Fld_9 : Internal_Entity_Info;
Fld_10 : Boolean;
New_Struct_1 : Internal_Entity_Info;
New_Struct_2 : Internal_Entity_Generic_Instantiation;
Fld_11 : Bare_Generic_Decl;
Fld_12 : Bare_Ada_Node;
Cast_Result_1 : Bare_Ada_Node;
Is_Equal : Boolean;
If_Result_1 : Internal_Entity_Generic_Instantiation;
Let_Result : Internal_Entity_Generic_Instantiation;
Let_Result_1 : Internal_Entity_Generic_Instantiation;
            procedure Finalizer_Scope_2322 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2322;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 2998 '<Let at nodes.lkt:5314:9>' Let_Result_1 ada/nodes.lkt:5314
--# scope-start
--# expr-start 2977 '<FieldAccess for rebindings at nodes.lkt:5315:13>' Fld_1 ada/nodes.lkt:5315
--# expr-start 2976 '<FieldAccess for info at nodes.lkt:5315:13>' Fld ada/nodes.lkt:5315
Fld := Ent.Info;
--# expr-done 2976
Fld_1 := Fld.Rebindings;
--# expr-done 2977
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= null then
   --# scope-start
   --# bind r Var_Expr_0
--# expr-start 2980 '<Cast to GenericInstantiation at nodes.lkt:5316:24>' Cast_Result ada/nodes.lkt:5316
--# expr-start 2979 '<env_node at nodes.lkt:5316:24>' Env_Node ada/nodes.lkt:5316
--# expr-start 2978 '<FieldAccess for new_env at nodes.lkt:5316:24>' Fld_2 ada/nodes.lkt:5316
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_0.New_Env;
Inc_Ref (Fld_2);
--# expr-done 2978
Env_Node := AST_Envs.Env_Node (Fld_2); 
--# expr-done 2979
   if Env_Node = null
      or else Env_Node.Kind in Ada_Generic_Instantiation
   then
      Cast_Result := Env_Node;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 2980
Scope_Result := Cast_Result;
   --# end
      Finalizer_Scope_2322;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
Local_Inst_Node := Result_Var; 
--# bind inst_node Local_Inst_Node
--# expr-start 2997 '<Let at nodes.lkt:5318:9>' Let_Result ada/nodes.lkt:5318
--# scope-start
--# expr-start 2981 '<as_bare_entity at nodes.lkt:5319:13>' If_Result ada/nodes.lkt:5319
Is_Null := Local_Inst_Node = null; 
if Is_Null then
   If_Result := No_Entity_Generic_Instantiation;
else
As_Entity := (Info => No_Entity_Info, Node => Local_Inst_Node); 
   If_Result := As_Entity;
end if;
--# expr-done 2981
Var_Expr_88 := If_Result;
if Var_Expr_88 /= No_Entity_Generic_Instantiation then
   --# scope-start
--# expr-start 2982 '<FieldAccess for designated_generic_decl at nodes.lkt:5319:13>' Fld_3 ada/nodes.lkt:5319
      if Var_Expr_88.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.designated_generic_decl'
Fld_3 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Designated_Generic_Decl (Node => Var_Expr_88.Node, E_Info => Var_Expr_88.Info);
--# end
--# expr-done 2982
Scope_Result_1 := Fld_3;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Generic_Decl;
end if;
Local_Designated_Decl := Result_Var_1; 
--# bind designated_decl Local_Designated_Decl
--# expr-start 2996 '<If at nodes.lkt:5321:9>' If_Result_1 ada/nodes.lkt:5321
--# expr-start 2985 '<Eq at nodes.lkt:5321:12>' Is_Equal ada/nodes.lkt:5321
--# expr-start 2983 '<FieldAccess for node at nodes.lkt:5321:12>' Fld_11 ada/nodes.lkt:5321
Fld_11 := Local_Designated_Decl.Node;
--# expr-done 2983
      Cast_Result_1 := Fld_11;
--# expr-start 2984 '<parent at nodes.lkt:5321:36>' Fld_12 ada/nodes.lkt:5321
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Self.Parent; 
--# expr-done 2984
Is_Equal := Cast_Result_1 = Fld_12; 
--# expr-done 2985
if Is_Equal then
   --# expr-start 2995 '<New GenericInstantiation.entity at nodes.lkt:5323:13>' New_Struct_2 ada/nodes.lkt:5323
--# expr-start 2994 '<New EntityInfo at nodes.lkt:5325:22>' New_Struct_1 ada/nodes.lkt:5325
--# expr-start 2987 '<FieldAccess for from_rebound at nodes.lkt:5333:34>' Fld_10 ada/nodes.lkt:5333
--# expr-start 2986 '<FieldAccess for info at nodes.lkt:5333:34>' Fld_9 ada/nodes.lkt:5333
Fld_9 := Ent.Info;
--# expr-done 2986
Fld_10 := Fld_9.From_Rebound;
--# expr-done 2987
--# expr-start 2988 '<New Metadata at nodes.lkt:5326:24>' New_Struct ada/nodes.lkt:5326
New_Struct := (Dottable_Subp => False, Primitive => No_Bare_Ada_Node, Primitive_Real_Type => No_Bare_Ada_Node); 
--# expr-done 2988
--# expr-start 2993 '<FieldAccess for remove_rebindings at nodes.lkt:5329:32>' Fld_8 ada/nodes.lkt:5329
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 2990 '<FieldAccess for rebindings at nodes.lkt:5330:25>' Fld_5 ada/nodes.lkt:5330
--# expr-start 2989 '<FieldAccess for info at nodes.lkt:5330:25>' Fld_4 ada/nodes.lkt:5330
Fld_4 := Ent.Info;
--# expr-done 2989
Fld_5 := Fld_4.Rebindings;
--# expr-done 2990
--# expr-start 2992 '<FieldAccess for rebindings at nodes.lkt:5331:25>' Fld_7 ada/nodes.lkt:5331
--# expr-start 2991 '<FieldAccess for info at nodes.lkt:5331:25>' Fld_6 ada/nodes.lkt:5331
Fld_6 := Local_Designated_Decl.Info;
--# expr-done 2991
Fld_7 := Fld_6.Rebindings;
--# expr-done 2992
--# property-call-start AdaNode.remove_rebindings
Fld_8 := Libadalang.Implementation.Ada_Node_P_Remove_Rebindings (Node => Self, Base => Fld_5, Suffix => Fld_7);
--# end
--# expr-done 2993
New_Struct_1 := (From_Rebound => Fld_10, Md => New_Struct, Rebindings => Fld_8); 
--# expr-done 2994
New_Struct_2 := (Info => New_Struct_1, Node => Local_Inst_Node); 
--# expr-done 2995
   If_Result_1 := New_Struct_2;
else
   If_Result_1 := No_Entity_Generic_Instantiation;
end if;
--# expr-done 2996
Let_Result := If_Result_1; 
--# end
--# expr-done 2997
Let_Result_1 := Let_Result; 
--# end
--# expr-done 2998
         Property_Result := Let_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2322;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_Instantiation;
--# end
--# property-start BasicDecl.is_compilation_unit_root ada/nodes.lkt:5341
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Compilation_Unit_Root
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Var_Expr_0 : Bare_Ada_Node;
Match_0 : Bare_Library_Item;
Match_1 : Bare_Generic_Package_Decl;
Var_Expr_1 : Bare_Ada_Node;
Match_2 : Bare_Subunit;
Match_3 : Bare_Ada_Node;
Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Is_A : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Match_Prefix : Bare_Ada_Node;
Cast_Result : Bare_Library_Item;
Let_Result : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_1 : Bare_Generic_Package_Decl;
Let_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Cast_Result_2 : Bare_Subunit;
Let_Result_2 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_3 : Bare_Ada_Node;
Let_Result_3 : Boolean;
Scope_Result_4 : Boolean;
Match_Result : Boolean;
Scope_Result_5 : Boolean;
Result_Var_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 2999 '<parent at nodes.lkt:5342:9>' Fld ada/nodes.lkt:5342
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 2999
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 3002 '<Match at nodes.lkt:5344:13>' Match_Result ada/nodes.lkt:5344
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Library_Item =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind _ Match_0
Let_Result := True; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Generic_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind gen_pkg_decl Match_1
--# expr-start 3000 '<parent at nodes.lkt:5347:21>' Fld_1 ada/nodes.lkt:5347
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Match_1.Parent; 
--# expr-done 3000
Var_Expr_1 := Fld_1;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind p Var_Expr_1
--# expr-start 3001 '<IsA LibraryItem at nodes.lkt:5347:51>' Is_A ada/nodes.lkt:5347
Is_A := Var_Expr_1 /= null 
and then Var_Expr_1.Kind in Ada_Library_Item_Range; 
--# expr-done 3001
Scope_Result := Is_A;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Let_Result_1 := Result_Var; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Subunit =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := True; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Abort_Absent .. Ada_For_Loop_Var_Decl | Ada_Generic_Subp_Decl .. Ada_Iter_Type_Of | Ada_Limited_Absent .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_3 := Cast_Result_3; 
--# bind _ Match_3
Let_Result_3 := False; 
--# end
Scope_Result_4 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_4; 
end case;
--# expr-done 3002
Scope_Result_5 := Match_Result;
   --# end
   Result_Var_1 := Scope_Result_5;
else
   Result_Var_1 := False;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Compilation_Unit_Root;
--# end
--# property-start BasicDecl.populate_dependent_units ada/nodes.lkt:5353
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Populate_Dependent_Units
  (Node : Bare_Basic_Decl
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_455 with Inline_Always;
      Fld : Bare_Name_Array_Access;
Fld_1 : Bare_Compilation_Unit;
Map_Result : Bare_Compilation_Unit_Array_Access;
Fld_2 : Boolean;
If_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_455 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_455;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3007 '<If at nodes.lkt:5354:9>' If_Result ada/nodes.lkt:5354
--# expr-start 3003 '<FieldAccess for is_compilation_unit_root at nodes.lkt:5354:12>' Fld_2 ada/nodes.lkt:5354
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Self);
--# end
--# expr-done 3003
if Fld_2 then
   --# expr-start 3006 '<Map at nodes.lkt:5356:13>' Map_Result ada/nodes.lkt:5356
   --# expr-start 3004 '<FieldAccess for top_level_with_package_clauses at nodes.lkt:5356:13>' Fld ada/nodes.lkt:5356
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_with_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_With_Package_Clauses (Node => Self);
--# end
--# expr-done 3004
      declare
         Map_Result_Vec : Bare_Compilation_Unit_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Name_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind package_name Item_0
      --# expr-start 3005 '<FieldAccess for withed_unit_helper at nodes.lkt:5357:35>' Fld_1 ada/nodes.lkt:5357
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.withed_unit_helper
Fld_1 := Libadalang.Implementation.Ada_Node_P_Withed_Unit_Helper (Node => Self, Unit_Name => Item_0);
--# end
--# expr-done 3005
         declare
            Item_To_Append : constant Bare_Compilation_Unit := Fld_1;
         begin
            Bare_Compilation_Unit_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Bare_Compilation_Unit_Array
           (Items_Count => Natural (Bare_Compilation_Unit_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Compilation_Unit_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Compilation_Unit_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Compilation_Unit_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3006
   If_Result := Map_Result;
else
   If_Result := No_Bare_Compilation_Unit_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 3007
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_455;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_455;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Populate_Dependent_Units;
--# end
--# property-start BasicDecl.should_ref_generic_formals ada/nodes.lkt:5363
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Should_Ref_Generic_Formals
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
Not_Val : Boolean;
Fld_1 : Bare_Ada_Node;
Is_A : Boolean;
If_Result : Boolean;
Is_A_1 : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3014 '<BooleanBinaryOp Or at nodes.lkt:5371:9>' If_Result_1 ada/nodes.lkt:5371
--# expr-start 3012 '<BooleanBinaryOp Or at nodes.lkt:5371:9>' If_Result ada/nodes.lkt:5371
--# expr-start 3009 '<Not at nodes.lkt:5371:9>' Not_Val ada/nodes.lkt:5371
--# expr-start 3008 '<FieldAccess for is_compilation_unit_root at nodes.lkt:5371:13>' Fld ada/nodes.lkt:5371
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Self);
--# end
--# expr-done 3008
Not_Val := not (Fld); 
--# expr-done 3009
if Not_Val then
   If_Result := True;
else
   --# expr-start 3011 '<IsA Subunit at nodes.lkt:5376:12>' Is_A ada/nodes.lkt:5376
--# expr-start 3010 '<parent at nodes.lkt:5376:12>' Fld_1 ada/nodes.lkt:5376
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Parent; 
--# expr-done 3010
Is_A := Fld_1 /= null 
and then Fld_1.Kind in Ada_Subunit_Range; 
--# expr-done 3011
   If_Result := Is_A;
end if;
--# expr-done 3012
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 3013 '<IsA BaseSubpBody at nodes.lkt:5381:12>' Is_A_1 ada/nodes.lkt:5381
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Base_Subp_Body; 
--# expr-done 3013
   If_Result_1 := Is_A_1;
end if;
--# expr-done 3014
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Should_Ref_Generic_Formals;
--# end
--# property-start BasicDecl.is_directly_reachable ada/nodes.lkt:5385
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Directly_Reachable
  (Node : Bare_Basic_Decl
      ; Origin : Internal_Entity
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_457 with Inline_Always;
      Fld : Bare_Ada_Node;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
            procedure Finalizer_Scope_457 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Env_Get_Result);
            end Finalizer_Scope_457;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3021 '<Contains at nodes.lkt:5386:9>' Quantifier_Result ada/nodes.lkt:5386
   --# expr-start 3018 '<EnvGet at nodes.lkt:5386:9>' Env_Get_Result ada/nodes.lkt:5386
--# expr-start 3016 '<FieldAccess for node_env at nodes.lkt:5386:9>' Fld_1 ada/nodes.lkt:5386
--# expr-start 3015 '<FieldAccess for node at nodes.lkt:5386:9>' Fld ada/nodes.lkt:5386
Fld := Origin.Node;
--# expr-done 3015
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Node_Env (Node => Fld);
--# expr-done 3016
--# expr-start 3017 '<FieldAccess for name_symbol at nodes.lkt:5387:13>' Fld_2 ada/nodes.lkt:5387
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 3017
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_1, Key => Thin (Fld_2), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 3018
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_8 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_8
      --# expr-start 3020 '<Eq at ???>' Is_Equiv None
--# expr-start 3019 '<as_bare_entity at nodes.lkt:5390:19>' If_Result ada/nodes.lkt:5390
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 3019
      Cast_Result := Create_Internal_Entity
        (Node => If_Result.Node,
         Info => If_Result.Info);
Is_Equiv := Equivalent (Item_8, Cast_Result); 
--# expr-done 3020
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 3021
         Property_Result := Quantifier_Result;
   --# end
      Finalizer_Scope_457;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_457;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Directly_Reachable;
--# end
--# property-start BasicDecl.is_visible ada/nodes.lkt:5400
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Visible
  (Node : Bare_Basic_Decl
      ; From_Node : Internal_Entity
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind from_node From_Node
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity;
Var_Expr_89 : Internal_Entity_Body_Node;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
Fld_2 : Boolean;
Fld_3 : Bare_Compilation_Unit;
Fld_4 : Bare_Ada_Node;
Fld_5 : Boolean;
If_Result : Boolean;
Fld_6 : Boolean;
Fld_7 : Internal_Entity_Basic_Decl;
Fld_8 : Boolean;
If_Result_1 : Boolean;
Fld_9 : Boolean;
Fld_10 : Internal_Entity;
Fld_11 : Internal_Entity;
Is_A : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result_2 : Boolean;
Fld_12 : Boolean;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Body_Node;
Fld_13 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Not_Val : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Boolean;
Fld_14 : Boolean;
Fld_15 : Internal_Entity;
Is_A_1 : Boolean;
If_Result_5 : Boolean;
If_Result_6 : Boolean;
Fld_16 : Boolean;
If_Result_7 : Boolean;
Is_A_2 : Boolean;
If_Result_8 : Boolean;
Fld_17 : Internal_Entity_Info;
Fld_18 : Boolean;
If_Result_9 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3056 '<If at nodes.lkt:5403:9>' If_Result_9 ada/nodes.lkt:5403
--# expr-start 3023 '<FieldAccess for from_rebound at nodes.lkt:5403:12>' Fld_18 ada/nodes.lkt:5403
--# expr-start 3022 '<FieldAccess for info at nodes.lkt:5403:12>' Fld_17 ada/nodes.lkt:5403
Fld_17 := Ent.Info;
--# expr-done 3022
Fld_18 := Fld_17.From_Rebound;
--# expr-done 3023
if Fld_18 then
   If_Result_9 := True;
else
   --# expr-start 3055 '<If at nodes.lkt:5403:9>' If_Result_8 ada/nodes.lkt:5403
--# expr-start 3024 '<IsA ClasswideTypeDecl, DiscreteBaseSubtypeDecl at nodes.lkt:5407:14>' Is_A_2 ada/nodes.lkt:5407
Is_A_2 := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Classwide_Type_Decl_Range | Ada_Discrete_Base_Subtype_Decl_Range; 
--# expr-done 3024
if Is_A_2 then
   --# expr-start 3027 '<FieldAccess for is_visible at nodes.lkt:5408:14>' Fld_1 ada/nodes.lkt:5408
--# expr-start 3026 '<Cast to BaseTypeDecl at nodes.lkt:5408:14>' Cast_Result ada/nodes.lkt:5408
--# expr-start 3025 '<parent at nodes.lkt:5408:14>' Fld ada/nodes.lkt:5408
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 3025
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 3026
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_visible
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Is_Visible (Node => Cast_Result.Node, From_Node => From_Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 3027
   If_Result_8 := Fld_1;
else
   --# expr-start 3054 '<If at nodes.lkt:5403:9>' If_Result_7 ada/nodes.lkt:5403
--# expr-start 3028 '<FieldAccess for is_in_private_part at nodes.lkt:5412:14>' Fld_16 ada/nodes.lkt:5412
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_16 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3028
if Fld_16 then
   --# expr-start 3033 '<BooleanBinaryOp And at nodes.lkt:5414:13>' If_Result ada/nodes.lkt:5414
--# expr-start 3029 '<FieldAccess for is_directly_reachable at nodes.lkt:5414:13>' Fld_2 ada/nodes.lkt:5414
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_directly_reachable
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Is_Directly_Reachable (Node => Self, Origin => From_Node);
--# end
--# expr-done 3029
if Fld_2 then
   --# expr-start 3032 '<FieldAccess for has_private_view at nodes.lkt:5423:17>' Fld_5 ada/nodes.lkt:5423
--# expr-start 3030 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:5423:17>' Fld_3 ada/nodes.lkt:5423
      if From_Node.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld_3 := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => From_Node.Node);
--# end
--# expr-done 3030
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3031 '<FieldAccess for node at nodes.lkt:5424:21>' Fld_4 ada/nodes.lkt:5424
Fld_4 := From_Node.Node;
--# expr-done 3031
--# property-call-start CompilationUnit.has_private_view
Fld_5 := Libadalang.Implementation.Compilation_Unit_P_Has_Private_View (Node => Fld_3, Origin => Fld_4);
--# end
--# expr-done 3032
   If_Result := Fld_5;
else
   If_Result := False;
end if;
--# expr-done 3033
   If_Result_7 := If_Result;
else
   --# expr-start 3053 '<If at nodes.lkt:5403:9>' If_Result_6 ada/nodes.lkt:5403
--# expr-start 3037 '<BooleanBinaryOp Or at nodes.lkt:5431:14>' If_Result_5 ada/nodes.lkt:5431
--# expr-start 3034 '<FieldAccess for is_in_public_part at nodes.lkt:5431:14>' Fld_14 ada/nodes.lkt:5431
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_public_part'
Fld_14 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Public_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3034
if Fld_14 then
   If_Result_5 := True;
else
   --# expr-start 3036 '<IsA GenericFormalPackage at nodes.lkt:5431:42>' Is_A_1 ada/nodes.lkt:5431
--# expr-start 3035 '<parent at nodes.lkt:5431:42>' Fld_15 ada/nodes.lkt:5431
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 3035
Is_A_1 := Fld_15.Node /= null 
and then Fld_15.Node.Kind in Ada_Generic_Formal_Package_Range; 
--# expr-done 3036
   If_Result_5 := Is_A_1;
end if;
--# expr-done 3037
if If_Result_5 then
   --# expr-start 3041 '<BooleanBinaryOp Or at nodes.lkt:5433:13>' If_Result_1 ada/nodes.lkt:5433
--# expr-start 3038 '<FieldAccess for is_directly_reachable at nodes.lkt:5433:13>' Fld_6 ada/nodes.lkt:5433
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_directly_reachable
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Is_Directly_Reachable (Node => Self, Origin => From_Node);
--# end
--# expr-done 3038
if Fld_6 then
   If_Result_1 := True;
else
   --# expr-start 3040 '<FieldAccess for is_visible at nodes.lkt:5434:16>' Fld_8 ada/nodes.lkt:5434
--# expr-start 3039 '<FieldAccess for parent_basic_decl at nodes.lkt:5434:16>' Fld_7 ada/nodes.lkt:5434
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_7 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3039
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_visible
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Is_Visible (Node => Fld_7.Node, From_Node => From_Node, E_Info => Fld_7.Info);
--# end
--# expr-done 3040
   If_Result_1 := Fld_8;
end if;
--# expr-done 3041
   If_Result_6 := If_Result_1;
else
   --# expr-start 3052 '<If at nodes.lkt:5403:9>' If_Result_4 ada/nodes.lkt:5403
--# expr-start 3046 '<BooleanBinaryOp And at nodes.lkt:5439:13>' If_Result_3 ada/nodes.lkt:5439
--# expr-start 3042 '<FieldAccess for is_compilation_unit_root at nodes.lkt:5439:13>' Fld_12 ada/nodes.lkt:5439
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Ent.Node);
--# end
--# expr-done 3042
if Fld_12 then
   --# expr-start 3045 '<Not at nodes.lkt:5439:49>' Not_Val ada/nodes.lkt:5439
--# expr-start 3043 '<Cast to Body at nodes.lkt:5439:53>' Cast_Result_1 ada/nodes.lkt:5439
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Body_Node
   then
      Cast_Result_1 := Create_Internal_Entity_Body_Node
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Body_Node;
   end if;
--# expr-done 3043
Var_Expr_89 := Cast_Result_1;
if Var_Expr_89 /= No_Entity_Body_Node then
   --# scope-start
--# expr-start 3044 '<FieldAccess for is_subunit at nodes.lkt:5439:53>' Fld_13 ada/nodes.lkt:5439
      if Var_Expr_89.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.is_subunit
Fld_13 := Libadalang.Implementation.Body_Node_P_Is_Subunit (Node => Var_Expr_89.Node);
--# end
--# expr-done 3044
Scope_Result_1 := Fld_13;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Not_Val := not (Result_Var_1); 
--# expr-done 3045
   If_Result_3 := Not_Val;
else
   If_Result_3 := False;
end if;
--# expr-done 3046
if If_Result_3 then
   If_Result_4 := True;
else
   --# expr-start 3051 '<If at nodes.lkt:5403:9>' If_Result_2 ada/nodes.lkt:5403
--# expr-start 3047 '<parent at nodes.lkt:5444:14>' Fld_10 ada/nodes.lkt:5444
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 3047
Var_Expr_0 := Fld_10;
if Var_Expr_0 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 3049 '<IsA DeclarativePart at nodes.lkt:5444:37>' Is_A ada/nodes.lkt:5444
--# expr-start 3048 '<parent at nodes.lkt:5444:37>' Fld_11 ada/nodes.lkt:5444
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Parent (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 3048
Is_A := Fld_11.Node /= null 
and then Fld_11.Node.Kind in Ada_Declarative_Part_Range; 
--# expr-done 3049
Scope_Result := Is_A;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   --# expr-start 3050 '<FieldAccess for is_directly_reachable at nodes.lkt:5445:14>' Fld_9 ada/nodes.lkt:5445
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_directly_reachable
Fld_9 := Libadalang.Implementation.Basic_Decl_P_Is_Directly_Reachable (Node => Self, Origin => From_Node);
--# end
--# expr-done 3050
   If_Result_2 := Fld_9;
else
   If_Result_2 := raise Property_Error with "Only package-level declaration support visibility checks for" & Character'Val (10)
 & "now.""" & Character'Val (10)
;
end if;
--# expr-done 3051
   If_Result_4 := If_Result_2;
end if;
--# expr-done 3052
   If_Result_6 := If_Result_4;
end if;
--# expr-done 3053
   If_Result_7 := If_Result_6;
end if;
--# expr-done 3054
   If_Result_8 := If_Result_7;
end if;
--# expr-done 3055
   If_Result_9 := If_Result_8;
end if;
--# expr-done 3056
         Property_Result := If_Result_9;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Visible;
--# end
--# property-start BasicDecl.subp_decl_match_signature ada/nodes.lkt:5454
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Subp_Decl_Match_Signature
  (Node : Bare_Basic_Decl
      ; Other : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Subp_Spec;
Cast_Result : Internal_Entity_Subp_Spec;
Cast_Result_1 : Internal_Entity_Base_Subp_Spec;
Fld_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3057 '<FieldAccess for subp_spec_or_null at nodes.lkt:5455:9>' Fld ada/nodes.lkt:5455
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3057
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 3060 '<FieldAccess for match_signature at nodes.lkt:5457:13>' Fld_2 ada/nodes.lkt:5457
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3059 '<Cast to SubpSpec at nodes.lkt:5458:17>' Cast_Result ada/nodes.lkt:5458
--# expr-start 3058 '<FieldAccess for subp_spec_or_null at nodes.lkt:5458:17>' Fld_1 ada/nodes.lkt:5458
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Other.Node, E_Info => Other.Info);
--# end
--# expr-done 3058
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Subp_Spec_Range
   then
      Cast_Result := Create_Internal_Entity_Subp_Spec
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 3059
      Cast_Result_1 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Result.Node,
         Info => Cast_Result.Info);
--# property-call-start BaseSubpSpec.match_signature
Fld_2 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Var_Expr_0.Node, Other => Cast_Result_1, Match_Name => False, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3060
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Subp_Decl_Match_Signature;
--# end
--# property-start BasicDecl.access_to_subp_decl_match_signature ada/nodes.lkt:5467
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Access_To_Subp_Decl_Match_Signature
  (Node : Bare_Basic_Decl
      ; Other : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Subp_Spec;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Access_Def;
Cast_Result : Internal_Entity_Access_To_Subp_Def;
Fld_2 : Internal_Entity_Subp_Spec;
Fld_3 : Internal_Entity_Base_Subp_Spec;
Cast_Result_1 : Internal_Entity_Subp_Spec;
Cast_Result_2 : Internal_Entity_Base_Subp_Spec;
Fld_4 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3064 '<FieldAccess for subp_spec at nodes.lkt:5468:9>' Fld_2 ada/nodes.lkt:5468
--# expr-start 3063 '<Cast to AccessToSubpDef at nodes.lkt:5468:9>' Cast_Result ada/nodes.lkt:5468
--# expr-start 3062 '<FieldAccess for access_def at nodes.lkt:5468:9>' Fld_1 ada/nodes.lkt:5468
--# expr-start 3061 '<FieldAccess for expr_type at nodes.lkt:5468:9>' Fld ada/nodes.lkt:5468
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3061
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 3062
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Access_To_Subp_Def_Range
   then
      Cast_Result := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Access_To_Subp_Def;
   end if;
--# expr-done 3063
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Subp_Spec (Node => Cast_Result.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Cast_Result.Info);
--# expr-done 3064
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 3067 '<FieldAccess for match_signature at nodes.lkt:5470:13>' Fld_4 ada/nodes.lkt:5470
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3066 '<Cast to SubpSpec at nodes.lkt:5471:17>' Cast_Result_1 ada/nodes.lkt:5471
--# expr-start 3065 '<FieldAccess for subp_spec_or_null at nodes.lkt:5471:17>' Fld_3 ada/nodes.lkt:5471
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Other.Node, E_Info => Other.Info);
--# end
--# expr-done 3065
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Subp_Spec_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Subp_Spec
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 3066
      Cast_Result_2 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Result_1.Node,
         Info => Cast_Result_1.Info);
--# property-call-start BaseSubpSpec.match_signature
Fld_4 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Var_Expr_0.Node, Other => Cast_Result_2, Match_Name => False, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3067
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Access_To_Subp_Decl_Match_Signature;
--# end
--# property-start BasicDecl.subp_renaming_decl_match_signature ada/nodes.lkt:5497
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Subp_Renaming_Decl_Match_Signature
  (Node : Bare_Basic_Decl
      ; Prefix : Internal_Entity_Basic_Decl
      ; Other : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind prefix Prefix
   --# bind other Other
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Var_Expr : Internal_Entity_Base_Type_Decl;
Fld : Boolean;
Fld_1 : Internal_Entity_Base_Subp_Spec;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Fld_5 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Boolean;
Fld_6 : Internal_Entity_Base_Subp_Spec;
Cast_Result_2 : Internal_Entity_Subp_Spec;
Cast_Result_3 : Internal_Entity_Base_Subp_Spec;
Fld_7 : Boolean;
If_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3082 '<BooleanBinaryOp Or at nodes.lkt:5502:9>' If_Result_2 ada/nodes.lkt:5502
--# expr-start 3068 '<FieldAccess for subp_decl_match_signature at nodes.lkt:5502:9>' Fld ada/nodes.lkt:5502
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_decl_match_signature
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Decl_Match_Signature (Node => Ent.Node, Other => Other, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3068
if Fld then
   If_Result_2 := True;
else
--# expr-start 3069 '<FieldAccess for subp_spec_or_null at nodes.lkt:5505:12>' Fld_1 ada/nodes.lkt:5505
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3069
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 3081 '<BooleanBinaryOp And at nodes.lkt:5507:13>' If_Result_1 ada/nodes.lkt:5507
--# expr-start 3077 '<BooleanBinaryOp And at nodes.lkt:5507:13>' If_Result ada/nodes.lkt:5507
--# expr-start 3071 '<Not at nodes.lkt:5507:13>' Not_Val ada/nodes.lkt:5507
--# expr-start 3070 '<IsNull at nodes.lkt:5507:17>' Is_Null ada/nodes.lkt:5507
Is_Null := Prefix.Node = null; 
--# expr-done 3070
Not_Val := not (Is_Null); 
--# expr-done 3071
if Not_Val then
   --# expr-start 3076 '<Eq at nodes.lkt:5511:17>' Is_Equiv ada/nodes.lkt:5511
--# expr-start 3072 '<FieldAccess for expr_type at nodes.lkt:5512:17>' Fld_2 ada/nodes.lkt:5512
      if Prefix.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Prefix.Node, Origin => Origin, E_Info => Prefix.Info);
--# end
--# expr-done 3072
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_1
--# expr-start 3073 '<FieldAccess for accessed_type at nodes.lkt:5512:48>' Fld_3 ada/nodes.lkt:5512
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Var_Expr_1.Node, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 3073
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 3074 '<FieldAccess for expr_type at nodes.lkt:5513:21>' Fld_4 ada/nodes.lkt:5513
      if Prefix.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Prefix.Node, Origin => Origin, E_Info => Prefix.Info);
--# end
--# expr-done 3074
   Result_Var_1 := Fld_4;
end if;
      Cast_Result := Create_Internal_Entity
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
--# expr-start 3075 '<FieldAccess for dottable_subp_of at nodes.lkt:5515:16>' Fld_5 ada/nodes.lkt:5515
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.dottable_subp_of
Fld_5 := Libadalang.Implementation.Base_Subp_Spec_P_Dottable_Subp_Of (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3075
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 3076
   If_Result := Is_Equiv;
else
   If_Result := False;
end if;
--# expr-done 3077
if If_Result then
   --# expr-start 3080 '<FieldAccess for match_signature at nodes.lkt:5518:17>' Fld_7 ada/nodes.lkt:5518
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3079 '<Cast to SubpSpec at nodes.lkt:5519:17>' Cast_Result_2 ada/nodes.lkt:5519
--# expr-start 3078 '<FieldAccess for subp_spec_or_null at nodes.lkt:5519:17>' Fld_6 ada/nodes.lkt:5519
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Other.Node, E_Info => Other.Info);
--# end
--# expr-done 3078
   if Fld_6.Node = null
      or else Fld_6.Node.Kind in Ada_Subp_Spec_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Subp_Spec
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 3079
      Cast_Result_3 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Result_2.Node,
         Info => Cast_Result_2.Info);
--# property-call-start BaseSubpSpec.match_signature
Fld_7 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Var_Expr_0.Node, Other => Cast_Result_3, Match_Name => False, Ignore_First_Param => True, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3080
   If_Result_1 := Fld_7;
else
   If_Result_1 := False;
end if;
--# expr-done 3081
Scope_Result_2 := If_Result_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_2 := Result_Var_2;
end if;
--# expr-done 3082
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Subp_Renaming_Decl_Match_Signature;
--# end
--# property-start BasicDecl.base_subp_declarations_impl ada/nodes.lkt:5529
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Base_Subp_Declarations_Impl
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_462 with Inline_Always;
            procedure Finalizer_Scope_2339 with Inline_Always;
            procedure Finalizer_Scope_2340 with Inline_Always;
      Local_Parent : Internal_Entity_Basic_Decl;
Local_Task_Or_Protected : Boolean;
Local_Spec : Internal_Entity_Base_Subp_Spec;
Local_Prims_Env : Lexical_Env := Empty_Env;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_3 : Internal_Entity_Base_Subp_Spec;
Var_Expr_90 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
Fld_2 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Base_Subp_Spec;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Lexical_Env := Empty_Env;
Map_Result : Lexical_Env_Array_Access;
Fld_7 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Concat_Result : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
If_Result : Lexical_Env := Empty_Env;
Fld_11 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_12 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Fld_13 : Internal_Entity_Basic_Decl;
Cast_Expr_2 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Fld_14 : Internal_Entity_Base_Subp_Spec;
Fld_15 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Map_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Unique_Array : Internal_Entity_Basic_Decl_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl_Array_Access;
Let_Result : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_2 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_3 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_462 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Group_Env);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (If_Result);
                     Dec_Ref (Local_Prims_Env);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_462;
            procedure Finalizer_Scope_2339 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_2339;
            procedure Finalizer_Scope_2340 is
            begin
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_2340;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3115 '<Let at nodes.lkt:5530:9>' Let_Result_3 ada/nodes.lkt:5530
--# scope-start
--# expr-start 3084 '<FieldAccess for parent_basic_decl at nodes.lkt:5530:22>' Fld_1 ada/nodes.lkt:5530
--# expr-start 3083 '<FieldAccess for canonical_part at nodes.lkt:5530:22>' Fld ada/nodes.lkt:5530
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3083
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_1 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 3084
Local_Parent := Fld_1; 
--# bind parent Local_Parent
--# expr-start 3114 '<Let at nodes.lkt:5531:9>' Let_Result_2 ada/nodes.lkt:5531
--# scope-start
--# expr-start 3085 '<IsA ProtectedTypeDecl, TaskTypeDecl at nodes.lkt:5531:33>' Is_A ada/nodes.lkt:5531
Is_A := Local_Parent.Node /= null 
and then Local_Parent.Node.Kind in Ada_Protected_Type_Decl_Range | Ada_Task_Type_Decl_Range; 
--# expr-done 3085
Local_Task_Or_Protected := Is_A; 
--# bind task_or_protected Local_Task_Or_Protected
--# expr-start 3113 '<Let at nodes.lkt:5535:9>' Let_Result_1 ada/nodes.lkt:5535
--# scope-start
--# expr-start 3088 '<FieldAccess for subp_spec_or_null at nodes.lkt:5535:20>' Fld_3 ada/nodes.lkt:5535
--# expr-start 3087 '<Cast to BasicDecl at nodes.lkt:5535:20>' Cast_Result ada/nodes.lkt:5535
--# expr-start 3086 '<FieldAccess for without_md at nodes.lkt:5535:20>' Fld_2 ada/nodes.lkt:5535
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.without_md
Fld_2 := Libadalang.Implementation.Ada_Node_P_Without_Md (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3086
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 3087
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 3088
Local_Spec := Fld_3; 
--# bind spec Local_Spec
--# expr-start 3112 '<Let at nodes.lkt:5548:9>' Let_Result ada/nodes.lkt:5548
--# scope-start
--# expr-start 3100 '<If at nodes.lkt:5549:13>' If_Result ada/nodes.lkt:5549
if Local_Task_Or_Protected then
   --# expr-start 3096 '<env_group at nodes.lkt:5554:17>' Group_Env ada/nodes.lkt:5554
--# expr-start 3093 '<Map at nodes.lkt:5555:21>' Map_Result ada/nodes.lkt:5555
   --# expr-start 3090 '<FieldAccess for base_types at nodes.lkt:5555:21>' Fld_4 ada/nodes.lkt:5555
--# expr-start 3089 '<Cast to BaseTypeDecl at nodes.lkt:5555:21>' Cast_Result_1 ada/nodes.lkt:5555
Cast_Expr := Local_Parent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 3089
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_types'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Types (Node => Cast_Result_1.Node, Origin => No_Bare_Ada_Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 3090
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld_4;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind bt Item_1
      --# expr-start 3092 '<FieldAccess for primitives_env at nodes.lkt:5556:33>' Fld_6 ada/nodes.lkt:5556
--# expr-start 3091 '<FieldAccess for full_view at nodes.lkt:5556:33>' Fld_5 ada/nodes.lkt:5556
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.full_view
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Full_View (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 3091
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.primitives_env'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Primitives_Env (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 3092
         declare
            Item_To_Append : constant Lexical_Env := Fld_6;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2339;
         end loop;
      end;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3093
--# expr-start 3095 '<ArrayLiteral at nodes.lkt:5558:23>' Array_Lit ada/nodes.lkt:5558
--# expr-start 3094 '<FieldAccess for children_env at nodes.lkt:5558:24>' Fld_7 ada/nodes.lkt:5558
      if Local_Parent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Children_Env (Node => Local_Parent.Node, E_Info => Local_Parent.Info);
--# expr-done 3094
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_7)); 
--# expr-done 3095
Concat_Result := Concat (Map_Result, Array_Lit); 
Group_Env := Group (Concat_Result, No_Metadata); 
--# expr-done 3096
   If_Result := Group_Env;
else
--# expr-start 3097 '<FieldAccess for candidate_primitive_subp_tagged_type at nodes.lkt:5564:17>' Fld_8 ada/nodes.lkt:5564
      if Local_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_tagged_type
Fld_8 := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_Tagged_Type (Node => Local_Spec.Node, Canonicalize => False, E_Info => Local_Spec.Info);
--# end
--# expr-done 3097
Var_Expr_0 := Fld_8;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind t Var_Expr_0
--# expr-start 3099 '<FieldAccess for primitives_env at nodes.lkt:5565:28>' Fld_10 ada/nodes.lkt:5565
--# expr-start 3098 '<FieldAccess for full_view at nodes.lkt:5565:28>' Fld_9 ada/nodes.lkt:5565
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.full_view
Fld_9 := Libadalang.Implementation.Base_Type_Decl_P_Full_View (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3098
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.primitives_env'
Fld_10 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Primitives_Env (Node => Fld_9.Node, E_Info => Fld_9.Info);
--# end
--# expr-done 3099
Scope_Result := Fld_10;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2340;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_Env;
end if;
      Inc_Ref (Result_Var);
   If_Result := Result_Var;
end if;
      Inc_Ref (If_Result);
--# expr-done 3100
Local_Prims_Env := If_Result; Inc_Ref (Local_Prims_Env);
--# bind prims_env Local_Prims_Env
--# expr-start 3111 '<bind at nodes.lkt:5569:9>' Dyn_Var_Bind_Result ada/nodes.lkt:5569
--# expr-start 3101 '<FieldAccess for origin_node at nodes.lkt:5569:23>' Fld_11 ada/nodes.lkt:5569
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_11 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 3101
Bound_Origin := Fld_11; 
--# expr-start 3110 '<unique at nodes.lkt:5571:9>' Unique_Array ada/nodes.lkt:5571
--# expr-start 3109 '<Map at nodes.lkt:5571:9>' Map_Result_1 ada/nodes.lkt:5571
   --# expr-start 3103 '<EnvGet at nodes.lkt:5571:9>' Env_Get_Result ada/nodes.lkt:5571
--# expr-start 3102 '<FieldAccess for name_symbol at nodes.lkt:5571:23>' Fld_12 ada/nodes.lkt:5571
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 3102
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Local_Prims_Env, Key => Thin (Fld_12), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 3103
      declare
         Map_Result_1_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind bd Item_2
--# expr-start 3104 '<Cast to BasicDecl at nodes.lkt:5573:21>' Cast_Result_3 ada/nodes.lkt:5573
Cast_Expr_2 := Item_2; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_3 := No_Entity_Basic_Decl;
   end if;
--# expr-done 3104
Var_Expr_90 := Cast_Result_3;
if Var_Expr_90 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 3105 '<FieldAccess for subp_spec_or_null at nodes.lkt:5573:21>' Fld_14 ada/nodes.lkt:5573
      if Var_Expr_90.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_14 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_90.Node, E_Info => Var_Expr_90.Info);
--# end
--# expr-done 3105
Var_Expr_3 := Fld_14;
if Var_Expr_3 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind s Var_Expr_3
--# expr-start 3106 '<FieldAccess for match_signature at nodes.lkt:5579:24>' Fld_15 ada/nodes.lkt:5579
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.match_signature
Fld_15 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Var_Expr_3.Node, Other => Local_Spec, Match_Name => False, Use_Entity_Info => True, Ignore_First_Param => Local_Task_Or_Protected, Origin => Bound_Origin, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 3106
Scope_Result_1 := Fld_15;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
         if Result_Var_2 then
      --# expr-start 3108 '<FieldAccess for canonical_part at nodes.lkt:5572:21>' Fld_13 ada/nodes.lkt:5572
--# expr-start 3107 '<Cast to BasicDecl at nodes.lkt:5572:21>' Cast_Result_2 ada/nodes.lkt:5572
Cast_Expr_1 := Item_2; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_2 := No_Entity_Basic_Decl;
   end if;
--# expr-done 3107
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld_13 := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Cast_Result_2.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 3108
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Fld_13;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 3109
Unique_Array := Make_Unique (Map_Result_1); 
--# expr-done 3110
Dyn_Var_Bind_Result := Unique_Array; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 3111
Let_Result := Dyn_Var_Bind_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 3112
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 3113
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 3114
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 3115
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_462;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_462;
                     Finalizer_Scope_2339;
                     Finalizer_Scope_2340;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Base_Subp_Declarations_Impl;
--# end
--# property-start BasicDecl.base_subp_declarations ada/nodes.lkt:5598
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Base_Subp_Declarations
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_463 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl_Array_Access;
Fld_1 : Boolean;
If_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_463 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_463;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Basic_Decl_Basic_Decl_P_Base_Subp_Declarations,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Basic_Decl,
                                As_Bare_Basic_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Imprecise_Fallback);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Basic_Decl_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 3118 '<If at nodes.lkt:5599:9>' If_Result ada/nodes.lkt:5599
--# expr-start 3116 '<FieldAccess for is_subprogram at nodes.lkt:5599:12>' Fld_1 ada/nodes.lkt:5599
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_subprogram
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Is_Subprogram (Node => Ent.Node);
--# end
--# expr-done 3116
if Fld_1 then
   --# expr-start 3117 '<FieldAccess for base_subp_declarations_impl at nodes.lkt:5599:38>' Fld ada/nodes.lkt:5599
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.base_subp_declarations_impl
Fld := Libadalang.Implementation.Basic_Decl_P_Base_Subp_Declarations_Impl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3117
   If_Result := Fld;
else
   If_Result := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 3118
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_463;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_463;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Basic_Decl_Array_Access,
                        As_Internal_Entity_Basic_Decl_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Basic_Decl_P_Base_Subp_Declarations;
--# end
--# property-start BasicDecl.root_subp_declarations_impl ada/nodes.lkt:5605
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Root_Subp_Declarations_Impl
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
      ; Imprecise_Fallback : Boolean
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_464 with Inline_Always;
      Local_Raw_Base_Decls : Internal_Entity_Basic_Decl_Array_Access;
Local_Parent : Internal_Entity_Basic_Decl;
Local_Task_Or_Protected : Boolean;
Local_Base_Decls : Internal_Entity_Basic_Decl_Array_Access;
Local_Base_Types : Internal_Entity_Base_Type_Decl_Array_Access;
Fld : Internal_Entity_Basic_Decl_Array_Access;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
Fld_3 : Bare_Basic_Decl;
Cast_Result : Bare_Basic_Decl;
Is_Equal : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Basic_Decl_Array_Access;
Len : Integer;
Comp_Result : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Fld_4 : Internal_Entity_Info;
Fld_5 : Internal_Metadata;
Fld_6 : Bare_Ada_Node;
Cast_Result_1 : Bare_Base_Type_Decl;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result_2 : Internal_Entity_Base_Type_Decl;
Map_Result_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Unique_Array : Internal_Entity_Base_Type_Decl_Array_Access;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Is_Equiv : Boolean;
Not_Val_1 : Boolean;
Fld_7 : Boolean;
If_Result_3 : Boolean;
Quantifier_Result : Boolean;
Not_Val_2 : Boolean;
Map_Result_2 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_8 : Internal_Entity_Info;
Fld_9 : Internal_Metadata;
Fld_10 : Bare_Ada_Node;
Fld_11 : Bare_Base_Type_Decl;
Cast_Result_4 : Bare_Ada_Node;
Is_Equal_1 : Boolean;
Find_Result : Internal_Entity_Basic_Decl;
Map_Result_3 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_2 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_3 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_4 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_464 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Raw_Base_Decls);
                     Dec_Ref (Map_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Local_Base_Decls);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Local_Base_Types);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_464;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3155 '<Let at nodes.lkt:5610:9>' Let_Result_4 ada/nodes.lkt:5610
--# scope-start
--# expr-start 3119 '<FieldAccess for base_subp_declarations at nodes.lkt:5610:30>' Fld ada/nodes.lkt:5610
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.base_subp_declarations
Fld := Libadalang.Implementation.Basic_Decl_P_Base_Subp_Declarations (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3119
Local_Raw_Base_Decls := Fld; Inc_Ref (Local_Raw_Base_Decls);
--# bind raw_base_decls Local_Raw_Base_Decls
--# expr-start 3154 '<Let at nodes.lkt:5618:9>' Let_Result_3 ada/nodes.lkt:5618
--# scope-start
--# expr-start 3121 '<FieldAccess for parent_basic_decl at nodes.lkt:5618:22>' Fld_2 ada/nodes.lkt:5618
--# expr-start 3120 '<FieldAccess for canonical_part at nodes.lkt:5618:22>' Fld_1 ada/nodes.lkt:5618
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3120
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_2 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 3121
Local_Parent := Fld_2; 
--# bind parent Local_Parent
--# expr-start 3153 '<Let at nodes.lkt:5619:9>' Let_Result_2 ada/nodes.lkt:5619
--# scope-start
--# expr-start 3122 '<IsA ProtectedTypeDecl, TaskTypeDecl at nodes.lkt:5619:33>' Is_A ada/nodes.lkt:5619
Is_A := Local_Parent.Node /= null 
and then Local_Parent.Node.Kind in Ada_Protected_Type_Decl_Range | Ada_Task_Type_Decl_Range; 
--# expr-done 3122
Local_Task_Or_Protected := Is_A; 
--# bind task_or_protected Local_Task_Or_Protected
--# expr-start 3152 '<Let at nodes.lkt:5620:9>' Let_Result_1 ada/nodes.lkt:5620
--# scope-start
--# expr-start 3129 '<If at nodes.lkt:5621:13>' If_Result_1 ada/nodes.lkt:5621
--# expr-start 3124 '<BooleanBinaryOp And at nodes.lkt:5621:16>' If_Result ada/nodes.lkt:5621
if Local_Task_Or_Protected then
   --# expr-start 3123 '<length at nodes.lkt:5621:38>' Len ada/nodes.lkt:5621
Len := Length (Local_Raw_Base_Decls); 
--# expr-done 3123
Comp_Result := Len > 1; 
   If_Result := Comp_Result;
else
   If_Result := False;
end if;
--# expr-done 3124
if If_Result then
   --# expr-start 3128 '<Map at nodes.lkt:5622:18>' Map_Result ada/nodes.lkt:5622
      declare
         Map_Result_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Raw_Base_Decls;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind bd Item_0
         --# expr-start 3127 '<Not at nodes.lkt:5622:48>' Not_Val ada/nodes.lkt:5622
--# expr-start 3126 '<Eq at nodes.lkt:5622:48>' Is_Equal ada/nodes.lkt:5622
--# expr-start 3125 '<FieldAccess for node at nodes.lkt:5622:48>' Fld_3 ada/nodes.lkt:5622
Fld_3 := Item_0.Node;
--# expr-done 3125
      Cast_Result := Fld_3;
Is_Equal := Cast_Result = Self; 
--# expr-done 3126
Not_Val := not (Is_Equal); 
--# expr-done 3127
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Item_0;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3128
   If_Result_1 := Map_Result;
else
   If_Result_1 := Local_Raw_Base_Decls;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 3129
Local_Base_Decls := If_Result_1; Inc_Ref (Local_Base_Decls);
--# bind base_decls Local_Base_Decls
--# expr-start 3151 '<Let at nodes.lkt:5625:9>' Let_Result ada/nodes.lkt:5625
--# scope-start
--# expr-start 3136 '<unique at nodes.lkt:5626:13>' Unique_Array ada/nodes.lkt:5626
--# expr-start 3135 '<Map at nodes.lkt:5626:13>' Map_Result_1 ada/nodes.lkt:5626
      declare
         Map_Result_1_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Base_Decls;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind d Item_1
      --# expr-start 3134 '<as_bare_entity at nodes.lkt:5627:24>' If_Result_2 ada/nodes.lkt:5627
--# expr-start 3133 '<Cast to BaseTypeDecl at nodes.lkt:5627:24>' Cast_Result_1 ada/nodes.lkt:5627
--# expr-start 3132 '<FieldAccess for primitive at nodes.lkt:5627:24>' Fld_6 ada/nodes.lkt:5627
--# expr-start 3131 '<FieldAccess for md at nodes.lkt:5627:24>' Fld_5 ada/nodes.lkt:5627
--# expr-start 3130 '<FieldAccess for info at nodes.lkt:5627:24>' Fld_4 ada/nodes.lkt:5627
Fld_4 := Item_1.Info;
--# expr-done 3130
Fld_5 := Fld_4.Md;
--# expr-done 3131
Fld_6 := Fld_5.Primitive;
--# expr-done 3132
   if Fld_6 = null
      or else Fld_6.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Fld_6;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 3133
Is_Null := Cast_Result_1 = null; 
if Is_Null then
   If_Result_2 := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Cast_Result_1); 
   If_Result_2 := As_Entity;
end if;
--# expr-done 3134
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := If_Result_2;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 3135
Unique_Array := Make_Unique (Map_Result_1); 
--# expr-done 3136
Local_Base_Types := Unique_Array; Inc_Ref (Local_Base_Types);
--# bind base_types Local_Base_Types
--# expr-start 3150 '<Map at nodes.lkt:5634:9>' Map_Result_3 ada/nodes.lkt:5634
   --# expr-start 3143 '<Map at nodes.lkt:5634:9>' Map_Result_2 ada/nodes.lkt:5634
      declare
         Map_Result_2_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Local_Base_Types;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_2
         --# expr-start 3142 '<Not at nodes.lkt:5635:20>' Not_Val_2 ada/nodes.lkt:5635
--# expr-start 3141 '<AnyQuantifier at nodes.lkt:5635:24>' Quantifier_Result ada/nodes.lkt:5635
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Local_Base_Types;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind u Item_3
      --# expr-start 3140 '<BooleanBinaryOp And at nodes.lkt:5635:46>' If_Result_3 ada/nodes.lkt:5635
--# expr-start 3138 '<Not at nodes.lkt:5635:46>' Not_Val_1 ada/nodes.lkt:5635
--# expr-start 3137 '<Eq at nodes.lkt:5635:46>' Is_Equiv ada/nodes.lkt:5635
Cast_Expr := Item_2; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Item_3; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 3137
Not_Val_1 := not (Is_Equiv); 
--# expr-done 3138
if Not_Val_1 then
   --# expr-start 3139 '<FieldAccess for is_derived_type at nodes.lkt:5635:57>' Fld_7 ada/nodes.lkt:5635
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_derived_type
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Is_Derived_Type (Node => Item_2.Node, Other_Type => Item_3, Origin => Origin, E_Info => Item_2.Info);
--# end
--# expr-done 3139
   If_Result_3 := Fld_7;
else
   If_Result_3 := False;
end if;
--# expr-done 3140
      Quantifier_Result := If_Result_3;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 3141
Not_Val_2 := not (Quantifier_Result); 
--# expr-done 3142
         if Not_Val_2 then
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Item_2;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 3143
      declare
         Map_Result_3_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Map_Result_2;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind root_type Item_4
      --# expr-start 3149 '<Find at nodes.lkt:5640:13>' Find_Result ada/nodes.lkt:5640
      Find_Result := No_Entity_Basic_Decl;
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Base_Decls;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind d Item_5
      --# expr-start 3148 '<Eq at nodes.lkt:5640:36>' Is_Equal_1 ada/nodes.lkt:5640
--# expr-start 3146 '<FieldAccess for primitive at nodes.lkt:5640:36>' Fld_10 ada/nodes.lkt:5640
--# expr-start 3145 '<FieldAccess for md at nodes.lkt:5640:36>' Fld_9 ada/nodes.lkt:5640
--# expr-start 3144 '<FieldAccess for info at nodes.lkt:5640:36>' Fld_8 ada/nodes.lkt:5640
Fld_8 := Item_5.Info;
--# expr-done 3144
Fld_9 := Fld_8.Md;
--# expr-done 3145
Fld_10 := Fld_9.Primitive;
--# expr-done 3146
--# expr-start 3147 '<FieldAccess for node at nodes.lkt:5640:59>' Fld_11 ada/nodes.lkt:5640
Fld_11 := Item_4.Node;
--# expr-done 3147
      Cast_Result_4 := Fld_11;
Is_Equal_1 := Fld_10 = Cast_Result_4; 
--# expr-done 3148
      if Is_Equal_1 then
         Find_Result := Item_5; 
      end if;
   --# end
               exit when Is_Equal_1;
         end loop;
      end;
--# expr-done 3149
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Find_Result;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_3 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 3150
Let_Result := Map_Result_3; Inc_Ref (Let_Result);
--# end
--# expr-done 3151
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 3152
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 3153
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 3154
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 3155
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_464;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_464;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Root_Subp_Declarations_Impl;
--# end
--# property-start BasicDecl.root_subp_declarations ada/nodes.lkt:5657
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Root_Subp_Declarations
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_465 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl_Array_Access;
Fld_1 : Boolean;
If_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_465 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_465;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3158 '<If at nodes.lkt:5658:9>' If_Result ada/nodes.lkt:5658
--# expr-start 3156 '<FieldAccess for is_subprogram at nodes.lkt:5658:12>' Fld_1 ada/nodes.lkt:5658
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_subprogram
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Is_Subprogram (Node => Ent.Node);
--# end
--# expr-done 3156
if Fld_1 then
   --# expr-start 3157 '<FieldAccess for root_subp_declarations_impl at nodes.lkt:5658:38>' Fld ada/nodes.lkt:5658
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.root_subp_declarations_impl
Fld := Libadalang.Implementation.Basic_Decl_P_Root_Subp_Declarations_Impl (Node => Ent.Node, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3157
   If_Result := Fld;
else
   If_Result := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 3158
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_465;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_465;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Root_Subp_Declarations;
--# end
--# property-start BasicDecl.find_all_overrides ada/nodes.lkt:5666
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Find_All_Overrides
  (Node : Bare_Basic_Decl
      ; Units : Internal_Unit_Array_Access
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind units Units
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_466 with Inline_Always;
            procedure Finalizer_Scope_2351 with Inline_Always;
            procedure Finalizer_Scope_2352 with Inline_Always;
      Local_Spec : Internal_Entity_Base_Subp_Spec;
Local_Prim_Type : Internal_Entity_Base_Type_Decl;
Local_Derivations : Internal_Entity_Type_Decl_Array_Access;
Local_Prims : Internal_Entity_Basic_Decl_Array_Access;
Local_Base_P : Internal_Entity_Basic_Decl;
Var_Expr_91 : Internal_Entity_Base_Subp_Spec;
Var_Expr_92 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Type_Decl_Array_Access;
Scope_Result_1 : Internal_Entity_Type_Decl_Array_Access;
Result_Var_1 : Internal_Entity_Type_Decl_Array_Access;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Map_Result : Internal_Entity_Basic_Decl_Array_Access;
Fld_5 : Bare_Basic_Decl;
Cast_Result_1 : Bare_Basic_Decl;
Is_Equal : Boolean;
Find_Result : Internal_Entity_Basic_Decl;
Fld_6 : Internal_Entity_Info;
Fld_7 : Internal_Metadata;
Fld_8 : Bare_Ada_Node;
Fld_9 : Bare_Type_Decl;
Cast_Result_2 : Bare_Ada_Node;
Is_Equal_1 : Boolean;
Fld_10 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_11 : Internal_Entity_Base_Subp_Spec;
Fld_12 : Internal_Entity_Base_Subp_Spec;
Fld_13 : Boolean;
Dyn_Var_Bind_Result : Boolean;
If_Result : Boolean;
Map_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Fld_14 : Internal_Entity_Basic_Decl;
Fld_15 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Map_Result_2 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Map_Result_3 : Internal_Entity_Basic_Decl_Array_Access;
Unique_Array : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_2 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_3 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_4 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_466 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Local_Derivations);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_466;
            procedure Finalizer_Scope_2351 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2351;
            procedure Finalizer_Scope_2352 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Local_Prims);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_2352;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3192 '<Let at nodes.lkt:5669:9>' Let_Result_4 ada/nodes.lkt:5669
--# scope-start
--# expr-start 3159 '<FieldAccess for subp_spec_or_null at nodes.lkt:5669:20>' Fld ada/nodes.lkt:5669
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3159
Local_Spec := Fld; 
--# bind spec Local_Spec
--# expr-start 3191 '<Let at nodes.lkt:5672:9>' Let_Result_3 ada/nodes.lkt:5672
--# scope-start
Var_Expr_91 := Local_Spec;
if Var_Expr_91 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 3160 '<FieldAccess for candidate_primitive_subp_tagged_type at nodes.lkt:5672:25>' Fld_1 ada/nodes.lkt:5672
      if Var_Expr_91.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_tagged_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_Tagged_Type (Node => Var_Expr_91.Node, E_Info => Var_Expr_91.Info);
--# end
--# expr-done 3160
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Local_Prim_Type := Result_Var; 
--# bind prim_type Local_Prim_Type
--# expr-start 3190 '<Let at nodes.lkt:5673:9>' Let_Result_2 ada/nodes.lkt:5673
--# scope-start
Var_Expr_92 := Local_Prim_Type;
if Var_Expr_92 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 3161 '<FieldAccess for find_all_derived_types at nodes.lkt:5673:27>' Fld_2 ada/nodes.lkt:5673
      if Var_Expr_92.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.find_all_derived_types
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Find_All_Derived_Types (Node => Var_Expr_92.Node, Units => Units, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_92.Info);
--# end
--# expr-done 3161
Scope_Result_1 := Fld_2;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2351;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Local_Derivations := Result_Var_1; Inc_Ref (Local_Derivations);
--# bind derivations Local_Derivations
--# expr-start 3189 '<unique at nodes.lkt:5675:9>' Unique_Array ada/nodes.lkt:5675
--# expr-start 3188 '<Mapcat at nodes.lkt:5675:9>' Map_Result_3 ada/nodes.lkt:5675
      declare
         Map_Result_3_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Type_Decl_Array_Access := Local_Derivations;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 3187 '<Let at nodes.lkt:5678:17>' Let_Result_1 ada/nodes.lkt:5678
--# scope-start
--# expr-start 3166 '<Map at nodes.lkt:5679:21>' Map_Result ada/nodes.lkt:5679
   --# expr-start 3164 '<EnvGet at nodes.lkt:5679:21>' Env_Get_Result ada/nodes.lkt:5679
--# expr-start 3162 '<FieldAccess for primitives_env at nodes.lkt:5679:21>' Fld_3 ada/nodes.lkt:5679
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.primitives_env'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Primitives_Env (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 3162
--# expr-start 3163 '<FieldAccess for name_symbol at nodes.lkt:5679:44>' Fld_4 ada/nodes.lkt:5679
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 3163
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_3, Key => Thin (Fld_4), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 3164
      declare
         Map_Result_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
      --# expr-start 3165 '<Cast to BasicDecl at nodes.lkt:5680:32>' Cast_Result ada/nodes.lkt:5680
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 3165
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Cast_Result;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3166
Local_Prims := Map_Result; Inc_Ref (Local_Prims);
--# bind prims Local_Prims
--# expr-start 3186 '<Let at nodes.lkt:5686:21>' Let_Result ada/nodes.lkt:5686
--# scope-start
--# expr-start 3169 '<Find at nodes.lkt:5686:34>' Find_Result ada/nodes.lkt:5686
      Find_Result := No_Entity_Basic_Decl;
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Prims;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_2
      --# expr-start 3168 '<Eq at nodes.lkt:5686:52>' Is_Equal ada/nodes.lkt:5686
--# expr-start 3167 '<FieldAccess for node at nodes.lkt:5686:52>' Fld_5 ada/nodes.lkt:5686
Fld_5 := Item_2.Node;
--# expr-done 3167
      Cast_Result_1 := Fld_5;
Is_Equal := Cast_Result_1 = Self; 
--# expr-done 3168
      if Is_Equal then
         Find_Result := Item_2; 
      end if;
   --# end
               exit when Is_Equal;
         end loop;
      end;
--# expr-done 3169
Local_Base_P := Find_Result; 
--# bind base_p Local_Base_P
--# expr-start 3185 '<Map at nodes.lkt:5688:21>' Map_Result_2 ada/nodes.lkt:5688
   --# expr-start 3181 '<Map at nodes.lkt:5688:21>' Map_Result_1 ada/nodes.lkt:5688
      declare
         Map_Result_1_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Prims;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_3
         --# expr-start 3180 '<BooleanBinaryOp And at nodes.lkt:5690:25>' If_Result ada/nodes.lkt:5690
--# expr-start 3174 '<Eq at nodes.lkt:5695:29>' Is_Equal_1 ada/nodes.lkt:5695
--# expr-start 3172 '<FieldAccess for primitive at nodes.lkt:5695:29>' Fld_8 ada/nodes.lkt:5695
--# expr-start 3171 '<FieldAccess for md at nodes.lkt:5695:29>' Fld_7 ada/nodes.lkt:5695
--# expr-start 3170 '<FieldAccess for info at nodes.lkt:5695:29>' Fld_6 ada/nodes.lkt:5695
Fld_6 := Item_3.Info;
--# expr-done 3170
Fld_7 := Fld_6.Md;
--# expr-done 3171
Fld_8 := Fld_7.Primitive;
--# expr-done 3172
--# expr-start 3173 '<FieldAccess for node at nodes.lkt:5695:52>' Fld_9 ada/nodes.lkt:5695
Fld_9 := Item_0.Node;
--# expr-done 3173
      Cast_Result_2 := Fld_9;
Is_Equal_1 := Fld_8 = Cast_Result_2; 
--# expr-done 3174
if Is_Equal_1 then
   --# expr-start 3179 '<bind at nodes.lkt:5700:33>' Dyn_Var_Bind_Result ada/nodes.lkt:5700
--# expr-start 3175 '<FieldAccess for origin_node at nodes.lkt:5700:47>' Fld_10 ada/nodes.lkt:5700
      if Local_Base_P.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_10 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Local_Base_P.Node);
--# end
--# expr-done 3175
Bound_Origin := Fld_10; 
--# expr-start 3178 '<FieldAccess for match_signature at nodes.lkt:5702:33>' Fld_13 ada/nodes.lkt:5702
--# expr-start 3176 '<FieldAccess for subp_spec_or_null at nodes.lkt:5702:33>' Fld_11 ada/nodes.lkt:5702
      if Local_Base_P.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_11 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Local_Base_P.Node, E_Info => Local_Base_P.Info);
--# end
--# expr-done 3176
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3177 '<FieldAccess for subp_spec_or_null at nodes.lkt:5703:37>' Fld_12 ada/nodes.lkt:5703
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Item_3.Node, E_Info => Item_3.Info);
--# end
--# expr-done 3177
--# property-call-start BaseSubpSpec.match_signature
Fld_13 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Fld_11.Node, Other => Fld_12, Match_Name => False, Use_Entity_Info => True, Origin => Bound_Origin, E_Info => Fld_11.Info);
--# end
--# expr-done 3178
Dyn_Var_Bind_Result := Fld_13; 
--# expr-done 3179
   If_Result := Dyn_Var_Bind_Result;
else
   If_Result := False;
end if;
--# expr-done 3180
         if If_Result then
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Item_3;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 3181
      declare
         Map_Result_2_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Map_Result_1;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_4
      --# expr-start 3184 '<Cast to BasicDecl at nodes.lkt:5710:33>' Cast_Result_3 ada/nodes.lkt:5710
--# expr-start 3183 '<FieldAccess for without_md at nodes.lkt:5710:33>' Fld_15 ada/nodes.lkt:5710
--# expr-start 3182 '<FieldAccess for canonical_part at nodes.lkt:5710:33>' Fld_14 ada/nodes.lkt:5710
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld_14 := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Item_4.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Item_4.Info);
--# end
--# expr-done 3182
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.without_md
Fld_15 := Libadalang.Implementation.Ada_Node_P_Without_Md (Node => Fld_14.Node, E_Info => Fld_14.Info);
--# end
--# expr-done 3183
   if Fld_15.Node = null
      or else Fld_15.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 3184
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Cast_Result_3;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 3185
Let_Result := Map_Result_2; Inc_Ref (Let_Result);
--# end
--# expr-done 3186
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 3187
         for Item_To_Append of
               Let_Result_1.Items
         loop
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2352;
         end loop;
      end;
         Map_Result_3 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 3188
Unique_Array := Make_Unique (Map_Result_3); 
--# expr-done 3189
Let_Result_2 := Unique_Array; Inc_Ref (Let_Result_2);
--# end
--# expr-done 3190
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 3191
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 3192
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_466;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_466;
                     Finalizer_Scope_2351;
                     Finalizer_Scope_2352;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Find_All_Overrides;
--# end
--# property-start '[dispatcher]BasicDecl.defining_names' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Defining_Names
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl =>
                  --# property-call-start AbstractStateDecl.defining_names
                  Property_Result := Abstract_State_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Expr_Decl =>
                  --# property-call-start AnonymousExprDecl.defining_names
                  Property_Result := Anonymous_Expr_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl =>
                  --# property-call-start ComponentDecl.defining_names
                  Property_Result := Component_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discriminant_Spec =>
                  --# property-call-start DiscriminantSpec.defining_names
                  Property_Result := Discriminant_Spec_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Formal_Obj_Decl .. Ada_Generic_Formal_Type_Decl =>
                  --# property-call-start GenericFormal.defining_names
                  Property_Result := Generic_Formal_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Param_Spec =>
                  --# property-call-start ParamSpec.defining_names
                  Property_Result := Param_Spec_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start SyntheticFormalParamDecl.defining_names
                  Property_Result := Synthetic_Formal_Param_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Internal .. Ada_Package_Decl =>
                  --# property-call-start BasePackageDecl.defining_names
                  Property_Result := Base_Package_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.defining_names
                  Property_Result := Base_Type_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Subp_Decl | Ada_Subp_Decl | Ada_Generic_Subp_Internal .. Ada_Synthetic_Subp_Decl =>
                  --# property-call-start BasicSubpDecl.defining_names
                  Property_Result := Basic_Subp_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Formal_Subp_Decl .. Ada_Concrete_Formal_Subp_Decl =>
                  --# property-call-start FormalSubpDecl.defining_names
                  Property_Result := Formal_Subp_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Decl =>
                  --# property-call-start EntryDecl.defining_names
                  Property_Result := Entry_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Literal_Decl =>
                  --# property-call-start EnumLiteralDecl.defining_names
                  Property_Result := Enum_Literal_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Char_Enum_Lit =>
                  --# property-call-start SyntheticCharEnumLit.defining_names
                  Property_Result := Synthetic_Char_Enum_Lit_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Accept_Stmt_Body =>
                  --# property-call-start AcceptStmtBody.defining_names
                  Property_Result := Accept_Stmt_Body_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
                  --# property-call-start BaseSubpBody.defining_names
                  Property_Result := Base_Subp_Body_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Package_Body_Stub =>
                  --# property-call-start PackageBodyStub.defining_names
                  Property_Result := Package_Body_Stub_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Protected_Body_Stub =>
                  --# property-call-start ProtectedBodyStub.defining_names
                  Property_Result := Protected_Body_Stub_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subp_Body_Stub =>
                  --# property-call-start SubpBodyStub.defining_names
                  Property_Result := Subp_Body_Stub_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Task_Body_Stub =>
                  --# property-call-start TaskBodyStub.defining_names
                  Property_Result := Task_Body_Stub_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Body =>
                  --# property-call-start EntryBody.defining_names
                  Property_Result := Entry_Body_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Package_Body =>
                  --# property-call-start PackageBody.defining_names
                  Property_Result := Package_Body_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Protected_Body =>
                  --# property-call-start ProtectedBody.defining_names
                  Property_Result := Protected_Body_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Task_Body =>
                  --# property-call-start TaskBody.defining_names
                  Property_Result := Task_Body_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Index_Spec =>
                  --# property-call-start EntryIndexSpec.defining_names
                  Property_Result := Entry_Index_Spec_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Error_Decl =>
                  --# property-call-start ErrorDecl.defining_names
                  Property_Result := Error_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Exception_Decl =>
                  --# property-call-start ExceptionDecl.defining_names
                  Property_Result := Exception_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Exception_Handler =>
                  --# property-call-start ExceptionHandler.defining_names
                  Property_Result := Exception_Handler_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_For_Loop_Var_Decl =>
                  --# property-call-start ForLoopVarDecl.defining_names
                  Property_Result := For_Loop_Var_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Decl =>
                  --# property-call-start GenericPackageDecl.defining_names
                  Property_Result := Generic_Package_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Decl =>
                  --# property-call-start GenericSubpDecl.defining_names
                  Property_Result := Generic_Subp_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Instantiation =>
                  --# property-call-start GenericPackageInstantiation.defining_names
                  Property_Result := Generic_Package_Instantiation_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Instantiation =>
                  --# property-call-start GenericSubpInstantiation.defining_names
                  Property_Result := Generic_Subp_Instantiation_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Renaming_Decl =>
                  --# property-call-start GenericPackageRenamingDecl.defining_names
                  Property_Result := Generic_Package_Renaming_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Renaming_Decl =>
                  --# property-call-start GenericSubpRenamingDecl.defining_names
                  Property_Result := Generic_Subp_Renaming_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Label_Decl =>
                  --# property-call-start LabelDecl.defining_names
                  Property_Result := Label_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Named_Stmt_Decl =>
                  --# property-call-start NamedStmtDecl.defining_names
                  Property_Result := Named_Stmt_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Number_Decl =>
                  --# property-call-start NumberDecl.defining_names
                  Property_Result := Number_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.defining_names
                  Property_Result := Object_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Package_Renaming_Decl =>
                  --# property-call-start PackageRenamingDecl.defining_names
                  Property_Result := Package_Renaming_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Single_Protected_Decl =>
                  --# property-call-start SingleProtectedDecl.defining_names
                  Property_Result := Single_Protected_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Single_Task_Decl =>
                  --# property-call-start SingleTaskDecl.defining_names
                  Property_Result := Single_Task_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Object_Decl =>
                  --# property-call-start SyntheticObjectDecl.defining_names
                  Property_Result := Synthetic_Object_Decl_P_Defining_Names
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Defining_Names;
--# end
--# property-start BasicDecl.defining_name ada/nodes.lkt:5725
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Defining_Name
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_468 with Inline_Always;
      Fld : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_468 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_468;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3194 '<at at nodes.lkt:5725:49>' Get_Result ada/nodes.lkt:5725
--# expr-start 3193 '<FieldAccess for defining_names at nodes.lkt:5725:49>' Fld ada/nodes.lkt:5725
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3193
Get_Result := Get (Self, Fld, 0, True); 
--# expr-done 3194
         Property_Result := Get_Result;
   --# end
      Finalizer_Scope_468;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_468;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Defining_Name;
--# end
--# property-start BasicDecl.defining_name_or_raise ada/nodes.lkt:5729
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Defining_Name_Or_Raise
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_469 with Inline_Always;
      Local_Dns : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Len : Integer;
Comp_Result : Boolean;
If_Result : Internal_Entity_Defining_Name;
Let_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_469 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Dns);
            end Finalizer_Scope_469;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3199 '<Let at nodes.lkt:5730:9>' Let_Result ada/nodes.lkt:5730
--# scope-start
--# expr-start 3195 '<FieldAccess for defining_names at nodes.lkt:5730:19>' Fld ada/nodes.lkt:5730
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3195
Local_Dns := Fld; Inc_Ref (Local_Dns);
--# bind dns Local_Dns
--# expr-start 3198 '<If at nodes.lkt:5732:9>' If_Result ada/nodes.lkt:5732
--# expr-start 3196 '<length at nodes.lkt:5732:12>' Len ada/nodes.lkt:5732
Len := Length (Local_Dns); 
--# expr-done 3196
Comp_Result := Len > 1; 
if Comp_Result then
   If_Result := raise Precondition_Failure with "BasicDecl with multiple defining names";
else
   --# expr-start 3197 '<at at nodes.lkt:5737:14>' Get_Result ada/nodes.lkt:5737
Get_Result := Get (Self, Local_Dns, 0, True); 
--# expr-done 3197
   If_Result := Get_Result;
end if;
--# expr-done 3198
Let_Result := If_Result; 
--# end
--# expr-done 3199
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_469;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_469;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Defining_Name_Or_Raise;
--# end
--# property-start BasicDecl.identity_type ada/nodes.lkt:5741
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Identity_Type
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Exception_Decl;
Match_1 : Internal_Entity_Single_Task_Decl;
Match_2 : Internal_Entity_Object_Decl;
Match_3 : Internal_Entity_For_Loop_Var_Decl;
Match_4 : Internal_Entity_Base_Formal_Param_Decl;
Match_5 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Exception_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Single_Task_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity_Object_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity_For_Loop_Var_Decl;
Let_Result_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity_Base_Formal_Param_Decl;
Let_Result_4 : Internal_Entity_Base_Type_Decl;
Scope_Result_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Let_Result_5 : Internal_Entity_Base_Type_Decl;
Scope_Result_5 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3205 '<Match at nodes.lkt:5741:49>' Match_Result ada/nodes.lkt:5741
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Exception_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Exception_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind _ Match_0
--# expr-start 3200 '<FieldAccess for exc_id_type at nodes.lkt:5742:34>' Fld ada/nodes.lkt:5742
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.exc_id_type
Fld := Libadalang.Implementation.Ada_Node_P_Exc_Id_Type (Node => Self);
--# end
--# expr-done 3200
Let_Result := Fld; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Single_Task_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Single_Task_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind _ Match_1
--# expr-start 3201 '<FieldAccess for task_id_type at nodes.lkt:5743:35>' Fld_1 ada/nodes.lkt:5743
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.task_id_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Task_Id_Type (Node => Self);
--# end
--# expr-done 3201
Let_Result_1 := Fld_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Object_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
--# expr-start 3202 '<FieldAccess for task_id_type at nodes.lkt:5747:31>' Fld_2 ada/nodes.lkt:5747
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.task_id_type
Fld_2 := Libadalang.Implementation.Ada_Node_P_Task_Id_Type (Node => Self);
--# end
--# expr-done 3202
Let_Result_2 := Fld_2; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_For_Loop_Var_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_For_Loop_Var_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_3; 
--# bind _ Match_3
--# expr-start 3203 '<FieldAccess for task_id_type at nodes.lkt:5751:35>' Fld_3 ada/nodes.lkt:5751
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.task_id_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Task_Id_Type (Node => Self);
--# end
--# expr-done 3203
Let_Result_3 := Fld_3; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Component_Decl .. Ada_Synthetic_Formal_Param_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_4; 
--# bind _ Match_4
--# expr-start 3204 '<FieldAccess for task_id_type at nodes.lkt:5752:40>' Fld_4 ada/nodes.lkt:5752
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.task_id_type
Fld_4 := Libadalang.Implementation.Ada_Node_P_Task_Id_Type (Node => Self);
--# end
--# expr-done 3204
Let_Result_4 := Fld_4; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Package_Internal .. Ada_Error_Decl | Ada_Exception_Handler | Ada_Generic_Package_Decl .. Ada_Number_Decl | Ada_Package_Renaming_Decl .. Ada_Single_Protected_Decl | Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_5; 
--# bind _ Match_5
Let_Result_5 := No_Entity_Base_Type_Decl; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 3205
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Identity_Type;
--# end
--# property-start BasicDecl.is_array ada/nodes.lkt:5757
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Array
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Integer;
Comp_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3206 '<FieldAccess for array_ndims at nodes.lkt:5757:28>' Fld ada/nodes.lkt:5757
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.array_ndims'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Array_Ndims (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3206
Comp_Result := Fld > 0; 
         Property_Result := Comp_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Array;
--# end
--# property-start BasicDecl.subp_spec_or_null ada/nodes.lkt:5764
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Subp_Spec_Or_Null
  (Node : Bare_Basic_Decl
      ; Follow_Generic : Boolean
         := True
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind follow_generic Follow_Generic
   Property_Result : Internal_Entity_Base_Subp_Spec;
      Match_0 : Internal_Entity_Basic_Subp_Decl;
Match_1 : Internal_Entity_Base_Subp_Body;
Match_2 : Internal_Entity_Subp_Body_Stub;
Match_3 : Internal_Entity_Generic_Subp_Decl;
Match_4 : Internal_Entity_Generic_Subp_Instantiation;
Match_5 : Internal_Entity_Generic_Subp_Renaming_Decl;
Match_6 : Internal_Entity_Basic_Decl;
Var_Expr_93 : Internal_Entity_Basic_Subp_Decl;
Var_Expr_94 : Internal_Entity_Generic_Decl;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Subp_Spec;
Fld_2 : Internal_Entity_Subp_Spec;
Fld_3 : Internal_Entity_Generic_Subp_Internal;
Fld_4 : Internal_Entity_Subp_Spec;
If_Result : Internal_Entity_Subp_Spec;
Fld_5 : Internal_Entity_Basic_Subp_Decl;
Fld_6 : Internal_Entity_Base_Subp_Spec;
Scope_Result : Internal_Entity_Base_Subp_Spec;
Result_Var : Internal_Entity_Base_Subp_Spec;
Cast_Expr : Internal_Entity_Subp_Spec;
Cast_Result : Internal_Entity_Base_Subp_Spec;
If_Result_1 : Internal_Entity_Base_Subp_Spec;
Fld_7 : Internal_Entity_Generic_Decl;
Fld_8 : Internal_Entity_Base_Subp_Spec;
Scope_Result_1 : Internal_Entity_Base_Subp_Spec;
Result_Var_1 : Internal_Entity_Base_Subp_Spec;
Cast_Expr_1 : Internal_Entity_Subp_Spec;
Cast_Result_1 : Internal_Entity_Base_Subp_Spec;
If_Result_2 : Internal_Entity_Base_Subp_Spec;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Basic_Subp_Decl;
Let_Result : Internal_Entity_Base_Subp_Spec;
Scope_Result_2 : Internal_Entity_Base_Subp_Spec;
Cast_Result_3 : Internal_Entity_Base_Subp_Body;
Cast_Result_4 : Internal_Entity_Base_Subp_Spec;
Let_Result_1 : Internal_Entity_Base_Subp_Spec;
Scope_Result_3 : Internal_Entity_Base_Subp_Spec;
Cast_Result_5 : Internal_Entity_Subp_Body_Stub;
Cast_Result_6 : Internal_Entity_Base_Subp_Spec;
Let_Result_2 : Internal_Entity_Base_Subp_Spec;
Scope_Result_4 : Internal_Entity_Base_Subp_Spec;
Cast_Result_7 : Internal_Entity_Generic_Subp_Decl;
Cast_Result_8 : Internal_Entity_Base_Subp_Spec;
Let_Result_3 : Internal_Entity_Base_Subp_Spec;
Scope_Result_5 : Internal_Entity_Base_Subp_Spec;
Cast_Result_9 : Internal_Entity_Generic_Subp_Instantiation;
Let_Result_4 : Internal_Entity_Base_Subp_Spec;
Scope_Result_6 : Internal_Entity_Base_Subp_Spec;
Cast_Result_10 : Internal_Entity_Generic_Subp_Renaming_Decl;
Let_Result_5 : Internal_Entity_Base_Subp_Spec;
Scope_Result_7 : Internal_Entity_Base_Subp_Spec;
Cast_Result_11 : Internal_Entity_Basic_Decl;
Cast_Expr_2 : Internal_Entity_Subp_Spec;
Cast_Result_12 : Internal_Entity_Base_Subp_Spec;
Let_Result_6 : Internal_Entity_Base_Subp_Spec;
Scope_Result_8 : Internal_Entity_Base_Subp_Spec;
Match_Result : Internal_Entity_Base_Subp_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3219 '<Match at nodes.lkt:5766:31>' Match_Result ada/nodes.lkt:5766
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Abstract_Subp_Decl .. Ada_Synthetic_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Basic_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind subp Match_0
--# expr-start 3207 '<FieldAccess for subp_decl_spec at nodes.lkt:5767:37>' Fld ada/nodes.lkt:5767
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicSubpDecl.subp_decl_spec'
Fld := Libadalang.Implementation.Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 3207
Let_Result := Fld; 
--# end
Scope_Result_2 := Let_Result;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Base_Subp_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind subp Match_1
--# expr-start 3208 '<FieldAccess for subp_spec at nodes.lkt:5768:36>' Fld_1 ada/nodes.lkt:5768
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Subp_Spec (Node => Match_1.Node.Base_Subp_Body_F_Subp_Spec, Info => Match_1.Info);
--# expr-done 3208
      Cast_Result_4 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Let_Result_1 := Cast_Result_4; 
--# end
Scope_Result_3 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Subp_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Subp_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_5; 
--# bind subp Match_2
--# expr-start 3209 '<FieldAccess for subp_spec at nodes.lkt:5769:36>' Fld_2 ada/nodes.lkt:5769
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Subp_Spec (Node => Match_2.Node.Subp_Body_Stub_F_Subp_Spec, Info => Match_2.Info);
--# expr-done 3209
      Cast_Result_6 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Let_Result_2 := Cast_Result_6; 
--# end
Scope_Result_4 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Generic_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Generic_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_7; 
--# bind gsp Match_3
--# expr-start 3212 '<If at nodes.lkt:5771:13>' If_Result ada/nodes.lkt:5771
if Follow_Generic then
   --# expr-start 3211 '<FieldAccess for subp_spec at nodes.lkt:5771:36>' Fld_4 ada/nodes.lkt:5771
--# expr-start 3210 '<FieldAccess for subp_decl at nodes.lkt:5771:36>' Fld_3 ada/nodes.lkt:5771
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Generic_Subp_Internal (Node => Match_3.Node.Generic_Subp_Decl_F_Subp_Decl, Info => Match_3.Info);
--# expr-done 3210
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Subp_Spec (Node => Fld_3.Node.Generic_Subp_Internal_F_Subp_Spec, Info => Fld_3.Info);
--# expr-done 3211
   If_Result := Fld_4;
else
   If_Result := No_Entity_Subp_Spec;
end if;
--# expr-done 3212
      Cast_Result_8 := Create_Internal_Entity_Base_Subp_Spec
        (Node => If_Result.Node,
         Info => If_Result.Info);
Let_Result_3 := Cast_Result_8; 
--# end
Scope_Result_5 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Generic_Subp_Instantiation =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Generic_Subp_Instantiation
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_9; 
--# bind gsi Match_4
--# expr-start 3215 '<If at nodes.lkt:5774:13>' If_Result_1 ada/nodes.lkt:5774
if Follow_Generic then
--# expr-start 3213 '<FieldAccess for designated_subp at nodes.lkt:5774:36>' Fld_5 ada/nodes.lkt:5774
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericSubpInstantiation.designated_subp
Fld_5 := Libadalang.Implementation.Generic_Subp_Instantiation_P_Designated_Subp (Node => Match_4.Node, E_Info => Match_4.Info);
--# end
--# expr-done 3213
Var_Expr_93 := Fld_5;
if Var_Expr_93 /= No_Entity_Basic_Subp_Decl then
   --# scope-start
--# expr-start 3214 '<FieldAccess for subp_spec_or_null at nodes.lkt:5774:36>' Fld_6 ada/nodes.lkt:5774
      if Var_Expr_93.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_93.Node, E_Info => Var_Expr_93.Info);
--# end
--# expr-done 3214
Scope_Result := Fld_6;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Subp_Spec;
end if;
   If_Result_1 := Result_Var;
else
Cast_Expr := No_Entity_Subp_Spec; 
      Cast_Result := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   If_Result_1 := Cast_Result;
end if;
--# expr-done 3215
Let_Result_4 := If_Result_1; 
--# end
Scope_Result_6 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Generic_Subp_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Create_Internal_Entity_Generic_Subp_Renaming_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_10; 
--# bind gsr Match_5
--# expr-start 3218 '<If at nodes.lkt:5777:13>' If_Result_2 ada/nodes.lkt:5777
if Follow_Generic then
--# expr-start 3216 '<FieldAccess for resolve at nodes.lkt:5777:36>' Fld_7 ada/nodes.lkt:5777
      if Match_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericRenamingDecl.resolve
Fld_7 := Libadalang.Implementation.Generic_Renaming_Decl_P_Resolve (Node => Match_5.Node, E_Info => Match_5.Info);
--# end
--# expr-done 3216
Var_Expr_94 := Fld_7;
if Var_Expr_94 /= No_Entity_Generic_Decl then
   --# scope-start
--# expr-start 3217 '<FieldAccess for subp_spec_or_null at nodes.lkt:5777:36>' Fld_8 ada/nodes.lkt:5777
      if Var_Expr_94.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_94.Node, E_Info => Var_Expr_94.Info);
--# end
--# expr-done 3217
Scope_Result_1 := Fld_8;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Subp_Spec;
end if;
   If_Result_2 := Result_Var_1;
else
Cast_Expr_1 := No_Entity_Subp_Spec; 
      Cast_Result_1 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   If_Result_2 := Cast_Result_1;
end if;
--# expr-done 3218
Let_Result_5 := If_Result_2; 
--# end
Scope_Result_7 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_7; 
         when Ada_Abstract_State_Decl .. Ada_Formal_Type_Decl | Ada_Accept_Stmt_Body | Ada_Package_Body_Stub .. Ada_Protected_Body_Stub | Ada_Task_Body_Stub .. Ada_Generic_Package_Decl | Ada_Generic_Package_Instantiation | Ada_Generic_Package_Renaming_Decl | Ada_Label_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_6 := Cast_Result_11; 
--# bind _ Match_6
Cast_Expr_2 := No_Entity_Subp_Spec; 
      Cast_Result_12 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Let_Result_6 := Cast_Result_12; 
--# end
Scope_Result_8 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_8; 
end case;
--# expr-done 3219
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Subp_Spec_Or_Null;
--# end
--# property-start BasicDecl.formal_param_holder_or_null ada/nodes.lkt:5782
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Formal_Param_Holder_Or_Null
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
      Match_0 : Internal_Entity_Type_Decl;
Match_1 : Internal_Entity_Entry_Body;
Match_2 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Discriminant_Part;
Fld_1 : Internal_Entity_Entry_Completion_Formal_Params;
Fld_2 : Internal_Entity_Base_Subp_Spec;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Let_Result : Internal_Entity_Base_Formal_Param_Holder;
Scope_Result : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result_2 : Internal_Entity_Entry_Body;
Cast_Result_3 : Internal_Entity_Base_Formal_Param_Holder;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Scope_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Cast_Result_5 : Internal_Entity_Base_Formal_Param_Holder;
Let_Result_2 : Internal_Entity_Base_Formal_Param_Holder;
Scope_Result_2 : Internal_Entity_Base_Formal_Param_Holder;
Match_Result : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3223 '<Match at nodes.lkt:5782:72>' Match_Result ada/nodes.lkt:5782
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind t Match_0
--# expr-start 3220 '<FieldAccess for discriminants at nodes.lkt:5785:29>' Fld ada/nodes.lkt:5785
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Discriminant_Part (Node => Match_0.Node.Type_Decl_F_Discriminants, Info => Match_0.Info);
--# expr-done 3220
      Cast_Result_1 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Fld.Node,
         Info => Fld.Info);
Let_Result := Cast_Result_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Entry_Body =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Entry_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind e Match_1
--# expr-start 3221 '<FieldAccess for params at nodes.lkt:5786:30>' Fld_1 ada/nodes.lkt:5786
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Entry_Completion_Formal_Params (Node => Match_1.Node.Entry_Body_F_Params, Info => Match_1.Info);
--# expr-done 3221
      Cast_Result_3 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Let_Result_1 := Cast_Result_3; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Single_Task_Type_Decl | Ada_Abstract_Subp_Decl .. Ada_Task_Body_Stub | Ada_Package_Body .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind _ Match_2
--# expr-start 3222 '<FieldAccess for subp_spec_or_null at nodes.lkt:5787:19>' Fld_2 ada/nodes.lkt:5787
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3222
      Cast_Result_5 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Let_Result_2 := Cast_Result_5; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 3223
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Formal_Param_Holder_Or_Null;
--# end
--# property-start BasicDecl.is_subprogram ada/nodes.lkt:5798
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Subprogram
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3224 '<IsA BasicSubpDecl, BaseSubpBody, SubpBodyStub, EntryDecl, GenericSubpDecl, GenericSubpInstantiation, GenericSubpRenamingDecl at nodes.lkt:5799:9>' Is_A ada/nodes.lkt:5799
Is_A := Self /= null 
and then Self.Kind in Ada_Basic_Subp_Decl | Ada_Base_Subp_Body | Ada_Subp_Body_Stub_Range | Ada_Entry_Decl_Range | Ada_Generic_Subp_Decl_Range | Ada_Generic_Subp_Instantiation_Range | Ada_Generic_Subp_Renaming_Decl_Range; 
--# expr-done 3224
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Subprogram;
--# end
--# property-start BasicDecl.is_predefined_operator ada/nodes.lkt:5810
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Predefined_Operator
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Is_A : Boolean;
Fld : Bare_Ada_Node;
Is_A_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3228 '<BooleanBinaryOp And at nodes.lkt:5811:9>' If_Result ada/nodes.lkt:5811
--# expr-start 3225 '<IsA SyntheticSubpDecl at nodes.lkt:5811:9>' Is_A ada/nodes.lkt:5811
Is_A := Self /= null 
and then Self.Kind in Ada_Synthetic_Subp_Decl_Range; 
--# expr-done 3225
if Is_A then
   --# expr-start 3227 '<IsA TypeDef at nodes.lkt:5811:39>' Is_A_1 ada/nodes.lkt:5811
--# expr-start 3226 '<parent at nodes.lkt:5811:39>' Fld ada/nodes.lkt:5811
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 3226
Is_A_1 := Fld /= null 
and then Fld.Kind in Ada_Type_Def; 
--# expr-done 3227
   If_Result := Is_A_1;
else
   If_Result := False;
end if;
--# expr-done 3228
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Predefined_Operator;
--# end
--# property-start BasicDecl.is_valid_reducer_candidate ada/nodes.lkt:5816
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Valid_Reducer_Candidate
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
            procedure Finalizer_Scope_2376 with Inline_Always;
      Var_Expr_0 : Boolean;
Var_Expr_1 : Internal_Entity_Base_Subp_Spec;
Local_Param_Types : Internal_Entity_Base_Type_Decl_Array_Access;
Local_Return_Type : Internal_Entity_Base_Type_Decl;
Local_Param_Modes : Internal_Entity_Mode_Array_Access;
Fld : Boolean;
Fld_1 : Internal_Entity_Base_Subp_Spec;
Fld_2 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_3 : Internal_Entity_Base_Type_Decl;
Len : Integer;
Is_Equal : Boolean;
Fld_4 : Internal_Entity_Mode_Array_Access;
Get_Result : Internal_Entity_Mode;
Is_A : Boolean;
Get_Result_1 : Internal_Entity_Mode;
Is_A_1 : Boolean;
If_Result : Boolean;
Let_Result : Boolean;
Get_Result_2 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Is_Null : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Let_Result_1 : Boolean;
Let_Result_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
            procedure Finalizer_Scope_2376 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Local_Param_Types);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Local_Param_Modes);
            end Finalizer_Scope_2376;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3229 '<FieldAccess for is_subprogram at nodes.lkt:5818:9>' Fld ada/nodes.lkt:5818
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_subprogram
Fld := Libadalang.Implementation.Basic_Decl_P_Is_Subprogram (Node => Ent.Node);
--# end
--# expr-done 3229
Var_Expr_0 := Fld;
if Var_Expr_0 /= False then
   --# scope-start
   --# bind _ Var_Expr_0
--# expr-start 3230 '<FieldAccess for subp_spec_or_null at nodes.lkt:5820:13>' Fld_1 ada/nodes.lkt:5820
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3230
Var_Expr_1 := Fld_1;
if Var_Expr_1 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_1
--# expr-start 3248 '<Let at nodes.lkt:5822:21>' Let_Result_2 ada/nodes.lkt:5822
--# scope-start
--# expr-start 3231 '<FieldAccess for param_types at nodes.lkt:5822:39>' Fld_2 ada/nodes.lkt:5822
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.param_types
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Param_Types (Node => Var_Expr_1.Node, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 3231
Local_Param_Types := Fld_2; Inc_Ref (Local_Param_Types);
--# bind param_types Local_Param_Types
--# expr-start 3247 '<Let at nodes.lkt:5823:21>' Let_Result_1 ada/nodes.lkt:5823
--# scope-start
--# expr-start 3232 '<FieldAccess for return_type at nodes.lkt:5823:39>' Fld_3 ada/nodes.lkt:5823
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_3 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Var_Expr_1.Node, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 3232
Local_Return_Type := Fld_3; 
--# bind return_type Local_Return_Type
--# expr-start 3246 '<BooleanBinaryOp And at nodes.lkt:5825:21>' If_Result_2 ada/nodes.lkt:5825
--# expr-start 3234 '<Eq at nodes.lkt:5827:25>' Is_Equal ada/nodes.lkt:5827
--# expr-start 3233 '<length at nodes.lkt:5827:25>' Len ada/nodes.lkt:5827
Len := Length (Local_Param_Types); 
--# expr-done 3233
Is_Equal := Len = 2; 
--# expr-done 3234
if Is_Equal then
   --# expr-start 3245 '<If at nodes.lkt:5830:25>' If_Result_1 ada/nodes.lkt:5830
--# expr-start 3235 '<IsNull at nodes.lkt:5830:28>' Is_Null ada/nodes.lkt:5830
Is_Null := Local_Return_Type.Node = null; 
--# expr-done 3235
if Is_Null then
   --# expr-start 3242 '<Let at nodes.lkt:5834:29>' Let_Result ada/nodes.lkt:5834
--# scope-start
--# expr-start 3236 '<FieldAccess for param_modes at nodes.lkt:5834:47>' Fld_4 ada/nodes.lkt:5834
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.param_modes
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Param_Modes (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 3236
Local_Param_Modes := Fld_4; Inc_Ref (Local_Param_Modes);
--# bind param_modes Local_Param_Modes
--# expr-start 3241 '<BooleanBinaryOp And at nodes.lkt:5836:29>' If_Result ada/nodes.lkt:5836
--# expr-start 3238 '<IsA Mode.InOut at nodes.lkt:5836:29>' Is_A ada/nodes.lkt:5836
--# expr-start 3237 '<at at nodes.lkt:5836:29>' Get_Result ada/nodes.lkt:5836
Get_Result := Get (Self, Local_Param_Modes, 0, True); 
--# expr-done 3237
Is_A := Get_Result.Node /= null 
and then Get_Result.Node.Kind in Ada_Mode_In_Out_Range; 
--# expr-done 3238
if Is_A then
   --# expr-start 3240 '<IsA Mode.In, Mode.Default at nodes.lkt:5837:33>' Is_A_1 ada/nodes.lkt:5837
--# expr-start 3239 '<at at nodes.lkt:5837:33>' Get_Result_1 ada/nodes.lkt:5837
Get_Result_1 := Get (Self, Local_Param_Modes, 1, True); 
--# expr-done 3239
Is_A_1 := Get_Result_1.Node /= null 
and then Get_Result_1.Node.Kind in Ada_Mode_In_Range | Ada_Mode_Default_Range; 
--# expr-done 3240
   If_Result := Is_A_1;
else
   If_Result := False;
end if;
--# expr-done 3241
Let_Result := If_Result; 
--# end
--# expr-done 3242
   If_Result_1 := Let_Result;
else
   --# expr-start 3244 '<Eq at nodes.lkt:5842:29>' Is_Equiv ada/nodes.lkt:5842
Cast_Expr := Local_Return_Type; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 3243 '<at at nodes.lkt:5842:44>' Get_Result_2 ada/nodes.lkt:5842
Get_Result_2 := Get (Self, Local_Param_Types, 0, True); 
--# expr-done 3243
      Cast_Result_1 := Create_Internal_Entity
        (Node => Get_Result_2.Node,
         Info => Get_Result_2.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 3244
   If_Result_1 := Is_Equiv;
end if;
--# expr-done 3245
   If_Result_2 := If_Result_1;
else
   If_Result_2 := False;
end if;
--# expr-done 3246
Let_Result_1 := If_Result_2; 
--# end
--# expr-done 3247
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 3248
Scope_Result := Let_Result_2;
   --# end
      Finalizer_Scope_2376;
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2376;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Valid_Reducer_Candidate;
--# end
--# property-start BasicDecl.is_stream_subprogram_for_type ada/nodes.lkt:5849
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Stream_Subprogram_For_Type
  (Node : Bare_Basic_Decl
      ; Typ : Internal_Entity_Base_Type_Decl
      ; Return_Obj : Boolean
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind return_obj Return_Obj
   Property_Result : Boolean;
            procedure Finalizer_Scope_477 with Inline_Always;
            procedure Finalizer_Scope_2377 with Inline_Always;
            procedure Finalizer_Scope_2378 with Inline_Always;
      Local_Root_Stream_Type : Internal_Entity_Base_Type_Decl;
Local_Params : Internal_Entity_Defining_Name_Array_Access;
Var_Expr_95 : Bare_Basic_Decl;
Var_Expr_96 : Internal_Entity_Base_Subp_Spec;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Classwide_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Subp_Spec;
Fld_4 : Internal_Entity_Defining_Name_Array_Access;
Scope_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Result_Var_1 : Internal_Entity_Defining_Name_Array_Access;
Fld_5 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_6 : Boolean;
Get_Result : Internal_Entity_Defining_Name;
Fld_7 : Internal_Entity_Base_Formal_Param_Decl;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Boolean;
If_Result : Boolean;
Fld_10 : Internal_Entity_Base_Subp_Spec;
Fld_11 : Internal_Entity_Base_Type_Decl;
Fld_12 : Boolean;
Get_Result_1 : Internal_Entity_Defining_Name;
Fld_13 : Internal_Entity_Base_Formal_Param_Decl;
Fld_14 : Internal_Entity_Base_Type_Decl;
Fld_15 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
            procedure Finalizer_Scope_477 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Local_Params);
            end Finalizer_Scope_477;
            procedure Finalizer_Scope_2377 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2377;
            procedure Finalizer_Scope_2378 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_2378;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3279 '<Let at nodes.lkt:5853:9>' Let_Result_1 ada/nodes.lkt:5853
--# scope-start
--# expr-start 3258 '<Cast to BaseTypeDecl at nodes.lkt:5854:13>' Cast_Result_1 ada/nodes.lkt:5854
--# expr-start 3257 '<FieldAccess for classwide_type at nodes.lkt:5854:13>' Fld_2 ada/nodes.lkt:5854
--# expr-start 3256 '<Cast to BaseTypeDecl at nodes.lkt:5854:13>' Cast_Result ada/nodes.lkt:5854
--# expr-start 3252 '<FieldAccess for get_unit_root_decl at nodes.lkt:5854:13>' Fld ada/nodes.lkt:5854
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3251 '<ArrayLiteral at nodes.lkt:5855:17>' Array_Lit ada/nodes.lkt:5855
--# expr-start 3249 '<Symbol Ada at nodes.lkt:5855:18>' Sym ada/nodes.lkt:5855
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 3249
--# expr-start 3250 '<Symbol Streams at nodes.lkt:5855:26>' Sym_1 ada/nodes.lkt:5855
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Streams); 
--# expr-done 3250
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 3251
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Ent.Node, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 3252
Var_Expr_95 := Fld;
if Var_Expr_95 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 3255 '<EnvGet at nodes.lkt:5854:13>' Env_Get_Result ada/nodes.lkt:5854
--# expr-start 3253 '<FieldAccess for children_env at nodes.lkt:5854:13>' Fld_1 ada/nodes.lkt:5854
      if Var_Expr_95 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_95);
--# expr-done 3253
--# expr-start 3254 '<Symbol Root_Stream_Type at nodes.lkt:5859:24>' Sym_2 ada/nodes.lkt:5859
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Root_Stream_Type); 
--# expr-done 3254
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 3255
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_2377;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 3256
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 3257
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
--# expr-done 3258
Local_Root_Stream_Type := Cast_Result_1; 
--# bind root_stream_type Local_Root_Stream_Type
--# expr-start 3278 '<Let at nodes.lkt:5863:9>' Let_Result ada/nodes.lkt:5863
--# scope-start
--# expr-start 3259 '<FieldAccess for subp_spec_or_null at nodes.lkt:5863:22>' Fld_3 ada/nodes.lkt:5863
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3259
Var_Expr_96 := Fld_3;
if Var_Expr_96 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 3260 '<FieldAccess for unpacked_formal_params at nodes.lkt:5863:22>' Fld_4 ada/nodes.lkt:5863
      if Var_Expr_96.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Var_Expr_96.Node, E_Info => Var_Expr_96.Info);
--# end
--# expr-done 3260
Scope_Result_1 := Fld_4;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2378;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Local_Params := Result_Var_1; Inc_Ref (Local_Params);
--# bind params Local_Params
--# expr-start 3277 '<bind at nodes.lkt:5865:9>' Dyn_Var_Bind_Result ada/nodes.lkt:5865
--# expr-start 3261 '<FieldAccess for origin_node at nodes.lkt:5865:23>' Fld_5 ada/nodes.lkt:5865
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_5 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 3261
Bound_Origin := Fld_5; 
--# expr-start 3276 '<BooleanBinaryOp And at nodes.lkt:5867:9>' If_Result_2 ada/nodes.lkt:5867
--# expr-start 3267 '<BooleanBinaryOp And at nodes.lkt:5867:9>' If_Result ada/nodes.lkt:5867
--# expr-start 3262 '<FieldAccess for is_subprogram at nodes.lkt:5867:9>' Fld_6 ada/nodes.lkt:5867
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_subprogram
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Is_Subprogram (Node => Self);
--# end
--# expr-done 3262
if Fld_6 then
   --# expr-start 3266 '<FieldAccess for is_access_to at nodes.lkt:5868:13>' Fld_9 ada/nodes.lkt:5868
--# expr-start 3265 '<FieldAccess for formal_type at nodes.lkt:5868:13>' Fld_8 ada/nodes.lkt:5868
--# expr-start 3264 '<FieldAccess for formal_decl at nodes.lkt:5868:13>' Fld_7 ada/nodes.lkt:5868
--# expr-start 3263 '<at at nodes.lkt:5868:13>' Get_Result ada/nodes.lkt:5868
Get_Result := Get (Self, Local_Params, 0, True); 
--# expr-done 3263
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_7 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 3264
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_8 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_7.Node, Origin => Bound_Origin, E_Info => Fld_7.Info);
--# end
--# expr-done 3265
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_access_to
Fld_9 := Libadalang.Implementation.Base_Type_Decl_P_Is_Access_To (Node => Fld_8.Node, Typ => Local_Root_Stream_Type, Origin => Bound_Origin, E_Info => Fld_8.Info);
--# end
--# expr-done 3266
   If_Result := Fld_9;
else
   If_Result := False;
end if;
--# expr-done 3267
if If_Result then
   --# expr-start 3275 '<If at nodes.lkt:5872:13>' If_Result_1 ada/nodes.lkt:5872
if Return_Obj then
   --# expr-start 3270 '<FieldAccess for matching_formal_type at nodes.lkt:5874:17>' Fld_12 ada/nodes.lkt:5874
--# expr-start 3269 '<FieldAccess for return_type at nodes.lkt:5874:17>' Fld_11 ada/nodes.lkt:5874
--# expr-start 3268 '<FieldAccess for subp_spec_or_null at nodes.lkt:5874:17>' Fld_10 ada/nodes.lkt:5874
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_10 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3268
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_11 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Fld_10.Node, Origin => Bound_Origin, E_Info => Fld_10.Info);
--# end
--# expr-done 3269
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_12 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Fld_11.Node, Formal_Type => Typ, Origin => Bound_Origin, E_Info => Fld_11.Info);
--# end
--# expr-done 3270
   If_Result_1 := Fld_12;
else
   --# expr-start 3274 '<FieldAccess for matching_formal_type at nodes.lkt:5878:17>' Fld_15 ada/nodes.lkt:5878
--# expr-start 3273 '<FieldAccess for formal_type at nodes.lkt:5878:17>' Fld_14 ada/nodes.lkt:5878
--# expr-start 3272 '<FieldAccess for formal_decl at nodes.lkt:5878:17>' Fld_13 ada/nodes.lkt:5878
--# expr-start 3271 '<at at nodes.lkt:5878:17>' Get_Result_1 ada/nodes.lkt:5878
Get_Result_1 := Get (Self, Local_Params, 1, True); 
--# expr-done 3271
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_13 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 3272
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_14 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_13.Node, Origin => Bound_Origin, E_Info => Fld_13.Info);
--# end
--# expr-done 3273
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_15 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Fld_14.Node, Formal_Type => Typ, Origin => Bound_Origin, E_Info => Fld_14.Info);
--# end
--# expr-done 3274
   If_Result_1 := Fld_15;
end if;
--# expr-done 3275
   If_Result_2 := If_Result_1;
else
   If_Result_2 := False;
end if;
--# expr-done 3276
Dyn_Var_Bind_Result := If_Result_2; 
--# expr-done 3277
Let_Result := Dyn_Var_Bind_Result; 
--# end
--# expr-done 3278
Let_Result_1 := Let_Result; 
--# end
--# expr-done 3279
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_477;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_477;
                     Finalizer_Scope_2377;
                     Finalizer_Scope_2378;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Stream_Subprogram_For_Type;
--# end
--# property-start BasicDecl.is_put_image_subprogram_for_type ada/nodes.lkt:5886
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Put_Image_Subprogram_For_Type
  (Node : Bare_Basic_Decl
      ; Typ : Internal_Entity_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   Property_Result : Boolean;
            procedure Finalizer_Scope_478 with Inline_Always;
            procedure Finalizer_Scope_2379 with Inline_Always;
      Local_Root_Buffer_Type : Internal_Entity_Base_Type_Decl;
Local_Params : Internal_Entity_Defining_Name_Array_Access;
Var_Expr_97 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Classwide_Type_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Subp_Spec;
Fld_3 : Internal_Entity_Defining_Name_Array_Access;
Scope_Result : Internal_Entity_Defining_Name_Array_Access;
Result_Var : Internal_Entity_Defining_Name_Array_Access;
Fld_4 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_5 : Boolean;
Get_Result : Internal_Entity_Defining_Name;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl;
Fld_7 : Internal_Entity_Base_Type_Decl;
Fld_8 : Boolean;
If_Result : Boolean;
Get_Result_1 : Internal_Entity_Defining_Name;
Fld_9 : Internal_Entity_Base_Formal_Param_Decl;
Fld_10 : Internal_Entity_Base_Type_Decl;
Fld_11 : Boolean;
If_Result_1 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
            procedure Finalizer_Scope_478 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Params);
            end Finalizer_Scope_478;
            procedure Finalizer_Scope_2379 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2379;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3299 '<Let at nodes.lkt:5887:9>' Let_Result_1 ada/nodes.lkt:5887
--# scope-start
--# expr-start 3282 '<Cast to BaseTypeDecl at nodes.lkt:5888:13>' Cast_Result ada/nodes.lkt:5888
--# expr-start 3281 '<FieldAccess for classwide_type at nodes.lkt:5888:13>' Fld_1 ada/nodes.lkt:5888
--# expr-start 3280 '<FieldAccess for root_buffer_type at nodes.lkt:5888:13>' Fld ada/nodes.lkt:5888
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_buffer_type
Fld := Libadalang.Implementation.Ada_Node_P_Root_Buffer_Type (Node => Self);
--# end
--# expr-done 3280
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 3281
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
--# expr-done 3282
Local_Root_Buffer_Type := Cast_Result; 
--# bind root_buffer_type Local_Root_Buffer_Type
--# expr-start 3298 '<Let at nodes.lkt:5889:9>' Let_Result ada/nodes.lkt:5889
--# scope-start
--# expr-start 3283 '<FieldAccess for subp_spec_or_null at nodes.lkt:5889:22>' Fld_2 ada/nodes.lkt:5889
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3283
Var_Expr_97 := Fld_2;
if Var_Expr_97 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 3284 '<FieldAccess for unpacked_formal_params at nodes.lkt:5889:22>' Fld_3 ada/nodes.lkt:5889
      if Var_Expr_97.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Var_Expr_97.Node, E_Info => Var_Expr_97.Info);
--# end
--# expr-done 3284
Scope_Result := Fld_3;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2379;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Params := Result_Var; Inc_Ref (Local_Params);
--# bind params Local_Params
--# expr-start 3297 '<bind at nodes.lkt:5892:13>' Dyn_Var_Bind_Result ada/nodes.lkt:5892
--# expr-start 3285 '<FieldAccess for origin_node at nodes.lkt:5892:27>' Fld_4 ada/nodes.lkt:5892
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_4 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 3285
Bound_Origin := Fld_4; 
--# expr-start 3296 '<BooleanBinaryOp And at nodes.lkt:5894:13>' If_Result_1 ada/nodes.lkt:5894
--# expr-start 3291 '<BooleanBinaryOp And at nodes.lkt:5895:17>' If_Result ada/nodes.lkt:5895
--# expr-start 3286 '<FieldAccess for is_subprogram at nodes.lkt:5895:17>' Fld_5 ada/nodes.lkt:5895
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_subprogram
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Is_Subprogram (Node => Self);
--# end
--# expr-done 3286
if Fld_5 then
   --# expr-start 3290 '<FieldAccess for matching_formal_type at nodes.lkt:5896:21>' Fld_8 ada/nodes.lkt:5896
--# expr-start 3289 '<FieldAccess for formal_type at nodes.lkt:5896:21>' Fld_7 ada/nodes.lkt:5896
--# expr-start 3288 '<FieldAccess for formal_decl at nodes.lkt:5896:21>' Fld_6 ada/nodes.lkt:5896
--# expr-start 3287 '<at at nodes.lkt:5896:21>' Get_Result ada/nodes.lkt:5896
Get_Result := Get (Self, Local_Params, 0, True); 
--# expr-done 3287
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_6 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 3288
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_7 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_6.Node, Origin => Bound_Origin, E_Info => Fld_6.Info);
--# end
--# expr-done 3289
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_8 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Fld_7.Node, Formal_Type => Local_Root_Buffer_Type, Origin => Bound_Origin, E_Info => Fld_7.Info);
--# end
--# expr-done 3290
   If_Result := Fld_8;
else
   If_Result := False;
end if;
--# expr-done 3291
if If_Result then
   --# expr-start 3295 '<FieldAccess for matching_formal_type at nodes.lkt:5899:17>' Fld_11 ada/nodes.lkt:5899
--# expr-start 3294 '<FieldAccess for formal_type at nodes.lkt:5899:17>' Fld_10 ada/nodes.lkt:5899
--# expr-start 3293 '<FieldAccess for formal_decl at nodes.lkt:5899:17>' Fld_9 ada/nodes.lkt:5899
--# expr-start 3292 '<at at nodes.lkt:5899:17>' Get_Result_1 ada/nodes.lkt:5899
Get_Result_1 := Get (Self, Local_Params, 1, True); 
--# expr-done 3292
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_9 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 3293
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_10 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_9.Node, Origin => Bound_Origin, E_Info => Fld_9.Info);
--# end
--# expr-done 3294
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_11 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Fld_10.Node, Formal_Type => Typ, Origin => Bound_Origin, E_Info => Fld_10.Info);
--# end
--# expr-done 3295
   If_Result_1 := Fld_11;
else
   If_Result_1 := False;
end if;
--# expr-done 3296
Dyn_Var_Bind_Result := If_Result_1; 
--# expr-done 3297
Let_Result := Dyn_Var_Bind_Result; 
--# end
--# expr-done 3298
Let_Result_1 := Let_Result; 
--# end
--# expr-done 3299
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_478;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_478;
                     Finalizer_Scope_2379;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Put_Image_Subprogram_For_Type;
--# end
--# property-start BasicDecl.can_be_paramless ada/nodes.lkt:5907
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Can_Be_Paramless
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Info;
Fld_2 : Internal_Metadata;
Fld_3 : Boolean;
Fld_4 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3300 '<FieldAccess for subp_spec_or_null at nodes.lkt:5908:9>' Fld ada/nodes.lkt:5908
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3300
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_0
--# expr-start 3304 '<FieldAccess for paramless at nodes.lkt:5909:21>' Fld_4 ada/nodes.lkt:5909
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3303 '<FieldAccess for dottable_subp at nodes.lkt:5909:34>' Fld_3 ada/nodes.lkt:5909
--# expr-start 3302 '<FieldAccess for md at nodes.lkt:5909:34>' Fld_2 ada/nodes.lkt:5909
--# expr-start 3301 '<FieldAccess for info at nodes.lkt:5909:34>' Fld_1 ada/nodes.lkt:5909
Fld_1 := Ent.Info;
--# expr-done 3301
Fld_2 := Fld_1.Md;
--# expr-done 3302
Fld_3 := Fld_2.Dottable_Subp;
--# expr-done 3303
--# property-call-start BaseFormalParamHolder.paramless
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Paramless (Node => Var_Expr_0.Node, Dottable_Subp => Fld_3, Can_Be => True);
--# end
--# expr-done 3304
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Can_Be_Paramless;
--# end
--# property-start BasicDecl.is_paramless ada/nodes.lkt:5915
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Paramless
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Info;
Fld_2 : Internal_Metadata;
Fld_3 : Boolean;
Fld_4 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3305 '<FieldAccess for subp_spec_or_null at nodes.lkt:5916:9>' Fld ada/nodes.lkt:5916
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3305
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_0
--# expr-start 3309 '<FieldAccess for paramless at nodes.lkt:5917:21>' Fld_4 ada/nodes.lkt:5917
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3308 '<FieldAccess for dottable_subp at nodes.lkt:5917:34>' Fld_3 ada/nodes.lkt:5917
--# expr-start 3307 '<FieldAccess for md at nodes.lkt:5917:34>' Fld_2 ada/nodes.lkt:5917
--# expr-start 3306 '<FieldAccess for info at nodes.lkt:5917:34>' Fld_1 ada/nodes.lkt:5917
Fld_1 := Ent.Info;
--# expr-done 3306
Fld_2 := Fld_1.Md;
--# expr-done 3307
Fld_3 := Fld_2.Dottable_Subp;
--# expr-done 3308
--# property-call-start BaseFormalParamHolder.paramless
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Paramless (Node => Var_Expr_0.Node, Dottable_Subp => Fld_3, Can_Be => False);
--# end
--# expr-done 3309
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Paramless;
--# end
--# property-start BasicDecl.relative_name ada/nodes.lkt:5924
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Relative_Name
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Var_Expr_98 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Name;
Scope_Result : Internal_Entity_Name;
Result_Var : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 3310 '<FieldAccess for defining_name at nodes.lkt:5924:41>' Fld ada/nodes.lkt:5924
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3310
Var_Expr_98 := Fld;
if Var_Expr_98 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 3311 '<FieldAccess for relative_name at nodes.lkt:5924:41>' Fld_1 ada/nodes.lkt:5924
      if Var_Expr_98.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Var_Expr_98.Node, E_Info => Var_Expr_98.Info);
--# end
--# expr-done 3311
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Name;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Relative_Name;
--# end
--# property-start BasicDecl.relative_name_text ada/nodes.lkt:5928
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Relative_Name_Text
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Symbol_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Symbol_Type;
      Var_Expr_99 : Internal_Entity_Name;
Fld : Internal_Entity_Name;
Fld_1 : Symbol_Type;
Scope_Result : Symbol_Type;
Result_Var : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 3312 '<FieldAccess for relative_name at nodes.lkt:5928:40>' Fld ada/nodes.lkt:5928
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.relative_name
Fld := Libadalang.Implementation.Basic_Decl_P_Relative_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3312
Var_Expr_99 := Fld;
if Var_Expr_99 /= No_Entity_Name then
   --# scope-start
--# expr-start 3313 '<FieldAccess for name_symbol at nodes.lkt:5928:40>' Fld_1 ada/nodes.lkt:5928
      if Var_Expr_99.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Var_Expr_99.Node);
--# end
--# expr-done 3313
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Relative_Name_Text;
--# end
--# property-start BasicDecl.name_symbol ada/nodes.lkt:5930
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Name_Symbol
  (Node : Bare_Basic_Decl
  )
   return Symbol_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3316 '<FieldAccess for name_symbol at nodes.lkt:5931:9>' Fld_1 ada/nodes.lkt:5931
--# expr-start 3315 '<FieldAccess for relative_name at nodes.lkt:5931:9>' Fld ada/nodes.lkt:5931
--# expr-start 3314 '<as_bare_entity at nodes.lkt:5931:9>' If_Result ada/nodes.lkt:5931
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 3314
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.relative_name
Fld := Libadalang.Implementation.Basic_Decl_P_Relative_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 3315
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 3316
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Name_Symbol;
--# end
--# property-start BasicDecl.body_part_for_decl ada/nodes.lkt:5941
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Body_Part_For_Decl
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Body_Node
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Body_Node;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Match_0 : Internal_Entity_Body_Stub;
Match_1 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Body_Stub;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Body_Node;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3320 '<Cast to Body at nodes.lkt:5942:9>' Cast_Result_2 ada/nodes.lkt:5942
--# expr-start 3317 '<FieldAccess for next_part_for_decl at nodes.lkt:5942:9>' Fld ada/nodes.lkt:5942
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3317
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind np Var_Expr_0
--# expr-start 3319 '<Match at nodes.lkt:5944:13>' Match_Result ada/nodes.lkt:5944
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Package_Body_Stub .. Ada_Task_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind stub Match_0
--# expr-start 3318 '<FieldAccess for next_part_for_decl at nodes.lkt:5945:40>' Fld_1 ada/nodes.lkt:5945
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Match_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_0.Info);
--# end
--# expr-done 3318
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl .. Ada_Subp_Renaming_Decl | Ada_Entry_Body .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind other Match_1
Let_Result_1 := Match_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 3319
Scope_Result_2 := Match_Result;
   --# end
   Result_Var := Scope_Result_2;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Body_Node
   then
      Cast_Result_2 := Create_Internal_Entity_Body_Node
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result_2 := No_Entity_Body_Node;
   end if;
--# expr-done 3320
         Property_Result := Cast_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Body_Part_For_Decl;
--# end
--# property-start BasicDecl.canonical_part_for_name ada/nodes.lkt:5954
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Canonical_Part_For_Name
  (Node : Bare_Basic_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3321 '<FieldAccess for previous_part_for_name at nodes.lkt:5955:9>' Fld ada/nodes.lkt:5955
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_name'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Name (Node => Ent.Node, Sym => Sym, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3321
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind pp Var_Expr_0
--# expr-start 3322 '<FieldAccess for canonical_part_for_name at nodes.lkt:5956:21>' Fld_1 ada/nodes.lkt:5956
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part_for_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Canonical_Part_For_Name (Node => Var_Expr_0.Node, Sym => Sym, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3322
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := Ent;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Canonical_Part_For_Name;
--# end
--# property-start BasicDecl.most_visible_part ada/nodes.lkt:5965
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Most_Visible_Part
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3325 '<FieldAccess for most_visible_part_for_name at nodes.lkt:5966:9>' Fld_2 ada/nodes.lkt:5966
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3324 '<FieldAccess for name_symbol at nodes.lkt:5967:13>' Fld_1 ada/nodes.lkt:5967
--# expr-start 3323 '<FieldAccess for defining_name_or_raise at nodes.lkt:5967:13>' Fld ada/nodes.lkt:5967
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3323
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 3324
--# property-call-start BasicDecl.most_visible_part_for_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Part_For_Name (Node => Ent.Node, Sym => Fld_1, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3325
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Most_Visible_Part;
--# end
--# property-start BasicDecl.most_visible_part_for_name ada/nodes.lkt:5973
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Most_Visible_Part_For_Name
  (Node : Bare_Basic_Decl
      ; Sym : Symbol_Type
      ; Only_Backwards : Boolean
         := False
      ; Origin : Bare_Ada_Node
      ; Imprecise_Fallback : Boolean
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind only_backwards Only_Backwards
   --# bind origin Origin
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Local_Self_Is_Visible : Boolean;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
Fld : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
As_Entity : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Fld_1 : Boolean;
If_Result_2 : Boolean;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Basic_Decl;
If_Result_3 : Internal_Entity_Basic_Decl;
Not_Val_1 : Boolean;
If_Result_4 : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3339 '<Let at nodes.lkt:5984:9>' Let_Result ada/nodes.lkt:5984
--# scope-start
--# expr-start 3332 '<BooleanBinaryOp Or at nodes.lkt:5985:13>' If_Result_2 ada/nodes.lkt:5985
--# expr-start 3329 '<BooleanBinaryOp Or at nodes.lkt:5985:14>' If_Result ada/nodes.lkt:5985
--# expr-start 3326 '<IsNull at nodes.lkt:5985:14>' Is_Null ada/nodes.lkt:5985
Is_Null := Origin = null; 
--# expr-done 3326
if Is_Null then
   If_Result := True;
else
   --# expr-start 3328 '<Not at nodes.lkt:5985:32>' Not_Val ada/nodes.lkt:5985
--# expr-start 3327 '<FieldAccess for is_in_private_part at nodes.lkt:5985:36>' Fld ada/nodes.lkt:5985
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3327
Not_Val := not (Fld); 
--# expr-done 3328
   If_Result := Not_Val;
end if;
--# expr-done 3329
if If_Result then
   If_Result_2 := True;
else
   --# expr-start 3331 '<FieldAccess for is_visible at nodes.lkt:5986:16>' Fld_1 ada/nodes.lkt:5986
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3330 '<as_bare_entity at nodes.lkt:5986:32>' If_Result_1 ada/nodes.lkt:5986
Is_Null_1 := Origin = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
As_Entity := (Info => No_Entity_Info, Node => Origin); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 3330
--# property-call-start BasicDecl.is_visible
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Is_Visible (Node => Ent.Node, From_Node => If_Result_1, E_Info => Ent.Info);
--# end
--# expr-done 3331
   If_Result_2 := Fld_1;
end if;
--# expr-done 3332
Local_Self_Is_Visible := If_Result_2; 
--# bind self_is_visible Local_Self_Is_Visible
--# expr-start 3338 '<If at nodes.lkt:5990:9>' If_Result_4 ada/nodes.lkt:5990
--# expr-start 3333 '<Not at nodes.lkt:5990:12>' Not_Val_1 ada/nodes.lkt:5990
Not_Val_1 := not (Local_Self_Is_Visible); 
--# expr-done 3333
if Not_Val_1 then
--# expr-start 3334 '<FieldAccess for previous_part_for_name at nodes.lkt:5992:13>' Fld_2 ada/nodes.lkt:5992
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_name'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Name (Node => Ent.Node, Sym => Sym, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3334
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind pp Var_Expr_0
--# expr-start 3335 '<FieldAccess for most_visible_part_for_name at nodes.lkt:5993:25>' Fld_3 ada/nodes.lkt:5993
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.most_visible_part_for_name
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Part_For_Name (Node => Var_Expr_0.Node, Sym => Sym, Only_Backwards => True, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3335
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
   If_Result_4 := Result_Var;
else
   --# expr-start 3337 '<If at nodes.lkt:5990:9>' If_Result_3 ada/nodes.lkt:5990
if Only_Backwards then
   If_Result_3 := Ent;
else
   --# expr-start 3336 '<FieldAccess for most_visible_forward_part_for_name at nodes.lkt:6000:14>' Fld_4 ada/nodes.lkt:6000
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.most_visible_forward_part_for_name
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Forward_Part_For_Name (Node => Ent.Node, Sym => Sym, Seq => True, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3336
   If_Result_3 := Fld_4;
end if;
--# expr-done 3337
   If_Result_4 := If_Result_3;
end if;
--# expr-done 3338
Let_Result := If_Result_4; 
--# end
--# expr-done 3339
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Most_Visible_Part_For_Name;
--# end
--# property-start BasicDecl.most_visible_forward_part_for_name ada/nodes.lkt:6009
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Most_Visible_Forward_Part_For_Name
  (Node : Bare_Basic_Decl
      ; Sym : Symbol_Type
      ; Seq : Boolean
      ; Origin : Bare_Ada_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind seq Seq
   --# bind origin Origin
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_488 with Inline_Always;
      Local_Np : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Lexical_Env := Empty_Env;
Env_Get_Result : Internal_Entity_Array_Access;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Basic_Decl;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity;
Fld_5 : Boolean;
If_Result_3 : Internal_Entity_Basic_Decl;
Fld_6 : Boolean;
Fld_7 : Boolean;
If_Result_4 : Boolean;
Not_Val : Boolean;
If_Result_5 : Internal_Entity_Basic_Decl;
Fld_8 : Internal_Unit;
Fld_9 : Internal_Unit;
Is_Equal : Boolean;
If_Result_6 : Boolean;
Fld_10 : Bare_Basic_Decl;
Node_Comp : Boolean;
If_Result_7 : Boolean;
If_Result_8 : Internal_Entity_Basic_Decl;
Is_Null_2 : Boolean;
If_Result_9 : Internal_Entity_Basic_Decl;
Is_Null_3 : Boolean;
If_Result_10 : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_488 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Env_Get_Result);
            end Finalizer_Scope_488;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3370 '<Let at nodes.lkt:6013:9>' Let_Result ada/nodes.lkt:6013
--# scope-start
--# expr-start 3340 '<FieldAccess for next_part_for_name at nodes.lkt:6013:18>' Fld ada/nodes.lkt:6013
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_name'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Name (Node => Ent.Node, Sym => Sym, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3340
Local_Np := Fld; 
--# bind np Local_Np
--# expr-start 3369 '<If at nodes.lkt:6016:9>' If_Result_10 ada/nodes.lkt:6016
--# expr-start 3341 '<IsNull at nodes.lkt:6016:12>' Is_Null_3 ada/nodes.lkt:6016
Is_Null_3 := Local_Np.Node = null; 
--# expr-done 3341
if Is_Null_3 then
   If_Result_10 := Ent;
else
   --# expr-start 3368 '<If at nodes.lkt:6016:9>' If_Result_9 ada/nodes.lkt:6016
--# expr-start 3342 '<IsNull at nodes.lkt:6019:14>' Is_Null_2 ada/nodes.lkt:6019
Is_Null_2 := Origin = null; 
--# expr-done 3342
if Is_Null_2 then
   --# expr-start 3343 '<FieldAccess for most_visible_forward_part_for_name at nodes.lkt:6020:14>' Fld_1 ada/nodes.lkt:6020
      if Local_Np.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.most_visible_forward_part_for_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Forward_Part_For_Name (Node => Local_Np.Node, Sym => Sym, Seq => Seq, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Local_Np.Info);
--# end
--# expr-done 3343
   If_Result_9 := Fld_1;
else
   --# expr-start 3367 '<If at nodes.lkt:6016:9>' If_Result_8 ada/nodes.lkt:6016
--# expr-start 3350 '<BooleanBinaryOp And at nodes.lkt:6023:14>' If_Result_7 ada/nodes.lkt:6023
--# expr-start 3347 '<BooleanBinaryOp And at nodes.lkt:6023:15>' If_Result_6 ada/nodes.lkt:6023
if Seq then
   --# expr-start 3346 '<Eq at nodes.lkt:6023:23>' Is_Equal ada/nodes.lkt:6023
--# expr-start 3344 '<FieldAccess for unit at nodes.lkt:6023:23>' Fld_8 ada/nodes.lkt:6023
      if Origin = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Unit (Node => Origin);
--# expr-done 3344
--# expr-start 3345 '<FieldAccess for unit at nodes.lkt:6023:38>' Fld_9 ada/nodes.lkt:6023
      if Local_Np.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Unit (Node => Local_Np.Node);
--# expr-done 3345
Is_Equal := Fld_8 = Fld_9; 
--# expr-done 3346
   If_Result_6 := Is_Equal;
else
   If_Result_6 := False;
end if;
--# expr-done 3347
if If_Result_6 then
   --# expr-start 3349 '<OrderingTest '"'"'le'"'"' at nodes.lkt:6023:51>' Node_Comp ada/nodes.lkt:6023
--# expr-start 3348 '<FieldAccess for node at nodes.lkt:6023:61>' Fld_10 ada/nodes.lkt:6023
Fld_10 := Local_Np.Node;
--# expr-done 3348
Node_Comp := Compare (Self, Origin, Fld_10, Less_Or_Equal); 
--# expr-done 3349
   If_Result_7 := Node_Comp;
else
   If_Result_7 := False;
end if;
--# expr-done 3350
if If_Result_7 then
   If_Result_8 := Ent;
else
   --# expr-start 3366 '<If at nodes.lkt:6016:9>' If_Result_5 ada/nodes.lkt:6016
--# expr-start 3354 '<Not at nodes.lkt:6027:14>' Not_Val ada/nodes.lkt:6027
--# expr-start 3353 '<BooleanBinaryOp Or at nodes.lkt:6027:19>' If_Result_4 ada/nodes.lkt:6027
--# expr-start 3351 '<FieldAccess for is_in_private_part at nodes.lkt:6027:19>' Fld_6 ada/nodes.lkt:6027
      if Local_Np.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Local_Np.Node, E_Info => Local_Np.Info);
--# end
--# expr-done 3351
if Fld_6 then
   If_Result_4 := True;
else
   --# expr-start 3352 '<FieldAccess for is_in_public_part at nodes.lkt:6027:46>' Fld_7 ada/nodes.lkt:6027
      if Local_Np.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_public_part'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Public_Part (Node => Local_Np.Node, E_Info => Local_Np.Info);
--# end
--# expr-done 3352
   If_Result_4 := Fld_7;
end if;
--# expr-done 3353
Not_Val := not (If_Result_4); 
--# expr-done 3354
if Not_Val then
   --# expr-start 3361 '<If at nodes.lkt:6029:13>' If_Result_1 ada/nodes.lkt:6029
--# expr-start 3359 '<Contains at nodes.lkt:6030:17>' Quantifier_Result ada/nodes.lkt:6030
   --# expr-start 3356 '<EnvGet at nodes.lkt:6030:17>' Env_Get_Result ada/nodes.lkt:6030
--# expr-start 3355 '<FieldAccess for node_env at nodes.lkt:6030:17>' Fld_3 ada/nodes.lkt:6030
      if Origin = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Node_Env (Node => Origin);
--# expr-done 3355
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_3, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 3356
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_9 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_9
      --# expr-start 3358 '<Eq at ???>' Is_Equiv None
--# expr-start 3357 '<as_bare_entity at nodes.lkt:6037:27>' If_Result ada/nodes.lkt:6037
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 3357
      Cast_Result := Create_Internal_Entity
        (Node => If_Result.Node,
         Info => If_Result.Info);
Is_Equiv := Equivalent (Item_9, Cast_Result); 
--# expr-done 3358
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 3359
if Quantifier_Result then
   --# expr-start 3360 '<FieldAccess for most_visible_forward_part_for_name at nodes.lkt:6038:18>' Fld_2 ada/nodes.lkt:6038
      if Local_Np.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.most_visible_forward_part_for_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Forward_Part_For_Name (Node => Local_Np.Node, Sym => Sym, Seq => Seq, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Local_Np.Info);
--# end
--# expr-done 3360
   If_Result_1 := Fld_2;
else
   If_Result_1 := Ent;
end if;
--# expr-done 3361
   If_Result_5 := If_Result_1;
else
   --# expr-start 3365 '<If at nodes.lkt:6016:9>' If_Result_3 ada/nodes.lkt:6016
--# expr-start 3363 '<FieldAccess for is_visible at nodes.lkt:6043:14>' Fld_5 ada/nodes.lkt:6043
      if Local_Np.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3362 '<as_bare_entity at nodes.lkt:6043:28>' If_Result_2 ada/nodes.lkt:6043
Is_Null_1 := Origin = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Origin); 
   If_Result_2 := As_Entity_1;
end if;
--# expr-done 3362
--# property-call-start BasicDecl.is_visible
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Is_Visible (Node => Local_Np.Node, From_Node => If_Result_2, E_Info => Local_Np.Info);
--# end
--# expr-done 3363
if Fld_5 then
   --# expr-start 3364 '<FieldAccess for most_visible_forward_part_for_name at nodes.lkt:6044:14>' Fld_4 ada/nodes.lkt:6044
      if Local_Np.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.most_visible_forward_part_for_name
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Forward_Part_For_Name (Node => Local_Np.Node, Sym => Sym, Seq => Seq, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Local_Np.Info);
--# end
--# expr-done 3364
   If_Result_3 := Fld_4;
else
   If_Result_3 := Ent;
end if;
--# expr-done 3365
   If_Result_5 := If_Result_3;
end if;
--# expr-done 3366
   If_Result_8 := If_Result_5;
end if;
--# expr-done 3367
   If_Result_9 := If_Result_8;
end if;
--# expr-done 3368
   If_Result_10 := If_Result_9;
end if;
--# expr-done 3369
Let_Result := If_Result_10; 
--# end
--# expr-done 3370
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_488;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_488;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Most_Visible_Forward_Part_For_Name;
--# end
--# property-start BasicDecl.fqn_extra_suffix ada/nodes.lkt:6052
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Fqn_Extra_Suffix
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_489 with Inline_Always;
      Str : String_Type;
Str_1 : String_Type;
Str_2 : String_Type;
Str_3 : String_Type;
Is_A : Boolean;
If_Result : String_Type;
Is_A_1 : Boolean;
If_Result_1 : String_Type;
Is_A_2 : Boolean;
If_Result_2 : String_Type;
            procedure Finalizer_Scope_489 is
            begin
                     Dec_Ref (Str);
                     Dec_Ref (Str_1);
                     Dec_Ref (Str_2);
                     Dec_Ref (Str_3);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_2);
            end Finalizer_Scope_489;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3380 '<If at nodes.lkt:6053:9>' If_Result_2 ada/nodes.lkt:6053
--# expr-start 3371 '<IsA ClasswideTypeDecl at nodes.lkt:6053:12>' Is_A_2 ada/nodes.lkt:6053
Is_A_2 := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Classwide_Type_Decl_Range; 
--# expr-done 3371
if Is_A_2 then
   --# expr-start 3372 '<String at nodes.lkt:6053:43>' Str ada/nodes.lkt:6053
Str := Create_String ("'Class"); 
--# expr-done 3372
   If_Result_2 := Str;
else
   --# expr-start 3379 '<If at nodes.lkt:6053:9>' If_Result_1 ada/nodes.lkt:6053
--# expr-start 3373 '<IsA DiscreteBaseSubtypeDecl at nodes.lkt:6054:14>' Is_A_1 ada/nodes.lkt:6054
Is_A_1 := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Discrete_Base_Subtype_Decl_Range; 
--# expr-done 3373
if Is_A_1 then
   --# expr-start 3374 '<String at nodes.lkt:6054:51>' Str_1 ada/nodes.lkt:6054
Str_1 := Create_String ("'Base"); 
--# expr-done 3374
   If_Result_1 := Str_1;
else
   --# expr-start 3378 '<If at nodes.lkt:6053:9>' If_Result ada/nodes.lkt:6053
--# expr-start 3375 '<IsA SynthAnonymousTypeDecl at nodes.lkt:6062:14>' Is_A ada/nodes.lkt:6062
Is_A := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Synth_Anonymous_Type_Decl_Range; 
--# expr-done 3375
if Is_A then
   --# expr-start 3376 '<String at nodes.lkt:6062:50>' Str_2 ada/nodes.lkt:6062
Str_2 := Create_String ("'Anonymous_Access"); 
--# expr-done 3376
   If_Result := Str_2;
else
   --# expr-start 3377 '<String at nodes.lkt:6063:14>' Str_3 ada/nodes.lkt:6063
Str_3 := Create_String (""); 
--# expr-done 3377
   If_Result := Str_3;
end if;
      Inc_Ref (If_Result);
--# expr-done 3378
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 3379
   If_Result_2 := If_Result_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 3380
         Property_Result := If_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_489;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_489;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Fqn_Extra_Suffix;
--# end
--# property-start BasicDecl.fully_qualified_name_string_array ada/nodes.lkt:6067
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Fully_Qualified_Name_String_Array
  (Node : Bare_Basic_Decl
      ; Include_Profile : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind include_profile Include_Profile
   Property_Result : String_Type_Array_Access;
            procedure Finalizer_Scope_490 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : String_Type;
Fld_2 : String_Type_Array_Access;
            procedure Finalizer_Scope_490 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_490;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3383 '<FieldAccess for fully_qualified_name_impl at nodes.lkt:6070:9>' Fld_2 ada/nodes.lkt:6070
--# expr-start 3381 '<FieldAccess for defining_name_or_raise at nodes.lkt:6070:9>' Fld ada/nodes.lkt:6070
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3381
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3382 '<FieldAccess for fqn_extra_suffix at nodes.lkt:6072:20>' Fld_1 ada/nodes.lkt:6072
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.fqn_extra_suffix
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Fqn_Extra_Suffix (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3382
--# property-call-start DefiningName.fully_qualified_name_impl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Fully_Qualified_Name_Impl (Node => Fld.Node, Include_Profile => Include_Profile, Suffix => Fld_1, E_Info => Fld.Info);
--# end
--# expr-done 3383
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_490;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_490;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Fully_Qualified_Name_String_Array;
--# end
--# property-start BasicDecl.fully_qualified_name_array ada/nodes.lkt:6078
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Fully_Qualified_Name_Array
  (Node : Bare_Basic_Decl
      ; Include_Profile : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind include_profile Include_Profile
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_491 with Inline_Always;
      Fld : String_Type_Array_Access;
Sym : Symbol_Type;
Map_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_491 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_491;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3386 '<Map at nodes.lkt:6081:9>' Map_Result ada/nodes.lkt:6081
   --# expr-start 3384 '<FieldAccess for fully_qualified_name_string_array at nodes.lkt:6081:9>' Fld ada/nodes.lkt:6081
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.fully_qualified_name_string_array
Fld := Libadalang.Implementation.Basic_Decl_P_Fully_Qualified_Name_String_Array (Node => Ent.Node, Include_Profile => Include_Profile, E_Info => Ent.Info);
--# end
--# expr-done 3384
      declare
         Map_Result_Vec : Symbol_Type_Vectors.Vector;
      begin
      declare
         Collection : constant String_Type_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 3385 '<to_symbol at nodes.lkt:6082:21>' Sym ada/nodes.lkt:6082
Sym := String_To_Symbol (Self, Self.Unit.Context, Item_0); 
--# expr-done 3385
         declare
            Item_To_Append : constant Symbol_Type := Sym;
         begin
            Symbol_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Symbol_Type_Array
           (Items_Count => Natural (Symbol_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Symbol_Type_Vectors.Get
              (Map_Result_Vec,
               I + Symbol_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Symbol_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3386
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_491;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_491;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Fully_Qualified_Name_Array;
--# end
--# property-start BasicDecl.fully_qualified_name ada/nodes.lkt:6086
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Fully_Qualified_Name
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_492 with Inline_Always;
      Str : String_Type;
Fld : String_Type_Array_Access;
Join_Result : String_Type;
            procedure Finalizer_Scope_492 is
            begin
                     Dec_Ref (Str);
                     Dec_Ref (Fld);
                     Dec_Ref (Join_Result);
            end Finalizer_Scope_492;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3389 '<Join at nodes.lkt:6087:9>' Join_Result ada/nodes.lkt:6087
--# expr-start 3387 '<String at nodes.lkt:6087:9>' Str ada/nodes.lkt:6087
Str := Create_String ("."); 
--# expr-done 3387
--# expr-start 3388 '<FieldAccess for fully_qualified_name_string_array at nodes.lkt:6087:18>' Fld ada/nodes.lkt:6087
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.fully_qualified_name_string_array
Fld := Libadalang.Implementation.Basic_Decl_P_Fully_Qualified_Name_String_Array (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3388
Join_Result := Join_Strings (Str, Fld); 
--# expr-done 3389
         Property_Result := Join_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_492;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_492;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Fully_Qualified_Name;
--# end
--# property-start BasicDecl.canonical_fully_qualified_name ada/nodes.lkt:6092
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Canonical_Fully_Qualified_Name
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_493 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : String_Type;
Fld_2 : String_Type;
            procedure Finalizer_Scope_493 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_493;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3392 '<FieldAccess for canonical_fully_qualified_name_impl at nodes.lkt:6093:9>' Fld_2 ada/nodes.lkt:6093
--# expr-start 3390 '<FieldAccess for defining_name_or_raise at nodes.lkt:6093:9>' Fld ada/nodes.lkt:6093
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3390
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3391 '<FieldAccess for fqn_extra_suffix at nodes.lkt:6095:20>' Fld_1 ada/nodes.lkt:6095
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.fqn_extra_suffix
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Fqn_Extra_Suffix (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3391
--# property-call-start DefiningName.canonical_fully_qualified_name_impl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Canonical_Fully_Qualified_Name_Impl (Node => Fld.Node, Include_Profile => False, Suffix => Fld_1, E_Info => Fld.Info);
--# end
--# expr-done 3392
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_493;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_493;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Canonical_Fully_Qualified_Name;
--# end
--# property-start BasicDecl.unique_identifying_name ada/nodes.lkt:6107
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Unique_Identifying_Name
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_494 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : String_Type;
Fld_2 : String_Type;
            procedure Finalizer_Scope_494 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_494;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3395 '<FieldAccess for unique_identifying_name_impl at nodes.lkt:6108:9>' Fld_2 ada/nodes.lkt:6108
--# expr-start 3393 '<FieldAccess for defining_name_or_raise at nodes.lkt:6108:9>' Fld ada/nodes.lkt:6108
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3393
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3394 '<FieldAccess for fqn_extra_suffix at nodes.lkt:6109:20>' Fld_1 ada/nodes.lkt:6109
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.fqn_extra_suffix
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Fqn_Extra_Suffix (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3394
--# property-call-start DefiningName.unique_identifying_name_impl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Unique_Identifying_Name_Impl (Node => Fld.Node, Suffix => Fld_1, E_Info => Fld.Info);
--# end
--# expr-done 3395
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_494;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_494;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Unique_Identifying_Name;
--# end
--# property-start BasicDecl.custom_id_text ada/nodes.lkt:6112
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Custom_Id_Text
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_495 with Inline_Always;
            procedure Finalizer_Scope_2391 with Inline_Always;
            procedure Finalizer_Scope_2392 with Inline_Always;
            procedure Finalizer_Scope_2393 with Inline_Always;
            procedure Finalizer_Scope_2394 with Inline_Always;
            procedure Finalizer_Scope_2395 with Inline_Always;
            procedure Finalizer_Scope_2396 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Var_Expr_1 : Internal_Entity_Type_Expr;
Var_Expr_2 : Internal_Entity_Defining_Name_Array_Access;
Var_Expr_4 : Internal_Entity_Type_Expr;
Var_Expr_5 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_Base_Subp_Spec;
Str : String_Type;
Fld_1 : Internal_Entity_Type_Expr;
Str_1 : String_Type;
Scope_Result : String_Type;
Result_Var : String_Type;
Concat_Result : String_Type;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
Str_2 : String_Type;
Fld_3 : Internal_Entity_Base_Formal_Param_Decl;
Fld_4 : Internal_Entity_Type_Expr;
Fld_5 : String_Type;
Map_Result : String_Type_Array_Access;
Join_Result : String_Type;
Scope_Result_1 : String_Type;
Result_Var_1 : String_Type;
Concat_Result_1 : String_Type;
Fld_6 : Internal_Entity_Type_Expr;
Str_3 : String_Type;
Scope_Result_2 : String_Type;
Result_Var_2 : String_Type;
Concat_Result_2 : String_Type;
Fld_7 : Internal_Entity_Type_Expr;
Str_4 : String_Type;
Fld_8 : String_Type;
Concat_Result_3 : String_Type;
Scope_Result_3 : String_Type;
Result_Var_3 : String_Type;
Concat_Result_4 : String_Type;
Str_5 : String_Type;
Concat_Result_5 : String_Type;
Scope_Result_4 : String_Type;
Str_6 : String_Type;
Result_Var_4 : String_Type;
            procedure Finalizer_Scope_495 is
            begin
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Str_6);
                     Dec_Ref (Result_Var_4);
            end Finalizer_Scope_495;
            procedure Finalizer_Scope_2391 is
            begin
                     Dec_Ref (Str);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Concat_Result_2);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Concat_Result_4);
                     Dec_Ref (Str_5);
                     Dec_Ref (Concat_Result_5);
            end Finalizer_Scope_2391;
            procedure Finalizer_Scope_2392 is
            begin
                     Dec_Ref (Str_1);
            end Finalizer_Scope_2392;
            procedure Finalizer_Scope_2393 is
            begin
                     Dec_Ref (Var_Expr_2);
                     Dec_Ref (Str_2);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Join_Result);
            end Finalizer_Scope_2393;
            procedure Finalizer_Scope_2394 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2394;
            procedure Finalizer_Scope_2395 is
            begin
                     Dec_Ref (Str_3);
            end Finalizer_Scope_2395;
            procedure Finalizer_Scope_2396 is
            begin
                     Dec_Ref (Str_4);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Concat_Result_3);
            end Finalizer_Scope_2396;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3396 '<FieldAccess for subp_spec_or_null at nodes.lkt:6113:9>' Fld ada/nodes.lkt:6113
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3396
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_0
--# expr-start 3397 '<String at nodes.lkt:6117:13>' Str ada/nodes.lkt:6117
Str := Create_String ("("); 
--# expr-done 3397
--# expr-start 3398 '<FieldAccess for returns at nodes.lkt:6117:19>' Fld_1 ada/nodes.lkt:6117
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3398
Var_Expr_1 := Fld_1;
if Var_Expr_1 /= No_Entity_Type_Expr then
   --# scope-start
   --# bind _ Var_Expr_1
--# expr-start 3399 '<String at nodes.lkt:6117:42>' Str_1 ada/nodes.lkt:6117
Str_1 := Create_String ("("); 
--# expr-done 3399
Scope_Result := Str_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2392;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_String;
end if;
      Inc_Ref (Result_Var);
Concat_Result := Concat_String (Str, Result_Var); 
--# expr-start 3400 '<FieldAccess for unpacked_formal_params at nodes.lkt:6118:15>' Fld_2 ada/nodes.lkt:6118
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3400
Var_Expr_2 := Fld_2;
      Inc_Ref (Var_Expr_2);
if Var_Expr_2 /= No_Internal_Entity_Defining_Name_Array_Type then
   --# scope-start
   --# bind ufp Var_Expr_2
--# expr-start 3406 '<Join at nodes.lkt:6120:17>' Join_Result ada/nodes.lkt:6120
--# expr-start 3401 '<String at nodes.lkt:6120:17>' Str_2 ada/nodes.lkt:6120
Str_2 := Create_String (", "); 
--# expr-done 3401
--# expr-start 3405 '<Map at nodes.lkt:6121:21>' Map_Result ada/nodes.lkt:6121
      declare
         Map_Result_Vec : String_Type_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Var_Expr_2;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_3
      --# expr-start 3404 '<FieldAccess for custom_id_text at nodes.lkt:6123:25>' Fld_5 ada/nodes.lkt:6123
--# expr-start 3403 '<FieldAccess for type_expression at nodes.lkt:6123:25>' Fld_4 ada/nodes.lkt:6123
--# expr-start 3402 '<FieldAccess for formal_decl at nodes.lkt:6123:25>' Fld_3 ada/nodes.lkt:6123
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_3 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Item_3.Node, E_Info => Item_3.Info);
--# end
--# expr-done 3402
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 3403
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.custom_id_text'
Fld_5 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Custom_Id_Text (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 3404
         declare
            Item_To_Append : constant String_Type := Fld_5;
         begin
               Inc_Ref (Item_To_Append);
            String_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2394;
         end loop;
      end;
         Map_Result := Create_String_Type_Array
           (Items_Count => Natural (String_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := String_Type_Vectors.Get
              (Map_Result_Vec,
               I + String_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         String_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3405
Join_Result := Join_Strings (Str_2, Map_Result); 
--# expr-done 3406
Scope_Result_1 := Join_Result;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2393;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Empty_String;
end if;
      Inc_Ref (Result_Var_1);
Concat_Result_1 := Concat_String (Concat_Result, Result_Var_1); 
--# expr-start 3407 '<FieldAccess for returns at nodes.lkt:6127:15>' Fld_6 ada/nodes.lkt:6127
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3407
Var_Expr_4 := Fld_6;
if Var_Expr_4 /= No_Entity_Type_Expr then
   --# scope-start
   --# bind _ Var_Expr_4
--# expr-start 3408 '<String at nodes.lkt:6127:38>' Str_3 ada/nodes.lkt:6127
Str_3 := Create_String (")"); 
--# expr-done 3408
Scope_Result_2 := Str_3;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2395;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Empty_String;
end if;
      Inc_Ref (Result_Var_2);
Concat_Result_2 := Concat_String (Concat_Result_1, Result_Var_2); 
--# expr-start 3409 '<FieldAccess for returns at nodes.lkt:6128:15>' Fld_7 ada/nodes.lkt:6128
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3409
Var_Expr_5 := Fld_7;
if Var_Expr_5 /= No_Entity_Type_Expr then
   --# scope-start
   --# bind r Var_Expr_5
--# expr-start 3410 '<String at nodes.lkt:6128:38>' Str_4 ada/nodes.lkt:6128
Str_4 := Create_String (" -> "); 
--# expr-done 3410
--# expr-start 3411 '<FieldAccess for custom_id_text at nodes.lkt:6128:47>' Fld_8 ada/nodes.lkt:6128
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.custom_id_text'
Fld_8 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Custom_Id_Text (Node => Var_Expr_5.Node, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 3411
Concat_Result_3 := Concat_String (Str_4, Fld_8); 
Scope_Result_3 := Concat_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2396;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := Empty_String;
end if;
      Inc_Ref (Result_Var_3);
Concat_Result_4 := Concat_String (Concat_Result_2, Result_Var_3); 
--# expr-start 3412 '<String at nodes.lkt:6129:15>' Str_5 ada/nodes.lkt:6129
Str_5 := Create_String (")"); 
--# expr-done 3412
Concat_Result_5 := Concat_String (Concat_Result_4, Str_5); 
Scope_Result_4 := Concat_Result_5;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2391;
   Result_Var_4 := Scope_Result_4;
else
   --# expr-start 3413 '<String at nodes.lkt:6130:25>' Str_6 ada/nodes.lkt:6130
Str_6 := Create_String (""); 
--# expr-done 3413
   Result_Var_4 := Str_6;
end if;
      Inc_Ref (Result_Var_4);
         Property_Result := Result_Var_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_495;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_495;
                     Finalizer_Scope_2391;
                     Finalizer_Scope_2392;
                     Finalizer_Scope_2393;
                     Finalizer_Scope_2394;
                     Finalizer_Scope_2395;
                     Finalizer_Scope_2396;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Custom_Id_Text;
--# end
--# property-start BasicDecl.does_aspects_make_preelaborable ada/nodes.lkt:6139
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Does_Aspects_Make_Preelaborable
  (Node : Bare_Basic_Decl
      ; From_Body : Boolean
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind from_body From_Body
   Property_Result : Boolean;
      Bound_Imprecise_Fallback : Boolean;
Sym : Symbol_Type;
Fld : Boolean;
Sym_1 : Symbol_Type;
Fld_1 : Boolean;
If_Result : Boolean;
Sym_2 : Symbol_Type;
Fld_2 : Boolean;
If_Result_1 : Boolean;
Not_Val : Boolean;
Sym_3 : Symbol_Type;
Fld_3 : Boolean;
Sym_4 : Symbol_Type;
Fld_4 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Boolean;
Dyn_Var_Bind_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3430 '<bind at nodes.lkt:6140:9>' Dyn_Var_Bind_Result ada/nodes.lkt:6140
Bound_Imprecise_Fallback := False; 
--# expr-start 3429 '<BooleanBinaryOp Or at nodes.lkt:6142:9>' If_Result_4 ada/nodes.lkt:6142
--# expr-start 3421 '<BooleanBinaryOp Or at nodes.lkt:6142:9>' If_Result_1 ada/nodes.lkt:6142
--# expr-start 3418 '<BooleanBinaryOp Or at nodes.lkt:6142:9>' If_Result ada/nodes.lkt:6142
--# expr-start 3415 '<FieldAccess for has_aspect at nodes.lkt:6144:13>' Fld ada/nodes.lkt:6144
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3414 '<Symbol Pure at nodes.lkt:6144:29>' Sym ada/nodes.lkt:6144
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pure); 
--# expr-done 3414
--# property-call-start BasicDecl.has_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Ent.Node, Name => Sym, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3415
if Fld then
   If_Result := True;
else
   --# expr-start 3417 '<FieldAccess for has_aspect at nodes.lkt:6146:12>' Fld_1 ada/nodes.lkt:6146
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3416 '<Symbol Preelaborate at nodes.lkt:6146:28>' Sym_1 ada/nodes.lkt:6146
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Preelaborate); 
--# expr-done 3416
--# property-call-start BasicDecl.has_aspect
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Ent.Node, Name => Sym_1, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3417
   If_Result := Fld_1;
end if;
--# expr-done 3418
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 3420 '<FieldAccess for has_aspect at nodes.lkt:6147:12>' Fld_2 ada/nodes.lkt:6147
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3419 '<Symbol Shared_Passive at nodes.lkt:6147:28>' Sym_2 ada/nodes.lkt:6147
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Shared_Passive); 
--# expr-done 3419
--# property-call-start BasicDecl.has_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Ent.Node, Name => Sym_2, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3420
   If_Result_1 := Fld_2;
end if;
--# expr-done 3421
if If_Result_1 then
   If_Result_4 := True;
else
   --# expr-start 3428 '<BooleanBinaryOp And at nodes.lkt:6149:13>' If_Result_3 ada/nodes.lkt:6149
--# expr-start 3422 '<Not at nodes.lkt:6149:13>' Not_Val ada/nodes.lkt:6149
Not_Val := not (From_Body); 
--# expr-done 3422
if Not_Val then
   --# expr-start 3427 '<BooleanBinaryOp Or at nodes.lkt:6151:17>' If_Result_2 ada/nodes.lkt:6151
--# expr-start 3424 '<FieldAccess for has_aspect at nodes.lkt:6153:21>' Fld_3 ada/nodes.lkt:6153
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3423 '<Symbol Remote_Types at nodes.lkt:6153:37>' Sym_3 ada/nodes.lkt:6153
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Remote_Types); 
--# expr-done 3423
--# property-call-start BasicDecl.has_aspect
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Ent.Node, Name => Sym_3, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3424
if Fld_3 then
   If_Result_2 := True;
else
   --# expr-start 3426 '<FieldAccess for has_aspect at nodes.lkt:6155:20>' Fld_4 ada/nodes.lkt:6155
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3425 '<Symbol Remote_Call_Interface at nodes.lkt:6155:36>' Sym_4 ada/nodes.lkt:6155
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Remote_Call_Interface); 
--# expr-done 3425
--# property-call-start BasicDecl.has_aspect
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Ent.Node, Name => Sym_4, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3426
   If_Result_2 := Fld_4;
end if;
--# expr-done 3427
   If_Result_3 := If_Result_2;
else
   If_Result_3 := False;
end if;
--# expr-done 3428
   If_Result_4 := If_Result_3;
end if;
--# expr-done 3429
Dyn_Var_Bind_Result := If_Result_4; 
--# expr-done 3430
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Does_Aspects_Make_Preelaborable;
--# end
--# property-start BasicDecl.wrap_public_reference ada/nodes.lkt:6179
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Wrap_Public_Reference
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr : Internal_Entity_Generic_Instantiation;
Fld : Internal_Entity_Generic_Instantiation;
Scope_Result : Internal_Entity_Generic_Instantiation;
Cast_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Is_A : Boolean;
If_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3433 '<If at nodes.lkt:6180:9>' If_Result ada/nodes.lkt:6180
--# expr-start 3431 '<IsA GenericSubpInternal, GenericPackageInternal at nodes.lkt:6180:12>' Is_A ada/nodes.lkt:6180
Is_A := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Generic_Subp_Internal_Range | Ada_Generic_Package_Internal_Range; 
--# expr-done 3431
if Is_A then
--# expr-start 3432 '<FieldAccess for get_instantiation at nodes.lkt:6181:14>' Fld ada/nodes.lkt:6181
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.get_instantiation
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Instantiation (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3432
Var_Expr := Fld;
if Var_Expr /= No_Entity_Generic_Instantiation then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Scope_Result.Node,
         Info => Scope_Result.Info);
   Result_Var := Cast_Result;
else
   Result_Var := Ent;
end if;
   If_Result := Result_Var;
else
   If_Result := Ent;
end if;
--# expr-done 3433
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Wrap_Public_Reference;
--# end
--# property-start '[dispatcher]BasicDecl.child_decl_initial_env_name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Child_Decl_Initial_Env_Name
  (Node : Bare_Basic_Decl
      ; Private_Part : Boolean
         := False
  )
   return Symbol_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind private_part Private_Part
   Property_Result : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Entry_Index_Spec | Ada_Exception_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.child_decl_initial_env_name
                  Property_Result := Basic_Decl_P_Child_Decl_Initial_Env_Name
                    (Self
                        , Private_Part
                    );
                  --# end
               when Ada_Error_Decl =>
                  --# property-call-start ErrorDecl.child_decl_initial_env_name
                  Property_Result := Error_Decl_P_Child_Decl_Initial_Env_Name
                    (Self
                        , Private_Part
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Child_Decl_Initial_Env_Name;
--# end
--# property-start '[dispatcher]BasicDecl.previous_part_for_decl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Previous_Part_For_Decl
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Package_Internal .. Ada_Number_Decl | Ada_Package_Renaming_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.previous_part_for_decl
                  Property_Result := Basic_Decl_P_Previous_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl .. Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start BaseFormalParamDecl.previous_part_for_decl
                  Property_Result := Base_Formal_Param_Decl_P_Previous_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.previous_part_for_decl
                  Property_Result := Object_Decl_P_Previous_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Previous_Part_For_Decl;
--# end
--# property-start '[dispatcher]BasicDecl.is_static_decl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Is_Static_Decl
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl | Ada_Component_Decl .. Ada_Package_Decl | Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl | Ada_Abstract_Subp_Decl .. Ada_Entry_Decl | Ada_Generic_Subp_Internal | Ada_Accept_Stmt_Body .. Ada_Named_Stmt_Decl | Ada_Package_Renaming_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.is_static_decl
                  Property_Result := Basic_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Expr_Decl =>
                  --# property-call-start AnonymousExprDecl.is_static_decl
                  Property_Result := Anonymous_Expr_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl =>
                  --# property-call-start DiscreteBaseSubtypeDecl.is_static_decl
                  Property_Result := Discrete_Base_Subtype_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Decl =>
                  --# property-call-start SubtypeDecl.is_static_decl
                  Property_Result := Subtype_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_static_decl
                  Property_Result := Type_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Literal_Decl .. Ada_Synthetic_Char_Enum_Lit =>
                  --# property-call-start EnumLiteralDecl.is_static_decl
                  Property_Result := Enum_Literal_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Subp_Decl =>
                  --# property-call-start SyntheticSubpDecl.is_static_decl
                  Property_Result := Synthetic_Subp_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Number_Decl =>
                  --# property-call-start NumberDecl.is_static_decl
                  Property_Result := Number_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.is_static_decl
                  Property_Result := Object_Decl_P_Is_Static_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Is_Static_Decl;
--# end
--# property-start '[dispatcher]BasicDecl.corresponding_actual' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Corresponding_Actual
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Param_Spec | Ada_Generic_Package_Internal .. Ada_Abstract_Subp_Decl | Ada_Subp_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.corresponding_actual
                  Property_Result := Basic_Decl_P_Corresponding_Actual
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start SyntheticFormalParamDecl.corresponding_actual
                  Property_Result := Synthetic_Formal_Param_Decl_P_Corresponding_Actual
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Formal_Subp_Decl .. Ada_Concrete_Formal_Subp_Decl =>
                  --# property-call-start FormalSubpDecl.corresponding_actual
                  Property_Result := Formal_Subp_Decl_P_Corresponding_Actual
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Corresponding_Actual;
--# end
--# property-start '[dispatcher]BasicDecl.is_library_item' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Is_Library_Item
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Synthetic_Formal_Param_Decl | Ada_Package_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.is_library_item
                  Property_Result := Basic_Decl_P_Is_Library_Item
                    (Self
                    );
                  --# end
               when Ada_Generic_Package_Internal =>
                  --# property-call-start GenericPackageInternal.is_library_item
                  Property_Result := Generic_Package_Internal_P_Is_Library_Item
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Is_Library_Item;
--# end
--# property-start '[dispatcher]BasicDecl.declarative_parts' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Declarative_Parts
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Synthetic_Formal_Param_Decl | Ada_Discrete_Base_Subtype_Decl .. Ada_Incomplete_Tagged_Type_Decl | Ada_Anonymous_Type_Decl .. Ada_Null_Subp_Decl | Ada_Subp_Renaming_Decl .. Ada_Task_Body_Stub | Ada_Entry_Index_Spec .. Ada_For_Loop_Var_Decl | Ada_Generic_Subp_Decl .. Ada_Package_Renaming_Decl | Ada_Single_Task_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.declarative_parts
                  Property_Result := Basic_Decl_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Internal .. Ada_Package_Decl =>
                  --# property-call-start BasePackageDecl.declarative_parts
                  Property_Result := Base_Package_Decl_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Protected_Type_Decl =>
                  --# property-call-start ProtectedTypeDecl.declarative_parts
                  Property_Result := Protected_Type_Decl_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start TaskTypeDecl.declarative_parts
                  Property_Result := Task_Type_Decl_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subp_Body =>
                  --# property-call-start SubpBody.declarative_parts
                  Property_Result := Subp_Body_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Body =>
                  --# property-call-start EntryBody.declarative_parts
                  Property_Result := Entry_Body_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Package_Body =>
                  --# property-call-start PackageBody.declarative_parts
                  Property_Result := Package_Body_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Protected_Body =>
                  --# property-call-start ProtectedBody.declarative_parts
                  Property_Result := Protected_Body_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Task_Body =>
                  --# property-call-start TaskBody.declarative_parts
                  Property_Result := Task_Body_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Decl =>
                  --# property-call-start GenericPackageDecl.declarative_parts
                  Property_Result := Generic_Package_Decl_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Single_Protected_Decl =>
                  --# property-call-start SingleProtectedDecl.declarative_parts
                  Property_Result := Single_Protected_Decl_P_Declarative_Parts
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Declarative_Parts;
--# end
--# property-start '[dispatcher]BasicDecl.get_aspect_spec' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Get_Aspect_Spec
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Aspect_Spec
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Aspect_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Subtype_Decl | Ada_Incomplete_Type_Decl .. Ada_For_Loop_Var_Decl | Ada_Generic_Package_Instantiation .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.get_aspect_spec
                  Property_Result := Basic_Decl_P_Get_Aspect_Spec
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.get_aspect_spec
                  Property_Result := Classwide_Type_Decl_P_Get_Aspect_Spec
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Decl .. Ada_Generic_Subp_Decl =>
                  --# property-call-start GenericDecl.get_aspect_spec
                  Property_Result := Generic_Decl_P_Get_Aspect_Spec
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Get_Aspect_Spec;
--# end
--# property-start '[dispatcher]BasicDecl.is_imported' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Is_Imported
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Generic_Package_Decl | Ada_Generic_Package_Instantiation .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.is_imported
                  Property_Result := Basic_Decl_P_Is_Imported
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Decl =>
                  --# property-call-start GenericSubpDecl.is_imported
                  Property_Result := Generic_Subp_Decl_P_Is_Imported
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Is_Imported;
--# end
--# property-start '[dispatcher]BasicDecl.is_in_public_part' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Is_In_Public_Part
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Subtype_Decl | Ada_Incomplete_Type_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.is_in_public_part
                  Property_Result := Basic_Decl_P_Is_In_Public_Part
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.is_in_public_part
                  Property_Result := Classwide_Type_Decl_P_Is_In_Public_Part
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Is_In_Public_Part;
--# end
--# property-start '[dispatcher]BasicDecl.is_in_private_part' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Is_In_Private_Part
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Subtype_Decl | Ada_Incomplete_Type_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.is_in_private_part
                  Property_Result := Basic_Decl_P_Is_In_Private_Part
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.is_in_private_part
                  Property_Result := Classwide_Type_Decl_P_Is_In_Private_Part
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Is_In_Private_Part;
--# end
--# property-start '[dispatcher]BasicDecl.defining_env' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Defining_Env
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl | Ada_Generic_Formal_Obj_Decl .. Ada_Generic_Formal_Type_Decl | Ada_Synthetic_Formal_Param_Decl | Ada_Package_Body_Stub .. Ada_Entry_Body | Ada_Protected_Body | Ada_Error_Decl .. Ada_Exception_Handler | Ada_Generic_Subp_Decl | Ada_Generic_Subp_Renaming_Decl .. Ada_Label_Decl | Ada_Number_Decl | Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.defining_env
                  Property_Result := Basic_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Expr_Decl =>
                  --# property-call-start AnonymousExprDecl.defining_env
                  Property_Result := Anonymous_Expr_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl =>
                  --# property-call-start ComponentDecl.defining_env
                  Property_Result := Component_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Discriminant_Spec =>
                  --# property-call-start DiscriminantSpec.defining_env
                  Property_Result := Discriminant_Spec_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Param_Spec =>
                  --# property-call-start ParamSpec.defining_env
                  Property_Result := Param_Spec_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Internal .. Ada_Package_Decl =>
                  --# property-call-start BasePackageDecl.defining_env
                  Property_Result := Base_Package_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.defining_env
                  Property_Result := Base_Subtype_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.defining_env
                  Property_Result := Classwide_Type_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Incomplete_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl =>
                  --# property-call-start IncompleteTypeDecl.defining_env
                  Property_Result := Incomplete_Type_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Protected_Type_Decl =>
                  --# property-call-start ProtectedTypeDecl.defining_env
                  Property_Result := Protected_Type_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start TaskTypeDecl.defining_env
                  Property_Result := Task_Type_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.defining_env
                  Property_Result := Type_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Subp_Decl .. Ada_Synthetic_Subp_Decl =>
                  --# property-call-start BasicSubpDecl.defining_env
                  Property_Result := Basic_Subp_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Accept_Stmt_Body =>
                  --# property-call-start AcceptStmtBody.defining_env
                  Property_Result := Accept_Stmt_Body_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
                  --# property-call-start BaseSubpBody.defining_env
                  Property_Result := Base_Subp_Body_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Package_Body =>
                  --# property-call-start PackageBody.defining_env
                  Property_Result := Package_Body_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Task_Body =>
                  --# property-call-start TaskBody.defining_env
                  Property_Result := Task_Body_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Index_Spec =>
                  --# property-call-start EntryIndexSpec.defining_env
                  Property_Result := Entry_Index_Spec_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_For_Loop_Var_Decl =>
                  --# property-call-start ForLoopVarDecl.defining_env
                  Property_Result := For_Loop_Var_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Decl =>
                  --# property-call-start GenericPackageDecl.defining_env
                  Property_Result := Generic_Package_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Instantiation =>
                  --# property-call-start GenericPackageInstantiation.defining_env
                  Property_Result := Generic_Package_Instantiation_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Instantiation =>
                  --# property-call-start GenericSubpInstantiation.defining_env
                  Property_Result := Generic_Subp_Instantiation_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Renaming_Decl =>
                  --# property-call-start GenericPackageRenamingDecl.defining_env
                  Property_Result := Generic_Package_Renaming_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Named_Stmt_Decl =>
                  --# property-call-start NamedStmtDecl.defining_env
                  Property_Result := Named_Stmt_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_Extended_Return_Stmt_Object_Decl =>
                  --# property-call-start ObjectDecl.defining_env
                  Property_Result := Object_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start NoTypeObjectRenamingDecl.defining_env
                  Property_Result := No_Type_Object_Renaming_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Package_Renaming_Decl =>
                  --# property-call-start PackageRenamingDecl.defining_env
                  Property_Result := Package_Renaming_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Single_Protected_Decl =>
                  --# property-call-start SingleProtectedDecl.defining_env
                  Property_Result := Single_Protected_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
               when Ada_Single_Task_Decl =>
                  --# property-call-start SingleTaskDecl.defining_env
                  Property_Result := Single_Task_Decl_P_Defining_Env
                    (Self
                        , Origin
                        , Include_Ud_Indexing
                        , Dottable_Type
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Defining_Env;
--# end
--# property-start '[dispatcher]BasicDecl.array_ndims' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Array_Ndims
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Discriminant_Spec .. Ada_Package_Decl | Ada_Abstract_Subp_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.array_ndims
                  Property_Result := Basic_Decl_P_Array_Ndims
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl =>
                  --# property-call-start ComponentDecl.array_ndims
                  Property_Result := Component_Decl_P_Array_Ndims
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.array_ndims
                  Property_Result := Base_Type_Decl_P_Array_Ndims
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.array_ndims
                  Property_Result := Base_Subtype_Decl_P_Array_Ndims
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.array_ndims
                  Property_Result := Type_Decl_P_Array_Ndims
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Array_Ndims;
--# end
--# property-start '[dispatcher]BasicDecl.expr_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Expr_Type
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Package_Decl | Ada_Accept_Stmt_Body | Ada_Package_Body_Stub .. Ada_Task_Body | Ada_Error_Decl .. Ada_Exception_Decl | Ada_Generic_Package_Decl .. Ada_Generic_Package_Instantiation | Ada_Generic_Package_Renaming_Decl .. Ada_Named_Stmt_Decl | Ada_Object_Decl .. Ada_Extended_Return_Stmt_Object_Decl | Ada_Package_Renaming_Decl .. Ada_Single_Protected_Decl | Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.expr_type
                  Property_Result := Basic_Decl_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.expr_type
                  Property_Result := Base_Type_Decl_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Subp_Decl .. Ada_Synthetic_Subp_Decl =>
                  --# property-call-start BasicSubpDecl.expr_type
                  Property_Result := Basic_Subp_Decl_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
                  --# property-call-start BaseSubpBody.expr_type
                  Property_Result := Base_Subp_Body_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Index_Spec =>
                  --# property-call-start EntryIndexSpec.expr_type
                  Property_Result := Entry_Index_Spec_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Exception_Handler =>
                  --# property-call-start ExceptionHandler.expr_type
                  Property_Result := Exception_Handler_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_For_Loop_Var_Decl =>
                  --# property-call-start ForLoopVarDecl.expr_type
                  Property_Result := For_Loop_Var_Decl_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Instantiation =>
                  --# property-call-start GenericSubpInstantiation.expr_type
                  Property_Result := Generic_Subp_Instantiation_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Number_Decl =>
                  --# property-call-start NumberDecl.expr_type
                  Property_Result := Number_Decl_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start NoTypeObjectRenamingDecl.expr_type
                  Property_Result := No_Type_Object_Renaming_Decl_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Single_Task_Decl =>
                  --# property-call-start SingleTaskDecl.expr_type
                  Property_Result := Single_Task_Decl_P_Expr_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Expr_Type;
--# end
--# property-start '[dispatcher]BasicDecl.type_expression' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Type_Expression
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Generic_Package_Internal .. Ada_Formal_Type_Decl | Ada_Accept_Stmt_Body | Ada_Package_Body_Stub .. Ada_Protected_Body_Stub | Ada_Task_Body_Stub .. Ada_Number_Decl | Ada_Package_Renaming_Decl .. Ada_Single_Task_Decl =>
                  --# property-call-start BasicDecl.type_expression
                  Property_Result := Basic_Decl_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_State_Decl =>
                  --# property-call-start AbstractStateDecl.type_expression
                  Property_Result := Abstract_State_Decl_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Expr_Decl =>
                  --# property-call-start AnonymousExprDecl.type_expression
                  Property_Result := Anonymous_Expr_Decl_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl =>
                  --# property-call-start ComponentDecl.type_expression
                  Property_Result := Component_Decl_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discriminant_Spec =>
                  --# property-call-start DiscriminantSpec.type_expression
                  Property_Result := Discriminant_Spec_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Formal_Obj_Decl .. Ada_Generic_Formal_Type_Decl =>
                  --# property-call-start GenericFormal.type_expression
                  Property_Result := Generic_Formal_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Param_Spec =>
                  --# property-call-start ParamSpec.type_expression
                  Property_Result := Param_Spec_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start SyntheticFormalParamDecl.type_expression
                  Property_Result := Synthetic_Formal_Param_Decl_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Subp_Decl .. Ada_Synthetic_Subp_Decl =>
                  --# property-call-start BasicSubpDecl.type_expression
                  Property_Result := Basic_Subp_Decl_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
                  --# property-call-start BaseSubpBody.type_expression
                  Property_Result := Base_Subp_Body_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subp_Body_Stub =>
                  --# property-call-start SubpBodyStub.type_expression
                  Property_Result := Subp_Body_Stub_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.type_expression
                  Property_Result := Object_Decl_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Object_Decl =>
                  --# property-call-start SyntheticObjectDecl.type_expression
                  Property_Result := Synthetic_Object_Decl_P_Type_Expression
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Type_Expression;
--# end
--# property-start '[dispatcher]BasicDecl.constrain_prefix' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Constrain_Prefix
  (Node : Bare_Basic_Decl
      ; Prefix : Bare_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind prefix Prefix
   --# bind origin Origin
   Property_Result : Logic_Equation;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Package_Internal .. Ada_Formal_Type_Decl | Ada_Accept_Stmt_Body | Ada_Package_Body_Stub .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.constrain_prefix
                  Property_Result := Basic_Decl_P_Constrain_Prefix
                    (Self
                        , Prefix
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl .. Ada_Generic_Formal_Type_Decl | Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start BaseFormalParamDecl.constrain_prefix
                  Property_Result := Base_Formal_Param_Decl_P_Constrain_Prefix
                    (Self
                        , Prefix
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Param_Spec =>
                  --# property-call-start ParamSpec.constrain_prefix
                  Property_Result := Param_Spec_P_Constrain_Prefix
                    (Self
                        , Prefix
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Subp_Decl .. Ada_Synthetic_Subp_Decl =>
                  --# property-call-start BasicSubpDecl.constrain_prefix
                  Property_Result := Basic_Subp_Decl_P_Constrain_Prefix
                    (Self
                        , Prefix
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
                  --# property-call-start BaseSubpBody.constrain_prefix
                  Property_Result := Base_Subp_Body_P_Constrain_Prefix
                    (Self
                        , Prefix
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Constrain_Prefix;
--# end
--# property-start '[dispatcher]BasicDecl.next_part_for_decl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Next_Part_For_Decl
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Package_Internal .. Ada_Package_Decl | Ada_Entry_Index_Spec .. Ada_Error_Decl | Ada_Exception_Handler .. Ada_For_Loop_Var_Decl | Ada_Generic_Package_Instantiation .. Ada_Number_Decl | Ada_Package_Renaming_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.next_part_for_decl
                  Property_Result := Basic_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl .. Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start BaseFormalParamDecl.next_part_for_decl
                  Property_Result := Base_Formal_Param_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.next_part_for_decl
                  Property_Result := Base_Type_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Abstract_Subp_Decl .. Ada_Subp_Decl | Ada_Enum_Literal_Decl .. Ada_Generic_Subp_Internal =>
                  --# property-call-start BasicSubpDecl.next_part_for_decl
                  Property_Result := Basic_Subp_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Decl =>
                  --# property-call-start EntryDecl.next_part_for_decl
                  Property_Result := Entry_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Subp_Decl =>
                  --# property-call-start SyntheticSubpDecl.next_part_for_decl
                  Property_Result := Synthetic_Subp_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Accept_Stmt_Body .. Ada_Subp_Renaming_Decl | Ada_Entry_Body .. Ada_Task_Body =>
                  --# property-call-start Body.next_part_for_decl
                  Property_Result := Body_Node_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Package_Body_Stub .. Ada_Task_Body_Stub =>
                  --# property-call-start BodyStub.next_part_for_decl
                  Property_Result := Body_Stub_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Exception_Decl =>
                  --# property-call-start ExceptionDecl.next_part_for_decl
                  Property_Result := Exception_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Package_Decl =>
                  --# property-call-start GenericDecl.next_part_for_decl
                  Property_Result := Generic_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Decl =>
                  --# property-call-start GenericSubpDecl.next_part_for_decl
                  Property_Result := Generic_Subp_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.next_part_for_decl
                  Property_Result := Object_Decl_P_Next_Part_For_Decl
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Next_Part_For_Decl;
--# end
--# property-start '[dispatcher]BasicDecl.next_part_for_name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Next_Part_For_Name
  (Node : Bare_Basic_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Package_Internal .. Ada_Number_Decl | Ada_Package_Renaming_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.next_part_for_name
                  Property_Result := Basic_Decl_P_Next_Part_For_Name
                    (Self
                        , Sym
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl .. Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start BaseFormalParamDecl.next_part_for_name
                  Property_Result := Base_Formal_Param_Decl_P_Next_Part_For_Name
                    (Self
                        , Sym
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.next_part_for_name
                  Property_Result := Object_Decl_P_Next_Part_For_Name
                    (Self
                        , Sym
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Next_Part_For_Name;
--# end
--# property-start '[dispatcher]BasicDecl.previous_part_for_name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Previous_Part_For_Name
  (Node : Bare_Basic_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Package_Internal .. Ada_Number_Decl | Ada_Package_Renaming_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.previous_part_for_name
                  Property_Result := Basic_Decl_P_Previous_Part_For_Name
                    (Self
                        , Sym
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl .. Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start BaseFormalParamDecl.previous_part_for_name
                  Property_Result := Base_Formal_Param_Decl_P_Previous_Part_For_Name
                    (Self
                        , Sym
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.previous_part_for_name
                  Property_Result := Object_Decl_P_Previous_Part_For_Name
                    (Self
                        , Sym
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Previous_Part_For_Name;
--# end
--# property-start '[dispatcher]BasicDecl.is_constant_object' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Decl_P_Is_Constant_Object
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Decl (Self.Kind) is
               when Ada_Abstract_State_Decl .. Ada_Anonymous_Expr_Decl | Ada_Generic_Formal_Obj_Decl .. Ada_Generic_Formal_Type_Decl | Ada_Synthetic_Formal_Param_Decl .. Ada_Concrete_Formal_Subp_Decl | Ada_Entry_Decl | Ada_Generic_Subp_Internal .. Ada_Exception_Decl | Ada_Generic_Package_Decl .. Ada_Named_Stmt_Decl | Ada_Package_Renaming_Decl .. Ada_Synthetic_Object_Decl =>
                  --# property-call-start BasicDecl.is_constant_object
                  Property_Result := Basic_Decl_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Component_Decl =>
                  --# property-call-start ComponentDecl.is_constant_object
                  Property_Result := Component_Decl_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discriminant_Spec =>
                  --# property-call-start DiscriminantSpec.is_constant_object
                  Property_Result := Discriminant_Spec_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Param_Spec =>
                  --# property-call-start ParamSpec.is_constant_object
                  Property_Result := Param_Spec_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subp_Decl =>
                  --# property-call-start SubpDecl.is_constant_object
                  Property_Result := Subp_Decl_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Literal_Decl .. Ada_Synthetic_Char_Enum_Lit =>
                  --# property-call-start EnumLiteralDecl.is_constant_object
                  Property_Result := Enum_Literal_Decl_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Exception_Handler =>
                  --# property-call-start ExceptionHandler.is_constant_object
                  Property_Result := Exception_Handler_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_For_Loop_Var_Decl =>
                  --# property-call-start ForLoopVarDecl.is_constant_object
                  Property_Result := For_Loop_Var_Decl_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Number_Decl =>
                  --# property-call-start NumberDecl.is_constant_object
                  Property_Result := Number_Decl_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
                  --# property-call-start ObjectDecl.is_constant_object
                  Property_Result := Object_Decl_P_Is_Constant_Object
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Decl_P_Is_Constant_Object;
--# end
--# property-start BasicDecl.child_decl_initial_env_name ada/nodes.lkt:6189
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Child_Decl_Initial_Env_Name
  (Node : Bare_Basic_Decl
      ; Private_Part : Boolean
         := False
  )
   return Symbol_Type
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind private_part Private_Part
   Property_Result : Symbol_Type;
            procedure Finalizer_Scope_498 with Inline_Always;
            procedure Finalizer_Scope_2398 with Inline_Always;
      Local_Defining_Name : Internal_Entity_Defining_Name;
Local_Child_Name : Internal_Entity_Dotted_Name;
Var_Expr_0 : Internal_Entity_Dotted_Name;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Name;
Cast_Result : Internal_Entity_Dotted_Name;
Fld_2 : Internal_Entity_Name;
Fld_3 : String_Type;
Str : String_Type;
Concat_Result : String_Type;
Sym : Symbol_Type;
Fld_4 : Internal_Entity_Name;
Fld_5 : String_Type;
Sym_1 : Symbol_Type;
If_Result_1 : Symbol_Type;
Scope_Result : Symbol_Type;
Sym_2 : Symbol_Type;
Result_Var : Symbol_Type;
Fld_6 : Boolean;
If_Result_2 : Symbol_Type;
Fld_7 : String_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Is_Equal : Boolean;
If_Result_3 : Symbol_Type;
Let_Result : Symbol_Type;
Let_Result_1 : Symbol_Type;
            procedure Finalizer_Scope_498 is
            begin
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_498;
            procedure Finalizer_Scope_2398 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2398;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3455 '<Let at nodes.lkt:6190:9>' Let_Result_1 ada/nodes.lkt:6190
--# scope-start
--# expr-start 3435 '<FieldAccess for defining_name at nodes.lkt:6190:29>' Fld ada/nodes.lkt:6190
--# expr-start 3434 '<as_bare_entity at nodes.lkt:6190:29>' If_Result ada/nodes.lkt:6190
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 3434
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 3435
Local_Defining_Name := Fld; 
--# bind defining_name Local_Defining_Name
--# expr-start 3454 '<Let at nodes.lkt:6191:9>' Let_Result ada/nodes.lkt:6191
--# scope-start
--# expr-start 3437 '<Cast to DottedName at nodes.lkt:6191:26>' Cast_Result ada/nodes.lkt:6191
--# expr-start 3436 '<FieldAccess for name at nodes.lkt:6191:26>' Fld_1 ada/nodes.lkt:6191
      if Local_Defining_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Local_Defining_Name.Node.Defining_Name_F_Name, Info => Local_Defining_Name.Info);
--# expr-done 3436
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Create_Internal_Entity_Dotted_Name
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Dotted_Name;
   end if;
--# expr-done 3437
Local_Child_Name := Cast_Result; 
--# bind child_name Local_Child_Name
--# expr-start 3453 '<If at nodes.lkt:6195:9>' If_Result_3 ada/nodes.lkt:6195
--# expr-start 3441 '<Eq at nodes.lkt:6195:12>' Is_Equal ada/nodes.lkt:6195
--# expr-start 3439 '<to_symbol at nodes.lkt:6195:12>' Sym_3 ada/nodes.lkt:6195
--# expr-start 3438 '<FieldAccess for text at nodes.lkt:6195:12>' Fld_7 ada/nodes.lkt:6195
      if Local_Defining_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Text (Node => Local_Defining_Name.Node);
--# expr-done 3438
Sym_3 := String_To_Symbol (Self, Self.Unit.Context, Fld_7); 
--# expr-done 3439
--# expr-start 3440 '<Symbol standard at nodes.lkt:6195:44>' Sym_4 ada/nodes.lkt:6195
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Standard_411); 
--# expr-done 3440
Is_Equal := Sym_3 = Sym_4; 
--# expr-done 3441
if Is_Equal then
   If_Result_3 := No_Symbol;
else
   --# expr-start 3452 '<If at nodes.lkt:6195:9>' If_Result_2 ada/nodes.lkt:6195
--# expr-start 3442 '<FieldAccess for is_library_item at nodes.lkt:6196:14>' Fld_6 ada/nodes.lkt:6196
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Self);
--# end
--# expr-done 3442
if Fld_6 then
Var_Expr_0 := Local_Child_Name;
if Var_Expr_0 /= No_Entity_Dotted_Name then
   --# scope-start
   --# bind n Var_Expr_0
--# expr-start 3450 '<If at nodes.lkt:6202:17>' If_Result_1 ada/nodes.lkt:6202
if Private_Part then
   --# expr-start 3446 '<to_symbol at nodes.lkt:6203:22>' Sym ada/nodes.lkt:6203
--# expr-start 3444 '<FieldAccess for text at nodes.lkt:6203:23>' Fld_3 ada/nodes.lkt:6203
--# expr-start 3443 '<FieldAccess for prefix at nodes.lkt:6203:23>' Fld_2 ada/nodes.lkt:6203
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Dotted_Name_F_Prefix, Info => Var_Expr_0.Info);
--# expr-done 3443
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Text (Node => Fld_2.Node);
--# expr-done 3444
--# expr-start 3445 '<String at nodes.lkt:6203:39>' Str ada/nodes.lkt:6203
Str := Create_String (".__privatepart"); 
--# expr-done 3445
Concat_Result := Concat_String (Fld_3, Str); 
Sym := String_To_Symbol (Self, Self.Unit.Context, Concat_Result); 
--# expr-done 3446
   If_Result_1 := Sym;
else
   --# expr-start 3449 '<to_symbol at nodes.lkt:6204:22>' Sym_1 ada/nodes.lkt:6204
--# expr-start 3448 '<FieldAccess for text at nodes.lkt:6204:22>' Fld_5 ada/nodes.lkt:6204
--# expr-start 3447 '<FieldAccess for prefix at nodes.lkt:6204:22>' Fld_4 ada/nodes.lkt:6204
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Dotted_Name_F_Prefix, Info => Var_Expr_0.Info);
--# expr-done 3447
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Text (Node => Fld_4.Node);
--# expr-done 3448
Sym_1 := String_To_Symbol (Self, Self.Unit.Context, Fld_5); 
--# expr-done 3449
   If_Result_1 := Sym_1;
end if;
--# expr-done 3450
Scope_Result := If_Result_1;
   --# end
      Finalizer_Scope_2398;
   Result_Var := Scope_Result;
else
   --# expr-start 3451 '<Symbol standard at nodes.lkt:6205:29>' Sym_2 ada/nodes.lkt:6205
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Standard_411); 
--# expr-done 3451
   Result_Var := Sym_2;
end if;
   If_Result_2 := Result_Var;
else
   If_Result_2 := No_Symbol;
end if;
--# expr-done 3452
   If_Result_3 := If_Result_2;
end if;
--# expr-done 3453
Let_Result := If_Result_3; 
--# end
--# expr-done 3454
Let_Result_1 := Let_Result; 
--# end
--# expr-done 3455
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_498;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_498;
                     Finalizer_Scope_2398;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Child_Decl_Initial_Env_Name;
--# end
--# property-start BasicDecl.previous_part_for_decl ada/nodes.lkt:6220
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Previous_Part_For_Decl
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Match_0 : Internal_Entity_Base_Type_Decl;
Match_1 : Internal_Entity_Body_Node;
Match_2 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Body_Node;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3459 '<Match at nodes.lkt:6220:55>' Match_Result ada/nodes.lkt:6220
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind btd Match_0
--# expr-start 3457 '<Cast to BasicDecl at nodes.lkt:6221:35>' Cast_Result ada/nodes.lkt:6221
--# expr-start 3456 '<FieldAccess for previous_part at nodes.lkt:6221:35>' Fld ada/nodes.lkt:6221
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.previous_part
Fld := Libadalang.Implementation.Base_Type_Decl_P_Previous_Part (Node => Match_0.Node, Go_To_Incomplete => True, E_Info => Match_0.Info);
--# end
--# expr-done 3456
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
--# expr-done 3457
Let_Result := Cast_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Accept_Stmt_Body .. Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Body_Node
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind bd Match_1
--# expr-start 3458 '<FieldAccess for previous_part_internal at nodes.lkt:6222:26>' Fld_1 ada/nodes.lkt:6222
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.previous_part_internal
Fld_1 := Libadalang.Implementation.Body_Node_P_Previous_Part_Internal (Node => Match_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_1.Info);
--# end
--# expr-done 3458
Let_Result_1 := Fld_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Package_Decl | Ada_Abstract_Subp_Decl .. Ada_Synthetic_Subp_Decl | Ada_Entry_Index_Spec .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Basic_Decl; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 3459
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Previous_Part_For_Decl;
--# end
--# property-start BasicDecl.is_static_decl ada/nodes.lkt:6229
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Static_Decl
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Static_Decl;
--# end
--# property-start BasicDecl.corresponding_actual ada/nodes.lkt:6233
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Corresponding_Actual
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Ent;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Corresponding_Actual;
--# end
--# property-start BasicDecl.is_library_item ada/nodes.lkt:6236
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Library_Item
  (Node : Bare_Basic_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3461 '<IsA LibraryItem at nodes.lkt:6236:35>' Is_A ada/nodes.lkt:6236
--# expr-start 3460 '<parent at nodes.lkt:6236:35>' Fld ada/nodes.lkt:6236
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 3460
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range; 
--# expr-done 3461
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Library_Item;
--# end
--# property-start BasicDecl.declarative_parts ada/nodes.lkt:6240
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Declarative_Parts
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Declarative_Part_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Declarative_Parts;
--# end
--# property-start BasicDecl.get_aspect_spec ada/nodes.lkt:6246
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Get_Aspect_Spec
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Aspect_Spec
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Aspect_Spec;
      Fld : Internal_Entity_Aspect_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3462 '<FieldAccess for aspects at nodes.lkt:6246:49>' Fld ada/nodes.lkt:6246
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Aspect_Spec (Node => Implementation.Basic_Decl_F_Aspects (Ent.Node), Info => Ent.Info);
--# expr-done 3462
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Get_Aspect_Spec;
--# end
--# property-start BasicDecl.is_imported ada/nodes.lkt:6250
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Imported
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_100 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3463 '<FieldAccess for defining_name_or_raise at nodes.lkt:6250:31>' Fld ada/nodes.lkt:6250
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3463
Var_Expr_100 := Fld;
if Var_Expr_100 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 3464 '<FieldAccess for is_imported at nodes.lkt:6250:31>' Fld_1 ada/nodes.lkt:6250
      if Var_Expr_100.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.is_imported
Fld_1 := Libadalang.Implementation.Defining_Name_P_Is_Imported (Node => Var_Expr_100.Node, E_Info => Var_Expr_100.Info);
--# end
--# expr-done 3464
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Imported;
--# end
--# property-start BasicDecl.is_in_public_part ada/nodes.lkt:6252
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_In_Public_Part
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3467 '<IsA PublicPart at nodes.lkt:6252:37>' Is_A ada/nodes.lkt:6252
--# expr-start 3466 '<parent at nodes.lkt:6252:37>' Fld_1 ada/nodes.lkt:6252
--# expr-start 3465 '<parent at nodes.lkt:6252:37>' Fld ada/nodes.lkt:6252
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 3465
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 3466
Is_A := Fld_1 /= null 
and then Fld_1.Kind in Ada_Public_Part_Range; 
--# expr-done 3467
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_In_Public_Part;
--# end
--# property-start BasicDecl.is_in_private_part ada/nodes.lkt:6254
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_In_Private_Part
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3470 '<IsA PrivatePart at nodes.lkt:6254:38>' Is_A ada/nodes.lkt:6254
--# expr-start 3469 '<parent at nodes.lkt:6254:38>' Fld_1 ada/nodes.lkt:6254
--# expr-start 3468 '<parent at nodes.lkt:6254:38>' Fld ada/nodes.lkt:6254
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 3468
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 3469
Is_A := Fld_1 /= null 
and then Fld_1.Kind in Ada_Private_Part_Range; 
--# expr-done 3470
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_In_Private_Part;
--# end
--# property-start BasicDecl.defining_env ada/nodes.lkt:6261
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Defining_Env
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Empty_Env;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Defining_Env;
--# end
--# property-start BasicDecl.array_ndims ada/nodes.lkt:6264
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Array_Ndims
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Integer;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3472 '<FieldAccess for array_ndims at nodes.lkt:6264:30>' Fld_1 ada/nodes.lkt:6264
--# expr-start 3471 '<FieldAccess for expr_type at nodes.lkt:6264:30>' Fld ada/nodes.lkt:6264
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3471
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.array_ndims'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Array_Ndims (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 3472
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Array_Ndims;
--# end
--# property-start BasicDecl.expr_type ada/nodes.lkt:6283
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Expr_Type
  (Node : Bare_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_Type_Expr;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3473 '<FieldAccess for type_expression at nodes.lkt:6284:9>' Fld ada/nodes.lkt:6284
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3473
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Type_Expr then
   --# scope-start
   --# bind te Var_Expr_0
--# expr-start 3474 '<FieldAccess for designated_type at nodes.lkt:6284:43>' Fld_1 ada/nodes.lkt:6284
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3474
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Expr_Type;
--# end
--# property-start BasicDecl.type_expression ada/nodes.lkt:6289
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Type_Expression
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Expr;
      Node_For_Entity : Bare_Type_Expr;
As_Entity : Internal_Entity_Type_Expr;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3476 '<as_entity at nodes.lkt:6289:47>' If_Result ada/nodes.lkt:6289
--# expr-start 3475 '<No TypeExpr at nodes.lkt:6289:47>' Node_For_Entity ada/nodes.lkt:6289
Node_For_Entity := No_Bare_Ada_Node;
--# expr-done 3475
Is_Null := Node_For_Entity = null; 
if Is_Null then
   If_Result := No_Entity_Type_Expr;
else
As_Entity := (Info => E_Info, Node => Node_For_Entity); 
   If_Result := As_Entity;
end if;
--# expr-done 3476
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Type_Expression;
--# end
--# property-start BasicDecl.constrain_prefix ada/nodes.lkt:6310
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Constrain_Prefix
  (Node : Bare_Basic_Decl
      ; Prefix : Bare_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   --# bind prefix Prefix
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_512 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_512 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_512;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6316:9") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_512;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_512;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Constrain_Prefix;
--# end
--# property-start BasicDecl.next_part_for_decl ada/nodes.lkt:6326
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Next_Part_For_Decl
  (Node : Bare_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_513 with Inline_Always;
      Ignored : Bare_Compilation_Unit;
Match_0 : Bare_Body_Node;
Match_1 : Bare_Basic_Decl;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_101 : Internal_Entity_Basic_Decl;
Var_Expr_102 : Internal_Entity_Defining_Name;
Var_Expr : Internal_Entity_Aspect_Assoc;
Fld : Bare_Compilation_Unit;
Fld_1 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Defining_Name;
Is_A : Boolean;
Is_A_1 : Boolean;
As_Entity_1 : Internal_Entity_Basic_Decl;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Sym : Symbol_Type;
Fld_3 : Internal_Entity_Aspect_Assoc;
Scope_Result : Internal_Entity_Aspect_Assoc;
Sym_1 : Symbol_Type;
Fld_4 : Internal_Entity_Pragma_Node;
Cast_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity;
Result_Var : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Is_Null_2 : Boolean;
Not_Val : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Not_Val_1 : Boolean;
Fld_5 : Bare_Compilation_Unit;
Scope_Result_2 : Bare_Compilation_Unit;
Result_Var_2 : Bare_Compilation_Unit;
Scope_Result_3 : Bare_Compilation_Unit;
Result_Var_3 : Bare_Compilation_Unit;
Match_Prefix : Bare_Basic_Decl;
Cast_Result_2 : Bare_Body_Node;
Let_Result : Bare_Compilation_Unit;
Scope_Result_4 : Bare_Compilation_Unit;
Cast_Result_3 : Bare_Basic_Decl;
Let_Result_1 : Bare_Compilation_Unit;
Scope_Result_5 : Bare_Compilation_Unit;
Match_Result : Bare_Compilation_Unit;
Fld_6 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_513 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_513;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3499 '<Let at nodes.lkt:6329:9>' Let_Result_2 ada/nodes.lkt:6329
--# scope-start
--# expr-start 3494 '<Match at nodes.lkt:6329:17>' Match_Result ada/nodes.lkt:6329
--# expr-start 3478 '<FieldAccess for decl at nodes.lkt:6329:23>' Fld_1 ada/nodes.lkt:6329
--# expr-start 3477 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:6329:23>' Fld ada/nodes.lkt:6329
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Self);
--# end
--# expr-done 3477
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Fld);
--# end
--# expr-done 3478
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_1; 
case Ada_Basic_Decl (Match_Prefix.Kind) is
         when Ada_Accept_Stmt_Body .. Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_0 := Cast_Result_2; 
--# bind _ Match_0
Let_Result := No_Bare_Ada_Node; 
--# end
Scope_Result_4 := Let_Result;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Abstract_State_Decl .. Ada_Synthetic_Subp_Decl | Ada_Entry_Index_Spec .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_1 := Cast_Result_3; 
--# bind b Match_1
--# expr-start 3479 '<as_bare_entity at nodes.lkt:6332:17>' If_Result ada/nodes.lkt:6332
Is_Null := Match_1 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Match_1); 
   If_Result := As_Entity;
end if;
--# expr-done 3479
Var_Expr_101 := If_Result;
if Var_Expr_101 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 3480 '<FieldAccess for defining_name at nodes.lkt:6332:17>' Fld_2 ada/nodes.lkt:6332
      if Var_Expr_101.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_101.Node, E_Info => Var_Expr_101.Info);
--# end
--# expr-done 3480
Var_Expr_102 := Fld_2;
if Var_Expr_102 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 3493 '<FieldAccess for referenced_unit at nodes.lkt:6332:17>' Fld_5 ada/nodes.lkt:6332
      if Var_Expr_102.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3492 '<Not at nodes.lkt:6334:40>' Not_Val_1 ada/nodes.lkt:6334
--# expr-start 3491 '<BooleanBinaryOp Or at nodes.lkt:6335:25>' If_Result_3 ada/nodes.lkt:6335
--# expr-start 3481 '<IsA BasePackageDecl, GenericPackageDecl, GenericInstantiation, PackageRenamingDecl, SubpRenamingDecl, GenericRenamingDecl at nodes.lkt:6340:29>' Is_A ada/nodes.lkt:6340
Is_A := Match_1 /= null 
and then Match_1.Kind in Ada_Base_Package_Decl | Ada_Generic_Package_Decl_Range | Ada_Generic_Instantiation | Ada_Package_Renaming_Decl_Range | Ada_Subp_Renaming_Decl_Range | Ada_Generic_Renaming_Decl; 
--# expr-done 3481
if Is_A then
   If_Result_3 := True;
else
   --# expr-start 3490 '<BooleanBinaryOp And at nodes.lkt:6350:29>' If_Result_2 ada/nodes.lkt:6350
--# expr-start 3482 '<IsA BasicSubpDecl, GenericSubpDecl at nodes.lkt:6350:29>' Is_A_1 ada/nodes.lkt:6350
Is_A_1 := Match_1 /= null 
and then Match_1.Kind in Ada_Basic_Subp_Decl | Ada_Generic_Subp_Decl_Range; 
--# expr-done 3482
if Is_A_1 then
   --# expr-start 3489 '<Not at nodes.lkt:6355:33>' Not_Val ada/nodes.lkt:6355
--# expr-start 3488 '<IsNull at nodes.lkt:6355:37>' Is_Null_2 ada/nodes.lkt:6355
--# expr-start 3483 '<as_entity at nodes.lkt:6355:37>' If_Result_1 ada/nodes.lkt:6355
Is_Null_1 := Match_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Basic_Decl;
else
As_Entity_1 := (Info => E_Info, Node => Match_1); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 3483
Var_Expr_0 := If_Result_1;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind e Var_Expr_0
--# expr-start 3485 '<FieldAccess for get_aspect_assoc at nodes.lkt:6357:37>' Fld_3 ada/nodes.lkt:6357
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3484 '<Symbol Import at nodes.lkt:6357:56>' Sym ada/nodes.lkt:6357
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Import); 
--# expr-done 3484
--# property-call-start BasicDecl.get_aspect_assoc
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect_Assoc (Node => Var_Expr_0.Node, Name => Sym, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3485
Var_Expr := Fld_3;
if Var_Expr /= No_Entity_Aspect_Assoc then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
      Cast_Result := Create_Internal_Entity
        (Node => Scope_Result.Node,
         Info => Scope_Result.Info);
   Result_Var := Cast_Result;
else
--# expr-start 3487 '<FieldAccess for get_pragma at nodes.lkt:6358:41>' Fld_4 ada/nodes.lkt:6358
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3486 '<Symbol Import at nodes.lkt:6358:54>' Sym_1 ada/nodes.lkt:6358
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Import); 
--# expr-done 3486
--# property-call-start BasicDecl.get_pragma
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Get_Pragma (Node => Var_Expr_0.Node, Name => Sym_1, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3487
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   Result_Var := Cast_Result_1;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
Is_Null_2 := Result_Var_1.Node = null; 
--# expr-done 3488
Not_Val := not (Is_Null_2); 
--# expr-done 3489
   If_Result_2 := Not_Val;
else
   If_Result_2 := False;
end if;
--# expr-done 3490
   If_Result_3 := If_Result_2;
end if;
--# expr-done 3491
Not_Val_1 := not (If_Result_3); 
--# expr-done 3492
--# property-call-start Name.referenced_unit
Fld_5 := Libadalang.Implementation.Name_P_Referenced_Unit (Node => Var_Expr_102.Node, Kind => Unit_Body, Not_Found_Is_Error => Not_Val_1);
--# end
--# expr-done 3493
Scope_Result_2 := Fld_5;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Bare_Ada_Node;
end if;
Scope_Result_3 := Result_Var_2;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Bare_Ada_Node;
end if;
Let_Result_1 := Result_Var_3; 
--# end
Scope_Result_5 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 3494
Ignored := Match_Result; 
--# bind _ Ignored
--# expr-start 3498 '<Cast to BasicDecl at nodes.lkt:6367:9>' Cast_Result_4 ada/nodes.lkt:6367
--# expr-start 3497 '<EnvGet at nodes.lkt:6367:9>' Env_Get_Result ada/nodes.lkt:6367
--# expr-start 3495 '<FieldAccess for children_env at nodes.lkt:6367:9>' Fld_6 ada/nodes.lkt:6367
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 3495
--# expr-start 3496 '<Symbol __nextpart at nodes.lkt:6368:13>' Sym_2 ada/nodes.lkt:6368
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Nextpart); 
--# expr-done 3496
Env_Get_Result := AST_Envs.Get_First (Self => Fld_6, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 3497
   if Env_Get_Result.Node = null
      or else Env_Get_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Env_Get_Result.Node,
         Info => Env_Get_Result.Info);
   else
         Cast_Result_4 := No_Entity_Basic_Decl;
   end if;
--# expr-done 3498
Let_Result_2 := Cast_Result_4; 
--# end
--# expr-done 3499
         Property_Result := Let_Result_2;
   --# end
      Finalizer_Scope_513;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_513;
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Next_Part_For_Decl;
--# end
--# property-start BasicDecl.next_part_for_name ada/nodes.lkt:6392
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Next_Part_For_Name
  (Node : Bare_Basic_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3500 '<FieldAccess for next_part_for_decl at nodes.lkt:6395:28>' Fld ada/nodes.lkt:6395
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3500
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Next_Part_For_Name;
--# end
--# property-start BasicDecl.previous_part_for_name ada/nodes.lkt:6414
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Previous_Part_For_Name
  (Node : Bare_Basic_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
     Ent : Internal_Entity_Basic_Decl :=
       Internal_Entity_Basic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3501 '<FieldAccess for previous_part_for_decl at nodes.lkt:6417:28>' Fld ada/nodes.lkt:6417
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_decl'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3501
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Previous_Part_For_Name;
--# end
--# property-start BasicDecl.is_constant_object ada/nodes.lkt:6421
pragma Warnings (Off, "is not referenced");
 function Basic_Decl_P_Is_Constant_Object
  (Node : Bare_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Basic_Decl  := Bare_Basic_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property BasicDecl.is_constant_object not implemented";
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Decl_P_Is_Constant_Object;
--# end
   --
   --  Primitives for Bare_Abstract_State_Decl
   --
      procedure Abstract_State_Decl_Pre_Env_Actions
        (Self            : Bare_Abstract_State_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_0 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:6446:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      end;
      procedure Initialize_Fields_For_Abstract_State_Decl
        (Self : Bare_Abstract_State_Decl
         ; Abstract_State_Decl_F_Name : Bare_Defining_Name
         ; Abstract_State_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Abstract_State_Decl_F_Name := Abstract_State_Decl_F_Name;
            Self.Abstract_State_Decl_F_Aspects := Abstract_State_Decl_F_Aspects;
      end Initialize_Fields_For_Abstract_State_Decl;
   function Abstract_State_Decl_F_Name
     (Node : Bare_Abstract_State_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Abstract_State_Decl_F_Name;
   end;
--# property-start AbstractStateDecl.defining_names ada/nodes.lkt:6441
pragma Warnings (Off, "is not referenced");
 function Abstract_State_Decl_P_Defining_Names
  (Node : Bare_Abstract_State_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Abstract_State_Decl  := Bare_Abstract_State_Decl (Node);
     Ent : Internal_Entity_Abstract_State_Decl :=
       Internal_Entity_Abstract_State_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_517 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_517 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_517;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3503 '<ArrayLiteral at nodes.lkt:6441:57>' Array_Lit ada/nodes.lkt:6441
--# expr-start 3502 '<FieldAccess for name at nodes.lkt:6441:58>' Fld ada/nodes.lkt:6441
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Abstract_State_Decl_F_Name, Info => Ent.Info);
--# expr-done 3502
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 3503
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_517;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_517;
            raise;
      end;
   return Property_Result;
end Abstract_State_Decl_P_Defining_Names;
--# end
--# property-start AbstractStateDecl.type_expression ada/nodes.lkt:6443
pragma Warnings (Off, "is not referenced");
 function Abstract_State_Decl_P_Type_Expression
  (Node : Bare_Abstract_State_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Abstract_State_Decl  := Bare_Abstract_State_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Type_Expr;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Abstract_State_Decl_P_Type_Expression;
--# end
--# property-start AbstractStateDecl._env_mappings_0 ada/nodes.lkt:6446
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_0
  (Node : Bare_Abstract_State_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Abstract_State_Decl  := Bare_Abstract_State_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1664 with Inline_Always;
      Fld : Bare_Defining_Name;
Fld_1 : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Abstract_State_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1664 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1664;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3507 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 3504 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 3504
--# expr-start 3506 '<FieldAccess for name_symbol at nodes.lkt:6446:23>' Fld_1 ada/nodes.lkt:6446
--# expr-start 3505 '<FieldAccess for name at nodes.lkt:6446:23>' Fld ada/nodes.lkt:6446
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Abstract_State_Decl_F_Name;
--# expr-done 3505
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld);
--# end
--# expr-done 3506
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld_1, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 3507
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1664;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1664;
            raise;
      end;
   return Property_Result;
end Env_Mappings_0;
--# end
   --
   --  Primitives for Bare_Anonymous_Expr_Decl
   --
      procedure Initialize_Fields_For_Anonymous_Expr_Decl
        (Self : Bare_Anonymous_Expr_Decl
         ; Anonymous_Expr_Decl_F_Expr : Bare_Expr
        ) is
      begin
            Self.Anonymous_Expr_Decl_F_Expr := Anonymous_Expr_Decl_F_Expr;
      end Initialize_Fields_For_Anonymous_Expr_Decl;
   function Anonymous_Expr_Decl_F_Expr
     (Node : Bare_Anonymous_Expr_Decl) return Bare_Expr
   is
   begin
         return Node.Anonymous_Expr_Decl_F_Expr;
   end;
--# property-start AnonymousExprDecl.defining_names ada/nodes.lkt:6469
pragma Warnings (Off, "is not referenced");
 function Anonymous_Expr_Decl_P_Defining_Names
  (Node : Bare_Anonymous_Expr_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Anonymous_Expr_Decl  := Bare_Anonymous_Expr_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Defining_Name_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Anonymous_Expr_Decl_P_Defining_Names;
--# end
--# property-start AnonymousExprDecl.defining_env ada/nodes.lkt:6475
pragma Warnings (Off, "is not referenced");
 function Anonymous_Expr_Decl_P_Defining_Env
  (Node : Bare_Anonymous_Expr_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Anonymous_Expr_Decl  := Bare_Anonymous_Expr_Decl (Node);
     Ent : Internal_Entity_Anonymous_Expr_Decl :=
       Internal_Entity_Anonymous_Expr_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_520 with Inline_Always;
      Fld : Internal_Entity_Type_Expr;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_520 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_520;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3509 '<FieldAccess for defining_env at nodes.lkt:6475:38>' Fld_1 ada/nodes.lkt:6475
--# expr-start 3508 '<FieldAccess for type_expression at nodes.lkt:6475:38>' Fld ada/nodes.lkt:6475
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3508
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.defining_env
Fld_1 := Libadalang.Implementation.Type_Expr_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 3509
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_520;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_520;
            raise;
      end;
   return Property_Result;
end Anonymous_Expr_Decl_P_Defining_Env;
--# end
--# property-start AnonymousExprDecl.get_formal ada/nodes.lkt:6482
pragma Warnings (Off, "is not referenced");
 function Anonymous_Expr_Decl_P_Get_Formal
  (Node : Bare_Anonymous_Expr_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Anonymous_Expr_Decl  := Bare_Anonymous_Expr_Decl (Node);
     Ent : Internal_Entity_Anonymous_Expr_Decl :=
       Internal_Entity_Anonymous_Expr_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_521 with Inline_Always;
      Local_Assoc : Internal_Entity_Basic_Assoc;
Fld : Internal_Entity_Expr;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Assoc;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Let_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_521 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_521;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Anonymous_Expr_Decl_Anonymous_Expr_Decl_P_Get_Formal,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Anonymous_Expr_Decl,
                                As_Bare_Anonymous_Expr_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Imprecise_Fallback);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Defining_Name;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 3515 '<Let at nodes.lkt:6483:9>' Let_Result ada/nodes.lkt:6483
--# scope-start
--# expr-start 3512 '<Cast to BasicAssoc at nodes.lkt:6483:21>' Cast_Result ada/nodes.lkt:6483
--# expr-start 3511 '<parent at nodes.lkt:6483:21>' Fld_1 ada/nodes.lkt:6483
--# expr-start 3510 '<FieldAccess for expr at nodes.lkt:6483:21>' Fld ada/nodes.lkt:6483
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Anonymous_Expr_Decl_F_Expr, Info => Ent.Info);
--# expr-done 3510
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 3511
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Basic_Assoc
   then
      Cast_Result := Create_Internal_Entity_Basic_Assoc
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Basic_Assoc;
   end if;
--# expr-done 3512
Local_Assoc := Cast_Result; 
--# bind assoc Local_Assoc
--# expr-start 3514 '<at at nodes.lkt:6485:9>' Get_Result ada/nodes.lkt:6485
--# expr-start 3513 '<FieldAccess for get_params at nodes.lkt:6485:9>' Fld_2 ada/nodes.lkt:6485
      if Local_Assoc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicAssoc.get_params
Fld_2 := Libadalang.Implementation.Basic_Assoc_P_Get_Params (Node => Local_Assoc.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Local_Assoc.Info);
--# end
--# expr-done 3513
Get_Result := Get (Self, Fld_2, 0, True); 
--# expr-done 3514
Let_Result := Get_Result; 
--# end
--# expr-done 3515
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_521;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_521;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Defining_Name,
                        As_Internal_Entity_Defining_Name => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Anonymous_Expr_Decl_P_Get_Formal;
--# end
--# property-start AnonymousExprDecl.type_expression ada/nodes.lkt:6491
pragma Warnings (Off, "is not referenced");
 function Anonymous_Expr_Decl_P_Type_Expression
  (Node : Bare_Anonymous_Expr_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Anonymous_Expr_Decl  := Bare_Anonymous_Expr_Decl (Node);
     Ent : Internal_Entity_Anonymous_Expr_Decl :=
       Internal_Entity_Anonymous_Expr_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3518 '<FieldAccess for type_expression at nodes.lkt:6492:9>' Fld_2 ada/nodes.lkt:6492
--# expr-start 3517 '<FieldAccess for basic_decl at nodes.lkt:6492:9>' Fld_1 ada/nodes.lkt:6492
--# expr-start 3516 '<FieldAccess for get_formal at nodes.lkt:6492:9>' Fld ada/nodes.lkt:6492
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AnonymousExprDecl.get_formal
Fld := Libadalang.Implementation.Anonymous_Expr_Decl_P_Get_Formal (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 3516
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 3517
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 3518
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Anonymous_Expr_Decl_P_Type_Expression;
--# end
--# property-start AnonymousExprDecl.is_static_decl ada/nodes.lkt:6495
pragma Warnings (Off, "is not referenced");
 function Anonymous_Expr_Decl_P_Is_Static_Decl
  (Node : Bare_Anonymous_Expr_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Anonymous_Expr_Decl  := Bare_Anonymous_Expr_Decl (Node);
     Ent : Internal_Entity_Anonymous_Expr_Decl :=
       Internal_Entity_Anonymous_Expr_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Expr;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3520 '<FieldAccess for is_static_expr at nodes.lkt:6495:34>' Fld_1 ada/nodes.lkt:6495
--# expr-start 3519 '<FieldAccess for expr at nodes.lkt:6495:34>' Fld ada/nodes.lkt:6495
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Anonymous_Expr_Decl_F_Expr, Info => Ent.Info);
--# expr-done 3519
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_1 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 3520
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Anonymous_Expr_Decl_P_Is_Static_Decl;
--# end
   --
   --  Primitives for Bare_Base_Formal_Param_Decl
   --
--# property-start BaseFormalParamDecl.formal_type ada/nodes.lkt:6507
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Formal_Type
  (Node : Bare_Base_Formal_Param_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Base_Formal_Param_Decl :=
       Internal_Entity_Base_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_103 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_Type_Expr;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 3521 '<FieldAccess for type_expression at nodes.lkt:6508:9>' Fld ada/nodes.lkt:6508
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3521
Var_Expr_103 := Fld;
if Var_Expr_103 /= No_Entity_Type_Expr then
   --# scope-start
--# expr-start 3522 '<FieldAccess for designated_type at nodes.lkt:6508:9>' Fld_1 ada/nodes.lkt:6508
      if Var_Expr_103.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Var_Expr_103.Node, Origin => Origin, E_Info => Var_Expr_103.Info);
--# end
--# expr-done 3522
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Formal_Type;
--# end
--# property-start BaseFormalParamDecl.parent_decl ada/nodes.lkt:6510
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Parent_Decl
  (Node : Bare_Base_Formal_Param_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Base_Formal_Param_Decl :=
       Internal_Entity_Base_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3524 '<Cast to BasicDecl at nodes.lkt:6510:44>' Cast_Result ada/nodes.lkt:6510
--# expr-start 3523 '<FieldAccess for semantic_parent at nodes.lkt:6510:44>' Fld ada/nodes.lkt:6510
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3523
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 3524
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Parent_Decl;
--# end
--# property-start BaseFormalParamDecl.get_param ada/nodes.lkt:6512
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Get_Param
  (Node : Bare_Base_Formal_Param_Decl
      ; Part : Internal_Entity_Basic_Decl
      ; Param : Symbol_Type
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
      --# bind self Self
   --# bind part Part
   --# bind param Param
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_2412 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_104 : Internal_Entity_Base_Formal_Param_Holder;
Fld : Internal_Entity_Base_Formal_Param_Holder;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
Fld_2 : Boolean;
Find_Result : Internal_Entity_Defining_Name;
Scope_Result : Internal_Entity_Defining_Name;
Result_Var : Internal_Entity_Defining_Name;
Scope_Result_1 : Internal_Entity_Defining_Name;
Result_Var_1 : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_2412 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2412;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
Var_Expr_0 := Part;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind d Var_Expr_0
--# expr-start 3525 '<FieldAccess for formal_param_holder_or_null at nodes.lkt:6518:13>' Fld ada/nodes.lkt:6518
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.formal_param_holder_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Formal_Param_Holder_Or_Null (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3525
Var_Expr_104 := Fld;
if Var_Expr_104 /= No_Entity_Base_Formal_Param_Holder then
   --# scope-start
--# expr-start 3528 '<Find at nodes.lkt:6518:13>' Find_Result ada/nodes.lkt:6518
   --# expr-start 3526 '<FieldAccess for unpacked_formal_params at nodes.lkt:6518:13>' Fld_1 ada/nodes.lkt:6518
      if Var_Expr_104.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Var_Expr_104.Node, E_Info => Var_Expr_104.Info);
--# end
--# expr-done 3526
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_1;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind sf Item_1
      --# expr-start 3527 '<FieldAccess for name_is at nodes.lkt:6519:25>' Fld_2 ada/nodes.lkt:6519
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_2 := Libadalang.Implementation.Name_P_Name_Is (Node => Item_1.Node, Sym => Param);
--# end
--# expr-done 3527
      if Fld_2 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Fld_2;
         end loop;
      end;
--# expr-done 3528
Scope_Result := Find_Result;
   --# end
      Finalizer_Scope_2412;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Defining_Name;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Defining_Name;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2412;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Get_Param;
--# end
--# property-start BaseFormalParamDecl.decl_param ada/nodes.lkt:6526
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Decl_Param
  (Node : Bare_Base_Formal_Param_Decl
      ; Param : Internal_Entity_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Base_Formal_Param_Decl :=
       Internal_Entity_Base_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind param Param
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
      Match_0 : Internal_Entity_Base_Subp_Body;
Match_1 : Internal_Entity_Accept_Stmt;
Match_2 : Internal_Entity;
Var_Expr : Internal_Entity_Defining_Name;
Fld : Internal_Entity;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Entry_Decl;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Base_Subp_Body;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Accept_Stmt;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity;
Let_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Fld_3 : Symbol_Type;
Fld_4 : Internal_Entity_Defining_Name;
Scope_Result_3 : Internal_Entity_Defining_Name;
Result_Var : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3534 '<FieldAccess for get_param at nodes.lkt:6527:9>' Fld_4 ada/nodes.lkt:6527
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3532 '<Match at nodes.lkt:6528:13>' Match_Result ada/nodes.lkt:6528
--# expr-start 3529 '<FieldAccess for semantic_parent at nodes.lkt:6528:19>' Fld ada/nodes.lkt:6528
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3529
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Base_Subp_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind body Match_0
--# expr-start 3530 '<FieldAccess for decl_part at nodes.lkt:6529:44>' Fld_1 ada/nodes.lkt:6529
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_1 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Match_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_0.Info);
--# end
--# expr-done 3530
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Accept_Stmt .. Ada_Accept_Stmt_With_Stmts =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Accept_Stmt
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind accept Match_1
--# expr-start 3531 '<FieldAccess for corresponding_entry at nodes.lkt:6530:44>' Fld_2 ada/nodes.lkt:6530
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AcceptStmt.corresponding_entry
Fld_2 := Libadalang.Implementation.Accept_Stmt_P_Corresponding_Entry (Node => Match_1.Node, Origin => No_Bare_Ada_Node, E_Info => Match_1.Info);
--# end
--# expr-done 3531
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Let_Result_1 := Cast_Result_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Accept_Stmt_Body | Ada_Package_Body_Stub .. Ada_Select_When_Part | Ada_For_Loop_Stmt .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Basic_Decl; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 3532
--# expr-start 3533 '<FieldAccess for name_symbol at nodes.lkt:6533:13>' Fld_3 ada/nodes.lkt:6533
      if Param.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Param.Node);
--# end
--# expr-done 3533
--# property-call-start BaseFormalParamDecl.get_param
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Get_Param (Node => Ent.Node, Part => Match_Result, Param => Fld_3);
--# end
--# expr-done 3534
Var_Expr := Fld_4;
if Var_Expr /= No_Entity_Defining_Name then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_3 := Var_Expr;
   --# end
   Result_Var := Scope_Result_3;
else
   Result_Var := Param;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Decl_Param;
--# end
--# property-start BaseFormalParamDecl.next_part_for_name ada/nodes.lkt:6538
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Next_Part_For_Name
  (Node : Bare_Base_Formal_Param_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Base_Formal_Param_Decl :=
       Internal_Entity_Base_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_105 : Internal_Entity_Basic_Decl;
Var_Expr_106 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Result_Var_1 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3537 '<FieldAccess for get_param at nodes.lkt:6539:9>' Fld_2 ada/nodes.lkt:6539
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3535 '<FieldAccess for parent_decl at nodes.lkt:6539:24>' Fld ada/nodes.lkt:6539
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.parent_decl
Fld := Libadalang.Implementation.Base_Formal_Param_Decl_P_Parent_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3535
Var_Expr_105 := Fld;
if Var_Expr_105 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 3536 '<FieldAccess for next_part_for_decl at nodes.lkt:6539:24>' Fld_1 ada/nodes.lkt:6539
      if Var_Expr_105.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Var_Expr_105.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_105.Info);
--# end
--# expr-done 3536
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
--# property-call-start BaseFormalParamDecl.get_param
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Get_Param (Node => Ent.Node, Part => Result_Var, Param => Sym);
--# end
--# expr-done 3537
Var_Expr_106 := Fld_2;
if Var_Expr_106 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 3538 '<FieldAccess for basic_decl at nodes.lkt:6539:9>' Fld_3 ada/nodes.lkt:6539
      if Var_Expr_106.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_3 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Var_Expr_106.Node, E_Info => Var_Expr_106.Info);
--# end
--# expr-done 3538
Scope_Result_1 := Fld_3;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Next_Part_For_Name;
--# end
--# property-start BaseFormalParamDecl.previous_part_for_name ada/nodes.lkt:6543
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Previous_Part_For_Name
  (Node : Bare_Base_Formal_Param_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Base_Formal_Param_Decl :=
       Internal_Entity_Base_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_107 : Internal_Entity_Basic_Decl;
Var_Expr_108 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Result_Var_1 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3541 '<FieldAccess for get_param at nodes.lkt:6544:9>' Fld_2 ada/nodes.lkt:6544
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3539 '<FieldAccess for parent_decl at nodes.lkt:6544:24>' Fld ada/nodes.lkt:6544
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.parent_decl
Fld := Libadalang.Implementation.Base_Formal_Param_Decl_P_Parent_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3539
Var_Expr_107 := Fld;
if Var_Expr_107 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 3540 '<FieldAccess for previous_part_for_decl at nodes.lkt:6544:24>' Fld_1 ada/nodes.lkt:6544
      if Var_Expr_107.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Decl (Node => Var_Expr_107.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_107.Info);
--# end
--# expr-done 3540
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
--# property-call-start BaseFormalParamDecl.get_param
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Get_Param (Node => Ent.Node, Part => Result_Var, Param => Sym);
--# end
--# expr-done 3541
Var_Expr_108 := Fld_2;
if Var_Expr_108 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 3542 '<FieldAccess for basic_decl at nodes.lkt:6544:9>' Fld_3 ada/nodes.lkt:6544
      if Var_Expr_108.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_3 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Var_Expr_108.Node, E_Info => Var_Expr_108.Info);
--# end
--# expr-done 3542
Scope_Result_1 := Fld_3;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Previous_Part_For_Name;
--# end
--# property-start BaseFormalParamDecl.next_part_for_decl ada/nodes.lkt:6548
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Next_Part_For_Decl
  (Node : Bare_Base_Formal_Param_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Base_Formal_Param_Decl :=
       Internal_Entity_Base_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Symbol_Type;
Fld_1 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3544 '<FieldAccess for next_part_for_name at nodes.lkt:6549:9>' Fld_1 ada/nodes.lkt:6549
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3543 '<FieldAccess for name_symbol at nodes.lkt:6549:33>' Fld ada/nodes.lkt:6549
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 3543
--# property-call-start '[dispatcher]BasicDecl.next_part_for_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Name (Node => Ent.Node, Sym => Fld, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3544
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Next_Part_For_Decl;
--# end
--# property-start BaseFormalParamDecl.previous_part_for_decl ada/nodes.lkt:6552
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Previous_Part_For_Decl
  (Node : Bare_Base_Formal_Param_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Base_Formal_Param_Decl :=
       Internal_Entity_Base_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Symbol_Type;
Fld_1 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3546 '<FieldAccess for previous_part_for_name at nodes.lkt:6553:9>' Fld_1 ada/nodes.lkt:6553
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3545 '<FieldAccess for name_symbol at nodes.lkt:6553:37>' Fld ada/nodes.lkt:6553
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 3545
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Name (Node => Ent.Node, Sym => Fld, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3546
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Previous_Part_For_Decl;
--# end
--# property-start '[dispatcher]BaseFormalParamDecl.is_mandatory' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Formal_Param_Decl_P_Is_Mandatory
  (Node : Bare_Base_Formal_Param_Decl
  )
   return Boolean
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Formal_Param_Decl (Self.Kind) is
               when Ada_Component_Decl .. Ada_Generic_Formal_Type_Decl =>
                  --# property-call-start BaseFormalParamDecl.is_mandatory
                  Property_Result := Base_Formal_Param_Decl_P_Is_Mandatory
                    (Self
                    );
                  --# end
               when Ada_Param_Spec =>
                  --# property-call-start ParamSpec.is_mandatory
                  Property_Result := Param_Spec_P_Is_Mandatory
                    (Self
                    );
                  --# end
               when Ada_Synthetic_Formal_Param_Decl =>
                  --# property-call-start SyntheticFormalParamDecl.is_mandatory
                  Property_Result := Synthetic_Formal_Param_Decl_P_Is_Mandatory
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Formal_Param_Decl_P_Is_Mandatory;
--# end
--# property-start BaseFormalParamDecl.container_type ada/nodes.lkt:6559
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Container_Type
  (Node : Bare_Base_Formal_Param_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_533 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result : Bare_Base_Type_Decl;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_533 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_533;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3551 '<as_entity at nodes.lkt:6560:9>' If_Result ada/nodes.lkt:6560
--# expr-start 3550 '<Cast to BaseTypeDecl at nodes.lkt:6560:9>' Cast_Result ada/nodes.lkt:6560
--# expr-start 3549 '<Find at nodes.lkt:6560:9>' Find_Result ada/nodes.lkt:6560
   --# expr-start 3547 '<FieldAccess for parents at nodes.lkt:6560:9>' Node_Parents ada/nodes.lkt:6560
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 3547
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 3548 '<IsA BaseTypeDecl at nodes.lkt:6560:36>' Is_A ada/nodes.lkt:6560
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Base_Type_Decl; 
--# expr-done 3548
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 3549
   if Find_Result = null
      or else Find_Result.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Find_Result;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 3550
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 3551
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_533;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_533;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Container_Type;
--# end
--# property-start BaseFormalParamDecl.constrain_prefix ada/nodes.lkt:6565
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Constrain_Prefix
  (Node : Bare_Base_Formal_Param_Decl
      ; Prefix : Bare_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Base_Formal_Param_Decl :=
       Internal_Entity_Base_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind prefix Prefix
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_534 with Inline_Always;
      True_Rel : Logic_Equation;
Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_2 : Logic_Equation;
And_Pred : Logic_Equation;
Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Quantifier_Result : Boolean;
If_Result : Logic_Equation;
False_Rel : Logic_Equation;
Is_A_1 : Boolean;
If_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_534 is
            begin
                     Dec_Ref (True_Rel);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_2);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Node_Parents);
                     Dec_Ref (If_Result);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_534;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3562 '<If at nodes.lkt:6566:9>' If_Result_1 ada/nodes.lkt:6566
--# expr-start 3552 '<IsA ComponentDecl, DiscriminantSpec at nodes.lkt:6566:12>' Is_A_1 ada/nodes.lkt:6566
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Component_Decl_Range | Ada_Discriminant_Spec_Range; 
--# expr-done 3552
if Is_A_1 then
   --# expr-start 3561 '<If at nodes.lkt:6572:13>' If_Result ada/nodes.lkt:6572
--# expr-start 3555 '<AnyQuantifier at nodes.lkt:6572:16>' Quantifier_Result ada/nodes.lkt:6572
   --# expr-start 3553 '<FieldAccess for parents at nodes.lkt:6572:16>' Node_Parents ada/nodes.lkt:6572
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 3553
      Quantifier_Result := False;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 3554 '<IsA ProtectedDef at nodes.lkt:6572:42>' Is_A ada/nodes.lkt:6572
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Protected_Def_Range; 
--# expr-done 3554
      Quantifier_Result := Is_A;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 3555
if Quantifier_Result then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6573:18") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 3560 '<LogicBinaryOp And at nodes.lkt:6575:17>' And_Pred ada/nodes.lkt:6575
--# expr-start 3558 '<Bind at nodes.lkt:6575:17>' Bind_Result ada/nodes.lkt:6575
--# expr-start 3556 '<FieldAccess for expected_type_var at nodes.lkt:6575:17>' Fld ada/nodes.lkt:6575
      if Prefix = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Prefix);
--# expr-done 3556
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 3557 '<FieldAccess for container_type at nodes.lkt:6575:47>' Fld_1 ada/nodes.lkt:6575
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.container_type
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Container_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3557
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6575:17") else null)); 
--# expr-done 3558
--# expr-start 3559 '<FieldAccess for matches_expected_prefix_type at nodes.lkt:6576:22>' Fld_2 ada/nodes.lkt:6576
      if Prefix = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_prefix_type
Fld_2 := Libadalang.Implementation.Expr_P_Matches_Expected_Prefix_Type (Node => Prefix, Origin => Origin);
--# end
--# expr-done 3559
And_Pred := Create_And (Bind_Result, Fld_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6575:17") else null)); 
--# expr-done 3560
   If_Result := And_Pred;
end if;
      Inc_Ref (If_Result);
--# expr-done 3561
   If_Result_1 := If_Result;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6578:16") else null)); 
   If_Result_1 := False_Rel;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 3562
         Property_Result := If_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_534;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_534;
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Constrain_Prefix;
--# end
--# property-start BaseFormalParamDecl.is_mandatory ada/nodes.lkt:6555
pragma Warnings (Off, "is not referenced");
 function Base_Formal_Param_Decl_P_Is_Mandatory
  (Node : Bare_Base_Formal_Param_Decl
  )
   return Boolean
is
   Self : Bare_Base_Formal_Param_Decl  := Bare_Base_Formal_Param_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Formal_Param_Decl_P_Is_Mandatory;
--# end
   --
   --  Primitives for Bare_Component_Decl
   --
      procedure Component_Decl_Pre_Env_Actions
        (Self            : Bare_Component_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_1 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:6627:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      end;
      procedure Initialize_Fields_For_Component_Decl
        (Self : Bare_Component_Decl
         ; Component_Decl_F_Ids : Bare_Defining_Name_List
         ; Component_Decl_F_Component_Def : Bare_Component_Def
         ; Component_Decl_F_Default_Expr : Bare_Expr
         ; Component_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Component_Decl_F_Ids := Component_Decl_F_Ids;
            Self.Component_Decl_F_Component_Def := Component_Decl_F_Component_Def;
            Self.Component_Decl_F_Default_Expr := Component_Decl_F_Default_Expr;
            Self.Component_Decl_F_Aspects := Component_Decl_F_Aspects;
      end Initialize_Fields_For_Component_Decl;
   function Component_Decl_F_Ids
     (Node : Bare_Component_Decl) return Bare_Defining_Name_List
   is
   begin
         return Node.Component_Decl_F_Ids;
   end;
   function Component_Decl_F_Component_Def
     (Node : Bare_Component_Decl) return Bare_Component_Def
   is
   begin
         return Node.Component_Decl_F_Component_Def;
   end;
   function Component_Decl_F_Default_Expr
     (Node : Bare_Component_Decl) return Bare_Expr
   is
   begin
         return Node.Component_Decl_F_Default_Expr;
   end;
--# property-start ComponentDecl.defining_env ada/nodes.lkt:6597
pragma Warnings (Off, "is not referenced");
 function Component_Decl_P_Defining_Env
  (Node : Bare_Component_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Component_Decl  := Bare_Component_Decl (Node);
     Ent : Internal_Entity_Component_Decl :=
       Internal_Entity_Component_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_535 with Inline_Always;
      Fld : Internal_Entity_Component_Def;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_535 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_535;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3565 '<FieldAccess for defining_env at nodes.lkt:6598:9>' Fld_2 ada/nodes.lkt:6598
--# expr-start 3564 '<FieldAccess for type_expr at nodes.lkt:6598:9>' Fld_1 ada/nodes.lkt:6598
--# expr-start 3563 '<FieldAccess for component_def at nodes.lkt:6598:9>' Fld ada/nodes.lkt:6598
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Component_Def (Node => Ent.Node.Component_Decl_F_Component_Def, Info => Ent.Info);
--# expr-done 3563
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Expr (Node => Fld.Node.Component_Def_F_Type_Expr, Info => Fld.Info);
--# expr-done 3564
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.defining_env
Fld_2 := Libadalang.Implementation.Type_Expr_P_Defining_Env (Node => Fld_1.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld_1.Info);
--# end
--# expr-done 3565
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_535;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_535;
            raise;
      end;
   return Property_Result;
end Component_Decl_P_Defining_Env;
--# end
--# property-start ComponentDecl.defining_names ada/nodes.lkt:6600
pragma Warnings (Off, "is not referenced");
 function Component_Decl_P_Defining_Names
  (Node : Bare_Component_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Component_Decl  := Bare_Component_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_536 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Item_0 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_536 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_536;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3568 '<Map at nodes.lkt:6601:9>' Map_Result ada/nodes.lkt:6601
   --# expr-start 3566 '<FieldAccess for ids at nodes.lkt:6601:9>' Fld ada/nodes.lkt:6601
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Component_Decl_F_Ids;
--# expr-done 3566
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Internal_Entity_Defining_Name_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind i Item_0
      --# expr-start 3567 '<as_entity at nodes.lkt:6601:29>' If_Result ada/nodes.lkt:6601
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 3567
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := If_Result;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3568
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_536;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_536;
            raise;
      end;
   return Property_Result;
end Component_Decl_P_Defining_Names;
--# end
--# property-start ComponentDecl.array_ndims ada/nodes.lkt:6604
pragma Warnings (Off, "is not referenced");
 function Component_Decl_P_Array_Ndims
  (Node : Bare_Component_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Component_Decl  := Bare_Component_Decl (Node);
     Ent : Internal_Entity_Component_Decl :=
       Internal_Entity_Component_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Integer;
      Fld : Internal_Entity_Component_Def;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3571 '<FieldAccess for array_ndims at nodes.lkt:6604:30>' Fld_2 ada/nodes.lkt:6604
--# expr-start 3570 '<FieldAccess for type_expr at nodes.lkt:6604:30>' Fld_1 ada/nodes.lkt:6604
--# expr-start 3569 '<FieldAccess for component_def at nodes.lkt:6604:30>' Fld ada/nodes.lkt:6604
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Component_Def (Node => Ent.Node.Component_Decl_F_Component_Def, Info => Ent.Info);
--# expr-done 3569
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Expr (Node => Fld.Node.Component_Def_F_Type_Expr, Info => Fld.Info);
--# expr-done 3570
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.array_ndims
Fld_2 := Libadalang.Implementation.Type_Expr_P_Array_Ndims (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 3571
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_Decl_P_Array_Ndims;
--# end
--# property-start ComponentDecl.type_expression ada/nodes.lkt:6606
pragma Warnings (Off, "is not referenced");
 function Component_Decl_P_Type_Expression
  (Node : Bare_Component_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Component_Decl  := Bare_Component_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Bare_Component_Def;
Fld_1 : Bare_Type_Expr;
As_Entity : Internal_Entity_Type_Expr;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3574 '<as_entity at nodes.lkt:6607:9>' If_Result ada/nodes.lkt:6607
--# expr-start 3573 '<FieldAccess for type_expr at nodes.lkt:6607:9>' Fld_1 ada/nodes.lkt:6607
--# expr-start 3572 '<FieldAccess for component_def at nodes.lkt:6607:9>' Fld ada/nodes.lkt:6607
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Component_Decl_F_Component_Def;
--# expr-done 3572
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Component_Def_F_Type_Expr;
--# expr-done 3573
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Type_Expr;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 3574
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_Decl_P_Type_Expression;
--# end
--# property-start ComponentDecl.is_constant_object ada/nodes.lkt:6609
pragma Warnings (Off, "is not referenced");
 function Component_Decl_P_Is_Constant_Object
  (Node : Bare_Component_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Component_Decl  := Bare_Component_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_Decl_P_Is_Constant_Object;
--# end
--# property-start ComponentDecl.xref_equation ada/nodes.lkt:6612
pragma Warnings (Off, "is not referenced");
 function Component_Decl_P_Xref_Equation
  (Node : Bare_Component_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Component_Decl  := Bare_Component_Decl (Node);
     Ent : Internal_Entity_Component_Decl :=
       Internal_Entity_Component_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_540 with Inline_Always;
            procedure Finalizer_Scope_2425 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Component_Def;
Fld_2 : Internal_Entity_Type_Expr;
Fld_3 : Logic_Equation;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_6 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_7 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_540 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_540;
            procedure Finalizer_Scope_2425 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_2425;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3587 '<Let at nodes.lkt:6613:9>' Let_Result ada/nodes.lkt:6613
--# scope-start
--# expr-start 3575 '<FieldAccess for expr_type at nodes.lkt:6613:19>' Fld ada/nodes.lkt:6613
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3575
Local_Typ := Fld; 
--# bind typ Local_Typ
--# expr-start 3586 '<LogicBinaryOp And at nodes.lkt:6615:9>' And_Pred_2 ada/nodes.lkt:6615
--# expr-start 3578 '<FieldAccess for sub_equation at nodes.lkt:6615:9>' Fld_3 ada/nodes.lkt:6615
--# expr-start 3577 '<FieldAccess for type_expr at nodes.lkt:6615:9>' Fld_2 ada/nodes.lkt:6615
--# expr-start 3576 '<FieldAccess for component_def at nodes.lkt:6615:9>' Fld_1 ada/nodes.lkt:6615
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Component_Def (Node => Ent.Node.Component_Decl_F_Component_Def, Info => Ent.Info);
--# expr-done 3576
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Type_Expr (Node => Fld_1.Node.Component_Def_F_Type_Expr, Info => Fld_1.Info);
--# expr-done 3577
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 3578
--# expr-start 3579 '<FieldAccess for default_expr at nodes.lkt:6616:14>' Fld_4 ada/nodes.lkt:6616
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Ent.Node.Component_Decl_F_Default_Expr, Info => Ent.Info);
--# expr-done 3579
Var_Expr_0 := Fld_4;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind de Var_Expr_0
--# expr-start 3585 '<LogicBinaryOp And at nodes.lkt:6618:13>' And_Pred_1 ada/nodes.lkt:6618
--# expr-start 3583 '<LogicBinaryOp And at nodes.lkt:6618:14>' And_Pred ada/nodes.lkt:6618
--# expr-start 3581 '<Bind at nodes.lkt:6618:14>' Bind_Result ada/nodes.lkt:6618
--# expr-start 3580 '<FieldAccess for expected_type_var at nodes.lkt:6618:14>' Fld_5 ada/nodes.lkt:6618
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_0.Node);
--# expr-done 3580
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr := Local_Typ; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6618:14") else null)); 
--# expr-done 3581
--# expr-start 3582 '<FieldAccess for sub_equation at nodes.lkt:6618:49>' Fld_6 ada/nodes.lkt:6618
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_6 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3582
And_Pred := Create_And (Bind_Result, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6618:14") else null)); 
--# expr-done 3583
--# expr-start 3584 '<FieldAccess for matches_expected_assign_type at nodes.lkt:6619:18>' Fld_7 ada/nodes.lkt:6619
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_7 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Var_Expr_0.Node, Origin => Origin);
--# end
--# expr-done 3584
And_Pred_1 := Create_And (And_Pred, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6618:13") else null)); 
--# expr-done 3585
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2425;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6620:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (Fld_3, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6615:9") else null)); 
--# expr-done 3586
Let_Result := And_Pred_2; Inc_Ref (Let_Result);
--# end
--# expr-done 3587
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_540;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_540;
                     Finalizer_Scope_2425;
            raise;
      end;
   return Property_Result;
end Component_Decl_P_Xref_Equation;
--# end
--# property-start ComponentDecl.xref_entry_point ada/nodes.lkt:6624
pragma Warnings (Off, "is not referenced");
 function Component_Decl_P_Xref_Entry_Point
  (Node : Bare_Component_Decl
  )
   return Boolean
is
   Self : Bare_Component_Decl  := Bare_Component_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_Decl_P_Xref_Entry_Point;
--# end
--# property-start ComponentDecl._env_mappings_1 ada/nodes.lkt:6627
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_1
  (Node : Bare_Component_Decl
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Component_Decl  := Bare_Component_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1665 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Cast_Expr : Bare_Component_Decl;
Cast_Result : Bare_Ada_Node;
Fld_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1665 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1665;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3589 '<FieldAccess for env_mappings at nodes.lkt:6627:20>' Fld_1 ada/nodes.lkt:6627
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3588 '<FieldAccess for ids at nodes.lkt:6627:38>' Fld ada/nodes.lkt:6627
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Component_Decl_F_Ids;
--# expr-done 3588
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# property-call-start AdaNode.env_mappings
Fld_1 := Libadalang.Implementation.Ada_Node_P_Env_Mappings (Node => Self, Defining_Names => Fld, Value => Cast_Result);
--# end
--# expr-done 3589
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1665;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1665;
            raise;
      end;
   return Property_Result;
end Env_Mappings_1;
--# end
   --
   --  Primitives for Bare_Discriminant_Spec
   --
      procedure Discriminant_Spec_Pre_Env_Actions
        (Self            : Bare_Discriminant_Spec;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_2 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:6668:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      end;
      procedure Initialize_Fields_For_Discriminant_Spec
        (Self : Bare_Discriminant_Spec
         ; Discriminant_Spec_F_Ids : Bare_Defining_Name_List
         ; Discriminant_Spec_F_Type_Expr : Bare_Type_Expr
         ; Discriminant_Spec_F_Default_Expr : Bare_Expr
         ; Discriminant_Spec_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Discriminant_Spec_F_Ids := Discriminant_Spec_F_Ids;
            Self.Discriminant_Spec_F_Type_Expr := Discriminant_Spec_F_Type_Expr;
            Self.Discriminant_Spec_F_Default_Expr := Discriminant_Spec_F_Default_Expr;
            Self.Discriminant_Spec_F_Aspects := Discriminant_Spec_F_Aspects;
      end Initialize_Fields_For_Discriminant_Spec;
   function Discriminant_Spec_F_Ids
     (Node : Bare_Discriminant_Spec) return Bare_Defining_Name_List
   is
   begin
         return Node.Discriminant_Spec_F_Ids;
   end;
   function Discriminant_Spec_F_Type_Expr
     (Node : Bare_Discriminant_Spec) return Bare_Type_Expr
   is
   begin
         return Node.Discriminant_Spec_F_Type_Expr;
   end;
   function Discriminant_Spec_F_Default_Expr
     (Node : Bare_Discriminant_Spec) return Bare_Expr
   is
   begin
         return Node.Discriminant_Spec_F_Default_Expr;
   end;
--# property-start DiscriminantSpec.defining_names ada/nodes.lkt:6643
pragma Warnings (Off, "is not referenced");
 function Discriminant_Spec_P_Defining_Names
  (Node : Bare_Discriminant_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Discriminant_Spec  := Bare_Discriminant_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_542 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Item_0 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_542 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_542;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3592 '<Map at nodes.lkt:6644:9>' Map_Result ada/nodes.lkt:6644
   --# expr-start 3590 '<FieldAccess for ids at nodes.lkt:6644:9>' Fld ada/nodes.lkt:6644
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Discriminant_Spec_F_Ids;
--# expr-done 3590
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Internal_Entity_Defining_Name_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind id Item_0
      --# expr-start 3591 '<as_entity at nodes.lkt:6644:30>' If_Result ada/nodes.lkt:6644
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 3591
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := If_Result;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3592
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_542;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_542;
            raise;
      end;
   return Property_Result;
end Discriminant_Spec_P_Defining_Names;
--# end
--# property-start DiscriminantSpec.defining_env ada/nodes.lkt:6649
pragma Warnings (Off, "is not referenced");
 function Discriminant_Spec_P_Defining_Env
  (Node : Bare_Discriminant_Spec
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Discriminant_Spec  := Bare_Discriminant_Spec (Node);
     Ent : Internal_Entity_Discriminant_Spec :=
       Internal_Entity_Discriminant_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_543 with Inline_Always;
      Fld : Internal_Entity_Type_Expr;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_543 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_543;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3594 '<FieldAccess for defining_env at nodes.lkt:6649:38>' Fld_1 ada/nodes.lkt:6649
--# expr-start 3593 '<FieldAccess for type_expr at nodes.lkt:6649:38>' Fld ada/nodes.lkt:6649
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Discriminant_Spec_F_Type_Expr, Info => Ent.Info);
--# expr-done 3593
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.defining_env
Fld_1 := Libadalang.Implementation.Type_Expr_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 3594
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_543;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_543;
            raise;
      end;
   return Property_Result;
end Discriminant_Spec_P_Defining_Env;
--# end
--# property-start DiscriminantSpec.type_expression ada/nodes.lkt:6651
pragma Warnings (Off, "is not referenced");
 function Discriminant_Spec_P_Type_Expression
  (Node : Bare_Discriminant_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Discriminant_Spec  := Bare_Discriminant_Spec (Node);
     Ent : Internal_Entity_Discriminant_Spec :=
       Internal_Entity_Discriminant_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3595 '<FieldAccess for type_expr at nodes.lkt:6651:47>' Fld ada/nodes.lkt:6651
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Discriminant_Spec_F_Type_Expr, Info => Ent.Info);
--# expr-done 3595
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Discriminant_Spec_P_Type_Expression;
--# end
--# property-start DiscriminantSpec.xref_entry_point ada/nodes.lkt:6653
pragma Warnings (Off, "is not referenced");
 function Discriminant_Spec_P_Xref_Entry_Point
  (Node : Bare_Discriminant_Spec
  )
   return Boolean
is
   Self : Bare_Discriminant_Spec  := Bare_Discriminant_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Discriminant_Spec_P_Xref_Entry_Point;
--# end
--# property-start DiscriminantSpec.is_constant_object ada/nodes.lkt:6655
pragma Warnings (Off, "is not referenced");
 function Discriminant_Spec_P_Is_Constant_Object
  (Node : Bare_Discriminant_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Discriminant_Spec  := Bare_Discriminant_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Discriminant_Spec_P_Is_Constant_Object;
--# end
--# property-start DiscriminantSpec.xref_equation ada/nodes.lkt:6658
pragma Warnings (Off, "is not referenced");
 function Discriminant_Spec_P_Xref_Equation
  (Node : Bare_Discriminant_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Discriminant_Spec  := Bare_Discriminant_Spec (Node);
     Ent : Internal_Entity_Discriminant_Spec :=
       Internal_Entity_Discriminant_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_547 with Inline_Always;
            procedure Finalizer_Scope_2427 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Entity_Type_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Var;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_547 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_547;
            procedure Finalizer_Scope_2427 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_2427;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3606 '<LogicBinaryOp And at nodes.lkt:6659:9>' And_Pred_2 ada/nodes.lkt:6659
--# expr-start 3597 '<FieldAccess for sub_equation at nodes.lkt:6659:9>' Fld_1 ada/nodes.lkt:6659
--# expr-start 3596 '<FieldAccess for type_expr at nodes.lkt:6659:9>' Fld ada/nodes.lkt:6659
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Discriminant_Spec_F_Type_Expr, Info => Ent.Info);
--# expr-done 3596
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 3597
--# expr-start 3598 '<FieldAccess for default_expr at nodes.lkt:6660:14>' Fld_2 ada/nodes.lkt:6660
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Discriminant_Spec_F_Default_Expr, Info => Ent.Info);
--# expr-done 3598
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind de Var_Expr_0
--# expr-start 3605 '<LogicBinaryOp And at nodes.lkt:6662:13>' And_Pred_1 ada/nodes.lkt:6662
--# expr-start 3603 '<LogicBinaryOp And at nodes.lkt:6662:14>' And_Pred ada/nodes.lkt:6662
--# expr-start 3601 '<Bind at nodes.lkt:6662:14>' Bind_Result ada/nodes.lkt:6662
--# expr-start 3599 '<FieldAccess for expected_type_var at nodes.lkt:6662:14>' Fld_3 ada/nodes.lkt:6662
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_0.Node);
--# expr-done 3599
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 3600 '<FieldAccess for expr_type at nodes.lkt:6662:40>' Fld_4 ada/nodes.lkt:6662
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3600
      Cast_Result := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Bind_Result := Solver.Create_Assign (Fld_3, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6662:14") else null)); 
--# expr-done 3601
--# expr-start 3602 '<FieldAccess for sub_equation at nodes.lkt:6662:62>' Fld_5 ada/nodes.lkt:6662
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3602
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6662:14") else null)); 
--# expr-done 3603
--# expr-start 3604 '<FieldAccess for matches_expected_assign_type at nodes.lkt:6663:18>' Fld_6 ada/nodes.lkt:6663
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Var_Expr_0.Node, Origin => Origin);
--# end
--# expr-done 3604
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6662:13") else null)); 
--# expr-done 3605
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2427;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6664:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (Fld_1, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6659:9") else null)); 
--# expr-done 3606
         Property_Result := And_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_547;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_547;
                     Finalizer_Scope_2427;
            raise;
      end;
   return Property_Result;
end Discriminant_Spec_P_Xref_Equation;
--# end
--# property-start DiscriminantSpec._env_mappings_2 ada/nodes.lkt:6668
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_2
  (Node : Bare_Discriminant_Spec
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Discriminant_Spec  := Bare_Discriminant_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1666 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Cast_Expr : Bare_Discriminant_Spec;
Cast_Result : Bare_Ada_Node;
Fld_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1666 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1666;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3608 '<FieldAccess for env_mappings at nodes.lkt:6668:20>' Fld_1 ada/nodes.lkt:6668
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3607 '<FieldAccess for ids at nodes.lkt:6668:38>' Fld ada/nodes.lkt:6668
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Discriminant_Spec_F_Ids;
--# expr-done 3607
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# property-call-start AdaNode.env_mappings
Fld_1 := Libadalang.Implementation.Ada_Node_P_Env_Mappings (Node => Self, Defining_Names => Fld, Value => Cast_Result);
--# end
--# expr-done 3608
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1666;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1666;
            raise;
      end;
   return Property_Result;
end Env_Mappings_2;
--# end
   --
   --  Primitives for Bare_Generic_Formal
   --
      procedure Initialize_Fields_For_Generic_Formal
        (Self : Bare_Generic_Formal
         ; Generic_Formal_F_Decl : Bare_Basic_Decl
        ) is
      begin
            Self.Generic_Formal_F_Decl := Generic_Formal_F_Decl;
      end Initialize_Fields_For_Generic_Formal;
   function Generic_Formal_F_Decl
     (Node : Bare_Generic_Formal) return Bare_Basic_Decl
   is
   begin
         return Node.Generic_Formal_F_Decl;
   end;
--# property-start GenericFormal.defining_names ada/nodes.lkt:6682
pragma Warnings (Off, "is not referenced");
 function Generic_Formal_P_Defining_Names
  (Node : Bare_Generic_Formal
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Generic_Formal  := Bare_Generic_Formal (Node);
     Ent : Internal_Entity_Generic_Formal :=
       Internal_Entity_Generic_Formal'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_548 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_548 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_548;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3610 '<FieldAccess for defining_names at nodes.lkt:6683:9>' Fld_1 ada/nodes.lkt:6683
--# expr-start 3609 '<FieldAccess for decl at nodes.lkt:6683:9>' Fld ada/nodes.lkt:6683
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Basic_Decl (Node => Ent.Node.Generic_Formal_F_Decl, Info => Ent.Info);
--# expr-done 3609
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 3610
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_548;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_548;
            raise;
      end;
   return Property_Result;
end Generic_Formal_P_Defining_Names;
--# end
--# property-start GenericFormal.type_expression ada/nodes.lkt:6685
pragma Warnings (Off, "is not referenced");
 function Generic_Formal_P_Type_Expression
  (Node : Bare_Generic_Formal
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Generic_Formal  := Bare_Generic_Formal (Node);
     Ent : Internal_Entity_Generic_Formal :=
       Internal_Entity_Generic_Formal'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3612 '<FieldAccess for type_expression at nodes.lkt:6685:47>' Fld_1 ada/nodes.lkt:6685
--# expr-start 3611 '<FieldAccess for decl at nodes.lkt:6685:47>' Fld ada/nodes.lkt:6685
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Basic_Decl (Node => Ent.Node.Generic_Formal_F_Decl, Info => Ent.Info);
--# expr-done 3611
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 3612
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Formal_P_Type_Expression;
--# end
   --
   --  Primitives for Bare_Generic_Formal_Obj_Decl
   --
      procedure Initialize_Fields_For_Generic_Formal_Obj_Decl
        (Self : Bare_Generic_Formal_Obj_Decl
         ; Generic_Formal_F_Decl : Bare_Basic_Decl
        ) is
      begin
            Initialize_Fields_For_Generic_Formal
              (Self, Generic_Formal_F_Decl);
      end Initialize_Fields_For_Generic_Formal_Obj_Decl;
   --
   --  Primitives for Bare_Generic_Formal_Package
   --
      procedure Initialize_Fields_For_Generic_Formal_Package
        (Self : Bare_Generic_Formal_Package
         ; Generic_Formal_F_Decl : Bare_Basic_Decl
        ) is
      begin
            Initialize_Fields_For_Generic_Formal
              (Self, Generic_Formal_F_Decl);
      end Initialize_Fields_For_Generic_Formal_Package;
   --
   --  Primitives for Bare_Generic_Formal_Subp_Decl
   --
      procedure Initialize_Fields_For_Generic_Formal_Subp_Decl
        (Self : Bare_Generic_Formal_Subp_Decl
         ; Generic_Formal_F_Decl : Bare_Basic_Decl
        ) is
      begin
            Initialize_Fields_For_Generic_Formal
              (Self, Generic_Formal_F_Decl);
      end Initialize_Fields_For_Generic_Formal_Subp_Decl;
   --
   --  Primitives for Bare_Generic_Formal_Type_Decl
   --
      procedure Initialize_Fields_For_Generic_Formal_Type_Decl
        (Self : Bare_Generic_Formal_Type_Decl
         ; Generic_Formal_F_Decl : Bare_Basic_Decl
        ) is
      begin
            Initialize_Fields_For_Generic_Formal
              (Self, Generic_Formal_F_Decl);
      end Initialize_Fields_For_Generic_Formal_Type_Decl;
--# property-start GenericFormalTypeDecl.default_type ada/nodes.lkt:6702
pragma Warnings (Off, "is not referenced");
 function Generic_Formal_Type_Decl_P_Default_Type
  (Node : Bare_Generic_Formal_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Generic_Formal_Type_Decl  := Bare_Generic_Formal_Type_Decl (Node);
     Ent : Internal_Entity_Generic_Formal_Type_Decl :=
       Internal_Entity_Generic_Formal_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Formal_Type_Decl;
Match_1 : Internal_Entity_Incomplete_Formal_Type_Decl;
Match_2 : Internal_Entity_Basic_Decl;
Var_Expr_109 : Internal_Entity_Name;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Name;
Fld_2 : Internal_Entity_Name;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Formal_Type_Decl;
Let_Result : Internal_Entity_Name;
Scope_Result : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Incomplete_Formal_Type_Decl;
Let_Result_1 : Internal_Entity_Name;
Scope_Result_1 : Internal_Entity_Name;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Name;
Scope_Result_2 : Internal_Entity_Name;
Match_Result : Internal_Entity_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 3616 '<Match at nodes.lkt:6703:9>' Match_Result ada/nodes.lkt:6703
--# expr-start 3613 '<FieldAccess for decl at nodes.lkt:6703:15>' Fld ada/nodes.lkt:6703
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Basic_Decl (Node => Ent.Node.Generic_Formal_F_Decl, Info => Ent.Info);
--# expr-done 3613
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Formal_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind ft Match_0
--# expr-start 3614 '<FieldAccess for default_type at nodes.lkt:6704:40>' Fld_1 ada/nodes.lkt:6704
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Match_0.Node.Formal_Type_Decl_F_Default_Type, Info => Match_0.Info);
--# expr-done 3614
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Incomplete_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Incomplete_Formal_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind ift Match_1
--# expr-start 3615 '<FieldAccess for default_type at nodes.lkt:6705:51>' Fld_2 ada/nodes.lkt:6705
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Match_1.Node.Incomplete_Formal_Type_Decl_F_Default_Type, Info => Match_1.Info);
--# expr-done 3615
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Incomplete_Type_Decl | Ada_Incomplete_Tagged_Type_Decl .. Ada_Concrete_Type_Decl | Ada_Abstract_Subp_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Name; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 3616
Var_Expr_109 := Match_Result;
if Var_Expr_109 /= No_Entity_Name then
   --# scope-start
--# expr-start 3617 '<FieldAccess for name_designated_type at nodes.lkt:6703:9>' Fld_3 ada/nodes.lkt:6703
      if Var_Expr_109.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_3 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Var_Expr_109.Node, E_Info => Var_Expr_109.Info);
--# end
--# expr-done 3617
Scope_Result_3 := Fld_3;
   --# end
   Result_Var := Scope_Result_3;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Formal_Type_Decl_P_Default_Type;
--# end
   --
   --  Primitives for Bare_Param_Spec
   --
      procedure Param_Spec_Pre_Env_Actions
        (Self            : Bare_Param_Spec;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_3 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:6772:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      end;
      procedure Initialize_Fields_For_Param_Spec
        (Self : Bare_Param_Spec
         ; Param_Spec_F_Ids : Bare_Defining_Name_List
         ; Param_Spec_F_Has_Aliased : Bare_Aliased_Node
         ; Param_Spec_F_Mode : Bare_Mode
         ; Param_Spec_F_Type_Expr : Bare_Type_Expr
         ; Param_Spec_F_Default_Expr : Bare_Expr
         ; Param_Spec_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Param_Spec_F_Ids := Param_Spec_F_Ids;
            Self.Param_Spec_F_Has_Aliased := Param_Spec_F_Has_Aliased;
            Self.Param_Spec_F_Mode := Param_Spec_F_Mode;
            Self.Param_Spec_F_Type_Expr := Param_Spec_F_Type_Expr;
            Self.Param_Spec_F_Default_Expr := Param_Spec_F_Default_Expr;
            Self.Param_Spec_F_Aspects := Param_Spec_F_Aspects;
      end Initialize_Fields_For_Param_Spec;
   function Param_Spec_F_Ids
     (Node : Bare_Param_Spec) return Bare_Defining_Name_List
   is
   begin
         return Node.Param_Spec_F_Ids;
   end;
   function Param_Spec_F_Has_Aliased
     (Node : Bare_Param_Spec) return Bare_Aliased_Node
   is
   begin
         return Node.Param_Spec_F_Has_Aliased;
   end;
   function Param_Spec_F_Mode
     (Node : Bare_Param_Spec) return Bare_Mode
   is
   begin
         return Node.Param_Spec_F_Mode;
   end;
   function Param_Spec_F_Type_Expr
     (Node : Bare_Param_Spec) return Bare_Type_Expr
   is
   begin
         return Node.Param_Spec_F_Type_Expr;
   end;
   function Param_Spec_F_Default_Expr
     (Node : Bare_Param_Spec) return Bare_Expr
   is
   begin
         return Node.Param_Spec_F_Default_Expr;
   end;
--# property-start ParamSpec.is_mandatory ada/nodes.lkt:6728
pragma Warnings (Off, "is not referenced");
 function Param_Spec_P_Is_Mandatory
  (Node : Bare_Param_Spec
  )
   return Boolean
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Expr;
Is_Null : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3619 '<IsNull at nodes.lkt:6728:32>' Is_Null ada/nodes.lkt:6728
--# expr-start 3618 '<FieldAccess for default_expr at nodes.lkt:6728:32>' Fld ada/nodes.lkt:6728
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Param_Spec_F_Default_Expr;
--# expr-done 3618
Is_Null := Fld = null; 
--# expr-done 3619
         Property_Result := Is_Null;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Param_Spec_P_Is_Mandatory;
--# end
--# property-start ParamSpec.defining_names ada/nodes.lkt:6730
pragma Warnings (Off, "is not referenced");
 function Param_Spec_P_Defining_Names
  (Node : Bare_Param_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_552 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Item_0 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_552 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_552;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3622 '<Map at nodes.lkt:6731:9>' Map_Result ada/nodes.lkt:6731
   --# expr-start 3620 '<FieldAccess for ids at nodes.lkt:6731:9>' Fld ada/nodes.lkt:6731
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Param_Spec_F_Ids;
--# expr-done 3620
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Internal_Entity_Defining_Name_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind id Item_0
      --# expr-start 3621 '<as_entity at nodes.lkt:6731:30>' If_Result ada/nodes.lkt:6731
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 3621
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := If_Result;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3622
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_552;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_552;
            raise;
      end;
   return Property_Result;
end Param_Spec_P_Defining_Names;
--# end
--# property-start ParamSpec.type_expression ada/nodes.lkt:6733
pragma Warnings (Off, "is not referenced");
 function Param_Spec_P_Type_Expression
  (Node : Bare_Param_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
     Ent : Internal_Entity_Param_Spec :=
       Internal_Entity_Param_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3623 '<FieldAccess for type_expr at nodes.lkt:6733:47>' Fld ada/nodes.lkt:6733
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Param_Spec_F_Type_Expr, Info => Ent.Info);
--# expr-done 3623
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Param_Spec_P_Type_Expression;
--# end
--# property-start ParamSpec.is_constant_object ada/nodes.lkt:6735
pragma Warnings (Off, "is not referenced");
 function Param_Spec_P_Is_Constant_Object
  (Node : Bare_Param_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Mode;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3625 '<IsA Mode.In, Mode.Default at nodes.lkt:6735:38>' Is_A ada/nodes.lkt:6735
--# expr-start 3624 '<FieldAccess for mode at nodes.lkt:6735:38>' Fld ada/nodes.lkt:6735
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Param_Spec_F_Mode;
--# expr-done 3624
Is_A := Fld /= null 
and then Fld.Kind in Ada_Mode_In_Range | Ada_Mode_Default_Range; 
--# expr-done 3625
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Param_Spec_P_Is_Constant_Object;
--# end
--# property-start ParamSpec.defining_env ada/nodes.lkt:6740
pragma Warnings (Off, "is not referenced");
 function Param_Spec_P_Defining_Env
  (Node : Bare_Param_Spec
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
     Ent : Internal_Entity_Param_Spec :=
       Internal_Entity_Param_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_555 with Inline_Always;
      Fld : Internal_Entity_Type_Expr;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_555 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_555;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3627 '<FieldAccess for defining_env at nodes.lkt:6740:38>' Fld_1 ada/nodes.lkt:6740
--# expr-start 3626 '<FieldAccess for type_expr at nodes.lkt:6740:38>' Fld ada/nodes.lkt:6740
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Param_Spec_F_Type_Expr, Info => Ent.Info);
--# expr-done 3626
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.defining_env
Fld_1 := Libadalang.Implementation.Type_Expr_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 3627
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_555;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_555;
            raise;
      end;
   return Property_Result;
end Param_Spec_P_Defining_Env;
--# end
--# property-start ParamSpec.constrain_prefix ada/nodes.lkt:6743
pragma Warnings (Off, "is not referenced");
 function Param_Spec_P_Constrain_Prefix
  (Node : Bare_Param_Spec
      ; Prefix : Bare_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
      --# bind self Self
   --# bind prefix Prefix
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_556 with Inline_Always;
            procedure Finalizer_Scope_2433 with Inline_Always;
      Var_Expr_0 : Bare_Name;
Fld : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Cast_Expr_1 : Bare_Expr;
Cast_Result_1 : Bare_Name;
Fld_1 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result_2 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Scope_Result : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_556 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_556;
            procedure Finalizer_Scope_2433 is
            begin
                     Dec_Ref (Bind_Result_1);
            end Finalizer_Scope_2433;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3633 '<LogicBinaryOp And at nodes.lkt:6749:9>' And_Pred ada/nodes.lkt:6749
--# expr-start 3629 '<Bind at nodes.lkt:6749:9>' Bind_Result ada/nodes.lkt:6749
--# expr-start 3628 '<FieldAccess for type_var at nodes.lkt:6749:9>' Fld ada/nodes.lkt:6749
      if Prefix = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Prefix);
--# expr-done 3628
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
Cast_Expr := No_Entity_Base_Type_Decl; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6749:9") else null)); 
--# expr-done 3629
--# expr-start 3630 '<Cast to Name at nodes.lkt:6750:14>' Cast_Result_1 ada/nodes.lkt:6750
Cast_Expr_1 := Prefix; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Name
   then
      Cast_Result_1 := Cast_Expr_1;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 3630
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind name Var_Expr_0
--# expr-start 3632 '<Bind at nodes.lkt:6752:13>' Bind_Result_1 ada/nodes.lkt:6752
--# expr-start 3631 '<FieldAccess for subp_spec_var at nodes.lkt:6752:13>' Fld_1 ada/nodes.lkt:6752
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Var_Expr_0);
--# end
--# expr-done 3631
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Cast_Expr_2 := No_Entity_Base_Formal_Param_Holder; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_1, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6752:13") else null)); 
--# expr-done 3632
Scope_Result := Bind_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2433;
   Result_Var := Scope_Result;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6753:25") else null)); 
   Result_Var := False_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred := Create_And (Bind_Result, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6749:9") else null)); 
--# expr-done 3633
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_556;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_556;
                     Finalizer_Scope_2433;
            raise;
      end;
   return Property_Result;
end Param_Spec_P_Constrain_Prefix;
--# end
--# property-start ParamSpec.xref_equation ada/nodes.lkt:6757
pragma Warnings (Off, "is not referenced");
 function Param_Spec_P_Xref_Equation
  (Node : Bare_Param_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
     Ent : Internal_Entity_Param_Spec :=
       Internal_Entity_Param_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_557 with Inline_Always;
            procedure Finalizer_Scope_2434 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_557 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_557;
            procedure Finalizer_Scope_2434 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_2434;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3645 '<Let at nodes.lkt:6758:9>' Let_Result ada/nodes.lkt:6758
--# scope-start
--# expr-start 3634 '<FieldAccess for expr_type at nodes.lkt:6758:19>' Fld ada/nodes.lkt:6758
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3634
Local_Typ := Fld; 
--# bind typ Local_Typ
--# expr-start 3644 '<LogicBinaryOp And at nodes.lkt:6760:9>' And_Pred_2 ada/nodes.lkt:6760
--# expr-start 3636 '<FieldAccess for sub_equation at nodes.lkt:6760:9>' Fld_2 ada/nodes.lkt:6760
--# expr-start 3635 '<FieldAccess for type_expr at nodes.lkt:6760:9>' Fld_1 ada/nodes.lkt:6760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Param_Spec_F_Type_Expr, Info => Ent.Info);
--# expr-done 3635
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_2 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_1.Info);
--# end
--# expr-done 3636
--# expr-start 3637 '<FieldAccess for default_expr at nodes.lkt:6761:14>' Fld_3 ada/nodes.lkt:6761
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Param_Spec_F_Default_Expr, Info => Ent.Info);
--# expr-done 3637
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind de Var_Expr_0
--# expr-start 3643 '<LogicBinaryOp And at nodes.lkt:6763:13>' And_Pred_1 ada/nodes.lkt:6763
--# expr-start 3641 '<LogicBinaryOp And at nodes.lkt:6763:14>' And_Pred ada/nodes.lkt:6763
--# expr-start 3639 '<Bind at nodes.lkt:6763:14>' Bind_Result ada/nodes.lkt:6763
--# expr-start 3638 '<FieldAccess for expected_type_var at nodes.lkt:6763:14>' Fld_4 ada/nodes.lkt:6763
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_0.Node);
--# expr-done 3638
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Cast_Expr := Local_Typ; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6763:14") else null)); 
--# expr-done 3639
--# expr-start 3640 '<FieldAccess for sub_equation at nodes.lkt:6763:49>' Fld_5 ada/nodes.lkt:6763
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3640
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6763:14") else null)); 
--# expr-done 3641
--# expr-start 3642 '<FieldAccess for matches_expected_assign_type at nodes.lkt:6764:18>' Fld_6 ada/nodes.lkt:6764
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Var_Expr_0.Node, Origin => Origin);
--# end
--# expr-done 3642
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6763:13") else null)); 
--# expr-done 3643
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2434;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6765:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (Fld_2, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:6760:9") else null)); 
--# expr-done 3644
Let_Result := And_Pred_2; Inc_Ref (Let_Result);
--# end
--# expr-done 3645
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_557;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_557;
                     Finalizer_Scope_2434;
            raise;
      end;
   return Property_Result;
end Param_Spec_P_Xref_Equation;
--# end
--# property-start ParamSpec.xref_entry_point ada/nodes.lkt:6769
pragma Warnings (Off, "is not referenced");
 function Param_Spec_P_Xref_Entry_Point
  (Node : Bare_Param_Spec
  )
   return Boolean
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Param_Spec_P_Xref_Entry_Point;
--# end
--# property-start ParamSpec._env_mappings_3 ada/nodes.lkt:6772
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_3
  (Node : Bare_Param_Spec
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Param_Spec  := Bare_Param_Spec (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1667 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Cast_Expr : Bare_Param_Spec;
Cast_Result : Bare_Ada_Node;
Fld_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1667 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1667;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3647 '<FieldAccess for env_mappings at nodes.lkt:6772:20>' Fld_1 ada/nodes.lkt:6772
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3646 '<FieldAccess for ids at nodes.lkt:6772:38>' Fld ada/nodes.lkt:6772
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Param_Spec_F_Ids;
--# expr-done 3646
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# property-call-start AdaNode.env_mappings
Fld_1 := Libadalang.Implementation.Ada_Node_P_Env_Mappings (Node => Self, Defining_Names => Fld, Value => Cast_Result);
--# end
--# expr-done 3647
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1667;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1667;
            raise;
      end;
   return Property_Result;
end Env_Mappings_3;
--# end
   --
   --  Primitives for Bare_Synthetic_Formal_Param_Decl
   --
      procedure Initialize_Fields_For_Synthetic_Formal_Param_Decl
        (Self : Bare_Synthetic_Formal_Param_Decl
         ; Synthetic_Formal_Param_Decl_F_Param_Type : Bare_Type_Expr
        ) is
      begin
            Self.Synthetic_Formal_Param_Decl_F_Param_Type := Synthetic_Formal_Param_Decl_F_Param_Type;
      Self.Synthetic_Formal_Param_Decl_Param_Name := No_Symbol;
      end Initialize_Fields_For_Synthetic_Formal_Param_Decl;
   function Synthetic_Formal_Param_Decl_F_Param_Type
     (Node : Bare_Synthetic_Formal_Param_Decl) return Bare_Type_Expr
   is
   begin
         return Node.Synthetic_Formal_Param_Decl_F_Param_Type;
   end;
--# property-start SyntheticFormalParamDecl.defining_names ada/nodes.lkt:6786
pragma Warnings (Off, "is not referenced");
 function Synthetic_Formal_Param_Decl_P_Defining_Names
  (Node : Bare_Synthetic_Formal_Param_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Synthetic_Formal_Param_Decl  := Bare_Synthetic_Formal_Param_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_559 with Inline_Always;
      Fld : Symbol_Type;
Fld_1 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_559 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_559;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3651 '<ArrayLiteral at nodes.lkt:6787:9>' Array_Lit ada/nodes.lkt:6787
--# expr-start 3650 '<as_entity at nodes.lkt:6787:10>' If_Result ada/nodes.lkt:6787
--# expr-start 3649 '<FieldAccess for synthesize_defining_name at nodes.lkt:6787:10>' Fld_1 ada/nodes.lkt:6787
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3648 '<FieldAccess for param_name at nodes.lkt:6787:40>' Fld ada/nodes.lkt:6787
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Synthetic_Formal_Param_Decl_Param_Name;
--# expr-done 3648
--# property-call-start AdaNode.synthesize_defining_name
Fld_1 := Libadalang.Implementation.Ada_Node_P_Synthesize_Defining_Name (Node => Self, Sym => Fld);
--# end
--# expr-done 3649
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 3650
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => If_Result)); 
--# expr-done 3651
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_559;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_559;
            raise;
      end;
   return Property_Result;
end Synthetic_Formal_Param_Decl_P_Defining_Names;
--# end
--# property-start SyntheticFormalParamDecl.is_mandatory ada/nodes.lkt:6789
pragma Warnings (Off, "is not referenced");
 function Synthetic_Formal_Param_Decl_P_Is_Mandatory
  (Node : Bare_Synthetic_Formal_Param_Decl
  )
   return Boolean
is
   Self : Bare_Synthetic_Formal_Param_Decl  := Bare_Synthetic_Formal_Param_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Formal_Param_Decl_P_Is_Mandatory;
--# end
--# property-start SyntheticFormalParamDecl.type_expression ada/nodes.lkt:6791
pragma Warnings (Off, "is not referenced");
 function Synthetic_Formal_Param_Decl_P_Type_Expression
  (Node : Bare_Synthetic_Formal_Param_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Synthetic_Formal_Param_Decl  := Bare_Synthetic_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Synthetic_Formal_Param_Decl :=
       Internal_Entity_Synthetic_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3652 '<FieldAccess for param_type at nodes.lkt:6791:47>' Fld ada/nodes.lkt:6791
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Synthetic_Formal_Param_Decl_F_Param_Type, Info => Ent.Info);
--# expr-done 3652
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Formal_Param_Decl_P_Type_Expression;
--# end
--# property-start SyntheticFormalParamDecl.corresponding_actual ada/nodes.lkt:6793
pragma Warnings (Off, "is not referenced");
 function Synthetic_Formal_Param_Decl_P_Corresponding_Actual
  (Node : Bare_Synthetic_Formal_Param_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Synthetic_Formal_Param_Decl  := Bare_Synthetic_Formal_Param_Decl (Node);
     Ent : Internal_Entity_Synthetic_Formal_Param_Decl :=
       Internal_Entity_Synthetic_Formal_Param_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Cast_Expr : Internal_Entity_Synthetic_Formal_Param_Decl;
Cast_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Formal_Param_Decl_P_Corresponding_Actual;
--# end
   --
   --  Primitives for Bare_Base_Package_Decl
   --
      procedure Initialize_Fields_For_Base_Package_Decl
        (Self : Bare_Base_Package_Decl
         ; Base_Package_Decl_F_Package_Name : Bare_Defining_Name
         ; Base_Package_Decl_F_Aspects : Bare_Aspect_Spec
         ; Base_Package_Decl_F_Public_Part : Bare_Public_Part
         ; Base_Package_Decl_F_Private_Part : Bare_Private_Part
         ; Base_Package_Decl_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Base_Package_Decl_F_Package_Name := Base_Package_Decl_F_Package_Name;
            Self.Base_Package_Decl_F_Aspects := Base_Package_Decl_F_Aspects;
            Self.Base_Package_Decl_F_Public_Part := Base_Package_Decl_F_Public_Part;
            Self.Base_Package_Decl_F_Private_Part := Base_Package_Decl_F_Private_Part;
            Self.Base_Package_Decl_F_End_Name := Base_Package_Decl_F_End_Name;
      end Initialize_Fields_For_Base_Package_Decl;
   function Base_Package_Decl_F_Package_Name
     (Node : Bare_Base_Package_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Base_Package_Decl_F_Package_Name;
   end;
   function Base_Package_Decl_F_Public_Part
     (Node : Bare_Base_Package_Decl) return Bare_Public_Part
   is
   begin
         return Node.Base_Package_Decl_F_Public_Part;
   end;
   function Base_Package_Decl_F_Private_Part
     (Node : Bare_Base_Package_Decl) return Bare_Private_Part
   is
   begin
         return Node.Base_Package_Decl_F_Private_Part;
   end;
   function Base_Package_Decl_F_End_Name
     (Node : Bare_Base_Package_Decl) return Bare_End_Name
   is
   begin
         return Node.Base_Package_Decl_F_End_Name;
   end;
--# property-start BasePackageDecl.defining_names ada/nodes.lkt:6814
pragma Warnings (Off, "is not referenced");
 function Base_Package_Decl_P_Defining_Names
  (Node : Bare_Base_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Base_Package_Decl  := Bare_Base_Package_Decl (Node);
     Ent : Internal_Entity_Base_Package_Decl :=
       Internal_Entity_Base_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_563 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_563 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_563;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3654 '<ArrayLiteral at nodes.lkt:6814:57>' Array_Lit ada/nodes.lkt:6814
--# expr-start 3653 '<FieldAccess for package_name at nodes.lkt:6814:58>' Fld ada/nodes.lkt:6814
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Base_Package_Decl_F_Package_Name, Info => Ent.Info);
--# expr-done 3653
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 3654
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_563;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_563;
            raise;
      end;
   return Property_Result;
end Base_Package_Decl_P_Defining_Names;
--# end
--# property-start BasePackageDecl.defining_env ada/nodes.lkt:6819
pragma Warnings (Off, "is not referenced");
 function Base_Package_Decl_P_Defining_Env
  (Node : Bare_Base_Package_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Package_Decl  := Bare_Base_Package_Decl (Node);
     Ent : Internal_Entity_Base_Package_Decl :=
       Internal_Entity_Base_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_564 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_564 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_564;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3655 '<FieldAccess for children_env at nodes.lkt:6819:38>' Fld ada/nodes.lkt:6819
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 3655
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_564;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_564;
            raise;
      end;
   return Property_Result;
end Base_Package_Decl_P_Defining_Env;
--# end
--# property-start BasePackageDecl.body_part ada/nodes.lkt:6823
pragma Warnings (Off, "is not referenced");
 function Base_Package_Decl_P_Body_Part
  (Node : Bare_Base_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Package_Body
is
   Self : Bare_Base_Package_Decl  := Bare_Base_Package_Decl (Node);
     Ent : Internal_Entity_Base_Package_Decl :=
       Internal_Entity_Base_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Package_Body;
      Bound_Imprecise_Fallback : Boolean;
Fld : Internal_Entity_Body_Node;
Cast_Result : Internal_Entity_Package_Body;
Dyn_Var_Bind_Result : Internal_Entity_Package_Body;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3658 '<bind at nodes.lkt:6824:9>' Dyn_Var_Bind_Result ada/nodes.lkt:6824
Bound_Imprecise_Fallback := False; 
--# expr-start 3657 '<Cast to PackageBody at nodes.lkt:6826:9>' Cast_Result ada/nodes.lkt:6826
--# expr-start 3656 '<FieldAccess for body_part_for_decl at nodes.lkt:6826:9>' Fld ada/nodes.lkt:6826
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.body_part_for_decl
Fld := Libadalang.Implementation.Basic_Decl_P_Body_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 3656
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Package_Body_Range
   then
      Cast_Result := Create_Internal_Entity_Package_Body
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Package_Body;
   end if;
--# expr-done 3657
Dyn_Var_Bind_Result := Cast_Result; 
--# expr-done 3658
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Package_Decl_P_Body_Part;
--# end
--# property-start BasePackageDecl.declarative_parts ada/nodes.lkt:6829
pragma Warnings (Off, "is not referenced");
 function Base_Package_Decl_P_Declarative_Parts
  (Node : Bare_Base_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Base_Package_Decl  := Bare_Base_Package_Decl (Node);
     Ent : Internal_Entity_Base_Package_Decl :=
       Internal_Entity_Base_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_566 with Inline_Always;
            procedure Finalizer_Scope_2435 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Declarative_Part;
Fld : Internal_Entity_Public_Part;
Cast_Result : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
Fld_1 : Internal_Entity_Private_Part;
Cast_Result_1 : Internal_Entity_Declarative_Part;
Array_Lit_1 : Internal_Entity_Declarative_Part_Array_Access;
Scope_Result : Internal_Entity_Declarative_Part_Array_Access;
Result_Var : Internal_Entity_Declarative_Part_Array_Access;
Concat_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_566 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_566;
            procedure Finalizer_Scope_2435 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_2435;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3661 '<ArrayLiteral at nodes.lkt:6830:9>' Array_Lit ada/nodes.lkt:6830
--# expr-start 3660 '<Cast to DeclarativePart at nodes.lkt:6830:10>' Cast_Result ada/nodes.lkt:6830
--# expr-start 3659 '<FieldAccess for public_part at nodes.lkt:6830:10>' Fld ada/nodes.lkt:6830
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Public_Part (Node => Ent.Node.Base_Package_Decl_F_Public_Part, Info => Ent.Info);
--# expr-done 3659
      Cast_Result := Create_Internal_Entity_Declarative_Part
        (Node => Fld.Node,
         Info => Fld.Info);
--# expr-done 3660
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Cast_Result)); 
--# expr-done 3661
--# expr-start 3663 '<Cast to DeclarativePart at nodes.lkt:6831:11>' Cast_Result_1 ada/nodes.lkt:6831
--# expr-start 3662 '<FieldAccess for private_part at nodes.lkt:6831:11>' Fld_1 ada/nodes.lkt:6831
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Private_Part (Node => Ent.Node.Base_Package_Decl_F_Private_Part, Info => Ent.Info);
--# expr-done 3662
      Cast_Result_1 := Create_Internal_Entity_Declarative_Part
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
--# expr-done 3663
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Entity_Declarative_Part then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 3664 '<ArrayLiteral at nodes.lkt:6831:60>' Array_Lit_1 ada/nodes.lkt:6831
Array_Lit_1 := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Var_Expr_0)); 
--# expr-done 3664
Scope_Result := Array_Lit_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2435;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Declarative_Part_Array_Type;
end if;
      Inc_Ref (Result_Var);
Concat_Result := Concat (Array_Lit, Result_Var); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_566;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_566;
                     Finalizer_Scope_2435;
            raise;
      end;
   return Property_Result;
end Base_Package_Decl_P_Declarative_Parts;
--# end
--# property-start BasePackageDecl.env_names ada/nodes.lkt:6837
pragma Warnings (Off, "is not referenced");
 function Base_Package_Decl_P_Env_Names
  (Node : Bare_Base_Package_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Base_Package_Decl  := Bare_Base_Package_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_567 with Inline_Always;
            procedure Finalizer_Scope_2436 with Inline_Always;
      Local_Fqn : String_Type;
Var_Expr_0 : String_Type;
Fld : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Sym_1 : Symbol_Type;
Str : String_Type;
Concat_Result : String_Type;
Sym_2 : Symbol_Type;
Array_Lit_1 : Symbol_Type_Array_Access;
Fld_1 : Bare_Private_Part;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
Let_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_567 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Fqn);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_567;
            procedure Finalizer_Scope_2436 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2436;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3676 '<Let at nodes.lkt:6838:9>' Let_Result ada/nodes.lkt:6838
--# scope-start
--# expr-start 3665 '<FieldAccess for top_level_env_name at nodes.lkt:6838:19>' Fld ada/nodes.lkt:6838
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 3665
Local_Fqn := Fld; Inc_Ref (Local_Fqn);
--# bind fqn Local_Fqn
Var_Expr_0 := Local_Fqn;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_String then
   --# scope-start
   --# bind fqn Var_Expr_0
--# expr-start 3675 '<If at nodes.lkt:6842:13>' If_Result ada/nodes.lkt:6842
--# expr-start 3668 '<Not at nodes.lkt:6842:16>' Not_Val ada/nodes.lkt:6842
--# expr-start 3667 '<IsNull at nodes.lkt:6842:20>' Is_Null ada/nodes.lkt:6842
--# expr-start 3666 '<FieldAccess for private_part at nodes.lkt:6842:20>' Fld_1 ada/nodes.lkt:6842
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Base_Package_Decl_F_Private_Part;
--# expr-done 3666
Is_Null := Fld_1 = null; 
--# expr-done 3667
Not_Val := not (Is_Null); 
--# expr-done 3668
if Not_Val then
   --# expr-start 3670 '<ArrayLiteral at nodes.lkt:6842:51>' Array_Lit ada/nodes.lkt:6842
--# expr-start 3669 '<to_symbol at nodes.lkt:6842:52>' Sym ada/nodes.lkt:6842
Sym := String_To_Symbol (Self, Self.Unit.Context, Var_Expr_0); 
--# expr-done 3669
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 3670
   If_Result := Array_Lit;
else
   --# expr-start 3674 '<ArrayLiteral at nodes.lkt:6843:18>' Array_Lit_1 ada/nodes.lkt:6843
--# expr-start 3671 '<to_symbol at nodes.lkt:6843:19>' Sym_1 ada/nodes.lkt:6843
Sym_1 := String_To_Symbol (Self, Self.Unit.Context, Var_Expr_0); 
--# expr-done 3671
--# expr-start 3673 '<to_symbol at nodes.lkt:6843:34>' Sym_2 ada/nodes.lkt:6843
--# expr-start 3672 '<String at nodes.lkt:6843:41>' Str ada/nodes.lkt:6843
Str := Create_String (".__privatepart"); 
--# expr-done 3672
Concat_Result := Concat_String (Var_Expr_0, Str); 
Sym_2 := String_To_Symbol (Self, Self.Unit.Context, Concat_Result); 
--# expr-done 3673
Array_Lit_1 := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym_1, 2 => Sym_2)); 
--# expr-done 3674
   If_Result := Array_Lit_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 3675
Scope_Result := If_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2436;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
Let_Result := Result_Var; Inc_Ref (Let_Result);
--# end
--# expr-done 3676
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_567;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_567;
                     Finalizer_Scope_2436;
            raise;
      end;
   return Property_Result;
end Base_Package_Decl_P_Env_Names;
--# end
   --
   --  Primitives for Bare_Generic_Package_Internal
   --
      procedure Generic_Package_Internal_Pre_Env_Actions
        (Self            : Bare_Generic_Package_Internal;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_4 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_5 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Generic_Package_Internal
        (Self : Bare_Generic_Package_Internal
         ; Base_Package_Decl_F_Package_Name : Bare_Defining_Name
         ; Base_Package_Decl_F_Aspects : Bare_Aspect_Spec
         ; Base_Package_Decl_F_Public_Part : Bare_Public_Part
         ; Base_Package_Decl_F_Private_Part : Bare_Private_Part
         ; Base_Package_Decl_F_End_Name : Bare_End_Name
        ) is
      begin
            Initialize_Fields_For_Base_Package_Decl
              (Self, Base_Package_Decl_F_Package_Name, Base_Package_Decl_F_Aspects, Base_Package_Decl_F_Public_Part, Base_Package_Decl_F_Private_Part, Base_Package_Decl_F_End_Name);
      end Initialize_Fields_For_Generic_Package_Internal;
--# property-start GenericPackageInternal.is_library_item ada/nodes.lkt:6853
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Internal_P_Is_Library_Item
  (Node : Bare_Generic_Package_Internal
  )
   return Boolean
is
   Self : Bare_Generic_Package_Internal  := Bare_Generic_Package_Internal (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3679 '<IsA LibraryItem at nodes.lkt:6853:35>' Is_A ada/nodes.lkt:6853
--# expr-start 3678 '<parent at nodes.lkt:6853:35>' Fld_1 ada/nodes.lkt:6853
--# expr-start 3677 '<parent at nodes.lkt:6853:35>' Fld ada/nodes.lkt:6853
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 3677
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 3678
Is_A := Fld_1 /= null 
and then Fld_1.Kind in Ada_Library_Item_Range; 
--# expr-done 3679
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Package_Internal_P_Is_Library_Item;
--# end
--# property-start GenericPackageInternal._env_trans_parent_4 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_4
  (Node : Bare_Generic_Package_Internal
  )
   return Boolean
is
   Self : Bare_Generic_Package_Internal  := Bare_Generic_Package_Internal (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_4;
--# end
--# property-start GenericPackageInternal._env_names_5 ada/nodes.lkt:6856
pragma Warnings (Off, "is not referenced");
 function Env_Names_5
  (Node : Bare_Generic_Package_Internal
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Generic_Package_Internal  := Bare_Generic_Package_Internal (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1669 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1669 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1669;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3680 '<FieldAccess for env_names at nodes.lkt:6856:23>' Fld ada/nodes.lkt:6856
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasePackageDecl.env_names
Fld := Libadalang.Implementation.Base_Package_Decl_P_Env_Names (Node => Self);
--# end
--# expr-done 3680
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1669;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1669;
            raise;
      end;
   return Property_Result;
end Env_Names_5;
--# end
   --
   --  Primitives for Bare_Package_Decl
   --
      procedure Package_Decl_Pre_Env_Actions
        (Self            : Bare_Package_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_6 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_7 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:6864:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_8 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:6870:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_9 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_10 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_11 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_13 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_12 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_15 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_14 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Package_Decl
        (Self : Bare_Package_Decl
         ; Base_Package_Decl_F_Package_Name : Bare_Defining_Name
         ; Base_Package_Decl_F_Aspects : Bare_Aspect_Spec
         ; Base_Package_Decl_F_Public_Part : Bare_Public_Part
         ; Base_Package_Decl_F_Private_Part : Bare_Private_Part
         ; Base_Package_Decl_F_End_Name : Bare_End_Name
        ) is
      begin
            Initialize_Fields_For_Base_Package_Decl
              (Self, Base_Package_Decl_F_Package_Name, Base_Package_Decl_F_Aspects, Base_Package_Decl_F_Public_Part, Base_Package_Decl_F_Private_Part, Base_Package_Decl_F_End_Name);
      end Initialize_Fields_For_Package_Decl;
--# property-start PackageDecl._env_do_6 ada/nodes.lkt:6863
pragma Warnings (Off, "is not referenced");
 function Env_Do_6
  (Node : Bare_Package_Decl
  )
   return Boolean
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3681 '<FieldAccess for env_hook at nodes.lkt:6863:12>' Fld ada/nodes.lkt:6863
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 3681
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_6;
--# end
--# property-start PackageDecl._env_init_7 ada/nodes.lkt:6868
pragma Warnings (Off, "is not referenced");
 function Env_Init_7
  (Node : Bare_Package_Decl
  )
   return Internal_Designated_Env
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1671 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1671 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1671;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3682 '<FieldAccess for child_decl_initial_env at nodes.lkt:6868:13>' Fld ada/nodes.lkt:6868
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_initial_env
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Initial_Env (Node => Self, Private_Part => True);
--# end
--# expr-done 3682
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1671;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1671;
            raise;
      end;
   return Property_Result;
end Env_Init_7;
--# end
--# property-start PackageDecl._env_mappings_8 ada/nodes.lkt:6870
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_8
  (Node : Bare_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
     Ent : Internal_Entity_Package_Decl :=
       Internal_Entity_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1672 with Inline_Always;
      Fld : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1672 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1672;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3683 '<FieldAccess for child_decl_env_assocs at nodes.lkt:6870:20>' Fld ada/nodes.lkt:6870
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_env_assocs
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Env_Assocs (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 3683
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1672;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1672;
            raise;
      end;
   return Property_Result;
end Env_Mappings_8;
--# end
--# property-start PackageDecl._env_trans_parent_9 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_9
  (Node : Bare_Package_Decl
  )
   return Boolean
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_9;
--# end
--# property-start PackageDecl._env_names_10 ada/nodes.lkt:6871
pragma Warnings (Off, "is not referenced");
 function Env_Names_10
  (Node : Bare_Package_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1674 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1674 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1674;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3684 '<FieldAccess for env_names at nodes.lkt:6871:23>' Fld ada/nodes.lkt:6871
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasePackageDecl.env_names
Fld := Libadalang.Implementation.Base_Package_Decl_P_Env_Names (Node => Self);
--# end
--# expr-done 3684
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1674;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1674;
            raise;
      end;
   return Property_Result;
end Env_Names_10;
--# end
--# property-start PackageDecl._env_do_11 ada/nodes.lkt:6872
pragma Warnings (Off, "is not referenced");
 function Env_Do_11
  (Node : Bare_Package_Decl
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1675 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1675 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1675;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3685 '<FieldAccess for populate_dependent_units at nodes.lkt:6872:12>' Fld ada/nodes.lkt:6872
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 3685
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1675;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1675;
            raise;
      end;
   return Property_Result;
end Env_Do_11;
--# end
--# property-start PackageDecl._ref_env_nodes_12 ada/nodes.lkt:6874
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_12
  (Node : Bare_Package_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1676 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1676 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1676;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3686 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:6874:13>' Fld ada/nodes.lkt:6874
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 3686
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1676;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1676;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_12;
--# end
--# property-start PackageDecl._ref_cond_13 ada/nodes.lkt:6876
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_13
  (Node : Bare_Package_Decl
  )
   return Boolean
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3688 '<IsA LibraryItem, Subunit at nodes.lkt:6876:18>' Is_A ada/nodes.lkt:6876
--# expr-start 3687 '<parent at nodes.lkt:6876:18>' Fld ada/nodes.lkt:6876
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 3687
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 3688
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_13;
--# end
--# property-start PackageDecl._ref_env_nodes_14 ada/nodes.lkt:6879
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_14
  (Node : Bare_Package_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1678 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1678 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1678;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3689 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:6879:13>' Fld ada/nodes.lkt:6879
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 3689
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1678;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1678;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_14;
--# end
--# property-start PackageDecl._ref_cond_15 ada/nodes.lkt:6881
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_15
  (Node : Bare_Package_Decl
  )
   return Boolean
is
   Self : Bare_Package_Decl  := Bare_Package_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3691 '<IsA LibraryItem, Subunit at nodes.lkt:6881:18>' Is_A ada/nodes.lkt:6881
--# expr-start 3690 '<parent at nodes.lkt:6881:18>' Fld ada/nodes.lkt:6881
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 3690
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 3691
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_15;
--# end
   --
   --  Primitives for Bare_Base_Type_Decl
   --
      procedure Base_Type_Decl_Pre_Env_Actions
        (Self            : Bare_Base_Type_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_16 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:8672:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      end;
      procedure Initialize_Fields_For_Base_Type_Decl
        (Self : Bare_Base_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
        ) is
      begin
            Self.Base_Type_Decl_F_Name := Base_Type_Decl_F_Name;
      Self.Bare_Base_Type_Decl_Lf_State_Attributes_Repo := Uninitialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Attributes_Repo := No_Bare_Ada_Node;
      Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitive_Subps := Uninitialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Direct_Primitive_Subps := No_Internal_Inner_Env_Assoc_Array_Type;
      Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitives_Env := Uninitialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Direct_Primitives_Env := Empty_Env;
      Self.Bare_Base_Type_Decl_Lf_State_Synthetic_Object_Decl_Env_Assoc := Uninitialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Synthetic_Object_Decl_Env_Assoc := No_Env_Assoc;
      Self.Bare_Base_Type_Decl_Lf_State_Dottable_Subps_Env := Uninitialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Dottable_Subps_Env := Empty_Env;
      end Initialize_Fields_For_Base_Type_Decl;
   function Base_Type_Decl_F_Name
     (Node : Bare_Base_Type_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Base_Type_Decl_F_Name;
   end;
--# property-start BaseTypeDecl.defining_names ada/nodes.lkt:6894
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Defining_Names
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_569 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_569 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_569;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3693 '<ArrayLiteral at nodes.lkt:6894:57>' Array_Lit ada/nodes.lkt:6894
--# expr-start 3692 '<FieldAccess for name at nodes.lkt:6894:58>' Fld ada/nodes.lkt:6894
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Base_Type_Decl_F_Name, Info => Ent.Info);
--# expr-done 3692
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 3693
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_569;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_569;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Defining_Names;
--# end
--# property-start BaseTypeDecl.base_subtype ada/nodes.lkt:6901
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Base_Subtype
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Discrete_Base_Subtype_Decl;
Match_1 : Internal_Entity_Base_Subtype_Decl;
Match_2 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Discrete_Base_Subtype_Decl;
Cast_Expr : Internal_Entity_Discrete_Base_Subtype_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity_Base_Subtype_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Base_Subtype,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 3696 '<Match at nodes.lkt:6901:48>' Match_Result ada/nodes.lkt:6901
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Discrete_Base_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Discrete_Base_Subtype_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind db Match_0
Cast_Expr := Match_0; 
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Let_Result := Cast_Result_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Base_Subtype_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind st Match_1
--# expr-start 3695 '<FieldAccess for base_subtype at nodes.lkt:6903:37>' Fld_1 ada/nodes.lkt:6903
--# expr-start 3694 '<FieldAccess for get_type at nodes.lkt:6903:37>' Fld ada/nodes.lkt:6903
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Match_1.Node, Origin => Origin, E_Info => Match_1.Info);
--# end
--# expr-done 3694
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 3695
Let_Result_1 := Fld_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Classwide_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := Ent; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 3696
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Base_Subtype;
--# end
--# property-start BaseTypeDecl.anonymous_access_type ada/nodes.lkt:6908
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Anonymous_Access_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Bare_Defining_Name;
New_Node : Bare_Anonymous_Type_Access_Def;
Cast_Result : Bare_Type_Def;
New_Node_1 : Bare_Synth_Anonymous_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Anonymous_Access_Type,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 3701 '<as_entity at nodes.lkt:6909:9>' If_Result ada/nodes.lkt:6909
--# expr-start 3700 '<Cast to BaseTypeDecl at nodes.lkt:6909:9>' Cast_Result_1 ada/nodes.lkt:6909
--# expr-start 3699 '<New SynthAnonymousTypeDecl at nodes.lkt:6909:9>' New_Node_1 ada/nodes.lkt:6909
--# expr-start 3697 '<FieldAccess for name at nodes.lkt:6910:18>' Fld ada/nodes.lkt:6910
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Base_Type_Decl_F_Name;
--# expr-done 3697
--# expr-start 3698 '<New AnonymousTypeAccessDef at nodes.lkt:6912:22>' New_Node ada/nodes.lkt:6912
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Self = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "AnonymousTypeAccessDef.type_decl cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Anonymous_Type_Access_Def);
Initialize
  (Self => New_Node,
   Kind => Ada_Anonymous_Type_Access_Def,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Anonymous_Type_Access_Def
     (Self => New_Node,
      Access_Def_F_Has_Not_Null => No_Bare_Ada_Node, Anonymous_Type_Access_Def_F_Type_Decl => Self);
--# expr-done 3698
      Cast_Result := New_Node;
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Cast_Result = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "TypeDecl.type_def cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node_1 := new Root_Node_Record
  (Ada_Synth_Anonymous_Type_Decl);
Initialize
  (Self => New_Node_1,
   Kind => Ada_Synth_Anonymous_Type_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_1);
   Initialize_Fields_For_Synth_Anonymous_Type_Decl
     (Self => New_Node_1,
      Base_Type_Decl_F_Name => Fld, Type_Decl_F_Discriminants => No_Bare_Ada_Node, Type_Decl_F_Type_Def => Cast_Result);
--# expr-done 3699
      Cast_Result_1 := New_Node_1;
--# expr-done 3700
Is_Null := Cast_Result_1 = null; 
if Is_Null then
   If_Result := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Cast_Result_1); 
   If_Result := As_Entity;
end if;
--# expr-done 3701
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Anonymous_Access_Type;
--# end
--# property-start BaseTypeDecl.anonymous_access_type_or_null ada/nodes.lkt:6920
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Anonymous_Access_Type_Or_Null
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_110 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
Var_Expr_110 := Ent;
if Var_Expr_110 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 3702 '<FieldAccess for anonymous_access_type at nodes.lkt:6921:9>' Fld ada/nodes.lkt:6921
      if Var_Expr_110.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.anonymous_access_type
Fld := Libadalang.Implementation.Base_Type_Decl_P_Anonymous_Access_Type (Node => Var_Expr_110.Node, E_Info => Var_Expr_110.Info);
--# end
--# expr-done 3702
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Anonymous_Access_Type_Or_Null;
--# end
--# property-start BaseTypeDecl.attributes_repo ada/nodes.lkt:6924
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_F_Attributes_Repo
  (Node : Bare_Base_Type_Decl
  )
   return Bare_Type_Attributes_Repository
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Type_Attributes_Repository;
      New_Node : Bare_Type_Attributes_Repository;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Base_Type_Decl_Lf_State_Attributes_Repo is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Base_Type_Decl_Lf_Stg_Attributes_Repo;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Base_Type_Decl_Lf_State_Attributes_Repo,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3703 '<New TypeAttributesRepository at nodes.lkt:6925:9>' New_Node ada/nodes.lkt:6925
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
New_Node := new Root_Node_Record
  (Ada_Type_Attributes_Repository);
Initialize
  (Self => New_Node,
   Kind => Ada_Type_Attributes_Repository,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
      New_Node.Type_Attributes_Repository_Base_Type :=
         Self;
--# expr-done 3703
         Property_Result := New_Node;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               Self.Bare_Base_Type_Decl_Lf_State_Attributes_Repo :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Base_Type_Decl_Lf_State_Attributes_Repo := Initialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Attributes_Repo := Property_Result;
   return Property_Result;
end Base_Type_Decl_F_Attributes_Repo;
--# end
--# property-start BaseTypeDecl.synthesize_attribute_subprogram ada/nodes.lkt:6929
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Synthesize_Attribute_Subprogram
  (Node : Bare_Base_Type_Decl
      ; Attr_Name : Symbol_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Subp_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind attr_name Attr_Name
   Property_Result : Internal_Entity_Basic_Subp_Decl;
      Local_Repo : Bare_Type_Attributes_Repository;
Local_Subp : Bare_Basic_Subp_Decl;
Fld : Bare_Type_Attributes_Repository;
Fld_1 : Bare_Basic_Subp_Decl;
Fld_2 : Bare_Basic_Subp_Decl;
Fld_3 : Bare_Basic_Subp_Decl;
Fld_4 : Bare_Basic_Subp_Decl;
Fld_5 : Bare_Basic_Subp_Decl;
Fld_6 : Bare_Basic_Subp_Decl;
Fld_7 : Bare_Basic_Subp_Decl;
Fld_8 : Bare_Basic_Subp_Decl;
Fld_9 : Bare_Basic_Subp_Decl;
Fld_10 : Bare_Basic_Subp_Decl;
Fld_11 : Bare_Basic_Subp_Decl;
Fld_12 : Bare_Basic_Subp_Decl;
Fld_13 : Bare_Basic_Subp_Decl;
Fld_14 : Bare_Basic_Subp_Decl;
Fld_15 : Bare_Basic_Subp_Decl;
Fld_16 : Bare_Basic_Subp_Decl;
Fld_17 : Bare_Basic_Subp_Decl;
Fld_18 : Bare_Basic_Subp_Decl;
Fld_19 : Bare_Basic_Subp_Decl;
Fld_20 : Bare_Basic_Subp_Decl;
Fld_21 : Bare_Basic_Subp_Decl;
Fld_22 : Bare_Basic_Subp_Decl;
Fld_23 : Bare_Basic_Subp_Decl;
Fld_24 : Bare_Basic_Subp_Decl;
Fld_25 : Bare_Basic_Subp_Decl;
Fld_26 : Bare_Basic_Subp_Decl;
Fld_27 : Bare_Basic_Subp_Decl;
Fld_28 : Bare_Basic_Subp_Decl;
Fld_29 : Bare_Basic_Subp_Decl;
Fld_30 : Bare_Basic_Subp_Decl;
Fld_31 : Bare_Basic_Subp_Decl;
Fld_32 : Bare_Basic_Subp_Decl;
Fld_33 : Bare_Basic_Subp_Decl;
Fld_34 : Bare_Basic_Subp_Decl;
Fld_35 : Bare_Basic_Subp_Decl;
Fld_36 : Bare_Basic_Subp_Decl;
Fld_37 : Bare_Basic_Subp_Decl;
Fld_38 : Bare_Basic_Subp_Decl;
Fld_39 : Bare_Basic_Subp_Decl;
Fld_40 : Bare_Basic_Subp_Decl;
Fld_41 : Bare_Basic_Subp_Decl;
Sym : Symbol_Type;
Is_Equal : Boolean;
If_Result : Bare_Basic_Subp_Decl;
Sym_1 : Symbol_Type;
Is_Equal_1 : Boolean;
If_Result_1 : Bare_Basic_Subp_Decl;
Sym_2 : Symbol_Type;
Is_Equal_2 : Boolean;
If_Result_2 : Bare_Basic_Subp_Decl;
Sym_3 : Symbol_Type;
Is_Equal_3 : Boolean;
If_Result_3 : Bare_Basic_Subp_Decl;
Sym_4 : Symbol_Type;
Is_Equal_4 : Boolean;
If_Result_4 : Bare_Basic_Subp_Decl;
Sym_5 : Symbol_Type;
Is_Equal_5 : Boolean;
If_Result_5 : Bare_Basic_Subp_Decl;
Sym_6 : Symbol_Type;
Is_Equal_6 : Boolean;
If_Result_6 : Bare_Basic_Subp_Decl;
Sym_7 : Symbol_Type;
Is_Equal_7 : Boolean;
If_Result_7 : Bare_Basic_Subp_Decl;
Sym_8 : Symbol_Type;
Is_Equal_8 : Boolean;
If_Result_8 : Bare_Basic_Subp_Decl;
Sym_9 : Symbol_Type;
Is_Equal_9 : Boolean;
If_Result_9 : Bare_Basic_Subp_Decl;
Sym_10 : Symbol_Type;
Is_Equal_10 : Boolean;
If_Result_10 : Bare_Basic_Subp_Decl;
Sym_11 : Symbol_Type;
Is_Equal_11 : Boolean;
If_Result_11 : Bare_Basic_Subp_Decl;
Sym_12 : Symbol_Type;
Is_Equal_12 : Boolean;
If_Result_12 : Bare_Basic_Subp_Decl;
Sym_13 : Symbol_Type;
Is_Equal_13 : Boolean;
If_Result_13 : Bare_Basic_Subp_Decl;
Sym_14 : Symbol_Type;
Is_Equal_14 : Boolean;
If_Result_14 : Bare_Basic_Subp_Decl;
Sym_15 : Symbol_Type;
Is_Equal_15 : Boolean;
If_Result_15 : Bare_Basic_Subp_Decl;
Sym_16 : Symbol_Type;
Is_Equal_16 : Boolean;
If_Result_16 : Bare_Basic_Subp_Decl;
Sym_17 : Symbol_Type;
Is_Equal_17 : Boolean;
If_Result_17 : Bare_Basic_Subp_Decl;
Sym_18 : Symbol_Type;
Is_Equal_18 : Boolean;
If_Result_18 : Bare_Basic_Subp_Decl;
Sym_19 : Symbol_Type;
Is_Equal_19 : Boolean;
If_Result_19 : Bare_Basic_Subp_Decl;
Sym_20 : Symbol_Type;
Is_Equal_20 : Boolean;
If_Result_20 : Bare_Basic_Subp_Decl;
Sym_21 : Symbol_Type;
Is_Equal_21 : Boolean;
If_Result_21 : Bare_Basic_Subp_Decl;
Sym_22 : Symbol_Type;
Is_Equal_22 : Boolean;
If_Result_22 : Bare_Basic_Subp_Decl;
Sym_23 : Symbol_Type;
Is_Equal_23 : Boolean;
If_Result_23 : Bare_Basic_Subp_Decl;
Sym_24 : Symbol_Type;
Is_Equal_24 : Boolean;
If_Result_24 : Bare_Basic_Subp_Decl;
Sym_25 : Symbol_Type;
Is_Equal_25 : Boolean;
If_Result_25 : Bare_Basic_Subp_Decl;
Sym_26 : Symbol_Type;
Is_Equal_26 : Boolean;
If_Result_26 : Bare_Basic_Subp_Decl;
Sym_27 : Symbol_Type;
Is_Equal_27 : Boolean;
If_Result_27 : Bare_Basic_Subp_Decl;
Sym_28 : Symbol_Type;
Is_Equal_28 : Boolean;
If_Result_28 : Bare_Basic_Subp_Decl;
Sym_29 : Symbol_Type;
Is_Equal_29 : Boolean;
If_Result_29 : Bare_Basic_Subp_Decl;
Sym_30 : Symbol_Type;
Is_Equal_30 : Boolean;
If_Result_30 : Bare_Basic_Subp_Decl;
Sym_31 : Symbol_Type;
Is_Equal_31 : Boolean;
If_Result_31 : Bare_Basic_Subp_Decl;
Sym_32 : Symbol_Type;
Is_Equal_32 : Boolean;
If_Result_32 : Bare_Basic_Subp_Decl;
Sym_33 : Symbol_Type;
Is_Equal_33 : Boolean;
If_Result_33 : Bare_Basic_Subp_Decl;
Sym_34 : Symbol_Type;
Is_Equal_34 : Boolean;
If_Result_34 : Bare_Basic_Subp_Decl;
Sym_35 : Symbol_Type;
Is_Equal_35 : Boolean;
If_Result_35 : Bare_Basic_Subp_Decl;
Sym_36 : Symbol_Type;
Is_Equal_36 : Boolean;
If_Result_36 : Bare_Basic_Subp_Decl;
Sym_37 : Symbol_Type;
Is_Equal_37 : Boolean;
If_Result_37 : Bare_Basic_Subp_Decl;
Sym_38 : Symbol_Type;
Is_Equal_38 : Boolean;
If_Result_38 : Bare_Basic_Subp_Decl;
Sym_39 : Symbol_Type;
Is_Equal_39 : Boolean;
If_Result_39 : Bare_Basic_Subp_Decl;
Sym_40 : Symbol_Type;
Is_Equal_40 : Boolean;
If_Result_40 : Bare_Basic_Subp_Decl;
Fld_42 : Internal_Entity_Info;
Fld_43 : Env_Rebindings;
Fld_44 : Internal_Entity_Info;
Fld_45 : Boolean;
New_Struct : Internal_Entity_Info;
New_Struct_1 : Internal_Entity_Basic_Subp_Decl;
Let_Result : Internal_Entity_Basic_Subp_Decl;
Let_Result_1 : Internal_Entity_Basic_Subp_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3876 '<Let at nodes.lkt:6932:9>' Let_Result_1 ada/nodes.lkt:6932
--# scope-start
--# expr-start 3704 '<FieldAccess for attributes_repo at nodes.lkt:6932:20>' Fld ada/nodes.lkt:6932
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.attributes_repo
Fld := Libadalang.Implementation.Base_Type_Decl_F_Attributes_Repo (Node => Self);
--# end
--# expr-done 3704
Local_Repo := Fld; 
--# bind repo Local_Repo
--# expr-start 3875 '<Let at nodes.lkt:6933:9>' Let_Result ada/nodes.lkt:6933
--# scope-start
--# expr-start 3868 '<If at nodes.lkt:6934:13>' If_Result_40 ada/nodes.lkt:6934
--# expr-start 3706 '<Eq at nodes.lkt:6934:16>' Is_Equal_40 ada/nodes.lkt:6934
--# expr-start 3705 '<Symbol succ at nodes.lkt:6934:29>' Sym_40 ada/nodes.lkt:6934
Sym_40 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Succ_413); 
--# expr-done 3705
Is_Equal_40 := Attr_Name = Sym_40; 
--# expr-done 3706
if Is_Equal_40 then
   --# expr-start 3707 '<FieldAccess for succ at nodes.lkt:6934:42>' Fld_1 ada/nodes.lkt:6934
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.succ
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Succ (Node => Local_Repo);
--# end
--# expr-done 3707
   If_Result_40 := Fld_1;
else
   --# expr-start 3867 '<If at nodes.lkt:6934:13>' If_Result_39 ada/nodes.lkt:6934
--# expr-start 3709 '<Eq at nodes.lkt:6935:18>' Is_Equal_39 ada/nodes.lkt:6935
--# expr-start 3708 '<Symbol pred at nodes.lkt:6935:31>' Sym_39 ada/nodes.lkt:6935
Sym_39 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pred_386); 
--# expr-done 3708
Is_Equal_39 := Attr_Name = Sym_39; 
--# expr-done 3709
if Is_Equal_39 then
   --# expr-start 3710 '<FieldAccess for pred at nodes.lkt:6935:44>' Fld_2 ada/nodes.lkt:6935
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.pred
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Pred (Node => Local_Repo);
--# end
--# expr-done 3710
   If_Result_39 := Fld_2;
else
   --# expr-start 3866 '<If at nodes.lkt:6934:13>' If_Result_38 ada/nodes.lkt:6934
--# expr-start 3712 '<Eq at nodes.lkt:6936:18>' Is_Equal_38 ada/nodes.lkt:6936
--# expr-start 3711 '<Symbol min at nodes.lkt:6936:31>' Sym_38 ada/nodes.lkt:6936
Sym_38 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Min_371); 
--# expr-done 3711
Is_Equal_38 := Attr_Name = Sym_38; 
--# expr-done 3712
if Is_Equal_38 then
   --# expr-start 3713 '<FieldAccess for min at nodes.lkt:6936:43>' Fld_3 ada/nodes.lkt:6936
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.min
Fld_3 := Libadalang.Implementation.Type_Attributes_Repository_F_Min (Node => Local_Repo);
--# end
--# expr-done 3713
   If_Result_38 := Fld_3;
else
   --# expr-start 3865 '<If at nodes.lkt:6934:13>' If_Result_37 ada/nodes.lkt:6934
--# expr-start 3715 '<Eq at nodes.lkt:6937:18>' Is_Equal_37 ada/nodes.lkt:6937
--# expr-start 3714 '<Symbol max at nodes.lkt:6937:31>' Sym_37 ada/nodes.lkt:6937
Sym_37 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Max_370); 
--# expr-done 3714
Is_Equal_37 := Attr_Name = Sym_37; 
--# expr-done 3715
if Is_Equal_37 then
   --# expr-start 3716 '<FieldAccess for max at nodes.lkt:6937:43>' Fld_4 ada/nodes.lkt:6937
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.max
Fld_4 := Libadalang.Implementation.Type_Attributes_Repository_F_Max (Node => Local_Repo);
--# end
--# expr-done 3716
   If_Result_37 := Fld_4;
else
   --# expr-start 3864 '<If at nodes.lkt:6934:13>' If_Result_36 ada/nodes.lkt:6934
--# expr-start 3718 '<Eq at nodes.lkt:6938:18>' Is_Equal_36 ada/nodes.lkt:6938
--# expr-start 3717 '<Symbol round at nodes.lkt:6938:31>' Sym_36 ada/nodes.lkt:6938
Sym_36 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Round_405); 
--# expr-done 3717
Is_Equal_36 := Attr_Name = Sym_36; 
--# expr-done 3718
if Is_Equal_36 then
   --# expr-start 3719 '<FieldAccess for round at nodes.lkt:6938:45>' Fld_5 ada/nodes.lkt:6938
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.round
Fld_5 := Libadalang.Implementation.Type_Attributes_Repository_F_Round (Node => Local_Repo);
--# end
--# expr-done 3719
   If_Result_36 := Fld_5;
else
   --# expr-start 3863 '<If at nodes.lkt:6934:13>' If_Result_35 ada/nodes.lkt:6934
--# expr-start 3721 '<Eq at nodes.lkt:6939:18>' Is_Equal_35 ada/nodes.lkt:6939
--# expr-start 3720 '<Symbol rounding at nodes.lkt:6939:31>' Sym_35 ada/nodes.lkt:6939
Sym_35 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Rounding_406); 
--# expr-done 3720
Is_Equal_35 := Attr_Name = Sym_35; 
--# expr-done 3721
if Is_Equal_35 then
   --# expr-start 3722 '<FieldAccess for rounding at nodes.lkt:6939:48>' Fld_6 ada/nodes.lkt:6939
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.rounding
Fld_6 := Libadalang.Implementation.Type_Attributes_Repository_F_Rounding (Node => Local_Repo);
--# end
--# expr-done 3722
   If_Result_35 := Fld_6;
else
   --# expr-start 3862 '<If at nodes.lkt:6934:13>' If_Result_34 ada/nodes.lkt:6934
--# expr-start 3724 '<Eq at nodes.lkt:6940:18>' Is_Equal_34 ada/nodes.lkt:6940
--# expr-start 3723 '<Symbol unbiased_rounding at nodes.lkt:6940:31>' Sym_34 ada/nodes.lkt:6940
Sym_34 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unbiased_Rounding_422); 
--# expr-done 3723
Is_Equal_34 := Attr_Name = Sym_34; 
--# expr-done 3724
if Is_Equal_34 then
   --# expr-start 3725 '<FieldAccess for unbiased_rounding at nodes.lkt:6940:57>' Fld_7 ada/nodes.lkt:6940
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.unbiased_rounding
Fld_7 := Libadalang.Implementation.Type_Attributes_Repository_F_Unbiased_Rounding (Node => Local_Repo);
--# end
--# expr-done 3725
   If_Result_34 := Fld_7;
else
   --# expr-start 3861 '<If at nodes.lkt:6934:13>' If_Result_33 ada/nodes.lkt:6934
--# expr-start 3727 '<Eq at nodes.lkt:6941:18>' Is_Equal_33 ada/nodes.lkt:6941
--# expr-start 3726 '<Symbol ceiling at nodes.lkt:6941:31>' Sym_33 ada/nodes.lkt:6941
Sym_33 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ceiling_332); 
--# expr-done 3726
Is_Equal_33 := Attr_Name = Sym_33; 
--# expr-done 3727
if Is_Equal_33 then
   --# expr-start 3728 '<FieldAccess for ceiling at nodes.lkt:6941:47>' Fld_8 ada/nodes.lkt:6941
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.ceiling
Fld_8 := Libadalang.Implementation.Type_Attributes_Repository_F_Ceiling (Node => Local_Repo);
--# end
--# expr-done 3728
   If_Result_33 := Fld_8;
else
   --# expr-start 3860 '<If at nodes.lkt:6934:13>' If_Result_32 ada/nodes.lkt:6934
--# expr-start 3730 '<Eq at nodes.lkt:6942:18>' Is_Equal_32 ada/nodes.lkt:6942
--# expr-start 3729 '<Symbol floor at nodes.lkt:6942:31>' Sym_32 ada/nodes.lkt:6942
Sym_32 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Floor_351); 
--# expr-done 3729
Is_Equal_32 := Attr_Name = Sym_32; 
--# expr-done 3730
if Is_Equal_32 then
   --# expr-start 3731 '<FieldAccess for floor at nodes.lkt:6942:45>' Fld_9 ada/nodes.lkt:6942
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.floor
Fld_9 := Libadalang.Implementation.Type_Attributes_Repository_F_Floor (Node => Local_Repo);
--# end
--# expr-done 3731
   If_Result_32 := Fld_9;
else
   --# expr-start 3859 '<If at nodes.lkt:6934:13>' If_Result_31 ada/nodes.lkt:6934
--# expr-start 3733 '<Eq at nodes.lkt:6943:18>' Is_Equal_31 ada/nodes.lkt:6943
--# expr-start 3732 '<Symbol truncation at nodes.lkt:6943:31>' Sym_31 ada/nodes.lkt:6943
Sym_31 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Truncation_420); 
--# expr-done 3732
Is_Equal_31 := Attr_Name = Sym_31; 
--# expr-done 3733
if Is_Equal_31 then
   --# expr-start 3734 '<FieldAccess for truncation at nodes.lkt:6943:50>' Fld_10 ada/nodes.lkt:6943
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.truncation
Fld_10 := Libadalang.Implementation.Type_Attributes_Repository_F_Truncation (Node => Local_Repo);
--# end
--# expr-done 3734
   If_Result_31 := Fld_10;
else
   --# expr-start 3858 '<If at nodes.lkt:6934:13>' If_Result_30 ada/nodes.lkt:6934
--# expr-start 3736 '<Eq at nodes.lkt:6944:18>' Is_Equal_30 ada/nodes.lkt:6944
--# expr-start 3735 '<Symbol machine at nodes.lkt:6944:31>' Sym_30 ada/nodes.lkt:6944
Sym_30 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_368); 
--# expr-done 3735
Is_Equal_30 := Attr_Name = Sym_30; 
--# expr-done 3736
if Is_Equal_30 then
   --# expr-start 3737 '<FieldAccess for machine at nodes.lkt:6944:47>' Fld_11 ada/nodes.lkt:6944
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.machine
Fld_11 := Libadalang.Implementation.Type_Attributes_Repository_F_Machine (Node => Local_Repo);
--# end
--# expr-done 3737
   If_Result_30 := Fld_11;
else
   --# expr-start 3857 '<If at nodes.lkt:6934:13>' If_Result_29 ada/nodes.lkt:6934
--# expr-start 3739 '<Eq at nodes.lkt:6945:18>' Is_Equal_29 ada/nodes.lkt:6945
--# expr-start 3738 '<Symbol machine_rounding at nodes.lkt:6945:31>' Sym_29 ada/nodes.lkt:6945
Sym_29 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Rounding_369); 
--# expr-done 3738
Is_Equal_29 := Attr_Name = Sym_29; 
--# expr-done 3739
if Is_Equal_29 then
   --# expr-start 3740 '<FieldAccess for machine_rounding at nodes.lkt:6945:56>' Fld_12 ada/nodes.lkt:6945
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.machine_rounding
Fld_12 := Libadalang.Implementation.Type_Attributes_Repository_F_Machine_Rounding (Node => Local_Repo);
--# end
--# expr-done 3740
   If_Result_29 := Fld_12;
else
   --# expr-start 3856 '<If at nodes.lkt:6934:13>' If_Result_28 ada/nodes.lkt:6934
--# expr-start 3742 '<Eq at nodes.lkt:6946:18>' Is_Equal_28 ada/nodes.lkt:6946
--# expr-start 3741 '<Symbol fraction at nodes.lkt:6946:31>' Sym_28 ada/nodes.lkt:6946
Sym_28 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Fraction_353); 
--# expr-done 3741
Is_Equal_28 := Attr_Name = Sym_28; 
--# expr-done 3742
if Is_Equal_28 then
   --# expr-start 3743 '<FieldAccess for fraction at nodes.lkt:6946:48>' Fld_13 ada/nodes.lkt:6946
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.fraction
Fld_13 := Libadalang.Implementation.Type_Attributes_Repository_F_Fraction (Node => Local_Repo);
--# end
--# expr-done 3743
   If_Result_28 := Fld_13;
else
   --# expr-start 3855 '<If at nodes.lkt:6934:13>' If_Result_27 ada/nodes.lkt:6934
--# expr-start 3745 '<Eq at nodes.lkt:6947:18>' Is_Equal_27 ada/nodes.lkt:6947
--# expr-start 3744 '<Symbol exponent at nodes.lkt:6947:31>' Sym_27 ada/nodes.lkt:6947
Sym_27 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exponent_349); 
--# expr-done 3744
Is_Equal_27 := Attr_Name = Sym_27; 
--# expr-done 3745
if Is_Equal_27 then
   --# expr-start 3746 '<FieldAccess for exponent at nodes.lkt:6947:48>' Fld_14 ada/nodes.lkt:6947
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.exponent
Fld_14 := Libadalang.Implementation.Type_Attributes_Repository_F_Exponent (Node => Local_Repo);
--# end
--# expr-done 3746
   If_Result_27 := Fld_14;
else
   --# expr-start 3854 '<If at nodes.lkt:6934:13>' If_Result_26 ada/nodes.lkt:6934
--# expr-start 3748 '<Eq at nodes.lkt:6948:18>' Is_Equal_26 ada/nodes.lkt:6948
--# expr-start 3747 '<Symbol copy_sign at nodes.lkt:6948:31>' Sym_26 ada/nodes.lkt:6948
Sym_26 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Copy_Sign_335); 
--# expr-done 3747
Is_Equal_26 := Attr_Name = Sym_26; 
--# expr-done 3748
if Is_Equal_26 then
   --# expr-start 3749 '<FieldAccess for copy_sign at nodes.lkt:6948:49>' Fld_15 ada/nodes.lkt:6948
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.copy_sign
Fld_15 := Libadalang.Implementation.Type_Attributes_Repository_F_Copy_Sign (Node => Local_Repo);
--# end
--# expr-done 3749
   If_Result_26 := Fld_15;
else
   --# expr-start 3853 '<If at nodes.lkt:6934:13>' If_Result_25 ada/nodes.lkt:6934
--# expr-start 3751 '<Eq at nodes.lkt:6949:18>' Is_Equal_25 ada/nodes.lkt:6949
--# expr-start 3750 '<Symbol remainder at nodes.lkt:6949:31>' Sym_25 ada/nodes.lkt:6949
Sym_25 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Remainder_396); 
--# expr-done 3750
Is_Equal_25 := Attr_Name = Sym_25; 
--# expr-done 3751
if Is_Equal_25 then
   --# expr-start 3752 '<FieldAccess for remainder at nodes.lkt:6949:49>' Fld_16 ada/nodes.lkt:6949
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.remainder
Fld_16 := Libadalang.Implementation.Type_Attributes_Repository_F_Remainder (Node => Local_Repo);
--# end
--# expr-done 3752
   If_Result_25 := Fld_16;
else
   --# expr-start 3852 '<If at nodes.lkt:6934:13>' If_Result_24 ada/nodes.lkt:6934
--# expr-start 3754 '<Eq at nodes.lkt:6950:18>' Is_Equal_24 ada/nodes.lkt:6950
--# expr-start 3753 '<Symbol adjacent at nodes.lkt:6950:31>' Sym_24 ada/nodes.lkt:6950
Sym_24 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Adjacent_321); 
--# expr-done 3753
Is_Equal_24 := Attr_Name = Sym_24; 
--# expr-done 3754
if Is_Equal_24 then
   --# expr-start 3755 '<FieldAccess for adjacent at nodes.lkt:6950:48>' Fld_17 ada/nodes.lkt:6950
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.adjacent
Fld_17 := Libadalang.Implementation.Type_Attributes_Repository_F_Adjacent (Node => Local_Repo);
--# end
--# expr-done 3755
   If_Result_24 := Fld_17;
else
   --# expr-start 3851 '<If at nodes.lkt:6934:13>' If_Result_23 ada/nodes.lkt:6934
--# expr-start 3757 '<Eq at nodes.lkt:6951:18>' Is_Equal_23 ada/nodes.lkt:6951
--# expr-start 3756 '<Symbol scaling at nodes.lkt:6951:31>' Sym_23 ada/nodes.lkt:6951
Sym_23 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Scaling_407); 
--# expr-done 3756
Is_Equal_23 := Attr_Name = Sym_23; 
--# expr-done 3757
if Is_Equal_23 then
   --# expr-start 3758 '<FieldAccess for scaling at nodes.lkt:6951:47>' Fld_18 ada/nodes.lkt:6951
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.scaling
Fld_18 := Libadalang.Implementation.Type_Attributes_Repository_F_Scaling (Node => Local_Repo);
--# end
--# expr-done 3758
   If_Result_23 := Fld_18;
else
   --# expr-start 3850 '<If at nodes.lkt:6934:13>' If_Result_22 ada/nodes.lkt:6934
--# expr-start 3760 '<Eq at nodes.lkt:6952:18>' Is_Equal_22 ada/nodes.lkt:6952
--# expr-start 3759 '<Symbol compose at nodes.lkt:6952:31>' Sym_22 ada/nodes.lkt:6952
Sym_22 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Compose_333); 
--# expr-done 3759
Is_Equal_22 := Attr_Name = Sym_22; 
--# expr-done 3760
if Is_Equal_22 then
   --# expr-start 3761 '<FieldAccess for compose at nodes.lkt:6952:47>' Fld_19 ada/nodes.lkt:6952
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.compose
Fld_19 := Libadalang.Implementation.Type_Attributes_Repository_F_Compose (Node => Local_Repo);
--# end
--# expr-done 3761
   If_Result_22 := Fld_19;
else
   --# expr-start 3849 '<If at nodes.lkt:6934:13>' If_Result_21 ada/nodes.lkt:6934
--# expr-start 3763 '<Eq at nodes.lkt:6953:18>' Is_Equal_21 ada/nodes.lkt:6953
--# expr-start 3762 '<Symbol leading_part at nodes.lkt:6953:31>' Sym_21 ada/nodes.lkt:6953
Sym_21 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Leading_Part_364); 
--# expr-done 3762
Is_Equal_21 := Attr_Name = Sym_21; 
--# expr-done 3763
if Is_Equal_21 then
   --# expr-start 3764 '<FieldAccess for leading_part at nodes.lkt:6953:52>' Fld_20 ada/nodes.lkt:6953
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.leading_part
Fld_20 := Libadalang.Implementation.Type_Attributes_Repository_F_Leading_Part (Node => Local_Repo);
--# end
--# expr-done 3764
   If_Result_21 := Fld_20;
else
   --# expr-start 3848 '<If at nodes.lkt:6934:13>' If_Result_20 ada/nodes.lkt:6934
--# expr-start 3766 '<Eq at nodes.lkt:6954:18>' Is_Equal_20 ada/nodes.lkt:6954
--# expr-start 3765 '<Symbol mod at nodes.lkt:6954:31>' Sym_20 ada/nodes.lkt:6954
Sym_20 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mod_372); 
--# expr-done 3765
Is_Equal_20 := Attr_Name = Sym_20; 
--# expr-done 3766
if Is_Equal_20 then
   --# expr-start 3767 '<FieldAccess for mod at nodes.lkt:6954:43>' Fld_21 ada/nodes.lkt:6954
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.mod
Fld_21 := Libadalang.Implementation.Type_Attributes_Repository_F_Mod (Node => Local_Repo);
--# end
--# expr-done 3767
   If_Result_20 := Fld_21;
else
   --# expr-start 3847 '<If at nodes.lkt:6934:13>' If_Result_19 ada/nodes.lkt:6934
--# expr-start 3769 '<Eq at nodes.lkt:6955:18>' Is_Equal_19 ada/nodes.lkt:6955
--# expr-start 3768 '<Symbol image at nodes.lkt:6955:31>' Sym_19 ada/nodes.lkt:6955
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Image_358); 
--# expr-done 3768
Is_Equal_19 := Attr_Name = Sym_19; 
--# expr-done 3769
if Is_Equal_19 then
   --# expr-start 3770 '<FieldAccess for image at nodes.lkt:6955:45>' Fld_22 ada/nodes.lkt:6955
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.image
Fld_22 := Libadalang.Implementation.Type_Attributes_Repository_F_Image (Node => Local_Repo);
--# end
--# expr-done 3770
   If_Result_19 := Fld_22;
else
   --# expr-start 3846 '<If at nodes.lkt:6934:13>' If_Result_18 ada/nodes.lkt:6934
--# expr-start 3772 '<Eq at nodes.lkt:6956:18>' Is_Equal_18 ada/nodes.lkt:6956
--# expr-start 3771 '<Symbol wide_image at nodes.lkt:6956:31>' Sym_18 ada/nodes.lkt:6956
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Image_429); 
--# expr-done 3771
Is_Equal_18 := Attr_Name = Sym_18; 
--# expr-done 3772
if Is_Equal_18 then
   --# expr-start 3773 '<FieldAccess for wide_image at nodes.lkt:6956:50>' Fld_23 ada/nodes.lkt:6956
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.wide_image
Fld_23 := Libadalang.Implementation.Type_Attributes_Repository_F_Wide_Image (Node => Local_Repo);
--# end
--# expr-done 3773
   If_Result_18 := Fld_23;
else
   --# expr-start 3845 '<If at nodes.lkt:6934:13>' If_Result_17 ada/nodes.lkt:6934
--# expr-start 3775 '<Eq at nodes.lkt:6957:18>' Is_Equal_17 ada/nodes.lkt:6957
--# expr-start 3774 '<Symbol wide_wide_image at nodes.lkt:6957:31>' Sym_17 ada/nodes.lkt:6957
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Image_432); 
--# expr-done 3774
Is_Equal_17 := Attr_Name = Sym_17; 
--# expr-done 3775
if Is_Equal_17 then
   --# expr-start 3776 '<FieldAccess for wide_wide_image at nodes.lkt:6957:55>' Fld_24 ada/nodes.lkt:6957
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.wide_wide_image
Fld_24 := Libadalang.Implementation.Type_Attributes_Repository_F_Wide_Wide_Image (Node => Local_Repo);
--# end
--# expr-done 3776
   If_Result_17 := Fld_24;
else
   --# expr-start 3844 '<If at nodes.lkt:6934:13>' If_Result_16 ada/nodes.lkt:6934
--# expr-start 3778 '<Eq at nodes.lkt:6958:18>' Is_Equal_16 ada/nodes.lkt:6958
--# expr-start 3777 '<Symbol put_image at nodes.lkt:6958:31>' Sym_16 ada/nodes.lkt:6958
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Put_Image_390); 
--# expr-done 3777
Is_Equal_16 := Attr_Name = Sym_16; 
--# expr-done 3778
if Is_Equal_16 then
   --# expr-start 3779 '<FieldAccess for put_image at nodes.lkt:6958:49>' Fld_25 ada/nodes.lkt:6958
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.put_image
Fld_25 := Libadalang.Implementation.Type_Attributes_Repository_F_Put_Image (Node => Local_Repo);
--# end
--# expr-done 3779
   If_Result_16 := Fld_25;
else
   --# expr-start 3843 '<If at nodes.lkt:6934:13>' If_Result_15 ada/nodes.lkt:6934
--# expr-start 3781 '<Eq at nodes.lkt:6959:18>' Is_Equal_15 ada/nodes.lkt:6959
--# expr-start 3780 '<Symbol value at nodes.lkt:6959:31>' Sym_15 ada/nodes.lkt:6959
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Value_426); 
--# expr-done 3780
Is_Equal_15 := Attr_Name = Sym_15; 
--# expr-done 3781
if Is_Equal_15 then
   --# expr-start 3782 '<FieldAccess for value at nodes.lkt:6959:45>' Fld_26 ada/nodes.lkt:6959
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.value
Fld_26 := Libadalang.Implementation.Type_Attributes_Repository_F_Value (Node => Local_Repo);
--# end
--# expr-done 3782
   If_Result_15 := Fld_26;
else
   --# expr-start 3842 '<If at nodes.lkt:6934:13>' If_Result_14 ada/nodes.lkt:6934
--# expr-start 3784 '<Eq at nodes.lkt:6960:18>' Is_Equal_14 ada/nodes.lkt:6960
--# expr-start 3783 '<Symbol wide_value at nodes.lkt:6960:31>' Sym_14 ada/nodes.lkt:6960
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Value_431); 
--# expr-done 3783
Is_Equal_14 := Attr_Name = Sym_14; 
--# expr-done 3784
if Is_Equal_14 then
   --# expr-start 3785 '<FieldAccess for wide_value at nodes.lkt:6960:50>' Fld_27 ada/nodes.lkt:6960
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.wide_value
Fld_27 := Libadalang.Implementation.Type_Attributes_Repository_F_Wide_Value (Node => Local_Repo);
--# end
--# expr-done 3785
   If_Result_14 := Fld_27;
else
   --# expr-start 3841 '<If at nodes.lkt:6934:13>' If_Result_13 ada/nodes.lkt:6934
--# expr-start 3787 '<Eq at nodes.lkt:6961:18>' Is_Equal_13 ada/nodes.lkt:6961
--# expr-start 3786 '<Symbol wide_wide_value at nodes.lkt:6961:31>' Sym_13 ada/nodes.lkt:6961
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Value_434); 
--# expr-done 3786
Is_Equal_13 := Attr_Name = Sym_13; 
--# expr-done 3787
if Is_Equal_13 then
   --# expr-start 3788 '<FieldAccess for wide_wide_value at nodes.lkt:6961:55>' Fld_28 ada/nodes.lkt:6961
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.wide_wide_value
Fld_28 := Libadalang.Implementation.Type_Attributes_Repository_F_Wide_Wide_Value (Node => Local_Repo);
--# end
--# expr-done 3788
   If_Result_13 := Fld_28;
else
   --# expr-start 3840 '<If at nodes.lkt:6934:13>' If_Result_12 ada/nodes.lkt:6934
--# expr-start 3790 '<Eq at nodes.lkt:6962:18>' Is_Equal_12 ada/nodes.lkt:6962
--# expr-start 3789 '<Symbol fixed_value at nodes.lkt:6962:31>' Sym_12 ada/nodes.lkt:6962
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Fixed_Value_350); 
--# expr-done 3789
Is_Equal_12 := Attr_Name = Sym_12; 
--# expr-done 3790
if Is_Equal_12 then
   --# expr-start 3791 '<FieldAccess for fixed_value at nodes.lkt:6962:51>' Fld_29 ada/nodes.lkt:6962
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.fixed_value
Fld_29 := Libadalang.Implementation.Type_Attributes_Repository_F_Fixed_Value (Node => Local_Repo);
--# end
--# expr-done 3791
   If_Result_12 := Fld_29;
else
   --# expr-start 3839 '<If at nodes.lkt:6934:13>' If_Result_11 ada/nodes.lkt:6934
--# expr-start 3793 '<Eq at nodes.lkt:6963:18>' Is_Equal_11 ada/nodes.lkt:6963
--# expr-start 3792 '<Symbol integer_value at nodes.lkt:6963:31>' Sym_11 ada/nodes.lkt:6963
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Integer_Value_361); 
--# expr-done 3792
Is_Equal_11 := Attr_Name = Sym_11; 
--# expr-done 3793
if Is_Equal_11 then
   --# expr-start 3794 '<FieldAccess for integer_value at nodes.lkt:6963:53>' Fld_30 ada/nodes.lkt:6963
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.integer_value
Fld_30 := Libadalang.Implementation.Type_Attributes_Repository_F_Integer_Value (Node => Local_Repo);
--# end
--# expr-done 3794
   If_Result_11 := Fld_30;
else
   --# expr-start 3838 '<If at nodes.lkt:6934:13>' If_Result_10 ada/nodes.lkt:6934
--# expr-start 3796 '<Eq at nodes.lkt:6964:18>' Is_Equal_10 ada/nodes.lkt:6964
--# expr-start 3795 '<Symbol pos at nodes.lkt:6964:31>' Sym_10 ada/nodes.lkt:6964
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pos_384); 
--# expr-done 3795
Is_Equal_10 := Attr_Name = Sym_10; 
--# expr-done 3796
if Is_Equal_10 then
   --# expr-start 3797 '<FieldAccess for pos at nodes.lkt:6964:43>' Fld_31 ada/nodes.lkt:6964
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.pos
Fld_31 := Libadalang.Implementation.Type_Attributes_Repository_F_Pos (Node => Local_Repo);
--# end
--# expr-done 3797
   If_Result_10 := Fld_31;
else
   --# expr-start 3837 '<If at nodes.lkt:6934:13>' If_Result_9 ada/nodes.lkt:6934
--# expr-start 3799 '<Eq at nodes.lkt:6965:18>' Is_Equal_9 ada/nodes.lkt:6965
--# expr-start 3798 '<Symbol val at nodes.lkt:6965:31>' Sym_9 ada/nodes.lkt:6965
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Val_425); 
--# expr-done 3798
Is_Equal_9 := Attr_Name = Sym_9; 
--# expr-done 3799
if Is_Equal_9 then
   --# expr-start 3800 '<FieldAccess for val_attr at nodes.lkt:6965:43>' Fld_32 ada/nodes.lkt:6965
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.val_attr
Fld_32 := Libadalang.Implementation.Type_Attributes_Repository_F_Val_Attr (Node => Local_Repo);
--# end
--# expr-done 3800
   If_Result_9 := Fld_32;
else
   --# expr-start 3836 '<If at nodes.lkt:6934:13>' If_Result_8 ada/nodes.lkt:6934
--# expr-start 3802 '<Eq at nodes.lkt:6966:18>' Is_Equal_8 ada/nodes.lkt:6966
--# expr-start 3801 '<Symbol enum_rep at nodes.lkt:6966:31>' Sym_8 ada/nodes.lkt:6966
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Enum_Rep_345); 
--# expr-done 3801
Is_Equal_8 := Attr_Name = Sym_8; 
--# expr-done 3802
if Is_Equal_8 then
   --# expr-start 3803 '<FieldAccess for enum_rep at nodes.lkt:6966:48>' Fld_33 ada/nodes.lkt:6966
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.enum_rep
Fld_33 := Libadalang.Implementation.Type_Attributes_Repository_F_Enum_Rep (Node => Local_Repo);
--# end
--# expr-done 3803
   If_Result_8 := Fld_33;
else
   --# expr-start 3835 '<If at nodes.lkt:6934:13>' If_Result_7 ada/nodes.lkt:6934
--# expr-start 3805 '<Eq at nodes.lkt:6967:18>' Is_Equal_7 ada/nodes.lkt:6967
--# expr-start 3804 '<Symbol enum_val at nodes.lkt:6967:31>' Sym_7 ada/nodes.lkt:6967
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Enum_Val_346); 
--# expr-done 3804
Is_Equal_7 := Attr_Name = Sym_7; 
--# expr-done 3805
if Is_Equal_7 then
   --# expr-start 3806 '<FieldAccess for enum_val at nodes.lkt:6967:48>' Fld_34 ada/nodes.lkt:6967
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.enum_val
Fld_34 := Libadalang.Implementation.Type_Attributes_Repository_F_Enum_Val (Node => Local_Repo);
--# end
--# expr-done 3806
   If_Result_7 := Fld_34;
else
   --# expr-start 3834 '<If at nodes.lkt:6934:13>' If_Result_6 ada/nodes.lkt:6934
--# expr-start 3808 '<Eq at nodes.lkt:6968:18>' Is_Equal_6 ada/nodes.lkt:6968
--# expr-start 3807 '<Symbol read at nodes.lkt:6968:31>' Sym_6 ada/nodes.lkt:6968
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Read_393); 
--# expr-done 3807
Is_Equal_6 := Attr_Name = Sym_6; 
--# expr-done 3808
if Is_Equal_6 then
   --# expr-start 3809 '<FieldAccess for read at nodes.lkt:6968:44>' Fld_35 ada/nodes.lkt:6968
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.read
Fld_35 := Libadalang.Implementation.Type_Attributes_Repository_F_Read (Node => Local_Repo);
--# end
--# expr-done 3809
   If_Result_6 := Fld_35;
else
   --# expr-start 3833 '<If at nodes.lkt:6934:13>' If_Result_5 ada/nodes.lkt:6934
--# expr-start 3811 '<Eq at nodes.lkt:6969:18>' Is_Equal_5 ada/nodes.lkt:6969
--# expr-start 3810 '<Symbol write at nodes.lkt:6969:31>' Sym_5 ada/nodes.lkt:6969
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Write_436); 
--# expr-done 3810
Is_Equal_5 := Attr_Name = Sym_5; 
--# expr-done 3811
if Is_Equal_5 then
   --# expr-start 3812 '<FieldAccess for write at nodes.lkt:6969:45>' Fld_36 ada/nodes.lkt:6969
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.write
Fld_36 := Libadalang.Implementation.Type_Attributes_Repository_F_Write (Node => Local_Repo);
--# end
--# expr-done 3812
   If_Result_5 := Fld_36;
else
   --# expr-start 3832 '<If at nodes.lkt:6934:13>' If_Result_4 ada/nodes.lkt:6934
--# expr-start 3814 '<Eq at nodes.lkt:6970:18>' Is_Equal_4 ada/nodes.lkt:6970
--# expr-start 3813 '<Symbol input at nodes.lkt:6970:31>' Sym_4 ada/nodes.lkt:6970
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Input_360); 
--# expr-done 3813
Is_Equal_4 := Attr_Name = Sym_4; 
--# expr-done 3814
if Is_Equal_4 then
   --# expr-start 3815 '<FieldAccess for input at nodes.lkt:6970:45>' Fld_37 ada/nodes.lkt:6970
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.input
Fld_37 := Libadalang.Implementation.Type_Attributes_Repository_F_Input (Node => Local_Repo);
--# end
--# expr-done 3815
   If_Result_4 := Fld_37;
else
   --# expr-start 3831 '<If at nodes.lkt:6934:13>' If_Result_3 ada/nodes.lkt:6934
--# expr-start 3817 '<Eq at nodes.lkt:6971:18>' Is_Equal_3 ada/nodes.lkt:6971
--# expr-start 3816 '<Symbol output at nodes.lkt:6971:31>' Sym_3 ada/nodes.lkt:6971
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Output_381); 
--# expr-done 3816
Is_Equal_3 := Attr_Name = Sym_3; 
--# expr-done 3817
if Is_Equal_3 then
   --# expr-start 3818 '<FieldAccess for output at nodes.lkt:6971:46>' Fld_38 ada/nodes.lkt:6971
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.output
Fld_38 := Libadalang.Implementation.Type_Attributes_Repository_F_Output (Node => Local_Repo);
--# end
--# expr-done 3818
   If_Result_3 := Fld_38;
else
   --# expr-start 3830 '<If at nodes.lkt:6934:13>' If_Result_2 ada/nodes.lkt:6934
--# expr-start 3820 '<Eq at nodes.lkt:6972:18>' Is_Equal_2 ada/nodes.lkt:6972
--# expr-start 3819 '<Symbol asm_input at nodes.lkt:6972:31>' Sym_2 ada/nodes.lkt:6972
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asm_Input_326); 
--# expr-done 3819
Is_Equal_2 := Attr_Name = Sym_2; 
--# expr-done 3820
if Is_Equal_2 then
   --# expr-start 3821 '<FieldAccess for asm_input at nodes.lkt:6972:49>' Fld_39 ada/nodes.lkt:6972
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.asm_input
Fld_39 := Libadalang.Implementation.Type_Attributes_Repository_F_Asm_Input (Node => Local_Repo);
--# end
--# expr-done 3821
   If_Result_2 := Fld_39;
else
   --# expr-start 3829 '<If at nodes.lkt:6934:13>' If_Result_1 ada/nodes.lkt:6934
--# expr-start 3823 '<Eq at nodes.lkt:6973:18>' Is_Equal_1 ada/nodes.lkt:6973
--# expr-start 3822 '<Symbol asm_output at nodes.lkt:6973:31>' Sym_1 ada/nodes.lkt:6973
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asm_Output_327); 
--# expr-done 3822
Is_Equal_1 := Attr_Name = Sym_1; 
--# expr-done 3823
if Is_Equal_1 then
   --# expr-start 3824 '<FieldAccess for asm_output at nodes.lkt:6973:50>' Fld_40 ada/nodes.lkt:6973
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.asm_output
Fld_40 := Libadalang.Implementation.Type_Attributes_Repository_F_Asm_Output (Node => Local_Repo);
--# end
--# expr-done 3824
   If_Result_1 := Fld_40;
else
   --# expr-start 3828 '<If at nodes.lkt:6934:13>' If_Result ada/nodes.lkt:6934
--# expr-start 3826 '<Eq at nodes.lkt:6974:18>' Is_Equal ada/nodes.lkt:6974
--# expr-start 3825 '<Symbol model at nodes.lkt:6974:31>' Sym ada/nodes.lkt:6974
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Model_373); 
--# expr-done 3825
Is_Equal := Attr_Name = Sym; 
--# expr-done 3826
if Is_Equal then
   --# expr-start 3827 '<FieldAccess for model at nodes.lkt:6974:45>' Fld_41 ada/nodes.lkt:6974
      if Local_Repo = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.model
Fld_41 := Libadalang.Implementation.Type_Attributes_Repository_F_Model (Node => Local_Repo);
--# end
--# expr-done 3827
   If_Result := Fld_41;
else
   If_Result := No_Bare_Ada_Node;
end if;
--# expr-done 3828
   If_Result_1 := If_Result;
end if;
--# expr-done 3829
   If_Result_2 := If_Result_1;
end if;
--# expr-done 3830
   If_Result_3 := If_Result_2;
end if;
--# expr-done 3831
   If_Result_4 := If_Result_3;
end if;
--# expr-done 3832
   If_Result_5 := If_Result_4;
end if;
--# expr-done 3833
   If_Result_6 := If_Result_5;
end if;
--# expr-done 3834
   If_Result_7 := If_Result_6;
end if;
--# expr-done 3835
   If_Result_8 := If_Result_7;
end if;
--# expr-done 3836
   If_Result_9 := If_Result_8;
end if;
--# expr-done 3837
   If_Result_10 := If_Result_9;
end if;
--# expr-done 3838
   If_Result_11 := If_Result_10;
end if;
--# expr-done 3839
   If_Result_12 := If_Result_11;
end if;
--# expr-done 3840
   If_Result_13 := If_Result_12;
end if;
--# expr-done 3841
   If_Result_14 := If_Result_13;
end if;
--# expr-done 3842
   If_Result_15 := If_Result_14;
end if;
--# expr-done 3843
   If_Result_16 := If_Result_15;
end if;
--# expr-done 3844
   If_Result_17 := If_Result_16;
end if;
--# expr-done 3845
   If_Result_18 := If_Result_17;
end if;
--# expr-done 3846
   If_Result_19 := If_Result_18;
end if;
--# expr-done 3847
   If_Result_20 := If_Result_19;
end if;
--# expr-done 3848
   If_Result_21 := If_Result_20;
end if;
--# expr-done 3849
   If_Result_22 := If_Result_21;
end if;
--# expr-done 3850
   If_Result_23 := If_Result_22;
end if;
--# expr-done 3851
   If_Result_24 := If_Result_23;
end if;
--# expr-done 3852
   If_Result_25 := If_Result_24;
end if;
--# expr-done 3853
   If_Result_26 := If_Result_25;
end if;
--# expr-done 3854
   If_Result_27 := If_Result_26;
end if;
--# expr-done 3855
   If_Result_28 := If_Result_27;
end if;
--# expr-done 3856
   If_Result_29 := If_Result_28;
end if;
--# expr-done 3857
   If_Result_30 := If_Result_29;
end if;
--# expr-done 3858
   If_Result_31 := If_Result_30;
end if;
--# expr-done 3859
   If_Result_32 := If_Result_31;
end if;
--# expr-done 3860
   If_Result_33 := If_Result_32;
end if;
--# expr-done 3861
   If_Result_34 := If_Result_33;
end if;
--# expr-done 3862
   If_Result_35 := If_Result_34;
end if;
--# expr-done 3863
   If_Result_36 := If_Result_35;
end if;
--# expr-done 3864
   If_Result_37 := If_Result_36;
end if;
--# expr-done 3865
   If_Result_38 := If_Result_37;
end if;
--# expr-done 3866
   If_Result_39 := If_Result_38;
end if;
--# expr-done 3867
   If_Result_40 := If_Result_39;
end if;
--# expr-done 3868
Local_Subp := If_Result_40; 
--# bind subp Local_Subp
--# expr-start 3874 '<New BasicSubpDecl.entity at nodes.lkt:6977:9>' New_Struct_1 ada/nodes.lkt:6977
--# expr-start 3873 '<New EntityInfo at nodes.lkt:6979:18>' New_Struct ada/nodes.lkt:6979
--# expr-start 3870 '<FieldAccess for from_rebound at nodes.lkt:6982:30>' Fld_45 ada/nodes.lkt:6982
--# expr-start 3869 '<FieldAccess for info at nodes.lkt:6982:30>' Fld_44 ada/nodes.lkt:6982
Fld_44 := Ent.Info;
--# expr-done 3869
Fld_45 := Fld_44.From_Rebound;
--# expr-done 3870
--# expr-start 3872 '<FieldAccess for rebindings at nodes.lkt:6981:28>' Fld_43 ada/nodes.lkt:6981
--# expr-start 3871 '<FieldAccess for info at nodes.lkt:6981:28>' Fld_42 ada/nodes.lkt:6981
Fld_42 := Ent.Info;
--# expr-done 3871
Fld_43 := Fld_42.Rebindings;
--# expr-done 3872
New_Struct := (From_Rebound => Fld_45, Md => No_Metadata, Rebindings => Fld_43); 
--# expr-done 3873
New_Struct_1 := (Info => New_Struct, Node => Local_Subp); 
--# expr-done 3874
Let_Result := New_Struct_1; 
--# end
--# expr-done 3875
Let_Result_1 := Let_Result; 
--# end
--# expr-done 3876
         Property_Result := Let_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Synthesize_Attribute_Subprogram;
--# end
--# property-start BaseTypeDecl.attribute_subprogram ada/nodes.lkt:6990
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Attribute_Subprogram
  (Node : Bare_Base_Type_Decl
      ; Attr_Name : Symbol_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind attr_name Attr_Name
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_0 : Internal_Entity_Name;
Var_Expr_1 : Internal_Entity_Attribute_Def_Clause;
Var_Expr_111 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Attribute_Def_Clause;
Fld_1 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_2 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Basic_Subp_Decl;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Sym : Symbol_Type;
Fld_4 : Internal_Aspect;
Fld_5 : Internal_Entity_Expr;
Scope_Result_1 : Internal_Entity_Expr;
Result_Var_1 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_6 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Fld_7 : Internal_Entity_Basic_Subp_Decl;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Result_Var_2 : Internal_Entity_Basic_Decl;
Fld_8 : Internal_Entity_Basic_Subp_Decl;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Sym_1 : Symbol_Type;
Is_Equal : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Is_Equal_1 : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
Is_Equal_4 : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3896 '<If at nodes.lkt:6991:9>' If_Result_4 ada/nodes.lkt:6991
--# expr-start 3877 '<Symbol read at nodes.lkt:6991:25>' Sym_2 ada/nodes.lkt:6991
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Read_393); 
--# expr-done 3877
Is_Equal_4 := Attr_Name = Sym_2; 
if Is_Equal_4 then
   If_Result_3 := True;
else
--# expr-start 3878 '<Symbol write at nodes.lkt:6991:35>' Sym_3 ada/nodes.lkt:6991
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Write_436); 
--# expr-done 3878
Is_Equal_3 := Attr_Name = Sym_3; 
if Is_Equal_3 then
   If_Result_2 := True;
else
--# expr-start 3879 '<Symbol input at nodes.lkt:6991:46>' Sym_4 ada/nodes.lkt:6991
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Input_360); 
--# expr-done 3879
Is_Equal_2 := Attr_Name = Sym_4; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 3880 '<Symbol output at nodes.lkt:6991:57>' Sym_5 ada/nodes.lkt:6991
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Output_381); 
--# expr-done 3880
Is_Equal_1 := Attr_Name = Sym_5; 
   If_Result_1 := Is_Equal_1;
end if;
   If_Result_2 := If_Result_1;
end if;
   If_Result_3 := If_Result_2;
end if;
if If_Result_3 then
--# expr-start 3881 '<FieldAccess for get_representation_clause at nodes.lkt:6993:13>' Fld ada/nodes.lkt:6993
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.get_representation_clause
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Representation_Clause (Node => Ent.Node, Name => Attr_Name, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 3881
Var_Expr_1 := Fld;
if Var_Expr_1 /= No_Entity_Attribute_Def_Clause then
   --# scope-start
   --# bind x Var_Expr_1
--# expr-start 3884 '<FieldAccess for referenced_decl at nodes.lkt:6994:24>' Fld_2 ada/nodes.lkt:6994
--# expr-start 3883 '<Cast to Name at nodes.lkt:6994:24>' Cast_Result ada/nodes.lkt:6994
--# expr-start 3882 '<FieldAccess for expr at nodes.lkt:6994:24>' Fld_1 ada/nodes.lkt:6994
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Expr (Node => Var_Expr_1.Node.Attribute_Def_Clause_F_Expr, Info => Var_Expr_1.Info);
--# expr-done 3882
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 3883
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_2 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Cast_Result.Node, Imprecise_Fallback => False, E_Info => Cast_Result.Info);
--# end
--# expr-done 3884
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
--# expr-start 3885 '<FieldAccess for synthesize_attribute_subprogram at nodes.lkt:6995:29>' Fld_3 ada/nodes.lkt:6995
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.synthesize_attribute_subprogram
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Synthesize_Attribute_Subprogram (Node => Ent.Node, Attr_Name => Attr_Name, E_Info => Ent.Info);
--# end
--# expr-done 3885
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   Result_Var := Cast_Result_1;
end if;
   If_Result_4 := Result_Var;
else
   --# expr-start 3895 '<If at nodes.lkt:6991:9>' If_Result ada/nodes.lkt:6991
--# expr-start 3887 '<Eq at nodes.lkt:6997:14>' Is_Equal ada/nodes.lkt:6997
--# expr-start 3886 '<Symbol put_image at nodes.lkt:6997:27>' Sym_1 ada/nodes.lkt:6997
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Put_Image_390); 
--# expr-done 3886
Is_Equal := Attr_Name = Sym_1; 
--# expr-done 3887
if Is_Equal then
--# expr-start 3891 '<Cast to Name at nodes.lkt:6999:13>' Cast_Result_2 ada/nodes.lkt:6999
Var_Expr_111 := Ent;
if Var_Expr_111 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 3890 '<FieldAccess for value at nodes.lkt:6999:13>' Fld_5 ada/nodes.lkt:6999
--# expr-start 3889 '<FieldAccess for get_aspect at nodes.lkt:6999:13>' Fld_4 ada/nodes.lkt:6999
      if Var_Expr_111.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3888 '<Symbol put_image at nodes.lkt:6999:30>' Sym ada/nodes.lkt:6999
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Put_Image_390); 
--# expr-done 3888
--# property-call-start BasicDecl.get_aspect
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Var_Expr_111.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Var_Expr_111.Info);
--# end
--# expr-done 3889
Fld_5 := Fld_4.Value;
--# expr-done 3890
Scope_Result_1 := Fld_5;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Expr;
end if;
   if Result_Var_1.Node = null
      or else Result_Var_1.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 3891
Var_Expr_0 := Cast_Result_2;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind n Var_Expr_0
--# expr-start 3892 '<FieldAccess for referenced_decl at nodes.lkt:7000:24>' Fld_6 ada/nodes.lkt:7000
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_6 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Var_Expr_0.Node, Imprecise_Fallback => False, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 3892
Scope_Result_2 := Fld_6;
   --# end
   Result_Var_2 := Scope_Result_2;
else
--# expr-start 3893 '<FieldAccess for synthesize_attribute_subprogram at nodes.lkt:7001:29>' Fld_7 ada/nodes.lkt:7001
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.synthesize_attribute_subprogram
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Synthesize_Attribute_Subprogram (Node => Ent.Node, Attr_Name => Attr_Name, E_Info => Ent.Info);
--# end
--# expr-done 3893
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
   Result_Var_2 := Cast_Result_3;
end if;
   If_Result := Result_Var_2;
else
--# expr-start 3894 '<FieldAccess for synthesize_attribute_subprogram at nodes.lkt:7003:14>' Fld_8 ada/nodes.lkt:7003
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.synthesize_attribute_subprogram
Fld_8 := Libadalang.Implementation.Base_Type_Decl_P_Synthesize_Attribute_Subprogram (Node => Ent.Node, Attr_Name => Attr_Name, E_Info => Ent.Info);
--# end
--# expr-done 3894
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
   If_Result := Cast_Result_4;
end if;
--# expr-done 3895
   If_Result_4 := If_Result;
end if;
--# expr-done 3896
         Property_Result := If_Result_4;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Attribute_Subprogram;
--# end
--# property-start BaseTypeDecl.private_completion ada/nodes.lkt:7008
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Private_Completion
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_1 : Bare_Base_Type_Decl;
Var_Expr_2 : Bare_Ada_Node;
Var_Expr_112 : Bare_Public_Part;
Var_Expr_113 : Bare_Base_Package_Decl;
Var_Expr_114 : Bare_Private_Part;
Fld : Bare_Declarative_Part;
Cast_Result : Bare_Public_Part;
Fld_1 : Bare_Ada_Node;
Scope_Result : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Cast_Result_1 : Bare_Base_Package_Decl;
Fld_2 : Bare_Private_Part;
Fld_3 : Bare_Ada_Node_List;
Item_0 : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result_2 : Bare_Base_Type_Decl;
Fld_4 : Symbol_Type;
Fld_5 : Symbol_Type;
Is_Equal : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_3 : Bare_Base_Type_Decl;
Fld_6 : Internal_Entity_Info;
Fld_7 : Env_Rebindings;
New_Struct : Internal_Entity_Info;
New_Struct_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_4 : Internal_Entity_Base_Type_Decl;
Result_Var_4 : Internal_Entity_Base_Type_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Private_Completion,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
--# expr-start 3900 '<Cast to BasePackageDecl at nodes.lkt:7009:9>' Cast_Result_1 ada/nodes.lkt:7009
--# expr-start 3898 '<Cast to PublicPart at nodes.lkt:7009:9>' Cast_Result ada/nodes.lkt:7009
--# expr-start 3897 '<FieldAccess for declarative_scope at nodes.lkt:7009:9>' Fld ada/nodes.lkt:7009
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 3897
   if Fld = null
      or else Fld.Kind in Ada_Public_Part_Range
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 3898
Var_Expr_112 := Cast_Result;
if Var_Expr_112 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 3899 '<parent at nodes.lkt:7009:9>' Fld_1 ada/nodes.lkt:7009
      if Var_Expr_112 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Var_Expr_112.Parent; 
--# expr-done 3899
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
   if Result_Var = null
      or else Result_Var.Kind in Ada_Base_Package_Decl
   then
      Cast_Result_1 := Result_Var;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 3900
Var_Expr_113 := Cast_Result_1;
if Var_Expr_113 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 3901 '<FieldAccess for private_part at nodes.lkt:7009:9>' Fld_2 ada/nodes.lkt:7009
      if Var_Expr_113 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_113.Base_Package_Decl_F_Private_Part;
--# expr-done 3901
Var_Expr_114 := Fld_2;
if Var_Expr_114 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 3907 '<Find at nodes.lkt:7009:9>' Find_Result ada/nodes.lkt:7009
   --# expr-start 3902 '<FieldAccess for decls at nodes.lkt:7009:9>' Fld_3 ada/nodes.lkt:7009
      if Var_Expr_114 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Var_Expr_114.Declarative_Part_F_Decls;
--# expr-done 3902
      Find_Result := No_Bare_Ada_Node;
      if Fld_3 = null then
      Find_Result := No_Bare_Ada_Node;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_3;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind d Item_0
--# expr-start 3903 '<Cast to BaseTypeDecl at nodes.lkt:7017:13>' Cast_Result_2 ada/nodes.lkt:7017
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_2 := Cast_Expr;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 3903
Var_Expr_1 := Cast_Result_2;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind pp Var_Expr_1
--# expr-start 3906 '<Eq at nodes.lkt:7018:25>' Is_Equal ada/nodes.lkt:7018
--# expr-start 3904 '<FieldAccess for name_symbol at nodes.lkt:7018:25>' Fld_4 ada/nodes.lkt:7018
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Var_Expr_1);
--# end
--# expr-done 3904
--# expr-start 3905 '<FieldAccess for name_symbol at nodes.lkt:7018:45>' Fld_5 ada/nodes.lkt:7018
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 3905
Is_Equal := Fld_4 = Fld_5; 
--# expr-done 3906
Scope_Result_1 := Is_Equal;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
      if Result_Var_1 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var_1;
         end loop;
      end;
      end if;
--# expr-done 3907
Var_Expr_2 := Find_Result;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind t Var_Expr_2
--# expr-start 3912 '<New BaseTypeDecl.entity at nodes.lkt:7023:13>' New_Struct_1 ada/nodes.lkt:7023
--# expr-start 3910 '<New EntityInfo at nodes.lkt:7025:22>' New_Struct ada/nodes.lkt:7025
--# expr-start 3909 '<FieldAccess for rebindings at nodes.lkt:7030:32>' Fld_7 ada/nodes.lkt:7030
--# expr-start 3908 '<FieldAccess for info at nodes.lkt:7030:32>' Fld_6 ada/nodes.lkt:7030
Fld_6 := Ent.Info;
--# expr-done 3908
Fld_7 := Fld_6.Rebindings;
--# expr-done 3909
New_Struct := (From_Rebound => False, Md => No_Metadata, Rebindings => Fld_7); 
--# expr-done 3910
--# expr-start 3911 '<Cast to BaseTypeDecl at nodes.lkt:7024:22>' Cast_Result_3 ada/nodes.lkt:7024
Cast_Expr_1 := Var_Expr_2; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_3 := Cast_Expr_1;
   else
         Cast_Result_3 := No_Bare_Ada_Node;
   end if;
--# expr-done 3911
New_Struct_1 := (Info => New_Struct, Node => Cast_Result_3); 
--# expr-done 3912
Scope_Result_2 := New_Struct_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_3 := Result_Var_2;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_4 := Result_Var_3;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var_4;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Private_Completion;
--# end
--# property-start BaseTypeDecl.is_array_or_rec ada/nodes.lkt:7037
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Array_Or_Rec
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Fld : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
Is_A : Boolean;
Sym : Symbol_Type;
Fld_2 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 3923 '<BooleanBinaryOp And at nodes.lkt:7038:9>' If_Result_3 ada/nodes.lkt:7038
--# expr-start 3914 '<Not at nodes.lkt:7038:9>' Not_Val ada/nodes.lkt:7038
--# expr-start 3913 '<IsNull at nodes.lkt:7038:13>' Is_Null ada/nodes.lkt:7038
Is_Null := Self = null; 
--# expr-done 3913
Not_Val := not (Is_Null); 
--# expr-done 3914
if Not_Val then
   --# expr-start 3922 '<BooleanBinaryOp Or at nodes.lkt:7040:13>' If_Result_2 ada/nodes.lkt:7040
--# expr-start 3917 '<BooleanBinaryOp Or at nodes.lkt:7040:14>' If_Result ada/nodes.lkt:7040
--# expr-start 3915 '<FieldAccess for is_array at nodes.lkt:7040:14>' Fld ada/nodes.lkt:7040
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_array
Fld := Libadalang.Implementation.Basic_Decl_P_Is_Array (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3915
if Fld then
   If_Result := True;
else
   --# expr-start 3916 '<FieldAccess for is_record_type at nodes.lkt:7040:33>' Fld_1 ada/nodes.lkt:7040
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_record_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Record_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 3916
   If_Result := Fld_1;
end if;
--# expr-done 3917
if If_Result then
   If_Result_2 := True;
else
   --# expr-start 3921 '<BooleanBinaryOp And at nodes.lkt:7043:17>' If_Result_1 ada/nodes.lkt:7043
--# expr-start 3918 '<IsA BracketAggregate at nodes.lkt:7043:17>' Is_A ada/nodes.lkt:7043
Is_A := Origin /= null 
and then Origin.Kind in Ada_Bracket_Aggregate_Range; 
--# expr-done 3918
if Is_A then
   --# expr-start 3920 '<FieldAccess for has_aspect at nodes.lkt:7043:48>' Fld_2 ada/nodes.lkt:7043
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 3919 '<Symbol Aggregate at nodes.lkt:7043:64>' Sym ada/nodes.lkt:7043
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aggregate); 
--# expr-done 3919
--# property-call-start BasicDecl.has_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Ent.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 3920
   If_Result_1 := Fld_2;
else
   If_Result_1 := False;
end if;
--# expr-done 3921
   If_Result_2 := If_Result_1;
end if;
--# expr-done 3922
   If_Result_3 := If_Result_2;
else
   If_Result_3 := False;
end if;
--# expr-done 3923
         Property_Result := If_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Array_Or_Rec;
--# end
--# property-start BaseTypeDecl.is_inherited_primitive ada/nodes.lkt:7050
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Inherited_Primitive
  (Node : Bare_Base_Type_Decl
      ; P : Internal_Entity_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind p P
   Property_Result : Boolean;
      Fld : Bare_Base_Type_Decl;
Fld_1 : Internal_Entity_Info;
Fld_2 : Internal_Metadata;
Fld_3 : Bare_Ada_Node;
Cast_Result : Bare_Ada_Node;
Is_Equal : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 3929 '<Not at nodes.lkt:7051:9>' Not_Val ada/nodes.lkt:7051
--# expr-start 3928 '<Eq at nodes.lkt:7051:9>' Is_Equal ada/nodes.lkt:7051
--# expr-start 3924 '<FieldAccess for node at nodes.lkt:7051:9>' Fld ada/nodes.lkt:7051
Fld := Ent.Node;
--# expr-done 3924
      Cast_Result := Fld;
--# expr-start 3927 '<FieldAccess for primitive at nodes.lkt:7051:22>' Fld_3 ada/nodes.lkt:7051
--# expr-start 3926 '<FieldAccess for md at nodes.lkt:7051:22>' Fld_2 ada/nodes.lkt:7051
--# expr-start 3925 '<FieldAccess for info at nodes.lkt:7051:22>' Fld_1 ada/nodes.lkt:7051
Fld_1 := P.Info;
--# expr-done 3925
Fld_2 := Fld_1.Md;
--# expr-done 3926
Fld_3 := Fld_2.Primitive;
--# expr-done 3927
Is_Equal := Cast_Result = Fld_3; 
--# expr-done 3928
Not_Val := not (Is_Equal); 
--# expr-done 3929
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Inherited_Primitive;
--# end
--# property-start BaseTypeDecl.get_record_representation_clause ada/nodes.lkt:7057
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Get_Record_Representation_Clause
  (Node : Bare_Base_Type_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Record_Rep_Clause
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Record_Rep_Clause;
      Var_Expr_1 : Internal_Entity_Record_Rep_Clause;
Var_Expr_115 : Bare_Declarative_Part;
Fld : Bare_Declarative_Part;
Fld_1 : Bare_Ada_Node_List;
As_Entity : Internal_Entity_Ada_Node_List;
Is_Null : Boolean;
If_Result : Internal_Entity_Ada_Node_List;
Fld_2 : Bare_Ada_Node_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Record_Rep_Clause;
Fld_4 : Internal_Entity_Name;
Fld_5 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Find_Result : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Record_Rep_Clause;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3938 '<Cast to RecordRepClause at nodes.lkt:7058:9>' Cast_Result_3 ada/nodes.lkt:7058
--# expr-start 3930 '<FieldAccess for declarative_scope at nodes.lkt:7058:9>' Fld ada/nodes.lkt:7058
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 3930
Var_Expr_115 := Fld;
if Var_Expr_115 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 3937 '<Find at nodes.lkt:7058:9>' Find_Result ada/nodes.lkt:7058
   --# expr-start 3932 '<as_entity at nodes.lkt:7058:9>' If_Result ada/nodes.lkt:7058
--# expr-start 3931 '<FieldAccess for decls at nodes.lkt:7058:9>' Fld_1 ada/nodes.lkt:7058
      if Var_Expr_115 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Var_Expr_115.Declarative_Part_F_Decls;
--# expr-done 3931
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Ada_Node_List;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 3932
Fld_2 := If_Result.Node;
      Find_Result := No_Entity;
      if Fld_2 = null then
      Find_Result := No_Entity;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
Fld_3 := If_Result.Info;
As_Entity_1 := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind d Item_0
--# expr-start 3933 '<Cast to RecordRepClause at nodes.lkt:7060:13>' Cast_Result ada/nodes.lkt:7060
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Record_Rep_Clause_Range
   then
      Cast_Result := Create_Internal_Entity_Record_Rep_Clause
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Record_Rep_Clause;
   end if;
--# expr-done 3933
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Record_Rep_Clause then
   --# scope-start
   --# bind p Var_Expr_1
--# expr-start 3936 '<Eq at nodes.lkt:7060:45>' Is_Equiv ada/nodes.lkt:7060
--# expr-start 3935 '<FieldAccess for referenced_decl at nodes.lkt:7060:45>' Fld_5 ada/nodes.lkt:7060
--# expr-start 3934 '<FieldAccess for name at nodes.lkt:7060:45>' Fld_4 ada/nodes.lkt:7060
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Var_Expr_1.Node.Record_Rep_Clause_F_Name, Info => Var_Expr_1.Info);
--# expr-done 3934
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_5 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld_4.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_4.Info);
--# end
--# expr-done 3935
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Cast_Expr_1 := Ent; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 3936
Scope_Result := Is_Equiv;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
      end if;
--# expr-done 3937
Scope_Result_1 := Find_Result;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
   if Result_Var_1.Node = null
      or else Result_Var_1.Node.Kind in Ada_Record_Rep_Clause_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Record_Rep_Clause
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
   else
         Cast_Result_3 := No_Entity_Record_Rep_Clause;
   end if;
--# expr-done 3938
         Property_Result := Cast_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Get_Record_Representation_Clause;
--# end
--# property-start BaseTypeDecl.get_enum_representation_clause ada/nodes.lkt:7068
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Get_Enum_Representation_Clause
  (Node : Bare_Base_Type_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Enum_Rep_Clause
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Enum_Rep_Clause;
      Var_Expr_1 : Internal_Entity_Enum_Rep_Clause;
Var_Expr_116 : Bare_Declarative_Part;
Fld : Bare_Declarative_Part;
Fld_1 : Bare_Ada_Node_List;
As_Entity : Internal_Entity_Ada_Node_List;
Is_Null : Boolean;
If_Result : Internal_Entity_Ada_Node_List;
Fld_2 : Bare_Ada_Node_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Enum_Rep_Clause;
Fld_4 : Internal_Entity_Name;
Fld_5 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Find_Result : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Enum_Rep_Clause;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 3947 '<Cast to EnumRepClause at nodes.lkt:7069:9>' Cast_Result_3 ada/nodes.lkt:7069
--# expr-start 3939 '<FieldAccess for declarative_scope at nodes.lkt:7069:9>' Fld ada/nodes.lkt:7069
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 3939
Var_Expr_116 := Fld;
if Var_Expr_116 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 3946 '<Find at nodes.lkt:7069:9>' Find_Result ada/nodes.lkt:7069
   --# expr-start 3941 '<as_entity at nodes.lkt:7069:9>' If_Result ada/nodes.lkt:7069
--# expr-start 3940 '<FieldAccess for decls at nodes.lkt:7069:9>' Fld_1 ada/nodes.lkt:7069
      if Var_Expr_116 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Var_Expr_116.Declarative_Part_F_Decls;
--# expr-done 3940
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Ada_Node_List;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 3941
Fld_2 := If_Result.Node;
      Find_Result := No_Entity;
      if Fld_2 = null then
      Find_Result := No_Entity;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
Fld_3 := If_Result.Info;
As_Entity_1 := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind d Item_0
--# expr-start 3942 '<Cast to EnumRepClause at nodes.lkt:7071:13>' Cast_Result ada/nodes.lkt:7071
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Enum_Rep_Clause_Range
   then
      Cast_Result := Create_Internal_Entity_Enum_Rep_Clause
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Enum_Rep_Clause;
   end if;
--# expr-done 3942
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Enum_Rep_Clause then
   --# scope-start
   --# bind p Var_Expr_1
--# expr-start 3945 '<Eq at nodes.lkt:7072:24>' Is_Equiv ada/nodes.lkt:7072
--# expr-start 3944 '<FieldAccess for referenced_decl at nodes.lkt:7072:24>' Fld_5 ada/nodes.lkt:7072
--# expr-start 3943 '<FieldAccess for type_name at nodes.lkt:7072:24>' Fld_4 ada/nodes.lkt:7072
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Var_Expr_1.Node.Enum_Rep_Clause_F_Type_Name, Info => Var_Expr_1.Info);
--# expr-done 3943
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_5 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld_4.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_4.Info);
--# end
--# expr-done 3944
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Cast_Expr_1 := Ent; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 3945
Scope_Result := Is_Equiv;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
      end if;
--# expr-done 3946
Scope_Result_1 := Find_Result;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
   if Result_Var_1.Node = null
      or else Result_Var_1.Node.Kind in Ada_Enum_Rep_Clause_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Enum_Rep_Clause
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
   else
         Cast_Result_3 := No_Entity_Enum_Rep_Clause;
   end if;
--# expr-done 3947
         Property_Result := Cast_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Get_Enum_Representation_Clause;
--# end
--# property-start BaseTypeDecl.direct_primitive_subps ada/nodes.lkt:7081
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_F_Direct_Primitive_Subps
  (Node : Bare_Base_Type_Decl
  )
   return Internal_Inner_Env_Assoc_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_581 with Inline_Always;
            procedure Finalizer_Scope_2457 with Inline_Always;
            procedure Finalizer_Scope_2458 with Inline_Always;
            procedure Finalizer_Scope_2459 with Inline_Always;
            procedure Finalizer_Scope_2461 with Inline_Always;
            procedure Finalizer_Scope_2463 with Inline_Always;
            procedure Finalizer_Scope_2464 with Inline_Always;
            procedure Finalizer_Scope_2467 with Inline_Always;
            procedure Finalizer_Scope_2471 with Inline_Always;
            procedure Finalizer_Scope_2474 with Inline_Always;
            procedure Finalizer_Scope_2475 with Inline_Always;
      Local_Scope : Bare_Declarative_Part;
Local_Is_Derived_Tagged : Boolean;
Local_Decl_Parts : Internal_Entity_Array_Access;
Var_Expr_0 : Internal_Entity;
Match_0 : Internal_Entity_Base_Package_Decl;
Match_1 : Internal_Entity;
Var_Expr_1 : Bare_Declarative_Part;
Local_Enum_Lits : Internal_Inner_Env_Assoc_Array_Access;
Var_Expr_2 : Bare_Enum_Type_Def;
Local_Prim_Subps : Internal_Inner_Env_Assoc_Array_Access;
Var_Expr_5 : Internal_Entity_Base_Subp_Spec;
Local_Bd : Internal_Entity_Basic_Decl;
Local_Sym : Symbol_Type;
Local_Predefined_Ops : Internal_Inner_Env_Assoc_Array_Access;
Var_Expr_117 : Internal_Entity_Type_Decl;
Var_Expr_118 : Bare_Declarative_Part;
Var_Expr_119 : Internal_Entity_Private_Part;
Var_Expr_120 : Bare_Type_Decl;
Var_Expr_121 : Internal_Entity_Basic_Decl;
Var_Expr_122 : Bare_Type_Decl;
Fld : Bare_Declarative_Part;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Type_Decl;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Fld_2 : Bare_Ada_Node;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Fld_3 : Internal_Entity_Public_Part;
Fld_4 : Internal_Entity_Ada_Node_List;
Fld_5 : Bare_Ada_Node_List;
Fld_6 : Internal_Entity_Info;
Item_19 : Internal_Entity;
Bare_Item_19 : Bare_Ada_Node;
As_Entity_2 : Internal_Entity;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity;
Map_Result : Internal_Entity_Array_Access;
Fld_7 : Internal_Entity_Private_Part;
Fld_8 : Internal_Entity_Ada_Node_List;
Fld_9 : Bare_Ada_Node_List;
Fld_10 : Internal_Entity_Info;
Item_20 : Internal_Entity;
Bare_Item_20 : Bare_Ada_Node;
As_Entity_3 : Internal_Entity;
Is_Null_3 : Boolean;
If_Result_3 : Internal_Entity;
Map_Result_1 : Internal_Entity_Array_Access;
Scope_Result_1 : Internal_Entity_Array_Access;
Result_Var_1 : Internal_Entity_Array_Access;
Concat_Result : Internal_Entity_Array_Access;
Fld_11 : Bare_Ada_Node;
Fld_12 : Bare_Ada_Node;
Cast_Result_1 : Bare_Declarative_Part;
As_Entity_4 : Internal_Entity_Declarative_Part;
Is_Null_4 : Boolean;
If_Result_4 : Internal_Entity_Declarative_Part;
Fld_13 : Internal_Entity_Ada_Node_List;
Fld_14 : Bare_Ada_Node_List;
Fld_15 : Internal_Entity_Info;
Item_21 : Internal_Entity;
Bare_Item_21 : Bare_Ada_Node;
As_Entity_5 : Internal_Entity;
Is_Null_5 : Boolean;
If_Result_5 : Internal_Entity;
Map_Result_2 : Internal_Entity_Array_Access;
Scope_Result_2 : Internal_Entity_Array_Access;
Result_Var_2 : Internal_Entity_Array_Access;
If_Result_6 : Internal_Entity_Array_Access;
Match_Prefix : Internal_Entity;
Cast_Result_2 : Internal_Entity_Base_Package_Decl;
Let_Result : Internal_Entity_Array_Access;
Scope_Result_3 : Internal_Entity_Array_Access;
Cast_Result_3 : Internal_Entity;
Let_Result_1 : Internal_Entity_Array_Access;
Scope_Result_4 : Internal_Entity_Array_Access;
Match_Result : Internal_Entity_Array_Access;
Scope_Result_5 : Internal_Entity_Array_Access;
Result_Var_3 : Internal_Entity_Array_Access;
Scope_Result_6 : Internal_Entity_Array_Access;
Result_Var_4 : Internal_Entity_Array_Access;
Cast_Expr : Bare_Base_Type_Decl;
Cast_Result_4 : Bare_Type_Decl;
Fld_16 : Bare_Type_Def;
Scope_Result_7 : Bare_Type_Def;
Result_Var_5 : Bare_Type_Def;
Cast_Result_5 : Bare_Enum_Type_Def;
Fld_17 : Bare_Enum_Literal_Decl_List;
Item_3 : Bare_Enum_Literal_Decl;
Fld_18 : Bare_Defining_Name;
Fld_19 : Symbol_Type;
Cast_Expr_1 : Bare_Base_Type_Decl;
Cast_Result_6 : Bare_Ada_Node;
New_Struct : Internal_Metadata;
Cast_Expr_2 : Bare_Enum_Literal_Decl;
Cast_Result_7 : Bare_Ada_Node;
New_Struct_1 : Internal_Inner_Env_Assoc;
Map_Result_3 : Internal_Inner_Env_Assoc_Array_Access;
Scope_Result_8 : Internal_Inner_Env_Assoc_Array_Access;
Result_Var_6 : Internal_Inner_Env_Assoc_Array_Access;
Cast_Expr_3 : Internal_Entity;
Cast_Result_8 : Internal_Entity_Basic_Decl;
Fld_20 : Internal_Entity_Base_Subp_Spec;
Fld_21 : Internal_Entity_Base_Type_Decl_Array_Access;
As_Entity_6 : Internal_Entity_Base_Type_Decl;
Is_Null_6 : Boolean;
If_Result_7 : Internal_Entity_Base_Type_Decl;
Cast_Expr_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_9 : Internal_Entity;
Cast_Result_10 : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
Fld_22 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
As_Entity_7 : Internal_Entity_Base_Type_Decl;
Is_Null_7 : Boolean;
If_Result_8 : Internal_Entity_Base_Type_Decl;
Fld_23 : Lexical_Env := Empty_Env;
Fld_24 : Internal_Entity_Defining_Name;
Fld_25 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr_5 : Internal_Entity;
Cast_Result_11 : Internal_Entity_Basic_Decl;
Fld_26 : Internal_Entity_Base_Subp_Spec;
Fld_27 : Boolean;
Quantifier_Result_1 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Fld_28 : Bare_Ada_Node;
Is_A : Boolean;
Not_Val : Boolean;
If_Result_9 : Boolean;
If_Result_10 : Boolean;
Scope_Result_9 : Boolean;
Result_Var_7 : Boolean;
Scope_Result_10 : Boolean;
Result_Var_8 : Boolean;
Map_Result_4 : Internal_Entity_Array_Access;
Cast_Expr_6 : Internal_Entity;
Cast_Result_12 : Internal_Entity_Basic_Decl;
Fld_29 : Internal_Entity_Defining_Name;
Fld_30 : Symbol_Type;
Fld_31 : Bare_Basic_Decl;
Cast_Expr_7 : Bare_Base_Type_Decl;
Cast_Result_13 : Bare_Ada_Node;
New_Struct_2 : Internal_Metadata;
Cast_Result_14 : Bare_Ada_Node;
New_Struct_3 : Internal_Inner_Env_Assoc;
Array_Lit : Internal_Inner_Env_Assoc_Array_Access;
Sym : Symbol_Type;
Fld_32 : Internal_Entity_Base_Subp_Spec;
Cast_Result_15 : Internal_Entity_Subp_Spec;
Fld_33 : Bare_Subp_Spec;
Fld_34 : Bare_Basic_Subp_Decl;
Cast_Expr_8 : Bare_Base_Type_Decl;
Cast_Result_16 : Bare_Ada_Node;
New_Struct_4 : Internal_Metadata;
Cast_Result_17 : Bare_Ada_Node;
New_Struct_5 : Internal_Inner_Env_Assoc;
Array_Lit_1 : Internal_Inner_Env_Assoc_Array_Access;
Sym_1 : Symbol_Type;
Is_Equal : Boolean;
If_Result_11 : Internal_Inner_Env_Assoc_Array_Access;
Concat_Result_1 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_3 : Internal_Inner_Env_Assoc_Array_Access;
Map_Result_5 : Internal_Inner_Env_Assoc_Array_Access;
Cast_Expr_9 : Bare_Base_Type_Decl;
Cast_Result_18 : Bare_Type_Decl;
As_Entity_8 : Internal_Entity_Type_Decl;
Is_Null_8 : Boolean;
If_Result_12 : Internal_Entity_Type_Decl;
Fld_35 : Internal_Env_Assoc_Array_Access;
Fld_36 : Symbol_Type;
Fld_37 : Bare_Ada_Node;
Cast_Expr_10 : Bare_Base_Type_Decl;
Cast_Result_19 : Bare_Ada_Node;
New_Struct_6 : Internal_Metadata;
New_Struct_7 : Internal_Inner_Env_Assoc;
Map_Result_6 : Internal_Inner_Env_Assoc_Array_Access;
Scope_Result_11 : Internal_Inner_Env_Assoc_Array_Access;
Result_Var_9 : Internal_Inner_Env_Assoc_Array_Access;
Concat_Result_2 : Internal_Inner_Env_Assoc_Array_Access;
Concat_Result_3 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_4 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_5 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_6 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_7 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_8 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_9 : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_581 is
            begin
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (Local_Decl_Parts);
                     Dec_Ref (Scope_Result_8);
                     Dec_Ref (Result_Var_6);
                     Dec_Ref (Local_Enum_Lits);
                     Dec_Ref (Map_Result_4);
                     Dec_Ref (Map_Result_5);
                     Dec_Ref (Local_Prim_Subps);
                     Dec_Ref (Scope_Result_11);
                     Dec_Ref (Result_Var_9);
                     Dec_Ref (Local_Predefined_Ops);
                     Dec_Ref (Concat_Result_2);
                     Dec_Ref (Concat_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Let_Result_7);
                     Dec_Ref (Let_Result_8);
                     Dec_Ref (Let_Result_9);
            end Finalizer_Scope_581;
            procedure Finalizer_Scope_2457 is
            begin
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_3);
            end Finalizer_Scope_2457;
            procedure Finalizer_Scope_2458 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_2458;
            procedure Finalizer_Scope_2459 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_2459;
            procedure Finalizer_Scope_2461 is
            begin
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_2461;
            procedure Finalizer_Scope_2463 is
            begin
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (If_Result_6);
            end Finalizer_Scope_2463;
            procedure Finalizer_Scope_2464 is
            begin
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_2464;
            procedure Finalizer_Scope_2467 is
            begin
                     Dec_Ref (Map_Result_3);
            end Finalizer_Scope_2467;
            procedure Finalizer_Scope_2471 is
            begin
                     Dec_Ref (Fld_21);
                     Dec_Ref (Fld_23);
                     Dec_Ref (Env_Get_Result);
            end Finalizer_Scope_2471;
            procedure Finalizer_Scope_2474 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (If_Result_11);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_2474;
            procedure Finalizer_Scope_2475 is
            begin
                     Dec_Ref (Fld_35);
                     Dec_Ref (Map_Result_6);
            end Finalizer_Scope_2475;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitive_Subps is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Base_Type_Decl_Lf_Stg_Direct_Primitive_Subps;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitive_Subps,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4034 '<Let at nodes.lkt:7082:9>' Let_Result_9 ada/nodes.lkt:7082
--# scope-start
--# expr-start 3948 '<FieldAccess for declarative_scope at nodes.lkt:7082:21>' Fld ada/nodes.lkt:7082
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Self);
--# end
--# expr-done 3948
Local_Scope := Fld; 
--# bind scope Local_Scope
--# expr-start 4033 '<Let at nodes.lkt:7083:9>' Let_Result_8 ada/nodes.lkt:7083
--# scope-start
--# expr-start 3950 '<Cast to TypeDecl at nodes.lkt:7084:13>' Cast_Result ada/nodes.lkt:7084
--# expr-start 3949 '<as_bare_entity at nodes.lkt:7084:13>' If_Result ada/nodes.lkt:7084
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 3949
   if If_Result.Node = null
      or else If_Result.Node.Kind in Ada_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => If_Result.Node,
         Info => If_Result.Info);
   else
         Cast_Result := No_Entity_Type_Decl;
   end if;
--# expr-done 3950
Var_Expr_117 := Cast_Result;
if Var_Expr_117 /= No_Entity_Type_Decl then
   --# scope-start
--# expr-start 3951 '<FieldAccess for is_derived_tagged_type at nodes.lkt:7084:13>' Fld_1 ada/nodes.lkt:7084
      if Var_Expr_117.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDecl.is_derived_tagged_type
Fld_1 := Libadalang.Implementation.Type_Decl_P_Is_Derived_Tagged_Type (Node => Var_Expr_117.Node, E_Info => Var_Expr_117.Info);
--# end
--# expr-done 3951
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Local_Is_Derived_Tagged := Result_Var; 
--# bind is_derived_tagged Local_Is_Derived_Tagged
--# expr-start 4032 '<Let at nodes.lkt:7085:9>' Let_Result_7 ada/nodes.lkt:7085
--# scope-start
Var_Expr_118 := Local_Scope;
if Var_Expr_118 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 3953 '<as_bare_entity at nodes.lkt:7085:26>' If_Result_1 ada/nodes.lkt:7085
--# expr-start 3952 '<parent at nodes.lkt:7085:26>' Fld_2 ada/nodes.lkt:7085
      if Var_Expr_118 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_118.Parent; 
--# expr-done 3952
Is_Null_1 := Fld_2 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Fld_2); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 3953
Var_Expr_0 := If_Result_1;
if Var_Expr_0 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 3967 '<Match at nodes.lkt:7086:13>' Match_Result ada/nodes.lkt:7086
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Generic_Package_Internal .. Ada_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Base_Package_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind pkg_decl Match_0
--# expr-start 3956 '<TakeWhile at ???>' Map_Result None
   --# expr-start 3955 '<FieldAccess for decls at nodes.lkt:7090:21>' Fld_4 ada/nodes.lkt:7090
--# expr-start 3954 '<FieldAccess for public_part at nodes.lkt:7090:21>' Fld_3 ada/nodes.lkt:7090
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Public_Part (Node => Match_0.Node.Base_Package_Decl_F_Public_Part, Info => Match_0.Info);
--# expr-done 3954
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Ada_Node_List (Node => Fld_3.Node.Declarative_Part_F_Decls, Info => Fld_3.Info);
--# expr-done 3955
Fld_5 := Fld_4.Node;
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      if Fld_5 = null then
      Map_Result := Create_Internal_Entity_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_5;
      begin
         for Untyped_Item_19 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_19 := Untyped_Item_19; 
Is_Null_2 := Bare_Item_19 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity;
else
Fld_6 := Fld_4.Info;
As_Entity_2 := (Info => Fld_6, Node => Bare_Item_19); 
   If_Result_2 := As_Entity_2;
end if;
                  Item_19 := If_Result_2; 
   --# scope-start
         declare
            Item_To_Append : constant Internal_Entity := Item_19;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 3956
--# expr-start 3957 '<FieldAccess for private_part at nodes.lkt:7091:23>' Fld_7 ada/nodes.lkt:7091
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Private_Part (Node => Match_0.Node.Base_Package_Decl_F_Private_Part, Info => Match_0.Info);
--# expr-done 3957
Var_Expr_119 := Fld_7;
if Var_Expr_119 /= No_Entity_Private_Part then
   --# scope-start
--# expr-start 3959 '<TakeWhile at ???>' Map_Result_1 None
   --# expr-start 3958 '<FieldAccess for decls at nodes.lkt:7091:23>' Fld_8 ada/nodes.lkt:7091
      if Var_Expr_119.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Ada_Node_List (Node => Var_Expr_119.Node.Declarative_Part_F_Decls, Info => Var_Expr_119.Info);
--# expr-done 3958
Fld_9 := Fld_8.Node;
      declare
         Map_Result_1_Vec : Internal_Entity_Vectors.Vector;
      begin
      if Fld_9 = null then
      Map_Result_1 := Create_Internal_Entity_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_9;
      begin
         for Untyped_Item_20 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_20 := Untyped_Item_20; 
Is_Null_3 := Bare_Item_20 = null; 
if Is_Null_3 then
   If_Result_3 := No_Entity;
else
Fld_10 := Fld_8.Info;
As_Entity_3 := (Info => Fld_10, Node => Bare_Item_20); 
   If_Result_3 := As_Entity_3;
end if;
                  Item_20 := If_Result_3; 
   --# scope-start
         declare
            Item_To_Append : constant Internal_Entity := Item_20;
         begin
            Internal_Entity_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 3959
Scope_Result_1 := Map_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2461;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Concat_Result := Concat (Map_Result, Result_Var_1); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
Scope_Result_3 := Let_Result;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2459;
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Synthetic_Formal_Param_Decl | Ada_Discrete_Base_Subtype_Decl .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind _ Match_1
--# expr-start 3966 '<If at nodes.lkt:7096:21>' If_Result_6 ada/nodes.lkt:7096
if Local_Is_Derived_Tagged then
--# expr-start 3962 '<Cast to DeclarativePart at nodes.lkt:7098:25>' Cast_Result_1 ada/nodes.lkt:7098
--# expr-start 3961 '<parent at nodes.lkt:7098:25>' Fld_12 ada/nodes.lkt:7098
--# expr-start 3960 '<parent at nodes.lkt:7098:25>' Fld_11 ada/nodes.lkt:7098
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Parent; 
--# expr-done 3960
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Fld_11.Parent; 
--# expr-done 3961
   if Fld_12 = null
      or else Fld_12.Kind in Ada_Declarative_Part_Range
   then
      Cast_Result_1 := Fld_12;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 3962
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind dp Var_Expr_1
--# expr-start 3965 '<TakeWhile at ???>' Map_Result_2 None
   --# expr-start 3964 '<FieldAccess for decls at nodes.lkt:7099:37>' Fld_13 ada/nodes.lkt:7099
--# expr-start 3963 '<as_bare_entity at nodes.lkt:7099:37>' If_Result_4 ada/nodes.lkt:7099
Is_Null_4 := Var_Expr_1 = null; 
if Is_Null_4 then
   If_Result_4 := No_Entity_Declarative_Part;
else
As_Entity_4 := (Info => No_Entity_Info, Node => Var_Expr_1); 
   If_Result_4 := As_Entity_4;
end if;
--# expr-done 3963
      if If_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Ada_Node_List (Node => If_Result_4.Node.Declarative_Part_F_Decls, Info => If_Result_4.Info);
--# expr-done 3964
Fld_14 := Fld_13.Node;
      declare
         Map_Result_2_Vec : Internal_Entity_Vectors.Vector;
      begin
      if Fld_14 = null then
      Map_Result_2 := Create_Internal_Entity_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_14;
      begin
         for Untyped_Item_21 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_21 := Untyped_Item_21; 
Is_Null_5 := Bare_Item_21 = null; 
if Is_Null_5 then
   If_Result_5 := No_Entity;
else
Fld_15 := Fld_13.Info;
As_Entity_5 := (Info => Fld_15, Node => Bare_Item_21); 
   If_Result_5 := As_Entity_5;
end if;
                  Item_21 := If_Result_5; 
   --# scope-start
         declare
            Item_To_Append : constant Internal_Entity := Item_21;
         begin
            Internal_Entity_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result_2 := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 3965
Scope_Result_2 := Map_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2464;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
   If_Result_6 := Result_Var_2;
else
   If_Result_6 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 3966
Let_Result_1 := If_Result_6; Inc_Ref (Let_Result_1);
--# end
Scope_Result_4 := Let_Result_1;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2463;
            Match_Result := Scope_Result_4; Inc_Ref (Match_Result);
end case;
--# expr-done 3967
Scope_Result_5 := Match_Result;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_2458;
   Result_Var_3 := Scope_Result_5;
else
   Result_Var_3 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
Scope_Result_6 := Result_Var_3;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_2457;
   Result_Var_4 := Scope_Result_6;
else
   Result_Var_4 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var_4);
Local_Decl_Parts := Result_Var_4; Inc_Ref (Local_Decl_Parts);
--# bind decl_parts Local_Decl_Parts
--# expr-start 4031 '<Let at nodes.lkt:7104:9>' Let_Result_6 ada/nodes.lkt:7104
--# scope-start
--# expr-start 3970 '<Cast to EnumTypeDef at nodes.lkt:7104:25>' Cast_Result_5 ada/nodes.lkt:7104
--# expr-start 3968 '<Cast to TypeDecl at nodes.lkt:7104:25>' Cast_Result_4 ada/nodes.lkt:7104
Cast_Expr := Self; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Type_Decl
   then
      Cast_Result_4 := Cast_Expr;
   else
         Cast_Result_4 := No_Bare_Ada_Node;
   end if;
--# expr-done 3968
Var_Expr_120 := Cast_Result_4;
if Var_Expr_120 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 3969 '<FieldAccess for type_def at nodes.lkt:7104:25>' Fld_16 ada/nodes.lkt:7104
      if Var_Expr_120 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Var_Expr_120.Type_Decl_F_Type_Def;
--# expr-done 3969
Scope_Result_7 := Fld_16;
   --# end
   Result_Var_5 := Scope_Result_7;
else
   Result_Var_5 := No_Bare_Ada_Node;
end if;
   if Result_Var_5 = null
      or else Result_Var_5.Kind in Ada_Enum_Type_Def_Range
   then
      Cast_Result_5 := Result_Var_5;
   else
         Cast_Result_5 := No_Bare_Ada_Node;
   end if;
--# expr-done 3970
Var_Expr_2 := Cast_Result_5;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind etf Var_Expr_2
--# expr-start 3976 '<Map at nodes.lkt:7105:22>' Map_Result_3 ada/nodes.lkt:7105
   --# expr-start 3971 '<FieldAccess for enum_literals at nodes.lkt:7105:22>' Fld_17 ada/nodes.lkt:7105
      if Var_Expr_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Var_Expr_2.Enum_Type_Def_F_Enum_Literals;
--# expr-done 3971
      declare
         Map_Result_3_Vec : Internal_Inner_Env_Assoc_Vectors.Vector;
      begin
      if Fld_17 = null then
      Map_Result_3 := Create_Internal_Inner_Env_Assoc_Array (0);
      else
      declare
         Collection : constant Bare_Enum_Literal_Decl_List := Fld_17;
      begin
         for Untyped_Item_3 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_3 := Untyped_Item_3; 
   --# scope-start
               --# bind lit Item_3
      --# expr-start 3975 '<New InnerEnvAssoc at nodes.lkt:7106:26>' New_Struct_1 ada/nodes.lkt:7106
--# expr-start 3973 '<FieldAccess for name_symbol at nodes.lkt:7107:25>' Fld_19 ada/nodes.lkt:7107
--# expr-start 3972 '<FieldAccess for name at nodes.lkt:7107:25>' Fld_18 ada/nodes.lkt:7107
      if Item_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Item_3.Enum_Literal_Decl_F_Name;
--# expr-done 3972
      if Fld_18 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_19 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_18);
--# end
--# expr-done 3973
--# expr-start 3974 '<New Metadata at nodes.lkt:7109:30>' New_Struct ada/nodes.lkt:7109
Cast_Expr_1 := Self; 
      Cast_Result_6 := Cast_Expr_1;
New_Struct := (Dottable_Subp => False, Primitive => Cast_Result_6, Primitive_Real_Type => No_Bare_Ada_Node); 
--# expr-done 3974
Cast_Expr_2 := Item_3; 
      Cast_Result_7 := Cast_Expr_2;
New_Struct_1 := (Key => Fld_19, Metadata => New_Struct, Rebindings => null, Value => Cast_Result_7); 
--# expr-done 3975
         declare
            Item_To_Append : constant Internal_Inner_Env_Assoc := New_Struct_1;
         begin
            Internal_Inner_Env_Assoc_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result_3 := Create_Internal_Inner_Env_Assoc_Array
           (Items_Count => Natural (Internal_Inner_Env_Assoc_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Inner_Env_Assoc_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Inner_Env_Assoc_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Inner_Env_Assoc_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 3976
Scope_Result_8 := Map_Result_3;
   Inc_Ref (Scope_Result_8);
   --# end
      Finalizer_Scope_2467;
   Result_Var_6 := Scope_Result_8;
else
   Result_Var_6 := No_Internal_Inner_Env_Assoc_Array_Type;
end if;
      Inc_Ref (Result_Var_6);
Local_Enum_Lits := Result_Var_6; Inc_Ref (Local_Enum_Lits);
--# bind enum_lits Local_Enum_Lits
--# expr-start 4030 '<Let at nodes.lkt:7113:9>' Let_Result_5 ada/nodes.lkt:7113
--# scope-start
--# expr-start 4020 '<Mapcat at nodes.lkt:7113:26>' Map_Result_5 ada/nodes.lkt:7113
   --# expr-start 3999 '<Map at nodes.lkt:7113:26>' Map_Result_4 ada/nodes.lkt:7113
      declare
         Map_Result_4_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Decl_Parts;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind decl Item_4
--# expr-start 3977 '<Cast to BasicDecl at nodes.lkt:7114:13>' Cast_Result_8 ada/nodes.lkt:7114
Cast_Expr_3 := Item_4; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_8 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_8 := No_Entity_Basic_Decl;
   end if;
--# expr-done 3977
Var_Expr_121 := Cast_Result_8;
if Var_Expr_121 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 3978 '<FieldAccess for subp_spec_or_null at nodes.lkt:7114:13>' Fld_20 ada/nodes.lkt:7114
      if Var_Expr_121.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_20 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_121.Node, E_Info => Var_Expr_121.Info);
--# end
--# expr-done 3978
Var_Expr_5 := Fld_20;
if Var_Expr_5 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_5
--# expr-start 3998 '<BooleanBinaryOp And at nodes.lkt:7115:27>' If_Result_10 ada/nodes.lkt:7115
--# expr-start 3982 '<Contains at nodes.lkt:7115:27>' Quantifier_Result ada/nodes.lkt:7115
   --# expr-start 3979 '<FieldAccess for candidate_primitive_subp_types at nodes.lkt:7115:27>' Fld_21 ada/nodes.lkt:7115
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.candidate_primitive_subp_types
Fld_21 := Libadalang.Implementation.Base_Subp_Spec_P_Candidate_Primitive_Subp_Types (Node => Var_Expr_5.Node, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 3979
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld_21;
      begin
         for Item_10 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_10
      --# expr-start 3981 '<Eq at ???>' Is_Equiv None
Cast_Expr_4 := Item_10; 
      Cast_Result_9 := Create_Internal_Entity
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
--# expr-start 3980 '<as_bare_entity at nodes.lkt:7116:21>' If_Result_7 ada/nodes.lkt:7116
Is_Null_6 := Self = null; 
if Is_Null_6 then
   If_Result_7 := No_Entity_Base_Type_Decl;
else
As_Entity_6 := (Info => No_Entity_Info, Node => Self); 
   If_Result_7 := As_Entity_6;
end if;
--# expr-done 3980
      Cast_Result_10 := Create_Internal_Entity
        (Node => If_Result_7.Node,
         Info => If_Result_7.Info);
Is_Equiv := Equivalent (Cast_Result_9, Cast_Result_10); 
--# expr-done 3981
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 3982
if Quantifier_Result then
   --# expr-start 3997 '<If at nodes.lkt:7126:21>' If_Result_9 ada/nodes.lkt:7126
--# expr-start 3985 '<Not at nodes.lkt:7126:24>' Not_Val ada/nodes.lkt:7126
--# expr-start 3984 '<IsA BasePackageDecl at nodes.lkt:7126:28>' Is_A ada/nodes.lkt:7126
--# expr-start 3983 '<parent at nodes.lkt:7126:28>' Fld_28 ada/nodes.lkt:7126
      if Local_Scope = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Local_Scope.Parent; 
--# expr-done 3983
Is_A := Fld_28 /= null 
and then Fld_28.Kind in Ada_Base_Package_Decl; 
--# expr-done 3984
Not_Val := not (Is_A); 
--# expr-done 3985
if Not_Val then
   --# expr-start 3996 '<bind at nodes.lkt:7128:25>' Dyn_Var_Bind_Result ada/nodes.lkt:7128
--# expr-start 3986 '<FieldAccess for origin_node at nodes.lkt:7128:39>' Fld_22 ada/nodes.lkt:7128
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_22 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Var_Expr_5.Node);
--# end
--# expr-done 3986
Bound_Origin := Fld_22; 
--# expr-start 3995 '<AnyQuantifier at nodes.lkt:7130:25>' Quantifier_Result_1 ada/nodes.lkt:7130
   --# expr-start 3991 '<EnvGet at nodes.lkt:7130:25>' Env_Get_Result ada/nodes.lkt:7130
--# expr-start 3988 '<FieldAccess for parent_primitives_env at nodes.lkt:7130:25>' Fld_23 ada/nodes.lkt:7130
--# expr-start 3987 '<as_bare_entity at nodes.lkt:7130:25>' If_Result_8 ada/nodes.lkt:7130
Is_Null_7 := Self = null; 
if Is_Null_7 then
   If_Result_8 := No_Entity_Base_Type_Decl;
else
As_Entity_7 := (Info => No_Entity_Info, Node => Self); 
   If_Result_8 := As_Entity_7;
end if;
--# expr-done 3987
      if If_Result_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.parent_primitives_env'
Fld_23 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Parent_Primitives_Env (Node => If_Result_8.Node, E_Info => If_Result_8.Info);
--# end
--# expr-done 3988
--# expr-start 3990 '<FieldAccess for name_symbol at nodes.lkt:7131:29>' Fld_25 ada/nodes.lkt:7131
--# expr-start 3989 '<FieldAccess for name at nodes.lkt:7131:29>' Fld_24 ada/nodes.lkt:7131
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_24 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Var_Expr_5.Node, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 3989
      if Fld_24.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_25 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_24.Node);
--# end
--# expr-done 3990
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_23, Key => Thin (Fld_25), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 3991
      Quantifier_Result_1 := False;
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_6 of
               Collection.Items
         loop
   --# scope-start
               --# bind x Item_6
      --# expr-start 3994 '<FieldAccess for match_signature at nodes.lkt:7133:29>' Fld_27 ada/nodes.lkt:7133
--# expr-start 3993 '<FieldAccess for subp_spec_or_null at nodes.lkt:7133:29>' Fld_26 ada/nodes.lkt:7133
--# expr-start 3992 '<Cast to BasicDecl at nodes.lkt:7133:29>' Cast_Result_11 ada/nodes.lkt:7133
Cast_Expr_5 := Item_6; 
   if Cast_Expr_5.Node = null
      or else Cast_Expr_5.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_11 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_5.Node,
         Info => Cast_Expr_5.Info);
   else
         Cast_Result_11 := No_Entity_Basic_Decl;
   end if;
--# expr-done 3992
      if Cast_Result_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_26 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Cast_Result_11.Node, E_Info => Cast_Result_11.Info);
--# end
--# expr-done 3993
      if Fld_26.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.match_signature
Fld_27 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Fld_26.Node, Other => Var_Expr_5, Match_Name => False, Use_Entity_Info => True, Origin => Bound_Origin, E_Info => Fld_26.Info);
--# end
--# expr-done 3994
      Quantifier_Result_1 := Fld_27;
   --# end
               exit when Quantifier_Result_1;
         end loop;
      end;
--# expr-done 3995
Dyn_Var_Bind_Result := Quantifier_Result_1; 
--# expr-done 3996
   If_Result_9 := Dyn_Var_Bind_Result;
else
   If_Result_9 := True;
end if;
--# expr-done 3997
   If_Result_10 := If_Result_9;
else
   If_Result_10 := False;
end if;
--# expr-done 3998
Scope_Result_9 := If_Result_10;
   --# end
      Finalizer_Scope_2471;
   Result_Var_7 := Scope_Result_9;
else
   Result_Var_7 := False;
end if;
Scope_Result_10 := Result_Var_7;
   --# end
   Result_Var_8 := Scope_Result_10;
else
   Result_Var_8 := False;
end if;
         if Result_Var_8 then
         declare
            Item_To_Append : constant Internal_Entity := Item_4;
         begin
            Internal_Entity_Vectors.Append (Map_Result_4_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_4 := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_4_Vec)));
         for I in Map_Result_4.Items'Range loop
            Map_Result_4.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_4_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result_4.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_4_Vec);
      end;
--# expr-done 3999
      declare
         Map_Result_5_Vec : Internal_Inner_Env_Assoc_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result_4;
      begin
         for Item_7 of
               Collection.Items
         loop
   --# scope-start
               --# bind decl Item_7
      --# expr-start 4019 '<Let at nodes.lkt:7145:13>' Let_Result_3 ada/nodes.lkt:7145
--# scope-start
--# expr-start 4000 '<Cast to BasicDecl at nodes.lkt:7145:22>' Cast_Result_12 ada/nodes.lkt:7145
Cast_Expr_6 := Item_7; 
   if Cast_Expr_6.Node = null
      or else Cast_Expr_6.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_12 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_6.Node,
         Info => Cast_Expr_6.Info);
   else
         Cast_Result_12 := No_Entity_Basic_Decl;
   end if;
--# expr-done 4000
Local_Bd := Cast_Result_12; 
--# bind bd Local_Bd
--# expr-start 4018 '<Let at nodes.lkt:7146:13>' Let_Result_2 ada/nodes.lkt:7146
--# scope-start
--# expr-start 4002 '<FieldAccess for name_symbol at nodes.lkt:7146:23>' Fld_30 ada/nodes.lkt:7146
--# expr-start 4001 '<FieldAccess for defining_name at nodes.lkt:7146:23>' Fld_29 ada/nodes.lkt:7146
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_29 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 4001
      if Fld_29.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_30 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_29.Node);
--# end
--# expr-done 4002
Local_Sym := Fld_30; 
--# bind sym Local_Sym
--# expr-start 4006 '<ArrayLiteral at nodes.lkt:7148:13>' Array_Lit ada/nodes.lkt:7148
--# expr-start 4005 '<New InnerEnvAssoc at nodes.lkt:7148:14>' New_Struct_3 ada/nodes.lkt:7148
--# expr-start 4003 '<New Metadata at nodes.lkt:7151:26>' New_Struct_2 ada/nodes.lkt:7151
Cast_Expr_7 := Self; 
      Cast_Result_13 := Cast_Expr_7;
New_Struct_2 := (Dottable_Subp => False, Primitive => Cast_Result_13, Primitive_Real_Type => No_Bare_Ada_Node); 
--# expr-done 4003
--# expr-start 4004 '<FieldAccess for node at nodes.lkt:7150:23>' Fld_31 ada/nodes.lkt:7150
Fld_31 := Local_Bd.Node;
--# expr-done 4004
      Cast_Result_14 := Fld_31;
New_Struct_3 := (Key => Local_Sym, Metadata => New_Struct_2, Rebindings => null, Value => Cast_Result_14); 
--# expr-done 4005
Array_Lit := Create_Internal_Inner_Env_Assoc_Array (Internal_Internal_Inner_Env_Assoc_Array'(1 => New_Struct_3)); 
--# expr-done 4006
--# expr-start 4017 '<If at nodes.lkt:7153:17>' If_Result_11 ada/nodes.lkt:7153
--# expr-start 4008 '<Eq at nodes.lkt:7153:20>' Is_Equal ada/nodes.lkt:7153
--# expr-start 4007 '<Symbol "=" at nodes.lkt:7153:27>' Sym_1 ada/nodes.lkt:7153
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 4007
Is_Equal := Local_Sym = Sym_1; 
--# expr-done 4008
if Is_Equal then
   --# expr-start 4016 '<ArrayLiteral at nodes.lkt:7154:22>' Array_Lit_1 ada/nodes.lkt:7154
--# expr-start 4015 '<New InnerEnvAssoc at nodes.lkt:7154:23>' New_Struct_5 ada/nodes.lkt:7154
--# expr-start 4009 '<Symbol "/=" at nodes.lkt:7155:25>' Sym ada/nodes.lkt:7155
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 4009
--# expr-start 4010 '<New Metadata at nodes.lkt:7159:30>' New_Struct_4 ada/nodes.lkt:7159
Cast_Expr_8 := Self; 
      Cast_Result_16 := Cast_Expr_8;
New_Struct_4 := (Dottable_Subp => False, Primitive => Cast_Result_16, Primitive_Real_Type => No_Bare_Ada_Node); 
--# expr-done 4010
--# expr-start 4014 '<FieldAccess for synthetic_neq_subprogram at nodes.lkt:7156:27>' Fld_34 ada/nodes.lkt:7156
--# expr-start 4013 '<FieldAccess for node at nodes.lkt:7156:27>' Fld_33 ada/nodes.lkt:7156
--# expr-start 4012 '<Cast to SubpSpec at nodes.lkt:7156:27>' Cast_Result_15 ada/nodes.lkt:7156
--# expr-start 4011 '<FieldAccess for subp_spec_or_null at nodes.lkt:7156:27>' Fld_32 ada/nodes.lkt:7156
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_32 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Local_Bd.Node, Follow_Generic => False, E_Info => Local_Bd.Info);
--# end
--# expr-done 4011
   if Fld_32.Node = null
      or else Fld_32.Node.Kind in Ada_Subp_Spec_Range
   then
      Cast_Result_15 := Create_Internal_Entity_Subp_Spec
        (Node => Fld_32.Node,
         Info => Fld_32.Info);
   else
         Cast_Result_15 := No_Entity_Subp_Spec;
   end if;
--# expr-done 4012
Fld_33 := Cast_Result_15.Node;
--# expr-done 4013
      if Fld_33 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubpSpec.synthetic_neq_subprogram
Fld_34 := Libadalang.Implementation.Subp_Spec_F_Synthetic_Neq_Subprogram (Node => Fld_33);
--# end
--# expr-done 4014
      Cast_Result_17 := Fld_34;
New_Struct_5 := (Key => Sym, Metadata => New_Struct_4, Rebindings => null, Value => Cast_Result_17); 
--# expr-done 4015
Array_Lit_1 := Create_Internal_Inner_Env_Assoc_Array (Internal_Internal_Inner_Env_Assoc_Array'(1 => New_Struct_5)); 
--# expr-done 4016
   If_Result_11 := Array_Lit_1;
else
   If_Result_11 := No_Internal_Inner_Env_Assoc_Array_Type;
end if;
      Inc_Ref (If_Result_11);
--# expr-done 4017
Concat_Result_1 := Concat (Array_Lit, If_Result_11); 
Let_Result_2 := Concat_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 4018
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 4019
         for Item_To_Append of
               Let_Result_3.Items
         loop
            Internal_Inner_Env_Assoc_Vectors.Append (Map_Result_5_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2474;
         end loop;
      end;
         Map_Result_5 := Create_Internal_Inner_Env_Assoc_Array
           (Items_Count => Natural (Internal_Inner_Env_Assoc_Vectors.Length (Map_Result_5_Vec)));
         for I in Map_Result_5.Items'Range loop
            Map_Result_5.Items (I) := Internal_Inner_Env_Assoc_Vectors.Get
              (Map_Result_5_Vec,
               I + Internal_Inner_Env_Assoc_Vectors.Index_Type'First - Map_Result_5.Items'First);
         end loop;
         Internal_Inner_Env_Assoc_Vectors.Destroy (Map_Result_5_Vec);
      end;
--# expr-done 4020
Local_Prim_Subps := Map_Result_5; Inc_Ref (Local_Prim_Subps);
--# bind prim_subps Local_Prim_Subps
--# expr-start 4029 '<Let at nodes.lkt:7166:9>' Let_Result_4 ada/nodes.lkt:7166
--# scope-start
--# expr-start 4021 '<Cast to TypeDecl at nodes.lkt:7167:13>' Cast_Result_18 ada/nodes.lkt:7167
Cast_Expr_9 := Self; 
   if Cast_Expr_9 = null
      or else Cast_Expr_9.Kind in Ada_Type_Decl
   then
      Cast_Result_18 := Cast_Expr_9;
   else
         Cast_Result_18 := No_Bare_Ada_Node;
   end if;
--# expr-done 4021
Var_Expr_122 := Cast_Result_18;
if Var_Expr_122 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 4028 '<Map at nodes.lkt:7167:13>' Map_Result_6 ada/nodes.lkt:7167
   --# expr-start 4023 '<FieldAccess for predefined_operators at nodes.lkt:7167:13>' Fld_35 ada/nodes.lkt:7167
--# expr-start 4022 '<as_bare_entity at nodes.lkt:7167:13>' If_Result_12 ada/nodes.lkt:7167
Is_Null_8 := Var_Expr_122 = null; 
if Is_Null_8 then
   If_Result_12 := No_Entity_Type_Decl;
else
As_Entity_8 := (Info => No_Entity_Info, Node => Var_Expr_122); 
   If_Result_12 := As_Entity_8;
end if;
--# expr-done 4022
      if If_Result_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDecl.predefined_operators
Fld_35 := Libadalang.Implementation.Type_Decl_P_Predefined_Operators (Node => If_Result_12.Node, E_Info => If_Result_12.Info);
--# end
--# expr-done 4023
      declare
         Map_Result_6_Vec : Internal_Inner_Env_Assoc_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Env_Assoc_Array_Access := Fld_35;
      begin
         for Item_8 of
               Collection.Items
         loop
   --# scope-start
               --# bind assoc Item_8
      --# expr-start 4027 '<New InnerEnvAssoc at nodes.lkt:7168:28>' New_Struct_7 ada/nodes.lkt:7168
--# expr-start 4024 '<FieldAccess for key at nodes.lkt:7169:25>' Fld_36 ada/nodes.lkt:7169
Fld_36 := Item_8.Key;
--# expr-done 4024
--# expr-start 4025 '<New Metadata at nodes.lkt:7171:30>' New_Struct_6 ada/nodes.lkt:7171
Cast_Expr_10 := Self; 
      Cast_Result_19 := Cast_Expr_10;
New_Struct_6 := (Dottable_Subp => False, Primitive => Cast_Result_19, Primitive_Real_Type => No_Bare_Ada_Node); 
--# expr-done 4025
--# expr-start 4026 '<FieldAccess for value at nodes.lkt:7170:27>' Fld_37 ada/nodes.lkt:7170
Fld_37 := Item_8.Value;
--# expr-done 4026
New_Struct_7 := (Key => Fld_36, Metadata => New_Struct_6, Rebindings => null, Value => Fld_37); 
--# expr-done 4027
         declare
            Item_To_Append : constant Internal_Inner_Env_Assoc := New_Struct_7;
         begin
            Internal_Inner_Env_Assoc_Vectors.Append (Map_Result_6_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_6 := Create_Internal_Inner_Env_Assoc_Array
           (Items_Count => Natural (Internal_Inner_Env_Assoc_Vectors.Length (Map_Result_6_Vec)));
         for I in Map_Result_6.Items'Range loop
            Map_Result_6.Items (I) := Internal_Inner_Env_Assoc_Vectors.Get
              (Map_Result_6_Vec,
               I + Internal_Inner_Env_Assoc_Vectors.Index_Type'First - Map_Result_6.Items'First);
         end loop;
         Internal_Inner_Env_Assoc_Vectors.Destroy (Map_Result_6_Vec);
      end;
--# expr-done 4028
Scope_Result_11 := Map_Result_6;
   Inc_Ref (Scope_Result_11);
   --# end
      Finalizer_Scope_2475;
   Result_Var_9 := Scope_Result_11;
else
   Result_Var_9 := No_Internal_Inner_Env_Assoc_Array_Type;
end if;
      Inc_Ref (Result_Var_9);
Local_Predefined_Ops := Result_Var_9; Inc_Ref (Local_Predefined_Ops);
--# bind predefined_ops Local_Predefined_Ops
Concat_Result_2 := Concat (Local_Enum_Lits, Local_Prim_Subps); 
Concat_Result_3 := Concat (Concat_Result_2, Local_Predefined_Ops); 
Let_Result_4 := Concat_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 4029
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 4030
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 4031
Let_Result_7 := Let_Result_6; Inc_Ref (Let_Result_7);
--# end
--# expr-done 4032
Let_Result_8 := Let_Result_7; Inc_Ref (Let_Result_8);
--# end
--# expr-done 4033
Let_Result_9 := Let_Result_8; Inc_Ref (Let_Result_9);
--# end
--# expr-done 4034
         Property_Result := Let_Result_9;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_581;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_581;
                     Finalizer_Scope_2457;
                     Finalizer_Scope_2458;
                     Finalizer_Scope_2459;
                     Finalizer_Scope_2461;
                     Finalizer_Scope_2463;
                     Finalizer_Scope_2464;
                     Finalizer_Scope_2467;
                     Finalizer_Scope_2471;
                     Finalizer_Scope_2474;
                     Finalizer_Scope_2475;
               Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitive_Subps :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitive_Subps := Initialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Direct_Primitive_Subps := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Base_Type_Decl_F_Direct_Primitive_Subps;
--# end
--# property-start BaseTypeDecl.own_primitives_env ada/nodes.lkt:7180
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Own_Primitives_Env
  (Node : Bare_Base_Type_Decl
      ; With_Rebindings : Env_Rebindings
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind with_rebindings With_Rebindings
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_582 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Rebound_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_582 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Rebound_Env);
            end Finalizer_Scope_582;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4036 '<rebind_env at nodes.lkt:7181:9>' Rebound_Env ada/nodes.lkt:7181
--# expr-start 4035 '<FieldAccess for direct_primitives_env at nodes.lkt:7181:9>' Fld ada/nodes.lkt:7181
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.direct_primitives_env
Fld := Libadalang.Implementation.Base_Type_Decl_F_Direct_Primitives_Env (Node => Ent.Node);
--# end
--# expr-done 4035
Rebound_Env := Rebind_Env (Fld, With_Rebindings); 
--# expr-done 4036
         Property_Result := Rebound_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_582;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_582;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Own_Primitives_Env;
--# end
--# property-start BaseTypeDecl.own_primitives_envs ada/nodes.lkt:7186
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Own_Primitives_Envs
  (Node : Bare_Base_Type_Decl
      ; With_Rebindings : Env_Rebindings
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind with_rebindings With_Rebindings
   Property_Result : Lexical_Env_Array_Access;
            procedure Finalizer_Scope_583 with Inline_Always;
            procedure Finalizer_Scope_2477 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Scope_Result : Lexical_Env_Array_Access;
Fld_3 : Lexical_Env := Empty_Env;
Array_Lit_1 : Lexical_Env_Array_Access;
Result_Var : Lexical_Env_Array_Access;
            procedure Finalizer_Scope_583 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_583;
            procedure Finalizer_Scope_2477 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2477;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4038 '<Cast to TypeDecl at nodes.lkt:7190:9>' Cast_Result ada/nodes.lkt:7190
--# expr-start 4037 '<FieldAccess for previous_part at nodes.lkt:7190:9>' Fld ada/nodes.lkt:7190
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.previous_part
Fld := Libadalang.Implementation.Base_Type_Decl_P_Previous_Part (Node => Ent.Node, Go_To_Incomplete => False, E_Info => Ent.Info);
--# end
--# expr-done 4037
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Type_Decl;
   end if;
--# expr-done 4038
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Type_Decl then
   --# scope-start
   --# bind pp Var_Expr_0
--# expr-start 4041 '<ArrayLiteral at nodes.lkt:7192:13>' Array_Lit ada/nodes.lkt:7192
--# expr-start 4039 '<FieldAccess for own_primitives_env at nodes.lkt:7193:17>' Fld_1 ada/nodes.lkt:7193
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.own_primitives_env
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Own_Primitives_Env (Node => Ent.Node, With_Rebindings => With_Rebindings, E_Info => Ent.Info);
--# end
--# expr-done 4039
--# expr-start 4040 '<FieldAccess for own_primitives_env at nodes.lkt:7194:17>' Fld_2 ada/nodes.lkt:7194
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.own_primitives_env
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Own_Primitives_Env (Node => Var_Expr_0.Node, With_Rebindings => With_Rebindings, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4040
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_1, 2 => Fld_2)); 
--# expr-done 4041
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2477;
   Result_Var := Scope_Result;
else
   --# expr-start 4043 '<ArrayLiteral at nodes.lkt:7196:25>' Array_Lit_1 ada/nodes.lkt:7196
--# expr-start 4042 '<FieldAccess for own_primitives_env at nodes.lkt:7196:26>' Fld_3 ada/nodes.lkt:7196
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.own_primitives_env
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Own_Primitives_Env (Node => Ent.Node, With_Rebindings => With_Rebindings, E_Info => Ent.Info);
--# end
--# expr-done 4042
Array_Lit_1 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_3)); 
--# expr-done 4043
   Result_Var := Array_Lit_1;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_583;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_583;
                     Finalizer_Scope_2477;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Own_Primitives_Envs;
--# end
--# property-start BaseTypeDecl.primitives_envs ada/nodes.lkt:7204
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Primitives_Envs
  (Node : Bare_Base_Type_Decl
      ; With_Rebindings : Env_Rebindings
      ; Stop_At : Internal_Entity_Base_Type_Decl_Array_Access
      ; Include_Self : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind with_rebindings With_Rebindings
   --# bind stop_at Stop_At
   --# bind include_self Include_Self
   Property_Result : Lexical_Env_Array_Access;
            procedure Finalizer_Scope_584 with Inline_Always;
            procedure Finalizer_Scope_2478 with Inline_Always;
            procedure Finalizer_Scope_2483 with Inline_Always;
      Match_0 : Internal_Entity_Type_Decl;
Match_1 : Internal_Entity_Task_Type_Decl;
Match_2 : Internal_Entity_Base_Subtype_Decl;
Match_3 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_1 : Bare_Base_Subtype_Decl;
Fld_2 : Bare_Ada_Node;
Bound_Origin_1 : Bare_Ada_Node;
Fld_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Type_Decl;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity_Type_Decl;
Cast_Expr_1 : Internal_Entity_Type_Decl;
Cast_Result_3 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity_Task_Type_Decl;
Cast_Expr_2 : Internal_Entity_Task_Type_Decl;
Cast_Result_5 : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity_Base_Subtype_Decl;
Cast_Result_7 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_8 : Internal_Entity_Base_Type_Decl;
Cast_Expr_3 : Internal_Entity_Type_Decl;
Cast_Result_9 : Internal_Entity_Base_Type_Decl;
Let_Result_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
Fld_4 : Lexical_Env_Array_Access;
Fld_5 : Lexical_Env_Array_Access;
Concat_Result : Lexical_Env_Array_Access;
Cast_Expr_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_10 : Internal_Entity;
Cast_Expr_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_11 : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
If_Result : Lexical_Env_Array_Access;
Scope_Result_4 : Lexical_Env_Array_Access;
Result_Var : Lexical_Env_Array_Access;
Map_Result : Lexical_Env_Array_Access;
Fld_6 : Lexical_Env_Array_Access;
If_Result_1 : Lexical_Env_Array_Access;
Concat_Result_1 : Lexical_Env_Array_Access;
Dyn_Var_Bind_Result_1 : Lexical_Env_Array_Access;
            procedure Finalizer_Scope_584 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Fld_6);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
            end Finalizer_Scope_584;
            procedure Finalizer_Scope_2478 is
            begin
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2478;
            procedure Finalizer_Scope_2483 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2483;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4059 '<bind at nodes.lkt:7212:9>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:7212
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 4056 '<Mapcat at nodes.lkt:7214:9>' Map_Result ada/nodes.lkt:7214
   --# expr-start 4044 '<FieldAccess for base_types at nodes.lkt:7214:9>' Fld ada/nodes.lkt:7214
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_types'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Types (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 4044
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
--# expr-start 4050 '<Match at nodes.lkt:7216:13>' Match_Result ada/nodes.lkt:7216
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_0; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind td Match_0
Cast_Expr_1 := Match_0; 
      Cast_Result_3 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Let_Result := Cast_Result_3; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Task_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_4; 
--# bind ttd Match_1
Cast_Expr_2 := Match_1; 
      Cast_Result_5 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Let_Result_1 := Cast_Result_5; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Base_Subtype_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_6; 
--# bind std Match_2
--# expr-start 4049 '<bind at nodes.lkt:7221:25>' Dyn_Var_Bind_Result ada/nodes.lkt:7221
--# expr-start 4046 '<FieldAccess for origin_node at nodes.lkt:7221:39>' Fld_2 ada/nodes.lkt:7221
--# expr-start 4045 '<FieldAccess for node at nodes.lkt:7221:39>' Fld_1 ada/nodes.lkt:7221
Fld_1 := Match_2.Node;
--# expr-done 4045
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_2 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Fld_1);
--# end
--# expr-done 4046
Bound_Origin_1 := Fld_2; 
--# expr-start 4048 '<Cast to TypeDecl at nodes.lkt:7223:25>' Cast_Result_1 ada/nodes.lkt:7223
--# expr-start 4047 '<FieldAccess for get_type at nodes.lkt:7223:25>' Fld_3 ada/nodes.lkt:7223
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Match_2.Node, Origin => Bound_Origin_1, E_Info => Match_2.Info);
--# end
--# expr-done 4047
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Type_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result_1 := No_Entity_Type_Decl;
   end if;
--# expr-done 4048
Dyn_Var_Bind_Result := Cast_Result_1; 
--# expr-done 4049
      Cast_Result_7 := Create_Internal_Entity_Base_Type_Decl
        (Node => Dyn_Var_Bind_Result.Node,
         Info => Dyn_Var_Bind_Result.Info);
Let_Result_2 := Cast_Result_7; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Classwide_Type_Decl .. Ada_Protected_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_8; 
--# bind _ Match_3
Cast_Expr_3 := No_Entity_Type_Decl; 
      Cast_Result_9 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
Let_Result_3 := Cast_Result_9; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 4050
Var_Expr_1 := Match_Result;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_1
--# expr-start 4055 '<If at nodes.lkt:7229:17>' If_Result ada/nodes.lkt:7229
--# expr-start 4052 '<Contains at nodes.lkt:7229:20>' Quantifier_Result ada/nodes.lkt:7229
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Stop_At;
      begin
         for Item_11 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_11
      --# expr-start 4051 '<Eq at ???>' Is_Equiv None
Cast_Expr_4 := Item_11; 
      Cast_Result_10 := Create_Internal_Entity
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
Cast_Expr_5 := Var_Expr_1; 
      Cast_Result_11 := Create_Internal_Entity
        (Node => Cast_Expr_5.Node,
         Info => Cast_Expr_5.Info);
Is_Equiv := Equivalent (Cast_Result_10, Cast_Result_11); 
--# expr-done 4051
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 4052
if Quantifier_Result then
   If_Result := No_Lexical_Env_Array_Type;
else
   --# expr-start 4053 '<FieldAccess for own_primitives_envs at nodes.lkt:7231:21>' Fld_4 ada/nodes.lkt:7231
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.own_primitives_envs
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Own_Primitives_Envs (Node => Var_Expr_1.Node, With_Rebindings => With_Rebindings, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 4053
--# expr-start 4054 '<FieldAccess for primitives_envs at nodes.lkt:7232:23>' Fld_5 ada/nodes.lkt:7232
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.primitives_envs
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Primitives_Envs (Node => Var_Expr_1.Node, With_Rebindings => With_Rebindings, Stop_At => Stop_At, Include_Self => False, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 4054
Concat_Result := Concat (Fld_4, Fld_5); 
   If_Result := Concat_Result;
end if;
      Inc_Ref (If_Result);
--# expr-done 4055
Scope_Result_4 := If_Result;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2483;
   Result_Var := Scope_Result_4;
else
   Result_Var := No_Lexical_Env_Array_Type;
end if;
      Inc_Ref (Result_Var);
         for Item_To_Append of
               Result_Var.Items
         loop
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2478;
         end loop;
      end;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4056
--# expr-start 4058 '<If at nodes.lkt:7236:13>' If_Result_1 ada/nodes.lkt:7236
if Include_Self then
   --# expr-start 4057 '<FieldAccess for own_primitives_envs at nodes.lkt:7236:34>' Fld_6 ada/nodes.lkt:7236
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.own_primitives_envs
Fld_6 := Libadalang.Implementation.Base_Type_Decl_P_Own_Primitives_Envs (Node => Ent.Node, With_Rebindings => With_Rebindings, E_Info => Ent.Info);
--# end
--# expr-done 4057
   If_Result_1 := Fld_6;
else
   If_Result_1 := No_Lexical_Env_Array_Type;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 4058
Concat_Result_1 := Concat (Map_Result, If_Result_1); 
Dyn_Var_Bind_Result_1 := Concat_Result_1; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 4059
         Property_Result := Dyn_Var_Bind_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_584;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_584;
                     Finalizer_Scope_2478;
                     Finalizer_Scope_2483;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Primitives_Envs;
--# end
--# property-start BaseTypeDecl.compute_primitives_env ada/nodes.lkt:7244
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Compute_Primitives_Env
  (Node : Bare_Base_Type_Decl
      ; Include_Self : Boolean
         := True
      ; Stop_At : Internal_Entity_Base_Type_Decl_Array_Access
         := No_Internal_Entity_Base_Type_Decl_Array_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind include_self Include_Self
   --# bind stop_at Stop_At
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_585 with Inline_Always;
      Fld : Internal_Entity_Info;
Fld_1 : Env_Rebindings;
Fld_2 : Lexical_Env_Array_Access;
Cast_Expr : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct : Internal_Metadata;
Group_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_585 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_585;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Compute_Primitives_Env,
            Items    => new Mmz_Key_Array (1 ..  4))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Include_Self);
               Mmz_K.Items (3) := (Kind => Mmz_Internal_Entity_Base_Type_Decl_Array_Access,
                                      As_Internal_Entity_Base_Type_Decl_Array_Access => Stop_At);
                  Inc_Ref (Mmz_K.Items (3).As_Internal_Entity_Base_Type_Decl_Array_Access);
               Mmz_K.Items (4) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Lexical_Env;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4064 '<env_group at nodes.lkt:7249:9>' Group_Env ada/nodes.lkt:7249
--# expr-start 4062 '<FieldAccess for primitives_envs at nodes.lkt:7249:9>' Fld_2 ada/nodes.lkt:7249
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4061 '<FieldAccess for rebindings at nodes.lkt:7250:29>' Fld_1 ada/nodes.lkt:7250
--# expr-start 4060 '<FieldAccess for info at nodes.lkt:7250:29>' Fld ada/nodes.lkt:7250
Fld := Ent.Info;
--# expr-done 4060
Fld_1 := Fld.Rebindings;
--# expr-done 4061
--# property-call-start BaseTypeDecl.primitives_envs
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Primitives_Envs (Node => Ent.Node, With_Rebindings => Fld_1, Stop_At => Stop_At, Include_Self => Include_Self, E_Info => Ent.Info);
--# end
--# expr-done 4062
--# expr-start 4063 '<New Metadata at nodes.lkt:7254:28>' New_Struct ada/nodes.lkt:7254
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
New_Struct := (Dottable_Subp => False, Primitive => No_Bare_Ada_Node, Primitive_Real_Type => Cast_Result); 
--# expr-done 4063
Group_Env := Group (Fld_2, New_Struct); 
--# expr-done 4064
         Property_Result := Group_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_585;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_585;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Lexical_Env,
                        As_Lexical_Env => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Compute_Primitives_Env;
--# end
--# property-start BaseTypeDecl.direct_primitives_env ada/nodes.lkt:7259
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_F_Direct_Primitives_Env
  (Node : Bare_Base_Type_Decl
  )
   return Lexical_Env
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_586 with Inline_Always;
      Dyn_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_586 is
            begin
                     Dec_Ref (Dyn_Env);
            end Finalizer_Scope_586;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitives_Env is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Base_Type_Decl_Lf_Stg_Direct_Primitives_Env;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitives_Env,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4065 '<DynamicLexicalEnv at nodes.lkt:7260:9>' Dyn_Env ada/nodes.lkt:7260
Dyn_Env := Create_Dynamic_Lexical_Env (Self, Base_Type_Decl_F_Direct_Primitive_Subps'Access, null, False, Self.Unit.Context.Symbols); 
--# expr-done 4065
         Property_Result := Dyn_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_586;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_586;
               Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitives_Env :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Base_Type_Decl_Lf_State_Direct_Primitives_Env := Initialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Direct_Primitives_Env := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Base_Type_Decl_F_Direct_Primitives_Env;
--# end
--# property-start BaseTypeDecl.get_primitives ada/nodes.lkt:7271
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Get_Primitives
  (Node : Bare_Base_Type_Decl
      ; Only_Inherited : Boolean
         := False
      ; Include_Predefined_Operators : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind only_inherited Only_Inherited
   --# bind include_predefined_operators Include_Predefined_Operators
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_587 with Inline_Always;
            procedure Finalizer_Scope_2486 with Inline_Always;
      Local_Prim_Env : Lexical_Env := Empty_Env;
Local_All_Prim_Names : Symbol_Type_Array_Access;
Local_All_Prims : Internal_Entity_Basic_Decl_Array_Access;
Local_Bds : Internal_Entity_Basic_Decl_Array_Access;
Local_A_Spec : Internal_Entity_Base_Subp_Spec;
Local_A_Prim : Internal_Entity_Base_Type_Decl;
Local_B_Prim : Bare_Base_Type_Decl;
Local_B_Prim_Ent : Internal_Entity_Base_Type_Decl;
Fld : Lexical_Env := Empty_Env;
Fld_1 : Lexical_Env := Empty_Env;
If_Result : Lexical_Env := Empty_Env;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Symbol_Type;
Map_Result : Symbol_Type_Array_Access;
Unique_Array : Symbol_Type_Array_Access;
Env_Get_Result_1 : Internal_Entity_Array_Access;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Map_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Fld_4 : Boolean;
Not_Val : Boolean;
Map_Result_2 : Internal_Entity_Basic_Decl_Array_Access;
If_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Index_5 : Integer;
Fld_5 : Internal_Entity_Base_Subp_Spec;
Fld_6 : Internal_Entity_Info;
Fld_7 : Internal_Metadata;
Fld_8 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result_2 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Index_7 : Integer;
Fld_9 : Internal_Entity_Info;
Fld_10 : Internal_Metadata;
Fld_11 : Bare_Ada_Node;
Cast_Result_3 : Bare_Base_Type_Decl;
Is_Equal : Boolean;
Not_Val_1 : Boolean;
Fld_12 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_13 : Internal_Entity_Base_Subp_Spec;
Fld_14 : Boolean;
Dyn_Var_Bind_Result : Boolean;
If_Result_3 : Boolean;
As_Entity_1 : Internal_Entity_Base_Type_Decl;
Is_Null_1 : Boolean;
If_Result_4 : Internal_Entity_Base_Type_Decl;
Comp_Result : Boolean;
Fld_15 : Bare_Base_Type_Decl;
Fld_16 : Boolean;
If_Result_5 : Boolean;
Comp_Result_1 : Boolean;
Fld_17 : Bare_Base_Type_Decl;
Fld_18 : Boolean;
If_Result_6 : Boolean;
Fld_19 : Bare_Base_Type_Decl;
Fld_20 : Boolean;
If_Result_7 : Boolean;
Let_Result : Boolean;
If_Result_8 : Boolean;
Let_Result_1 : Boolean;
Quantifier_Result : Boolean;
Not_Val_2 : Boolean;
Let_Result_2 : Boolean;
Let_Result_3 : Boolean;
Map_Result_3 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_4 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_5 : Internal_Entity_Basic_Decl_Array_Access;
Map_Result_4 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_6 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_7 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_587 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Local_Prim_Env);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Local_All_Prim_Names);
                     Dec_Ref (Map_Result_4);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Let_Result_7);
            end Finalizer_Scope_587;
            procedure Finalizer_Scope_2486 is
            begin
                     Dec_Ref (Env_Get_Result_1);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_All_Prims);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Local_Bds);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
            end Finalizer_Scope_2486;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4121 '<Let at nodes.lkt:7275:9>' Let_Result_7 ada/nodes.lkt:7275
--# scope-start
--# expr-start 4068 '<If at nodes.lkt:7276:13>' If_Result ada/nodes.lkt:7276
if Only_Inherited then
   --# expr-start 4066 '<FieldAccess for parent_primitives_env at nodes.lkt:7276:36>' Fld ada/nodes.lkt:7276
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.parent_primitives_env'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Parent_Primitives_Env (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4066
   If_Result := Fld;
else
   --# expr-start 4067 '<FieldAccess for primitives_env at nodes.lkt:7277:18>' Fld_1 ada/nodes.lkt:7277
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.primitives_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Primitives_Env (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4067
   If_Result := Fld_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 4068
Local_Prim_Env := If_Result; Inc_Ref (Local_Prim_Env);
--# bind prim_env Local_Prim_Env
--# expr-start 4120 '<Let at nodes.lkt:7280:9>' Let_Result_6 ada/nodes.lkt:7280
--# scope-start
--# expr-start 4074 '<unique at nodes.lkt:7280:30>' Unique_Array ada/nodes.lkt:7280
--# expr-start 4073 '<Map at nodes.lkt:7280:30>' Map_Result ada/nodes.lkt:7280
   --# expr-start 4069 '<EnvGet at nodes.lkt:7280:30>' Env_Get_Result ada/nodes.lkt:7280
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Local_Prim_Env, Key => Thin (No_Symbol), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 4069
      declare
         Map_Result_Vec : Symbol_Type_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 4072 '<FieldAccess for name_symbol at nodes.lkt:7281:20>' Fld_3 ada/nodes.lkt:7281
--# expr-start 4071 '<FieldAccess for defining_name at nodes.lkt:7281:20>' Fld_2 ada/nodes.lkt:7281
--# expr-start 4070 '<Cast to BasicDecl at nodes.lkt:7281:20>' Cast_Result ada/nodes.lkt:7281
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 4070
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 4071
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_2.Node);
--# end
--# expr-done 4072
         declare
            Item_To_Append : constant Symbol_Type := Fld_3;
         begin
            Symbol_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Symbol_Type_Array
           (Items_Count => Natural (Symbol_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Symbol_Type_Vectors.Get
              (Map_Result_Vec,
               I + Symbol_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Symbol_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4073
Unique_Array := Make_Unique (Map_Result); 
--# expr-done 4074
Local_All_Prim_Names := Unique_Array; Inc_Ref (Local_All_Prim_Names);
--# bind all_prim_names Local_All_Prim_Names
--# expr-start 4119 '<Mapcat at nodes.lkt:7286:9>' Map_Result_4 ada/nodes.lkt:7286
      declare
         Map_Result_4_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Symbol_Type_Array_Access := Local_All_Prim_Names;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind name Item_1
      --# expr-start 4118 '<Let at nodes.lkt:7287:13>' Let_Result_5 ada/nodes.lkt:7287
--# scope-start
--# expr-start 4077 '<Map at nodes.lkt:7287:29>' Map_Result_1 ada/nodes.lkt:7287
   --# expr-start 4075 '<EnvGet at nodes.lkt:7287:29>' Env_Get_Result_1 ada/nodes.lkt:7287
Env_Get_Result_1 := Construct_Entity_Array (AST_Envs.Get (Self => Local_Prim_Env, Key => Thin (Item_1), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 4075
      declare
         Map_Result_1_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result_1;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_2
      --# expr-start 4076 '<Cast to BasicDecl at nodes.lkt:7287:59>' Cast_Result_1 ada/nodes.lkt:7287
Cast_Expr_1 := Item_2; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 4076
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Cast_Result_1;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 4077
Local_All_Prims := Map_Result_1; Inc_Ref (Local_All_Prims);
--# bind all_prims Local_All_Prims
--# expr-start 4117 '<Let at nodes.lkt:7288:13>' Let_Result_4 ada/nodes.lkt:7288
--# scope-start
--# expr-start 4081 '<If at nodes.lkt:7289:17>' If_Result_1 ada/nodes.lkt:7289
if Include_Predefined_Operators then
   If_Result_1 := Local_All_Prims;
else
   --# expr-start 4080 '<Map at nodes.lkt:7291:22>' Map_Result_2 ada/nodes.lkt:7291
      declare
         Map_Result_2_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_All_Prims;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_3
         --# expr-start 4079 '<Not at nodes.lkt:7291:46>' Not_Val ada/nodes.lkt:7291
--# expr-start 4078 '<FieldAccess for is_predefined_operator at nodes.lkt:7291:50>' Fld_4 ada/nodes.lkt:7291
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_predefined_operator
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Is_Predefined_Operator (Node => Item_3.Node);
--# end
--# expr-done 4078
Not_Val := not (Fld_4); 
--# expr-done 4079
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Item_3;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 4080
   If_Result_1 := Map_Result_2;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 4081
Local_Bds := If_Result_1; Inc_Ref (Local_Bds);
--# bind bds Local_Bds
--# expr-start 4116 '<Map at nodes.lkt:7293:13>' Map_Result_3 ada/nodes.lkt:7293
      declare
         Map_Result_3_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
         Index_5 := 0;
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Bds;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind a Item_4
               --# bind i Index_5
         --# expr-start 4115 '<Let at nodes.lkt:7294:17>' Let_Result_3 ada/nodes.lkt:7294
--# scope-start
--# expr-start 4082 '<FieldAccess for subp_spec_or_null at nodes.lkt:7294:30>' Fld_5 ada/nodes.lkt:7294
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Item_4.Node, E_Info => Item_4.Info);
--# end
--# expr-done 4082
Local_A_Spec := Fld_5; 
--# bind a_spec Local_A_Spec
--# expr-start 4114 '<Let at nodes.lkt:7295:17>' Let_Result_2 ada/nodes.lkt:7295
--# scope-start
--# expr-start 4087 '<Cast to BaseTypeDecl at nodes.lkt:7296:21>' Cast_Result_2 ada/nodes.lkt:7296
--# expr-start 4086 '<as_bare_entity at nodes.lkt:7296:21>' If_Result_2 ada/nodes.lkt:7296
--# expr-start 4085 '<FieldAccess for primitive at nodes.lkt:7296:21>' Fld_8 ada/nodes.lkt:7296
--# expr-start 4084 '<FieldAccess for md at nodes.lkt:7296:21>' Fld_7 ada/nodes.lkt:7296
--# expr-start 4083 '<FieldAccess for info at nodes.lkt:7296:21>' Fld_6 ada/nodes.lkt:7296
Fld_6 := Item_4.Info;
--# expr-done 4083
Fld_7 := Fld_6.Md;
--# expr-done 4084
Fld_8 := Fld_7.Primitive;
--# expr-done 4085
Is_Null := Fld_8 = null; 
if Is_Null then
   If_Result_2 := No_Entity;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_8); 
   If_Result_2 := As_Entity;
end if;
--# expr-done 4086
   if If_Result_2.Node = null
      or else If_Result_2.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => If_Result_2.Node,
         Info => If_Result_2.Info);
   else
         Cast_Result_2 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 4087
Local_A_Prim := Cast_Result_2; 
--# bind a_prim Local_A_Prim
--# expr-start 4113 '<Not at nodes.lkt:7301:17>' Not_Val_2 ada/nodes.lkt:7301
--# expr-start 4112 '<AnyQuantifier at nodes.lkt:7301:21>' Quantifier_Result ada/nodes.lkt:7301
      Quantifier_Result := False;
         Index_7 := 0;
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Bds;
      begin
         for Item_6 of
               Collection.Items
         loop
   --# scope-start
               --# bind b Item_6
               --# bind j Index_7
      --# expr-start 4111 '<Let at nodes.lkt:7302:21>' Let_Result_1 ada/nodes.lkt:7302
--# scope-start
--# expr-start 4091 '<Cast to BaseTypeDecl at nodes.lkt:7302:34>' Cast_Result_3 ada/nodes.lkt:7302
--# expr-start 4090 '<FieldAccess for primitive at nodes.lkt:7302:34>' Fld_11 ada/nodes.lkt:7302
--# expr-start 4089 '<FieldAccess for md at nodes.lkt:7302:34>' Fld_10 ada/nodes.lkt:7302
--# expr-start 4088 '<FieldAccess for info at nodes.lkt:7302:34>' Fld_9 ada/nodes.lkt:7302
Fld_9 := Item_6.Info;
--# expr-done 4088
Fld_10 := Fld_9.Md;
--# expr-done 4089
Fld_11 := Fld_10.Primitive;
--# expr-done 4090
   if Fld_11 = null
      or else Fld_11.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_3 := Fld_11;
   else
         Cast_Result_3 := No_Bare_Ada_Node;
   end if;
--# expr-done 4091
Local_B_Prim := Cast_Result_3; 
--# bind b_prim Local_B_Prim
--# expr-start 4110 '<BooleanBinaryOp And at nodes.lkt:7304:21>' If_Result_8 ada/nodes.lkt:7304
--# expr-start 4098 '<BooleanBinaryOp And at nodes.lkt:7304:21>' If_Result_3 ada/nodes.lkt:7304
--# expr-start 4093 '<Not at nodes.lkt:7304:22>' Not_Val_1 ada/nodes.lkt:7304
--# expr-start 4092 '<Eq at nodes.lkt:7304:22>' Is_Equal ada/nodes.lkt:7304
Is_Equal := Index_5 = Index_7; 
--# expr-done 4092
Not_Val_1 := not (Is_Equal); 
--# expr-done 4093
if Not_Val_1 then
   --# expr-start 4097 '<bind at nodes.lkt:7308:25>' Dyn_Var_Bind_Result ada/nodes.lkt:7308
--# expr-start 4094 '<FieldAccess for origin_node at nodes.lkt:7308:39>' Fld_12 ada/nodes.lkt:7308
      if Item_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_12 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Item_6.Node);
--# end
--# expr-done 4094
Bound_Origin := Fld_12; 
--# expr-start 4096 '<FieldAccess for match_signature at nodes.lkt:7310:25>' Fld_14 ada/nodes.lkt:7310
      if Local_A_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4095 '<FieldAccess for subp_spec_or_null at nodes.lkt:7311:29>' Fld_13 ada/nodes.lkt:7311
      if Item_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_13 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Item_6.Node, E_Info => Item_6.Info);
--# end
--# expr-done 4095
--# property-call-start BaseSubpSpec.match_signature
Fld_14 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Local_A_Spec.Node, Other => Fld_13, Match_Name => False, Use_Entity_Info => True, Origin => Bound_Origin, E_Info => Local_A_Spec.Info);
--# end
--# expr-done 4096
Dyn_Var_Bind_Result := Fld_14; 
--# expr-done 4097
   If_Result_3 := Dyn_Var_Bind_Result;
else
   If_Result_3 := False;
end if;
--# expr-done 4098
if If_Result_3 then
   --# expr-start 4109 '<Let at nodes.lkt:7317:25>' Let_Result ada/nodes.lkt:7317
--# scope-start
--# expr-start 4099 '<as_bare_entity at nodes.lkt:7317:42>' If_Result_4 ada/nodes.lkt:7317
Is_Null_1 := Local_B_Prim = null; 
if Is_Null_1 then
   If_Result_4 := No_Entity_Base_Type_Decl;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Local_B_Prim); 
   If_Result_4 := As_Entity_1;
end if;
--# expr-done 4099
Local_B_Prim_Ent := If_Result_4; 
--# bind b_prim_ent Local_B_Prim_Ent
--# expr-start 4108 '<If at nodes.lkt:7322:25>' If_Result_7 ada/nodes.lkt:7322
--# expr-start 4101 '<FieldAccess for has_base_type at nodes.lkt:7322:28>' Fld_20 ada/nodes.lkt:7322
      if Local_A_Prim.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4100 '<FieldAccess for node at nodes.lkt:7322:49>' Fld_19 ada/nodes.lkt:7322
Fld_19 := Local_B_Prim_Ent.Node;
--# expr-done 4100
--# property-call-start BaseTypeDecl.has_base_type
Fld_20 := Libadalang.Implementation.Base_Type_Decl_P_Has_Base_Type (Node => Local_A_Prim.Node, Target => Fld_19, E_Info => Local_A_Prim.Info);
--# end
--# expr-done 4101
if Fld_20 then
   --# expr-start 4104 '<BooleanBinaryOp And at nodes.lkt:7333:29>' If_Result_5 ada/nodes.lkt:7333
Comp_Result := Index_5 < Index_7; 
if Comp_Result then
   --# expr-start 4103 '<FieldAccess for has_base_type at nodes.lkt:7334:33>' Fld_16 ada/nodes.lkt:7334
      if Local_B_Prim_Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4102 '<FieldAccess for node at nodes.lkt:7335:33>' Fld_15 ada/nodes.lkt:7335
Fld_15 := Local_A_Prim.Node;
--# expr-done 4102
--# property-call-start BaseTypeDecl.has_base_type
Fld_16 := Libadalang.Implementation.Base_Type_Decl_P_Has_Base_Type (Node => Local_B_Prim_Ent.Node, Target => Fld_15, E_Info => Local_B_Prim_Ent.Info);
--# end
--# expr-done 4103
   If_Result_5 := Fld_16;
else
   If_Result_5 := False;
end if;
--# expr-done 4104
   If_Result_7 := If_Result_5;
else
   --# expr-start 4107 '<BooleanBinaryOp Or at nodes.lkt:7351:29>' If_Result_6 ada/nodes.lkt:7351
Comp_Result_1 := Index_5 > Index_7; 
if Comp_Result_1 then
   If_Result_6 := True;
else
   --# expr-start 4106 '<FieldAccess for has_base_type at nodes.lkt:7352:32>' Fld_18 ada/nodes.lkt:7352
      if Local_B_Prim_Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4105 '<FieldAccess for node at nodes.lkt:7353:33>' Fld_17 ada/nodes.lkt:7353
Fld_17 := Local_A_Prim.Node;
--# expr-done 4105
--# property-call-start BaseTypeDecl.has_base_type
Fld_18 := Libadalang.Implementation.Base_Type_Decl_P_Has_Base_Type (Node => Local_B_Prim_Ent.Node, Target => Fld_17, E_Info => Local_B_Prim_Ent.Info);
--# end
--# expr-done 4106
   If_Result_6 := Fld_18;
end if;
--# expr-done 4107
   If_Result_7 := If_Result_6;
end if;
--# expr-done 4108
Let_Result := If_Result_7; 
--# end
--# expr-done 4109
   If_Result_8 := Let_Result;
else
   If_Result_8 := False;
end if;
--# expr-done 4110
Let_Result_1 := If_Result_8; 
--# end
--# expr-done 4111
      Quantifier_Result := Let_Result_1;
   --# end
               exit when Quantifier_Result;
               Index_7 := Index_7 + 1;
         end loop;
      end;
--# expr-done 4112
Not_Val_2 := not (Quantifier_Result); 
--# expr-done 4113
Let_Result_2 := Not_Val_2; 
--# end
--# expr-done 4114
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 4115
         if Let_Result_3 then
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Item_4;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
         end if;
   --# end
               Index_5 := Index_5 + 1;
         end loop;
      end;
         Map_Result_3 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 4116
Let_Result_4 := Map_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 4117
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 4118
         for Item_To_Append of
               Let_Result_5.Items
         loop
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_4_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2486;
         end loop;
      end;
         Map_Result_4 := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_4_Vec)));
         for I in Map_Result_4.Items'Range loop
            Map_Result_4.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_4_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result_4.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_4_Vec);
      end;
--# expr-done 4119
Let_Result_6 := Map_Result_4; Inc_Ref (Let_Result_6);
--# end
--# expr-done 4120
Let_Result_7 := Let_Result_6; Inc_Ref (Let_Result_7);
--# end
--# expr-done 4121
         Property_Result := Let_Result_7;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_587;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_587;
                     Finalizer_Scope_2486;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Get_Primitives;
--# end
--# property-start BaseTypeDecl.is_array_type ada/nodes.lkt:7365
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Array_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4122 '<FieldAccess for is_array at nodes.lkt:7365:33>' Fld ada/nodes.lkt:7365
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_array
Fld := Libadalang.Implementation.Basic_Decl_P_Is_Array (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4122
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Array_Type;
--# end
--# property-start BaseTypeDecl.find_derived_types ada/nodes.lkt:7370
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Find_Derived_Types
  (Node : Bare_Base_Type_Decl
      ; Root : Internal_Entity
      ; Origin : Bare_Ada_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind root Root
   --# bind origin Origin
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Type_Decl_Array_Access;
            procedure Finalizer_Scope_589 with Inline_Always;
            procedure Finalizer_Scope_2491 with Inline_Always;
            procedure Finalizer_Scope_2493 with Inline_Always;
            procedure Finalizer_Scope_2494 with Inline_Always;
            procedure Finalizer_Scope_2495 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Array_Access;
Var_Expr_3 : Internal_Entity_Type_Decl;
Var_Expr_4 : Boolean;
Fld : Internal_Entity_Array_Access;
Is_Null : Boolean;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Ada_Node;
Is_Equal : Boolean;
If_Result : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Array_Access;
Fld_2 : Internal_Entity_Type_Decl_Array_Access;
Map_Result_1 : Internal_Entity_Type_Decl_Array_Access;
Scope_Result : Internal_Entity_Type_Decl_Array_Access;
Result_Var : Internal_Entity_Type_Decl_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result_1 : Internal_Entity_Type_Decl;
Fld_3 : Boolean;
Array_Lit : Internal_Entity_Type_Decl_Array_Access;
Scope_Result_1 : Internal_Entity_Type_Decl_Array_Access;
Result_Var_1 : Internal_Entity_Type_Decl_Array_Access;
Scope_Result_2 : Internal_Entity_Type_Decl_Array_Access;
Result_Var_2 : Internal_Entity_Type_Decl_Array_Access;
Concat_Result : Internal_Entity_Type_Decl_Array_Access;
            procedure Finalizer_Scope_589 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_589;
            procedure Finalizer_Scope_2491 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_2491;
            procedure Finalizer_Scope_2493 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2493;
            procedure Finalizer_Scope_2494 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_2494;
            procedure Finalizer_Scope_2495 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2495;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 4123 '<children at nodes.lkt:7372:9>' Fld ada/nodes.lkt:7372
      if Root.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children (Node => Root.Node, E_Info => Root.Info);
--# expr-done 4123
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= No_Internal_Entity_Array_Type then
   --# scope-start
   --# bind c Var_Expr_0
--# expr-start 4131 '<Mapcat at nodes.lkt:7374:13>' Map_Result_1 ada/nodes.lkt:7374
   --# expr-start 4129 '<Map at nodes.lkt:7374:13>' Map_Result ada/nodes.lkt:7374
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Var_Expr_0;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_1
         --# expr-start 4128 '<Not at nodes.lkt:7374:29>' Not_Val ada/nodes.lkt:7374
--# expr-start 4127 '<BooleanBinaryOp Or at nodes.lkt:7374:34>' If_Result ada/nodes.lkt:7374
--# expr-start 4124 '<IsNull at nodes.lkt:7374:34>' Is_Null ada/nodes.lkt:7374
Is_Null := Item_1.Node = null; 
--# expr-done 4124
if Is_Null then
   If_Result := True;
else
   --# expr-start 4126 '<Eq at nodes.lkt:7374:47>' Is_Equal ada/nodes.lkt:7374
--# expr-start 4125 '<FieldAccess for node at nodes.lkt:7374:47>' Fld_1 ada/nodes.lkt:7374
Fld_1 := Item_1.Node;
--# expr-done 4125
      Cast_Result := Fld_1;
Is_Equal := Cast_Result = Origin; 
--# expr-done 4126
   If_Result := Is_Equal;
end if;
--# expr-done 4127
Not_Val := not (If_Result); 
--# expr-done 4128
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity := Item_1;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4129
      declare
         Map_Result_1_Vec : Internal_Entity_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_2
      --# expr-start 4130 '<FieldAccess for find_derived_types at nodes.lkt:7375:24>' Fld_2 ada/nodes.lkt:7375
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.find_derived_types
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Find_Derived_Types (Node => Ent.Node, Root => Item_2, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 4130
         for Item_To_Append of
               Fld_2.Items
         loop
            Internal_Entity_Type_Decl_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2493;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Type_Decl_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Type_Decl_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Type_Decl_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Type_Decl_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 4131
Scope_Result := Map_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2491;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
--# expr-start 4132 '<Cast to TypeDecl at nodes.lkt:7378:11>' Cast_Result_1 ada/nodes.lkt:7378
Cast_Expr := Root; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Type_Decl;
   end if;
--# expr-done 4132
Var_Expr_3 := Cast_Result_1;
if Var_Expr_3 /= No_Entity_Type_Decl then
   --# scope-start
   --# bind type_decl Var_Expr_3
--# expr-start 4133 '<FieldAccess for is_derived_type at nodes.lkt:7380:13>' Fld_3 ada/nodes.lkt:7380
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_derived_type
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Is_Derived_Type (Node => Var_Expr_3.Node, Other_Type => Ent, Origin => Origin, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 4133
Var_Expr_4 := Fld_3;
if Var_Expr_4 /= False then
   --# scope-start
   --# bind _ Var_Expr_4
--# expr-start 4134 '<ArrayLiteral at nodes.lkt:7380:55>' Array_Lit ada/nodes.lkt:7380
Array_Lit := Create_Internal_Entity_Type_Decl_Array (Internal_Internal_Entity_Type_Decl_Array'(1 => Var_Expr_3)); 
--# expr-done 4134
Scope_Result_1 := Array_Lit;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2495;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Scope_Result_2 := Result_Var_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2494;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Internal_Entity_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
Concat_Result := Concat (Result_Var, Result_Var_2); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_589;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_589;
                     Finalizer_Scope_2491;
                     Finalizer_Scope_2493;
                     Finalizer_Scope_2494;
                     Finalizer_Scope_2495;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Find_Derived_Types;
--# end
--# property-start BaseTypeDecl.synthetic_object_decl_env_assoc ada/nodes.lkt:7389
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_F_Synthetic_Object_Decl_Env_Assoc
  (Node : Bare_Base_Type_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_590 with Inline_Always;
      Var_Expr : Bare_Type_Expr;
Fld : Symbol_Type;
Fld_1 : Bare_Defining_Name;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Type_Expr;
Fld_3 : Bare_Type_Expr;
Scope_Result : Bare_Type_Expr;
New_Node : Bare_Synthetic_Type_Expr;
Cast_Result : Bare_Type_Expr;
Result_Var : Bare_Type_Expr;
New_Node_1 : Bare_Synthetic_Object_Decl;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Result_1 : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_590 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_590;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Base_Type_Decl_Lf_State_Synthetic_Object_Decl_Env_Assoc is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Base_Type_Decl_Lf_Stg_Synthetic_Object_Decl_Env_Assoc;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Base_Type_Decl_Lf_State_Synthetic_Object_Decl_Env_Assoc,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4143 '<New EnvAssoc at nodes.lkt:7390:9>' New_Struct_1 ada/nodes.lkt:7390
--# expr-start 4135 '<New DesignatedEnv at nodes.lkt:7405:22>' New_Struct ada/nodes.lkt:7405
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 4135
--# expr-start 4136 '<FieldAccess for name_symbol at nodes.lkt:7391:17>' Fld ada/nodes.lkt:7391
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 4136
--# expr-start 4142 '<New SyntheticObjectDecl at nodes.lkt:7397:19>' New_Node_1 ada/nodes.lkt:7397
--# expr-start 4137 '<FieldAccess for name at nodes.lkt:7398:22>' Fld_1 ada/nodes.lkt:7398
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Base_Type_Decl_F_Name;
--# expr-done 4137
--# expr-start 4140 '<FieldAccess for node at nodes.lkt:7402:27>' Fld_3 ada/nodes.lkt:7402
--# expr-start 4139 '<FieldAccess for type_expression at nodes.lkt:7402:27>' Fld_2 ada/nodes.lkt:7402
--# expr-start 4138 '<as_bare_entity at nodes.lkt:7402:27>' If_Result ada/nodes.lkt:7402
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 4138
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 4139
Fld_3 := Fld_2.Node;
--# expr-done 4140
Var_Expr := Fld_3;
if Var_Expr /= No_Bare_Ada_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
--# expr-start 4141 '<New SyntheticTypeExpr at nodes.lkt:7403:21>' New_Node ada/nodes.lkt:7403
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Self = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "SyntheticTypeExpr.target_type cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Type_Expr);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Synthetic_Type_Expr
     (Self => New_Node,
      Synthetic_Type_Expr_F_Target_Type => Self);
--# expr-done 4141
      Cast_Result := New_Node;
   Result_Var := Cast_Result;
end if;
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
New_Node_1 := new Root_Node_Record
  (Ada_Synthetic_Object_Decl);
Initialize
  (Self => New_Node_1,
   Kind => Ada_Synthetic_Object_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node_1);
      New_Node_1.Synthetic_Object_Decl_Name :=
         Fld_1;
      New_Node_1.Synthetic_Object_Decl_Type_Expr :=
         Result_Var;
--# expr-done 4142
      Cast_Result_1 := New_Node_1;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result_1); 
--# expr-done 4143
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_590;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_590;
               Self.Bare_Base_Type_Decl_Lf_State_Synthetic_Object_Decl_Env_Assoc :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Base_Type_Decl_Lf_State_Synthetic_Object_Decl_Env_Assoc := Initialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Synthetic_Object_Decl_Env_Assoc := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Base_Type_Decl_F_Synthetic_Object_Decl_Env_Assoc;
--# end
--# property-start BaseTypeDecl.is_scalar_type ada/nodes.lkt:7416
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Scalar_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
Fld_2 : Boolean;
If_Result_1 : Boolean;
Fld_3 : Boolean;
If_Result_2 : Boolean;
Fld_4 : Boolean;
If_Result_3 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4152 '<BooleanBinaryOp Or at nodes.lkt:7417:9>' If_Result_3 ada/nodes.lkt:7417
--# expr-start 4150 '<BooleanBinaryOp Or at nodes.lkt:7418:13>' If_Result_2 ada/nodes.lkt:7418
--# expr-start 4148 '<BooleanBinaryOp Or at nodes.lkt:7419:17>' If_Result_1 ada/nodes.lkt:7419
--# expr-start 4146 '<BooleanBinaryOp Or at nodes.lkt:7419:18>' If_Result ada/nodes.lkt:7419
--# expr-start 4144 '<FieldAccess for is_int_type at nodes.lkt:7419:18>' Fld ada/nodes.lkt:7419
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_int_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Int_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4144
if Fld then
   If_Result := True;
else
   --# expr-start 4145 '<FieldAccess for is_real_type at nodes.lkt:7419:40>' Fld_1 ada/nodes.lkt:7419
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_real_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Real_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4145
   If_Result := Fld_1;
end if;
--# expr-done 4146
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 4147 '<FieldAccess for is_float_type at nodes.lkt:7420:20>' Fld_2 ada/nodes.lkt:7420
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_float_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Float_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4147
   If_Result_1 := Fld_2;
end if;
--# expr-done 4148
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 4149 '<FieldAccess for is_fixed_point at nodes.lkt:7422:16>' Fld_3 ada/nodes.lkt:7422
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_fixed_point'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Fixed_Point (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4149
   If_Result_2 := Fld_3;
end if;
--# expr-done 4150
if If_Result_2 then
   If_Result_3 := True;
else
   --# expr-start 4151 '<FieldAccess for is_enum_type at nodes.lkt:7424:12>' Fld_4 ada/nodes.lkt:7424
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_enum_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Enum_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4151
   If_Result_3 := Fld_4;
end if;
--# expr-done 4152
         Property_Result := If_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Scalar_Type;
--# end
--# property-start BaseTypeDecl.is_implicit_deref ada/nodes.lkt:7428
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Implicit_Deref
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Access_Def;
Fld : Internal_Entity_Access_Def;
Is_A : Boolean;
Not_Val : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Fld_1 : Internal_Entity_Expr;
Is_Null : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4159 '<BooleanBinaryOp Or at nodes.lkt:7429:9>' If_Result ada/nodes.lkt:7429
--# expr-start 4153 '<FieldAccess for access_def at nodes.lkt:7429:9>' Fld ada/nodes.lkt:7429
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4153
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Access_Def then
   --# scope-start
   --# bind d Var_Expr_0
--# expr-start 4155 '<Not at nodes.lkt:7429:37>' Not_Val ada/nodes.lkt:7429
--# expr-start 4154 '<IsA AccessToSubpDef at nodes.lkt:7429:41>' Is_A ada/nodes.lkt:7429
Is_A := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Access_To_Subp_Def_Range; 
--# expr-done 4154
Not_Val := not (Is_A); 
--# expr-done 4155
Scope_Result := Not_Val;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   If_Result := True;
else
   --# expr-start 4158 '<Not at nodes.lkt:7430:12>' Not_Val_1 ada/nodes.lkt:7430
--# expr-start 4157 '<IsNull at nodes.lkt:7430:16>' Is_Null ada/nodes.lkt:7430
--# expr-start 4156 '<FieldAccess for get_imp_deref at nodes.lkt:7430:16>' Fld_1 ada/nodes.lkt:7430
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4156
Is_Null := Fld_1.Node = null; 
--# expr-done 4157
Not_Val_1 := not (Is_Null); 
--# expr-done 4158
   If_Result := Not_Val_1;
end if;
--# expr-done 4159
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Implicit_Deref;
--# end
--# property-start BaseTypeDecl.specific_type ada/nodes.lkt:7441
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Specific_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Classwide_Type_Decl;
Match_1 : Internal_Entity_Base_Subtype_Decl;
Local_Bt : Internal_Entity_Base_Type_Decl;
Match_2 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity_Classwide_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity_Base_Subtype_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity_Base_Type_Decl;
Let_Result_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4167 '<Match at nodes.lkt:7441:49>' Match_Result ada/nodes.lkt:7441
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Classwide_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Classwide_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind cw Match_0
--# expr-start 4161 '<FieldAccess for specific_type at nodes.lkt:7444:39>' Fld_1 ada/nodes.lkt:7444
--# expr-start 4160 '<FieldAccess for type_decl at nodes.lkt:7444:39>' Fld ada/nodes.lkt:7444
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 4160
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4161
Let_Result_1 := Fld_1; 
--# end
Scope_Result := Let_Result_1;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Base_Subtype_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind bt Match_1
--# expr-start 4166 '<Let at nodes.lkt:7447:17>' Let_Result ada/nodes.lkt:7447
--# scope-start
--# expr-start 4162 '<FieldAccess for base_subtype at nodes.lkt:7447:26>' Fld_2 ada/nodes.lkt:7447
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Match_1.Node, Origin => No_Bare_Ada_Node, E_Info => Match_1.Info);
--# end
--# expr-done 4162
Local_Bt := Fld_2; 
--# bind bt Local_Bt
--# expr-start 4165 '<If at nodes.lkt:7451:17>' If_Result ada/nodes.lkt:7451
--# expr-start 4163 '<Eq at nodes.lkt:7451:20>' Is_Equiv ada/nodes.lkt:7451
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Local_Bt; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 4163
if Is_Equiv then
   If_Result := Ent;
else
   --# expr-start 4164 '<FieldAccess for specific_type at nodes.lkt:7451:46>' Fld_3 ada/nodes.lkt:7451
      if Local_Bt.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Local_Bt.Node, E_Info => Local_Bt.Info);
--# end
--# expr-done 4164
   If_Result := Fld_3;
end if;
--# expr-done 4165
Let_Result := If_Result; 
--# end
--# expr-done 4166
Let_Result_2 := Let_Result; 
--# end
Scope_Result_1 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Incomplete_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind _ Match_2
Let_Result_3 := Ent; 
--# end
Scope_Result_2 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 4167
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Specific_Type;
--# end
--# property-start BaseTypeDecl.derefed_type ada/nodes.lkt:7459
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Derefed_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Fld_1 : Internal_Entity_Expr;
Is_Null_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4173 '<If at nodes.lkt:7460:9>' If_Result_1 ada/nodes.lkt:7460
--# expr-start 4171 '<BooleanBinaryOp Or at nodes.lkt:7460:12>' If_Result ada/nodes.lkt:7460
--# expr-start 4168 '<IsNull at nodes.lkt:7460:12>' Is_Null ada/nodes.lkt:7460
Is_Null := Ent.Node = null; 
--# expr-done 4168
if Is_Null then
   If_Result := True;
else
   --# expr-start 4170 '<IsNull at nodes.lkt:7460:28>' Is_Null_1 ada/nodes.lkt:7460
--# expr-start 4169 '<FieldAccess for get_imp_deref at nodes.lkt:7460:28>' Fld_1 ada/nodes.lkt:7460
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4169
Is_Null_1 := Fld_1.Node = null; 
--# expr-done 4170
   If_Result := Is_Null_1;
end if;
--# expr-done 4171
if If_Result then
   If_Result_1 := Ent;
else
   --# expr-start 4172 '<FieldAccess for accessed_type at nodes.lkt:7461:14>' Fld ada/nodes.lkt:7461
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4172
   If_Result_1 := Fld;
end if;
--# expr-done 4173
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Derefed_Type;
--# end
--# property-start BaseTypeDecl.derefed_base_subtype ada/nodes.lkt:7467
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Derefed_Base_Subtype
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Expr;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4181 '<If at nodes.lkt:7468:9>' If_Result_1 ada/nodes.lkt:7468
--# expr-start 4174 '<IsNull at nodes.lkt:7468:12>' Is_Null_1 ada/nodes.lkt:7468
Is_Null_1 := Ent.Node = null; 
--# expr-done 4174
if Is_Null_1 then
   If_Result_1 := Ent;
else
   --# expr-start 4180 '<FieldAccess for base_subtype at nodes.lkt:7470:13>' Fld_2 ada/nodes.lkt:7470
--# expr-start 4179 '<If at nodes.lkt:7471:17>' If_Result ada/nodes.lkt:7471
--# expr-start 4177 '<Not at nodes.lkt:7471:20>' Not_Val ada/nodes.lkt:7471
--# expr-start 4176 '<IsNull at nodes.lkt:7471:24>' Is_Null ada/nodes.lkt:7471
--# expr-start 4175 '<FieldAccess for get_imp_deref at nodes.lkt:7471:24>' Fld_1 ada/nodes.lkt:7471
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4175
Is_Null := Fld_1.Node = null; 
--# expr-done 4176
Not_Val := not (Is_Null); 
--# expr-done 4177
if Not_Val then
   --# expr-start 4178 '<FieldAccess for accessed_type at nodes.lkt:7471:58>' Fld ada/nodes.lkt:7471
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4178
   If_Result := Fld;
else
   If_Result := Ent;
end if;
--# expr-done 4179
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => If_Result.Node, Origin => Origin, E_Info => If_Result.Info);
--# end
--# expr-done 4180
   If_Result_1 := Fld_2;
end if;
--# expr-done 4181
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Derefed_Base_Subtype;
--# end
--# property-start BaseTypeDecl.array_concat_result_type ada/nodes.lkt:7480
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Array_Concat_Result_Type
  (Node : Bare_Base_Type_Decl
      ; Other : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_5 : Boolean;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Is_Null_1 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4197 '<If at nodes.lkt:7483:9>' If_Result_5 ada/nodes.lkt:7483
--# expr-start 4184 '<BooleanBinaryOp Or at nodes.lkt:7483:12>' If_Result_4 ada/nodes.lkt:7483
--# expr-start 4182 '<IsNull at nodes.lkt:7483:12>' Is_Null ada/nodes.lkt:7483
Is_Null := Ent.Node = null; 
--# expr-done 4182
if Is_Null then
   If_Result_4 := True;
else
   --# expr-start 4183 '<IsNull at nodes.lkt:7483:28>' Is_Null_1 ada/nodes.lkt:7483
Is_Null_1 := Other.Node = null; 
--# expr-done 4183
   If_Result_4 := Is_Null_1;
end if;
--# expr-done 4184
if If_Result_4 then
   If_Result_5 := No_Entity_Base_Type_Decl;
else
   --# expr-start 4196 '<If at nodes.lkt:7483:9>' If_Result_3 ada/nodes.lkt:7483
--# expr-start 4188 '<BooleanBinaryOp Or at nodes.lkt:7485:13>' If_Result_2 ada/nodes.lkt:7485
--# expr-start 4185 '<FieldAccess for matching_formal_type at nodes.lkt:7485:13>' Fld_5 ada/nodes.lkt:7485
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Other.Node, Formal_Type => Ent, Origin => Origin, E_Info => Other.Info);
--# end
--# expr-done 4185
if Fld_5 then
   If_Result_2 := True;
else
   --# expr-start 4187 '<FieldAccess for matching_formal_type at nodes.lkt:7486:16>' Fld_7 ada/nodes.lkt:7486
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4186 '<FieldAccess for comp_type at nodes.lkt:7486:43>' Fld_6 ada/nodes.lkt:7486
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_6 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4186
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Other.Node, Formal_Type => Fld_6, Origin => Origin, E_Info => Other.Info);
--# end
--# expr-done 4187
   If_Result_2 := Fld_7;
end if;
--# expr-done 4188
if If_Result_2 then
   --# expr-start 4189 '<FieldAccess for derefed_base_subtype at nodes.lkt:7487:14>' Fld ada/nodes.lkt:7487
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.derefed_base_subtype
Fld := Libadalang.Implementation.Base_Type_Decl_P_Derefed_Base_Subtype (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4189
   If_Result_3 := Fld;
else
   --# expr-start 4195 '<If at nodes.lkt:7483:9>' If_Result_1 ada/nodes.lkt:7483
--# expr-start 4193 '<BooleanBinaryOp Or at nodes.lkt:7489:13>' If_Result ada/nodes.lkt:7489
--# expr-start 4190 '<FieldAccess for matching_formal_type at nodes.lkt:7489:13>' Fld_2 ada/nodes.lkt:7489
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Ent.Node, Formal_Type => Other, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4190
if Fld_2 then
   If_Result := True;
else
   --# expr-start 4192 '<FieldAccess for matching_formal_type at nodes.lkt:7490:16>' Fld_4 ada/nodes.lkt:7490
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4191 '<FieldAccess for comp_type at nodes.lkt:7490:42>' Fld_3 ada/nodes.lkt:7490
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Other.Node, Origin => Origin, E_Info => Other.Info);
--# end
--# expr-done 4191
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Ent.Node, Formal_Type => Fld_3, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4192
   If_Result := Fld_4;
end if;
--# expr-done 4193
if If_Result then
   --# expr-start 4194 '<FieldAccess for derefed_base_subtype at nodes.lkt:7491:14>' Fld_1 ada/nodes.lkt:7491
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.derefed_base_subtype
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Derefed_Base_Subtype (Node => Other.Node, Origin => Origin, E_Info => Other.Info);
--# end
--# expr-done 4194
   If_Result_1 := Fld_1;
else
   If_Result_1 := No_Entity_Base_Type_Decl;
end if;
--# expr-done 4195
   If_Result_3 := If_Result_1;
end if;
--# expr-done 4196
   If_Result_5 := If_Result_3;
end if;
--# expr-done 4197
         Property_Result := If_Result_5;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Array_Concat_Result_Type;
--# end
--# property-start BaseTypeDecl.expected_array_concat_operand_type ada/nodes.lkt:7501
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Expected_Array_Concat_Operand_Type
  (Node : Bare_Base_Type_Decl
      ; Operand_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind operand_type Operand_Type
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Is_Null_1 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4207 '<If at nodes.lkt:7504:9>' If_Result_3 ada/nodes.lkt:7504
--# expr-start 4200 '<BooleanBinaryOp Or at nodes.lkt:7504:12>' If_Result_2 ada/nodes.lkt:7504
--# expr-start 4198 '<IsNull at nodes.lkt:7504:12>' Is_Null ada/nodes.lkt:7504
Is_Null := Ent.Node = null; 
--# expr-done 4198
if Is_Null then
   If_Result_2 := True;
else
   --# expr-start 4199 '<IsNull at nodes.lkt:7504:28>' Is_Null_1 ada/nodes.lkt:7504
Is_Null_1 := Operand_Type.Node = null; 
--# expr-done 4199
   If_Result_2 := Is_Null_1;
end if;
--# expr-done 4200
if If_Result_2 then
   If_Result_3 := No_Entity_Base_Type_Decl;
else
   --# expr-start 4206 '<If at nodes.lkt:7504:9>' If_Result_1 ada/nodes.lkt:7504
--# expr-start 4204 '<BooleanBinaryOp Or at nodes.lkt:7506:13>' If_Result ada/nodes.lkt:7506
--# expr-start 4201 '<FieldAccess for matching_formal_type at nodes.lkt:7506:13>' Fld_1 ada/nodes.lkt:7506
      if Operand_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Operand_Type.Node, Formal_Type => Ent, Origin => Origin, E_Info => Operand_Type.Info);
--# end
--# expr-done 4201
if Fld_1 then
   If_Result := True;
else
   --# expr-start 4203 '<FieldAccess for matching_formal_type at nodes.lkt:7507:16>' Fld_3 ada/nodes.lkt:7507
      if Operand_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4202 '<FieldAccess for comp_type at nodes.lkt:7507:50>' Fld_2 ada/nodes.lkt:7507
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4202
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Operand_Type.Node, Formal_Type => Fld_2, Origin => Origin, E_Info => Operand_Type.Info);
--# end
--# expr-done 4203
   If_Result := Fld_3;
end if;
--# expr-done 4204
if If_Result then
   --# expr-start 4205 '<FieldAccess for derefed_base_subtype at nodes.lkt:7508:14>' Fld ada/nodes.lkt:7508
      if Operand_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.derefed_base_subtype
Fld := Libadalang.Implementation.Base_Type_Decl_P_Derefed_Base_Subtype (Node => Operand_Type.Node, Origin => Origin, E_Info => Operand_Type.Info);
--# end
--# expr-done 4205
   If_Result_1 := Fld;
else
   If_Result_1 := No_Entity_Base_Type_Decl;
end if;
--# expr-done 4206
   If_Result_3 := If_Result_1;
end if;
--# expr-done 4207
         Property_Result := If_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Expected_Array_Concat_Operand_Type;
--# end
--# property-start BaseTypeDecl.is_non_null_char_type ada/nodes.lkt:7512
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Non_Null_Char_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Fld : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4211 '<BooleanBinaryOp And at nodes.lkt:7513:9>' If_Result ada/nodes.lkt:7513
--# expr-start 4209 '<Not at nodes.lkt:7513:9>' Not_Val ada/nodes.lkt:7513
--# expr-start 4208 '<IsNull at nodes.lkt:7513:13>' Is_Null ada/nodes.lkt:7513
Is_Null := Self = null; 
--# expr-done 4208
Not_Val := not (Is_Null); 
--# expr-done 4209
if Not_Val then
   --# expr-start 4210 '<FieldAccess for is_char_type at nodes.lkt:7513:30>' Fld ada/nodes.lkt:7513
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_char_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Char_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4210
   If_Result := Fld;
else
   If_Result := False;
end if;
--# expr-done 4211
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Non_Null_Char_Type;
--# end
--# property-start BaseTypeDecl.scalar_base_type ada/nodes.lkt:7515
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Scalar_Base_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Discrete_Base_Subtype_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Discrete_Base_Subtype_Decl;
      Fld : Bare_Discrete_Base_Subtype_Decl;
As_Entity : Internal_Entity_Discrete_Base_Subtype_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Discrete_Base_Subtype_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4213 '<as_entity at nodes.lkt:7516:9>' If_Result ada/nodes.lkt:7516
--# expr-start 4212 '<FieldAccess for scalar_base_subtype_node at nodes.lkt:7516:9>' Fld ada/nodes.lkt:7516
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.scalar_base_subtype_node
Fld := Libadalang.Implementation.Base_Type_Decl_P_Scalar_Base_Subtype_Node (Node => Self);
--# end
--# expr-done 4212
Is_Null := Fld = null; 
if Is_Null then
   If_Result := No_Entity_Discrete_Base_Subtype_Decl;
else
As_Entity := (Info => E_Info, Node => Fld); 
   If_Result := As_Entity;
end if;
--# expr-done 4213
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Scalar_Base_Type;
--# end
--# property-start BaseTypeDecl.is_universal_type ada/nodes.lkt:7523
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Universal_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Fld : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Cast_Result_3 : Internal_Entity;
Is_Equiv_1 : Boolean;
If_Result : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Cast_Result_5 : Internal_Entity;
Is_Equiv_2 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4224 '<BooleanBinaryOp And at nodes.lkt:7524:9>' If_Result_2 ada/nodes.lkt:7524
--# expr-start 4215 '<Not at nodes.lkt:7524:9>' Not_Val ada/nodes.lkt:7524
--# expr-start 4214 '<IsNull at nodes.lkt:7524:13>' Is_Null ada/nodes.lkt:7524
Is_Null := Ent.Node = null; 
--# expr-done 4214
Not_Val := not (Is_Null); 
--# expr-done 4215
if Not_Val then
   --# expr-start 4223 '<BooleanBinaryOp Or at nodes.lkt:7526:13>' If_Result_1 ada/nodes.lkt:7526
--# expr-start 4220 '<BooleanBinaryOp Or at nodes.lkt:7526:13>' If_Result ada/nodes.lkt:7526
--# expr-start 4217 '<Eq at nodes.lkt:7526:13>' Is_Equiv ada/nodes.lkt:7526
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 4216 '<FieldAccess for universal_int_type at nodes.lkt:7526:21>' Fld ada/nodes.lkt:7526
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Self);
--# end
--# expr-done 4216
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld.Node,
         Info => Fld.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 4217
if Is_Equiv then
   If_Result := True;
else
   --# expr-start 4219 '<Eq at nodes.lkt:7527:16>' Is_Equiv_1 ada/nodes.lkt:7527
Cast_Expr_1 := Ent; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# expr-start 4218 '<FieldAccess for universal_fixed_type at nodes.lkt:7527:24>' Fld_1 ada/nodes.lkt:7527
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_fixed_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Universal_Fixed_Type (Node => Self);
--# end
--# expr-done 4218
      Cast_Result_3 := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Is_Equiv_1 := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 4219
   If_Result := Is_Equiv_1;
end if;
--# expr-done 4220
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 4222 '<Eq at nodes.lkt:7528:16>' Is_Equiv_2 ada/nodes.lkt:7528
Cast_Expr_2 := Ent; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
--# expr-start 4221 '<FieldAccess for universal_real_type at nodes.lkt:7528:24>' Fld_2 ada/nodes.lkt:7528
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_real_type
Fld_2 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Type (Node => Self);
--# end
--# expr-done 4221
      Cast_Result_5 := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Is_Equiv_2 := Equivalent (Cast_Result_4, Cast_Result_5); 
--# expr-done 4222
   If_Result_1 := Is_Equiv_2;
end if;
--# expr-done 4223
   If_Result_2 := If_Result_1;
else
   If_Result_2 := False;
end if;
--# expr-done 4224
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Universal_Type;
--# end
--# property-start BaseTypeDecl.is_not_universal_type ada/nodes.lkt:7536
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Not_Universal_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Fld : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4229 '<BooleanBinaryOp And at nodes.lkt:7537:9>' If_Result ada/nodes.lkt:7537
--# expr-start 4226 '<Not at nodes.lkt:7537:9>' Not_Val ada/nodes.lkt:7537
--# expr-start 4225 '<IsNull at nodes.lkt:7537:13>' Is_Null ada/nodes.lkt:7537
Is_Null := Ent.Node = null; 
--# expr-done 4225
Not_Val := not (Is_Null); 
--# expr-done 4226
if Not_Val then
   --# expr-start 4228 '<Not at nodes.lkt:7537:30>' Not_Val_1 ada/nodes.lkt:7537
--# expr-start 4227 '<FieldAccess for is_universal_type at nodes.lkt:7537:34>' Fld ada/nodes.lkt:7537
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_universal_type
Fld := Libadalang.Implementation.Base_Type_Decl_P_Is_Universal_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4227
Not_Val_1 := not (Fld); 
--# expr-done 4228
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4229
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Not_Universal_Type;
--# end
--# property-start BaseTypeDecl.is_access_type_predicate ada/nodes.lkt:7543
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Access_Type_Predicate
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_123 : Internal_Entity_Base_Type_Decl;
Fld : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
Var_Expr_123 := Ent;
if Var_Expr_123 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4230 '<FieldAccess for is_access_type at nodes.lkt:7543:44>' Fld ada/nodes.lkt:7543
      if Var_Expr_123.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_access_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Access_Type (Node => Var_Expr_123.Node, Origin => Origin, E_Info => Var_Expr_123.Info);
--# end
--# expr-done 4230
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Access_Type_Predicate;
--# end
--# property-start BaseTypeDecl.array_ndims ada/nodes.lkt:7546
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Array_Ndims
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := 0;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Array_Ndims;
--# end
--# property-start BaseTypeDecl.static_predicate ada/nodes.lkt:7551
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Static_Predicate
  (Node : Bare_Base_Type_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Expr;
      Var_Expr : Internal_Entity_Expr;
Sym : Symbol_Type;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Expr;
Scope_Result : Internal_Entity_Expr;
Sym_1 : Symbol_Type;
Fld_2 : Internal_Aspect;
Fld_3 : Internal_Entity_Expr;
Result_Var : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4233 '<FieldAccess for value at nodes.lkt:7552:9>' Fld_1 ada/nodes.lkt:7552
--# expr-start 4232 '<FieldAccess for get_aspect at nodes.lkt:7552:9>' Fld ada/nodes.lkt:7552
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4231 '<Symbol Static_Predicate at nodes.lkt:7552:25>' Sym ada/nodes.lkt:7552
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Static_Predicate); 
--# expr-done 4231
--# property-call-start BasicDecl.get_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 4232
Fld_1 := Fld.Value;
--# expr-done 4233
Var_Expr := Fld_1;
if Var_Expr /= No_Entity_Expr then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 4236 '<FieldAccess for value at nodes.lkt:7553:13>' Fld_3 ada/nodes.lkt:7553
--# expr-start 4235 '<FieldAccess for get_aspect at nodes.lkt:7553:13>' Fld_2 ada/nodes.lkt:7553
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4234 '<Symbol Predicate at nodes.lkt:7553:29>' Sym_1 ada/nodes.lkt:7553
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Predicate); 
--# expr-done 4234
--# property-call-start BasicDecl.get_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym_1, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 4235
Fld_3 := Fld_2.Value;
--# expr-done 4236
   Result_Var := Fld_3;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Static_Predicate;
--# end
--# property-start BaseTypeDecl.satisfies_type_predicates ada/nodes.lkt:7560
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Satisfies_Type_Predicates
  (Node : Bare_Base_Type_Decl
      ; Value : Big_Integer_Type
      ; Imprecise_Fallback : Boolean
         := False
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind value Value
   --# bind imprecise_fallback Imprecise_Fallback
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_605 with Inline_Always;
            procedure Finalizer_Scope_2503 with Inline_Always;
      Local_True_Val : Big_Integer_Type;
Local_Satisfies_Own_Predicate : Boolean;
Var_Expr_0 : Internal_Entity_Expr;
Local_From_Type : Internal_Entity_Base_Type_Decl;
Local_Base_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_124 : Internal_Entity_Base_Subtype_Decl;
Big_Int : Big_Integer_Type;
Fld : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Basic_Decl;
New_Struct : Internal_Substitution := No_Substitution;
Array_Lit : Internal_Substitution_Array_Access;
Fld_1 : Big_Integer_Type;
Is_Equal : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Subtype_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Boolean;
Fld_5 : Boolean;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
Let_Result_2 : Boolean;
Let_Result_3 : Boolean;
            procedure Finalizer_Scope_605 is
            begin
                     Dec_Ref (Big_Int);
                     Dec_Ref (Local_True_Val);
            end Finalizer_Scope_605;
            procedure Finalizer_Scope_2503 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2503;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4258 '<Let at nodes.lkt:7561:9>' Let_Result_3 ada/nodes.lkt:7561
--# scope-start
--# expr-start 4237 '<BigInteger 1 at nodes.lkt:7561:24>' Big_Int ada/nodes.lkt:7561
Big_Int := Create_Big_Integer ("1"); 
--# expr-done 4237
Local_True_Val := Big_Int; Inc_Ref (Local_True_Val);
--# bind true_val Local_True_Val
--# expr-start 4257 '<Let at nodes.lkt:7562:9>' Let_Result_2 ada/nodes.lkt:7562
--# scope-start
--# expr-start 4238 '<FieldAccess for static_predicate at nodes.lkt:7563:13>' Fld ada/nodes.lkt:7563
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.static_predicate
Fld := Libadalang.Implementation.Base_Type_Decl_P_Static_Predicate (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 4238
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind pred Var_Expr_0
--# expr-start 4242 '<Eq at nodes.lkt:7565:17>' Is_Equal ada/nodes.lkt:7565
--# expr-start 4241 '<FieldAccess for eval_as_int_in_env at nodes.lkt:7566:20>' Fld_1 ada/nodes.lkt:7566
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4240 '<ArrayLiteral at nodes.lkt:7567:21>' Array_Lit ada/nodes.lkt:7567
--# expr-start 4239 '<New Substitution at nodes.lkt:7568:25>' New_Struct ada/nodes.lkt:7568
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Inc_Ref (Value);
New_Struct := (From_Decl => Cast_Result, To_Value => Value, Value_Type => Ent); 
--# expr-done 4239
Array_Lit := Create_Internal_Substitution_Array (Internal_Internal_Substitution_Array'(1 => New_Struct)); 
--# expr-done 4240
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Eval_As_Int_In_Env (Node => Var_Expr_0.Node, Env => Array_Lit, E_Info => Var_Expr_0.Info);
--# expr-done 4241
Is_Equal := Equivalent (Local_True_Val, Fld_1); 
--# expr-done 4242
Scope_Result := Is_Equal;
   --# end
      Finalizer_Scope_2503;
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
Local_Satisfies_Own_Predicate := Result_Var; 
--# bind satisfies_own_predicate Local_Satisfies_Own_Predicate
--# expr-start 4256 '<Let at nodes.lkt:7577:9>' Let_Result_1 ada/nodes.lkt:7577
--# scope-start
--# expr-start 4243 '<Cast to BaseSubtypeDecl at nodes.lkt:7577:25>' Cast_Result_1 ada/nodes.lkt:7577
Cast_Expr_1 := Ent; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Base_Subtype_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Subtype_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Base_Subtype_Decl;
   end if;
--# expr-done 4243
Var_Expr_124 := Cast_Result_1;
if Var_Expr_124 /= No_Entity_Base_Subtype_Decl then
   --# scope-start
--# expr-start 4244 '<FieldAccess for get_type at nodes.lkt:7577:25>' Fld_2 ada/nodes.lkt:7577
      if Var_Expr_124.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Var_Expr_124.Node, Origin => Origin, E_Info => Var_Expr_124.Info);
--# end
--# expr-done 4244
Scope_Result_1 := Fld_2;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Local_From_Type := Result_Var_1; 
--# bind from_type Local_From_Type
--# expr-start 4255 '<Let at nodes.lkt:7578:9>' Let_Result ada/nodes.lkt:7578
--# scope-start
--# expr-start 4245 '<FieldAccess for base_type at nodes.lkt:7578:25>' Fld_3 ada/nodes.lkt:7578
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4245
Local_Base_Type := Fld_3; 
--# bind base_type Local_Base_Type
--# expr-start 4254 '<BooleanBinaryOp And at nodes.lkt:7580:9>' If_Result_2 ada/nodes.lkt:7580
if Local_Satisfies_Own_Predicate then
   --# expr-start 4253 '<If at nodes.lkt:7582:13>' If_Result_1 ada/nodes.lkt:7582
--# expr-start 4247 '<Not at nodes.lkt:7582:16>' Not_Val_1 ada/nodes.lkt:7582
--# expr-start 4246 '<IsNull at nodes.lkt:7582:20>' Is_Null_1 ada/nodes.lkt:7582
Is_Null_1 := Local_From_Type.Node = null; 
--# expr-done 4246
Not_Val_1 := not (Is_Null_1); 
--# expr-done 4247
if Not_Val_1 then
   --# expr-start 4248 '<FieldAccess for satisfies_type_predicates at nodes.lkt:7583:18>' Fld_4 ada/nodes.lkt:7583
      if Local_From_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.satisfies_type_predicates
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Satisfies_Type_Predicates (Node => Local_From_Type.Node, Value => Value, Imprecise_Fallback => Imprecise_Fallback, Origin => Origin, E_Info => Local_From_Type.Info);
--# end
--# expr-done 4248
   If_Result_1 := Fld_4;
else
   --# expr-start 4252 '<If at nodes.lkt:7582:13>' If_Result ada/nodes.lkt:7582
--# expr-start 4250 '<Not at nodes.lkt:7584:18>' Not_Val ada/nodes.lkt:7584
--# expr-start 4249 '<IsNull at nodes.lkt:7584:22>' Is_Null ada/nodes.lkt:7584
Is_Null := Local_Base_Type.Node = null; 
--# expr-done 4249
Not_Val := not (Is_Null); 
--# expr-done 4250
if Not_Val then
   --# expr-start 4251 '<FieldAccess for satisfies_type_predicates at nodes.lkt:7585:18>' Fld_5 ada/nodes.lkt:7585
      if Local_Base_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.satisfies_type_predicates
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Satisfies_Type_Predicates (Node => Local_Base_Type.Node, Value => Value, Imprecise_Fallback => Imprecise_Fallback, Origin => Origin, E_Info => Local_Base_Type.Info);
--# end
--# expr-done 4251
   If_Result := Fld_5;
else
   If_Result := True;
end if;
--# expr-done 4252
   If_Result_1 := If_Result;
end if;
--# expr-done 4253
   If_Result_2 := If_Result_1;
else
   If_Result_2 := False;
end if;
--# expr-done 4254
Let_Result := If_Result_2; 
--# end
--# expr-done 4255
Let_Result_1 := Let_Result; 
--# end
--# expr-done 4256
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 4257
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 4258
         Property_Result := Let_Result_3;
   --# end
      Finalizer_Scope_605;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_605;
                     Finalizer_Scope_2503;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Satisfies_Type_Predicates;
--# end
--# property-start BaseTypeDecl.is_iterator_type ada/nodes.lkt:7592
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Iterator_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_606 with Inline_Always;
      Local_Iifcs : Bare_Basic_Decl;
Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Classwide_Type_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Classwide_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity;
Fld_3 : Internal_Entity;
Fld_4 : Bare_Ada_Node;
Cast_Expr_1 : Bare_Basic_Decl;
Cast_Result_1 : Bare_Ada_Node;
Is_Equal : Boolean;
Fld_5 : Internal_Entity_Basic_Decl;
Sym_2 : Symbol_Type;
Fld_6 : Boolean;
If_Result : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
            procedure Finalizer_Scope_606 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_606;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Is_Iterator_Type,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Boolean;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4274 '<Let at nodes.lkt:7593:9>' Let_Result_1 ada/nodes.lkt:7593
--# scope-start
--# expr-start 4262 '<FieldAccess for get_unit_root_decl at nodes.lkt:7594:13>' Fld ada/nodes.lkt:7594
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4261 '<ArrayLiteral at nodes.lkt:7595:17>' Array_Lit ada/nodes.lkt:7595
--# expr-start 4259 '<Symbol Ada at nodes.lkt:7595:18>' Sym ada/nodes.lkt:7595
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 4259
--# expr-start 4260 '<Symbol Iterator_Interfaces at nodes.lkt:7595:26>' Sym_1 ada/nodes.lkt:7595
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterator_Interfaces); 
--# expr-done 4260
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 4261
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Ent.Node, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 4262
Local_Iifcs := Fld; 
--# bind iifcs Local_Iifcs
--# expr-start 4273 '<Let at nodes.lkt:7598:9>' Let_Result ada/nodes.lkt:7598
--# scope-start
--# expr-start 4263 '<Cast to ClasswideTypeDecl at nodes.lkt:7599:13>' Cast_Result ada/nodes.lkt:7599
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Classwide_Type_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Classwide_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Classwide_Type_Decl;
   end if;
--# expr-done 4263
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Classwide_Type_Decl then
   --# scope-start
   --# bind cw Var_Expr_0
--# expr-start 4264 '<FieldAccess for type_decl at nodes.lkt:7600:25>' Fld_1 ada/nodes.lkt:7600
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld_1 := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4264
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := Ent;
end if;
Local_Typ := Result_Var; 
--# bind typ Local_Typ
--# expr-start 4272 '<BooleanBinaryOp Or at nodes.lkt:7604:9>' If_Result ada/nodes.lkt:7604
--# expr-start 4268 '<Eq at nodes.lkt:7604:9>' Is_Equal ada/nodes.lkt:7604
--# expr-start 4267 '<FieldAccess for node at nodes.lkt:7604:9>' Fld_4 ada/nodes.lkt:7604
--# expr-start 4266 '<FieldAccess for semantic_parent at nodes.lkt:7604:9>' Fld_3 ada/nodes.lkt:7604
--# expr-start 4265 '<FieldAccess for semantic_parent at nodes.lkt:7604:9>' Fld_2 ada/nodes.lkt:7604
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_2 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Local_Typ.Node, E_Info => Local_Typ.Info);
--# end
--# expr-done 4265
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_3 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 4266
Fld_4 := Fld_3.Node;
--# expr-done 4267
Cast_Expr_1 := Local_Iifcs; 
      Cast_Result_1 := Cast_Expr_1;
Is_Equal := Fld_4 = Cast_Result_1; 
--# expr-done 4268
if Is_Equal then
   If_Result := True;
else
   --# expr-start 4271 '<FieldAccess for has_aspect at nodes.lkt:7605:12>' Fld_6 ada/nodes.lkt:7605
--# expr-start 4269 '<FieldAccess for canonical_part at nodes.lkt:7605:12>' Fld_5 ada/nodes.lkt:7605
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 4269
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4270 '<Symbol Iterable at nodes.lkt:7605:45>' Sym_2 ada/nodes.lkt:7605
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterable); 
--# expr-done 4270
--# property-call-start BasicDecl.has_aspect
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Fld_5.Node, Name => Sym_2, Imprecise_Fallback => False, E_Info => Fld_5.Info);
--# end
--# expr-done 4271
   If_Result := Fld_6;
end if;
--# expr-done 4272
Let_Result := If_Result; 
--# end
--# expr-done 4273
Let_Result_1 := Let_Result; 
--# end
--# expr-done 4274
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_606;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_606;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Boolean,
                        As_Boolean => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Is_Iterator_Type;
--# end
--# property-start BaseTypeDecl.cursor_type ada/nodes.lkt:7611
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Cursor_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_607 with Inline_Always;
      Var_Expr : Internal_Entity_Base_Type_Decl;
Fld : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Env_Get_Result : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_607 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_607;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4278 '<Cast to BaseTypeDecl at nodes.lkt:7614:9>' Cast_Result ada/nodes.lkt:7614
--# expr-start 4277 '<EnvGet at nodes.lkt:7614:9>' Env_Get_Result ada/nodes.lkt:7614
--# expr-start 4275 '<FieldAccess for children_env at nodes.lkt:7614:9>' Fld ada/nodes.lkt:7614
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 4275
--# expr-start 4276 '<Symbol Cursor at nodes.lkt:7614:37>' Sym ada/nodes.lkt:7614
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Cursor); 
--# expr-done 4276
Env_Get_Result := AST_Envs.Get_First (Self => Fld, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 4277
   if Env_Get_Result.Node = null
      or else Env_Get_Result.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Env_Get_Result.Node,
         Info => Env_Get_Result.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 4278
Var_Expr := Cast_Result;
if Var_Expr /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 4279 '<FieldAccess for iterable_cursor_type at nodes.lkt:7617:13>' Fld_1 ada/nodes.lkt:7617
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.iterable_cursor_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Iterable_Cursor_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4279
   Result_Var := Fld_1;
end if;
         Property_Result := Result_Var;
   --# end
      Finalizer_Scope_607;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_607;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Cursor_Type;
--# end
--# property-start BaseTypeDecl.is_not_root_int_type ada/nodes.lkt:7619
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Not_Root_Int_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Fld : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4285 '<BooleanBinaryOp And at nodes.lkt:7620:9>' If_Result ada/nodes.lkt:7620
--# expr-start 4281 '<Not at nodes.lkt:7620:9>' Not_Val ada/nodes.lkt:7620
--# expr-start 4280 '<IsNull at nodes.lkt:7620:13>' Is_Null ada/nodes.lkt:7620
Is_Null := Self = null; 
--# expr-done 4280
Not_Val := not (Is_Null); 
--# expr-done 4281
if Not_Val then
   --# expr-start 4284 '<Not at nodes.lkt:7620:30>' Not_Val_1 ada/nodes.lkt:7620
--# expr-start 4283 '<Eq at nodes.lkt:7620:30>' Is_Equiv ada/nodes.lkt:7620
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 4282 '<FieldAccess for root_int_type at nodes.lkt:7620:38>' Fld ada/nodes.lkt:7620
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_int_type
Fld := Libadalang.Implementation.Ada_Node_P_Root_Int_Type (Node => Self);
--# end
--# expr-done 4282
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld.Node,
         Info => Fld.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 4283
Not_Val_1 := not (Is_Equiv); 
--# expr-done 4284
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4285
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Not_Root_Int_Type;
--# end
--# property-start BaseTypeDecl.allows_universal_int ada/nodes.lkt:7626
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Allows_Universal_Int
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Sym : Symbol_Type;
Fld_2 : Internal_Aspect;
Is_Equal : Boolean;
Not_Val : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4292 '<BooleanBinaryOp Or at nodes.lkt:7627:9>' If_Result ada/nodes.lkt:7627
--# expr-start 4286 '<FieldAccess for is_int_type at nodes.lkt:7627:9>' Fld ada/nodes.lkt:7627
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_int_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Int_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4286
if Fld then
   If_Result := True;
else
--# expr-start 4287 '<FieldAccess for base_subtype at nodes.lkt:7628:12>' Fld_1 ada/nodes.lkt:7628
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4287
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 4291 '<Not at nodes.lkt:7632:13>' Not_Val ada/nodes.lkt:7632
--# expr-start 4290 '<IsNull at nodes.lkt:7632:17>' Is_Equal ada/nodes.lkt:7632
--# expr-start 4289 '<FieldAccess for get_aspect at nodes.lkt:7632:17>' Fld_2 ada/nodes.lkt:7632
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4288 '<Symbol Integer_Literal at nodes.lkt:7632:31>' Sym ada/nodes.lkt:7632
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Integer_Literal); 
--# expr-done 4288
--# property-call-start BasicDecl.get_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Var_Expr_0.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4289
Is_Equal := Fld_2 = No_Aspect; 
--# expr-done 4290
Not_Val := not (Is_Equal); 
--# expr-done 4291
Scope_Result := Not_Val;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 4292
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Allows_Universal_Int;
--# end
--# property-start BaseTypeDecl.allows_universal_real ada/nodes.lkt:7640
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Allows_Universal_Real
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Sym : Symbol_Type;
Fld_2 : Internal_Aspect;
Is_Equal : Boolean;
Not_Val : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4299 '<BooleanBinaryOp Or at nodes.lkt:7641:9>' If_Result ada/nodes.lkt:7641
--# expr-start 4293 '<FieldAccess for is_real_type at nodes.lkt:7641:9>' Fld ada/nodes.lkt:7641
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_real_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Real_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4293
if Fld then
   If_Result := True;
else
--# expr-start 4294 '<FieldAccess for base_subtype at nodes.lkt:7642:12>' Fld_1 ada/nodes.lkt:7642
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4294
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 4298 '<Not at nodes.lkt:7646:13>' Not_Val ada/nodes.lkt:7646
--# expr-start 4297 '<IsNull at nodes.lkt:7646:17>' Is_Equal ada/nodes.lkt:7646
--# expr-start 4296 '<FieldAccess for get_aspect at nodes.lkt:7646:17>' Fld_2 ada/nodes.lkt:7646
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4295 '<Symbol Real_Literal at nodes.lkt:7646:31>' Sym ada/nodes.lkt:7646
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Real_Literal); 
--# expr-done 4295
--# property-call-start BasicDecl.get_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Var_Expr_0.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4296
Is_Equal := Fld_2 = No_Aspect; 
--# expr-done 4297
Not_Val := not (Is_Equal); 
--# expr-done 4298
Scope_Result := Not_Val;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 4299
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Allows_Universal_Real;
--# end
--# property-start BaseTypeDecl.is_not_any_type ada/nodes.lkt:7658
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Not_Any_Type
  (Node : Bare_Base_Type_Decl
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4301 '<Not at nodes.lkt:7658:35>' Not_Val ada/nodes.lkt:7658
--# expr-start 4300 '<IsNull at nodes.lkt:7658:39>' Is_Null ada/nodes.lkt:7658
Is_Null := Self = null; 
--# expr-done 4300
Not_Val := not (Is_Null); 
--# expr-done 4301
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Not_Any_Type;
--# end
--# property-start BaseTypeDecl.allows_string_literal ada/nodes.lkt:7669
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Allows_String_Literal
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
Fld : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Sym : Symbol_Type;
Fld_2 : Internal_Aspect;
Is_Equal : Boolean;
Not_Val_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4311 '<BooleanBinaryOp And at nodes.lkt:7670:9>' If_Result_1 ada/nodes.lkt:7670
--# expr-start 4303 '<Not at nodes.lkt:7670:9>' Not_Val ada/nodes.lkt:7670
--# expr-start 4302 '<IsNull at nodes.lkt:7670:13>' Is_Null ada/nodes.lkt:7670
Is_Null := Self = null; 
--# expr-done 4302
Not_Val := not (Is_Null); 
--# expr-done 4303
if Not_Val then
   --# expr-start 4310 '<BooleanBinaryOp Or at nodes.lkt:7672:13>' If_Result ada/nodes.lkt:7672
--# expr-start 4304 '<FieldAccess for is_str_type at nodes.lkt:7672:13>' Fld ada/nodes.lkt:7672
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_str_type
Fld := Libadalang.Implementation.Base_Type_Decl_P_Is_Str_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4304
if Fld then
   If_Result := True;
else
--# expr-start 4305 '<FieldAccess for base_subtype at nodes.lkt:7673:16>' Fld_1 ada/nodes.lkt:7673
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4305
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 4309 '<Not at nodes.lkt:7677:17>' Not_Val_1 ada/nodes.lkt:7677
--# expr-start 4308 '<IsNull at nodes.lkt:7677:21>' Is_Equal ada/nodes.lkt:7677
--# expr-start 4307 '<FieldAccess for get_aspect at nodes.lkt:7677:21>' Fld_2 ada/nodes.lkt:7677
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4306 '<Symbol String_Literal at nodes.lkt:7677:35>' Sym ada/nodes.lkt:7677
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String_Literal); 
--# expr-done 4306
--# property-call-start BasicDecl.get_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Var_Expr_0.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4307
Is_Equal := Fld_2 = No_Aspect; 
--# expr-done 4308
Not_Val_1 := not (Is_Equal); 
--# expr-done 4309
Scope_Result := Not_Val_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 4310
   If_Result_1 := If_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 4311
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Allows_String_Literal;
--# end
--# property-start BaseTypeDecl.is_str_type ada/nodes.lkt:7684
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Str_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_125 : Internal_Entity_Base_Type_Decl;
Fld : Integer;
Is_Equal : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4316 '<BooleanBinaryOp And at nodes.lkt:7685:9>' If_Result ada/nodes.lkt:7685
--# expr-start 4313 '<Eq at nodes.lkt:7685:9>' Is_Equal ada/nodes.lkt:7685
--# expr-start 4312 '<FieldAccess for array_ndims at nodes.lkt:7685:9>' Fld ada/nodes.lkt:7685
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.array_ndims'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Array_Ndims (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4312
Is_Equal := Fld = 1; 
--# expr-done 4313
if Is_Equal then
--# expr-start 4314 '<FieldAccess for comp_type at nodes.lkt:7685:37>' Fld_1 ada/nodes.lkt:7685
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4314
Var_Expr_125 := Fld_1;
if Var_Expr_125 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4315 '<FieldAccess for is_char_type at nodes.lkt:7685:37>' Fld_2 ada/nodes.lkt:7685
      if Var_Expr_125.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_char_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Char_Type (Node => Var_Expr_125.Node, Origin => Origin, E_Info => Var_Expr_125.Info);
--# end
--# expr-done 4315
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
else
   If_Result := False;
end if;
--# expr-done 4316
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Str_Type;
--# end
--# property-start BaseTypeDecl.accessed_type_no_call ada/nodes.lkt:7690
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Accessed_Type_No_Call
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Fld_1 : Internal_Entity_Access_Def;
Is_A : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4322 '<If at nodes.lkt:7691:9>' If_Result_1 ada/nodes.lkt:7691
--# expr-start 4320 '<BooleanBinaryOp Or at nodes.lkt:7691:12>' If_Result ada/nodes.lkt:7691
--# expr-start 4317 '<IsNull at nodes.lkt:7691:12>' Is_Null ada/nodes.lkt:7691
Is_Null := Ent.Node = null; 
--# expr-done 4317
if Is_Null then
   If_Result := True;
else
   --# expr-start 4319 '<IsA AccessToSubpDef at nodes.lkt:7691:28>' Is_A ada/nodes.lkt:7691
--# expr-start 4318 '<FieldAccess for access_def at nodes.lkt:7691:28>' Fld_1 ada/nodes.lkt:7691
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4318
Is_A := Fld_1.Node /= null 
and then Fld_1.Node.Kind in Ada_Access_To_Subp_Def_Range; 
--# expr-done 4319
   If_Result := Is_A;
end if;
--# expr-done 4320
if If_Result then
   If_Result_1 := No_Entity_Base_Type_Decl;
else
   --# expr-start 4321 '<FieldAccess for accessed_type at nodes.lkt:7693:14>' Fld ada/nodes.lkt:7693
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4321
   If_Result_1 := Fld;
end if;
--# expr-done 4322
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Accessed_Type_No_Call;
--# end
--# property-start BaseTypeDecl.final_accessed_type ada/nodes.lkt:7704
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Final_Accessed_Type
  (Node : Bare_Base_Type_Decl
      ; First_Call : Boolean
         := True
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind first_call First_Call
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
If_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4323 '<FieldAccess for accessed_type at nodes.lkt:7705:9>' Fld ada/nodes.lkt:7705
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4323
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind at Var_Expr_0
--# expr-start 4324 '<FieldAccess for final_accessed_type at nodes.lkt:7706:21>' Fld_1 ada/nodes.lkt:7706
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.final_accessed_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Final_Accessed_Type (Node => Var_Expr_0.Node, First_Call => False, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4324
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 4325 '<If at nodes.lkt:7707:25>' If_Result ada/nodes.lkt:7707
if First_Call then
   If_Result := No_Entity_Base_Type_Decl;
else
   If_Result := Ent;
end if;
--# expr-done 4325
   Result_Var := If_Result;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Final_Accessed_Type;
--# end
--# property-start BaseTypeDecl.is_access_to ada/nodes.lkt:7711
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Access_To
  (Node : Bare_Base_Type_Decl
      ; Typ : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_126 : Internal_Entity_Base_Type_Decl;
Var_Expr_127 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
Var_Expr_126 := Ent;
if Var_Expr_126 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4326 '<FieldAccess for accessed_type at nodes.lkt:7712:9>' Fld ada/nodes.lkt:7712
      if Var_Expr_126.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Var_Expr_126.Node, Origin => Origin, E_Info => Var_Expr_126.Info);
--# end
--# expr-done 4326
Var_Expr_127 := Fld;
if Var_Expr_127 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4327 '<FieldAccess for matching_formal_type at nodes.lkt:7712:9>' Fld_1 ada/nodes.lkt:7712
      if Var_Expr_127.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Var_Expr_127.Node, Formal_Type => Typ, Origin => Origin, E_Info => Var_Expr_127.Info);
--# end
--# expr-done 4327
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Access_To;
--# end
--# property-start BaseTypeDecl.is_subp_access_of ada/nodes.lkt:7717
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Subp_Access_Of
  (Node : Bare_Base_Type_Decl
      ; Other : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Access_To_Subp_Def;
Var_Expr_1 : Internal_Entity_Base_Subp_Spec;
Var_Expr_128 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Access_Def;
Scope_Result : Internal_Entity_Access_Def;
Result_Var : Internal_Entity_Access_Def;
Cast_Result : Internal_Entity_Access_To_Subp_Def;
Fld_1 : Internal_Entity_Base_Subp_Spec;
Fld_2 : Internal_Entity_Subp_Spec;
Fld_3 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4329 '<Cast to AccessToSubpDef at nodes.lkt:7718:9>' Cast_Result ada/nodes.lkt:7718
Var_Expr_128 := Ent;
if Var_Expr_128 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4328 '<FieldAccess for access_def at nodes.lkt:7718:9>' Fld ada/nodes.lkt:7718
      if Var_Expr_128.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Var_Expr_128.Node, Origin => Origin, E_Info => Var_Expr_128.Info);
--# end
--# expr-done 4328
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Access_Def;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Access_To_Subp_Def_Range
   then
      Cast_Result := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Access_To_Subp_Def;
   end if;
--# expr-done 4329
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Access_To_Subp_Def then
   --# scope-start
   --# bind sa Var_Expr_0
--# expr-start 4330 '<FieldAccess for subp_spec_or_null at nodes.lkt:7720:13>' Fld_1 ada/nodes.lkt:7720
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Other.Node, E_Info => Other.Info);
--# end
--# expr-done 4330
Var_Expr_1 := Fld_1;
if Var_Expr_1 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind se Var_Expr_1
--# expr-start 4332 '<FieldAccess for match_signature at nodes.lkt:7721:25>' Fld_3 ada/nodes.lkt:7721
--# expr-start 4331 '<FieldAccess for subp_spec at nodes.lkt:7721:25>' Fld_2 ada/nodes.lkt:7721
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Subp_Spec (Node => Var_Expr_0.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Var_Expr_0.Info);
--# expr-done 4331
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.match_signature
Fld_3 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Fld_2.Node, Other => Var_Expr_1, Match_Name => False, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 4332
Scope_Result_1 := Fld_3;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
         Property_Result := Result_Var_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Subp_Access_Of;
--# end
--# property-start BaseTypeDecl.is_generic_formal ada/nodes.lkt:7726
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Generic_Formal
  (Node : Bare_Base_Type_Decl
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Var_Expr_129 : Bare_Base_Type_Decl;
Fld : Bare_Ada_Node;
Is_A : Boolean;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Base_Type_Decl;
Fld_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4338 '<BooleanBinaryOp Or at nodes.lkt:7727:9>' If_Result ada/nodes.lkt:7727
--# expr-start 4334 '<IsA GenericFormalTypeDecl at nodes.lkt:7727:9>' Is_A ada/nodes.lkt:7727
--# expr-start 4333 '<parent at nodes.lkt:7727:9>' Fld ada/nodes.lkt:7727
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 4333
Is_A := Fld /= null 
and then Fld.Kind in Ada_Generic_Formal_Type_Decl_Range; 
--# expr-done 4334
if Is_A then
   If_Result := True;
else
--# expr-start 4336 '<Cast to BaseTypeDecl at nodes.lkt:7728:12>' Cast_Result ada/nodes.lkt:7728
--# expr-start 4335 '<parent at nodes.lkt:7728:12>' Fld_1 ada/nodes.lkt:7728
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Parent; 
--# expr-done 4335
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 4336
Var_Expr_129 := Cast_Result;
if Var_Expr_129 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 4337 '<FieldAccess for is_generic_formal at nodes.lkt:7728:12>' Fld_2 ada/nodes.lkt:7728
      if Var_Expr_129 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_generic_formal
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Is_Generic_Formal (Node => Var_Expr_129);
--# end
--# expr-done 4337
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 4338
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Generic_Formal;
--# end
--# property-start BaseTypeDecl.is_tagged_type_with_deref ada/nodes.lkt:7734
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Tagged_Type_With_Deref
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Expr;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4344 '<FieldAccess for is_tagged_type at nodes.lkt:7735:9>' Fld_2 ada/nodes.lkt:7735
--# expr-start 4343 '<If at nodes.lkt:7736:13>' If_Result ada/nodes.lkt:7736
--# expr-start 4341 '<Not at nodes.lkt:7736:16>' Not_Val ada/nodes.lkt:7736
--# expr-start 4340 '<IsNull at nodes.lkt:7736:20>' Is_Null ada/nodes.lkt:7736
--# expr-start 4339 '<FieldAccess for get_imp_deref at nodes.lkt:7736:20>' Fld_1 ada/nodes.lkt:7736
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4339
Is_Null := Fld_1.Node = null; 
--# expr-done 4340
Not_Val := not (Is_Null); 
--# expr-done 4341
if Not_Val then
   --# expr-start 4342 '<FieldAccess for accessed_type at nodes.lkt:7736:54>' Fld ada/nodes.lkt:7736
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4342
   If_Result := Fld;
else
   If_Result := Ent;
end if;
--# expr-done 4343
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_tagged_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Tagged_Type (Node => If_Result.Node, Origin => Origin, E_Info => If_Result.Info);
--# end
--# expr-done 4344
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Tagged_Type_With_Deref;
--# end
--# property-start BaseTypeDecl.find_all_derived_types ada/nodes.lkt:7745
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Find_All_Derived_Types
  (Node : Bare_Base_Type_Decl
      ; Units : Internal_Unit_Array_Access
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind units Units
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Type_Decl_Array_Access;
            procedure Finalizer_Scope_620 with Inline_Always;
            procedure Finalizer_Scope_2518 with Inline_Always;
            procedure Finalizer_Scope_2519 with Inline_Always;
      Var_Expr_1 : Bare_Ada_Node;
Cast_Expr : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Unit_Array_Access;
Fld_2 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Fld_3 : Internal_Entity_Type_Decl_Array_Access;
Scope_Result : Internal_Entity_Type_Decl_Array_Access;
Result_Var : Internal_Entity_Type_Decl_Array_Access;
Map_Result : Internal_Entity_Type_Decl_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Type_Decl_Array_Access;
            procedure Finalizer_Scope_620 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_620;
            procedure Finalizer_Scope_2518 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2518;
            procedure Finalizer_Scope_2519 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2519;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4351 '<bind at nodes.lkt:7748:9>' Dyn_Var_Bind_Result ada/nodes.lkt:7748
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 4350 '<Mapcat at nodes.lkt:7750:9>' Map_Result ada/nodes.lkt:7750
   --# expr-start 4346 '<FieldAccess for filter_is_imported_by at nodes.lkt:7750:9>' Fld_1 ada/nodes.lkt:7750
--# expr-start 4345 '<FieldAccess for canonical_type at nodes.lkt:7750:9>' Fld ada/nodes.lkt:7750
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 4345
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Ada_Node_P_Filter_Is_Imported_By (Node => Fld.Node, Units => Units, Transitive => True);
--# expr-done 4346
      declare
         Map_Result_Vec : Internal_Entity_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Unit_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind u Item_0
--# expr-start 4347 '<FieldAccess for root at nodes.lkt:7751:20>' Fld_2 ada/nodes.lkt:7751
      if Item_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Item_0.Ast_Root;
--# expr-done 4347
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind r Var_Expr_1
--# expr-start 4349 '<FieldAccess for find_derived_types at nodes.lkt:7751:37>' Fld_3 ada/nodes.lkt:7751
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4348 '<as_bare_entity at nodes.lkt:7751:61>' If_Result ada/nodes.lkt:7751
Is_Null := Var_Expr_1 = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => No_Entity_Info, Node => Var_Expr_1); 
   If_Result := As_Entity;
end if;
--# expr-done 4348
--# property-call-start BaseTypeDecl.find_derived_types
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Find_Derived_Types (Node => Ent.Node, Root => If_Result, Origin => Bound_Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 4349
Scope_Result := Fld_3;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2519;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
         for Item_To_Append of
               Result_Var.Items
         loop
            Internal_Entity_Type_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2518;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Type_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Type_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Type_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Type_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4350
Dyn_Var_Bind_Result := Map_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 4351
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_620;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_620;
                     Finalizer_Scope_2518;
                     Finalizer_Scope_2519;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Find_All_Derived_Types;
--# end
--# property-start BaseTypeDecl.array_def_with_deref ada/nodes.lkt:7759
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Array_Def_With_Deref
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Type_Def
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Type_Def;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Array_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Array_Type_Def;
Scope_Result : Internal_Entity_Array_Type_Def;
Result_Var : Internal_Entity_Array_Type_Def;
Fld_3 : Boolean;
If_Result : Internal_Entity_Array_Type_Def;
Fld_4 : Boolean;
If_Result_1 : Internal_Entity_Array_Type_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4358 '<If at nodes.lkt:7760:9>' If_Result_1 ada/nodes.lkt:7760
--# expr-start 4352 '<FieldAccess for is_array at nodes.lkt:7760:12>' Fld_4 ada/nodes.lkt:7760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_array
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Is_Array (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4352
if Fld_4 then
   --# expr-start 4353 '<FieldAccess for array_def at nodes.lkt:7760:33>' Fld ada/nodes.lkt:7760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.array_def'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Array_Def (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4353
   If_Result_1 := Fld;
else
   --# expr-start 4357 '<If at nodes.lkt:7760:9>' If_Result ada/nodes.lkt:7760
--# expr-start 4354 '<FieldAccess for is_implicit_deref at nodes.lkt:7761:14>' Fld_3 ada/nodes.lkt:7761
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_implicit_deref
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Is_Implicit_Deref (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4354
if Fld_3 then
--# expr-start 4355 '<FieldAccess for accessed_type at nodes.lkt:7762:14>' Fld_1 ada/nodes.lkt:7762
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4355
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind c Var_Expr_0
--# expr-start 4356 '<FieldAccess for array_def at nodes.lkt:7762:45>' Fld_2 ada/nodes.lkt:7762
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.array_def'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Array_Def (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4356
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Array_Type_Def;
end if;
   If_Result := Result_Var;
else
   If_Result := No_Entity_Array_Type_Def;
end if;
--# expr-done 4357
   If_Result_1 := If_Result;
end if;
--# expr-done 4358
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Array_Def_With_Deref;
--# end
--# property-start BaseTypeDecl.is_array_def_with_deref ada/nodes.lkt:7766
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Array_Def_With_Deref
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Fld : Internal_Entity_Array_Type_Def;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4364 '<BooleanBinaryOp And at nodes.lkt:7767:9>' If_Result ada/nodes.lkt:7767
--# expr-start 4360 '<Not at nodes.lkt:7767:9>' Not_Val ada/nodes.lkt:7767
--# expr-start 4359 '<IsNull at nodes.lkt:7767:13>' Is_Null ada/nodes.lkt:7767
Is_Null := Self = null; 
--# expr-done 4359
Not_Val := not (Is_Null); 
--# expr-done 4360
if Not_Val then
   --# expr-start 4363 '<Not at nodes.lkt:7767:30>' Not_Val_1 ada/nodes.lkt:7767
--# expr-start 4362 '<IsNull at nodes.lkt:7767:34>' Is_Null_1 ada/nodes.lkt:7767
--# expr-start 4361 '<FieldAccess for array_def_with_deref at nodes.lkt:7767:34>' Fld ada/nodes.lkt:7767
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.array_def_with_deref
Fld := Libadalang.Implementation.Base_Type_Decl_P_Array_Def_With_Deref (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4361
Is_Null_1 := Fld.Node = null; 
--# expr-done 4362
Not_Val_1 := not (Is_Null_1); 
--# expr-done 4363
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4364
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Array_Def_With_Deref;
--# end
--# property-start BaseTypeDecl.is_array_def_with_deref_or_null ada/nodes.lkt:7770
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Is_Null : Boolean;
Fld : Internal_Entity_Array_Type_Def;
Is_Null_1 : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4369 '<BooleanBinaryOp Or at nodes.lkt:7771:9>' If_Result ada/nodes.lkt:7771
--# expr-start 4365 '<IsNull at nodes.lkt:7771:9>' Is_Null ada/nodes.lkt:7771
Is_Null := Self = null; 
--# expr-done 4365
if Is_Null then
   If_Result := True;
else
   --# expr-start 4368 '<Not at nodes.lkt:7771:25>' Not_Val ada/nodes.lkt:7771
--# expr-start 4367 '<IsNull at nodes.lkt:7771:29>' Is_Null_1 ada/nodes.lkt:7771
--# expr-start 4366 '<FieldAccess for array_def_with_deref at nodes.lkt:7771:29>' Fld ada/nodes.lkt:7771
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.array_def_with_deref
Fld := Libadalang.Implementation.Base_Type_Decl_P_Array_Def_With_Deref (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4366
Is_Null_1 := Fld.Node = null; 
--# expr-done 4367
Not_Val := not (Is_Null_1); 
--# expr-done 4368
   If_Result := Not_Val;
end if;
--# expr-done 4369
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null;
--# end
--# property-start BaseTypeDecl.comp_type ada/nodes.lkt:7781
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Comp_Type
  (Node : Bare_Base_Type_Decl
      ; Is_Subscript : Boolean
         := False
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind is_subscript Is_Subscript
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Local_Ad : Internal_Entity_Array_Type_Def;
Var_Expr_1 : Internal_Entity_Array_Type_Def;
Var_Expr_2 : Internal_Entity_Access_Def;
Match_0 : Internal_Entity_Access_To_Subp_Def;
Match_1 : Internal_Entity_Base_Type_Access_Def;
Var_Expr : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Array_Type_Def;
Fld_1 : Internal_Entity_Array_Type_Def;
If_Result : Internal_Entity_Array_Type_Def;
Fld_2 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Access_Def;
Fld_4 : Internal_Entity_Subp_Spec;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity_Access_Def;
Cast_Result : Internal_Entity_Access_To_Subp_Def;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Access_Def;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_4 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_5 : Internal_Entity_Base_Type_Decl;
Result_Var_3 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
Var_Expr_0 := Ent;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr_0
--# expr-start 4379 '<Let at nodes.lkt:7784:17>' Let_Result_2 ada/nodes.lkt:7784
--# scope-start
--# expr-start 4372 '<If at nodes.lkt:7785:21>' If_Result ada/nodes.lkt:7785
if Is_Subscript then
   --# expr-start 4370 '<FieldAccess for array_def_with_deref at nodes.lkt:7785:42>' Fld ada/nodes.lkt:7785
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.array_def_with_deref
Fld := Libadalang.Implementation.Base_Type_Decl_P_Array_Def_With_Deref (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4370
   If_Result := Fld;
else
   --# expr-start 4371 '<FieldAccess for array_def at nodes.lkt:7786:26>' Fld_1 ada/nodes.lkt:7786
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.array_def'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Array_Def (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4371
   If_Result := Fld_1;
end if;
--# expr-done 4372
Local_Ad := If_Result; 
--# bind ad Local_Ad
Var_Expr_1 := Local_Ad;
if Var_Expr_1 /= No_Entity_Array_Type_Def then
   --# scope-start
   --# bind ad Var_Expr_1
--# expr-start 4373 '<FieldAccess for comp_type at nodes.lkt:7788:31>' Fld_2 ada/nodes.lkt:7788
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArrayTypeDef.comp_type
Fld_2 := Libadalang.Implementation.Array_Type_Def_P_Comp_Type (Node => Var_Expr_1.Node, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 4373
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_2 := Scope_Result_1;
else
--# expr-start 4374 '<FieldAccess for access_def at nodes.lkt:7789:21>' Fld_3 ada/nodes.lkt:7789
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4374
Var_Expr_2 := Fld_3;
if Var_Expr_2 /= No_Entity_Access_Def then
   --# scope-start
   --# bind v1 Var_Expr_2
--# expr-start 4378 '<Match at nodes.lkt:7791:21>' Match_Result ada/nodes.lkt:7791
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_2; 
case Ada_Access_Def (Match_Prefix.Node.Kind) is
         when Ada_Access_To_Subp_Def =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind asd Match_0
--# expr-start 4376 '<FieldAccess for return_type at nodes.lkt:7793:29>' Fld_5 ada/nodes.lkt:7793
--# expr-start 4375 '<FieldAccess for subp_spec at nodes.lkt:7793:29>' Fld_4 ada/nodes.lkt:7793
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Subp_Spec (Node => Match_0.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Match_0.Info);
--# expr-done 4375
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_5 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Fld_4.Node, Origin => Origin, E_Info => Fld_4.Info);
--# end
--# expr-done 4376
Let_Result := Fld_5; 
--# end
Scope_Result_2 := Let_Result;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Anonymous_Type_Access_Def .. Ada_Type_Access_Def =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Access_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind tad Match_1
--# expr-start 4377 '<FieldAccess for accessed_type at nodes.lkt:7794:56>' Fld_6 ada/nodes.lkt:7794
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.accessed_type'
Fld_6 := Libadalang.Implementation.Dispatcher_Type_Def_P_Accessed_Type (Node => Match_1.Node, Origin => Origin, E_Info => Match_1.Info);
--# end
--# expr-done 4377
Let_Result_1 := Fld_6; 
--# end
Scope_Result_3 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 4378
Scope_Result_4 := Match_Result;
   --# end
   Result_Var_1 := Scope_Result_4;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
   Result_Var_2 := Result_Var_1;
end if;
Let_Result_2 := Result_Var_2; 
--# end
--# expr-done 4379
Scope_Result_5 := Let_Result_2;
   --# end
   Result_Var_3 := Scope_Result_5;
else
   Result_Var_3 := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Comp_Type;
--# end
--# property-start BaseTypeDecl.index_type ada/nodes.lkt:7807
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Index_Type
  (Node : Bare_Base_Type_Decl
      ; Dim : Integer
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind dim Dim
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Array_Type_Def;
Fld : Internal_Entity_Array_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 4380 '<FieldAccess for array_def_with_deref at nodes.lkt:7808:9>' Fld ada/nodes.lkt:7808
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.array_def_with_deref
Fld := Libadalang.Implementation.Base_Type_Decl_P_Array_Def_With_Deref (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4380
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Array_Type_Def then
   --# scope-start
   --# bind ad Var_Expr_0
--# expr-start 4381 '<FieldAccess for index_type at nodes.lkt:7808:48>' Fld_1 ada/nodes.lkt:7808
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArrayTypeDef.index_type
Fld_1 := Libadalang.Implementation.Array_Type_Def_P_Index_Type (Node => Var_Expr_0.Node, Dim => Dim, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4381
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Index_Type;
--# end
--# property-start BaseTypeDecl.expr_type ada/nodes.lkt:7811
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Expr_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Ent;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Expr_Type;
--# end
--# property-start BaseTypeDecl.is_derived_type ada/nodes.lkt:7819
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Derived_Type
  (Node : Bare_Base_Type_Decl
      ; Other_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other_type Other_Type
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_627 with Inline_Always;
      Local_Entity_Can : Internal_Entity_Base_Type_Decl;
Local_Other_Can : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Fld_2 : Boolean;
Fld_3 : Internal_Entity_Classwide_Type_Decl;
Cast_Result_2 : Internal_Entity;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Is_Equiv_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
Fld_4 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_5 : Boolean;
Quantifier_Result : Boolean;
If_Result_2 : Boolean;
Fld_6 : Boolean;
Fld_7 : Boolean;
If_Result_3 : Boolean;
Cast_Expr_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity_Classwide_Type_Decl;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_10 : Boolean;
Quantifier_Result_1 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
            procedure Finalizer_Scope_627 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_9);
            end Finalizer_Scope_627;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4405 '<Let at nodes.lkt:7820:9>' Let_Result_1 ada/nodes.lkt:7820
--# scope-start
--# expr-start 4382 '<FieldAccess for canonical_type at nodes.lkt:7820:26>' Fld ada/nodes.lkt:7820
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4382
Local_Entity_Can := Fld; 
--# bind entity_can Local_Entity_Can
--# expr-start 4404 '<Let at nodes.lkt:7821:9>' Let_Result ada/nodes.lkt:7821
--# scope-start
--# expr-start 4383 '<FieldAccess for canonical_type at nodes.lkt:7821:25>' Fld_1 ada/nodes.lkt:7821
      if Other_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Other_Type.Node, Origin => Origin, E_Info => Other_Type.Info);
--# end
--# expr-done 4383
Local_Other_Can := Fld_1; 
--# bind other_can Local_Other_Can
--# expr-start 4403 '<BooleanBinaryOp Or at nodes.lkt:7823:9>' If_Result_5 ada/nodes.lkt:7823
--# expr-start 4393 '<BooleanBinaryOp Or at nodes.lkt:7823:9>' If_Result_2 ada/nodes.lkt:7823
--# expr-start 4389 '<BooleanBinaryOp Or at nodes.lkt:7823:9>' If_Result_1 ada/nodes.lkt:7823
--# expr-start 4384 '<Eq at nodes.lkt:7825:13>' Is_Equiv ada/nodes.lkt:7825
Cast_Expr := Local_Entity_Can; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Local_Other_Can; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 4384
if Is_Equiv then
   If_Result_1 := True;
else
   --# expr-start 4388 '<BooleanBinaryOp And at nodes.lkt:7835:13>' If_Result ada/nodes.lkt:7835
--# expr-start 4385 '<FieldAccess for is_classwide at nodes.lkt:7835:13>' Fld_2 ada/nodes.lkt:7835
      if Local_Other_Can.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Local_Other_Can.Node, E_Info => Local_Other_Can.Info);
--# end
--# expr-done 4385
if Fld_2 then
   --# expr-start 4387 '<Eq at nodes.lkt:7836:17>' Is_Equiv_1 ada/nodes.lkt:7836
--# expr-start 4386 '<FieldAccess for classwide_type at nodes.lkt:7836:17>' Fld_3 ada/nodes.lkt:7836
      if Local_Entity_Can.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Local_Entity_Can.Node, E_Info => Local_Entity_Can.Info);
--# end
--# expr-done 4386
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Cast_Expr_2 := Local_Other_Can; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Is_Equiv_1 := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 4387
   If_Result := Is_Equiv_1;
else
   If_Result := False;
end if;
--# expr-done 4388
   If_Result_1 := If_Result;
end if;
--# expr-done 4389
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 4392 '<AnyQuantifier at nodes.lkt:7840:13>' Quantifier_Result ada/nodes.lkt:7840
   --# expr-start 4390 '<FieldAccess for base_types at nodes.lkt:7840:13>' Fld_4 ada/nodes.lkt:7840
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_types'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Types (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4390
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld_4;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind bt Item_0
      --# expr-start 4391 '<FieldAccess for is_derived_type at nodes.lkt:7840:43>' Fld_5 ada/nodes.lkt:7840
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_derived_type
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Is_Derived_Type (Node => Item_0.Node, Other_Type => Other_Type, Origin => Origin, E_Info => Item_0.Info);
--# end
--# expr-done 4391
      Quantifier_Result := Fld_5;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 4392
   If_Result_2 := Quantifier_Result;
end if;
--# expr-done 4393
if If_Result_2 then
   If_Result_5 := True;
else
   --# expr-start 4402 '<BooleanBinaryOp And at nodes.lkt:7847:13>' If_Result_4 ada/nodes.lkt:7847
--# expr-start 4396 '<BooleanBinaryOp And at nodes.lkt:7847:13>' If_Result_3 ada/nodes.lkt:7847
--# expr-start 4394 '<FieldAccess for is_classwide at nodes.lkt:7847:13>' Fld_6 ada/nodes.lkt:7847
      if Local_Entity_Can.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Local_Entity_Can.Node, E_Info => Local_Entity_Can.Info);
--# end
--# expr-done 4394
if Fld_6 then
   --# expr-start 4395 '<FieldAccess for is_classwide at nodes.lkt:7847:43>' Fld_7 ada/nodes.lkt:7847
      if Local_Other_Can.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Local_Other_Can.Node, E_Info => Local_Other_Can.Info);
--# end
--# expr-done 4395
   If_Result_3 := Fld_7;
else
   If_Result_3 := False;
end if;
--# expr-done 4396
if If_Result_3 then
   --# expr-start 4401 '<AnyQuantifier at nodes.lkt:7848:17>' Quantifier_Result_1 ada/nodes.lkt:7848
   --# expr-start 4399 '<FieldAccess for base_types at nodes.lkt:7848:17>' Fld_9 ada/nodes.lkt:7848
--# expr-start 4398 '<FieldAccess for type_decl at nodes.lkt:7848:17>' Fld_8 ada/nodes.lkt:7848
--# expr-start 4397 '<Cast to ClasswideTypeDecl at nodes.lkt:7848:17>' Cast_Result_4 ada/nodes.lkt:7848
Cast_Expr_3 := Local_Entity_Can; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Classwide_Type_Decl_Range
   then
      Cast_Result_4 := Create_Internal_Entity_Classwide_Type_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_4 := No_Entity_Classwide_Type_Decl;
   end if;
--# expr-done 4397
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld_8 := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Cast_Result_4.Node, E_Info => Cast_Result_4.Info);
--# end
--# expr-done 4398
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_types'
Fld_9 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Types (Node => Fld_8.Node, Origin => Origin, E_Info => Fld_8.Info);
--# end
--# expr-done 4399
      Quantifier_Result_1 := False;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld_9;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind bt Item_1
      --# expr-start 4400 '<FieldAccess for is_derived_type at nodes.lkt:7849:25>' Fld_10 ada/nodes.lkt:7849
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_derived_type
Fld_10 := Libadalang.Implementation.Base_Type_Decl_P_Is_Derived_Type (Node => Item_1.Node, Other_Type => Other_Type, Origin => Origin, E_Info => Item_1.Info);
--# end
--# expr-done 4400
      Quantifier_Result_1 := Fld_10;
   --# end
               exit when Quantifier_Result_1;
         end loop;
      end;
--# expr-done 4401
   If_Result_4 := Quantifier_Result_1;
else
   If_Result_4 := False;
end if;
--# expr-done 4402
   If_Result_5 := If_Result_4;
end if;
--# expr-done 4403
Let_Result := If_Result_5; 
--# end
--# expr-done 4404
Let_Result_1 := Let_Result; 
--# end
--# expr-done 4405
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_627;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_627;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Derived_Type;
--# end
--# property-start BaseTypeDecl.is_limited_type ada/nodes.lkt:7866
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Limited_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Match_0 : Internal_Entity_Type_Decl;
Match_1 : Internal_Entity_Subtype_Decl;
Match_2 : Internal_Entity_Incomplete_Type_Decl;
Match_3 : Internal_Entity_Classwide_Type_Decl;
Match_4 : Internal_Entity_Protected_Type_Decl;
Match_5 : Internal_Entity_Task_Type_Decl;
Match_6 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Boolean;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Boolean;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Boolean;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Type_Decl;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_1 : Internal_Entity_Subtype_Decl;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_2 : Internal_Entity_Incomplete_Type_Decl;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Cast_Result_3 : Internal_Entity_Classwide_Type_Decl;
Let_Result_3 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_4 : Internal_Entity_Protected_Type_Decl;
Let_Result_4 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_5 : Internal_Entity_Task_Type_Decl;
Let_Result_5 : Boolean;
Scope_Result_5 : Boolean;
Cast_Result_6 : Internal_Entity_Base_Type_Decl;
Let_Result_6 : Boolean;
Scope_Result_6 : Boolean;
Match_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4414 '<Match at nodes.lkt:7870:5>' Match_Result ada/nodes.lkt:7870
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind td Match_0
--# expr-start 4407 '<FieldAccess for is_limited_type at nodes.lkt:7871:30>' Fld_1 ada/nodes.lkt:7871
--# expr-start 4406 '<FieldAccess for type_def at nodes.lkt:7871:30>' Fld ada/nodes.lkt:7871
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Match_0.Node.Type_Decl_F_Type_Def, Info => Match_0.Info);
--# expr-done 4406
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_limited_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Limited_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4407
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Subtype_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind sb Match_1
--# expr-start 4409 '<FieldAccess for is_limited_type at nodes.lkt:7872:33>' Fld_3 ada/nodes.lkt:7872
--# expr-start 4408 '<FieldAccess for get_type at nodes.lkt:7872:33>' Fld_2 ada/nodes.lkt:7872
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Match_1.Node, Origin => No_Bare_Ada_Node, E_Info => Match_1.Info);
--# end
--# expr-done 4408
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_limited_type
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Is_Limited_Type (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 4409
Let_Result_1 := Fld_3; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Incomplete_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Incomplete_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind it Match_2
--# expr-start 4411 '<FieldAccess for is_limited_type at nodes.lkt:7873:40>' Fld_5 ada/nodes.lkt:7873
--# expr-start 4410 '<FieldAccess for full_view at nodes.lkt:7873:40>' Fld_4 ada/nodes.lkt:7873
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.full_view
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Full_View (Node => Match_2.Node, E_Info => Match_2.Info);
--# end
--# expr-done 4410
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_limited_type
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Is_Limited_Type (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 4411
Let_Result_2 := Fld_5; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Classwide_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Classwide_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_3; 
--# bind cw Match_3
--# expr-start 4413 '<FieldAccess for is_limited_type at nodes.lkt:7874:39>' Fld_7 ada/nodes.lkt:7874
--# expr-start 4412 '<FieldAccess for type_decl at nodes.lkt:7874:39>' Fld_6 ada/nodes.lkt:7874
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld_6 := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Match_3.Node, E_Info => Match_3.Info);
--# end
--# expr-done 4412
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_limited_type
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Is_Limited_Type (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 4413
Let_Result_3 := Fld_7; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Protected_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Protected_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_4; 
--# bind _ Match_4
Let_Result_4 := True; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Task_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_5; 
--# bind _ Match_5
Let_Result_5 := True; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Discrete_Base_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_6 := Cast_Result_6; 
--# bind _ Match_6
Let_Result_6 := False; 
--# end
Scope_Result_6 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_6; 
end case;
--# expr-done 4414
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Limited_Type;
--# end
--# property-start BaseTypeDecl.iterable_comp_type_or_null ada/nodes.lkt:7881
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Iterable_Comp_Type_Or_Null
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4420 '<If at nodes.lkt:7882:9>' If_Result_1 ada/nodes.lkt:7882
--# expr-start 4415 '<IsNull at nodes.lkt:7882:12>' Is_Null ada/nodes.lkt:7882
Is_Null := Self = null; 
--# expr-done 4415
if Is_Null then
   If_Result_1 := No_Entity_Base_Type_Decl;
else
   --# expr-start 4419 '<FieldAccess for iterable_comp_type at nodes.lkt:7884:13>' Fld_2 ada/nodes.lkt:7884
--# expr-start 4418 '<If at nodes.lkt:7884:14>' If_Result ada/nodes.lkt:7884
--# expr-start 4416 '<FieldAccess for is_implicit_deref at nodes.lkt:7884:17>' Fld_1 ada/nodes.lkt:7884
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_implicit_deref
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Is_Implicit_Deref (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4416
if Fld_1 then
   --# expr-start 4417 '<FieldAccess for accessed_type at nodes.lkt:7884:47>' Fld ada/nodes.lkt:7884
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4417
   If_Result := Fld;
else
   If_Result := Ent;
end if;
--# expr-done 4418
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.iterable_comp_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Iterable_Comp_Type (Node => If_Result.Node, Origin => Origin, E_Info => If_Result.Info);
--# end
--# expr-done 4419
   If_Result_1 := Fld_2;
end if;
--# expr-done 4420
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Iterable_Comp_Type_Or_Null;
--# end
--# property-start BaseTypeDecl.matching_prefix_type ada/nodes.lkt:7891
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Prefix_Type
  (Node : Bare_Base_Type_Decl
      ; Container_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind container_type Container_Type
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Cont_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_130 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
Fld : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result_1 : Boolean;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4434 '<Let at nodes.lkt:7892:9>' Let_Result ada/nodes.lkt:7892
--# scope-start
Local_Cont_Type := Container_Type; 
--# bind cont_type Local_Cont_Type
--# expr-start 4433 '<BooleanBinaryOp And at nodes.lkt:7894:9>' If_Result_3 ada/nodes.lkt:7894
--# expr-start 4425 '<BooleanBinaryOp And at nodes.lkt:7894:10>' If_Result ada/nodes.lkt:7894
--# expr-start 4422 '<Not at nodes.lkt:7894:10>' Not_Val ada/nodes.lkt:7894
--# expr-start 4421 '<IsNull at nodes.lkt:7894:14>' Is_Null ada/nodes.lkt:7894
Is_Null := Self = null; 
--# expr-done 4421
Not_Val := not (Is_Null); 
--# expr-done 4422
if Not_Val then
   --# expr-start 4424 '<Not at nodes.lkt:7894:31>' Not_Val_1 ada/nodes.lkt:7894
--# expr-start 4423 '<IsNull at nodes.lkt:7894:35>' Is_Null_1 ada/nodes.lkt:7894
Is_Null_1 := Container_Type.Node = null; 
--# expr-done 4423
Not_Val_1 := not (Is_Null_1); 
--# expr-done 4424
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4425
if If_Result then
   --# expr-start 4432 '<BooleanBinaryOp Or at nodes.lkt:7896:13>' If_Result_2 ada/nodes.lkt:7896
--# expr-start 4429 '<BooleanBinaryOp Or at nodes.lkt:7896:13>' If_Result_1 ada/nodes.lkt:7896
--# expr-start 4426 '<FieldAccess for matching_formal_prim_type at nodes.lkt:7898:17>' Fld ada/nodes.lkt:7898
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_prim_type
Fld := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Prim_Type (Node => Ent.Node, Formal_Type => Local_Cont_Type, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4426
if Fld then
   If_Result_1 := True;
else
--# expr-start 4427 '<FieldAccess for final_accessed_type at nodes.lkt:7902:17>' Fld_1 ada/nodes.lkt:7902
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.final_accessed_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Final_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4427
Var_Expr_130 := Fld_1;
if Var_Expr_130 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4428 '<FieldAccess for matching_formal_prim_type at nodes.lkt:7902:17>' Fld_2 ada/nodes.lkt:7902
      if Var_Expr_130.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_prim_type
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Prim_Type (Node => Var_Expr_130.Node, Formal_Type => Local_Cont_Type, Origin => Origin, E_Info => Var_Expr_130.Info);
--# end
--# expr-done 4428
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result_1 := Result_Var;
end if;
--# expr-done 4429
if If_Result_1 then
   If_Result_2 := True;
else
--# expr-start 4430 '<FieldAccess for accessed_type at nodes.lkt:7909:17>' Fld_3 ada/nodes.lkt:7909
      if Local_Cont_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Local_Cont_Type.Node, Origin => Origin, E_Info => Local_Cont_Type.Info);
--# end
--# expr-done 4430
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind at Var_Expr_0
--# expr-start 4431 '<FieldAccess for matching_formal_prim_type at nodes.lkt:7910:29>' Fld_4 ada/nodes.lkt:7910
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_prim_type
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Prim_Type (Node => Ent.Node, Formal_Type => Var_Expr_0, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4431
Scope_Result_1 := Fld_4;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_2 := Result_Var_1;
end if;
--# expr-done 4432
   If_Result_3 := If_Result_2;
else
   If_Result_3 := False;
end if;
--# expr-done 4433
Let_Result := If_Result_3; 
--# end
--# expr-done 4434
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Prefix_Type;
--# end
--# property-start BaseTypeDecl.matching_access_type ada/nodes.lkt:7918
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Access_Type
  (Node : Bare_Base_Type_Decl
      ; Expected_Type : Internal_Entity_Base_Type_Decl
      ; For_Assignment : Boolean
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind expected_type Expected_Type
   --# bind for_assignment For_Assignment
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Actual_Type : Internal_Entity_Base_Type_Decl;
Match_0 : Internal_Entity_Anonymous_Type_Decl;
Match_1 : Internal_Entity_Base_Type_Decl;
Match_0_1 : Internal_Entity_Anonymous_Type_Decl;
Match_1_1 : Internal_Entity_Base_Type_Decl;
Fld : Boolean;
Fld_1 : Boolean;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Anonymous_Type_Decl;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Match_Result : Boolean;
Match_Prefix_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity_Anonymous_Type_Decl;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Cast_Result_3 : Internal_Entity_Base_Type_Decl;
Let_Result_3 : Boolean;
Scope_Result_3 : Boolean;
Match_Result_1 : Boolean;
Let_Result_4 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4439 '<Let at nodes.lkt:7922:9>' Let_Result_4 ada/nodes.lkt:7922
--# scope-start
Local_Actual_Type := Ent; 
--# bind actual_type Local_Actual_Type
--# expr-start 4438 '<Match at nodes.lkt:7924:9>' Match_Result_1 ada/nodes.lkt:7924
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Expected_Type; 
case Ada_Base_Type_Decl (Match_Prefix_1.Node.Kind) is
         when Ada_Anonymous_Type_Decl .. Ada_Synth_Anonymous_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Anonymous_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_0 := Cast_Result_2; 
--# bind atd Match_0
--# expr-start 4435 '<FieldAccess for access_def_matches at nodes.lkt:7926:17>' Fld ada/nodes.lkt:7926
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AnonymousTypeDecl.access_def_matches
Fld := Libadalang.Implementation.Anonymous_Type_Decl_P_Access_Def_Matches (Node => Match_0.Node, Other => Local_Actual_Type, For_Assignment => For_Assignment, Origin => Origin, E_Info => Match_0.Info);
--# end
--# expr-done 4435
Let_Result_2 := Fld; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result_1 := Scope_Result_2; 
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Single_Task_Type_Decl | Ada_Concrete_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_1 := Cast_Result_3; 
--# bind _ Match_1
--# expr-start 4437 '<Match at nodes.lkt:7928:17>' Match_Result ada/nodes.lkt:7928
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Local_Actual_Type; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Type_Decl .. Ada_Synth_Anonymous_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Anonymous_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0_1 := Cast_Result; 
--# bind atd2 Match_0_1
--# expr-start 4436 '<FieldAccess for access_def_matches at nodes.lkt:7930:25>' Fld_1 ada/nodes.lkt:7930
      if Match_0_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AnonymousTypeDecl.access_def_matches
Fld_1 := Libadalang.Implementation.Anonymous_Type_Decl_P_Access_Def_Matches (Node => Match_0_1.Node, Other => Expected_Type, For_Assignment => For_Assignment, Origin => Origin, E_Info => Match_0_1.Info);
--# end
--# expr-done 4436
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Single_Task_Type_Decl | Ada_Concrete_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1_1 := Cast_Result_1; 
--# bind _ Match_1_1
Let_Result_1 := False; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 4437
Let_Result_3 := Match_Result; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result_1 := Scope_Result_3; 
end case;
--# expr-done 4438
Let_Result_4 := Match_Result_1; 
--# end
--# expr-done 4439
         Property_Result := Let_Result_4;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Access_Type;
--# end
--# property-start BaseTypeDecl.matching_formal_prim_type ada/nodes.lkt:7938
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Formal_Prim_Type
  (Node : Bare_Base_Type_Decl
      ; Formal_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind formal_type Formal_Type
   --# bind origin Origin
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
Fld : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4446 '<BooleanBinaryOp And at nodes.lkt:7939:9>' If_Result_1 ada/nodes.lkt:7939
--# expr-start 4444 '<BooleanBinaryOp And at nodes.lkt:7939:9>' If_Result ada/nodes.lkt:7939
--# expr-start 4441 '<Not at nodes.lkt:7939:9>' Not_Val ada/nodes.lkt:7939
--# expr-start 4440 '<IsNull at nodes.lkt:7939:13>' Is_Null ada/nodes.lkt:7939
Is_Null := Formal_Type.Node = null; 
--# expr-done 4440
Not_Val := not (Is_Null); 
--# expr-done 4441
if Not_Val then
   --# expr-start 4443 '<Not at nodes.lkt:7939:37>' Not_Val_1 ada/nodes.lkt:7939
--# expr-start 4442 '<IsNull at nodes.lkt:7939:41>' Is_Null_1 ada/nodes.lkt:7939
Is_Null_1 := Self = null; 
--# expr-done 4442
Not_Val_1 := not (Is_Null_1); 
--# expr-done 4443
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4444
if If_Result then
   --# expr-start 4445 '<FieldAccess for matching_formal_type_impl at nodes.lkt:7940:13>' Fld ada/nodes.lkt:7940
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type_impl
Fld := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type_Impl (Node => Ent.Node, Formal_Type => Formal_Type, Accept_Derived => True, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4445
   If_Result_1 := Fld;
else
   If_Result_1 := False;
end if;
--# expr-done 4446
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Formal_Prim_Type;
--# end
--# property-start BaseTypeDecl.matching_formal_type ada/nodes.lkt:7944
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Formal_Type
  (Node : Bare_Base_Type_Decl
      ; Formal_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind formal_type Formal_Type
   --# bind origin Origin
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
Fld : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4453 '<BooleanBinaryOp And at nodes.lkt:7945:9>' If_Result_1 ada/nodes.lkt:7945
--# expr-start 4451 '<BooleanBinaryOp And at nodes.lkt:7945:9>' If_Result ada/nodes.lkt:7945
--# expr-start 4448 '<Not at nodes.lkt:7945:9>' Not_Val ada/nodes.lkt:7945
--# expr-start 4447 '<IsNull at nodes.lkt:7945:13>' Is_Null ada/nodes.lkt:7945
Is_Null := Formal_Type.Node = null; 
--# expr-done 4447
Not_Val := not (Is_Null); 
--# expr-done 4448
if Not_Val then
   --# expr-start 4450 '<Not at nodes.lkt:7945:37>' Not_Val_1 ada/nodes.lkt:7945
--# expr-start 4449 '<IsNull at nodes.lkt:7945:41>' Is_Null_1 ada/nodes.lkt:7945
Is_Null_1 := Self = null; 
--# expr-done 4449
Not_Val_1 := not (Is_Null_1); 
--# expr-done 4450
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4451
if If_Result then
   --# expr-start 4452 '<FieldAccess for matching_formal_type_impl at nodes.lkt:7946:13>' Fld ada/nodes.lkt:7946
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type_impl
Fld := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type_Impl (Node => Ent.Node, Formal_Type => Formal_Type, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4452
   If_Result_1 := Fld;
else
   If_Result_1 := False;
end if;
--# expr-done 4453
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Formal_Type;
--# end
--# property-start BaseTypeDecl.matching_membership_type ada/nodes.lkt:7949
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Membership_Type
  (Node : Bare_Base_Type_Decl
      ; Formal_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind formal_type Formal_Type
   --# bind origin Origin
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
Fld : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4460 '<BooleanBinaryOp And at nodes.lkt:7950:9>' If_Result_1 ada/nodes.lkt:7950
--# expr-start 4458 '<BooleanBinaryOp And at nodes.lkt:7950:9>' If_Result ada/nodes.lkt:7950
--# expr-start 4455 '<Not at nodes.lkt:7950:9>' Not_Val ada/nodes.lkt:7950
--# expr-start 4454 '<IsNull at nodes.lkt:7950:13>' Is_Null ada/nodes.lkt:7950
Is_Null := Formal_Type.Node = null; 
--# expr-done 4454
Not_Val := not (Is_Null); 
--# expr-done 4455
if Not_Val then
   --# expr-start 4457 '<Not at nodes.lkt:7950:37>' Not_Val_1 ada/nodes.lkt:7950
--# expr-start 4456 '<IsNull at nodes.lkt:7950:41>' Is_Null_1 ada/nodes.lkt:7950
Is_Null_1 := Self = null; 
--# expr-done 4456
Not_Val_1 := not (Is_Null_1); 
--# expr-done 4457
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4458
if If_Result then
   --# expr-start 4459 '<FieldAccess for matching_formal_type_impl at nodes.lkt:7951:13>' Fld ada/nodes.lkt:7951
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type_impl
Fld := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type_Impl (Node => Ent.Node, Formal_Type => Formal_Type, Accept_Root_Types => True, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4459
   If_Result_1 := Fld;
else
   If_Result_1 := False;
end if;
--# expr-done 4460
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Membership_Type;
--# end
--# property-start BaseTypeDecl.matching_formal_type_impl ada/nodes.lkt:7954
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Formal_Type_Impl
  (Node : Bare_Base_Type_Decl
      ; Formal_Type : Internal_Entity_Base_Type_Decl
      ; Accept_Derived : Boolean
         := False
      ; Accept_Root_Types : Boolean
         := False
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind formal_type Formal_Type
   --# bind accept_derived Accept_Derived
   --# bind accept_root_types Accept_Root_Types
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Actual_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Fld : Boolean;
If_Result : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
If_Result_1 : Boolean;
Fld_3 : Boolean;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Internal_Entity_Base_Type_Decl;
Fld_8 : Boolean;
If_Result_4 : Boolean;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Boolean;
If_Result_5 : Boolean;
Fld_11 : Boolean;
Fld_12 : Internal_Entity_Base_Type_Decl;
Fld_13 : Boolean;
If_Result_6 : Boolean;
If_Result_7 : Boolean;
Fld_14 : Internal_Entity_Base_Type_Decl;
Fld_15 : Boolean;
If_Result_8 : Boolean;
If_Result_9 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_10 : Boolean;
Fld_16 : Internal_Entity_Expr;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_17 : Internal_Entity_Base_Type_Decl;
Fld_18 : Boolean;
If_Result_11 : Boolean;
If_Result_12 : Boolean;
Fld_19 : Boolean;
If_Result_13 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4497 '<Let at nodes.lkt:7959:9>' Let_Result ada/nodes.lkt:7959
--# scope-start
Local_Actual_Type := Ent; 
--# bind actual_type Local_Actual_Type
--# expr-start 4496 '<BooleanBinaryOp Or at nodes.lkt:7961:9>' If_Result_13 ada/nodes.lkt:7961
--# expr-start 4494 '<BooleanBinaryOp Or at nodes.lkt:7961:9>' If_Result_12 ada/nodes.lkt:7961
--# expr-start 4487 '<BooleanBinaryOp Or at nodes.lkt:7961:9>' If_Result_10 ada/nodes.lkt:7961
--# expr-start 4470 '<BooleanBinaryOp Or at nodes.lkt:7961:9>' If_Result_3 ada/nodes.lkt:7961
--# expr-start 4465 '<BooleanBinaryOp And at nodes.lkt:7962:13>' If_Result_1 ada/nodes.lkt:7962
--# expr-start 4462 '<BooleanBinaryOp Or at nodes.lkt:7962:14>' If_Result ada/nodes.lkt:7962
--# expr-start 4461 '<FieldAccess for is_classwide at nodes.lkt:7962:14>' Fld ada/nodes.lkt:7962
      if Formal_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Formal_Type.Node, E_Info => Formal_Type.Info);
--# end
--# expr-done 4461
if Fld then
   If_Result := True;
else
   If_Result := Accept_Derived;
end if;
--# expr-done 4462
if If_Result then
   --# expr-start 4464 '<FieldAccess for is_derived_type at nodes.lkt:7963:17>' Fld_2 ada/nodes.lkt:7963
--# expr-start 4463 '<FieldAccess for specific_type at nodes.lkt:7963:17>' Fld_1 ada/nodes.lkt:7963
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Local_Actual_Type.Node, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4463
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_derived_type
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Is_Derived_Type (Node => Fld_1.Node, Other_Type => Formal_Type, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 4464
   If_Result_1 := Fld_2;
else
   If_Result_1 := False;
end if;
--# expr-done 4465
if If_Result_1 then
   If_Result_3 := True;
else
   --# expr-start 4469 '<BooleanBinaryOp And at nodes.lkt:7966:13>' If_Result_2 ada/nodes.lkt:7966
--# expr-start 4466 '<FieldAccess for is_classwide at nodes.lkt:7966:13>' Fld_3 ada/nodes.lkt:7966
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Local_Actual_Type.Node, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4466
if Fld_3 then
   --# expr-start 4468 '<FieldAccess for matching_type at nodes.lkt:7967:17>' Fld_5 ada/nodes.lkt:7967
--# expr-start 4467 '<FieldAccess for specific_type at nodes.lkt:7967:17>' Fld_4 ada/nodes.lkt:7967
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Local_Actual_Type.Node, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4467
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Fld_4.Node, Expected_Type => Formal_Type, Origin => Origin, E_Info => Fld_4.Info);
--# end
--# expr-done 4468
   If_Result_2 := Fld_5;
else
   If_Result_2 := False;
end if;
--# expr-done 4469
   If_Result_3 := If_Result_2;
end if;
--# expr-done 4470
if If_Result_3 then
   If_Result_10 := True;
else
--# expr-start 4471 '<FieldAccess for accessed_type at nodes.lkt:7971:13>' Fld_6 ada/nodes.lkt:7971
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Local_Actual_Type.Node, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4471
Var_Expr_0 := Fld_6;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind actual_accessed_type Var_Expr_0
--# expr-start 4472 '<FieldAccess for accessed_type at nodes.lkt:7973:17>' Fld_7 ada/nodes.lkt:7973
      if Formal_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Formal_Type.Node, Origin => Origin, E_Info => Formal_Type.Info);
--# end
--# expr-done 4472
Var_Expr_1 := Fld_7;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind formal_accessed_type Var_Expr_1
--# expr-start 4486 '<BooleanBinaryOp Or at nodes.lkt:7975:21>' If_Result_9 ada/nodes.lkt:7975
--# expr-start 4482 '<BooleanBinaryOp Or at nodes.lkt:7975:21>' If_Result_7 ada/nodes.lkt:7975
--# expr-start 4477 '<BooleanBinaryOp And at nodes.lkt:7976:25>' If_Result_5 ada/nodes.lkt:7976
--# expr-start 4474 '<BooleanBinaryOp Or at nodes.lkt:7976:26>' If_Result_4 ada/nodes.lkt:7976
--# expr-start 4473 '<FieldAccess for is_classwide at nodes.lkt:7976:26>' Fld_8 ada/nodes.lkt:7976
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_8 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 4473
if Fld_8 then
   If_Result_4 := True;
else
   If_Result_4 := Accept_Derived;
end if;
--# expr-done 4474
if If_Result_4 then
   --# expr-start 4476 '<FieldAccess for is_derived_type at nodes.lkt:7977:29>' Fld_10 ada/nodes.lkt:7977
--# expr-start 4475 '<FieldAccess for specific_type at nodes.lkt:7977:29>' Fld_9 ada/nodes.lkt:7977
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_9 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4475
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_derived_type
Fld_10 := Libadalang.Implementation.Base_Type_Decl_P_Is_Derived_Type (Node => Fld_9.Node, Other_Type => Var_Expr_1, Origin => Origin, E_Info => Fld_9.Info);
--# end
--# expr-done 4476
   If_Result_5 := Fld_10;
else
   If_Result_5 := False;
end if;
--# expr-done 4477
if If_Result_5 then
   If_Result_7 := True;
else
   --# expr-start 4481 '<BooleanBinaryOp And at nodes.lkt:7981:25>' If_Result_6 ada/nodes.lkt:7981
--# expr-start 4478 '<FieldAccess for is_classwide at nodes.lkt:7981:25>' Fld_11 ada/nodes.lkt:7981
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_11 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4478
if Fld_11 then
   --# expr-start 4480 '<FieldAccess for matching_type at nodes.lkt:7982:29>' Fld_13 ada/nodes.lkt:7982
--# expr-start 4479 '<FieldAccess for specific_type at nodes.lkt:7982:29>' Fld_12 ada/nodes.lkt:7982
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_12 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4479
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_13 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Fld_12.Node, Expected_Type => Var_Expr_1, Origin => Origin, E_Info => Fld_12.Info);
--# end
--# expr-done 4480
   If_Result_6 := Fld_13;
else
   If_Result_6 := False;
end if;
--# expr-done 4481
   If_Result_7 := If_Result_6;
end if;
--# expr-done 4482
if If_Result_7 then
   If_Result_9 := True;
else
   --# expr-start 4485 '<BooleanBinaryOp And at nodes.lkt:7990:25>' If_Result_8 ada/nodes.lkt:7990
if Accept_Root_Types then
   --# expr-start 4484 '<FieldAccess for is_derived_type at nodes.lkt:7991:29>' Fld_15 ada/nodes.lkt:7991
--# expr-start 4483 '<FieldAccess for specific_type at nodes.lkt:7991:29>' Fld_14 ada/nodes.lkt:7991
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_14 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 4483
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_derived_type
Fld_15 := Libadalang.Implementation.Base_Type_Decl_P_Is_Derived_Type (Node => Fld_14.Node, Other_Type => Var_Expr_0, Origin => Origin, E_Info => Fld_14.Info);
--# end
--# expr-done 4484
   If_Result_8 := Fld_15;
else
   If_Result_8 := False;
end if;
--# expr-done 4485
   If_Result_9 := If_Result_8;
end if;
--# expr-done 4486
Scope_Result := If_Result_9;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_10 := Result_Var_1;
end if;
--# expr-done 4487
if If_Result_10 then
   If_Result_12 := True;
else
   --# expr-start 4493 '<BooleanBinaryOp And at nodes.lkt:7998:13>' If_Result_11 ada/nodes.lkt:7998
--# expr-start 4490 '<Not at nodes.lkt:7998:13>' Not_Val ada/nodes.lkt:7998
--# expr-start 4489 '<IsNull at nodes.lkt:7998:17>' Is_Null ada/nodes.lkt:7998
--# expr-start 4488 '<FieldAccess for get_imp_deref at nodes.lkt:7998:17>' Fld_16 ada/nodes.lkt:7998
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld_16 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Local_Actual_Type.Node, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4488
Is_Null := Fld_16.Node = null; 
--# expr-done 4489
Not_Val := not (Is_Null); 
--# expr-done 4490
if Not_Val then
   --# expr-start 4492 '<FieldAccess for matching_formal_type at nodes.lkt:7999:17>' Fld_18 ada/nodes.lkt:7999
--# expr-start 4491 '<FieldAccess for accessed_type at nodes.lkt:7999:17>' Fld_17 ada/nodes.lkt:7999
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_17 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Local_Actual_Type.Node, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4491
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_18 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Fld_17.Node, Formal_Type => Formal_Type, Origin => Origin, E_Info => Fld_17.Info);
--# end
--# expr-done 4492
   If_Result_11 := Fld_18;
else
   If_Result_11 := False;
end if;
--# expr-done 4493
   If_Result_12 := If_Result_11;
end if;
--# expr-done 4494
if If_Result_12 then
   If_Result_13 := True;
else
   --# expr-start 4495 '<FieldAccess for matching_type at nodes.lkt:8001:12>' Fld_19 ada/nodes.lkt:8001
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_19 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Local_Actual_Type.Node, Expected_Type => Formal_Type, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4495
   If_Result_13 := Fld_19;
end if;
--# expr-done 4496
Let_Result := If_Result_13; 
--# end
--# expr-done 4497
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Formal_Type_Impl;
--# end
--# property-start BaseTypeDecl.matching_assign_type ada/nodes.lkt:8006
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Assign_Type
  (Node : Bare_Base_Type_Decl
      ; Expected_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind expected_type Expected_Type
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Actual_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_131 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
Fld : Boolean;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result_1 : Boolean;
Fld_4 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Fld_5 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4514 '<Let at nodes.lkt:8007:9>' Let_Result ada/nodes.lkt:8007
--# scope-start
Local_Actual_Type := Ent; 
--# bind actual_type Local_Actual_Type
--# expr-start 4513 '<BooleanBinaryOp And at nodes.lkt:8009:9>' If_Result_5 ada/nodes.lkt:8009
--# expr-start 4502 '<BooleanBinaryOp And at nodes.lkt:8009:10>' If_Result ada/nodes.lkt:8009
--# expr-start 4499 '<Not at nodes.lkt:8009:10>' Not_Val ada/nodes.lkt:8009
--# expr-start 4498 '<IsNull at nodes.lkt:8009:14>' Is_Null ada/nodes.lkt:8009
Is_Null := Self = null; 
--# expr-done 4498
Not_Val := not (Is_Null); 
--# expr-done 4499
if Not_Val then
   --# expr-start 4501 '<Not at nodes.lkt:8009:31>' Not_Val_1 ada/nodes.lkt:8009
--# expr-start 4500 '<IsNull at nodes.lkt:8009:35>' Is_Null_1 ada/nodes.lkt:8009
Is_Null_1 := Expected_Type.Node = null; 
--# expr-done 4500
Not_Val_1 := not (Is_Null_1); 
--# expr-done 4501
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4502
if If_Result then
   --# expr-start 4512 '<BooleanBinaryOp Or at nodes.lkt:8011:13>' If_Result_4 ada/nodes.lkt:8011
--# expr-start 4510 '<BooleanBinaryOp Or at nodes.lkt:8011:13>' If_Result_3 ada/nodes.lkt:8011
--# expr-start 4503 '<FieldAccess for matching_type at nodes.lkt:8011:13>' Fld ada/nodes.lkt:8011
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Ent.Node, Expected_Type => Expected_Type, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4503
if Fld then
   If_Result_3 := True;
else
   --# expr-start 4509 '<BooleanBinaryOp And at nodes.lkt:8013:17>' If_Result_2 ada/nodes.lkt:8013
--# expr-start 4507 '<BooleanBinaryOp Or at nodes.lkt:8014:21>' If_Result_1 ada/nodes.lkt:8014
--# expr-start 4504 '<FieldAccess for is_classwide at nodes.lkt:8014:21>' Fld_1 ada/nodes.lkt:8014
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Expected_Type.Node, E_Info => Expected_Type.Info);
--# end
--# expr-done 4504
if Fld_1 then
   If_Result_1 := True;
else
--# expr-start 4505 '<FieldAccess for accessed_type at nodes.lkt:8015:24>' Fld_2 ada/nodes.lkt:8015
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Expected_Type.Node, Origin => Origin, E_Info => Expected_Type.Info);
--# end
--# expr-done 4505
Var_Expr_131 := Fld_2;
if Var_Expr_131 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4506 '<FieldAccess for is_classwide at nodes.lkt:8015:24>' Fld_3 ada/nodes.lkt:8015
      if Var_Expr_131.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Var_Expr_131.Node, E_Info => Var_Expr_131.Info);
--# end
--# expr-done 4506
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result_1 := Result_Var;
end if;
--# expr-done 4507
if If_Result_1 then
   --# expr-start 4508 '<FieldAccess for matching_formal_prim_type at nodes.lkt:8017:21>' Fld_4 ada/nodes.lkt:8017
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_formal_prim_type
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Prim_Type (Node => Local_Actual_Type.Node, Formal_Type => Expected_Type, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4508
   If_Result_2 := Fld_4;
else
   If_Result_2 := False;
end if;
--# expr-done 4509
   If_Result_3 := If_Result_2;
end if;
--# expr-done 4510
if If_Result_3 then
   If_Result_4 := True;
else
   --# expr-start 4511 '<FieldAccess for matching_access_type at nodes.lkt:8019:16>' Fld_5 ada/nodes.lkt:8019
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_access_type
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Access_Type (Node => Ent.Node, Expected_Type => Expected_Type, For_Assignment => True, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4511
   If_Result_4 := Fld_5;
end if;
--# expr-done 4512
   If_Result_5 := If_Result_4;
else
   If_Result_5 := False;
end if;
--# expr-done 4513
Let_Result := If_Result_5; 
--# end
--# expr-done 4514
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Assign_Type;
--# end
--# property-start BaseTypeDecl.matching_type ada/nodes.lkt:8027
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Type
  (Node : Bare_Base_Type_Decl
      ; Expected_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind expected_type Expected_Type
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Actual_Type : Internal_Entity_Base_Type_Decl;
Local_Uit : Internal_Entity_Base_Type_Decl;
Local_Urt : Internal_Entity_Base_Type_Decl;
Local_Uft : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
Fld : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Fld_1 : Boolean;
If_Result_1 : Boolean;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Cast_Expr_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Is_Equiv_1 : Boolean;
Fld_2 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Let_Result : Boolean;
Fld_3 : Internal_Entity_Base_Type_Decl;
Cast_Expr_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Cast_Expr_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Is_Equiv_2 : Boolean;
Fld_4 : Boolean;
If_Result_4 : Boolean;
Cast_Expr_6 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity;
Cast_Expr_7 : Internal_Entity_Base_Type_Decl;
Cast_Result_7 : Internal_Entity;
Is_Equiv_3 : Boolean;
Fld_5 : Boolean;
If_Result_5 : Boolean;
If_Result_6 : Boolean;
Let_Result_1 : Boolean;
If_Result_7 : Boolean;
Fld_6 : Internal_Entity_Base_Type_Decl;
Cast_Expr_8 : Internal_Entity_Base_Type_Decl;
Cast_Result_8 : Internal_Entity;
Cast_Expr_9 : Internal_Entity_Base_Type_Decl;
Cast_Result_9 : Internal_Entity;
Is_Equiv_4 : Boolean;
Fld_7 : Boolean;
If_Result_8 : Boolean;
Cast_Expr_10 : Internal_Entity_Base_Type_Decl;
Cast_Result_10 : Internal_Entity;
Cast_Expr_11 : Internal_Entity_Base_Type_Decl;
Cast_Result_11 : Internal_Entity;
Is_Equiv_5 : Boolean;
Fld_8 : Boolean;
If_Result_9 : Boolean;
If_Result_10 : Boolean;
Let_Result_2 : Boolean;
If_Result_11 : Boolean;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Internal_Entity_Base_Type_Decl;
Cast_Result_12 : Internal_Entity;
Cast_Result_13 : Internal_Entity;
Is_Equiv_6 : Boolean;
If_Result_12 : Boolean;
Fld_11 : Internal_Entity_Expr;
Is_Null_2 : Boolean;
Not_Val_2 : Boolean;
Fld_12 : Internal_Entity_Base_Type_Decl;
Fld_13 : Boolean;
If_Result_13 : Boolean;
If_Result_14 : Boolean;
Fld_14 : Internal_Entity_Expr;
Is_Null_3 : Boolean;
Not_Val_3 : Boolean;
Fld_15 : Internal_Entity_Base_Type_Decl;
Fld_16 : Boolean;
If_Result_15 : Boolean;
If_Result_16 : Boolean;
Fld_17 : Boolean;
If_Result_17 : Boolean;
If_Result_18 : Boolean;
Let_Result_3 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4570 '<Let at nodes.lkt:8028:9>' Let_Result_3 ada/nodes.lkt:8028
--# scope-start
Local_Actual_Type := Ent; 
--# bind actual_type Local_Actual_Type
--# expr-start 4569 '<BooleanBinaryOp And at nodes.lkt:8030:9>' If_Result_18 ada/nodes.lkt:8030
--# expr-start 4519 '<BooleanBinaryOp And at nodes.lkt:8030:9>' If_Result ada/nodes.lkt:8030
--# expr-start 4516 '<Not at nodes.lkt:8030:9>' Not_Val ada/nodes.lkt:8030
--# expr-start 4515 '<IsNull at nodes.lkt:8030:13>' Is_Null ada/nodes.lkt:8030
Is_Null := Expected_Type.Node = null; 
--# expr-done 4515
Not_Val := not (Is_Null); 
--# expr-done 4516
if Not_Val then
   --# expr-start 4518 '<Not at nodes.lkt:8030:39>' Not_Val_1 ada/nodes.lkt:8030
--# expr-start 4517 '<IsNull at nodes.lkt:8030:43>' Is_Null_1 ada/nodes.lkt:8030
Is_Null_1 := Local_Actual_Type.Node = null; 
--# expr-done 4517
Not_Val_1 := not (Is_Null_1); 
--# expr-done 4518
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 4519
if If_Result then
   --# expr-start 4568 '<BooleanBinaryOp Or at nodes.lkt:8032:13>' If_Result_17 ada/nodes.lkt:8032
--# expr-start 4566 '<BooleanBinaryOp Or at nodes.lkt:8032:13>' If_Result_16 ada/nodes.lkt:8032
--# expr-start 4559 '<BooleanBinaryOp Or at nodes.lkt:8032:13>' If_Result_14 ada/nodes.lkt:8032
--# expr-start 4552 '<BooleanBinaryOp Or at nodes.lkt:8032:13>' If_Result_12 ada/nodes.lkt:8032
--# expr-start 4548 '<BooleanBinaryOp Or at nodes.lkt:8032:13>' If_Result_11 ada/nodes.lkt:8032
--# expr-start 4538 '<BooleanBinaryOp Or at nodes.lkt:8032:13>' If_Result_7 ada/nodes.lkt:8032
--# expr-start 4528 '<Let at nodes.lkt:8033:17>' Let_Result ada/nodes.lkt:8033
--# scope-start
--# expr-start 4520 '<FieldAccess for universal_int_type at nodes.lkt:8033:27>' Fld ada/nodes.lkt:8033
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Self);
--# end
--# expr-done 4520
Local_Uit := Fld; 
--# bind uit Local_Uit
--# expr-start 4527 '<BooleanBinaryOp Or at nodes.lkt:8035:17>' If_Result_3 ada/nodes.lkt:8035
--# expr-start 4523 '<BooleanBinaryOp And at nodes.lkt:8035:18>' If_Result_1 ada/nodes.lkt:8035
--# expr-start 4521 '<Eq at nodes.lkt:8035:18>' Is_Equiv ada/nodes.lkt:8035
Cast_Expr := Local_Actual_Type; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Local_Uit; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 4521
if Is_Equiv then
   --# expr-start 4522 '<FieldAccess for allows_universal_int at nodes.lkt:8035:41>' Fld_1 ada/nodes.lkt:8035
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.allows_universal_int
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Allows_Universal_Int (Node => Expected_Type.Node, Origin => Origin, E_Info => Expected_Type.Info);
--# end
--# expr-done 4522
   If_Result_1 := Fld_1;
else
   If_Result_1 := False;
end if;
--# expr-done 4523
if If_Result_1 then
   If_Result_3 := True;
else
   --# expr-start 4526 '<BooleanBinaryOp And at nodes.lkt:8036:21>' If_Result_2 ada/nodes.lkt:8036
--# expr-start 4524 '<Eq at nodes.lkt:8036:21>' Is_Equiv_1 ada/nodes.lkt:8036
Cast_Expr_2 := Expected_Type; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Cast_Expr_3 := Local_Uit; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
Is_Equiv_1 := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 4524
if Is_Equiv_1 then
   --# expr-start 4525 '<FieldAccess for is_int_type at nodes.lkt:8036:46>' Fld_2 ada/nodes.lkt:8036
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_int_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Int_Type (Node => Local_Actual_Type.Node, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4525
   If_Result_2 := Fld_2;
else
   If_Result_2 := False;
end if;
--# expr-done 4526
   If_Result_3 := If_Result_2;
end if;
--# expr-done 4527
Let_Result := If_Result_3; 
--# end
--# expr-done 4528
if Let_Result then
   If_Result_7 := True;
else
   --# expr-start 4537 '<Let at nodes.lkt:8039:17>' Let_Result_1 ada/nodes.lkt:8039
--# scope-start
--# expr-start 4529 '<FieldAccess for universal_real_type at nodes.lkt:8039:27>' Fld_3 ada/nodes.lkt:8039
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_real_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Type (Node => Self);
--# end
--# expr-done 4529
Local_Urt := Fld_3; 
--# bind urt Local_Urt
--# expr-start 4536 '<BooleanBinaryOp Or at nodes.lkt:8041:17>' If_Result_6 ada/nodes.lkt:8041
--# expr-start 4532 '<BooleanBinaryOp And at nodes.lkt:8041:18>' If_Result_4 ada/nodes.lkt:8041
--# expr-start 4530 '<Eq at nodes.lkt:8041:18>' Is_Equiv_2 ada/nodes.lkt:8041
Cast_Expr_4 := Local_Actual_Type; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
Cast_Expr_5 := Local_Urt; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_5.Node,
         Info => Cast_Expr_5.Info);
Is_Equiv_2 := Equivalent (Cast_Result_4, Cast_Result_5); 
--# expr-done 4530
if Is_Equiv_2 then
   --# expr-start 4531 '<FieldAccess for allows_universal_real at nodes.lkt:8041:41>' Fld_4 ada/nodes.lkt:8041
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.allows_universal_real
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Allows_Universal_Real (Node => Expected_Type.Node, Origin => Origin, E_Info => Expected_Type.Info);
--# end
--# expr-done 4531
   If_Result_4 := Fld_4;
else
   If_Result_4 := False;
end if;
--# expr-done 4532
if If_Result_4 then
   If_Result_6 := True;
else
   --# expr-start 4535 '<BooleanBinaryOp And at nodes.lkt:8042:21>' If_Result_5 ada/nodes.lkt:8042
--# expr-start 4533 '<Eq at nodes.lkt:8042:21>' Is_Equiv_3 ada/nodes.lkt:8042
Cast_Expr_6 := Expected_Type; 
      Cast_Result_6 := Create_Internal_Entity
        (Node => Cast_Expr_6.Node,
         Info => Cast_Expr_6.Info);
Cast_Expr_7 := Local_Urt; 
      Cast_Result_7 := Create_Internal_Entity
        (Node => Cast_Expr_7.Node,
         Info => Cast_Expr_7.Info);
Is_Equiv_3 := Equivalent (Cast_Result_6, Cast_Result_7); 
--# expr-done 4533
if Is_Equiv_3 then
   --# expr-start 4534 '<FieldAccess for is_real_type at nodes.lkt:8042:46>' Fld_5 ada/nodes.lkt:8042
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_real_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Real_Type (Node => Local_Actual_Type.Node, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4534
   If_Result_5 := Fld_5;
else
   If_Result_5 := False;
end if;
--# expr-done 4535
   If_Result_6 := If_Result_5;
end if;
--# expr-done 4536
Let_Result_1 := If_Result_6; 
--# end
--# expr-done 4537
   If_Result_7 := Let_Result_1;
end if;
--# expr-done 4538
if If_Result_7 then
   If_Result_11 := True;
else
   --# expr-start 4547 '<Let at nodes.lkt:8045:17>' Let_Result_2 ada/nodes.lkt:8045
--# scope-start
--# expr-start 4539 '<FieldAccess for universal_fixed_type at nodes.lkt:8045:27>' Fld_6 ada/nodes.lkt:8045
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_fixed_type
Fld_6 := Libadalang.Implementation.Ada_Node_P_Universal_Fixed_Type (Node => Self);
--# end
--# expr-done 4539
Local_Uft := Fld_6; 
--# bind uft Local_Uft
--# expr-start 4546 '<BooleanBinaryOp Or at nodes.lkt:8047:17>' If_Result_10 ada/nodes.lkt:8047
--# expr-start 4542 '<BooleanBinaryOp And at nodes.lkt:8047:18>' If_Result_8 ada/nodes.lkt:8047
--# expr-start 4540 '<Eq at nodes.lkt:8047:18>' Is_Equiv_4 ada/nodes.lkt:8047
Cast_Expr_8 := Expected_Type; 
      Cast_Result_8 := Create_Internal_Entity
        (Node => Cast_Expr_8.Node,
         Info => Cast_Expr_8.Info);
Cast_Expr_9 := Local_Uft; 
      Cast_Result_9 := Create_Internal_Entity
        (Node => Cast_Expr_9.Node,
         Info => Cast_Expr_9.Info);
Is_Equiv_4 := Equivalent (Cast_Result_8, Cast_Result_9); 
--# expr-done 4540
if Is_Equiv_4 then
   --# expr-start 4541 '<FieldAccess for is_fixed_point at nodes.lkt:8047:43>' Fld_7 ada/nodes.lkt:8047
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_fixed_point'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Fixed_Point (Node => Local_Actual_Type.Node, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4541
   If_Result_8 := Fld_7;
else
   If_Result_8 := False;
end if;
--# expr-done 4542
if If_Result_8 then
   If_Result_10 := True;
else
   --# expr-start 4545 '<BooleanBinaryOp And at nodes.lkt:8048:21>' If_Result_9 ada/nodes.lkt:8048
--# expr-start 4543 '<Eq at nodes.lkt:8048:21>' Is_Equiv_5 ada/nodes.lkt:8048
Cast_Expr_10 := Local_Actual_Type; 
      Cast_Result_10 := Create_Internal_Entity
        (Node => Cast_Expr_10.Node,
         Info => Cast_Expr_10.Info);
Cast_Expr_11 := Local_Uft; 
      Cast_Result_11 := Create_Internal_Entity
        (Node => Cast_Expr_11.Node,
         Info => Cast_Expr_11.Info);
Is_Equiv_5 := Equivalent (Cast_Result_10, Cast_Result_11); 
--# expr-done 4543
if Is_Equiv_5 then
   --# expr-start 4544 '<FieldAccess for is_fixed_point at nodes.lkt:8048:44>' Fld_8 ada/nodes.lkt:8048
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_fixed_point'
Fld_8 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Fixed_Point (Node => Expected_Type.Node, Origin => Origin, E_Info => Expected_Type.Info);
--# end
--# expr-done 4544
   If_Result_9 := Fld_8;
else
   If_Result_9 := False;
end if;
--# expr-done 4545
   If_Result_10 := If_Result_9;
end if;
--# expr-done 4546
Let_Result_2 := If_Result_10; 
--# end
--# expr-done 4547
   If_Result_11 := Let_Result_2;
end if;
--# expr-done 4548
if If_Result_11 then
   If_Result_12 := True;
else
   --# expr-start 4551 '<Eq at nodes.lkt:8050:16>' Is_Equiv_6 ada/nodes.lkt:8050
--# expr-start 4549 '<FieldAccess for canonical_type at nodes.lkt:8050:16>' Fld_9 ada/nodes.lkt:8050
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_9 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Local_Actual_Type.Node, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4549
      Cast_Result_12 := Create_Internal_Entity
        (Node => Fld_9.Node,
         Info => Fld_9.Info);
--# expr-start 4550 '<FieldAccess for canonical_type at nodes.lkt:8050:48>' Fld_10 ada/nodes.lkt:8050
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_10 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Expected_Type.Node, Origin => Origin, E_Info => Expected_Type.Info);
--# end
--# expr-done 4550
      Cast_Result_13 := Create_Internal_Entity
        (Node => Fld_10.Node,
         Info => Fld_10.Info);
Is_Equiv_6 := Equivalent (Cast_Result_12, Cast_Result_13); 
--# expr-done 4551
   If_Result_12 := Is_Equiv_6;
end if;
--# expr-done 4552
if If_Result_12 then
   If_Result_14 := True;
else
   --# expr-start 4558 '<BooleanBinaryOp And at nodes.lkt:8052:17>' If_Result_13 ada/nodes.lkt:8052
--# expr-start 4555 '<Not at nodes.lkt:8052:17>' Not_Val_2 ada/nodes.lkt:8052
--# expr-start 4554 '<IsNull at nodes.lkt:8052:21>' Is_Null_2 ada/nodes.lkt:8052
--# expr-start 4553 '<FieldAccess for get_imp_deref at nodes.lkt:8052:21>' Fld_11 ada/nodes.lkt:8052
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld_11 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Local_Actual_Type.Node, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4553
Is_Null_2 := Fld_11.Node = null; 
--# expr-done 4554
Not_Val_2 := not (Is_Null_2); 
--# expr-done 4555
if Not_Val_2 then
   --# expr-start 4557 '<FieldAccess for matching_type at nodes.lkt:8053:21>' Fld_13 ada/nodes.lkt:8053
--# expr-start 4556 '<FieldAccess for accessed_type at nodes.lkt:8053:21>' Fld_12 ada/nodes.lkt:8053
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_12 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Local_Actual_Type.Node, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4556
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_13 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Fld_12.Node, Expected_Type => Expected_Type, Origin => Origin, E_Info => Fld_12.Info);
--# end
--# expr-done 4557
   If_Result_13 := Fld_13;
else
   If_Result_13 := False;
end if;
--# expr-done 4558
   If_Result_14 := If_Result_13;
end if;
--# expr-done 4559
if If_Result_14 then
   If_Result_16 := True;
else
   --# expr-start 4565 '<BooleanBinaryOp And at nodes.lkt:8056:17>' If_Result_15 ada/nodes.lkt:8056
--# expr-start 4562 '<Not at nodes.lkt:8056:17>' Not_Val_3 ada/nodes.lkt:8056
--# expr-start 4561 '<IsNull at nodes.lkt:8056:21>' Is_Null_3 ada/nodes.lkt:8056
--# expr-start 4560 '<FieldAccess for get_imp_deref at nodes.lkt:8056:21>' Fld_14 ada/nodes.lkt:8056
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld_14 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Expected_Type.Node, E_Info => Expected_Type.Info);
--# end
--# expr-done 4560
Is_Null_3 := Fld_14.Node = null; 
--# expr-done 4561
Not_Val_3 := not (Is_Null_3); 
--# expr-done 4562
if Not_Val_3 then
   --# expr-start 4564 '<FieldAccess for matching_type at nodes.lkt:8057:21>' Fld_16 ada/nodes.lkt:8057
--# expr-start 4563 '<FieldAccess for accessed_type at nodes.lkt:8057:21>' Fld_15 ada/nodes.lkt:8057
      if Expected_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_15 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Expected_Type.Node, Origin => Origin, E_Info => Expected_Type.Info);
--# end
--# expr-done 4563
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_16 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Fld_15.Node, Expected_Type => Local_Actual_Type, Origin => Origin, E_Info => Fld_15.Info);
--# end
--# expr-done 4564
   If_Result_15 := Fld_16;
else
   If_Result_15 := False;
end if;
--# expr-done 4565
   If_Result_16 := If_Result_15;
end if;
--# expr-done 4566
if If_Result_16 then
   If_Result_17 := True;
else
   --# expr-start 4567 '<FieldAccess for matching_access_type at nodes.lkt:8059:16>' Fld_17 ada/nodes.lkt:8059
      if Local_Actual_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_access_type
Fld_17 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Access_Type (Node => Local_Actual_Type.Node, Expected_Type => Expected_Type, For_Assignment => False, Origin => Origin, E_Info => Local_Actual_Type.Info);
--# end
--# expr-done 4567
   If_Result_17 := Fld_17;
end if;
--# expr-done 4568
   If_Result_18 := If_Result_17;
else
   If_Result_18 := False;
end if;
--# expr-done 4569
Let_Result_3 := If_Result_18; 
--# end
--# expr-done 4570
         Property_Result := Let_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Type;
--# end
--# property-start BaseTypeDecl.matching_allocator_type ada/nodes.lkt:8064
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Matching_Allocator_Type
  (Node : Bare_Base_Type_Decl
      ; Allocated_Type : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind allocated_type Allocated_Type
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4574 '<BooleanBinaryOp And at nodes.lkt:8065:9>' If_Result ada/nodes.lkt:8065
--# expr-start 4571 '<FieldAccess for is_access_type at nodes.lkt:8065:9>' Fld ada/nodes.lkt:8065
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_access_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Access_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4571
if Fld then
   --# expr-start 4573 '<FieldAccess for matching_formal_type at nodes.lkt:8066:13>' Fld_2 ada/nodes.lkt:8066
      if Allocated_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4572 '<FieldAccess for accessed_type at nodes.lkt:8066:49>' Fld_1 ada/nodes.lkt:8066
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4572
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Allocated_Type.Node, Formal_Type => Fld_1, Origin => Origin, E_Info => Allocated_Type.Info);
--# end
--# expr-done 4573
   If_Result := Fld_2;
else
   If_Result := False;
end if;
--# expr-done 4574
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Matching_Allocator_Type;
--# end
--# property-start BaseTypeDecl.derives_from_std_bool_type ada/nodes.lkt:8072
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Derives_From_Std_Bool_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Is_Null : Boolean;
Not_Val : Boolean;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4580 '<BooleanBinaryOp And at nodes.lkt:8073:9>' If_Result ada/nodes.lkt:8073
--# expr-start 4576 '<Not at nodes.lkt:8073:9>' Not_Val ada/nodes.lkt:8073
--# expr-start 4575 '<IsNull at nodes.lkt:8073:13>' Is_Null ada/nodes.lkt:8073
Is_Null := Self = null; 
--# expr-done 4575
Not_Val := not (Is_Null); 
--# expr-done 4576
if Not_Val then
   --# expr-start 4579 '<FieldAccess for is_derived_type at nodes.lkt:8074:13>' Fld_2 ada/nodes.lkt:8074
--# expr-start 4577 '<FieldAccess for derefed_base_subtype at nodes.lkt:8074:13>' Fld ada/nodes.lkt:8074
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.derefed_base_subtype
Fld := Libadalang.Implementation.Base_Type_Decl_P_Derefed_Base_Subtype (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4577
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4578 '<FieldAccess for bool_type at nodes.lkt:8074:57>' Fld_1 ada/nodes.lkt:8074
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 4578
--# property-call-start BaseTypeDecl.is_derived_type
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Is_Derived_Type (Node => Fld.Node, Other_Type => Fld_1, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4579
   If_Result := Fld_2;
else
   If_Result := False;
end if;
--# expr-done 4580
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Derives_From_Std_Bool_Type;
--# end
--# property-start BaseTypeDecl.classwide_type_node ada/nodes.lkt:8077
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Classwide_Type_Node
  (Node : Bare_Base_Type_Decl
  )
   return Bare_Classwide_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Classwide_Type_Decl;
      Fld : Bare_Defining_Name;
New_Node : Bare_Classwide_Type_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Classwide_Type_Node,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Bare_Classwide_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4582 '<New ClasswideTypeDecl at nodes.lkt:8078:9>' New_Node ada/nodes.lkt:8078
--# expr-start 4581 '<FieldAccess for name at nodes.lkt:8078:32>' Fld ada/nodes.lkt:8078
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Base_Type_Decl_F_Name;
--# expr-done 4581
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
New_Node := new Root_Node_Record
  (Ada_Classwide_Type_Decl);
Initialize
  (Self => New_Node,
   Kind => Ada_Classwide_Type_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Classwide_Type_Decl
     (Self => New_Node,
      Base_Type_Decl_F_Name => Fld);
--# expr-done 4582
         Property_Result := New_Node;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Bare_Classwide_Type_Decl,
                        As_Bare_Classwide_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Classwide_Type_Node;
--# end
--# property-start BaseTypeDecl.scalar_base_subtype_node ada/nodes.lkt:8083
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Scalar_Base_Subtype_Node
  (Node : Bare_Base_Type_Decl
  )
   return Bare_Discrete_Base_Subtype_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Discrete_Base_Subtype_Decl;
      Fld : Bare_Defining_Name;
New_Node : Bare_Discrete_Base_Subtype_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Scalar_Base_Subtype_Node,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Bare_Discrete_Base_Subtype_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4584 '<New DiscreteBaseSubtypeDecl at nodes.lkt:8084:9>' New_Node ada/nodes.lkt:8084
--# expr-start 4583 '<FieldAccess for name at nodes.lkt:8084:38>' Fld ada/nodes.lkt:8084
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Base_Type_Decl_F_Name;
--# expr-done 4583
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
New_Node := new Root_Node_Record
  (Ada_Discrete_Base_Subtype_Decl);
Initialize
  (Self => New_Node,
   Kind => Ada_Discrete_Base_Subtype_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Discrete_Base_Subtype_Decl
     (Self => New_Node,
      Base_Type_Decl_F_Name => Fld);
--# expr-done 4584
         Property_Result := New_Node;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Bare_Discrete_Base_Subtype_Decl,
                        As_Bare_Discrete_Base_Subtype_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Scalar_Base_Subtype_Node;
--# end
--# property-start BaseTypeDecl.scalar_base_subtype ada/nodes.lkt:8088
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Scalar_Base_Subtype
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Discrete_Base_Subtype_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Discrete_Base_Subtype_Decl;
      Fld : Bare_Discrete_Base_Subtype_Decl;
As_Entity : Internal_Entity_Discrete_Base_Subtype_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Discrete_Base_Subtype_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4586 '<as_entity at nodes.lkt:8089:9>' If_Result ada/nodes.lkt:8089
--# expr-start 4585 '<FieldAccess for scalar_base_subtype_node at nodes.lkt:8089:9>' Fld ada/nodes.lkt:8089
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.scalar_base_subtype_node
Fld := Libadalang.Implementation.Base_Type_Decl_P_Scalar_Base_Subtype_Node (Node => Self);
--# end
--# expr-done 4585
Is_Null := Fld = null; 
if Is_Null then
   If_Result := No_Entity_Discrete_Base_Subtype_Decl;
else
As_Entity := (Info => E_Info, Node => Fld); 
   If_Result := As_Entity;
end if;
--# expr-done 4586
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Scalar_Base_Subtype;
--# end
--# property-start BaseTypeDecl.previous_part ada/nodes.lkt:8094
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Previous_Part
  (Node : Bare_Base_Type_Decl
      ; Go_To_Incomplete : Boolean
         := True
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind go_to_incomplete Go_To_Incomplete
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_2547 with Inline_Always;
            procedure Finalizer_Scope_2548 with Inline_Always;
      Var_Expr_0 : Bare_Defining_Name;
Var_Expr_1 : Internal_Entity_Array_Access;
Var_Expr_3 : Internal_Entity_Base_Type_Decl;
Var_Expr_132 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Classwide_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Classwide_Type_Decl;
Scope_Result : Internal_Entity_Classwide_Type_Decl;
Result_Var : Internal_Entity_Classwide_Type_Decl;
Fld_3 : Bare_Defining_Name;
Fld_4 : Internal_Entity;
Fld_5 : Lexical_Env := Empty_Env;
Fld_6 : Symbol_Type;
Cast_Expr_1 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Env_Get_Result : Internal_Entity_Array_Access;
Fld_7 : Boolean;
Cast_Expr_2 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Fld_8 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result : Boolean;
Is_A : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Find_Result : Internal_Entity;
Scope_Result_2 : Internal_Entity;
Result_Var_2 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity_Base_Type_Decl;
Is_A_1 : Boolean;
If_Result_3 : Internal_Entity_Base_Type_Decl;
Fld_9 : Boolean;
If_Result_4 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_2547 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Env_Get_Result);
            end Finalizer_Scope_2547;
            procedure Finalizer_Scope_2548 is
            begin
                     Dec_Ref (Var_Expr_1);
            end Finalizer_Scope_2548;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Previous_Part,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Go_To_Incomplete);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4608 '<If at nodes.lkt:8095:9>' If_Result_4 ada/nodes.lkt:8095
--# expr-start 4587 '<FieldAccess for is_generic_formal at nodes.lkt:8095:12>' Fld_9 ada/nodes.lkt:8095
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_generic_formal
Fld_9 := Libadalang.Implementation.Base_Type_Decl_P_Is_Generic_Formal (Node => Self);
--# end
--# expr-done 4587
if Fld_9 then
   If_Result_4 := No_Entity_Base_Type_Decl;
else
   --# expr-start 4607 '<If at nodes.lkt:8095:9>' If_Result_3 ada/nodes.lkt:8095
--# expr-start 4588 '<IsA ClasswideTypeDecl at nodes.lkt:8100:14>' Is_A_1 ada/nodes.lkt:8100
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Classwide_Type_Decl_Range; 
--# expr-done 4588
if Is_A_1 then
--# expr-start 4591 '<FieldAccess for previous_part at nodes.lkt:8102:13>' Fld_1 ada/nodes.lkt:8102
--# expr-start 4590 '<FieldAccess for type_decl at nodes.lkt:8102:13>' Fld ada/nodes.lkt:8102
--# expr-start 4589 '<Cast to ClasswideTypeDecl at nodes.lkt:8102:13>' Cast_Result ada/nodes.lkt:8102
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Classwide_Type_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Classwide_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Classwide_Type_Decl;
   end if;
--# expr-done 4589
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 4590
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.previous_part
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Previous_Part (Node => Fld.Node, Go_To_Incomplete => Go_To_Incomplete, E_Info => Fld.Info);
--# end
--# expr-done 4591
Var_Expr_3 := Fld_1;
if Var_Expr_3 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind pp Var_Expr_3
--# expr-start 4592 '<FieldAccess for classwide_type at nodes.lkt:8105:25>' Fld_2 ada/nodes.lkt:8105
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 4592
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Classwide_Type_Decl;
end if;
      Cast_Result_4 := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   If_Result_3 := Cast_Result_4;
else
--# expr-start 4593 '<FieldAccess for name at nodes.lkt:8109:13>' Fld_3 ada/nodes.lkt:8109
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Base_Type_Decl_F_Name;
--# expr-done 4593
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind type_name Var_Expr_0
--# expr-start 4606 '<Cast to BaseTypeDecl at nodes.lkt:8111:17>' Cast_Result_3 ada/nodes.lkt:8111
--# expr-start 4597 '<EnvGet at nodes.lkt:8111:17>' Env_Get_Result ada/nodes.lkt:8111
--# expr-start 4595 '<FieldAccess for immediate_declarative_region at nodes.lkt:8111:17>' Fld_5 ada/nodes.lkt:8111
--# expr-start 4594 '<FieldAccess for semantic_parent at nodes.lkt:8111:17>' Fld_4 ada/nodes.lkt:8111
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_4 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4594
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.immediate_declarative_region'
Fld_5 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Immediate_Declarative_Region (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 4595
--# expr-start 4596 '<FieldAccess for name_symbol at nodes.lkt:8112:21>' Fld_6 ada/nodes.lkt:8112
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Var_Expr_0);
--# end
--# expr-done 4596
Cast_Expr_1 := Self; 
      Cast_Result_1 := Cast_Expr_1;
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_5, Key => Thin (Fld_6), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => True, Nocat => True), From => Cast_Result_1)); 
--# expr-done 4597
Var_Expr_1 := Env_Get_Result;
      Inc_Ref (Var_Expr_1);
if Var_Expr_1 /= No_Internal_Entity_Array_Type then
   --# scope-start
   --# bind pp Var_Expr_1
--# expr-start 4605 '<Find at nodes.lkt:8118:21>' Find_Result ada/nodes.lkt:8118
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Var_Expr_1;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind pp Item_2
      --# expr-start 4604 '<BooleanBinaryOp Or at nodes.lkt:8120:25>' If_Result_2 ada/nodes.lkt:8120
--# expr-start 4601 '<BooleanBinaryOp And at nodes.lkt:8121:29>' If_Result ada/nodes.lkt:8121
--# expr-start 4598 '<FieldAccess for is_in_private_part at nodes.lkt:8121:29>' Fld_7 ada/nodes.lkt:8121
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4598
if Fld_7 then
--# expr-start 4599 '<Cast to BaseTypeDecl at nodes.lkt:8122:33>' Cast_Result_2 ada/nodes.lkt:8122
Cast_Expr_2 := Item_2; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_2 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 4599
Var_Expr_132 := Cast_Result_2;
if Var_Expr_132 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4600 '<FieldAccess for is_private at nodes.lkt:8122:33>' Fld_8 ada/nodes.lkt:8122
      if Var_Expr_132.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_private'
Fld_8 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Private (Node => Var_Expr_132.Node, E_Info => Var_Expr_132.Info);
--# end
--# expr-done 4600
Scope_Result_1 := Fld_8;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result := Result_Var_1;
else
   If_Result := False;
end if;
--# expr-done 4601
if If_Result then
   If_Result_2 := True;
else
   --# expr-start 4603 '<BooleanBinaryOp And at nodes.lkt:8124:29>' If_Result_1 ada/nodes.lkt:8124
if Go_To_Incomplete then
   --# expr-start 4602 '<IsA IncompleteTypeDecl at nodes.lkt:8124:50>' Is_A ada/nodes.lkt:8124
Is_A := Item_2.Node /= null 
and then Item_2.Node.Kind in Ada_Incomplete_Type_Decl_Range; 
--# expr-done 4602
   If_Result_1 := Is_A;
else
   If_Result_1 := False;
end if;
--# expr-done 4603
   If_Result_2 := If_Result_1;
end if;
--# expr-done 4604
      if If_Result_2 then
         Find_Result := Item_2; 
      end if;
   --# end
               exit when If_Result_2;
         end loop;
      end;
--# expr-done 4605
Scope_Result_2 := Find_Result;
   --# end
      Finalizer_Scope_2548;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity;
end if;
   if Result_Var_2.Node = null
      or else Result_Var_2.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var_2.Node,
         Info => Result_Var_2.Info);
   else
         Cast_Result_3 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 4606
Scope_Result_3 := Cast_Result_3;
   --# end
      Finalizer_Scope_2547;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Entity_Base_Type_Decl;
end if;
   If_Result_3 := Result_Var_3;
end if;
--# expr-done 4607
   If_Result_4 := If_Result_3;
end if;
--# expr-done 4608
         Property_Result := If_Result_4;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2547;
                     Finalizer_Scope_2548;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Previous_Part;
--# end
--# property-start BaseTypeDecl.next_part ada/nodes.lkt:8138
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Next_Part
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Incomplete_Type_Decl;
Var_Expr_0 : Bare_Declarative_Part;
Var_Expr_1 : Boolean;
Var_Expr_2 : Internal_Entity_Package_Body;
Match_1 : Internal_Entity_Classwide_Type_Decl;
Local_Td : Internal_Entity_Base_Type_Decl;
Var_Expr_3 : Internal_Entity_Base_Type_Decl;
Match_2 : Internal_Entity_Base_Type_Decl;
Var_Expr : Internal_Entity_Base_Type_Decl;
Fld : Bare_Declarative_Part;
As_Entity : Internal_Entity_Declarative_Part;
Is_Null : Boolean;
If_Result : Internal_Entity_Declarative_Part;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
Fld_3 : Bare_Declarative_Part;
Fld_4 : Bare_Ada_Node;
Cast_Result : Bare_Base_Package_Decl;
As_Entity_1 : Internal_Entity_Base_Package_Decl;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Package_Decl;
Fld_5 : Internal_Entity_Package_Body;
Fld_6 : Internal_Entity_Declarative_Part;
Fld_7 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Result_Var_3 : Internal_Entity_Base_Type_Decl;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Internal_Entity_Classwide_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
If_Result_2 : Internal_Entity_Classwide_Type_Decl;
Scope_Result_4 : Internal_Entity_Classwide_Type_Decl;
Result_Var_4 : Internal_Entity_Classwide_Type_Decl;
Let_Result : Internal_Entity_Classwide_Type_Decl;
Fld_11 : Internal_Entity_Base_Type_Decl;
Fld_12 : Boolean;
Fld_13 : Boolean;
Not_Val : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity_Incomplete_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity_Classwide_Type_Decl;
Cast_Result_5 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_6 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity_Base_Type_Decl;
Let_Result_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_7 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Next_Part,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4632 '<Match at nodes.lkt:8138:45>' Match_Result ada/nodes.lkt:8138
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Incomplete_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Incomplete_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_3; 
--# bind itd Match_0
--# expr-start 4609 '<FieldAccess for declarative_scope at nodes.lkt:8140:13>' Fld ada/nodes.lkt:8140
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Match_0.Node);
--# end
--# expr-done 4609
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind s Var_Expr_0
--# expr-start 4611 '<FieldAccess for find_next_part_in at nodes.lkt:8143:24>' Fld_1 ada/nodes.lkt:8143
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4610 '<as_entity at nodes.lkt:8143:46>' If_Result ada/nodes.lkt:8143
Is_Null := Var_Expr_0 = null; 
if Is_Null then
   If_Result := No_Entity_Declarative_Part;
else
As_Entity := (Info => E_Info, Node => Var_Expr_0); 
   If_Result := As_Entity;
end if;
--# expr-done 4610
--# property-call-start IncompleteTypeDecl.find_next_part_in
Fld_1 := Libadalang.Implementation.Incomplete_Type_Decl_P_Find_Next_Part_In (Node => Match_0.Node, Decl_Part => If_Result, E_Info => Match_0.Info);
--# end
--# expr-done 4611
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_3 := Scope_Result_1;
else
--# expr-start 4612 '<FieldAccess for is_in_private_part at nodes.lkt:8145:17>' Fld_2 ada/nodes.lkt:8145
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4612
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= False then
   --# scope-start
   --# bind _ Var_Expr_1
--# expr-start 4617 '<FieldAccess for body_part at nodes.lkt:8147:17>' Fld_5 ada/nodes.lkt:8147
--# expr-start 4616 '<as_entity at nodes.lkt:8147:17>' If_Result_1 ada/nodes.lkt:8147
--# expr-start 4615 '<Cast to BasePackageDecl at nodes.lkt:8147:17>' Cast_Result ada/nodes.lkt:8147
--# expr-start 4614 '<parent at nodes.lkt:8147:17>' Fld_4 ada/nodes.lkt:8147
--# expr-start 4613 '<FieldAccess for declarative_scope at nodes.lkt:8147:17>' Fld_3 ada/nodes.lkt:8147
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld_3 := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 4613
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Fld_3.Parent; 
--# expr-done 4614
   if Fld_4 = null
      or else Fld_4.Kind in Ada_Base_Package_Decl
   then
      Cast_Result := Fld_4;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 4615
Is_Null_1 := Cast_Result = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Base_Package_Decl;
else
As_Entity_1 := (Info => E_Info, Node => Cast_Result); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 4616
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasePackageDecl.body_part
Fld_5 := Libadalang.Implementation.Base_Package_Decl_P_Body_Part (Node => If_Result_1.Node, E_Info => If_Result_1.Info);
--# end
--# expr-done 4617
Var_Expr_2 := Fld_5;
if Var_Expr_2 /= No_Entity_Package_Body then
   --# scope-start
   --# bind p Var_Expr_2
--# expr-start 4619 '<FieldAccess for find_next_part_in at nodes.lkt:8157:28>' Fld_7 ada/nodes.lkt:8157
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4618 '<FieldAccess for decls at nodes.lkt:8157:50>' Fld_6 ada/nodes.lkt:8157
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Declarative_Part (Node => Var_Expr_2.Node.Package_Body_F_Decls, Info => Var_Expr_2.Info);
--# expr-done 4618
--# property-call-start IncompleteTypeDecl.find_next_part_in
Fld_7 := Libadalang.Implementation.Incomplete_Type_Decl_P_Find_Next_Part_In (Node => Match_0.Node, Decl_Part => Fld_6, E_Info => Match_0.Info);
--# end
--# expr-done 4619
Scope_Result_2 := Fld_7;
   --# end
   Result_Var_1 := Scope_Result_2;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_3 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_3;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
   Result_Var_3 := Result_Var_2;
end if;
Let_Result_1 := Result_Var_3; 
--# end
Scope_Result_5 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Classwide_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Classwide_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_4; 
--# bind cwt Match_1
--# expr-start 4625 '<Let at nodes.lkt:8162:17>' Let_Result ada/nodes.lkt:8162
--# scope-start
--# expr-start 4620 '<FieldAccess for type_decl at nodes.lkt:8162:26>' Fld_8 ada/nodes.lkt:8162
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld_8 := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 4620
Local_Td := Fld_8; 
--# bind td Local_Td
--# expr-start 4621 '<FieldAccess for next_part at nodes.lkt:8164:17>' Fld_9 ada/nodes.lkt:8164
      if Local_Td.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.next_part
Fld_9 := Libadalang.Implementation.Base_Type_Decl_P_Next_Part (Node => Local_Td.Node, E_Info => Local_Td.Info);
--# end
--# expr-done 4621
Var_Expr_3 := Fld_9;
if Var_Expr_3 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind np Var_Expr_3
--# expr-start 4624 '<If at nodes.lkt:8167:29>' If_Result_2 ada/nodes.lkt:8167
--# expr-start 4622 '<Eq at nodes.lkt:8167:32>' Is_Equiv ada/nodes.lkt:8167
Cast_Expr := Local_Td; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Var_Expr_3; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 4622
if Is_Equiv then
   If_Result_2 := Match_1;
else
   --# expr-start 4623 '<FieldAccess for classwide_type at nodes.lkt:8167:55>' Fld_10 ada/nodes.lkt:8167
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_10 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 4623
   If_Result_2 := Fld_10;
end if;
--# expr-done 4624
Scope_Result_4 := If_Result_2;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := No_Entity_Classwide_Type_Decl;
end if;
Let_Result := Result_Var_4; 
--# end
--# expr-done 4625
      Cast_Result_5 := Create_Internal_Entity_Base_Type_Decl
        (Node => Let_Result.Node,
         Info => Let_Result.Info);
Let_Result_2 := Cast_Result_5; 
--# end
Scope_Result_6 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl | Ada_Protected_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_6; 
--# bind _ Match_2
--# expr-start 4631 '<If at nodes.lkt:8171:13>' If_Result_4 ada/nodes.lkt:8171
--# expr-start 4629 '<BooleanBinaryOp And at nodes.lkt:8171:16>' If_Result_3 ada/nodes.lkt:8171
--# expr-start 4626 '<FieldAccess for is_private at nodes.lkt:8171:16>' Fld_12 ada/nodes.lkt:8171
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_private'
Fld_12 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Private (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4626
if Fld_12 then
   --# expr-start 4628 '<Not at nodes.lkt:8171:38>' Not_Val ada/nodes.lkt:8171
--# expr-start 4627 '<FieldAccess for is_generic_formal at nodes.lkt:8171:42>' Fld_13 ada/nodes.lkt:8171
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_generic_formal
Fld_13 := Libadalang.Implementation.Base_Type_Decl_P_Is_Generic_Formal (Node => Ent.Node);
--# end
--# expr-done 4627
Not_Val := not (Fld_13); 
--# expr-done 4628
   If_Result_3 := Not_Val;
else
   If_Result_3 := False;
end if;
--# expr-done 4629
if If_Result_3 then
   --# expr-start 4630 '<FieldAccess for private_completion at nodes.lkt:8172:18>' Fld_11 ada/nodes.lkt:8172
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.private_completion
Fld_11 := Libadalang.Implementation.Base_Type_Decl_P_Private_Completion (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4630
   If_Result_4 := Fld_11;
else
   If_Result_4 := No_Entity_Base_Type_Decl;
end if;
--# expr-done 4631
Let_Result_3 := If_Result_4; 
--# end
Scope_Result_7 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_7; 
end case;
--# expr-done 4632
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Next_Part;
--# end
--# property-start BaseTypeDecl.full_view ada/nodes.lkt:8178
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Full_View
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 4633 '<FieldAccess for next_part at nodes.lkt:8179:9>' Fld ada/nodes.lkt:8179
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.next_part
Fld := Libadalang.Implementation.Base_Type_Decl_P_Next_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4633
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind np Var_Expr_0
--# expr-start 4634 '<FieldAccess for full_view at nodes.lkt:8179:37>' Fld_1 ada/nodes.lkt:8179
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.full_view
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Full_View (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4634
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := Ent;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Full_View;
--# end
--# property-start BaseTypeDecl.is_definite_subtype ada/nodes.lkt:8187
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Definite_Subtype
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Match_0 : Internal_Entity_Incomplete_Type_Decl;
Match_1 : Internal_Entity_Type_Decl;
Match_0_1 : Internal_Entity_Derived_Type_Def;
Match_1_1 : Internal_Entity_Array_Type_Def;
Match_2 : Internal_Entity_Type_Def;
Match_2_1 : Internal_Entity_Subtype_Decl;
Match_3 : Internal_Entity_Classwide_Type_Decl;
Match_4 : Internal_Entity_Task_Type_Decl;
Match_5 : Internal_Entity_Protected_Type_Decl;
Match_6 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Discriminant_Part;
Is_Null : Boolean;
Fld_1 : Internal_Entity_Type_Def;
Fld_2 : Internal_Entity_Subtype_Indication;
Fld_3 : Internal_Entity_Constraint;
Is_Null_1 : Boolean;
Not_Val : Boolean;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Boolean;
If_Result : Boolean;
Fld_6 : Internal_Entity_Array_Indices;
Is_A : Boolean;
Match_Prefix : Internal_Entity_Type_Def;
Cast_Result : Internal_Entity_Derived_Type_Def;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_1 : Internal_Entity_Array_Type_Def;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_2 : Internal_Entity_Type_Def;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Match_Result : Boolean;
If_Result_1 : Boolean;
Fld_7 : Internal_Entity_Subtype_Indication;
Fld_8 : Internal_Entity_Constraint;
Is_Null_2 : Boolean;
Not_Val_1 : Boolean;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Boolean;
If_Result_2 : Boolean;
Fld_11 : Internal_Entity_Discriminant_Part;
Is_Null_3 : Boolean;
Fld_12 : Internal_Entity_Discriminant_Part;
Is_Null_4 : Boolean;
Match_Prefix_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity_Incomplete_Type_Decl;
Let_Result_3 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_4 : Internal_Entity_Type_Decl;
Let_Result_4 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_5 : Internal_Entity_Subtype_Decl;
Let_Result_5 : Boolean;
Scope_Result_5 : Boolean;
Cast_Result_6 : Internal_Entity_Classwide_Type_Decl;
Let_Result_6 : Boolean;
Scope_Result_6 : Boolean;
Cast_Result_7 : Internal_Entity_Task_Type_Decl;
Let_Result_7 : Boolean;
Scope_Result_7 : Boolean;
Cast_Result_8 : Internal_Entity_Protected_Type_Decl;
Let_Result_8 : Boolean;
Scope_Result_8 : Boolean;
Cast_Result_9 : Internal_Entity_Base_Type_Decl;
Let_Result_9 : Boolean;
Scope_Result_9 : Boolean;
Match_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4660 '<Match at nodes.lkt:8187:39>' Match_Result_1 ada/nodes.lkt:8187
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Ent; 
case Ada_Base_Type_Decl (Match_Prefix_1.Node.Kind) is
         when Ada_Incomplete_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Incomplete_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_0 := Cast_Result_3; 
--# bind _ Match_0
Let_Result_3 := False; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result_1 := Scope_Result_3; 
         when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_1 := Cast_Result_4; 
--# bind td Match_1
--# expr-start 4648 '<BooleanBinaryOp And at nodes.lkt:8190:13>' If_Result_1 ada/nodes.lkt:8190
--# expr-start 4636 '<IsNull at nodes.lkt:8190:13>' Is_Null ada/nodes.lkt:8190
--# expr-start 4635 '<FieldAccess for discriminants at nodes.lkt:8190:13>' Fld ada/nodes.lkt:8190
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Discriminant_Part (Node => Match_1.Node.Type_Decl_F_Discriminants, Info => Match_1.Info);
--# expr-done 4635
Is_Null := Fld.Node = null; 
--# expr-done 4636
if Is_Null then
   --# expr-start 4647 '<Match at nodes.lkt:8191:17>' Match_Result ada/nodes.lkt:8191
--# expr-start 4637 '<FieldAccess for type_def at nodes.lkt:8191:23>' Fld_1 ada/nodes.lkt:8191
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Def (Node => Match_1.Node.Type_Decl_F_Type_Def, Info => Match_1.Info);
--# expr-done 4637
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_1; 
case Ada_Type_Def (Match_Prefix.Node.Kind) is
         when Ada_Derived_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Derived_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0_1 := Cast_Result; 
--# bind dtd Match_0_1
--# expr-start 4644 '<BooleanBinaryOp Or at nodes.lkt:8193:21>' If_Result ada/nodes.lkt:8193
--# expr-start 4641 '<Not at nodes.lkt:8193:21>' Not_Val ada/nodes.lkt:8193
--# expr-start 4640 '<IsNull at nodes.lkt:8193:25>' Is_Null_1 ada/nodes.lkt:8193
--# expr-start 4639 '<FieldAccess for constraint at nodes.lkt:8193:25>' Fld_3 ada/nodes.lkt:8193
--# expr-start 4638 '<FieldAccess for subtype_indication at nodes.lkt:8193:25>' Fld_2 ada/nodes.lkt:8193
      if Match_0_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Subtype_Indication (Node => Match_0_1.Node.Derived_Type_Def_F_Subtype_Indication, Info => Match_0_1.Info);
--# expr-done 4638
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Constraint (Node => Fld_2.Node.Subtype_Indication_F_Constraint, Info => Fld_2.Info);
--# expr-done 4639
Is_Null_1 := Fld_3.Node = null; 
--# expr-done 4640
Not_Val := not (Is_Null_1); 
--# expr-done 4641
if Not_Val then
   If_Result := True;
else
   --# expr-start 4643 '<FieldAccess for is_definite_subtype at nodes.lkt:8194:24>' Fld_5 ada/nodes.lkt:8194
--# expr-start 4642 '<FieldAccess for base_type at nodes.lkt:8194:24>' Fld_4 ada/nodes.lkt:8194
      if Match_0_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Match_0_1.Node, Origin => Origin, E_Info => Match_0_1.Info);
--# end
--# expr-done 4642
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_definite_subtype
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Is_Definite_Subtype (Node => Fld_4.Node, Origin => Origin, E_Info => Fld_4.Info);
--# end
--# expr-done 4643
   If_Result := Fld_5;
end if;
--# expr-done 4644
Let_Result := If_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Array_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Array_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1_1 := Cast_Result_1; 
--# bind atd Match_1_1
--# expr-start 4646 '<IsA ConstrainedArrayIndices at nodes.lkt:8196:21>' Is_A ada/nodes.lkt:8196
--# expr-start 4645 '<FieldAccess for indices at nodes.lkt:8196:21>' Fld_6 ada/nodes.lkt:8196
      if Match_1_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Array_Indices (Node => Match_1_1.Node.Array_Type_Def_F_Indices, Info => Match_1_1.Info);
--# expr-done 4645
Is_A := Fld_6.Node /= null 
and then Fld_6.Node.Kind in Ada_Constrained_Array_Indices_Range; 
--# expr-done 4646
Let_Result_1 := Is_A; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Access_To_Subp_Def .. Ada_Type_Access_Def | Ada_Enum_Type_Def .. Ada_Signed_Int_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := True; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 4647
   If_Result_1 := Match_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 4648
Let_Result_4 := If_Result_1; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result_1 := Scope_Result_4; 
         when Ada_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Subtype_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_2_1 := Cast_Result_5; 
--# bind st Match_2_1
--# expr-start 4655 '<BooleanBinaryOp Or at nodes.lkt:8200:13>' If_Result_2 ada/nodes.lkt:8200
--# expr-start 4652 '<Not at nodes.lkt:8200:13>' Not_Val_1 ada/nodes.lkt:8200
--# expr-start 4651 '<IsNull at nodes.lkt:8200:17>' Is_Null_2 ada/nodes.lkt:8200
--# expr-start 4650 '<FieldAccess for constraint at nodes.lkt:8200:17>' Fld_8 ada/nodes.lkt:8200
--# expr-start 4649 '<FieldAccess for subtype at nodes.lkt:8200:17>' Fld_7 ada/nodes.lkt:8200
      if Match_2_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Subtype_Indication (Node => Match_2_1.Node.Subtype_Decl_F_Subtype, Info => Match_2_1.Info);
--# expr-done 4649
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Constraint (Node => Fld_7.Node.Subtype_Indication_F_Constraint, Info => Fld_7.Info);
--# expr-done 4650
Is_Null_2 := Fld_8.Node = null; 
--# expr-done 4651
Not_Val_1 := not (Is_Null_2); 
--# expr-done 4652
if Not_Val_1 then
   If_Result_2 := True;
else
   --# expr-start 4654 '<FieldAccess for is_definite_subtype at nodes.lkt:8201:16>' Fld_10 ada/nodes.lkt:8201
--# expr-start 4653 '<FieldAccess for get_type at nodes.lkt:8201:16>' Fld_9 ada/nodes.lkt:8201
      if Match_2_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld_9 := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Match_2_1.Node, Origin => Origin, E_Info => Match_2_1.Info);
--# end
--# expr-done 4653
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_definite_subtype
Fld_10 := Libadalang.Implementation.Base_Type_Decl_P_Is_Definite_Subtype (Node => Fld_9.Node, Origin => Origin, E_Info => Fld_9.Info);
--# end
--# expr-done 4654
   If_Result_2 := Fld_10;
end if;
--# expr-done 4655
Let_Result_5 := If_Result_2; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result_1 := Scope_Result_5; 
         when Ada_Classwide_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Classwide_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_3 := Cast_Result_6; 
--# bind _ Match_3
Let_Result_6 := False; 
--# end
Scope_Result_6 := Let_Result_6;
   --# end
            Match_Result_1 := Scope_Result_6; 
         when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Task_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_4 := Cast_Result_7; 
--# bind ttd Match_4
--# expr-start 4657 '<IsNull at nodes.lkt:8203:35>' Is_Null_3 ada/nodes.lkt:8203
--# expr-start 4656 '<FieldAccess for discriminants at nodes.lkt:8203:35>' Fld_11 ada/nodes.lkt:8203
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Discriminant_Part (Node => Match_4.Node.Task_Type_Decl_F_Discriminants, Info => Match_4.Info);
--# expr-done 4656
Is_Null_3 := Fld_11.Node = null; 
--# expr-done 4657
Let_Result_7 := Is_Null_3; 
--# end
Scope_Result_7 := Let_Result_7;
   --# end
            Match_Result_1 := Scope_Result_7; 
         when Ada_Protected_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Create_Internal_Entity_Protected_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_5 := Cast_Result_8; 
--# bind ptd Match_5
--# expr-start 4659 '<IsNull at nodes.lkt:8204:40>' Is_Null_4 ada/nodes.lkt:8204
--# expr-start 4658 '<FieldAccess for discriminants at nodes.lkt:8204:40>' Fld_12 ada/nodes.lkt:8204
      if Match_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Discriminant_Part (Node => Match_5.Node.Protected_Type_Decl_F_Discriminants, Info => Match_5.Info);
--# expr-done 4658
Is_Null_4 := Fld_12.Node = null; 
--# expr-done 4659
Let_Result_8 := Is_Null_4; 
--# end
Scope_Result_8 := Let_Result_8;
   --# end
            Match_Result_1 := Scope_Result_8; 
         when Ada_Discrete_Base_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_6 := Cast_Result_9; 
--# bind _ Match_6
Let_Result_9 := True; 
--# end
Scope_Result_9 := Let_Result_9;
   --# end
            Match_Result_1 := Scope_Result_9; 
end case;
--# expr-done 4660
         Property_Result := Match_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Definite_Subtype;
--# end
--# property-start '[dispatcher]BaseTypeDecl.discriminants_list' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Discriminants_List
  (Node : Bare_Base_Type_Decl
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.discriminants_list
                  Property_Result := Base_Subtype_Decl_P_Discriminants_List
                    (Self
                        , Stop_Recurse_At
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.discriminants_list
                  Property_Result := Classwide_Type_Decl_P_Discriminants_List
                    (Self
                        , Stop_Recurse_At
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Incomplete_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl =>
                  --# property-call-start IncompleteTypeDecl.discriminants_list
                  Property_Result := Incomplete_Type_Decl_P_Discriminants_List
                    (Self
                        , Stop_Recurse_At
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Protected_Type_Decl =>
                  --# property-call-start ProtectedTypeDecl.discriminants_list
                  Property_Result := Protected_Type_Decl_P_Discriminants_List
                    (Self
                        , Stop_Recurse_At
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start TaskTypeDecl.discriminants_list
                  Property_Result := Task_Type_Decl_P_Discriminants_List
                    (Self
                        , Stop_Recurse_At
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.discriminants_list
                  Property_Result := Type_Decl_P_Discriminants_List
                    (Self
                        , Stop_Recurse_At
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Discriminants_List;
--# end
--# property-start BaseTypeDecl.corresponding_char_literal ada/nodes.lkt:8234
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Corresponding_Char_Literal
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Basic_Decl;
      Local_Root : Internal_Entity_Base_Type_Decl;
Local_Enum_Type : Internal_Entity_Enum_Type_Def;
Local_Sym : Symbol_Type;
Var_Expr_0 : Bare_Char_Literal;
Local_Char_Lit : Internal_Entity_Enum_Literal_Decl;
Var_Expr_133 : Internal_Entity_Type_Decl;
Var_Expr_134 : Internal_Entity_Enum_Type_Def;
Fld : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Type_Decl;
Fld_1 : Internal_Entity_Type_Def;
Scope_Result : Internal_Entity_Type_Def;
Result_Var : Internal_Entity_Type_Def;
Cast_Result_1 : Internal_Entity_Enum_Type_Def;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_2 : Bare_Char_Literal;
Sym : Symbol_Type;
Scope_Result_1 : Symbol_Type;
Result_Var_1 : Symbol_Type;
Fld_2 : Internal_Entity_Enum_Literal_Decl_List;
Fld_3 : Bare_Enum_Literal_Decl_List;
Fld_4 : Internal_Entity_Info;
Item_1 : Internal_Entity_Enum_Literal_Decl;
Bare_Item_1 : Bare_Enum_Literal_Decl;
Fld_5 : Internal_Entity_Defining_Name;
Fld_6 : Boolean;
As_Entity : Internal_Entity_Enum_Literal_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Enum_Literal_Decl;
Find_Result : Internal_Entity_Enum_Literal_Decl;
Scope_Result_2 : Internal_Entity_Enum_Literal_Decl;
Result_Var_2 : Internal_Entity_Enum_Literal_Decl;
Fld_7 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Type_Decl;
New_Node : Bare_Synthetic_Char_Enum_Lit;
As_Entity_1 : Internal_Entity_Synthetic_Char_Enum_Lit;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Synthetic_Char_Enum_Lit;
Cast_Result_4 : Internal_Entity_Enum_Literal_Decl;
Is_Null_2 : Boolean;
Fld_8 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Internal_Entity_Enum_Literal_Decl;
Let_Result : Internal_Entity_Enum_Literal_Decl;
Let_Result_1 : Internal_Entity_Enum_Literal_Decl;
Let_Result_2 : Internal_Entity_Enum_Literal_Decl;
Let_Result_3 : Internal_Entity_Enum_Literal_Decl;
Cast_Result_5 : Internal_Entity_Basic_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Corresponding_Char_Literal,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Basic_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
--# expr-start 4682 '<Let at nodes.lkt:8235:9>' Let_Result_3 ada/nodes.lkt:8235
--# scope-start
--# expr-start 4661 '<FieldAccess for root_type at nodes.lkt:8235:20>' Fld ada/nodes.lkt:8235
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.root_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Root_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4661
Local_Root := Fld; 
--# bind root Local_Root
--# expr-start 4681 '<Let at nodes.lkt:8236:9>' Let_Result_2 ada/nodes.lkt:8236
--# scope-start
--# expr-start 4664 '<Cast to EnumTypeDef at nodes.lkt:8236:25>' Cast_Result_1 ada/nodes.lkt:8236
--# expr-start 4662 '<Cast to TypeDecl at nodes.lkt:8236:25>' Cast_Result ada/nodes.lkt:8236
Cast_Expr := Local_Root; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Type_Decl;
   end if;
--# expr-done 4662
Var_Expr_133 := Cast_Result;
if Var_Expr_133 /= No_Entity_Type_Decl then
   --# scope-start
--# expr-start 4663 '<FieldAccess for type_def at nodes.lkt:8236:25>' Fld_1 ada/nodes.lkt:8236
      if Var_Expr_133.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Def (Node => Var_Expr_133.Node.Type_Decl_F_Type_Def, Info => Var_Expr_133.Info);
--# expr-done 4663
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Type_Def;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Enum_Type_Def_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Enum_Type_Def
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result_1 := No_Entity_Enum_Type_Def;
   end if;
--# expr-done 4664
Local_Enum_Type := Cast_Result_1; 
--# bind enum_type Local_Enum_Type
--# expr-start 4680 '<Let at nodes.lkt:8237:9>' Let_Result_1 ada/nodes.lkt:8237
--# scope-start
--# expr-start 4665 '<Cast to CharLiteral at nodes.lkt:8237:19>' Cast_Result_2 ada/nodes.lkt:8237
Cast_Expr_1 := Origin; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Char_Literal_Range
   then
      Cast_Result_2 := Cast_Expr_1;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 4665
Var_Expr_0 := Cast_Result_2;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind l Var_Expr_0
--# expr-start 4666 '<GetSymbol at nodes.lkt:8237:52>' Sym ada/nodes.lkt:8237
Sym := Get_Symbol (Var_Expr_0); 
--# expr-done 4666
Scope_Result_1 := Sym;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Symbol;
end if;
Local_Sym := Result_Var_1; 
--# bind sym Local_Sym
--# expr-start 4679 '<Let at nodes.lkt:8238:9>' Let_Result ada/nodes.lkt:8238
--# scope-start
Var_Expr_134 := Local_Enum_Type;
if Var_Expr_134 /= No_Entity_Enum_Type_Def then
   --# scope-start
--# expr-start 4670 '<Find at nodes.lkt:8239:13>' Find_Result ada/nodes.lkt:8239
   --# expr-start 4667 '<FieldAccess for enum_literals at nodes.lkt:8239:13>' Fld_2 ada/nodes.lkt:8239
      if Var_Expr_134.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Enum_Literal_Decl_List (Node => Var_Expr_134.Node.Enum_Type_Def_F_Enum_Literals, Info => Var_Expr_134.Info);
--# expr-done 4667
Fld_3 := Fld_2.Node;
      Find_Result := No_Entity_Enum_Literal_Decl;
      if Fld_3 = null then
      Find_Result := No_Entity_Enum_Literal_Decl;
      else
      declare
         Collection : constant Bare_Enum_Literal_Decl_List := Fld_3;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Enum_Literal_Decl;
else
Fld_4 := Fld_2.Info;
As_Entity := (Info => Fld_4, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind lit_decl Item_1
      --# expr-start 4669 '<FieldAccess for name_is at nodes.lkt:8240:31>' Fld_6 ada/nodes.lkt:8240
--# expr-start 4668 '<FieldAccess for name at nodes.lkt:8240:31>' Fld_5 ada/nodes.lkt:8240
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Defining_Name (Node => Item_1.Node.Enum_Literal_Decl_F_Name, Info => Item_1.Info);
--# expr-done 4668
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_6 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_5.Node, Sym => Local_Sym);
--# end
--# expr-done 4669
      if Fld_6 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Fld_6;
         end loop;
      end;
      end if;
--# expr-done 4670
Scope_Result_2 := Find_Result;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Enum_Literal_Decl;
end if;
Local_Char_Lit := Result_Var_2; 
--# bind char_lit Local_Char_Lit
--# expr-start 4678 '<If at nodes.lkt:8246:9>' If_Result_3 ada/nodes.lkt:8246
--# expr-start 4673 '<BooleanBinaryOp And at nodes.lkt:8246:12>' If_Result_2 ada/nodes.lkt:8246
--# expr-start 4671 '<IsNull at nodes.lkt:8246:12>' Is_Null_2 ada/nodes.lkt:8246
Is_Null_2 := Local_Char_Lit.Node = null; 
--# expr-done 4671
if Is_Null_2 then
   --# expr-start 4672 '<FieldAccess for is_std_char_type at nodes.lkt:8246:33>' Fld_8 ada/nodes.lkt:8246
      if Local_Enum_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EnumTypeDef.is_std_char_type
Fld_8 := Libadalang.Implementation.Enum_Type_Def_P_Is_Std_Char_Type (Node => Local_Enum_Type.Node);
--# end
--# expr-done 4672
   If_Result_2 := Fld_8;
else
   If_Result_2 := False;
end if;
--# expr-done 4673
if If_Result_2 then
--# expr-start 4677 '<as_entity at nodes.lkt:8248:13>' If_Result_1 ada/nodes.lkt:8248
--# expr-start 4676 '<New SyntheticCharEnumLit at nodes.lkt:8248:13>' New_Node ada/nodes.lkt:8248
--# expr-start 4675 '<Cast to TypeDecl at nodes.lkt:8251:32>' Cast_Result_3 ada/nodes.lkt:8251
--# expr-start 4674 '<parent at nodes.lkt:8251:32>' Fld_7 ada/nodes.lkt:8251
      if Local_Enum_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Parent (Node => Local_Enum_Type.Node, E_Info => Local_Enum_Type.Info);
--# expr-done 4674
   if Fld_7.Node = null
      or else Fld_7.Node.Kind in Ada_Type_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Type_Decl
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
   else
         Cast_Result_3 := No_Entity_Type_Decl;
   end if;
--# expr-done 4675
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
New_Node := new Root_Node_Record
  (Ada_Synthetic_Char_Enum_Lit);
Initialize
  (Self => New_Node,
   Kind => Ada_Synthetic_Char_Enum_Lit,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Synthetic_Char_Enum_Lit
     (Self => New_Node,
      Enum_Literal_Decl_F_Name => No_Bare_Ada_Node);
      New_Node.Synthetic_Char_Enum_Lit_Char_Symbol :=
         Local_Sym;
      New_Node.Synthetic_Char_Enum_Lit_Enum_Type_Decl :=
         Cast_Result_3;
--# expr-done 4676
Is_Null_1 := New_Node = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Synthetic_Char_Enum_Lit;
else
As_Entity_1 := (Info => E_Info, Node => New_Node); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 4677
      Cast_Result_4 := Create_Internal_Entity_Enum_Literal_Decl
        (Node => If_Result_1.Node,
         Info => If_Result_1.Info);
   If_Result_3 := Cast_Result_4;
else
   If_Result_3 := Local_Char_Lit;
end if;
--# expr-done 4678
Let_Result := If_Result_3; 
--# end
--# expr-done 4679
Let_Result_1 := Let_Result; 
--# end
--# expr-done 4680
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 4681
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 4682
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Let_Result_3.Node,
         Info => Let_Result_3.Info);
         Property_Result := Cast_Result_5;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Basic_Decl,
                        As_Internal_Entity_Basic_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Corresponding_Char_Literal;
--# end
--# property-start BaseTypeDecl.next_part_for_decl ada/nodes.lkt:8267
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Next_Part_For_Decl
  (Node : Bare_Base_Type_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Match_0 : Internal_Entity_Single_Task_Type_Decl;
Match_1 : Internal_Entity_Task_Type_Decl;
Match_2 : Internal_Entity_Protected_Type_Decl;
Match_3 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Single_Task_Type_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Task_Type_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Protected_Type_Decl;
Let_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity_Base_Type_Decl;
Let_Result_3 : Internal_Entity_Basic_Decl;
Scope_Result_3 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4689 '<Match at nodes.lkt:8267:51>' Match_Result ada/nodes.lkt:8267
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Single_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Single_Task_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind sttd Match_0
--# expr-start 4684 '<FieldAccess for next_part_for_decl at nodes.lkt:8271:13>' Fld_1 ada/nodes.lkt:8271
--# expr-start 4683 '<FieldAccess for parent_basic_decl at nodes.lkt:8271:13>' Fld ada/nodes.lkt:8271
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 4683
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 4684
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Task_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind _ Match_1
--# expr-start 4685 '<Super at nodes.lkt:8272:33>' Fld_2 ada/nodes.lkt:8272
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.next_part_for_decl
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Next_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 4685
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Protected_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Protected_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
--# expr-start 4686 '<Super at nodes.lkt:8273:38>' Fld_3 ada/nodes.lkt:8273
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.next_part_for_decl
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Next_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 4686
Let_Result_2 := Fld_3; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Incomplete_Tagged_Type_Decl | Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_4; 
--# bind _ Match_3
--# expr-start 4688 '<Cast to BasicDecl at nodes.lkt:8274:19>' Cast_Result ada/nodes.lkt:8274
--# expr-start 4687 '<FieldAccess for next_part at nodes.lkt:8274:19>' Fld_4 ada/nodes.lkt:8274
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.next_part
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Next_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4687
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
--# expr-done 4688
Let_Result_3 := Cast_Result; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 4689
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Next_Part_For_Decl;
--# end
--# property-start BaseTypeDecl.shapes ada/nodes.lkt:8330
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Shapes
  (Node : Bare_Base_Type_Decl
      ; Include_Discriminants : Boolean
         := True
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Shape_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind include_discriminants Include_Discriminants
   --# bind origin Origin
   Property_Result : Internal_Shape_Array_Access;
            procedure Finalizer_Scope_650 with Inline_Always;
            procedure Finalizer_Scope_2580 with Inline_Always;
            procedure Finalizer_Scope_2581 with Inline_Always;
            procedure Finalizer_Scope_2582 with Inline_Always;
            procedure Finalizer_Scope_2583 with Inline_Always;
      Local_Rdef : Internal_Entity_Base_Record_Def;
Local_Comps : Internal_Entity_Component_List;
Local_Parent_Type : Internal_Entity_Base_Type_Decl;
Local_Parent_Record : Internal_Entity_Base_Record_Def;
Local_Own_Shapes : Internal_Shape_Array_Access;
Local_All_Shapes : Internal_Shape_Array_Access;
Var_Expr_0 : Internal_Entity_Base_Record_Def;
Local_Discrs : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Var_Expr_135 : Internal_Entity_Derived_Type_Def;
Var_Expr_136 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Record_Def;
Fld_1 : Internal_Entity_Component_List;
Fld_2 : Internal_Entity_Type_Def;
Cast_Result : Internal_Entity_Derived_Type_Def;
Fld_3 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Record_Def;
Scope_Result_1 : Internal_Entity_Base_Record_Def;
Result_Var_1 : Internal_Entity_Base_Record_Def;
Fld_5 : Internal_Shape_Array_Access;
Fld_6 : Internal_Shape_Array_Access;
Fld_7 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_8 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Concat_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_9 : Internal_Discriminant_Values_Array_Access;
Fld_10 : Internal_Discriminant_Values_Array_Access;
Concat_Result_1 : Internal_Discriminant_Values_Array_Access;
New_Struct : Internal_Shape := No_Shape;
Map_Result : Internal_Shape_Array_Access;
Map_Result_1 : Internal_Shape_Array_Access;
Scope_Result_2 : Internal_Shape_Array_Access;
Result_Var_2 : Internal_Shape_Array_Access;
Fld_11 : Internal_Entity_Type_Decl;
Fld_12 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_13 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Concat_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_14 : Internal_Discriminant_Values_Array_Access;
New_Struct_1 : Internal_Shape := No_Shape;
Map_Result_2 : Internal_Shape_Array_Access;
If_Result : Internal_Shape_Array_Access;
Let_Result : Internal_Shape_Array_Access;
Let_Result_1 : Internal_Shape_Array_Access;
Let_Result_2 : Internal_Shape_Array_Access;
Let_Result_3 : Internal_Shape_Array_Access;
Let_Result_4 : Internal_Shape_Array_Access;
Let_Result_5 : Internal_Shape_Array_Access;
Let_Result_6 : Internal_Shape_Array_Access;
            procedure Finalizer_Scope_650 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Local_Own_Shapes);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Local_All_Shapes);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Local_Discrs);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
            end Finalizer_Scope_650;
            procedure Finalizer_Scope_2580 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_2580;
            procedure Finalizer_Scope_2581 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2581;
            procedure Finalizer_Scope_2582 is
            begin
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2582;
            procedure Finalizer_Scope_2583 is
            begin
                     Dec_Ref (Fld_13);
                     Dec_Ref (Concat_Result_2);
                     Dec_Ref (Fld_14);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_2583;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 4718 '<Let at nodes.lkt:8331:9>' Let_Result_6 ada/nodes.lkt:8331
--# scope-start
--# expr-start 4690 '<FieldAccess for record_def at nodes.lkt:8331:20>' Fld ada/nodes.lkt:8331
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4690
Local_Rdef := Fld; 
--# bind rdef Local_Rdef
--# expr-start 4717 '<Let at nodes.lkt:8332:9>' Let_Result_5 ada/nodes.lkt:8332
--# scope-start
--# expr-start 4691 '<FieldAccess for components at nodes.lkt:8332:21>' Fld_1 ada/nodes.lkt:8332
      if Local_Rdef.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Component_List (Node => Local_Rdef.Node.Base_Record_Def_F_Components, Info => Local_Rdef.Info);
--# expr-done 4691
Local_Comps := Fld_1; 
--# bind comps Local_Comps
--# expr-start 4716 '<Let at nodes.lkt:8333:9>' Let_Result_4 ada/nodes.lkt:8333
--# scope-start
--# expr-start 4693 '<Cast to DerivedTypeDef at nodes.lkt:8333:27>' Cast_Result ada/nodes.lkt:8333
--# expr-start 4692 '<FieldAccess for type_def at nodes.lkt:8333:27>' Fld_2 ada/nodes.lkt:8333
      if Local_Comps.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_def
Fld_2 := Libadalang.Implementation.Component_List_P_Type_Def (Node => Local_Comps.Node, E_Info => Local_Comps.Info);
--# end
--# expr-done 4692
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Derived_Type_Def_Range
   then
      Cast_Result := Create_Internal_Entity_Derived_Type_Def
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Derived_Type_Def;
   end if;
--# expr-done 4693
Var_Expr_135 := Cast_Result;
if Var_Expr_135 /= No_Entity_Derived_Type_Def then
   --# scope-start
--# expr-start 4694 '<FieldAccess for base_type at nodes.lkt:8333:27>' Fld_3 ada/nodes.lkt:8333
      if Var_Expr_135.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Var_Expr_135.Node, Origin => Origin, E_Info => Var_Expr_135.Info);
--# end
--# expr-done 4694
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Local_Parent_Type := Result_Var; 
--# bind parent_type Local_Parent_Type
--# expr-start 4715 '<Let at nodes.lkt:8334:9>' Let_Result_3 ada/nodes.lkt:8334
--# scope-start
Var_Expr_136 := Local_Parent_Type;
if Var_Expr_136 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4695 '<FieldAccess for record_def at nodes.lkt:8334:29>' Fld_4 ada/nodes.lkt:8334
      if Var_Expr_136.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Var_Expr_136.Node, Origin => Origin, E_Info => Var_Expr_136.Info);
--# end
--# expr-done 4695
Scope_Result_1 := Fld_4;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Record_Def;
end if;
Local_Parent_Record := Result_Var_1; 
--# bind parent_record Local_Parent_Record
--# expr-start 4714 '<Let at nodes.lkt:8335:9>' Let_Result_2 ada/nodes.lkt:8335
--# scope-start
--# expr-start 4696 '<FieldAccess for shapes at nodes.lkt:8335:26>' Fld_5 ada/nodes.lkt:8335
      if Local_Comps.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.shapes
Fld_5 := Libadalang.Implementation.Component_List_P_Shapes (Node => Local_Comps.Node, E_Info => Local_Comps.Info);
--# end
--# expr-done 4696
Local_Own_Shapes := Fld_5; Inc_Ref (Local_Own_Shapes);
--# bind own_shapes Local_Own_Shapes
--# expr-start 4713 '<Let at nodes.lkt:8338:9>' Let_Result_1 ada/nodes.lkt:8338
--# scope-start
Var_Expr_0 := Local_Parent_Record;
if Var_Expr_0 /= No_Entity_Base_Record_Def then
   --# scope-start
   --# bind _ Var_Expr_0
--# expr-start 4704 '<Mapcat at nodes.lkt:8341:17>' Map_Result_1 ada/nodes.lkt:8341
   --# expr-start 4697 '<FieldAccess for shapes at nodes.lkt:8341:17>' Fld_6 ada/nodes.lkt:8341
      if Local_Parent_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.shapes
Fld_6 := Libadalang.Implementation.Base_Type_Decl_P_Shapes (Node => Local_Parent_Type.Node, Include_Discriminants => False, Origin => Origin, E_Info => Local_Parent_Type.Info);
--# end
--# expr-done 4697
      declare
         Map_Result_1_Vec : Internal_Shape_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Shape_Array_Access := Fld_6;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind parent_shape Item_1
      --# expr-start 4703 '<Map at nodes.lkt:8343:21>' Map_Result ada/nodes.lkt:8343
      declare
         Map_Result_Vec : Internal_Shape_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Shape_Array_Access := Local_Own_Shapes;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind own_shape Item_2
      --# expr-start 4702 '<New Shape at nodes.lkt:8345:25>' New_Struct ada/nodes.lkt:8345
--# expr-start 4698 '<FieldAccess for components at nodes.lkt:8346:40>' Fld_7 ada/nodes.lkt:8346
Fld_7 := Item_1.Components;
Inc_Ref (Fld_7);
--# expr-done 4698
--# expr-start 4699 '<FieldAccess for components at nodes.lkt:8347:31>' Fld_8 ada/nodes.lkt:8347
Fld_8 := Item_2.Components;
Inc_Ref (Fld_8);
--# expr-done 4699
Concat_Result := Concat (Fld_7, Fld_8); 
--# expr-start 4700 '<FieldAccess for discriminants_values at nodes.lkt:8348:50>' Fld_9 ada/nodes.lkt:8348
Fld_9 := Item_1.Discriminants_Values;
Inc_Ref (Fld_9);
--# expr-done 4700
--# expr-start 4701 '<FieldAccess for discriminants_values at nodes.lkt:8350:31>' Fld_10 ada/nodes.lkt:8350
Fld_10 := Item_2.Discriminants_Values;
Inc_Ref (Fld_10);
--# expr-done 4701
Concat_Result_1 := Concat (Fld_9, Fld_10); 
Inc_Ref (Concat_Result);
Inc_Ref (Concat_Result_1);
New_Struct := (Components => Concat_Result, Discriminants_Values => Concat_Result_1); 
--# expr-done 4702
         declare
            Item_To_Append : constant Internal_Shape := New_Struct;
         begin
               Inc_Ref (Item_To_Append);
            Internal_Shape_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2582;
         end loop;
      end;
         Map_Result := Create_Internal_Shape_Array
           (Items_Count => Natural (Internal_Shape_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Shape_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Shape_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Shape_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4703
         for Item_To_Append of
               Map_Result.Items
         loop
               Inc_Ref (Item_To_Append);
            Internal_Shape_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2581;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Shape_Array
           (Items_Count => Natural (Internal_Shape_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Shape_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Shape_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Shape_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 4704
Scope_Result_2 := Map_Result_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2580;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Local_Own_Shapes;
end if;
      Inc_Ref (Result_Var_2);
Local_All_Shapes := Result_Var_2; Inc_Ref (Local_All_Shapes);
--# bind all_shapes Local_All_Shapes
--# expr-start 4712 '<Let at nodes.lkt:8356:9>' Let_Result ada/nodes.lkt:8356
--# scope-start
--# expr-start 4706 '<FieldAccess for discriminants_list at nodes.lkt:8356:22>' Fld_12 ada/nodes.lkt:8356
--# expr-start 4705 '<FieldAccess for type_decl at nodes.lkt:8356:22>' Fld_11 ada/nodes.lkt:8356
      if Local_Comps.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_decl
Fld_11 := Libadalang.Implementation.Component_List_P_Type_Decl (Node => Local_Comps.Node, E_Info => Local_Comps.Info);
--# end
--# expr-done 4705
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_12 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Fld_11.Node, Origin => Origin, E_Info => Fld_11.Info);
--# end
--# expr-done 4706
Local_Discrs := Fld_12; Inc_Ref (Local_Discrs);
--# bind discrs Local_Discrs
--# expr-start 4711 '<If at nodes.lkt:8358:9>' If_Result ada/nodes.lkt:8358
if Include_Discriminants then
   --# expr-start 4710 '<Map at nodes.lkt:8360:13>' Map_Result_2 ada/nodes.lkt:8360
      declare
         Map_Result_2_Vec : Internal_Shape_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Shape_Array_Access := Local_All_Shapes;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind s Item_3
      --# expr-start 4709 '<New Shape at nodes.lkt:8362:17>' New_Struct_1 ada/nodes.lkt:8362
--# expr-start 4707 '<FieldAccess for components at nodes.lkt:8363:41>' Fld_13 ada/nodes.lkt:8363
Fld_13 := Item_3.Components;
Inc_Ref (Fld_13);
--# expr-done 4707
Concat_Result_2 := Concat (Local_Discrs, Fld_13); 
--# expr-start 4708 '<FieldAccess for discriminants_values at nodes.lkt:8364:42>' Fld_14 ada/nodes.lkt:8364
Fld_14 := Item_3.Discriminants_Values;
Inc_Ref (Fld_14);
--# expr-done 4708
Inc_Ref (Concat_Result_2);
Inc_Ref (Fld_14);
New_Struct_1 := (Components => Concat_Result_2, Discriminants_Values => Fld_14); 
--# expr-done 4709
         declare
            Item_To_Append : constant Internal_Shape := New_Struct_1;
         begin
               Inc_Ref (Item_To_Append);
            Internal_Shape_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2583;
         end loop;
      end;
         Map_Result_2 := Create_Internal_Shape_Array
           (Items_Count => Natural (Internal_Shape_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Shape_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Shape_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Shape_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 4710
   If_Result := Map_Result_2;
else
   If_Result := Local_All_Shapes;
end if;
      Inc_Ref (If_Result);
--# expr-done 4711
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 4712
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 4713
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 4714
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 4715
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 4716
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 4717
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 4718
         Property_Result := Let_Result_6;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_650;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_650;
                     Finalizer_Scope_2580;
                     Finalizer_Scope_2581;
                     Finalizer_Scope_2582;
                     Finalizer_Scope_2583;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Shapes;
--# end
--# property-start BaseTypeDecl.dottable_subps_env ada/nodes.lkt:8373
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_F_Dottable_Subps_Env
  (Node : Bare_Base_Type_Decl
  )
   return Lexical_Env
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_651 with Inline_Always;
      Dyn_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_651 is
            begin
                     Dec_Ref (Dyn_Env);
            end Finalizer_Scope_651;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Base_Type_Decl_Lf_State_Dottable_Subps_Env is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Base_Type_Decl_Lf_Stg_Dottable_Subps_Env;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Base_Type_Decl_Lf_State_Dottable_Subps_Env,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4719 '<DynamicLexicalEnv at nodes.lkt:8374:9>' Dyn_Env ada/nodes.lkt:8374
Dyn_Env := Create_Dynamic_Lexical_Env (Self, Base_Type_Decl_P_Dottable_Subps'Access, null, False, Self.Unit.Context.Symbols); 
--# expr-done 4719
         Property_Result := Dyn_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_651;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_651;
               Self.Bare_Base_Type_Decl_Lf_State_Dottable_Subps_Env :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Base_Type_Decl_Lf_State_Dottable_Subps_Env := Initialized;
      Self.Bare_Base_Type_Decl_Lf_Stg_Dottable_Subps_Env := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Base_Type_Decl_F_Dottable_Subps_Env;
--# end
--# property-start BaseTypeDecl.dottable_subps ada/nodes.lkt:8385
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Dottable_Subps
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Inner_Env_Assoc_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_652 with Inline_Always;
      Local_Scope : Bare_Declarative_Part;
Local_Pkg : Internal_Entity_Base_Package_Decl;
Var_Expr_0 : Bare_Package_Body;
Var_Expr_137 : Bare_Declarative_Part;
Var_Expr_138 : Bare_Declarative_Part;
Var_Expr_139 : Internal_Entity_Package_Body;
Fld : Bare_Declarative_Part;
Fld_1 : Bare_Ada_Node;
Scope_Result : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Cast_Result : Bare_Package_Body;
Bound_Imprecise_Fallback : Boolean;
As_Entity : Internal_Entity_Package_Body;
Is_Null : Boolean;
If_Result : Internal_Entity_Package_Body;
Fld_2 : Internal_Entity_Basic_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Base_Package_Decl;
Scope_Result_1 : Internal_Entity_Base_Package_Decl;
Fld_3 : Bare_Ada_Node;
Scope_Result_2 : Bare_Ada_Node;
Result_Var_1 : Bare_Ada_Node;
Cast_Result_2 : Bare_Base_Package_Decl;
As_Entity_1 : Internal_Entity_Base_Package_Decl;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Package_Decl;
Result_Var_2 : Internal_Entity_Base_Package_Decl;
Fld_4 : Internal_Entity_Public_Part;
Cast_Result_3 : Internal_Entity_Declarative_Part;
Fld_5 : Internal_Entity_Private_Part;
Cast_Result_4 : Internal_Entity_Declarative_Part;
Fld_6 : Internal_Entity_Package_Body;
Fld_7 : Internal_Entity_Declarative_Part;
Scope_Result_3 : Internal_Entity_Declarative_Part;
Result_Var_3 : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
Fld_8 : Internal_Inner_Env_Assoc_Array_Access;
As_Entity_2 : Internal_Entity_Declarative_Part;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Declarative_Part;
Array_Lit_1 : Internal_Entity_Declarative_Part_Array_Access;
Fld_9 : Internal_Inner_Env_Assoc_Array_Access;
Is_Null_3 : Boolean;
Not_Val : Boolean;
If_Result_3 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result : Internal_Inner_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_652 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Fld_9);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_652;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Dottable_Subps,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Inner_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4745 '<Let at nodes.lkt:8386:9>' Let_Result_1 ada/nodes.lkt:8386
--# scope-start
--# expr-start 4720 '<FieldAccess for declarative_scope at nodes.lkt:8386:21>' Fld ada/nodes.lkt:8386
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 4720
Local_Scope := Fld; 
--# bind scope Local_Scope
--# expr-start 4744 '<Let at nodes.lkt:8387:9>' Let_Result ada/nodes.lkt:8387
--# scope-start
--# expr-start 4722 '<Cast to PackageBody at nodes.lkt:8388:13>' Cast_Result ada/nodes.lkt:8388
Var_Expr_137 := Local_Scope;
if Var_Expr_137 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 4721 '<parent at nodes.lkt:8388:13>' Fld_1 ada/nodes.lkt:8388
      if Var_Expr_137 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Var_Expr_137.Parent; 
--# expr-done 4721
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
   if Result_Var = null
      or else Result_Var.Kind in Ada_Package_Body_Range
   then
      Cast_Result := Result_Var;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 4722
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind body Var_Expr_0
--# expr-start 4726 '<Cast to BasePackageDecl at nodes.lkt:8390:17>' Cast_Result_1 ada/nodes.lkt:8390
--# expr-start 4725 '<bind at nodes.lkt:8391:21>' Dyn_Var_Bind_Result ada/nodes.lkt:8391
Bound_Imprecise_Fallback := False; 
--# expr-start 4724 '<FieldAccess for previous_part at nodes.lkt:8393:21>' Fld_2 ada/nodes.lkt:8393
--# expr-start 4723 '<as_entity at nodes.lkt:8393:21>' If_Result ada/nodes.lkt:8393
Is_Null := Var_Expr_0 = null; 
if Is_Null then
   If_Result := No_Entity_Package_Body;
else
As_Entity := (Info => E_Info, Node => Var_Expr_0); 
   If_Result := As_Entity;
end if;
--# expr-done 4723
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.previous_part
Fld_2 := Libadalang.Implementation.Body_Node_P_Previous_Part (Node => If_Result.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => If_Result.Info);
--# end
--# expr-done 4724
Dyn_Var_Bind_Result := Fld_2; 
--# expr-done 4725
   if Dyn_Var_Bind_Result.Node = null
      or else Dyn_Var_Bind_Result.Node.Kind in Ada_Base_Package_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Package_Decl
        (Node => Dyn_Var_Bind_Result.Node,
         Info => Dyn_Var_Bind_Result.Info);
   else
         Cast_Result_1 := No_Entity_Base_Package_Decl;
   end if;
--# expr-done 4726
Scope_Result_1 := Cast_Result_1;
   --# end
   Result_Var_2 := Scope_Result_1;
else
   --# expr-start 4729 '<as_entity at nodes.lkt:8396:29>' If_Result_1 ada/nodes.lkt:8396
--# expr-start 4728 '<Cast to BasePackageDecl at nodes.lkt:8396:29>' Cast_Result_2 ada/nodes.lkt:8396
Var_Expr_138 := Local_Scope;
if Var_Expr_138 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 4727 '<parent at nodes.lkt:8396:29>' Fld_3 ada/nodes.lkt:8396
      if Var_Expr_138 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Var_Expr_138.Parent; 
--# expr-done 4727
Scope_Result_2 := Fld_3;
   --# end
   Result_Var_1 := Scope_Result_2;
else
   Result_Var_1 := No_Bare_Ada_Node;
end if;
   if Result_Var_1 = null
      or else Result_Var_1.Kind in Ada_Base_Package_Decl
   then
      Cast_Result_2 := Result_Var_1;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 4728
Is_Null_1 := Cast_Result_2 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Base_Package_Decl;
else
As_Entity_1 := (Info => E_Info, Node => Cast_Result_2); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 4729
   Result_Var_2 := If_Result_1;
end if;
Local_Pkg := Result_Var_2; 
--# bind pkg Local_Pkg
--# expr-start 4743 '<If at nodes.lkt:8408:9>' If_Result_3 ada/nodes.lkt:8408
--# expr-start 4731 '<Not at nodes.lkt:8408:12>' Not_Val ada/nodes.lkt:8408
--# expr-start 4730 '<IsNull at nodes.lkt:8408:16>' Is_Null_3 ada/nodes.lkt:8408
Is_Null_3 := Local_Pkg.Node = null; 
--# expr-done 4730
Not_Val := not (Is_Null_3); 
--# expr-done 4731
if Not_Val then
   --# expr-start 4739 '<FieldAccess for dottable_subps_in_declaratives_parts at nodes.lkt:8410:13>' Fld_8 ada/nodes.lkt:8410
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4738 '<ArrayLiteral at nodes.lkt:8411:17>' Array_Lit ada/nodes.lkt:8411
--# expr-start 4733 '<Cast to DeclarativePart at nodes.lkt:8412:21>' Cast_Result_3 ada/nodes.lkt:8412
--# expr-start 4732 '<FieldAccess for public_part at nodes.lkt:8412:21>' Fld_4 ada/nodes.lkt:8412
      if Local_Pkg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Public_Part (Node => Local_Pkg.Node.Base_Package_Decl_F_Public_Part, Info => Local_Pkg.Info);
--# expr-done 4732
      Cast_Result_3 := Create_Internal_Entity_Declarative_Part
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
--# expr-done 4733
--# expr-start 4735 '<Cast to DeclarativePart at nodes.lkt:8413:21>' Cast_Result_4 ada/nodes.lkt:8413
--# expr-start 4734 '<FieldAccess for private_part at nodes.lkt:8413:21>' Fld_5 ada/nodes.lkt:8413
      if Local_Pkg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Private_Part (Node => Local_Pkg.Node.Base_Package_Decl_F_Private_Part, Info => Local_Pkg.Info);
--# expr-done 4734
      Cast_Result_4 := Create_Internal_Entity_Declarative_Part
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
--# expr-done 4735
--# expr-start 4736 '<FieldAccess for body_part at nodes.lkt:8414:21>' Fld_6 ada/nodes.lkt:8414
      if Local_Pkg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasePackageDecl.body_part
Fld_6 := Libadalang.Implementation.Base_Package_Decl_P_Body_Part (Node => Local_Pkg.Node, E_Info => Local_Pkg.Info);
--# end
--# expr-done 4736
Var_Expr_139 := Fld_6;
if Var_Expr_139 /= No_Entity_Package_Body then
   --# scope-start
--# expr-start 4737 '<FieldAccess for decls at nodes.lkt:8414:21>' Fld_7 ada/nodes.lkt:8414
      if Var_Expr_139.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Declarative_Part (Node => Var_Expr_139.Node.Package_Body_F_Decls, Info => Var_Expr_139.Info);
--# expr-done 4737
Scope_Result_3 := Fld_7;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Entity_Declarative_Part;
end if;
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Cast_Result_3, 2 => Cast_Result_4, 3 => Result_Var_3)); 
--# expr-done 4738
--# property-call-start BaseTypeDecl.dottable_subps_in_declaratives_parts
Fld_8 := Libadalang.Implementation.Base_Type_Decl_P_Dottable_Subps_In_Declaratives_Parts (Node => Ent.Node, Parts => Array_Lit, E_Info => Ent.Info);
--# end
--# expr-done 4739
   If_Result_3 := Fld_8;
else
   --# expr-start 4742 '<FieldAccess for dottable_subps_in_declaratives_parts at nodes.lkt:8419:14>' Fld_9 ada/nodes.lkt:8419
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4741 '<ArrayLiteral at nodes.lkt:8419:56>' Array_Lit_1 ada/nodes.lkt:8419
--# expr-start 4740 '<as_entity at nodes.lkt:8419:57>' If_Result_2 ada/nodes.lkt:8419
Is_Null_2 := Local_Scope = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Declarative_Part;
else
As_Entity_2 := (Info => E_Info, Node => Local_Scope); 
   If_Result_2 := As_Entity_2;
end if;
--# expr-done 4740
Array_Lit_1 := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => If_Result_2)); 
--# expr-done 4741
--# property-call-start BaseTypeDecl.dottable_subps_in_declaratives_parts
Fld_9 := Libadalang.Implementation.Base_Type_Decl_P_Dottable_Subps_In_Declaratives_Parts (Node => Ent.Node, Parts => Array_Lit_1, E_Info => Ent.Info);
--# end
--# expr-done 4742
   If_Result_3 := Fld_9;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 4743
Let_Result := If_Result_3; Inc_Ref (Let_Result);
--# end
--# expr-done 4744
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 4745
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_652;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_652;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Inner_Env_Assoc_Array_Access,
                        As_Internal_Inner_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Dottable_Subps;
--# end
--# property-start BaseTypeDecl.dottable_subps_in_declaratives_parts ada/nodes.lkt:8425
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Dottable_Subps_In_Declaratives_Parts
  (Node : Bare_Base_Type_Decl
      ; Parts : Internal_Entity_Declarative_Part_Array_Access
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Inner_Env_Assoc_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind parts Parts
   Property_Result : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_653 with Inline_Always;
            procedure Finalizer_Scope_2588 with Inline_Always;
            procedure Finalizer_Scope_2589 with Inline_Always;
      Local_Bd : Internal_Entity_Basic_Decl;
Var_Expr_140 : Internal_Entity_Declarative_Part;
Var_Expr_141 : Internal_Entity_Basic_Decl;
Var_Expr_142 : Internal_Entity_Base_Subp_Spec;
Var_Expr_143 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_22 : Internal_Entity;
Bare_Item_22 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Map_Result : Internal_Entity_Array_Access;
Scope_Result : Internal_Entity_Array_Access;
Result_Var : Internal_Entity_Array_Access;
Map_Result_1 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Defining_Name;
Fld_4 : Symbol_Type;
Fld_5 : Bare_Basic_Decl;
New_Struct : Internal_Metadata;
Cast_Result_1 : Bare_Ada_Node;
New_Struct_1 : Internal_Inner_Env_Assoc;
Let_Result : Internal_Inner_Env_Assoc;
Cast_Expr_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Fld_6 : Internal_Entity_Base_Subp_Spec;
Fld_7 : Internal_Entity_Base_Type_Decl;
Fld_8 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Is_Equiv : Boolean;
Map_Result_2 : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_653 is
            begin
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_653;
            procedure Finalizer_Scope_2588 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2588;
            procedure Finalizer_Scope_2589 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2589;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4761 '<Map at nodes.lkt:8428:9>' Map_Result_2 ada/nodes.lkt:8428
   --# expr-start 4748 '<Mapcat at nodes.lkt:8428:9>' Map_Result_1 ada/nodes.lkt:8428
      declare
         Map_Result_1_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Declarative_Part_Array_Access := Parts;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind dp Item_0
Var_Expr_140 := Item_0;
if Var_Expr_140 /= No_Entity_Declarative_Part then
   --# scope-start
--# expr-start 4747 '<TakeWhile at ???>' Map_Result None
   --# expr-start 4746 '<FieldAccess for decls at nodes.lkt:8428:30>' Fld ada/nodes.lkt:8428
      if Var_Expr_140.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Var_Expr_140.Node.Declarative_Part_F_Decls, Info => Var_Expr_140.Info);
--# expr-done 4746
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_22 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_22 := Untyped_Item_22; 
Is_Null := Bare_Item_22 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_22); 
   If_Result := As_Entity;
end if;
                  Item_22 := If_Result; 
   --# scope-start
         declare
            Item_To_Append : constant Internal_Entity := Item_22;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4747
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2589;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var);
         for Item_To_Append of
               Result_Var.Items
         loop
            Internal_Entity_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2588;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 4748
      declare
         Map_Result_2_Vec : Internal_Inner_Env_Assoc_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result_1;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind decl Item_1
         --# expr-start 4753 '<Eq at nodes.lkt:8439:13>' Is_Equiv ada/nodes.lkt:8439
--# expr-start 4749 '<Cast to BasicDecl at nodes.lkt:8439:13>' Cast_Result_2 ada/nodes.lkt:8439
Cast_Expr_1 := Item_1; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_2 := No_Entity_Basic_Decl;
   end if;
--# expr-done 4749
Var_Expr_141 := Cast_Result_2;
if Var_Expr_141 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 4750 '<FieldAccess for subp_spec_or_null at nodes.lkt:8439:13>' Fld_6 ada/nodes.lkt:8439
      if Var_Expr_141.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_141.Node, E_Info => Var_Expr_141.Info);
--# end
--# expr-done 4750
Var_Expr_142 := Fld_6;
if Var_Expr_142 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 4751 '<FieldAccess for dottable_subp_of at nodes.lkt:8439:13>' Fld_7 ada/nodes.lkt:8439
      if Var_Expr_142.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.dottable_subp_of
Fld_7 := Libadalang.Implementation.Base_Subp_Spec_P_Dottable_Subp_Of (Node => Var_Expr_142.Node, E_Info => Var_Expr_142.Info);
--# end
--# expr-done 4751
Var_Expr_143 := Fld_7;
if Var_Expr_143 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 4752 '<FieldAccess for base_subtype at nodes.lkt:8439:13>' Fld_8 ada/nodes.lkt:8439
      if Var_Expr_143.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_8 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Var_Expr_143.Node, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_143.Info);
--# end
--# expr-done 4752
Scope_Result_1 := Fld_8;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_3 := Result_Var_2;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Entity_Base_Type_Decl;
end if;
      Cast_Result_3 := Create_Internal_Entity
        (Node => Result_Var_3.Node,
         Info => Result_Var_3.Info);
Cast_Expr_2 := Ent; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Is_Equiv := Equivalent (Cast_Result_3, Cast_Result_4); 
--# expr-done 4753
         if Is_Equiv then
      --# expr-start 4760 '<Let at nodes.lkt:8430:17>' Let_Result ada/nodes.lkt:8430
--# scope-start
--# expr-start 4754 '<Cast to BasicDecl at nodes.lkt:8430:26>' Cast_Result ada/nodes.lkt:8430
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 4754
Local_Bd := Cast_Result; 
--# bind bd Local_Bd
--# expr-start 4759 '<New InnerEnvAssoc at nodes.lkt:8432:17>' New_Struct_1 ada/nodes.lkt:8432
--# expr-start 4756 '<FieldAccess for name_symbol at nodes.lkt:8433:25>' Fld_4 ada/nodes.lkt:8433
--# expr-start 4755 '<FieldAccess for defining_name at nodes.lkt:8433:25>' Fld_3 ada/nodes.lkt:8433
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 4755
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_3.Node);
--# end
--# expr-done 4756
--# expr-start 4757 '<New Metadata at nodes.lkt:8435:30>' New_Struct ada/nodes.lkt:8435
New_Struct := (Dottable_Subp => True, Primitive => No_Bare_Ada_Node, Primitive_Real_Type => No_Bare_Ada_Node); 
--# expr-done 4757
--# expr-start 4758 '<FieldAccess for node at nodes.lkt:8434:27>' Fld_5 ada/nodes.lkt:8434
Fld_5 := Local_Bd.Node;
--# expr-done 4758
      Cast_Result_1 := Fld_5;
New_Struct_1 := (Key => Fld_4, Metadata => New_Struct, Rebindings => null, Value => Cast_Result_1); 
--# expr-done 4759
Let_Result := New_Struct_1; 
--# end
--# expr-done 4760
         declare
            Item_To_Append : constant Internal_Inner_Env_Assoc := Let_Result;
         begin
            Internal_Inner_Env_Assoc_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Inner_Env_Assoc_Array
           (Items_Count => Natural (Internal_Inner_Env_Assoc_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Inner_Env_Assoc_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Inner_Env_Assoc_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Inner_Env_Assoc_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 4761
         Property_Result := Map_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_653;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_653;
                     Finalizer_Scope_2588;
                     Finalizer_Scope_2589;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Dottable_Subps_In_Declaratives_Parts;
--# end
--# property-start BaseTypeDecl.find_base_type_rebindings_among ada/nodes.lkt:8448
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Find_Base_Type_Rebindings_Among
  (Node : Bare_Base_Type_Decl
      ; Target : Bare_Base_Type_Decl
      ; Base_Types : Internal_Entity_Base_Type_Decl_Array_Access
      ; Index : Integer
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Env_Rebindings
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind target Target
   --# bind base_types Base_Types
   --# bind index Index
   --# bind origin Origin
   Property_Result : Env_Rebindings;
      Var_Expr : Env_Rebindings;
Get_Result : Internal_Entity_Base_Type_Decl;
Fld : Env_Rebindings;
Scope_Result : Env_Rebindings;
Arith_Result : Integer;
Fld_1 : Env_Rebindings;
Result_Var : Env_Rebindings;
Len : Integer;
Comp_Result : Boolean;
If_Result : Env_Rebindings;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4767 '<If at nodes.lkt:8453:9>' If_Result ada/nodes.lkt:8453
--# expr-start 4762 '<length at nodes.lkt:8453:21>' Len ada/nodes.lkt:8453
Len := Length (Base_Types); 
--# expr-done 4762
Comp_Result := Index >= Len; 
if Comp_Result then
   If_Result := null;
else
--# expr-start 4764 '<FieldAccess for find_base_type_rebindings at nodes.lkt:8455:13>' Fld ada/nodes.lkt:8455
--# expr-start 4763 '<at at nodes.lkt:8455:13>' Get_Result ada/nodes.lkt:8455
Get_Result := Get (Self, Base_Types, Index, True); 
--# expr-done 4763
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.find_base_type_rebindings
Fld := Libadalang.Implementation.Base_Type_Decl_P_Find_Base_Type_Rebindings (Node => Get_Result.Node, Target => Target, Origin => Origin, E_Info => Get_Result.Info);
--# end
--# expr-done 4764
Var_Expr := Fld;
if Var_Expr /= null then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 4766 '<FieldAccess for find_base_type_rebindings_among at nodes.lkt:8456:17>' Fld_1 ada/nodes.lkt:8456
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4765 '<Arithmetic + at nodes.lkt:8459:17>' Arith_Result ada/nodes.lkt:8459
Arith_Result := (Index + 1); 
--# expr-done 4765
--# property-call-start BaseTypeDecl.find_base_type_rebindings_among
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Find_Base_Type_Rebindings_Among (Node => Ent.Node, Target => Target, Base_Types => Base_Types, Index => Arith_Result, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4766
   Result_Var := Fld_1;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 4767
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Find_Base_Type_Rebindings_Among;
--# end
--# property-start BaseTypeDecl.find_base_type_rebindings ada/nodes.lkt:8478
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Find_Base_Type_Rebindings
  (Node : Bare_Base_Type_Decl
      ; Target : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Env_Rebindings
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind target Target
   --# bind origin Origin
   Property_Result : Env_Rebindings;
            procedure Finalizer_Scope_655 with Inline_Always;
      Fld : Internal_Entity_Info;
Fld_1 : Env_Rebindings;
Fld_2 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_3 : Env_Rebindings;
Cast_Expr : Bare_Base_Type_Decl;
Cast_Result : Bare_Base_Type_Decl;
Is_Equal : Boolean;
If_Result : Env_Rebindings;
            procedure Finalizer_Scope_655 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_655;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Type_Decl_Base_Type_Decl_P_Find_Base_Type_Rebindings,
            Items    => new Mmz_Key_Array (1 ..  4))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Type_Decl,
                                As_Bare_Base_Type_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Base_Type_Decl,
                                      As_Bare_Base_Type_Decl => Target);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (4) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Env_Rebindings;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4773 '<If at nodes.lkt:8479:9>' If_Result ada/nodes.lkt:8479
--# expr-start 4768 '<Eq at nodes.lkt:8479:12>' Is_Equal ada/nodes.lkt:8479
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Is_Equal := Cast_Result = Target; 
--# expr-done 4768
if Is_Equal then
   --# expr-start 4770 '<FieldAccess for rebindings at nodes.lkt:8479:32>' Fld_1 ada/nodes.lkt:8479
--# expr-start 4769 '<FieldAccess for info at nodes.lkt:8479:32>' Fld ada/nodes.lkt:8479
Fld := Ent.Info;
--# expr-done 4769
Fld_1 := Fld.Rebindings;
--# expr-done 4770
   If_Result := Fld_1;
else
   --# expr-start 4772 '<FieldAccess for find_base_type_rebindings_among at nodes.lkt:8481:13>' Fld_3 ada/nodes.lkt:8481
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4771 '<FieldAccess for base_types at nodes.lkt:8483:28>' Fld_2 ada/nodes.lkt:8483
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_types'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Types (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4771
--# property-call-start BaseTypeDecl.find_base_type_rebindings_among
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Find_Base_Type_Rebindings_Among (Node => Ent.Node, Target => Target, Base_Types => Fld_2, Index => 0, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4772
   If_Result := Fld_3;
end if;
--# expr-done 4773
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_655;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_655;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Env_Rebindings,
                        As_Env_Rebindings => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Type_Decl_P_Find_Base_Type_Rebindings;
--# end
--# property-start BaseTypeDecl.has_base_type_impl ada/nodes.lkt:8489
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Has_Base_Type_Impl
  (Node : Bare_Base_Type_Decl
      ; Target : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind target Target
   Property_Result : Boolean;
            procedure Finalizer_Scope_656 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Bare_Base_Type_Decl;
Cast_Result : Bare_Base_Type_Decl;
Is_Equal : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_3 : Boolean;
Quantifier_Result : Boolean;
If_Result : Boolean;
            procedure Finalizer_Scope_656 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_656;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4780 '<BooleanBinaryOp Or at nodes.lkt:8490:9>' If_Result ada/nodes.lkt:8490
--# expr-start 4776 '<Eq at nodes.lkt:8490:9>' Is_Equal ada/nodes.lkt:8490
--# expr-start 4775 '<FieldAccess for node at nodes.lkt:8490:9>' Fld_1 ada/nodes.lkt:8490
--# expr-start 4774 '<FieldAccess for canonical_type at nodes.lkt:8490:9>' Fld ada/nodes.lkt:8490
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Ent.Node, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 4774
Fld_1 := Fld.Node;
--# expr-done 4775
      Cast_Result := Fld_1;
Is_Equal := Cast_Result = Target; 
--# expr-done 4776
if Is_Equal then
   If_Result := True;
else
   --# expr-start 4779 '<AnyQuantifier at nodes.lkt:8491:12>' Quantifier_Result ada/nodes.lkt:8491
   --# expr-start 4777 '<FieldAccess for base_types at nodes.lkt:8491:12>' Fld_2 ada/nodes.lkt:8491
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_types'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Types (Node => Ent.Node, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 4777
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld_2;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind bt Item_0
      --# expr-start 4778 '<FieldAccess for has_base_type_impl at nodes.lkt:8491:42>' Fld_3 ada/nodes.lkt:8491
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.has_base_type_impl
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Has_Base_Type_Impl (Node => Item_0.Node, Target => Target, E_Info => Item_0.Info);
--# end
--# expr-done 4778
      Quantifier_Result := Fld_3;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 4779
   If_Result := Quantifier_Result;
end if;
--# expr-done 4780
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_656;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_656;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Has_Base_Type_Impl;
--# end
--# property-start BaseTypeDecl.has_base_type ada/nodes.lkt:8499
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Has_Base_Type
  (Node : Bare_Base_Type_Decl
      ; Target : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind target Target
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Fld_3 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4785 '<FieldAccess for has_base_type_impl at nodes.lkt:8500:9>' Fld_3 ada/nodes.lkt:8500
--# expr-start 4781 '<FieldAccess for full_view at nodes.lkt:8500:9>' Fld ada/nodes.lkt:8500
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.full_view
Fld := Libadalang.Implementation.Base_Type_Decl_P_Full_View (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4781
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 4784 '<FieldAccess for node at nodes.lkt:8501:13>' Fld_2 ada/nodes.lkt:8501
--# expr-start 4783 '<FieldAccess for canonical_type at nodes.lkt:8501:13>' Fld_1 ada/nodes.lkt:8501
--# expr-start 4782 '<as_bare_entity at nodes.lkt:8501:13>' If_Result ada/nodes.lkt:8501
Is_Null := Target = null; 
if Is_Null then
   If_Result := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Target); 
   If_Result := As_Entity;
end if;
--# expr-done 4782
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => If_Result.Node, Origin => No_Bare_Ada_Node, E_Info => If_Result.Info);
--# end
--# expr-done 4783
Fld_2 := Fld_1.Node;
--# expr-done 4784
--# property-call-start BaseTypeDecl.has_base_type_impl
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Has_Base_Type_Impl (Node => Fld.Node, Target => Fld_2, E_Info => Fld.Info);
--# end
--# expr-done 4785
         Property_Result := Fld_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Has_Base_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.parent_primitives_env' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Parent_Primitives_Env
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.parent_primitives_env
                  Property_Result := Base_Type_Decl_P_Parent_Primitives_Env
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.parent_primitives_env
                  Property_Result := Type_Decl_P_Parent_Primitives_Env
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Parent_Primitives_Env;
--# end
--# property-start '[dispatcher]BaseTypeDecl.primitives_env' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Primitives_Env
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Protected_Type_Decl =>
                  --# property-call-start BaseTypeDecl.primitives_env
                  Property_Result := Base_Type_Decl_P_Primitives_Env
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.primitives_env
                  Property_Result := Base_Subtype_Decl_P_Primitives_Env
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start TaskTypeDecl.primitives_env
                  Property_Result := Task_Type_Decl_P_Primitives_Env
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.primitives_env
                  Property_Result := Type_Decl_P_Primitives_Env
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Primitives_Env;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_record_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Record_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_record_type
                  Property_Result := Base_Type_Decl_P_Is_Record_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_record_type
                  Property_Result := Base_Subtype_Decl_P_Is_Record_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Record_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_task_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Task_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Protected_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_task_type
                  Property_Result := Base_Type_Decl_P_Is_Task_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_task_type
                  Property_Result := Base_Subtype_Decl_P_Is_Task_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.is_task_type
                  Property_Result := Classwide_Type_Decl_P_Is_Task_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start TaskTypeDecl.is_task_type
                  Property_Result := Task_Type_Decl_P_Is_Task_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_task_type
                  Property_Result := Type_Decl_P_Is_Task_Type
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Task_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_real_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Real_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_real_type
                  Property_Result := Base_Type_Decl_P_Is_Real_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_real_type
                  Property_Result := Base_Subtype_Decl_P_Is_Real_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_real_type
                  Property_Result := Type_Decl_P_Is_Real_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Real_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_float_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Float_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_float_type
                  Property_Result := Base_Type_Decl_P_Is_Float_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_float_type
                  Property_Result := Base_Subtype_Decl_P_Is_Float_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_float_type
                  Property_Result := Type_Decl_P_Is_Float_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Float_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_fixed_point' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Fixed_Point
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_fixed_point
                  Property_Result := Base_Type_Decl_P_Is_Fixed_Point
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_fixed_point
                  Property_Result := Base_Subtype_Decl_P_Is_Fixed_Point
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_fixed_point
                  Property_Result := Type_Decl_P_Is_Fixed_Point
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Fixed_Point;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_enum_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Enum_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_enum_type
                  Property_Result := Base_Type_Decl_P_Is_Enum_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_enum_type
                  Property_Result := Base_Subtype_Decl_P_Is_Enum_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_enum_type
                  Property_Result := Type_Decl_P_Is_Enum_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Enum_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_classwide' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Classwide
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_classwide
                  Property_Result := Base_Type_Decl_P_Is_Classwide
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_classwide
                  Property_Result := Base_Subtype_Decl_P_Is_Classwide
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.is_classwide
                  Property_Result := Classwide_Type_Decl_P_Is_Classwide
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Classwide;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_access_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Access_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_access_type
                  Property_Result := Base_Type_Decl_P_Is_Access_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_access_type
                  Property_Result := Base_Subtype_Decl_P_Is_Access_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_access_type
                  Property_Result := Type_Decl_P_Is_Access_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Access_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.has_ud_indexing' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Has_Ud_Indexing
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.has_ud_indexing
                  Property_Result := Base_Type_Decl_P_Has_Ud_Indexing
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.has_ud_indexing
                  Property_Result := Base_Subtype_Decl_P_Has_Ud_Indexing
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.has_ud_indexing
                  Property_Result := Classwide_Type_Decl_P_Has_Ud_Indexing
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.has_ud_indexing
                  Property_Result := Type_Decl_P_Has_Ud_Indexing
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Has_Ud_Indexing;
--# end
--# property-start '[dispatcher]BaseTypeDecl.constant_indexing_fns' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Constant_Indexing_Fns
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.constant_indexing_fns
                  Property_Result := Base_Type_Decl_P_Constant_Indexing_Fns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.constant_indexing_fns
                  Property_Result := Base_Subtype_Decl_P_Constant_Indexing_Fns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.constant_indexing_fns
                  Property_Result := Classwide_Type_Decl_P_Constant_Indexing_Fns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.constant_indexing_fns
                  Property_Result := Type_Decl_P_Constant_Indexing_Fns
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Constant_Indexing_Fns;
--# end
--# property-start '[dispatcher]BaseTypeDecl.variable_indexing_fns' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Variable_Indexing_Fns
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.variable_indexing_fns
                  Property_Result := Base_Type_Decl_P_Variable_Indexing_Fns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.variable_indexing_fns
                  Property_Result := Base_Subtype_Decl_P_Variable_Indexing_Fns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.variable_indexing_fns
                  Property_Result := Classwide_Type_Decl_P_Variable_Indexing_Fns
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.variable_indexing_fns
                  Property_Result := Type_Decl_P_Variable_Indexing_Fns
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Variable_Indexing_Fns;
--# end
--# property-start '[dispatcher]BaseTypeDecl.get_imp_deref' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Get_Imp_Deref
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Discrete_Base_Subtype_Decl | Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.get_imp_deref
                  Property_Result := Base_Type_Decl_P_Get_Imp_Deref
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Decl =>
                  --# property-call-start SubtypeDecl.get_imp_deref
                  Property_Result := Subtype_Decl_P_Get_Imp_Deref
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.get_imp_deref
                  Property_Result := Type_Decl_P_Get_Imp_Deref
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Get_Imp_Deref;
--# end
--# property-start '[dispatcher]BaseTypeDecl.access_def' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Access_Def
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Access_Def
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Access_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.access_def
                  Property_Result := Base_Type_Decl_P_Access_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.access_def
                  Property_Result := Base_Subtype_Decl_P_Access_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.access_def
                  Property_Result := Type_Decl_P_Access_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Access_Def;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_char_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Char_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_char_type
                  Property_Result := Base_Type_Decl_P_Is_Char_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_char_type
                  Property_Result := Base_Subtype_Decl_P_Is_Char_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_char_type
                  Property_Result := Type_Decl_P_Is_Char_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Char_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.classwide_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Classwide_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Classwide_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Classwide_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl | Ada_Incomplete_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.classwide_type
                  Property_Result := Base_Type_Decl_P_Classwide_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.classwide_type
                  Property_Result := Classwide_Type_Decl_P_Classwide_Type
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Classwide_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.discrete_range' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Discrete_Range
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Discrete_Base_Subtype_Decl | Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.discrete_range
                  Property_Result := Base_Type_Decl_P_Discrete_Range
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Decl =>
                  --# property-call-start SubtypeDecl.discrete_range
                  Property_Result := Subtype_Decl_P_Discrete_Range
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.discrete_range
                  Property_Result := Type_Decl_P_Discrete_Range
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Discrete_Range;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_discrete_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Discrete_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_discrete_type
                  Property_Result := Base_Type_Decl_P_Is_Discrete_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_discrete_type
                  Property_Result := Base_Subtype_Decl_P_Is_Discrete_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_discrete_type
                  Property_Result := Type_Decl_P_Is_Discrete_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Discrete_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_int_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Int_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_int_type
                  Property_Result := Base_Type_Decl_P_Is_Int_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_int_type
                  Property_Result := Base_Subtype_Decl_P_Is_Int_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_int_type
                  Property_Result := Type_Decl_P_Is_Int_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Int_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.accessed_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Accessed_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.accessed_type
                  Property_Result := Base_Type_Decl_P_Accessed_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.accessed_type
                  Property_Result := Base_Subtype_Decl_P_Accessed_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.accessed_type
                  Property_Result := Type_Decl_P_Accessed_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Accessed_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_tagged_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Tagged_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl | Ada_Protected_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_tagged_type
                  Property_Result := Base_Type_Decl_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_tagged_type
                  Property_Result := Base_Subtype_Decl_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.is_tagged_type
                  Property_Result := Classwide_Type_Decl_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Incomplete_Formal_Type_Decl =>
                  --# property-call-start IncompleteFormalTypeDecl.is_tagged_type
                  Property_Result := Incomplete_Formal_Type_Decl_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Incomplete_Tagged_Type_Decl =>
                  --# property-call-start IncompleteTaggedTypeDecl.is_tagged_type
                  Property_Result := Incomplete_Tagged_Type_Decl_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_tagged_type
                  Property_Result := Type_Decl_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Tagged_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.base_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Base_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.base_type
                  Property_Result := Base_Type_Decl_P_Base_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.base_type
                  Property_Result := Base_Subtype_Decl_P_Base_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.base_type
                  Property_Result := Classwide_Type_Decl_P_Base_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.base_type
                  Property_Result := Type_Decl_P_Base_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Base_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.base_types' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Base_Types
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.base_types
                  Property_Result := Base_Type_Decl_P_Base_Types
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.base_types
                  Property_Result := Base_Subtype_Decl_P_Base_Types
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Base_Types;
--# end
--# property-start '[dispatcher]BaseTypeDecl.base_interfaces' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Base_Interfaces
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Incomplete_Tagged_Type_Decl =>
                  --# property-call-start BaseTypeDecl.base_interfaces
                  Property_Result := Base_Type_Decl_P_Base_Interfaces
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.base_interfaces
                  Property_Result := Base_Subtype_Decl_P_Base_Interfaces
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.base_interfaces
                  Property_Result := Classwide_Type_Decl_P_Base_Interfaces
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Protected_Type_Decl =>
                  --# property-call-start ProtectedTypeDecl.base_interfaces
                  Property_Result := Protected_Type_Decl_P_Base_Interfaces
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start TaskTypeDecl.base_interfaces
                  Property_Result := Task_Type_Decl_P_Base_Interfaces
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.base_interfaces
                  Property_Result := Type_Decl_P_Base_Interfaces
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Base_Interfaces;
--# end
--# property-start '[dispatcher]BaseTypeDecl.record_def' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Record_Def
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Record_Def
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Record_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.record_def
                  Property_Result := Base_Type_Decl_P_Record_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.record_def
                  Property_Result := Base_Subtype_Decl_P_Record_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.record_def
                  Property_Result := Classwide_Type_Decl_P_Record_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.record_def
                  Property_Result := Type_Decl_P_Record_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Record_Def;
--# end
--# property-start '[dispatcher]BaseTypeDecl.array_def' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Array_Def
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Type_Def
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Type_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.array_def
                  Property_Result := Base_Type_Decl_P_Array_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.array_def
                  Property_Result := Base_Subtype_Decl_P_Array_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.array_def
                  Property_Result := Type_Decl_P_Array_Def
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Array_Def;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_iterable_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Iterable_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_iterable_type
                  Property_Result := Base_Type_Decl_P_Is_Iterable_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_iterable_type
                  Property_Result := Base_Subtype_Decl_P_Is_Iterable_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.is_iterable_type
                  Property_Result := Classwide_Type_Decl_P_Is_Iterable_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_iterable_type
                  Property_Result := Type_Decl_P_Is_Iterable_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Iterable_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_interface_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Interface_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl | Ada_Incomplete_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_interface_type
                  Property_Result := Base_Type_Decl_P_Is_Interface_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.is_interface_type
                  Property_Result := Classwide_Type_Decl_P_Is_Interface_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Interface_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.iterable_comp_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Iterable_Comp_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.iterable_comp_type
                  Property_Result := Base_Type_Decl_P_Iterable_Comp_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.iterable_comp_type
                  Property_Result := Base_Subtype_Decl_P_Iterable_Comp_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.iterable_comp_type
                  Property_Result := Classwide_Type_Decl_P_Iterable_Comp_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.iterable_comp_type
                  Property_Result := Type_Decl_P_Iterable_Comp_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Iterable_Comp_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.iterable_cursor_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Iterable_Cursor_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.iterable_cursor_type
                  Property_Result := Base_Type_Decl_P_Iterable_Cursor_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.iterable_cursor_type
                  Property_Result := Base_Subtype_Decl_P_Iterable_Cursor_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.iterable_cursor_type
                  Property_Result := Type_Decl_P_Iterable_Cursor_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Iterable_Cursor_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.canonical_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Canonical_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start BaseTypeDecl.canonical_type
                  Property_Result := Base_Type_Decl_P_Canonical_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.canonical_type
                  Property_Result := Base_Subtype_Decl_P_Canonical_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.canonical_type
                  Property_Result := Classwide_Type_Decl_P_Canonical_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Canonical_Type;
--# end
--# property-start '[dispatcher]BaseTypeDecl.is_private' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Is_Private
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Incomplete_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.is_private
                  Property_Result := Base_Type_Decl_P_Is_Private
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.is_private
                  Property_Result := Base_Subtype_Decl_P_Is_Private
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Classwide_Type_Decl =>
                  --# property-call-start ClasswideTypeDecl.is_private
                  Property_Result := Classwide_Type_Decl_P_Is_Private
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.is_private
                  Property_Result := Type_Decl_P_Is_Private
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Is_Private;
--# end
--# property-start '[dispatcher]BaseTypeDecl.root_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Type_Decl_P_Root_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Type_Decl (Self.Kind) is
               when Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
                  --# property-call-start BaseTypeDecl.root_type
                  Property_Result := Base_Type_Decl_P_Root_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Discrete_Base_Subtype_Decl .. Ada_Subtype_Decl =>
                  --# property-call-start BaseSubtypeDecl.root_type
                  Property_Result := Base_Subtype_Decl_P_Root_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
                  --# property-call-start TypeDecl.root_type
                  Property_Result := Type_Decl_P_Root_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Type_Decl_P_Root_Type;
--# end
--# property-start BaseTypeDecl._env_mappings_16 ada/nodes.lkt:8672
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_16
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1680 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1680 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1680;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4788 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 4786 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 4786
--# expr-start 4787 '<FieldAccess for name_symbol at nodes.lkt:8672:23>' Fld ada/nodes.lkt:8672
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 4787
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 4788
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1680;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1680;
            raise;
      end;
   return Property_Result;
end Env_Mappings_16;
--# end
--# property-start BaseTypeDecl.parent_primitives_env ada/nodes.lkt:8504
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Parent_Primitives_Env
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_658 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_658 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_658;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4789 '<FieldAccess for empty_env at nodes.lkt:8504:47>' Fld ada/nodes.lkt:8504
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.empty_env
Fld := Libadalang.Implementation.Ada_Node_P_Empty_Env (Node => Self);
--# end
--# expr-done 4789
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_658;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_658;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Parent_Primitives_Env;
--# end
--# property-start BaseTypeDecl.primitives_env ada/nodes.lkt:8506
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Primitives_Env
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Empty_Env;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Primitives_Env;
--# end
--# property-start BaseTypeDecl.is_record_type ada/nodes.lkt:8514
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Record_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Record_Def;
Is_Null : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4792 '<Not at nodes.lkt:8514:34>' Not_Val ada/nodes.lkt:8514
--# expr-start 4791 '<IsNull at nodes.lkt:8514:38>' Is_Null ada/nodes.lkt:8514
--# expr-start 4790 '<FieldAccess for record_def at nodes.lkt:8514:38>' Fld ada/nodes.lkt:8514
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4790
Is_Null := Fld.Node = null; 
--# expr-done 4791
Not_Val := not (Is_Null); 
--# expr-done 4792
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Record_Type;
--# end
--# property-start BaseTypeDecl.is_task_type ada/nodes.lkt:8517
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Task_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Task_Type;
--# end
--# property-start BaseTypeDecl.is_real_type ada/nodes.lkt:8522
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Real_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Real_Type;
--# end
--# property-start BaseTypeDecl.is_float_type ada/nodes.lkt:8527
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Float_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Float_Type;
--# end
--# property-start BaseTypeDecl.is_fixed_point ada/nodes.lkt:8532
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Fixed_Point
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Fixed_Point;
--# end
--# property-start BaseTypeDecl.is_enum_type ada/nodes.lkt:8537
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Enum_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Enum_Type;
--# end
--# property-start BaseTypeDecl.is_classwide ada/nodes.lkt:8539
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Classwide
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Classwide;
--# end
--# property-start BaseTypeDecl.is_access_type ada/nodes.lkt:8544
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Access_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Access_Type;
--# end
--# property-start BaseTypeDecl.has_ud_indexing ada/nodes.lkt:8547
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Has_Ud_Indexing
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Has_Ud_Indexing;
--# end
--# property-start BaseTypeDecl.constant_indexing_fns ada/nodes.lkt:8551
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Constant_Indexing_Fns
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Basic_Decl_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Constant_Indexing_Fns;
--# end
--# property-start BaseTypeDecl.variable_indexing_fns ada/nodes.lkt:8556
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Variable_Indexing_Fns
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Basic_Decl_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Variable_Indexing_Fns;
--# end
--# property-start BaseTypeDecl.get_imp_deref ada/nodes.lkt:8560
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Get_Imp_Deref
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Expr;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Get_Imp_Deref;
--# end
--# property-start BaseTypeDecl.access_def ada/nodes.lkt:8563
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Access_Def
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Access_Def
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Access_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Access_Def;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Access_Def;
--# end
--# property-start BaseTypeDecl.is_char_type ada/nodes.lkt:8568
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Char_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Char_Type;
--# end
--# property-start BaseTypeDecl.classwide_type ada/nodes.lkt:8573
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Classwide_Type
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Classwide_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Classwide_Type_Decl;
      Cast_Expr : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld : Bare_Classwide_Type_Decl;
As_Entity : Internal_Entity_Classwide_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Classwide_Type_Decl;
Fld_1 : Boolean;
If_Result_1 : Internal_Entity_Classwide_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Classwide_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4797 '<bind at nodes.lkt:8574:9>' Dyn_Var_Bind_Result ada/nodes.lkt:8574
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 4796 '<If at nodes.lkt:8576:9>' If_Result_1 ada/nodes.lkt:8576
--# expr-start 4793 '<FieldAccess for is_tagged_type at nodes.lkt:8576:12>' Fld_1 ada/nodes.lkt:8576
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_tagged_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Tagged_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 4793
if Fld_1 then
   --# expr-start 4795 '<as_entity at nodes.lkt:8576:39>' If_Result ada/nodes.lkt:8576
--# expr-start 4794 '<FieldAccess for classwide_type_node at nodes.lkt:8576:39>' Fld ada/nodes.lkt:8576
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.classwide_type_node
Fld := Libadalang.Implementation.Base_Type_Decl_P_Classwide_Type_Node (Node => Self);
--# end
--# expr-done 4794
Is_Null := Fld = null; 
if Is_Null then
   If_Result := No_Entity_Classwide_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Fld); 
   If_Result := As_Entity;
end if;
--# expr-done 4795
   If_Result_1 := If_Result;
else
   If_Result_1 := No_Entity_Classwide_Type_Decl;
end if;
--# expr-done 4796
Dyn_Var_Bind_Result := If_Result_1; 
--# expr-done 4797
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Classwide_Type;
--# end
--# property-start BaseTypeDecl.discrete_range ada/nodes.lkt:8582
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Discrete_Range
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Discrete_Range;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Discrete_Range;
--# end
--# property-start BaseTypeDecl.is_discrete_type ada/nodes.lkt:8587
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Discrete_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
Fld_2 : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4802 '<BooleanBinaryOp Or at nodes.lkt:8588:9>' If_Result_1 ada/nodes.lkt:8588
--# expr-start 4800 '<BooleanBinaryOp Or at nodes.lkt:8588:10>' If_Result ada/nodes.lkt:8588
--# expr-start 4798 '<FieldAccess for is_int_type at nodes.lkt:8588:10>' Fld ada/nodes.lkt:8588
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_int_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Int_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4798
if Fld then
   If_Result := True;
else
   --# expr-start 4799 '<FieldAccess for is_enum_type at nodes.lkt:8588:32>' Fld_1 ada/nodes.lkt:8588
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_enum_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Enum_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4799
   If_Result := Fld_1;
end if;
--# expr-done 4800
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 4801 '<FieldAccess for is_char_type at nodes.lkt:8588:56>' Fld_2 ada/nodes.lkt:8588
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_char_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Char_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4801
   If_Result_1 := Fld_2;
end if;
--# expr-done 4802
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Discrete_Type;
--# end
--# property-start BaseTypeDecl.is_int_type ada/nodes.lkt:8593
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Int_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Int_Type;
--# end
--# property-start BaseTypeDecl.accessed_type ada/nodes.lkt:8599
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Accessed_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Type_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Accessed_Type;
--# end
--# property-start BaseTypeDecl.is_tagged_type ada/nodes.lkt:8604
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Tagged_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Tagged_Type;
--# end
--# property-start BaseTypeDecl.base_type ada/nodes.lkt:8609
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Base_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Type_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Base_Type;
--# end
--# property-start BaseTypeDecl.base_types ada/nodes.lkt:8614
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Base_Types
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_681 with Inline_Always;
            procedure Finalizer_Scope_2597 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Array_Lit : Internal_Entity_Base_Type_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Concat_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_681 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_681;
            procedure Finalizer_Scope_2597 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2597;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4803 '<FieldAccess for base_type at nodes.lkt:8615:9>' Fld ada/nodes.lkt:8615
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4803
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 4804 '<ArrayLiteral at nodes.lkt:8615:37>' Array_Lit ada/nodes.lkt:8615
Array_Lit := Create_Internal_Entity_Base_Type_Decl_Array (Internal_Internal_Entity_Base_Type_Decl_Array'(1 => Var_Expr_0)); 
--# expr-done 4804
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2597;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
--# expr-start 4805 '<FieldAccess for base_interfaces at nodes.lkt:8615:45>' Fld_1 ada/nodes.lkt:8615
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_interfaces'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Interfaces (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4805
Concat_Result := Concat (Result_Var, Fld_1); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_681;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_681;
                     Finalizer_Scope_2597;
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Base_Types;
--# end
--# property-start BaseTypeDecl.base_interfaces ada/nodes.lkt:8618
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Base_Interfaces
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Base_Type_Decl_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Base_Interfaces;
--# end
--# property-start BaseTypeDecl.record_def ada/nodes.lkt:8622
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Record_Def
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Record_Def
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Record_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Record_Def;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Record_Def;
--# end
--# property-start BaseTypeDecl.array_def ada/nodes.lkt:8625
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Array_Def
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Type_Def
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Type_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Array_Type_Def;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Array_Def;
--# end
--# property-start BaseTypeDecl.is_iterable_type ada/nodes.lkt:8629
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Iterable_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Iterable_Type;
--# end
--# property-start BaseTypeDecl.is_interface_type ada/nodes.lkt:8634
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Interface_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Match_0 : Internal_Entity_Type_Decl;
Match_1 : Internal_Entity_Subtype_Decl;
Match_2 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Type_Def;
Is_A : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Boolean;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Type_Decl;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_1 : Internal_Entity_Subtype_Decl;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Match_Result : Boolean;
Scope_Result_3 : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4806 '<FieldAccess for full_view at nodes.lkt:8635:9>' Fld ada/nodes.lkt:8635
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.full_view
Fld := Libadalang.Implementation.Base_Type_Decl_P_Full_View (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4806
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 4811 '<Match at nodes.lkt:8637:13>' Match_Result ada/nodes.lkt:8637
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind td Match_0
--# expr-start 4808 '<IsA InterfaceTypeDef at nodes.lkt:8638:38>' Is_A ada/nodes.lkt:8638
--# expr-start 4807 '<FieldAccess for type_def at nodes.lkt:8638:38>' Fld_1 ada/nodes.lkt:8638
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Def (Node => Match_0.Node.Type_Decl_F_Type_Def, Info => Match_0.Info);
--# expr-done 4807
Is_A := Fld_1.Node /= null 
and then Fld_1.Node.Kind in Ada_Interface_Type_Def_Range; 
--# expr-done 4808
Let_Result := Is_A; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Subtype_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind sb Match_1
--# expr-start 4810 '<FieldAccess for is_interface_type at nodes.lkt:8639:41>' Fld_3 ada/nodes.lkt:8639
--# expr-start 4809 '<FieldAccess for get_type at nodes.lkt:8639:41>' Fld_2 ada/nodes.lkt:8639
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Match_1.Node, Origin => Origin, E_Info => Match_1.Info);
--# end
--# expr-done 4809
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_interface_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Interface_Type (Node => Fld_2.Node, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 4810
Let_Result_1 := Fld_3; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Discrete_Base_Subtype_Decl | Ada_Classwide_Type_Decl .. Ada_Single_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := False; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 4811
Scope_Result_3 := Match_Result;
   --# end
   Result_Var := Scope_Result_3;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Interface_Type;
--# end
--# property-start BaseTypeDecl.iterable_comp_type ada/nodes.lkt:8645
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Iterable_Comp_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Type_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Iterable_Comp_Type;
--# end
--# property-start BaseTypeDecl.iterable_cursor_type ada/nodes.lkt:8648
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Iterable_Cursor_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Type_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Iterable_Cursor_Type;
--# end
--# property-start BaseTypeDecl.canonical_type ada/nodes.lkt:8655
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Canonical_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Bound_Imprecise_Fallback : Boolean;
Fld : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4814 '<bind at nodes.lkt:8656:9>' Dyn_Var_Bind_Result ada/nodes.lkt:8656
Bound_Imprecise_Fallback := False; 
--# expr-start 4813 '<Cast to BaseTypeDecl at nodes.lkt:8658:9>' Cast_Result ada/nodes.lkt:8658
--# expr-start 4812 '<FieldAccess for canonical_part at nodes.lkt:8658:9>' Fld ada/nodes.lkt:8658
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Ent.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 4812
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 4813
Dyn_Var_Bind_Result := Cast_Result; 
--# expr-done 4814
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Canonical_Type;
--# end
--# property-start BaseTypeDecl.is_private ada/nodes.lkt:8663
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Is_Private
  (Node : Bare_Base_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Is_Private;
--# end
--# property-start BaseTypeDecl.root_type ada/nodes.lkt:8669
pragma Warnings (Off, "is not referenced");
 function Base_Type_Decl_P_Root_Type
  (Node : Bare_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Type_Decl  := Bare_Base_Type_Decl (Node);
     Ent : Internal_Entity_Base_Type_Decl :=
       Internal_Entity_Base_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Ent;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Type_Decl_P_Root_Type;
--# end
function Base_Type_Decl_F_Direct_Primitive_Subps
  (E : Entity
  ) return Internal_Inner_Env_Assoc_Array_Access
is
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Base_Type_Decl
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Internal_Inner_Env_Assoc_Array_Access :=
         Base_Type_Decl_F_Direct_Primitive_Subps (E.Node);
   begin
         return Result;
   end;
end;
function Base_Type_Decl_P_Dottable_Subps
  (E : Entity
  ) return Internal_Inner_Env_Assoc_Array_Access
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Base_Type_Decl
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Internal_Inner_Env_Assoc_Array_Access :=
         Base_Type_Decl_P_Dottable_Subps (E.Node, E_Info);
   begin
         return Result;
   end;
end;
   --
   --  Primitives for Bare_Base_Subtype_Decl
   --
      procedure Initialize_Fields_For_Base_Subtype_Decl
        (Self : Bare_Base_Subtype_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
        ) is
      begin
            Initialize_Fields_For_Base_Type_Decl
              (Self, Base_Type_Decl_F_Name);
      end Initialize_Fields_For_Base_Subtype_Decl;
--# property-start BaseSubtypeDecl.from_type_bound ada/nodes.lkt:8679
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_From_Type_Bound
  (Node : Bare_Base_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4816 '<bind at nodes.lkt:8685:9>' Dyn_Var_Bind_Result ada/nodes.lkt:8685
Bound_Origin := No_Bare_Ada_Node; 
--# expr-start 4815 '<FieldAccess for get_type at nodes.lkt:8687:9>' Fld ada/nodes.lkt:8687
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 4815
Dyn_Var_Bind_Result := Fld; 
--# expr-done 4816
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_From_Type_Bound;
--# end
--# property-start '[dispatcher]BaseSubtypeDecl.get_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Base_Subtype_Decl_P_Get_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Base_Subtype_Decl (Self.Kind) is
               when Ada_Discrete_Base_Subtype_Decl =>
                  --# property-call-start DiscreteBaseSubtypeDecl.get_type
                  Property_Result := Discrete_Base_Subtype_Decl_P_Get_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Decl =>
                  --# property-call-start SubtypeDecl.get_type
                  Property_Result := Subtype_Decl_P_Get_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Base_Subtype_Decl_P_Get_Type;
--# end
--# property-start BaseSubtypeDecl.primitives_env ada/nodes.lkt:8696
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Primitives_Env
  (Node : Bare_Base_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_694 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_694 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_694;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4818 '<FieldAccess for primitives_env at nodes.lkt:8696:40>' Fld_1 ada/nodes.lkt:8696
--# expr-start 4817 '<FieldAccess for from_type_bound at nodes.lkt:8696:40>' Fld ada/nodes.lkt:8696
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubtypeDecl.from_type_bound
Fld := Libadalang.Implementation.Base_Subtype_Decl_P_From_Type_Bound (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4817
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.primitives_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Primitives_Env (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4818
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_694;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_694;
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Primitives_Env;
--# end
--# property-start BaseSubtypeDecl.array_ndims ada/nodes.lkt:8699
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Array_Ndims
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Integer;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4820 '<FieldAccess for array_ndims at nodes.lkt:8699:30>' Fld_1 ada/nodes.lkt:8699
--# expr-start 4819 '<FieldAccess for get_type at nodes.lkt:8699:30>' Fld ada/nodes.lkt:8699
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4819
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.array_ndims'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Array_Ndims (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4820
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Array_Ndims;
--# end
--# property-start BaseSubtypeDecl.defining_env ada/nodes.lkt:8704
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Defining_Env
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_696 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_696 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_696;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4822 '<FieldAccess for defining_env at nodes.lkt:8704:38>' Fld_1 ada/nodes.lkt:8704
--# expr-start 4821 '<FieldAccess for get_type at nodes.lkt:8704:38>' Fld ada/nodes.lkt:8704
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4821
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 4822
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_696;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_696;
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Defining_Env;
--# end
--# property-start BaseSubtypeDecl.canonical_type ada/nodes.lkt:8707
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Canonical_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4824 '<FieldAccess for canonical_type at nodes.lkt:8708:9>' Fld_1 ada/nodes.lkt:8708
--# expr-start 4823 '<FieldAccess for get_type at nodes.lkt:8708:9>' Fld ada/nodes.lkt:8708
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4823
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4824
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Canonical_Type;
--# end
--# property-start BaseSubtypeDecl.record_def ada/nodes.lkt:8711
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Record_Def
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Record_Def
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Record_Def;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Record_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4826 '<FieldAccess for record_def at nodes.lkt:8711:47>' Fld_1 ada/nodes.lkt:8711
--# expr-start 4825 '<FieldAccess for get_type at nodes.lkt:8711:47>' Fld ada/nodes.lkt:8711
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4825
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4826
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Record_Def;
--# end
--# property-start BaseSubtypeDecl.accessed_type ada/nodes.lkt:8714
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Accessed_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4828 '<FieldAccess for accessed_type at nodes.lkt:8714:49>' Fld_1 ada/nodes.lkt:8714
--# expr-start 4827 '<FieldAccess for get_type at nodes.lkt:8714:49>' Fld ada/nodes.lkt:8714
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4827
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4828
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Accessed_Type;
--# end
--# property-start BaseSubtypeDecl.is_task_type ada/nodes.lkt:8716
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Task_Type
  (Node : Bare_Base_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4830 '<FieldAccess for is_task_type at nodes.lkt:8716:32>' Fld_1 ada/nodes.lkt:8716
--# expr-start 4829 '<FieldAccess for get_type at nodes.lkt:8716:32>' Fld ada/nodes.lkt:8716
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 4829
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_task_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Task_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4830
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Task_Type;
--# end
--# property-start BaseSubtypeDecl.is_int_type ada/nodes.lkt:8719
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Int_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4832 '<FieldAccess for is_int_type at nodes.lkt:8719:31>' Fld_1 ada/nodes.lkt:8719
--# expr-start 4831 '<FieldAccess for get_type at nodes.lkt:8719:31>' Fld ada/nodes.lkt:8719
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4831
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_int_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Int_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4832
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Int_Type;
--# end
--# property-start BaseSubtypeDecl.is_discrete_type ada/nodes.lkt:8722
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Discrete_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4834 '<FieldAccess for is_discrete_type at nodes.lkt:8722:36>' Fld_1 ada/nodes.lkt:8722
--# expr-start 4833 '<FieldAccess for get_type at nodes.lkt:8722:36>' Fld ada/nodes.lkt:8722
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4833
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_discrete_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Discrete_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4834
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Discrete_Type;
--# end
--# property-start BaseSubtypeDecl.is_real_type ada/nodes.lkt:8725
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Real_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4836 '<FieldAccess for is_real_type at nodes.lkt:8725:32>' Fld_1 ada/nodes.lkt:8725
--# expr-start 4835 '<FieldAccess for get_type at nodes.lkt:8725:32>' Fld ada/nodes.lkt:8725
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4835
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_real_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Real_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4836
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Real_Type;
--# end
--# property-start BaseSubtypeDecl.is_float_type ada/nodes.lkt:8728
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Float_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4838 '<FieldAccess for is_float_type at nodes.lkt:8728:33>' Fld_1 ada/nodes.lkt:8728
--# expr-start 4837 '<FieldAccess for get_type at nodes.lkt:8728:33>' Fld ada/nodes.lkt:8728
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4837
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_float_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Float_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4838
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Float_Type;
--# end
--# property-start BaseSubtypeDecl.is_fixed_point ada/nodes.lkt:8731
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Fixed_Point
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4840 '<FieldAccess for is_fixed_point at nodes.lkt:8731:34>' Fld_1 ada/nodes.lkt:8731
--# expr-start 4839 '<FieldAccess for get_type at nodes.lkt:8731:34>' Fld ada/nodes.lkt:8731
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4839
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_fixed_point'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Fixed_Point (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4840
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Fixed_Point;
--# end
--# property-start BaseSubtypeDecl.is_enum_type ada/nodes.lkt:8734
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Enum_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4842 '<FieldAccess for is_enum_type at nodes.lkt:8734:32>' Fld_1 ada/nodes.lkt:8734
--# expr-start 4841 '<FieldAccess for get_type at nodes.lkt:8734:32>' Fld ada/nodes.lkt:8734
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4841
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_enum_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Enum_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4842
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Enum_Type;
--# end
--# property-start BaseSubtypeDecl.is_access_type ada/nodes.lkt:8737
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Access_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4844 '<FieldAccess for is_access_type at nodes.lkt:8737:34>' Fld_1 ada/nodes.lkt:8737
--# expr-start 4843 '<FieldAccess for get_type at nodes.lkt:8737:34>' Fld ada/nodes.lkt:8737
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4843
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_access_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Access_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4844
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Access_Type;
--# end
--# property-start BaseSubtypeDecl.access_def ada/nodes.lkt:8740
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Access_Def
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Access_Def
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Access_Def;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Access_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4846 '<FieldAccess for access_def at nodes.lkt:8740:43>' Fld_1 ada/nodes.lkt:8740
--# expr-start 4845 '<FieldAccess for get_type at nodes.lkt:8740:43>' Fld ada/nodes.lkt:8740
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4845
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4846
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Access_Def;
--# end
--# property-start BaseSubtypeDecl.is_char_type ada/nodes.lkt:8743
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Char_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4848 '<FieldAccess for is_char_type at nodes.lkt:8743:32>' Fld_1 ada/nodes.lkt:8743
--# expr-start 4847 '<FieldAccess for get_type at nodes.lkt:8743:32>' Fld ada/nodes.lkt:8743
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4847
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_char_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Char_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4848
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Char_Type;
--# end
--# property-start BaseSubtypeDecl.is_tagged_type ada/nodes.lkt:8746
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Tagged_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4850 '<FieldAccess for is_tagged_type at nodes.lkt:8746:34>' Fld_1 ada/nodes.lkt:8746
--# expr-start 4849 '<FieldAccess for get_type at nodes.lkt:8746:34>' Fld ada/nodes.lkt:8746
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4849
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_tagged_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Tagged_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4850
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Tagged_Type;
--# end
--# property-start BaseSubtypeDecl.base_type ada/nodes.lkt:8749
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Base_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4852 '<FieldAccess for base_type at nodes.lkt:8749:45>' Fld_1 ada/nodes.lkt:8749
--# expr-start 4851 '<FieldAccess for get_type at nodes.lkt:8749:45>' Fld ada/nodes.lkt:8749
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4851
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4852
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Base_Type;
--# end
--# property-start BaseSubtypeDecl.base_interfaces ada/nodes.lkt:8752
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Base_Interfaces
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_712 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_712 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_712;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4854 '<FieldAccess for base_interfaces at nodes.lkt:8753:9>' Fld_1 ada/nodes.lkt:8753
--# expr-start 4853 '<FieldAccess for get_type at nodes.lkt:8753:9>' Fld ada/nodes.lkt:8753
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4853
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_interfaces'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Interfaces (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4854
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_712;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_712;
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Base_Interfaces;
--# end
--# property-start BaseSubtypeDecl.base_types ada/nodes.lkt:8756
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Base_Types
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_713 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_713 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_713;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4856 '<FieldAccess for base_types at nodes.lkt:8757:9>' Fld_1 ada/nodes.lkt:8757
--# expr-start 4855 '<FieldAccess for get_type at nodes.lkt:8757:9>' Fld ada/nodes.lkt:8757
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4855
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_types'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Types (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4856
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_713;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_713;
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Base_Types;
--# end
--# property-start BaseSubtypeDecl.array_def ada/nodes.lkt:8760
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Array_Def
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Type_Def
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Type_Def;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Array_Type_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4858 '<FieldAccess for array_def at nodes.lkt:8760:45>' Fld_1 ada/nodes.lkt:8760
--# expr-start 4857 '<FieldAccess for get_type at nodes.lkt:8760:45>' Fld ada/nodes.lkt:8760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4857
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.array_def'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Array_Def (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4858
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Array_Def;
--# end
--# property-start BaseSubtypeDecl.is_classwide ada/nodes.lkt:8762
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Classwide
  (Node : Bare_Base_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4860 '<FieldAccess for is_classwide at nodes.lkt:8762:32>' Fld_1 ada/nodes.lkt:8762
--# expr-start 4859 '<FieldAccess for from_type_bound at nodes.lkt:8762:32>' Fld ada/nodes.lkt:8762
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubtypeDecl.from_type_bound
Fld := Libadalang.Implementation.Base_Subtype_Decl_P_From_Type_Bound (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4859
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4860
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Classwide;
--# end
--# property-start BaseSubtypeDecl.is_iterable_type ada/nodes.lkt:8765
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Iterable_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4862 '<FieldAccess for is_iterable_type at nodes.lkt:8765:36>' Fld_1 ada/nodes.lkt:8765
--# expr-start 4861 '<FieldAccess for get_type at nodes.lkt:8765:36>' Fld ada/nodes.lkt:8765
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4861
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_iterable_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Iterable_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4862
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Iterable_Type;
--# end
--# property-start BaseSubtypeDecl.iterable_comp_type ada/nodes.lkt:8768
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Iterable_Comp_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4864 '<FieldAccess for iterable_comp_type at nodes.lkt:8769:9>' Fld_1 ada/nodes.lkt:8769
--# expr-start 4863 '<FieldAccess for get_type at nodes.lkt:8769:9>' Fld ada/nodes.lkt:8769
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4863
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.iterable_comp_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Iterable_Comp_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4864
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Iterable_Comp_Type;
--# end
--# property-start BaseSubtypeDecl.iterable_cursor_type ada/nodes.lkt:8772
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Iterable_Cursor_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4866 '<FieldAccess for iterable_cursor_type at nodes.lkt:8773:9>' Fld_1 ada/nodes.lkt:8773
--# expr-start 4865 '<FieldAccess for get_type at nodes.lkt:8773:9>' Fld ada/nodes.lkt:8773
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4865
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.iterable_cursor_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Iterable_Cursor_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4866
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Iterable_Cursor_Type;
--# end
--# property-start BaseSubtypeDecl.is_record_type ada/nodes.lkt:8776
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Record_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4868 '<FieldAccess for is_record_type at nodes.lkt:8776:34>' Fld_1 ada/nodes.lkt:8776
--# expr-start 4867 '<FieldAccess for get_type at nodes.lkt:8776:34>' Fld ada/nodes.lkt:8776
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4867
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_record_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Record_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4868
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Record_Type;
--# end
--# property-start BaseSubtypeDecl.is_private ada/nodes.lkt:8778
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Is_Private
  (Node : Bare_Base_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4870 '<FieldAccess for is_private at nodes.lkt:8778:30>' Fld_1 ada/nodes.lkt:8778
--# expr-start 4869 '<FieldAccess for from_type_bound at nodes.lkt:8778:30>' Fld ada/nodes.lkt:8778
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubtypeDecl.from_type_bound
Fld := Libadalang.Implementation.Base_Subtype_Decl_P_From_Type_Bound (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4869
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_private'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Private (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4870
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Is_Private;
--# end
--# property-start BaseSubtypeDecl.root_type ada/nodes.lkt:8781
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Root_Type
  (Node : Bare_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4872 '<FieldAccess for root_type at nodes.lkt:8781:45>' Fld_1 ada/nodes.lkt:8781
--# expr-start 4871 '<FieldAccess for get_type at nodes.lkt:8781:45>' Fld ada/nodes.lkt:8781
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4871
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.root_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Root_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4872
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Root_Type;
--# end
--# property-start BaseSubtypeDecl.has_ud_indexing ada/nodes.lkt:8783
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Has_Ud_Indexing
  (Node : Bare_Base_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4874 '<FieldAccess for has_ud_indexing at nodes.lkt:8783:35>' Fld_1 ada/nodes.lkt:8783
--# expr-start 4873 '<FieldAccess for from_type_bound at nodes.lkt:8783:35>' Fld ada/nodes.lkt:8783
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubtypeDecl.from_type_bound
Fld := Libadalang.Implementation.Base_Subtype_Decl_P_From_Type_Bound (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4873
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.has_ud_indexing'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Has_Ud_Indexing (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4874
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Has_Ud_Indexing;
--# end
--# property-start BaseSubtypeDecl.constant_indexing_fns ada/nodes.lkt:8785
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Constant_Indexing_Fns
  (Node : Bare_Base_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_723 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_723 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_723;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4876 '<FieldAccess for constant_indexing_fns at nodes.lkt:8786:9>' Fld_1 ada/nodes.lkt:8786
--# expr-start 4875 '<FieldAccess for from_type_bound at nodes.lkt:8786:9>' Fld ada/nodes.lkt:8786
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubtypeDecl.from_type_bound
Fld := Libadalang.Implementation.Base_Subtype_Decl_P_From_Type_Bound (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4875
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.constant_indexing_fns'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Constant_Indexing_Fns (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4876
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_723;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_723;
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Constant_Indexing_Fns;
--# end
--# property-start BaseSubtypeDecl.variable_indexing_fns ada/nodes.lkt:8788
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Variable_Indexing_Fns
  (Node : Bare_Base_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_724 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_724 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_724;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4878 '<FieldAccess for variable_indexing_fns at nodes.lkt:8789:9>' Fld_1 ada/nodes.lkt:8789
--# expr-start 4877 '<FieldAccess for from_type_bound at nodes.lkt:8789:9>' Fld ada/nodes.lkt:8789
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubtypeDecl.from_type_bound
Fld := Libadalang.Implementation.Base_Subtype_Decl_P_From_Type_Bound (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4877
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.variable_indexing_fns'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Variable_Indexing_Fns (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4878
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_724;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_724;
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Variable_Indexing_Fns;
--# end
--# property-start BaseSubtypeDecl.discriminants_list ada/nodes.lkt:8792
pragma Warnings (Off, "is not referenced");
 function Base_Subtype_Decl_P_Discriminants_List
  (Node : Bare_Base_Subtype_Decl
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Base_Subtype_Decl  := Bare_Base_Subtype_Decl (Node);
     Ent : Internal_Entity_Base_Subtype_Decl :=
       Internal_Entity_Base_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_725 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_725 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_725;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4880 '<FieldAccess for discriminants_list at nodes.lkt:8795:9>' Fld_1 ada/nodes.lkt:8795
--# expr-start 4879 '<FieldAccess for get_type at nodes.lkt:8795:9>' Fld ada/nodes.lkt:8795
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 4879
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Fld.Node, Stop_Recurse_At => Stop_Recurse_At, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4880
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_725;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_725;
            raise;
      end;
   return Property_Result;
end Base_Subtype_Decl_P_Discriminants_List;
--# end
   --
   --  Primitives for Bare_Discrete_Base_Subtype_Decl
   --
      procedure Initialize_Fields_For_Discrete_Base_Subtype_Decl
        (Self : Bare_Discrete_Base_Subtype_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
        ) is
      begin
            Initialize_Fields_For_Base_Subtype_Decl
              (Self, Base_Type_Decl_F_Name);
      end Initialize_Fields_For_Discrete_Base_Subtype_Decl;
--# property-start DiscreteBaseSubtypeDecl.is_static_decl ada/nodes.lkt:8808
pragma Warnings (Off, "is not referenced");
 function Discrete_Base_Subtype_Decl_P_Is_Static_Decl
  (Node : Bare_Discrete_Base_Subtype_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Discrete_Base_Subtype_Decl  := Bare_Discrete_Base_Subtype_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Discrete_Base_Subtype_Decl_P_Is_Static_Decl;
--# end
--# property-start DiscreteBaseSubtypeDecl.get_type ada/nodes.lkt:8811
pragma Warnings (Off, "is not referenced");
 function Discrete_Base_Subtype_Decl_P_Get_Type
  (Node : Bare_Discrete_Base_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Discrete_Base_Subtype_Decl  := Bare_Discrete_Base_Subtype_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Bare_Ada_Node;
Cast_Result : Bare_Base_Type_Decl;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4883 '<as_entity at nodes.lkt:8812:9>' If_Result ada/nodes.lkt:8812
--# expr-start 4882 '<Cast to BaseTypeDecl at nodes.lkt:8812:9>' Cast_Result ada/nodes.lkt:8812
--# expr-start 4881 '<parent at nodes.lkt:8812:9>' Fld ada/nodes.lkt:8812
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 4881
   if Fld = null
      or else Fld.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Fld;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 4882
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 4883
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Discrete_Base_Subtype_Decl_P_Get_Type;
--# end
   --
   --  Primitives for Bare_Subtype_Decl
   --
      procedure Subtype_Decl_Pre_Env_Actions
        (Self            : Bare_Subtype_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_17 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:8844:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_18 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_19 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:8856:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      end;
      procedure Initialize_Fields_For_Subtype_Decl
        (Self : Bare_Subtype_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Subtype_Decl_F_Subtype : Bare_Subtype_Indication
         ; Subtype_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Base_Subtype_Decl
              (Self, Base_Type_Decl_F_Name);
            Self.Subtype_Decl_F_Subtype := Subtype_Decl_F_Subtype;
            Self.Subtype_Decl_F_Aspects := Subtype_Decl_F_Aspects;
      end Initialize_Fields_For_Subtype_Decl;
   function Subtype_Decl_F_Subtype
     (Node : Bare_Subtype_Decl) return Bare_Subtype_Indication
   is
   begin
         return Node.Subtype_Decl_F_Subtype;
   end;
--# property-start SubtypeDecl.get_type ada/nodes.lkt:8823
pragma Warnings (Off, "is not referenced");
 function Subtype_Decl_P_Get_Type
  (Node : Bare_Subtype_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
     Ent : Internal_Entity_Subtype_Decl :=
       Internal_Entity_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Subtype_Decl;
Match_1 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Subtype_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4887 '<Match at nodes.lkt:8823:44>' Match_Result ada/nodes.lkt:8823
--# expr-start 4885 '<FieldAccess for designated_type at nodes.lkt:8824:9>' Fld_1 ada/nodes.lkt:8824
--# expr-start 4884 '<FieldAccess for subtype at nodes.lkt:8824:9>' Fld ada/nodes.lkt:8824
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Subtype_Decl_F_Subtype, Info => Ent.Info);
--# expr-done 4884
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4885
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_1; 
case Ada_Base_Type_Decl (Match_Prefix.Node.Kind) is
         when Ada_Subtype_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Subtype_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind st Match_0
--# expr-start 4886 '<FieldAccess for get_type at nodes.lkt:8826:33>' Fld_2 ada/nodes.lkt:8826
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Match_0.Node, Origin => Origin, E_Info => Match_0.Info);
--# end
--# expr-done 4886
Let_Result := Fld_2; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Discrete_Base_Subtype_Decl | Ada_Classwide_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind t Match_1
Let_Result_1 := Match_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 4887
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subtype_Decl_P_Get_Type;
--# end
--# property-start SubtypeDecl.get_imp_deref ada/nodes.lkt:8831
pragma Warnings (Off, "is not referenced");
 function Subtype_Decl_P_Get_Imp_Deref
  (Node : Bare_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
     Ent : Internal_Entity_Subtype_Decl :=
       Internal_Entity_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Expr;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Subtype_Decl_Subtype_Decl_P_Get_Imp_Deref,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Subtype_Decl,
                                As_Bare_Subtype_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Expr;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4889 '<FieldAccess for get_imp_deref at nodes.lkt:8831:41>' Fld_1 ada/nodes.lkt:8831
--# expr-start 4888 '<FieldAccess for get_type at nodes.lkt:8831:41>' Fld ada/nodes.lkt:8831
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Ent.Node, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 4888
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4889
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Expr,
                        As_Internal_Entity_Expr => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Subtype_Decl_P_Get_Imp_Deref;
--# end
--# property-start SubtypeDecl.discrete_range ada/nodes.lkt:8833
pragma Warnings (Off, "is not referenced");
 function Subtype_Decl_P_Discrete_Range
  (Node : Bare_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
     Ent : Internal_Entity_Subtype_Decl :=
       Internal_Entity_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Discrete_Range;
      Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4891 '<FieldAccess for discrete_range at nodes.lkt:8833:43>' Fld_1 ada/nodes.lkt:8833
--# expr-start 4890 '<FieldAccess for subtype at nodes.lkt:8833:43>' Fld ada/nodes.lkt:8833
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Subtype_Decl_F_Subtype, Info => Ent.Info);
--# expr-done 4890
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubtypeIndication.discrete_range
Fld_1 := Libadalang.Implementation.Subtype_Indication_P_Discrete_Range (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4891
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subtype_Decl_P_Discrete_Range;
--# end
--# property-start SubtypeDecl.xref_equation ada/nodes.lkt:8836
pragma Warnings (Off, "is not referenced");
 function Subtype_Decl_P_Xref_Equation
  (Node : Bare_Subtype_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
     Ent : Internal_Entity_Subtype_Decl :=
       Internal_Entity_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_731 with Inline_Always;
      Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_731 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_731;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4893 '<FieldAccess for sub_equation at nodes.lkt:8836:37>' Fld_1 ada/nodes.lkt:8836
--# expr-start 4892 '<FieldAccess for subtype at nodes.lkt:8836:37>' Fld ada/nodes.lkt:8836
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Subtype_Decl_F_Subtype, Info => Ent.Info);
--# expr-done 4892
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 4893
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_731;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_731;
            raise;
      end;
   return Property_Result;
end Subtype_Decl_P_Xref_Equation;
--# end
--# property-start SubtypeDecl.is_static_decl ada/nodes.lkt:8839
pragma Warnings (Off, "is not referenced");
 function Subtype_Decl_P_Is_Static_Decl
  (Node : Bare_Subtype_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
     Ent : Internal_Entity_Subtype_Decl :=
       Internal_Entity_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4895 '<FieldAccess for is_static_subtype at nodes.lkt:8839:34>' Fld_1 ada/nodes.lkt:8839
--# expr-start 4894 '<FieldAccess for subtype at nodes.lkt:8839:34>' Fld ada/nodes.lkt:8839
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Subtype_Decl_F_Subtype, Info => Ent.Info);
--# expr-done 4894
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubtypeIndication.is_static_subtype
Fld_1 := Libadalang.Implementation.Subtype_Indication_P_Is_Static_Subtype (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 4895
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subtype_Decl_P_Is_Static_Decl;
--# end
--# property-start SubtypeDecl.xref_entry_point ada/nodes.lkt:8841
pragma Warnings (Off, "is not referenced");
 function Subtype_Decl_P_Xref_Entry_Point
  (Node : Bare_Subtype_Decl
  )
   return Boolean
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subtype_Decl_P_Xref_Entry_Point;
--# end
--# property-start SubtypeDecl._env_mappings_17 ada/nodes.lkt:8844
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_17
  (Node : Bare_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
     Ent : Internal_Entity_Subtype_Decl :=
       Internal_Entity_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1681 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Subtype_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1681 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1681;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4898 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 4896 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 4896
--# expr-start 4897 '<FieldAccess for name_symbol at nodes.lkt:8844:23>' Fld ada/nodes.lkt:8844
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 4897
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 4898
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1681;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1681;
            raise;
      end;
   return Property_Result;
end Env_Mappings_17;
--# end
--# property-start SubtypeDecl._env_trans_parent_18 ada/nodes.lkt:8855
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_18
  (Node : Bare_Subtype_Decl
  )
   return Boolean
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_18;
--# end
--# property-start SubtypeDecl._env_mappings_19 ada/nodes.lkt:8856
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_19
  (Node : Bare_Subtype_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Subtype_Decl  := Bare_Subtype_Decl (Node);
     Ent : Internal_Entity_Subtype_Decl :=
       Internal_Entity_Subtype_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1683 with Inline_Always;
      Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1683 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1683;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4899 '<FieldAccess for synthetic_object_decl_env_assoc at nodes.lkt:8856:20>' Fld ada/nodes.lkt:8856
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.synthetic_object_decl_env_assoc
Fld := Libadalang.Implementation.Base_Type_Decl_F_Synthetic_Object_Decl_Env_Assoc (Node => Ent.Node);
--# end
--# expr-done 4899
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1683;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1683;
            raise;
      end;
   return Property_Result;
end Env_Mappings_19;
--# end
   --
   --  Primitives for Bare_Classwide_Type_Decl
   --
      procedure Initialize_Fields_For_Classwide_Type_Decl
        (Self : Bare_Classwide_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
        ) is
      begin
            Initialize_Fields_For_Base_Type_Decl
              (Self, Base_Type_Decl_F_Name);
      end Initialize_Fields_For_Classwide_Type_Decl;
--# property-start ClasswideTypeDecl.type_decl ada/nodes.lkt:8868
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Type_Decl
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4901 '<Cast to BaseTypeDecl at nodes.lkt:8868:45>' Cast_Result ada/nodes.lkt:8868
--# expr-start 4900 '<parent at nodes.lkt:8868:45>' Fld ada/nodes.lkt:8868
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 4900
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 4901
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Type_Decl;
--# end
--# property-start ClasswideTypeDecl.is_classwide ada/nodes.lkt:8870
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Is_Classwide
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Is_Classwide;
--# end
--# property-start ClasswideTypeDecl.is_tagged_type ada/nodes.lkt:8873
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Is_Tagged_Type
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Is_Tagged_Type;
--# end
--# property-start ClasswideTypeDecl.base_type ada/nodes.lkt:8876
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Base_Type
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Type_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Base_Type;
--# end
--# property-start ClasswideTypeDecl.base_interfaces ada/nodes.lkt:8879
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Base_Interfaces
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Base_Type_Decl_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Base_Interfaces;
--# end
--# property-start ClasswideTypeDecl.record_def ada/nodes.lkt:8883
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Record_Def
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Record_Def
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Record_Def;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Record_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4903 '<FieldAccess for record_def at nodes.lkt:8883:47>' Fld_1 ada/nodes.lkt:8883
--# expr-start 4902 '<FieldAccess for type_decl at nodes.lkt:8883:47>' Fld ada/nodes.lkt:8883
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4902
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4903
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Record_Def;
--# end
--# property-start ClasswideTypeDecl.classwide_type ada/nodes.lkt:8885
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Classwide_Type
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Classwide_Type_Decl
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Classwide_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Ent;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Classwide_Type;
--# end
--# property-start ClasswideTypeDecl.is_iterable_type ada/nodes.lkt:8888
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Is_Iterable_Type
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4905 '<FieldAccess for is_iterable_type at nodes.lkt:8888:36>' Fld_1 ada/nodes.lkt:8888
--# expr-start 4904 '<FieldAccess for type_decl at nodes.lkt:8888:36>' Fld ada/nodes.lkt:8888
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4904
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_iterable_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Iterable_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4905
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Is_Iterable_Type;
--# end
--# property-start ClasswideTypeDecl.has_ud_indexing ada/nodes.lkt:8890
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Has_Ud_Indexing
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4907 '<FieldAccess for has_ud_indexing at nodes.lkt:8890:35>' Fld_1 ada/nodes.lkt:8890
--# expr-start 4906 '<FieldAccess for type_decl at nodes.lkt:8890:35>' Fld ada/nodes.lkt:8890
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4906
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.has_ud_indexing'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Has_Ud_Indexing (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4907
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Has_Ud_Indexing;
--# end
--# property-start ClasswideTypeDecl.constant_indexing_fns ada/nodes.lkt:8892
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Constant_Indexing_Fns
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_743 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_743 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_743;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4909 '<FieldAccess for constant_indexing_fns at nodes.lkt:8893:9>' Fld_1 ada/nodes.lkt:8893
--# expr-start 4908 '<FieldAccess for type_decl at nodes.lkt:8893:9>' Fld ada/nodes.lkt:8893
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4908
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.constant_indexing_fns'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Constant_Indexing_Fns (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4909
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_743;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_743;
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Constant_Indexing_Fns;
--# end
--# property-start ClasswideTypeDecl.variable_indexing_fns ada/nodes.lkt:8895
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Variable_Indexing_Fns
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_744 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_744 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_744;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4911 '<FieldAccess for variable_indexing_fns at nodes.lkt:8896:9>' Fld_1 ada/nodes.lkt:8896
--# expr-start 4910 '<FieldAccess for type_decl at nodes.lkt:8896:9>' Fld ada/nodes.lkt:8896
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4910
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.variable_indexing_fns'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Variable_Indexing_Fns (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4911
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_744;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_744;
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Variable_Indexing_Fns;
--# end
--# property-start ClasswideTypeDecl.is_task_type ada/nodes.lkt:8898
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Is_Task_Type
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4913 '<FieldAccess for is_task_type at nodes.lkt:8898:32>' Fld_1 ada/nodes.lkt:8898
--# expr-start 4912 '<FieldAccess for type_decl at nodes.lkt:8898:32>' Fld ada/nodes.lkt:8898
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4912
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_task_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Task_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4913
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Is_Task_Type;
--# end
--# property-start ClasswideTypeDecl.iterable_comp_type ada/nodes.lkt:8901
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Iterable_Comp_Type
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4915 '<FieldAccess for iterable_comp_type at nodes.lkt:8902:9>' Fld_1 ada/nodes.lkt:8902
--# expr-start 4914 '<FieldAccess for type_decl at nodes.lkt:8902:9>' Fld ada/nodes.lkt:8902
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4914
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.iterable_comp_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Iterable_Comp_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4915
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Iterable_Comp_Type;
--# end
--# property-start ClasswideTypeDecl.defining_env ada/nodes.lkt:8907
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Defining_Env
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_747 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_747 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_747;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4917 '<FieldAccess for defining_env at nodes.lkt:8907:38>' Fld_1 ada/nodes.lkt:8907
--# expr-start 4916 '<FieldAccess for type_decl at nodes.lkt:8907:38>' Fld ada/nodes.lkt:8907
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4916
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 4917
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_747;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_747;
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Defining_Env;
--# end
--# property-start ClasswideTypeDecl.is_private ada/nodes.lkt:8909
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Is_Private
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4919 '<FieldAccess for is_private at nodes.lkt:8909:30>' Fld_1 ada/nodes.lkt:8909
--# expr-start 4918 '<FieldAccess for type_decl at nodes.lkt:8909:30>' Fld ada/nodes.lkt:8909
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4918
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_private'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Private (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4919
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Is_Private;
--# end
--# property-start ClasswideTypeDecl.is_in_private_part ada/nodes.lkt:8911
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Is_In_Private_Part
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4921 '<FieldAccess for is_in_private_part at nodes.lkt:8911:38>' Fld_1 ada/nodes.lkt:8911
--# expr-start 4920 '<FieldAccess for type_decl at nodes.lkt:8911:38>' Fld ada/nodes.lkt:8911
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4920
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4921
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Is_In_Private_Part;
--# end
--# property-start ClasswideTypeDecl.is_in_public_part ada/nodes.lkt:8913
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Is_In_Public_Part
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4923 '<FieldAccess for is_in_public_part at nodes.lkt:8913:37>' Fld_1 ada/nodes.lkt:8913
--# expr-start 4922 '<FieldAccess for type_decl at nodes.lkt:8913:37>' Fld ada/nodes.lkt:8913
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4922
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_public_part'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Public_Part (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4923
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Is_In_Public_Part;
--# end
--# property-start ClasswideTypeDecl.get_aspect_spec ada/nodes.lkt:8915
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Get_Aspect_Spec
  (Node : Bare_Classwide_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Aspect_Spec
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Aspect_Spec;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Aspect_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4925 '<FieldAccess for get_aspect_spec at nodes.lkt:8916:9>' Fld_1 ada/nodes.lkt:8916
--# expr-start 4924 '<FieldAccess for type_decl at nodes.lkt:8916:9>' Fld ada/nodes.lkt:8916
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4924
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.get_aspect_spec'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Get_Aspect_Spec (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4925
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Get_Aspect_Spec;
--# end
--# property-start ClasswideTypeDecl.is_interface_type ada/nodes.lkt:8919
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Is_Interface_Type
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4927 '<FieldAccess for is_interface_type at nodes.lkt:8919:37>' Fld_1 ada/nodes.lkt:8919
--# expr-start 4926 '<FieldAccess for type_decl at nodes.lkt:8919:37>' Fld ada/nodes.lkt:8919
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4926
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_interface_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Interface_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4927
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Is_Interface_Type;
--# end
--# property-start ClasswideTypeDecl.discriminants_list ada/nodes.lkt:8922
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Discriminants_List
  (Node : Bare_Classwide_Type_Decl
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_753 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_753 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_753;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4929 '<FieldAccess for discriminants_list at nodes.lkt:8925:9>' Fld_1 ada/nodes.lkt:8925
--# expr-start 4928 '<FieldAccess for type_decl at nodes.lkt:8925:9>' Fld ada/nodes.lkt:8925
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4928
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Fld.Node, Stop_Recurse_At => Stop_Recurse_At, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4929
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_753;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_753;
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Discriminants_List;
--# end
--# property-start ClasswideTypeDecl.canonical_type ada/nodes.lkt:8928
pragma Warnings (Off, "is not referenced");
 function Classwide_Type_Decl_P_Canonical_Type
  (Node : Bare_Classwide_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Classwide_Type_Decl  := Bare_Classwide_Type_Decl (Node);
     Ent : Internal_Entity_Classwide_Type_Decl :=
       Internal_Entity_Classwide_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr : Internal_Entity_Classwide_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Classwide_Type_Decl;
Scope_Result : Internal_Entity_Classwide_Type_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4931 '<FieldAccess for canonical_type at nodes.lkt:8929:9>' Fld_1 ada/nodes.lkt:8929
--# expr-start 4930 '<FieldAccess for type_decl at nodes.lkt:8929:9>' Fld ada/nodes.lkt:8929
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ClasswideTypeDecl.type_decl
Fld := Libadalang.Implementation.Classwide_Type_Decl_P_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 4930
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 4931
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind t Var_Expr_0
--# expr-start 4932 '<FieldAccess for classwide_type at nodes.lkt:8933:20>' Fld_2 ada/nodes.lkt:8933
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4932
Var_Expr := Fld_2;
if Var_Expr /= No_Entity_Classwide_Type_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Scope_Result.Node,
         Info => Scope_Result.Info);
   Result_Var := Cast_Result;
else
   Result_Var := Var_Expr_0;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classwide_Type_Decl_P_Canonical_Type;
--# end
   --
   --  Primitives for Bare_Incomplete_Type_Decl
   --
      procedure Incomplete_Type_Decl_Pre_Env_Actions
        (Self            : Bare_Incomplete_Type_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_20 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:8978:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_21 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Incomplete_Type_Decl
        (Self : Bare_Incomplete_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Incomplete_Type_Decl_F_Discriminants : Bare_Discriminant_Part
        ) is
      begin
            Initialize_Fields_For_Base_Type_Decl
              (Self, Base_Type_Decl_F_Name);
            Self.Incomplete_Type_Decl_F_Discriminants := Incomplete_Type_Decl_F_Discriminants;
      end Initialize_Fields_For_Incomplete_Type_Decl;
   function Incomplete_Type_Decl_F_Discriminants
     (Node : Bare_Incomplete_Type_Decl) return Bare_Discriminant_Part
   is
   begin
         return Node.Incomplete_Type_Decl_F_Discriminants;
   end;
--# property-start IncompleteTypeDecl.find_next_part_in ada/nodes.lkt:8953
pragma Warnings (Off, "is not referenced");
 function Incomplete_Type_Decl_P_Find_Next_Part_In
  (Node : Bare_Incomplete_Type_Decl
      ; Decl_Part : Internal_Entity_Declarative_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Incomplete_Type_Decl  := Bare_Incomplete_Type_Decl (Node);
     Ent : Internal_Entity_Incomplete_Type_Decl :=
       Internal_Entity_Incomplete_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind decl_part Decl_Part
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_755 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Fld : Lexical_Env := Empty_Env;
Fld_1 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Cast_Expr_1 : Internal_Entity_Incomplete_Type_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
Not_Val : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Find_Result : Internal_Entity;
Cast_Result_3 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_755 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Env_Get_Result);
            end Finalizer_Scope_755;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4940 '<Cast to BaseTypeDecl at nodes.lkt:8956:9>' Cast_Result_3 ada/nodes.lkt:8956
--# expr-start 4939 '<Find at nodes.lkt:8956:9>' Find_Result ada/nodes.lkt:8956
   --# expr-start 4935 '<EnvGet at nodes.lkt:8956:9>' Env_Get_Result ada/nodes.lkt:8956
--# expr-start 4933 '<FieldAccess for children_env at nodes.lkt:8956:9>' Fld ada/nodes.lkt:8956
      if Decl_Part.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Decl_Part.Node, E_Info => Decl_Part.Info);
--# expr-done 4933
--# expr-start 4934 '<FieldAccess for name_symbol at nodes.lkt:8957:13>' Fld_1 ada/nodes.lkt:8957
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 4934
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld, Key => Thin (Fld_1), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 4935
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
--# expr-start 4936 '<Cast to BaseTypeDecl at nodes.lkt:8961:22>' Cast_Result ada/nodes.lkt:8961
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 4936
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind btd Var_Expr_1
--# expr-start 4938 '<Not at nodes.lkt:8961:53>' Not_Val ada/nodes.lkt:8961
--# expr-start 4937 '<Eq at nodes.lkt:8961:53>' Is_Equiv ada/nodes.lkt:8961
Cast_Expr_1 := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Cast_Expr_2 := Var_Expr_1; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 4937
Not_Val := not (Is_Equiv); 
--# expr-done 4938
Scope_Result := Not_Val;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
--# expr-done 4939
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Base_Type_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_3 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 4940
         Property_Result := Cast_Result_3;
   --# end
      Finalizer_Scope_755;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_755;
            raise;
      end;
   return Property_Result;
end Incomplete_Type_Decl_P_Find_Next_Part_In;
--# end
--# property-start IncompleteTypeDecl.defining_env ada/nodes.lkt:8967
pragma Warnings (Off, "is not referenced");
 function Incomplete_Type_Decl_P_Defining_Env
  (Node : Bare_Incomplete_Type_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Incomplete_Type_Decl  := Bare_Incomplete_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_756 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Fld_1 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_756 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_756;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4944 '<env_group at nodes.lkt:8968:9>' Group_Env ada/nodes.lkt:8968
--# expr-start 4943 '<ArrayLiteral at nodes.lkt:8968:9>' Array_Lit ada/nodes.lkt:8968
--# expr-start 4941 '<FieldAccess for children_env at nodes.lkt:8968:10>' Fld ada/nodes.lkt:8968
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Self);
--# expr-done 4941
--# expr-start 4942 '<FieldAccess for dottable_subps_env at nodes.lkt:8968:29>' Fld_1 ada/nodes.lkt:8968
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.dottable_subps_env
Fld_1 := Libadalang.Implementation.Base_Type_Decl_F_Dottable_Subps_Env (Node => Self);
--# end
--# expr-done 4942
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld, 2 => Fld_1)); 
--# expr-done 4943
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 4944
         Property_Result := Group_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_756;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_756;
            raise;
      end;
   return Property_Result;
end Incomplete_Type_Decl_P_Defining_Env;
--# end
--# property-start IncompleteTypeDecl.discriminants_list ada/nodes.lkt:8971
pragma Warnings (Off, "is not referenced");
 function Incomplete_Type_Decl_P_Discriminants_List
  (Node : Bare_Incomplete_Type_Decl
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Incomplete_Type_Decl  := Bare_Incomplete_Type_Decl (Node);
     Ent : Internal_Entity_Incomplete_Type_Decl :=
       Internal_Entity_Incomplete_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_757 with Inline_Always;
      Fld : Internal_Entity_Discriminant_Part;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_757 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_757;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4946 '<FieldAccess for abstract_formal_params at nodes.lkt:8975:9>' Fld_1 ada/nodes.lkt:8975
--# expr-start 4945 '<FieldAccess for discriminants at nodes.lkt:8975:9>' Fld ada/nodes.lkt:8975
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Discriminant_Part (Node => Ent.Node.Incomplete_Type_Decl_F_Discriminants, Info => Ent.Info);
--# expr-done 4945
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4946
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_757;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_757;
            raise;
      end;
   return Property_Result;
end Incomplete_Type_Decl_P_Discriminants_List;
--# end
--# property-start IncompleteTypeDecl._env_mappings_20 ada/nodes.lkt:8978
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_20
  (Node : Bare_Incomplete_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Incomplete_Type_Decl  := Bare_Incomplete_Type_Decl (Node);
     Ent : Internal_Entity_Incomplete_Type_Decl :=
       Internal_Entity_Incomplete_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1684 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Incomplete_Type_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1684 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1684;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4949 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 4947 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 4947
--# expr-start 4948 '<FieldAccess for name_symbol at nodes.lkt:8978:23>' Fld ada/nodes.lkt:8978
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 4948
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 4949
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1684;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1684;
            raise;
      end;
   return Property_Result;
end Env_Mappings_20;
--# end
--# property-start IncompleteTypeDecl._env_trans_parent_21 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_21
  (Node : Bare_Incomplete_Type_Decl
  )
   return Boolean
is
   Self : Bare_Incomplete_Type_Decl  := Bare_Incomplete_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_21;
--# end
   --
   --  Primitives for Bare_Incomplete_Formal_Type_Decl
   --
      procedure Initialize_Fields_For_Incomplete_Formal_Type_Decl
        (Self : Bare_Incomplete_Formal_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Incomplete_Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Incomplete_Formal_Type_Decl_F_Is_Tagged : Bare_Tagged_Node
         ; Incomplete_Formal_Type_Decl_F_Default_Type : Bare_Name
        ) is
      begin
            Initialize_Fields_For_Incomplete_Type_Decl
              (Self, Base_Type_Decl_F_Name, Incomplete_Type_Decl_F_Discriminants);
            Self.Incomplete_Formal_Type_Decl_F_Is_Tagged := Incomplete_Formal_Type_Decl_F_Is_Tagged;
            Self.Incomplete_Formal_Type_Decl_F_Default_Type := Incomplete_Formal_Type_Decl_F_Default_Type;
      end Initialize_Fields_For_Incomplete_Formal_Type_Decl;
   function Incomplete_Formal_Type_Decl_F_Is_Tagged
     (Node : Bare_Incomplete_Formal_Type_Decl) return Bare_Tagged_Node
   is
   begin
         return Node.Incomplete_Formal_Type_Decl_F_Is_Tagged;
   end;
   function Incomplete_Formal_Type_Decl_F_Default_Type
     (Node : Bare_Incomplete_Formal_Type_Decl) return Bare_Name
   is
   begin
         return Node.Incomplete_Formal_Type_Decl_F_Default_Type;
   end;
--# property-start IncompleteFormalTypeDecl.is_tagged_type ada/nodes.lkt:8993
pragma Warnings (Off, "is not referenced");
 function Incomplete_Formal_Type_Decl_P_Is_Tagged_Type
  (Node : Bare_Incomplete_Formal_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Incomplete_Formal_Type_Decl  := Bare_Incomplete_Formal_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Bare_Tagged_Node;
Is_Null : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4952 '<Not at nodes.lkt:8993:34>' Not_Val ada/nodes.lkt:8993
--# expr-start 4951 '<IsNull at nodes.lkt:8993:38>' Is_Null ada/nodes.lkt:8993
--# expr-start 4950 '<FieldAccess for is_tagged at nodes.lkt:8993:38>' Fld ada/nodes.lkt:8993
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Incomplete_Formal_Type_Decl_F_Is_Tagged;
--# expr-done 4950
Is_Null := Fld = null; 
--# expr-done 4951
Not_Val := not (Is_Null); 
--# expr-done 4952
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Incomplete_Formal_Type_Decl_P_Is_Tagged_Type;
--# end
--# property-start IncompleteFormalTypeDecl.xref_equation ada/nodes.lkt:8996
pragma Warnings (Off, "is not referenced");
 function Incomplete_Formal_Type_Decl_P_Xref_Equation
  (Node : Bare_Incomplete_Formal_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Incomplete_Formal_Type_Decl  := Bare_Incomplete_Formal_Type_Decl (Node);
     Ent : Internal_Entity_Incomplete_Formal_Type_Decl :=
       Internal_Entity_Incomplete_Formal_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_759 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_759 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_759;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4954 '<FieldAccess for sub_equation at nodes.lkt:8996:37>' Fld_1 ada/nodes.lkt:8996
--# expr-start 4953 '<FieldAccess for default_type at nodes.lkt:8996:37>' Fld ada/nodes.lkt:8996
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Incomplete_Formal_Type_Decl_F_Default_Type, Info => Ent.Info);
--# expr-done 4953
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 4954
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_759;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_759;
            raise;
      end;
   return Property_Result;
end Incomplete_Formal_Type_Decl_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Incomplete_Tagged_Type_Decl
   --
      procedure Initialize_Fields_For_Incomplete_Tagged_Type_Decl
        (Self : Bare_Incomplete_Tagged_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Incomplete_Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Incomplete_Tagged_Type_Decl_F_Has_Abstract : Bare_Abstract_Node
        ) is
      begin
            Initialize_Fields_For_Incomplete_Type_Decl
              (Self, Base_Type_Decl_F_Name, Incomplete_Type_Decl_F_Discriminants);
            Self.Incomplete_Tagged_Type_Decl_F_Has_Abstract := Incomplete_Tagged_Type_Decl_F_Has_Abstract;
      end Initialize_Fields_For_Incomplete_Tagged_Type_Decl;
   function Incomplete_Tagged_Type_Decl_F_Has_Abstract
     (Node : Bare_Incomplete_Tagged_Type_Decl) return Bare_Abstract_Node
   is
   begin
         return Node.Incomplete_Tagged_Type_Decl_F_Has_Abstract;
   end;
--# property-start IncompleteTaggedTypeDecl.is_tagged_type ada/nodes.lkt:9005
pragma Warnings (Off, "is not referenced");
 function Incomplete_Tagged_Type_Decl_P_Is_Tagged_Type
  (Node : Bare_Incomplete_Tagged_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Incomplete_Tagged_Type_Decl  := Bare_Incomplete_Tagged_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Incomplete_Tagged_Type_Decl_P_Is_Tagged_Type;
--# end
   --
   --  Primitives for Bare_Protected_Type_Decl
   --
      procedure Protected_Type_Decl_Pre_Env_Actions
        (Self            : Bare_Protected_Type_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_22 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:9061:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_23 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_24 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Protected_Type_Decl
        (Self : Bare_Protected_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Protected_Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Protected_Type_Decl_F_Aspects : Bare_Aspect_Spec
         ; Protected_Type_Decl_F_Interfaces : Bare_Parent_List
         ; Protected_Type_Decl_F_Definition : Bare_Protected_Def
        ) is
      begin
            Initialize_Fields_For_Base_Type_Decl
              (Self, Base_Type_Decl_F_Name);
            Self.Protected_Type_Decl_F_Discriminants := Protected_Type_Decl_F_Discriminants;
            Self.Protected_Type_Decl_F_Aspects := Protected_Type_Decl_F_Aspects;
            Self.Protected_Type_Decl_F_Interfaces := Protected_Type_Decl_F_Interfaces;
            Self.Protected_Type_Decl_F_Definition := Protected_Type_Decl_F_Definition;
      end Initialize_Fields_For_Protected_Type_Decl;
   function Protected_Type_Decl_F_Discriminants
     (Node : Bare_Protected_Type_Decl) return Bare_Discriminant_Part
   is
   begin
         return Node.Protected_Type_Decl_F_Discriminants;
   end;
   function Protected_Type_Decl_F_Interfaces
     (Node : Bare_Protected_Type_Decl) return Bare_Parent_List
   is
   begin
         return Node.Protected_Type_Decl_F_Interfaces;
   end;
   function Protected_Type_Decl_F_Definition
     (Node : Bare_Protected_Type_Decl) return Bare_Protected_Def
   is
   begin
         return Node.Protected_Type_Decl_F_Definition;
   end;
--# property-start ProtectedTypeDecl.discriminants_list ada/nodes.lkt:9021
pragma Warnings (Off, "is not referenced");
 function Protected_Type_Decl_P_Discriminants_List
  (Node : Bare_Protected_Type_Decl
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
     Ent : Internal_Entity_Protected_Type_Decl :=
       Internal_Entity_Protected_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_761 with Inline_Always;
      Fld : Internal_Entity_Discriminant_Part;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_761 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_761;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4956 '<FieldAccess for abstract_formal_params at nodes.lkt:9025:9>' Fld_1 ada/nodes.lkt:9025
--# expr-start 4955 '<FieldAccess for discriminants at nodes.lkt:9025:9>' Fld ada/nodes.lkt:9025
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Discriminant_Part (Node => Ent.Node.Protected_Type_Decl_F_Discriminants, Info => Ent.Info);
--# expr-done 4955
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4956
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_761;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_761;
            raise;
      end;
   return Property_Result;
end Protected_Type_Decl_P_Discriminants_List;
--# end
--# property-start ProtectedTypeDecl.defining_env ada/nodes.lkt:9030
pragma Warnings (Off, "is not referenced");
 function Protected_Type_Decl_P_Defining_Env
  (Node : Bare_Protected_Type_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
     Ent : Internal_Entity_Protected_Type_Decl :=
       Internal_Entity_Protected_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_762 with Inline_Always;
            procedure Finalizer_Scope_2608 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Private_Part;
Fld : Internal_Entity_Protected_Def;
Fld_1 : Internal_Entity_Private_Part;
Fld_2 : Lexical_Env := Empty_Env;
Fld_3 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Fld_4 : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_762 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_762;
            procedure Finalizer_Scope_2608 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_2608;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4958 '<FieldAccess for private_part at nodes.lkt:9031:9>' Fld_1 ada/nodes.lkt:9031
--# expr-start 4957 '<FieldAccess for definition at nodes.lkt:9031:9>' Fld ada/nodes.lkt:9031
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Protected_Def (Node => Ent.Node.Protected_Type_Decl_F_Definition, Info => Ent.Info);
--# expr-done 4957
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Private_Part (Node => Fld.Node.Protected_Def_F_Private_Part, Info => Fld.Info);
--# expr-done 4958
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Private_Part then
   --# scope-start
   --# bind pp Var_Expr_0
--# expr-start 4962 '<env_group at nodes.lkt:9036:13>' Group_Env ada/nodes.lkt:9036
--# expr-start 4961 '<ArrayLiteral at nodes.lkt:9036:13>' Array_Lit ada/nodes.lkt:9036
--# expr-start 4959 '<FieldAccess for children_env at nodes.lkt:9036:14>' Fld_2 ada/nodes.lkt:9036
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 4959
--# expr-start 4960 '<FieldAccess for children_env at nodes.lkt:9036:33>' Fld_3 ada/nodes.lkt:9036
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 4960
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_2, 2 => Fld_3)); 
--# expr-done 4961
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 4962
Scope_Result := Group_Env;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2608;
   Result_Var := Scope_Result;
else
   --# expr-start 4963 '<FieldAccess for children_env at nodes.lkt:9037:25>' Fld_4 ada/nodes.lkt:9037
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 4963
   Result_Var := Fld_4;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_762;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_762;
                     Finalizer_Scope_2608;
            raise;
      end;
   return Property_Result;
end Protected_Type_Decl_P_Defining_Env;
--# end
--# property-start ProtectedTypeDecl.base_interfaces ada/nodes.lkt:9041
pragma Warnings (Off, "is not referenced");
 function Protected_Type_Decl_P_Base_Interfaces
  (Node : Bare_Protected_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
     Ent : Internal_Entity_Protected_Type_Decl :=
       Internal_Entity_Protected_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_763 with Inline_Always;
      Fld : Internal_Entity_Parent_List;
Fld_1 : Bare_Parent_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_763 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_763;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4966 '<Map at nodes.lkt:9042:9>' Map_Result ada/nodes.lkt:9042
   --# expr-start 4964 '<FieldAccess for interfaces at nodes.lkt:9042:9>' Fld ada/nodes.lkt:9042
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Parent_List (Node => Ent.Node.Protected_Type_Decl_F_Interfaces, Info => Ent.Info);
--# expr-done 4964
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Base_Type_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind i Item_0
      --# expr-start 4965 '<FieldAccess for name_designated_type at nodes.lkt:9042:36>' Fld_3 ada/nodes.lkt:9042
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_3 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 4965
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Fld_3;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4966
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_763;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_763;
            raise;
      end;
   return Property_Result;
end Protected_Type_Decl_P_Base_Interfaces;
--# end
--# property-start ProtectedTypeDecl.xref_entry_point ada/nodes.lkt:9044
pragma Warnings (Off, "is not referenced");
 function Protected_Type_Decl_P_Xref_Entry_Point
  (Node : Bare_Protected_Type_Decl
  )
   return Boolean
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Protected_Type_Decl_P_Xref_Entry_Point;
--# end
--# property-start ProtectedTypeDecl.xref_equation ada/nodes.lkt:9047
pragma Warnings (Off, "is not referenced");
 function Protected_Type_Decl_P_Xref_Equation
  (Node : Bare_Protected_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
     Ent : Internal_Entity_Protected_Type_Decl :=
       Internal_Entity_Protected_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_765 with Inline_Always;
            procedure Finalizer_Scope_2610 with Inline_Always;
      Fld : Internal_Entity_Parent_List;
Fld_1 : Bare_Parent_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_765 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_765;
            procedure Finalizer_Scope_2610 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2610;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4970 '<LogicAll at nodes.lkt:9048:9>' Logic_Boolean_Op ada/nodes.lkt:9048
--# expr-start 4969 '<Map at nodes.lkt:9048:9>' Map_Result ada/nodes.lkt:9048
   --# expr-start 4967 '<FieldAccess for interfaces at nodes.lkt:9048:9>' Fld ada/nodes.lkt:9048
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Parent_List (Node => Ent.Node.Protected_Type_Decl_F_Interfaces, Info => Ent.Info);
--# expr-done 4967
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind ifc Item_0
      --# expr-start 4968 '<FieldAccess for xref_equation at nodes.lkt:9048:44>' Fld_3 ada/nodes.lkt:9048
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 4968
         declare
            Item_To_Append : constant Logic_Equation := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2610;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4969
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:9048:9") else null)); 
--# expr-done 4970
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_765;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_765;
                     Finalizer_Scope_2610;
            raise;
      end;
   return Property_Result;
end Protected_Type_Decl_P_Xref_Equation;
--# end
--# property-start ProtectedTypeDecl.declarative_parts ada/nodes.lkt:9050
pragma Warnings (Off, "is not referenced");
 function Protected_Type_Decl_P_Declarative_Parts
  (Node : Bare_Protected_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
     Ent : Internal_Entity_Protected_Type_Decl :=
       Internal_Entity_Protected_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_766 with Inline_Always;
            procedure Finalizer_Scope_2611 with Inline_Always;
      Local_Pdef : Internal_Entity_Protected_Def;
Var_Expr_0 : Internal_Entity_Declarative_Part;
Fld : Internal_Entity_Protected_Def;
Fld_1 : Internal_Entity_Public_Part;
Cast_Result : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
Fld_2 : Internal_Entity_Private_Part;
Cast_Result_1 : Internal_Entity_Declarative_Part;
Array_Lit_1 : Internal_Entity_Declarative_Part_Array_Access;
Scope_Result : Internal_Entity_Declarative_Part_Array_Access;
Result_Var : Internal_Entity_Declarative_Part_Array_Access;
Concat_Result : Internal_Entity_Declarative_Part_Array_Access;
Let_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_766 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_766;
            procedure Finalizer_Scope_2611 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_2611;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4978 '<Let at nodes.lkt:9051:9>' Let_Result ada/nodes.lkt:9051
--# scope-start
--# expr-start 4971 '<FieldAccess for definition at nodes.lkt:9051:20>' Fld ada/nodes.lkt:9051
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Protected_Def (Node => Ent.Node.Protected_Type_Decl_F_Definition, Info => Ent.Info);
--# expr-done 4971
Local_Pdef := Fld; 
--# bind pdef Local_Pdef
--# expr-start 4974 '<ArrayLiteral at nodes.lkt:9053:9>' Array_Lit ada/nodes.lkt:9053
--# expr-start 4973 '<Cast to DeclarativePart at nodes.lkt:9053:10>' Cast_Result ada/nodes.lkt:9053
--# expr-start 4972 '<FieldAccess for public_part at nodes.lkt:9053:10>' Fld_1 ada/nodes.lkt:9053
      if Local_Pdef.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Public_Part (Node => Local_Pdef.Node.Protected_Def_F_Public_Part, Info => Local_Pdef.Info);
--# expr-done 4972
      Cast_Result := Create_Internal_Entity_Declarative_Part
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
--# expr-done 4973
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Cast_Result)); 
--# expr-done 4974
--# expr-start 4976 '<Cast to DeclarativePart at nodes.lkt:9054:11>' Cast_Result_1 ada/nodes.lkt:9054
--# expr-start 4975 '<FieldAccess for private_part at nodes.lkt:9054:11>' Fld_2 ada/nodes.lkt:9054
      if Local_Pdef.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Private_Part (Node => Local_Pdef.Node.Protected_Def_F_Private_Part, Info => Local_Pdef.Info);
--# expr-done 4975
      Cast_Result_1 := Create_Internal_Entity_Declarative_Part
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
--# expr-done 4976
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Entity_Declarative_Part then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 4977 '<ArrayLiteral at nodes.lkt:9054:60>' Array_Lit_1 ada/nodes.lkt:9054
Array_Lit_1 := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Var_Expr_0)); 
--# expr-done 4977
Scope_Result := Array_Lit_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2611;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Declarative_Part_Array_Type;
end if;
      Inc_Ref (Result_Var);
Concat_Result := Concat (Array_Lit, Result_Var); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 4978
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_766;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_766;
                     Finalizer_Scope_2611;
            raise;
      end;
   return Property_Result;
end Protected_Type_Decl_P_Declarative_Parts;
--# end
--# property-start ProtectedTypeDecl.env_names ada/nodes.lkt:9057
pragma Warnings (Off, "is not referenced");
 function Protected_Type_Decl_P_Env_Names
  (Node : Bare_Protected_Type_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_767 with Inline_Always;
            procedure Finalizer_Scope_2612 with Inline_Always;
      Var_Expr_0 : String_Type;
Fld : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_767 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_767;
            procedure Finalizer_Scope_2612 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2612;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4979 '<FieldAccess for top_level_env_name at nodes.lkt:9058:9>' Fld ada/nodes.lkt:9058
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 4979
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_String then
   --# scope-start
   --# bind fqn Var_Expr_0
--# expr-start 4981 '<ArrayLiteral at nodes.lkt:9058:47>' Array_Lit ada/nodes.lkt:9058
--# expr-start 4980 '<to_symbol at nodes.lkt:9058:48>' Sym ada/nodes.lkt:9058
Sym := String_To_Symbol (Self, Self.Unit.Context, Var_Expr_0); 
--# expr-done 4980
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 4981
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2612;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_767;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_767;
                     Finalizer_Scope_2612;
            raise;
      end;
   return Property_Result;
end Protected_Type_Decl_P_Env_Names;
--# end
--# property-start ProtectedTypeDecl._env_mappings_22 ada/nodes.lkt:9061
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_22
  (Node : Bare_Protected_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
     Ent : Internal_Entity_Protected_Type_Decl :=
       Internal_Entity_Protected_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1686 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Protected_Type_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1686 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1686;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4984 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 4982 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 4982
--# expr-start 4983 '<FieldAccess for name_symbol at nodes.lkt:9061:23>' Fld ada/nodes.lkt:9061
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 4983
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 4984
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1686;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1686;
            raise;
      end;
   return Property_Result;
end Env_Mappings_22;
--# end
--# property-start ProtectedTypeDecl._env_trans_parent_23 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_23
  (Node : Bare_Protected_Type_Decl
  )
   return Boolean
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_23;
--# end
--# property-start ProtectedTypeDecl._env_names_24 ada/nodes.lkt:9062
pragma Warnings (Off, "is not referenced");
 function Env_Names_24
  (Node : Bare_Protected_Type_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Protected_Type_Decl  := Bare_Protected_Type_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1688 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1688 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1688;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4985 '<FieldAccess for env_names at nodes.lkt:9062:23>' Fld ada/nodes.lkt:9062
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ProtectedTypeDecl.env_names
Fld := Libadalang.Implementation.Protected_Type_Decl_P_Env_Names (Node => Self);
--# end
--# expr-done 4985
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1688;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1688;
            raise;
      end;
   return Property_Result;
end Env_Names_24;
--# end
   --
   --  Primitives for Bare_Task_Type_Decl
   --
      procedure Task_Type_Decl_Pre_Env_Actions
        (Self            : Bare_Task_Type_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_25 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:9116:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_26 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_27 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Task_Type_Decl
        (Self : Bare_Task_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Task_Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Task_Type_Decl_F_Aspects : Bare_Aspect_Spec
         ; Task_Type_Decl_F_Definition : Bare_Task_Def
        ) is
      begin
            Initialize_Fields_For_Base_Type_Decl
              (Self, Base_Type_Decl_F_Name);
            Self.Task_Type_Decl_F_Discriminants := Task_Type_Decl_F_Discriminants;
            Self.Task_Type_Decl_F_Aspects := Task_Type_Decl_F_Aspects;
            Self.Task_Type_Decl_F_Definition := Task_Type_Decl_F_Definition;
      end Initialize_Fields_For_Task_Type_Decl;
   function Task_Type_Decl_F_Discriminants
     (Node : Bare_Task_Type_Decl) return Bare_Discriminant_Part
   is
   begin
         return Node.Task_Type_Decl_F_Discriminants;
   end;
   function Task_Type_Decl_F_Definition
     (Node : Bare_Task_Type_Decl) return Bare_Task_Def
   is
   begin
         return Node.Task_Type_Decl_F_Definition;
   end;
--# property-start TaskTypeDecl.is_task_type ada/nodes.lkt:9077
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Is_Task_Type
  (Node : Bare_Task_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Task_Type_Decl_P_Is_Task_Type;
--# end
--# property-start TaskTypeDecl.base_interfaces ada/nodes.lkt:9080
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Base_Interfaces
  (Node : Bare_Task_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
     Ent : Internal_Entity_Task_Type_Decl :=
       Internal_Entity_Task_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_769 with Inline_Always;
            procedure Finalizer_Scope_2613 with Inline_Always;
      Var_Expr_144 : Internal_Entity_Task_Def;
Fld : Internal_Entity_Task_Def;
Fld_1 : Internal_Entity_Parent_List;
Fld_2 : Bare_Parent_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_4 : Internal_Entity_Base_Type_Decl;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_769 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_769;
            procedure Finalizer_Scope_2613 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2613;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4986 '<FieldAccess for definition at nodes.lkt:9081:9>' Fld ada/nodes.lkt:9081
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Task_Def (Node => Ent.Node.Task_Type_Decl_F_Definition, Info => Ent.Info);
--# expr-done 4986
Var_Expr_144 := Fld;
if Var_Expr_144 /= No_Entity_Task_Def then
   --# scope-start
--# expr-start 4989 '<Map at nodes.lkt:9081:9>' Map_Result ada/nodes.lkt:9081
   --# expr-start 4987 '<FieldAccess for interfaces at nodes.lkt:9081:9>' Fld_1 ada/nodes.lkt:9081
      if Var_Expr_144.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Parent_List (Node => Var_Expr_144.Node.Task_Def_F_Interfaces, Info => Var_Expr_144.Info);
--# expr-done 4987
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Internal_Entity_Base_Type_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind i Item_0
      --# expr-start 4988 '<FieldAccess for name_designated_type at nodes.lkt:9081:48>' Fld_4 ada/nodes.lkt:9081
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_4 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 4988
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Fld_4;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 4989
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2613;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_769;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_769;
                     Finalizer_Scope_2613;
            raise;
      end;
   return Property_Result;
end Task_Type_Decl_P_Base_Interfaces;
--# end
--# property-start TaskTypeDecl.env_names ada/nodes.lkt:9083
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Env_Names
  (Node : Bare_Task_Type_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_770 with Inline_Always;
            procedure Finalizer_Scope_2615 with Inline_Always;
      Var_Expr_0 : String_Type;
Fld : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_770 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_770;
            procedure Finalizer_Scope_2615 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2615;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4990 '<FieldAccess for top_level_env_name at nodes.lkt:9084:9>' Fld ada/nodes.lkt:9084
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 4990
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_String then
   --# scope-start
   --# bind fqn Var_Expr_0
--# expr-start 4992 '<ArrayLiteral at nodes.lkt:9084:47>' Array_Lit ada/nodes.lkt:9084
--# expr-start 4991 '<to_symbol at nodes.lkt:9084:48>' Sym ada/nodes.lkt:9084
Sym := String_To_Symbol (Self, Self.Unit.Context, Var_Expr_0); 
--# expr-done 4991
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 4992
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2615;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_770;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_770;
                     Finalizer_Scope_2615;
            raise;
      end;
   return Property_Result;
end Task_Type_Decl_P_Env_Names;
--# end
--# property-start TaskTypeDecl.defining_env ada/nodes.lkt:9089
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Defining_Env
  (Node : Bare_Task_Type_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
     Ent : Internal_Entity_Task_Type_Decl :=
       Internal_Entity_Task_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_771 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_771 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_771;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 4993 '<FieldAccess for children_env at nodes.lkt:9089:38>' Fld ada/nodes.lkt:9089
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 4993
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_771;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_771;
            raise;
      end;
   return Property_Result;
end Task_Type_Decl_P_Defining_Env;
--# end
--# property-start TaskTypeDecl.primitives_env ada/nodes.lkt:9092
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Primitives_Env
  (Node : Bare_Task_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
     Ent : Internal_Entity_Task_Type_Decl :=
       Internal_Entity_Task_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_772 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_772 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_772;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Task_Type_Decl_Task_Type_Decl_P_Primitives_Env,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Task_Type_Decl,
                                As_Bare_Task_Type_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Lexical_Env;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 4994 '<FieldAccess for compute_primitives_env at nodes.lkt:9093:9>' Fld ada/nodes.lkt:9093
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.compute_primitives_env
Fld := Libadalang.Implementation.Base_Type_Decl_P_Compute_Primitives_Env (Node => Ent.Node, Include_Self => True, E_Info => Ent.Info);
--# end
--# expr-done 4994
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_772;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_772;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Lexical_Env,
                        As_Lexical_Env => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Task_Type_Decl_P_Primitives_Env;
--# end
--# property-start TaskTypeDecl.discriminants_list ada/nodes.lkt:9096
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Discriminants_List
  (Node : Bare_Task_Type_Decl
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
     Ent : Internal_Entity_Task_Type_Decl :=
       Internal_Entity_Task_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_773 with Inline_Always;
      Fld : Internal_Entity_Discriminant_Part;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_773 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_773;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 4996 '<FieldAccess for abstract_formal_params at nodes.lkt:9100:9>' Fld_1 ada/nodes.lkt:9100
--# expr-start 4995 '<FieldAccess for discriminants at nodes.lkt:9100:9>' Fld ada/nodes.lkt:9100
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Discriminant_Part (Node => Ent.Node.Task_Type_Decl_F_Discriminants, Info => Ent.Info);
--# expr-done 4995
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 4996
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_773;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_773;
            raise;
      end;
   return Property_Result;
end Task_Type_Decl_P_Discriminants_List;
--# end
--# property-start TaskTypeDecl.xref_entry_point ada/nodes.lkt:9102
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Xref_Entry_Point
  (Node : Bare_Task_Type_Decl
  )
   return Boolean
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Task_Type_Decl_P_Xref_Entry_Point;
--# end
--# property-start TaskTypeDecl.xref_equation ada/nodes.lkt:9105
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Xref_Equation
  (Node : Bare_Task_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
     Ent : Internal_Entity_Task_Type_Decl :=
       Internal_Entity_Task_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_775 with Inline_Always;
            procedure Finalizer_Scope_2616 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Task_Def;
Fld : Internal_Entity_Task_Def;
Fld_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_775 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_775;
            procedure Finalizer_Scope_2616 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2616;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 4997 '<FieldAccess for definition at nodes.lkt:9106:9>' Fld ada/nodes.lkt:9106
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Task_Def (Node => Ent.Node.Task_Type_Decl_F_Definition, Info => Ent.Info);
--# expr-done 4997
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Task_Def then
   --# scope-start
   --# bind d Var_Expr_0
--# expr-start 4998 '<FieldAccess for xref_equation at nodes.lkt:9106:35>' Fld_1 ada/nodes.lkt:9106
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 4998
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2616;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:9106:66") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_775;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_775;
                     Finalizer_Scope_2616;
            raise;
      end;
   return Property_Result;
end Task_Type_Decl_P_Xref_Equation;
--# end
--# property-start TaskTypeDecl.declarative_parts ada/nodes.lkt:9108
pragma Warnings (Off, "is not referenced");
 function Task_Type_Decl_P_Declarative_Parts
  (Node : Bare_Task_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
     Ent : Internal_Entity_Task_Type_Decl :=
       Internal_Entity_Task_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_776 with Inline_Always;
            procedure Finalizer_Scope_2617 with Inline_Always;
            procedure Finalizer_Scope_2618 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Task_Def;
Var_Expr_1 : Internal_Entity_Declarative_Part;
Fld : Internal_Entity_Task_Def;
Fld_1 : Internal_Entity_Public_Part;
Cast_Result : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
Fld_2 : Internal_Entity_Private_Part;
Cast_Result_1 : Internal_Entity_Declarative_Part;
Array_Lit_1 : Internal_Entity_Declarative_Part_Array_Access;
Scope_Result : Internal_Entity_Declarative_Part_Array_Access;
Result_Var : Internal_Entity_Declarative_Part_Array_Access;
Concat_Result : Internal_Entity_Declarative_Part_Array_Access;
Scope_Result_1 : Internal_Entity_Declarative_Part_Array_Access;
Result_Var_1 : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_776 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_776;
            procedure Finalizer_Scope_2617 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_2617;
            procedure Finalizer_Scope_2618 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_2618;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 4999 '<FieldAccess for definition at nodes.lkt:9109:9>' Fld ada/nodes.lkt:9109
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Task_Def (Node => Ent.Node.Task_Type_Decl_F_Definition, Info => Ent.Info);
--# expr-done 4999
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Task_Def then
   --# scope-start
   --# bind tdef Var_Expr_0
--# expr-start 5002 '<ArrayLiteral at nodes.lkt:9111:13>' Array_Lit ada/nodes.lkt:9111
--# expr-start 5001 '<Cast to DeclarativePart at nodes.lkt:9111:14>' Cast_Result ada/nodes.lkt:9111
--# expr-start 5000 '<FieldAccess for public_part at nodes.lkt:9111:14>' Fld_1 ada/nodes.lkt:9111
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Public_Part (Node => Var_Expr_0.Node.Task_Def_F_Public_Part, Info => Var_Expr_0.Info);
--# expr-done 5000
      Cast_Result := Create_Internal_Entity_Declarative_Part
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
--# expr-done 5001
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Cast_Result)); 
--# expr-done 5002
--# expr-start 5004 '<Cast to DeclarativePart at nodes.lkt:9112:15>' Cast_Result_1 ada/nodes.lkt:9112
--# expr-start 5003 '<FieldAccess for private_part at nodes.lkt:9112:15>' Fld_2 ada/nodes.lkt:9112
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Private_Part (Node => Var_Expr_0.Node.Task_Def_F_Private_Part, Info => Var_Expr_0.Info);
--# expr-done 5003
      Cast_Result_1 := Create_Internal_Entity_Declarative_Part
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
--# expr-done 5004
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Entity_Declarative_Part then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 5005 '<ArrayLiteral at nodes.lkt:9112:64>' Array_Lit_1 ada/nodes.lkt:9112
Array_Lit_1 := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Var_Expr_1)); 
--# expr-done 5005
Scope_Result := Array_Lit_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2618;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Declarative_Part_Array_Type;
end if;
      Inc_Ref (Result_Var);
Concat_Result := Concat (Array_Lit, Result_Var); 
Scope_Result_1 := Concat_Result;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2617;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Declarative_Part_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
         Property_Result := Result_Var_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_776;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_776;
                     Finalizer_Scope_2617;
                     Finalizer_Scope_2618;
            raise;
      end;
   return Property_Result;
end Task_Type_Decl_P_Declarative_Parts;
--# end
--# property-start TaskTypeDecl._env_mappings_25 ada/nodes.lkt:9116
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_25
  (Node : Bare_Task_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
     Ent : Internal_Entity_Task_Type_Decl :=
       Internal_Entity_Task_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1689 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Task_Type_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1689 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1689;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5008 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 5006 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 5006
--# expr-start 5007 '<FieldAccess for name_symbol at nodes.lkt:9116:23>' Fld ada/nodes.lkt:9116
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 5007
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 5008
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1689;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1689;
            raise;
      end;
   return Property_Result;
end Env_Mappings_25;
--# end
--# property-start TaskTypeDecl._env_trans_parent_26 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_26
  (Node : Bare_Task_Type_Decl
  )
   return Boolean
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_26;
--# end
--# property-start TaskTypeDecl._env_names_27 ada/nodes.lkt:9117
pragma Warnings (Off, "is not referenced");
 function Env_Names_27
  (Node : Bare_Task_Type_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Task_Type_Decl  := Bare_Task_Type_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1691 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1691 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1691;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5009 '<FieldAccess for env_names at nodes.lkt:9117:23>' Fld ada/nodes.lkt:9117
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TaskTypeDecl.env_names
Fld := Libadalang.Implementation.Task_Type_Decl_P_Env_Names (Node => Self);
--# end
--# expr-done 5009
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1691;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1691;
            raise;
      end;
   return Property_Result;
end Env_Names_27;
--# end
   --
   --  Primitives for Bare_Single_Task_Type_Decl
   --
      procedure Single_Task_Type_Decl_Pre_Env_Actions
        (Self            : Bare_Single_Task_Type_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_28 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Single_Task_Type_Decl
        (Self : Bare_Single_Task_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Task_Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Task_Type_Decl_F_Aspects : Bare_Aspect_Spec
         ; Task_Type_Decl_F_Definition : Bare_Task_Def
        ) is
      begin
            Initialize_Fields_For_Task_Type_Decl
              (Self, Base_Type_Decl_F_Name, Task_Type_Decl_F_Discriminants, Task_Type_Decl_F_Aspects, Task_Type_Decl_F_Definition);
      end Initialize_Fields_For_Single_Task_Type_Decl;
--# property-start SingleTaskTypeDecl._env_trans_parent_28 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_28
  (Node : Bare_Single_Task_Type_Decl
  )
   return Boolean
is
   Self : Bare_Single_Task_Type_Decl  := Bare_Single_Task_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_28;
--# end
   --
   --  Primitives for Bare_Type_Decl
   --
      procedure Type_Decl_Pre_Env_Actions
        (Self            : Bare_Type_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_29 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:9556:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_30 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:9557:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_31 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Type_Decl_Post_Env_Actions
        (Self : Bare_Type_Decl; State : in out PLE_Node_State) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_32 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:9568:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Libadalang.Implementation.Ref_Cond_35 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_33 (Node => 
Self);
            Env : Lexical_Env :=
              Libadalang.Implementation.Env_Dest_34 (Node => 
Self);
         begin
               if Is_Foreign_Strict (Env, Self) then
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "unsound foreign environment in RefEnvs ("
                     & "nodes.lkt:9574:9)");
               end if;
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Type_Decl_P_Refined_Parent_Primitives_Env'Access,
               Transitive,
               (Inherited_Primitives => True, others => False),
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Type_Decl
        (Self : Bare_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Type_Decl_F_Type_Def : Bare_Type_Def
        ) is
      begin
            Initialize_Fields_For_Base_Type_Decl
              (Self, Base_Type_Decl_F_Name);
            Self.Type_Decl_F_Discriminants := Type_Decl_F_Discriminants;
            Self.Type_Decl_F_Type_Def := Type_Decl_F_Type_Def;
      end Initialize_Fields_For_Type_Decl;
   function Type_Decl_F_Discriminants
     (Node : Bare_Type_Decl) return Bare_Discriminant_Part
   is
   begin
         return Node.Type_Decl_F_Discriminants;
   end;
   function Type_Decl_F_Type_Def
     (Node : Bare_Type_Decl) return Bare_Type_Def
   is
   begin
         return Node.Type_Decl_F_Type_Def;
   end;
--# property-start TypeDecl.is_iterable_type ada/nodes.lkt:9143
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Iterable_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Boolean;
Sym : Symbol_Type;
Fld_1 : Internal_Aspect;
Fld_2 : Internal_Entity_Expr;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
Sym_1 : Symbol_Type;
Fld_3 : Internal_Aspect;
Fld_4 : Internal_Entity_Expr;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5022 '<BooleanBinaryOp Or at nodes.lkt:9144:9>' If_Result_1 ada/nodes.lkt:9144
--# expr-start 5016 '<BooleanBinaryOp Or at nodes.lkt:9144:9>' If_Result ada/nodes.lkt:9144
--# expr-start 5010 '<FieldAccess for is_array at nodes.lkt:9144:9>' Fld ada/nodes.lkt:9144
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_array
Fld := Libadalang.Implementation.Basic_Decl_P_Is_Array (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5010
if Fld then
   If_Result := True;
else
   --# expr-start 5015 '<Not at nodes.lkt:9145:12>' Not_Val ada/nodes.lkt:9145
--# expr-start 5014 '<IsNull at nodes.lkt:9145:16>' Is_Null ada/nodes.lkt:9145
--# expr-start 5013 '<FieldAccess for value at nodes.lkt:9145:16>' Fld_2 ada/nodes.lkt:9145
--# expr-start 5012 '<FieldAccess for get_aspect at nodes.lkt:9145:16>' Fld_1 ada/nodes.lkt:9145
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5011 '<Symbol Iterator_Element at nodes.lkt:9145:32>' Sym ada/nodes.lkt:9145
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterator_Element); 
--# expr-done 5011
--# property-call-start BasicDecl.get_aspect
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5012
Fld_2 := Fld_1.Value;
--# expr-done 5013
Is_Null := Fld_2.Node = null; 
--# expr-done 5014
Not_Val := not (Is_Null); 
--# expr-done 5015
   If_Result := Not_Val;
end if;
--# expr-done 5016
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 5021 '<Not at nodes.lkt:9151:12>' Not_Val_1 ada/nodes.lkt:9151
--# expr-start 5020 '<IsNull at nodes.lkt:9151:16>' Is_Null_1 ada/nodes.lkt:9151
--# expr-start 5019 '<FieldAccess for value at nodes.lkt:9151:16>' Fld_4 ada/nodes.lkt:9151
--# expr-start 5018 '<FieldAccess for get_aspect at nodes.lkt:9151:16>' Fld_3 ada/nodes.lkt:9151
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5017 '<Symbol Iterable at nodes.lkt:9151:32>' Sym_1 ada/nodes.lkt:9151
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterable); 
--# expr-done 5017
--# property-call-start BasicDecl.get_aspect
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym_1, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5018
Fld_4 := Fld_3.Value;
--# expr-done 5019
Is_Null_1 := Fld_4.Node = null; 
--# expr-done 5020
Not_Val_1 := not (Is_Null_1); 
--# expr-done 5021
   If_Result_1 := Not_Val_1;
end if;
--# expr-done 5022
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Iterable_Type;
--# end
--# property-start TypeDecl.iterable_comp_type ada/nodes.lkt:9154
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Iterable_Comp_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_778 with Inline_Always;
            procedure Finalizer_Scope_2619 with Inline_Always;
      Local_Ie : Internal_Entity_Expr;
Local_It : Internal_Entity_Expr;
Var_Expr_1 : Internal_Entity_Name;
Sym : Symbol_Type;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Expr;
Sym_1 : Symbol_Type;
Fld_2 : Internal_Aspect;
Fld_3 : Internal_Entity_Expr;
Bound_Imprecise_Fallback : Boolean;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_5 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_6 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Aggregate;
Fld_7 : Internal_Entity_Assoc_List;
Fld_8 : Internal_Single_Actual_Array_Access;
Fld_9 : Bare_Base_Id;
Sym_2 : Symbol_Type;
Fld_10 : Boolean;
Find_Result : Internal_Single_Actual;
Fld_11 : Internal_Entity_Basic_Assoc;
Fld_12 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_13 : Internal_Entity_Basic_Decl;
Fld_14 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_15 : Boolean;
If_Result_2 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_778 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_778;
            procedure Finalizer_Scope_2619 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_2619;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5056 '<Let at nodes.lkt:9155:9>' Let_Result_1 ada/nodes.lkt:9155
--# scope-start
--# expr-start 5025 '<FieldAccess for value at nodes.lkt:9155:18>' Fld_1 ada/nodes.lkt:9155
--# expr-start 5024 '<FieldAccess for get_aspect at nodes.lkt:9155:18>' Fld ada/nodes.lkt:9155
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5023 '<Symbol Iterator_Element at nodes.lkt:9155:34>' Sym ada/nodes.lkt:9155
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterator_Element); 
--# expr-done 5023
--# property-call-start BasicDecl.get_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5024
Fld_1 := Fld.Value;
--# expr-done 5025
Local_Ie := Fld_1; 
--# bind ie Local_Ie
--# expr-start 5055 '<Let at nodes.lkt:9156:9>' Let_Result ada/nodes.lkt:9156
--# scope-start
--# expr-start 5028 '<FieldAccess for value at nodes.lkt:9156:18>' Fld_3 ada/nodes.lkt:9156
--# expr-start 5027 '<FieldAccess for get_aspect at nodes.lkt:9156:18>' Fld_2 ada/nodes.lkt:9156
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5026 '<Symbol Iterable at nodes.lkt:9156:34>' Sym_1 ada/nodes.lkt:9156
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterable); 
--# expr-done 5026
--# property-call-start BasicDecl.get_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym_1, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5027
Fld_3 := Fld_2.Value;
--# expr-done 5028
Local_It := Fld_3; 
--# bind it Local_It
--# expr-start 5054 '<bind at nodes.lkt:9159:13>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:9159
Bound_Imprecise_Fallback := False; 
--# expr-start 5053 '<If at nodes.lkt:9161:13>' If_Result_2 ada/nodes.lkt:9161
--# expr-start 5029 '<FieldAccess for is_array at nodes.lkt:9161:16>' Fld_15 ada/nodes.lkt:9161
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_array
Fld_15 := Libadalang.Implementation.Basic_Decl_P_Is_Array (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5029
if Fld_15 then
   --# expr-start 5030 '<FieldAccess for comp_type at nodes.lkt:9161:37>' Fld_4 ada/nodes.lkt:9161
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5030
   If_Result_2 := Fld_4;
else
   --# expr-start 5052 '<If at nodes.lkt:9161:13>' If_Result_1 ada/nodes.lkt:9161
--# expr-start 5032 '<Not at nodes.lkt:9162:18>' Not_Val_1 ada/nodes.lkt:9162
--# expr-start 5031 '<IsNull at nodes.lkt:9162:22>' Is_Null_1 ada/nodes.lkt:9162
Is_Null_1 := Local_Ie.Node = null; 
--# expr-done 5031
Not_Val_1 := not (Is_Null_1); 
--# expr-done 5032
if Not_Val_1 then
--# expr-start 5033 '<Cast to Name at nodes.lkt:9164:17>' Cast_Result ada/nodes.lkt:9164
Cast_Expr := Local_Ie; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 5033
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Name then
   --# scope-start
   --# bind name Var_Expr_1
--# expr-start 5036 '<bind at nodes.lkt:9166:25>' Dyn_Var_Bind_Result ada/nodes.lkt:9166
--# expr-start 5034 '<FieldAccess for node_env at nodes.lkt:9166:36>' Fld_5 ada/nodes.lkt:9166
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Node_Env (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# expr-done 5034
Bound_Env := Fld_5; Inc_Ref (Bound_Env);
--# expr-start 5035 '<FieldAccess for designated_type_impl at nodes.lkt:9168:25>' Fld_6 ada/nodes.lkt:9168
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Var_Expr_1.Node, Env => Bound_Env, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 5035
Dyn_Var_Bind_Result := Fld_6; 
--# expr-done 5036
Scope_Result := Dyn_Var_Bind_Result;
   --# end
      Finalizer_Scope_2619;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
   If_Result_1 := Result_Var;
else
   --# expr-start 5051 '<If at nodes.lkt:9161:13>' If_Result ada/nodes.lkt:9161
--# expr-start 5038 '<Not at nodes.lkt:9171:18>' Not_Val ada/nodes.lkt:9171
--# expr-start 5037 '<IsNull at nodes.lkt:9171:22>' Is_Null ada/nodes.lkt:9171
Is_Null := Local_It.Node = null; 
--# expr-done 5037
Not_Val := not (Is_Null); 
--# expr-done 5038
if Not_Val then
   --# expr-start 5050 '<FieldAccess for expr_type at nodes.lkt:9173:17>' Fld_14 ada/nodes.lkt:9173
--# expr-start 5049 '<FieldAccess for referenced_decl at nodes.lkt:9173:17>' Fld_13 ada/nodes.lkt:9173
--# expr-start 5048 '<Cast to Name at nodes.lkt:9173:17>' Cast_Result_2 ada/nodes.lkt:9173
--# expr-start 5047 '<FieldAccess for expr at nodes.lkt:9173:17>' Fld_12 ada/nodes.lkt:9173
--# expr-start 5046 '<FieldAccess for assoc at nodes.lkt:9173:17>' Fld_11 ada/nodes.lkt:9173
--# expr-start 5045 '<Find at nodes.lkt:9173:17>' Find_Result ada/nodes.lkt:9173
   --# expr-start 5041 '<FieldAccess for unpacked_params at nodes.lkt:9173:17>' Fld_8 ada/nodes.lkt:9173
--# expr-start 5040 '<FieldAccess for assocs at nodes.lkt:9173:17>' Fld_7 ada/nodes.lkt:9173
--# expr-start 5039 '<Cast to Aggregate at nodes.lkt:9173:17>' Cast_Result_1 ada/nodes.lkt:9173
Cast_Expr_1 := Local_It; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Aggregate
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Aggregate;
   end if;
--# expr-done 5039
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Assoc_List (Node => Cast_Result_1.Node.Base_Aggregate_F_Assocs, Info => Cast_Result_1.Info);
--# expr-done 5040
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.unpacked_params
Fld_8 := Libadalang.Implementation.Assoc_List_P_Unpacked_Params (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 5041
      Find_Result := No_Single_Actual;
      declare
         Collection : constant Internal_Single_Actual_Array_Access := Fld_8;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind sa Item_0
      --# expr-start 5044 '<FieldAccess for name_is at nodes.lkt:9174:29>' Fld_10 ada/nodes.lkt:9174
--# expr-start 5042 '<FieldAccess for name at nodes.lkt:9174:29>' Fld_9 ada/nodes.lkt:9174
Fld_9 := Item_0.Name;
--# expr-done 5042
      if Fld_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5043 '<Symbol Element at nodes.lkt:9174:45>' Sym_2 ada/nodes.lkt:9174
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Element); 
--# expr-done 5043
--# property-call-start Name.name_is
Fld_10 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_9, Sym => Sym_2);
--# end
--# expr-done 5044
      if Fld_10 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Fld_10;
         end loop;
      end;
--# expr-done 5045
Fld_11 := Find_Result.Assoc;
--# expr-done 5046
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_11.Node, E_Info => Fld_11.Info);
--# end
--# expr-done 5047
   if Fld_12.Node = null
      or else Fld_12.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Fld_12.Node,
         Info => Fld_12.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5048
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_13 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Cast_Result_2.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 5049
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_14 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Fld_13.Node, Origin => Origin, E_Info => Fld_13.Info);
--# end
--# expr-done 5050
   If_Result := Fld_14;
else
   If_Result := No_Entity_Base_Type_Decl;
end if;
--# expr-done 5051
   If_Result_1 := If_Result;
end if;
--# expr-done 5052
   If_Result_2 := If_Result_1;
end if;
--# expr-done 5053
Dyn_Var_Bind_Result_1 := If_Result_2; 
--# expr-done 5054
Let_Result := Dyn_Var_Bind_Result_1; 
--# end
--# expr-done 5055
Let_Result_1 := Let_Result; 
--# end
--# expr-done 5056
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_778;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_778;
                     Finalizer_Scope_2619;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Iterable_Comp_Type;
--# end
--# property-start TypeDecl.iterable_cursor_type ada/nodes.lkt:9188
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Iterable_Cursor_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_2621 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Sym : Symbol_Type;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Aggregate;
Fld_2 : Internal_Entity_Assoc_List;
Fld_3 : Internal_Single_Actual_Array_Access;
Fld_4 : Bare_Base_Id;
Sym_1 : Symbol_Type;
Fld_5 : Boolean;
Find_Result : Internal_Single_Actual;
Fld_6 : Internal_Entity_Basic_Assoc;
Fld_7 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_8 : Internal_Entity_Basic_Decl;
Fld_9 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_2621 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2621;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5059 '<FieldAccess for value at nodes.lkt:9189:9>' Fld_1 ada/nodes.lkt:9189
--# expr-start 5058 '<FieldAccess for get_aspect at nodes.lkt:9189:9>' Fld ada/nodes.lkt:9189
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5057 '<Symbol Iterable at nodes.lkt:9189:25>' Sym ada/nodes.lkt:9189
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterable); 
--# expr-done 5057
--# property-call-start BasicDecl.get_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5058
Fld_1 := Fld.Value;
--# expr-done 5059
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind it Var_Expr_0
--# expr-start 5071 '<FieldAccess for expr_type at nodes.lkt:9191:13>' Fld_9 ada/nodes.lkt:9191
--# expr-start 5070 '<FieldAccess for referenced_decl at nodes.lkt:9191:13>' Fld_8 ada/nodes.lkt:9191
--# expr-start 5069 '<Cast to Name at nodes.lkt:9191:13>' Cast_Result_1 ada/nodes.lkt:9191
--# expr-start 5068 '<FieldAccess for expr at nodes.lkt:9191:13>' Fld_7 ada/nodes.lkt:9191
--# expr-start 5067 '<FieldAccess for assoc at nodes.lkt:9191:13>' Fld_6 ada/nodes.lkt:9191
--# expr-start 5066 '<Find at nodes.lkt:9191:13>' Find_Result ada/nodes.lkt:9191
   --# expr-start 5062 '<FieldAccess for unpacked_params at nodes.lkt:9191:13>' Fld_3 ada/nodes.lkt:9191
--# expr-start 5061 '<FieldAccess for assocs at nodes.lkt:9191:13>' Fld_2 ada/nodes.lkt:9191
--# expr-start 5060 '<Cast to Aggregate at nodes.lkt:9191:13>' Cast_Result ada/nodes.lkt:9191
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result := Create_Internal_Entity_Aggregate
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Aggregate;
   end if;
--# expr-done 5060
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Assoc_List (Node => Cast_Result.Node.Base_Aggregate_F_Assocs, Info => Cast_Result.Info);
--# expr-done 5061
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.unpacked_params
Fld_3 := Libadalang.Implementation.Assoc_List_P_Unpacked_Params (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 5062
      Find_Result := No_Single_Actual;
      declare
         Collection : constant Internal_Single_Actual_Array_Access := Fld_3;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind sa Item_1
      --# expr-start 5065 '<FieldAccess for name_is at nodes.lkt:9192:25>' Fld_5 ada/nodes.lkt:9192
--# expr-start 5063 '<FieldAccess for name at nodes.lkt:9192:25>' Fld_4 ada/nodes.lkt:9192
Fld_4 := Item_1.Name;
--# expr-done 5063
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5064 '<Symbol First at nodes.lkt:9192:41>' Sym_1 ada/nodes.lkt:9192
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_First); 
--# expr-done 5064
--# property-call-start Name.name_is
Fld_5 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_4, Sym => Sym_1);
--# end
--# expr-done 5065
      if Fld_5 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Fld_5;
         end loop;
      end;
--# expr-done 5066
Fld_6 := Find_Result.Assoc;
--# expr-done 5067
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 5068
   if Fld_7.Node = null
      or else Fld_7.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5069
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_8 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Cast_Result_1.Node, Imprecise_Fallback => False, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 5070
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Fld_8.Node, Origin => Origin, E_Info => Fld_8.Info);
--# end
--# expr-done 5071
Scope_Result := Fld_9;
   --# end
      Finalizer_Scope_2621;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2621;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Iterable_Cursor_Type;
--# end
--# property-start TypeDecl.discrete_range ada/nodes.lkt:9201
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Discrete_Range
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Discrete_Range;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5073 '<FieldAccess for discrete_range at nodes.lkt:9201:43>' Fld_1 ada/nodes.lkt:9201
--# expr-start 5072 '<FieldAccess for type_def at nodes.lkt:9201:43>' Fld ada/nodes.lkt:9201
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5072
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.discrete_range'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Discrete_Range (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 5073
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Discrete_Range;
--# end
--# property-start TypeDecl.discriminants_list ada/nodes.lkt:9204
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Discriminants_List
  (Node : Bare_Type_Decl
      ; Stop_Recurse_At : Internal_Entity_Base_Type_Decl
         := No_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind stop_recurse_at Stop_Recurse_At
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_781 with Inline_Always;
            procedure Finalizer_Scope_2623 with Inline_Always;
      Local_Base_Type : Internal_Entity_Base_Type_Decl;
Local_Self_Discs : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Var_Expr_0 : Internal_Entity_Discriminant_Part;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Discriminant_Part;
Fld_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
Fld_7 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Len : Integer;
Comp_Result : Boolean;
If_Result_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_8 : Boolean;
If_Result_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_781 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Self_Discs);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_6);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_781;
            procedure Finalizer_Scope_2623 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2623;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5094 '<Let at nodes.lkt:9208:9>' Let_Result_1 ada/nodes.lkt:9208
--# scope-start
--# expr-start 5074 '<FieldAccess for base_type at nodes.lkt:9208:25>' Fld ada/nodes.lkt:9208
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_type'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5074
Local_Base_Type := Fld; 
--# bind base_type Local_Base_Type
--# expr-start 5093 '<Let at nodes.lkt:9209:9>' Let_Result ada/nodes.lkt:9209
--# scope-start
--# expr-start 5075 '<FieldAccess for discriminants at nodes.lkt:9210:13>' Fld_1 ada/nodes.lkt:9210
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Discriminant_Part (Node => Ent.Node.Type_Decl_F_Discriminants, Info => Ent.Info);
--# expr-done 5075
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Discriminant_Part then
   --# scope-start
   --# bind d Var_Expr_0
--# expr-start 5076 '<FieldAccess for abstract_formal_params at nodes.lkt:9210:42>' Fld_2 ada/nodes.lkt:9210
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 5076
Scope_Result := Fld_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2623;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Self_Discs := Result_Var; Inc_Ref (Local_Self_Discs);
--# bind self_discs Local_Self_Discs
--# expr-start 5092 '<If at nodes.lkt:9212:9>' If_Result_4 ada/nodes.lkt:9212
--# expr-start 5077 '<FieldAccess for is_access_type at nodes.lkt:9212:12>' Fld_8 ada/nodes.lkt:9212
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_access_type'
Fld_8 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Access_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5077
if Fld_8 then
   --# expr-start 5079 '<FieldAccess for discriminants_list at nodes.lkt:9213:14>' Fld_4 ada/nodes.lkt:9213
--# expr-start 5078 '<FieldAccess for accessed_type at nodes.lkt:9213:14>' Fld_3 ada/nodes.lkt:9213
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5078
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Fld_3.Node, Stop_Recurse_At => Stop_Recurse_At, Origin => Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 5079
   If_Result_4 := Fld_4;
else
   --# expr-start 5091 '<If at nodes.lkt:9212:9>' If_Result_3 ada/nodes.lkt:9212
--# expr-start 5080 '<length at nodes.lkt:9214:14>' Len ada/nodes.lkt:9214
Len := Length (Local_Self_Discs); 
--# expr-done 5080
Comp_Result := Len > 0; 
if Comp_Result then
   If_Result_3 := Local_Self_Discs;
else
   --# expr-start 5090 '<If at nodes.lkt:9212:9>' If_Result_2 ada/nodes.lkt:9212
--# expr-start 5084 '<BooleanBinaryOp And at nodes.lkt:9215:14>' If_Result_1 ada/nodes.lkt:9215
--# expr-start 5082 '<Not at nodes.lkt:9215:14>' Not_Val_1 ada/nodes.lkt:9215
--# expr-start 5081 '<IsNull at nodes.lkt:9215:18>' Is_Null_1 ada/nodes.lkt:9215
Is_Null_1 := Local_Base_Type.Node = null; 
--# expr-done 5081
Not_Val_1 := not (Is_Null_1); 
--# expr-done 5082
if Not_Val_1 then
   --# expr-start 5083 '<FieldAccess for matching_type at nodes.lkt:9215:40>' Fld_7 ada/nodes.lkt:9215
      if Local_Base_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Local_Base_Type.Node, Expected_Type => Stop_Recurse_At, Origin => Origin, E_Info => Local_Base_Type.Info);
--# end
--# expr-done 5083
   If_Result_1 := Fld_7;
else
   If_Result_1 := False;
end if;
--# expr-done 5084
if If_Result_1 then
   If_Result_2 := Local_Self_Discs;
else
   --# expr-start 5089 '<If at nodes.lkt:9212:9>' If_Result ada/nodes.lkt:9212
--# expr-start 5086 '<Not at nodes.lkt:9217:14>' Not_Val ada/nodes.lkt:9217
--# expr-start 5085 '<IsNull at nodes.lkt:9217:18>' Is_Null ada/nodes.lkt:9217
Is_Null := Local_Base_Type.Node = null; 
--# expr-done 5085
Not_Val := not (Is_Null); 
--# expr-done 5086
if Not_Val then
   --# expr-start 5088 '<FieldAccess for discriminants_list at nodes.lkt:9218:14>' Fld_6 ada/nodes.lkt:9218
--# expr-start 5087 '<FieldAccess for base_type at nodes.lkt:9218:14>' Fld_5 ada/nodes.lkt:9218
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5087
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Fld_5.Node, Stop_Recurse_At => Stop_Recurse_At, Origin => Origin, E_Info => Fld_5.Info);
--# end
--# expr-done 5088
   If_Result := Fld_6;
else
   If_Result := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 5089
   If_Result_2 := If_Result;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 5090
   If_Result_3 := If_Result_2;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 5091
   If_Result_4 := If_Result_3;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 5092
Let_Result := If_Result_4; Inc_Ref (Let_Result);
--# end
--# expr-done 5093
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 5094
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_781;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_781;
                     Finalizer_Scope_2623;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Discriminants_List;
--# end
--# property-start TypeDecl.array_ndims ada/nodes.lkt:9223
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Array_Ndims
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Integer;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5096 '<FieldAccess for array_ndims at nodes.lkt:9223:30>' Fld_1 ada/nodes.lkt:9223
--# expr-start 5095 '<FieldAccess for type_def at nodes.lkt:9223:30>' Fld ada/nodes.lkt:9223
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5095
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.array_ndims'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Array_Ndims (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5096
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Array_Ndims;
--# end
--# property-start TypeDecl.is_real_type ada/nodes.lkt:9226
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Real_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5098 '<FieldAccess for is_real_type at nodes.lkt:9226:32>' Fld_1 ada/nodes.lkt:9226
--# expr-start 5097 '<FieldAccess for type_def at nodes.lkt:9226:32>' Fld ada/nodes.lkt:9226
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5097
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.is_real_type
Fld_1 := Libadalang.Implementation.Type_Def_P_Is_Real_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5098
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Real_Type;
--# end
--# property-start TypeDecl.is_float_type ada/nodes.lkt:9229
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Float_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5100 '<FieldAccess for is_float_type at nodes.lkt:9229:33>' Fld_1 ada/nodes.lkt:9229
--# expr-start 5099 '<FieldAccess for type_def at nodes.lkt:9229:33>' Fld ada/nodes.lkt:9229
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5099
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_float_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Float_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5100
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Float_Type;
--# end
--# property-start TypeDecl.is_fixed_point ada/nodes.lkt:9232
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Fixed_Point
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5102 '<FieldAccess for is_fixed_point at nodes.lkt:9232:34>' Fld_1 ada/nodes.lkt:9232
--# expr-start 5101 '<FieldAccess for type_def at nodes.lkt:9232:34>' Fld ada/nodes.lkt:9232
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5101
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_fixed_point'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Fixed_Point (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5102
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Fixed_Point;
--# end
--# property-start TypeDecl.is_int_type ada/nodes.lkt:9235
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Int_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5104 '<FieldAccess for is_int_type at nodes.lkt:9235:31>' Fld_1 ada/nodes.lkt:9235
--# expr-start 5103 '<FieldAccess for type_def at nodes.lkt:9235:31>' Fld ada/nodes.lkt:9235
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5103
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_int_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Int_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5104
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Int_Type;
--# end
--# property-start TypeDecl.is_access_type ada/nodes.lkt:9238
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Access_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
      As_Entity : Internal_Entity_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Decl;
Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5107 '<FieldAccess for is_access_type at nodes.lkt:9238:34>' Fld_1 ada/nodes.lkt:9238
--# expr-start 5106 '<FieldAccess for type_def at nodes.lkt:9238:34>' Fld ada/nodes.lkt:9238
--# expr-start 5105 '<as_bare_entity at nodes.lkt:9238:34>' If_Result ada/nodes.lkt:9238
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Type_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 5105
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => If_Result.Node.Type_Decl_F_Type_Def, Info => If_Result.Info);
--# expr-done 5106
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_access_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Access_Type (Node => Fld.Node, Origin => Origin);
--# end
--# expr-done 5107
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Access_Type;
--# end
--# property-start TypeDecl.is_static_decl ada/nodes.lkt:9241
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Static_Decl
  (Node : Bare_Type_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      As_Entity : Internal_Entity_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Decl;
Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5110 '<FieldAccess for is_static at nodes.lkt:9241:34>' Fld_1 ada/nodes.lkt:9241
--# expr-start 5109 '<FieldAccess for type_def at nodes.lkt:9241:34>' Fld ada/nodes.lkt:9241
--# expr-start 5108 '<as_bare_entity at nodes.lkt:9241:34>' If_Result ada/nodes.lkt:9241
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Type_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 5108
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => If_Result.Node.Type_Decl_F_Type_Def, Info => If_Result.Info);
--# expr-done 5109
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_static'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Static (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 5110
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Static_Decl;
--# end
--# property-start TypeDecl.accessed_type ada/nodes.lkt:9244
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Accessed_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_789 with Inline_Always;
      Local_Imp_Deref : Internal_Entity_Expr;
Fld : Internal_Entity_Expr;
Fld_1 : Internal_Entity_Type_Def;
Fld_2 : Internal_Entity_Base_Type_Decl;
Bound_Include_Ud_Indexing : Boolean;
Fld_3 : Internal_Entity_Type_Def;
Fld_4 : Lexical_Env := Empty_Env;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_5 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Dyn_Var_Bind_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Formal_Param_Decl;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_789 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_789;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5125 '<Let at nodes.lkt:9245:9>' Let_Result ada/nodes.lkt:9245
--# scope-start
--# expr-start 5111 '<FieldAccess for get_imp_deref at nodes.lkt:9245:25>' Fld ada/nodes.lkt:9245
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5111
Local_Imp_Deref := Fld; 
--# bind imp_deref Local_Imp_Deref
--# expr-start 5124 '<If at nodes.lkt:9247:9>' If_Result ada/nodes.lkt:9247
--# expr-start 5112 '<IsNull at nodes.lkt:9247:12>' Is_Null ada/nodes.lkt:9247
Is_Null := Local_Imp_Deref.Node = null; 
--# expr-done 5112
if Is_Null then
   --# expr-start 5114 '<FieldAccess for accessed_type at nodes.lkt:9247:35>' Fld_2 ada/nodes.lkt:9247
--# expr-start 5113 '<FieldAccess for type_def at nodes.lkt:9247:35>' Fld_1 ada/nodes.lkt:9247
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5113
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.accessed_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Type_Def_P_Accessed_Type (Node => Fld_1.Node, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 5114
   If_Result := Fld_2;
else
   --# expr-start 5123 '<FieldAccess for accessed_type at nodes.lkt:9251:13>' Fld_7 ada/nodes.lkt:9251
--# expr-start 5122 '<FieldAccess for formal_type at nodes.lkt:9251:13>' Fld_6 ada/nodes.lkt:9251
--# expr-start 5121 '<Cast to BaseFormalParamDecl at nodes.lkt:9251:13>' Cast_Result_1 ada/nodes.lkt:9251
--# expr-start 5120 '<bind at nodes.lkt:9252:17>' Dyn_Var_Bind_Result ada/nodes.lkt:9252
Bound_Include_Ud_Indexing := False; 
--# expr-start 5119 '<EnvGet at nodes.lkt:9254:17>' Env_Get_Result ada/nodes.lkt:9254
--# expr-start 5116 '<FieldAccess for defining_env at nodes.lkt:9254:17>' Fld_4 ada/nodes.lkt:9254
--# expr-start 5115 '<FieldAccess for type_def at nodes.lkt:9254:17>' Fld_3 ada/nodes.lkt:9254
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5115
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.defining_env
Fld_4 := Libadalang.Implementation.Type_Def_P_Defining_Env (Node => Fld_3.Node, Origin => Origin, Include_Ud_Indexing => Bound_Include_Ud_Indexing, Dottable_Type => No_Bare_Ada_Node, E_Info => Fld_3.Info);
--# end
--# expr-done 5116
--# expr-start 5118 '<FieldAccess for name_symbol at nodes.lkt:9255:21>' Fld_5 ada/nodes.lkt:9255
--# expr-start 5117 '<Cast to Name at nodes.lkt:9255:21>' Cast_Result ada/nodes.lkt:9255
Cast_Expr := Local_Imp_Deref; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 5117
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_5 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Cast_Result.Node);
--# end
--# expr-done 5118
Env_Get_Result := AST_Envs.Get_First (Self => Fld_4, Key => Thin (Fld_5), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 5119
Dyn_Var_Bind_Result := Env_Get_Result; 
--# expr-done 5120
   if Dyn_Var_Bind_Result.Node = null
      or else Dyn_Var_Bind_Result.Node.Kind in Ada_Base_Formal_Param_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Dyn_Var_Bind_Result.Node,
         Info => Dyn_Var_Bind_Result.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5121
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_6 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Cast_Result_1.Node, Origin => Origin, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 5122
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Fld_6.Node, Origin => Origin, E_Info => Fld_6.Info);
--# end
--# expr-done 5123
   If_Result := Fld_7;
end if;
--# expr-done 5124
Let_Result := If_Result; 
--# end
--# expr-done 5125
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_789;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_789;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Accessed_Type;
--# end
--# property-start TypeDecl.access_def ada/nodes.lkt:9273
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Access_Def
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Access_Def
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Access_Def;
      Match_0 : Internal_Entity_Access_Def;
Match_1 : Internal_Entity_Derived_Type_Def;
Match_2 : Internal_Entity_Type_Def;
Fld : Internal_Entity_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Access_Def;
Match_Prefix : Internal_Entity_Type_Def;
Cast_Result : Internal_Entity_Access_Def;
Let_Result : Internal_Entity_Access_Def;
Scope_Result : Internal_Entity_Access_Def;
Cast_Result_1 : Internal_Entity_Derived_Type_Def;
Let_Result_1 : Internal_Entity_Access_Def;
Scope_Result_1 : Internal_Entity_Access_Def;
Cast_Result_2 : Internal_Entity_Type_Def;
Let_Result_2 : Internal_Entity_Access_Def;
Scope_Result_2 : Internal_Entity_Access_Def;
Match_Result : Internal_Entity_Access_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5129 '<Match at nodes.lkt:9273:43>' Match_Result ada/nodes.lkt:9273
--# expr-start 5126 '<FieldAccess for type_def at nodes.lkt:9273:49>' Fld ada/nodes.lkt:9273
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5126
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Type_Def (Match_Prefix.Node.Kind) is
         when Ada_Access_To_Subp_Def .. Ada_Type_Access_Def =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Access_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind ad Match_0
Let_Result := Match_0; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Derived_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Derived_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind dtd Match_1
--# expr-start 5128 '<FieldAccess for access_def at nodes.lkt:9275:37>' Fld_2 ada/nodes.lkt:9275
--# expr-start 5127 '<FieldAccess for base_type at nodes.lkt:9275:37>' Fld_1 ada/nodes.lkt:9275
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Match_1.Node, Origin => Origin, E_Info => Match_1.Info);
--# end
--# expr-done 5127
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Fld_1.Node, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 5128
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Signed_Int_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Access_Def; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 5129
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Access_Def;
--# end
--# property-start TypeDecl.is_tagged_type ada/nodes.lkt:9280
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Tagged_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5131 '<FieldAccess for is_tagged_type at nodes.lkt:9280:34>' Fld_1 ada/nodes.lkt:9280
--# expr-start 5130 '<FieldAccess for type_def at nodes.lkt:9280:34>' Fld ada/nodes.lkt:9280
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5130
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_tagged_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Tagged_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5131
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Tagged_Type;
--# end
--# property-start TypeDecl.is_task_type ada/nodes.lkt:9282
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Task_Type
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5133 '<FieldAccess for is_task_type at nodes.lkt:9282:32>' Fld_1 ada/nodes.lkt:9282
--# expr-start 5132 '<FieldAccess for type_def at nodes.lkt:9282:32>' Fld ada/nodes.lkt:9282
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5132
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_task_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Task_Type (Node => Fld.Node, Origin => No_Bare_Ada_Node, E_Info => Fld.Info);
--# end
--# expr-done 5133
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Task_Type;
--# end
--# property-start TypeDecl.base_type ada/nodes.lkt:9285
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Base_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5135 '<FieldAccess for base_type at nodes.lkt:9285:45>' Fld_1 ada/nodes.lkt:9285
--# expr-start 5134 '<FieldAccess for type_def at nodes.lkt:9285:45>' Fld ada/nodes.lkt:9285
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5134
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5135
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Base_Type;
--# end
--# property-start TypeDecl.base_interfaces ada/nodes.lkt:9288
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Base_Interfaces
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_794 with Inline_Always;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_794 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_794;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5137 '<FieldAccess for base_interfaces at nodes.lkt:9289:9>' Fld_1 ada/nodes.lkt:9289
--# expr-start 5136 '<FieldAccess for type_def at nodes.lkt:9289:9>' Fld ada/nodes.lkt:9289
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5136
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_interfaces'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Interfaces (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 5137
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_794;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_794;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Base_Interfaces;
--# end
--# property-start TypeDecl.is_char_type ada/nodes.lkt:9292
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Char_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5139 '<FieldAccess for is_char_type at nodes.lkt:9292:32>' Fld_1 ada/nodes.lkt:9292
--# expr-start 5138 '<FieldAccess for type_def at nodes.lkt:9292:32>' Fld ada/nodes.lkt:9292
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5138
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_char_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Char_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5139
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Char_Type;
--# end
--# property-start TypeDecl.is_enum_type ada/nodes.lkt:9295
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Enum_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5141 '<FieldAccess for is_enum_type at nodes.lkt:9295:32>' Fld_1 ada/nodes.lkt:9295
--# expr-start 5140 '<FieldAccess for type_def at nodes.lkt:9295:32>' Fld ada/nodes.lkt:9295
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5140
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_enum_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Enum_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5141
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Enum_Type;
--# end
--# property-start TypeDecl.is_private ada/nodes.lkt:9297
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Private
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Var_Expr_0 : Bare_Derived_Type_Def;
Fld : Bare_Type_Def;
Is_A : Boolean;
Fld_1 : Bare_Type_Def;
Cast_Result : Bare_Derived_Type_Def;
Fld_2 : Bare_With_Private;
Fld_3 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5148 '<BooleanBinaryOp Or at nodes.lkt:9298:9>' If_Result ada/nodes.lkt:9298
--# expr-start 5143 '<IsA PrivateTypeDef at nodes.lkt:9298:9>' Is_A ada/nodes.lkt:9298
--# expr-start 5142 '<FieldAccess for type_def at nodes.lkt:9298:9>' Fld ada/nodes.lkt:9298
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Type_Decl_F_Type_Def;
--# expr-done 5142
Is_A := Fld /= null 
and then Fld.Kind in Ada_Private_Type_Def_Range; 
--# expr-done 5143
if Is_A then
   If_Result := True;
else
--# expr-start 5145 '<Cast to DerivedTypeDef at nodes.lkt:9299:12>' Cast_Result ada/nodes.lkt:9299
--# expr-start 5144 '<FieldAccess for type_def at nodes.lkt:9299:12>' Fld_1 ada/nodes.lkt:9299
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Type_Decl_F_Type_Def;
--# expr-done 5144
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Derived_Type_Def_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 5145
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind dtd Var_Expr_0
--# expr-start 5147 '<FieldAccess for as_bool at nodes.lkt:9300:22>' Fld_3 ada/nodes.lkt:9300
--# expr-start 5146 '<FieldAccess for has_with_private at nodes.lkt:9300:22>' Fld_2 ada/nodes.lkt:9300
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_0.Derived_Type_Def_F_Has_With_Private;
--# expr-done 5146
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]WithPrivate.as_bool'
Fld_3 := Libadalang.Implementation.Dispatcher_With_Private_P_As_Bool (Node => Fld_2);
--# end
--# expr-done 5147
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 5148
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Private;
--# end
--# property-start TypeDecl.is_derived_tagged_type ada/nodes.lkt:9303
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Derived_Tagged_Type
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Type_Def;
Is_A : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5153 '<BooleanBinaryOp And at nodes.lkt:9304:9>' If_Result ada/nodes.lkt:9304
--# expr-start 5150 '<FieldAccess for is_tagged_type at nodes.lkt:9304:9>' Fld_1 ada/nodes.lkt:9304
--# expr-start 5149 '<FieldAccess for type_def at nodes.lkt:9304:9>' Fld ada/nodes.lkt:9304
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5149
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_tagged_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Tagged_Type (Node => Fld.Node, Origin => No_Bare_Ada_Node, E_Info => Fld.Info);
--# end
--# expr-done 5150
if Fld_1 then
   --# expr-start 5152 '<IsA DerivedTypeDef, InterfaceTypeDef at nodes.lkt:9305:13>' Is_A ada/nodes.lkt:9305
--# expr-start 5151 '<FieldAccess for type_def at nodes.lkt:9305:13>' Fld_2 ada/nodes.lkt:9305
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5151
Is_A := Fld_2.Node /= null 
and then Fld_2.Node.Kind in Ada_Derived_Type_Def_Range | Ada_Interface_Type_Def_Range; 
--# expr-done 5152
   If_Result := Is_A;
else
   If_Result := False;
end if;
--# expr-done 5153
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Derived_Tagged_Type;
--# end
--# property-start TypeDecl.array_def ada/nodes.lkt:9308
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Array_Def
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Type_Def
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Type_Def;
      Match_0 : Internal_Entity_Array_Type_Def;
Match_1 : Internal_Entity_Derived_Type_Def;
Match_2 : Internal_Entity_Type_Def;
Fld : Internal_Entity_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Array_Type_Def;
Match_Prefix : Internal_Entity_Type_Def;
Cast_Result : Internal_Entity_Array_Type_Def;
Let_Result : Internal_Entity_Array_Type_Def;
Scope_Result : Internal_Entity_Array_Type_Def;
Cast_Result_1 : Internal_Entity_Derived_Type_Def;
Let_Result_1 : Internal_Entity_Array_Type_Def;
Scope_Result_1 : Internal_Entity_Array_Type_Def;
Cast_Result_2 : Internal_Entity_Type_Def;
Let_Result_2 : Internal_Entity_Array_Type_Def;
Scope_Result_2 : Internal_Entity_Array_Type_Def;
Match_Result : Internal_Entity_Array_Type_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5157 '<Match at nodes.lkt:9308:45>' Match_Result ada/nodes.lkt:9308
--# expr-start 5154 '<FieldAccess for type_def at nodes.lkt:9308:51>' Fld ada/nodes.lkt:9308
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5154
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Type_Def (Match_Prefix.Node.Kind) is
         when Ada_Array_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Array_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind atd Match_0
Let_Result := Match_0; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Derived_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Derived_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind dtd Match_1
--# expr-start 5156 '<FieldAccess for array_def at nodes.lkt:9310:37>' Fld_2 ada/nodes.lkt:9310
--# expr-start 5155 '<FieldAccess for base_type at nodes.lkt:9310:37>' Fld_1 ada/nodes.lkt:9310
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Match_1.Node, Origin => Origin, E_Info => Match_1.Info);
--# end
--# expr-done 5155
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.array_def'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Array_Def (Node => Fld_1.Node, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 5156
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Access_To_Subp_Def .. Ada_Type_Access_Def | Ada_Enum_Type_Def .. Ada_Signed_Int_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Array_Type_Def; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 5157
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Array_Def;
--# end
--# property-start TypeDecl.root_type ada/nodes.lkt:9315
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Root_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Derived_Type_Def;
Match_1 : Internal_Entity_Type_Def;
Fld : Internal_Entity_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity_Type_Def;
Cast_Result : Internal_Entity_Derived_Type_Def;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Type_Def;
Cast_Expr : Internal_Entity_Type_Decl;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5161 '<Match at nodes.lkt:9315:45>' Match_Result ada/nodes.lkt:9315
--# expr-start 5158 '<FieldAccess for type_def at nodes.lkt:9315:51>' Fld ada/nodes.lkt:9315
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5158
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Type_Def (Match_Prefix.Node.Kind) is
         when Ada_Derived_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Derived_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind dtd Match_0
--# expr-start 5160 '<FieldAccess for root_type at nodes.lkt:9316:37>' Fld_2 ada/nodes.lkt:9316
--# expr-start 5159 '<FieldAccess for base_type at nodes.lkt:9316:37>' Fld_1 ada/nodes.lkt:9316
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Match_0.Node, Origin => Origin, E_Info => Match_0.Info);
--# end
--# expr-done 5159
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.root_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Root_Type (Node => Fld_1.Node, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 5160
Let_Result := Fld_2; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Signed_Int_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind _ Match_1
Cast_Expr := Ent; 
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Let_Result_1 := Cast_Result_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 5161
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Root_Type;
--# end
--# property-start TypeDecl.defining_env ada/nodes.lkt:9323
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Defining_Env
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_801 with Inline_Always;
            procedure Finalizer_Scope_2633 with Inline_Always;
      Local_Imp_Deref : Internal_Entity_Expr;
Local_Self_Env : Lexical_Env := Empty_Env;
Fld : Internal_Entity_Expr;
Fld_1 : Internal_Entity_Type_Def;
Fld_2 : Lexical_Env := Empty_Env;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Bound_Include_Ud_Indexing : Boolean;
Fld_5 : Internal_Entity_Basic_Decl_Array_Access;
Fld_6 : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
Fld_7 : Lexical_Env := Empty_Env;
Map_Result : Lexical_Env_Array_Access;
Array_Lit_1 : Lexical_Env_Array_Access;
Concat_Result_1 : Lexical_Env_Array_Access;
Group_Env_1 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Fld_8 : Boolean;
If_Result : Boolean;
If_Result_1 : Lexical_Env := Empty_Env;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result_2 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
Let_Result_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_801 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Local_Self_Env);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Group_Env_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_801;
            procedure Finalizer_Scope_2633 is
            begin
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_2633;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5183 '<Let at nodes.lkt:9324:9>' Let_Result_1 ada/nodes.lkt:9324
--# scope-start
--# expr-start 5162 '<FieldAccess for get_imp_deref at nodes.lkt:9324:25>' Fld ada/nodes.lkt:9324
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.get_imp_deref'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Get_Imp_Deref (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5162
Local_Imp_Deref := Fld; 
--# bind imp_deref Local_Imp_Deref
--# expr-start 5182 '<Let at nodes.lkt:9327:9>' Let_Result ada/nodes.lkt:9327
--# scope-start
--# expr-start 5164 '<FieldAccess for defining_env at nodes.lkt:9327:24>' Fld_2 ada/nodes.lkt:9327
--# expr-start 5163 '<FieldAccess for type_def at nodes.lkt:9327:24>' Fld_1 ada/nodes.lkt:9327
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5163
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.defining_env
Fld_2 := Libadalang.Implementation.Type_Def_P_Defining_Env (Node => Fld_1.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld_1.Info);
--# end
--# expr-done 5164
Local_Self_Env := Fld_2; Inc_Ref (Local_Self_Env);
--# bind self_env Local_Self_Env
--# expr-start 5181 '<If at nodes.lkt:9329:9>' If_Result_2 ada/nodes.lkt:9329
--# expr-start 5166 '<Not at nodes.lkt:9329:12>' Not_Val ada/nodes.lkt:9329
--# expr-start 5165 '<IsNull at nodes.lkt:9329:16>' Is_Null ada/nodes.lkt:9329
Is_Null := Local_Imp_Deref.Node = null; 
--# expr-done 5165
Not_Val := not (Is_Null); 
--# expr-done 5166
if Not_Val then
   --# expr-start 5170 '<env_group at nodes.lkt:9330:14>' Group_Env ada/nodes.lkt:9330
--# expr-start 5169 '<ArrayLiteral at nodes.lkt:9330:14>' Array_Lit ada/nodes.lkt:9330
--# expr-start 5168 '<FieldAccess for defining_env at nodes.lkt:9330:25>' Fld_4 ada/nodes.lkt:9330
--# expr-start 5167 '<FieldAccess for accessed_type at nodes.lkt:9330:25>' Fld_3 ada/nodes.lkt:9330
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5167
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld_3.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld_3.Info);
--# end
--# expr-done 5168
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Local_Self_Env, 2 => Fld_4)); 
--# expr-done 5169
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 5170
   If_Result_2 := Group_Env;
else
   --# expr-start 5180 '<If at nodes.lkt:9329:9>' If_Result_1 ada/nodes.lkt:9329
--# expr-start 5172 '<BooleanBinaryOp And at nodes.lkt:9331:14>' If_Result ada/nodes.lkt:9331
if Include_Ud_Indexing then
   --# expr-start 5171 '<FieldAccess for has_ud_indexing at nodes.lkt:9331:38>' Fld_8 ada/nodes.lkt:9331
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.has_ud_indexing'
Fld_8 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Has_Ud_Indexing (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5171
   If_Result := Fld_8;
else
   If_Result := False;
end if;
--# expr-done 5172
if If_Result then
   --# expr-start 5179 '<bind at nodes.lkt:9333:13>' Dyn_Var_Bind_Result ada/nodes.lkt:9333
Bound_Include_Ud_Indexing := False; 
--# expr-start 5178 '<env_group at nodes.lkt:9335:13>' Group_Env_1 ada/nodes.lkt:9335
--# expr-start 5176 '<Map at nodes.lkt:9336:17>' Map_Result ada/nodes.lkt:9336
   --# expr-start 5173 '<FieldAccess for constant_indexing_fns at nodes.lkt:9336:18>' Fld_5 ada/nodes.lkt:9336
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.constant_indexing_fns'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Constant_Indexing_Fns (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5173
--# expr-start 5174 '<FieldAccess for variable_indexing_fns at nodes.lkt:9336:49>' Fld_6 ada/nodes.lkt:9336
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.variable_indexing_fns'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Variable_Indexing_Fns (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5174
Concat_Result := Concat (Fld_5, Fld_6); 
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Concat_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind fn Item_0
      --# expr-start 5175 '<FieldAccess for defining_env at nodes.lkt:9337:30>' Fld_7 ada/nodes.lkt:9337
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Item_0.Node, Origin => Origin, Include_Ud_Indexing => Bound_Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Item_0.Info);
--# end
--# expr-done 5175
         declare
            Item_To_Append : constant Lexical_Env := Fld_7;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2633;
         end loop;
      end;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 5176
--# expr-start 5177 '<ArrayLiteral at nodes.lkt:9338:19>' Array_Lit_1 ada/nodes.lkt:9338
Array_Lit_1 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Local_Self_Env)); 
--# expr-done 5177
Concat_Result_1 := Concat (Map_Result, Array_Lit_1); 
Group_Env_1 := Group (Concat_Result_1, No_Metadata); 
--# expr-done 5178
Dyn_Var_Bind_Result := Group_Env_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 5179
   If_Result_1 := Dyn_Var_Bind_Result;
else
   If_Result_1 := Local_Self_Env;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 5180
   If_Result_2 := If_Result_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 5181
Let_Result := If_Result_2; Inc_Ref (Let_Result);
--# end
--# expr-done 5182
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 5183
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_801;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_801;
                     Finalizer_Scope_2633;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Defining_Env;
--# end
--# property-start TypeDecl.primitives_env ada/nodes.lkt:9346
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Primitives_Env
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_802 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_802 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_802;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Type_Decl_Type_Decl_P_Primitives_Env,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Type_Decl,
                                As_Bare_Type_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Lexical_Env;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 5184 '<FieldAccess for compute_primitives_env at nodes.lkt:9347:9>' Fld ada/nodes.lkt:9347
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.compute_primitives_env
Fld := Libadalang.Implementation.Base_Type_Decl_P_Compute_Primitives_Env (Node => Ent.Node, Include_Self => True, E_Info => Ent.Info);
--# end
--# expr-done 5184
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_802;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_802;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Lexical_Env,
                        As_Lexical_Env => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Type_Decl_P_Primitives_Env;
--# end
--# property-start TypeDecl.predefined_operators ada/nodes.lkt:9356
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Predefined_Operators
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_803 with Inline_Always;
      Fld : Bare_Type_Def;
Cast_Result : Bare_Real_Type_Def;
Fld_1 : Internal_Env_Assoc_Array_Access;
Fld_2 : Bare_Type_Def;
Fld_3 : Internal_Env_Assoc_Array_Access;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Type_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Env_Assoc_Array_Access;
Fld_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Fld_6 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Type_Decl;
Cast_Result_5 : Internal_Entity;
Is_Equiv_1 : Boolean;
Cast_Expr_2 : Internal_Entity_Type_Decl;
Cast_Result_6 : Internal_Entity;
Is_Equiv_2 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_803 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_2);
            end Finalizer_Scope_803;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Type_Decl_Type_Decl_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Type_Decl,
                                As_Bare_Type_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 5195 '<If at nodes.lkt:9357:9>' If_Result_2 ada/nodes.lkt:9357
Cast_Expr_2 := Ent; 
      Cast_Result_6 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
--# expr-start 5185 '<FieldAccess for universal_int_type at nodes.lkt:9357:20>' Fld_5 ada/nodes.lkt:9357
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld_5 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Self);
--# end
--# expr-done 5185
      Cast_Result_3 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Is_Equiv_2 := Equivalent (Cast_Result_6, Cast_Result_3); 
if Is_Equiv_2 then
   If_Result_1 := True;
else
Cast_Expr_1 := Ent; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# expr-start 5186 '<FieldAccess for universal_real_type at nodes.lkt:9357:48>' Fld_6 ada/nodes.lkt:9357
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_real_type
Fld_6 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Type (Node => Self);
--# end
--# expr-done 5186
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
Is_Equiv_1 := Equivalent (Cast_Result_5, Cast_Result_4); 
   If_Result_1 := Is_Equiv_1;
end if;
if If_Result_1 then
   If_Result_2 := No_Internal_Env_Assoc_Array_Type;
else
   --# expr-start 5194 '<If at nodes.lkt:9357:9>' If_Result ada/nodes.lkt:9357
--# expr-start 5188 '<Eq at nodes.lkt:9359:14>' Is_Equiv ada/nodes.lkt:9359
Cast_Expr := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 5187 '<FieldAccess for universal_fixed_type at nodes.lkt:9359:22>' Fld_4 ada/nodes.lkt:9359
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_fixed_type
Fld_4 := Libadalang.Implementation.Ada_Node_P_Universal_Fixed_Type (Node => Self);
--# end
--# expr-done 5187
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 5188
if Is_Equiv then
   --# expr-start 5191 '<FieldAccess for universal_fixed_predefined_operators at nodes.lkt:9361:13>' Fld_1 ada/nodes.lkt:9361
--# expr-start 5190 '<Cast to RealTypeDef at nodes.lkt:9361:13>' Cast_Result ada/nodes.lkt:9361
--# expr-start 5189 '<FieldAccess for type_def at nodes.lkt:9361:13>' Fld ada/nodes.lkt:9361
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Type_Decl_F_Type_Def;
--# expr-done 5189
   if Fld = null
      or else Fld.Kind in Ada_Real_Type_Def
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 5190
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start RealTypeDef.universal_fixed_predefined_operators
Fld_1 := Libadalang.Implementation.Real_Type_Def_P_Universal_Fixed_Predefined_Operators (Node => Cast_Result);
--# end
--# expr-done 5191
   If_Result := Fld_1;
else
   --# expr-start 5193 '<FieldAccess for predefined_operators at nodes.lkt:9365:14>' Fld_3 ada/nodes.lkt:9365
--# expr-start 5192 '<FieldAccess for type_def at nodes.lkt:9365:14>' Fld_2 ada/nodes.lkt:9365
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Decl_F_Type_Def;
--# expr-done 5192
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.predefined_operators'
Fld_3 := Libadalang.Implementation.Dispatcher_Type_Def_P_Predefined_Operators (Node => Fld_2);
--# end
--# expr-done 5193
   If_Result := Fld_3;
end if;
      Inc_Ref (If_Result);
--# expr-done 5194
   If_Result_2 := If_Result;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 5195
         Property_Result := If_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_803;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_803;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Type_Decl_P_Predefined_Operators;
--# end
--# property-start TypeDecl.record_def ada/nodes.lkt:9368
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Record_Def
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Record_Def
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Record_Def;
      Match_0 : Internal_Entity_Record_Type_Def;
Match_1 : Internal_Entity_Derived_Type_Def;
Match_2 : Internal_Entity_Type_Def;
Var_Expr_145 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Type_Def;
Fld_1 : Internal_Entity_Base_Record_Def;
Fld_2 : Internal_Entity_Base_Record_Def;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Record_Def;
Scope_Result : Internal_Entity_Base_Record_Def;
Result_Var : Internal_Entity_Base_Record_Def;
Fld_5 : Boolean;
If_Result : Internal_Entity_Base_Record_Def;
Match_Prefix : Internal_Entity_Type_Def;
Cast_Result : Internal_Entity_Record_Type_Def;
Let_Result : Internal_Entity_Base_Record_Def;
Scope_Result_1 : Internal_Entity_Base_Record_Def;
Cast_Result_1 : Internal_Entity_Derived_Type_Def;
Let_Result_1 : Internal_Entity_Base_Record_Def;
Scope_Result_2 : Internal_Entity_Base_Record_Def;
Cast_Result_2 : Internal_Entity_Type_Def;
Let_Result_2 : Internal_Entity_Base_Record_Def;
Scope_Result_3 : Internal_Entity_Base_Record_Def;
Match_Result : Internal_Entity_Base_Record_Def;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5203 '<Match at nodes.lkt:9368:47>' Match_Result ada/nodes.lkt:9368
--# expr-start 5196 '<FieldAccess for type_def at nodes.lkt:9368:53>' Fld ada/nodes.lkt:9368
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5196
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Type_Def (Match_Prefix.Node.Kind) is
         when Ada_Record_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Record_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind r Match_0
--# expr-start 5197 '<FieldAccess for record_def at nodes.lkt:9369:34>' Fld_1 ada/nodes.lkt:9369
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Base_Record_Def (Node => Match_0.Node.Record_Type_Def_F_Record_Def, Info => Match_0.Info);
--# expr-done 5197
Let_Result := Fld_1; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Derived_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Derived_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind d Match_1
--# expr-start 5202 '<If at nodes.lkt:9374:13>' If_Result ada/nodes.lkt:9374
--# expr-start 5198 '<FieldAccess for is_tagged_type at nodes.lkt:9374:16>' Fld_5 ada/nodes.lkt:9374
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_tagged_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Tagged_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5198
if Fld_5 then
   --# expr-start 5199 '<FieldAccess for record_extension at nodes.lkt:9374:43>' Fld_2 ada/nodes.lkt:9374
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Record_Def (Node => Match_1.Node.Derived_Type_Def_F_Record_Extension, Info => Match_1.Info);
--# expr-done 5199
   If_Result := Fld_2;
else
--# expr-start 5200 '<FieldAccess for base_type at nodes.lkt:9375:18>' Fld_3 ada/nodes.lkt:9375
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Match_1.Node, Origin => Origin, E_Info => Match_1.Info);
--# end
--# expr-done 5200
Var_Expr_145 := Fld_3;
if Var_Expr_145 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 5201 '<FieldAccess for record_def at nodes.lkt:9375:18>' Fld_4 ada/nodes.lkt:9375
      if Var_Expr_145.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Var_Expr_145.Node, Origin => Origin, E_Info => Var_Expr_145.Info);
--# end
--# expr-done 5201
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Record_Def;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 5202
Let_Result_1 := If_Result; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Ordinary_Fixed_Point_Def | Ada_Signed_Int_Type_Def =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Type_Def
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Base_Record_Def; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 5203
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Record_Def;
--# end
--# property-start TypeDecl.xref_entry_point ada/nodes.lkt:9379
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Xref_Entry_Point
  (Node : Bare_Type_Decl
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Xref_Entry_Point;
--# end
--# property-start TypeDecl.xref_equation ada/nodes.lkt:9382
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Xref_Equation
  (Node : Bare_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_806 with Inline_Always;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_806 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_806;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5205 '<FieldAccess for sub_equation at nodes.lkt:9383:9>' Fld_1 ada/nodes.lkt:9383
--# expr-start 5204 '<FieldAccess for type_def at nodes.lkt:9383:9>' Fld ada/nodes.lkt:9383
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5204
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 5205
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_806;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_806;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Xref_Equation;
--# end
--# property-start TypeDecl.is_discrete_type ada/nodes.lkt:9388
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Is_Discrete_Type
  (Node : Bare_Type_Decl
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Type_Def;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5207 '<FieldAccess for is_discrete_type at nodes.lkt:9388:36>' Fld_1 ada/nodes.lkt:9388
--# expr-start 5206 '<FieldAccess for type_def at nodes.lkt:9388:36>' Fld ada/nodes.lkt:9388
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5206
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_discrete_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Discrete_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5207
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Is_Discrete_Type;
--# end
--# property-start TypeDecl.parent_primitives_env ada/nodes.lkt:9390
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Parent_Primitives_Env
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_808 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Bare_Type_Def;
Is_A : Boolean;
If_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_808 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_808;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5212 '<If at nodes.lkt:9391:9>' If_Result ada/nodes.lkt:9391
--# expr-start 5209 '<IsA DerivedTypeDef, InterfaceTypeDef at nodes.lkt:9391:12>' Is_A ada/nodes.lkt:9391
--# expr-start 5208 '<FieldAccess for type_def at nodes.lkt:9391:12>' Fld_2 ada/nodes.lkt:9391
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Decl_F_Type_Def;
--# expr-done 5208
Is_A := Fld_2 /= null 
and then Fld_2.Kind in Ada_Derived_Type_Def_Range | Ada_Interface_Type_Def_Range; 
--# expr-done 5209
if Is_A then
   --# expr-start 5210 '<FieldAccess for compute_primitives_env at nodes.lkt:9392:14>' Fld ada/nodes.lkt:9392
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.compute_primitives_env
Fld := Libadalang.Implementation.Base_Type_Decl_P_Compute_Primitives_Env (Node => Ent.Node, Include_Self => False, E_Info => Ent.Info);
--# end
--# expr-done 5210
   If_Result := Fld;
else
   --# expr-start 5211 '<FieldAccess for empty_env at nodes.lkt:9393:14>' Fld_1 ada/nodes.lkt:9393
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.empty_env
Fld_1 := Libadalang.Implementation.Ada_Node_P_Empty_Env (Node => Self);
--# end
--# expr-done 5211
   If_Result := Fld_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 5212
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_808;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_808;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Parent_Primitives_Env;
--# end
--# property-start TypeDecl.refined_parent_primitives_env ada/nodes.lkt:9413
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Refined_Parent_Primitives_Env
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_809 with Inline_Always;
            procedure Finalizer_Scope_2638 with Inline_Always;
      Var_Expr_146 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_2 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_809 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_809;
            procedure Finalizer_Scope_2638 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2638;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5215 '<FieldAccess for compute_primitives_env at nodes.lkt:9414:9>' Fld_2 ada/nodes.lkt:9414
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5213 '<FieldAccess for previous_part at nodes.lkt:9416:21>' Fld ada/nodes.lkt:9416
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.previous_part
Fld := Libadalang.Implementation.Base_Type_Decl_P_Previous_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5213
Var_Expr_146 := Fld;
if Var_Expr_146 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 5214 '<FieldAccess for base_types at nodes.lkt:9416:21>' Fld_1 ada/nodes.lkt:9416
      if Var_Expr_146.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_types'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Types (Node => Var_Expr_146.Node, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_146.Info);
--# end
--# expr-done 5214
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2638;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
--# property-call-start BaseTypeDecl.compute_primitives_env
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Compute_Primitives_Env (Node => Ent.Node, Include_Self => False, Stop_At => Result_Var, E_Info => Ent.Info);
--# end
--# expr-done 5215
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_809;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_809;
                     Finalizer_Scope_2638;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Refined_Parent_Primitives_Env;
--# end
--# property-start TypeDecl.get_imp_deref ada/nodes.lkt:9419
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Get_Imp_Deref
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Sym : Symbol_Type;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Expr;
Fld_2 : Bare_Discriminant_Part;
Is_Null : Boolean;
Fld_3 : Bare_Type_Def;
Is_A : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5225 '<If at nodes.lkt:9427:9>' If_Result_1 ada/nodes.lkt:9427
--# expr-start 5221 '<BooleanBinaryOp And at nodes.lkt:9427:12>' If_Result ada/nodes.lkt:9427
--# expr-start 5217 '<IsNull at nodes.lkt:9427:12>' Is_Null ada/nodes.lkt:9427
--# expr-start 5216 '<FieldAccess for discriminants at nodes.lkt:9427:12>' Fld_2 ada/nodes.lkt:9427
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Decl_F_Discriminants;
--# expr-done 5216
Is_Null := Fld_2 = null; 
--# expr-done 5217
if Is_Null then
   --# expr-start 5220 '<Not at nodes.lkt:9427:43>' Not_Val ada/nodes.lkt:9427
--# expr-start 5219 '<IsA DerivedTypeDef at nodes.lkt:9427:47>' Is_A ada/nodes.lkt:9427
--# expr-start 5218 '<FieldAccess for type_def at nodes.lkt:9427:47>' Fld_3 ada/nodes.lkt:9427
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Decl_F_Type_Def;
--# expr-done 5218
Is_A := Fld_3 /= null 
and then Fld_3.Kind in Ada_Derived_Type_Def_Range; 
--# expr-done 5219
Not_Val := not (Is_A); 
--# expr-done 5220
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 5221
if If_Result then
   If_Result_1 := No_Entity_Expr;
else
   --# expr-start 5224 '<FieldAccess for value at nodes.lkt:9429:14>' Fld_1 ada/nodes.lkt:9429
--# expr-start 5223 '<FieldAccess for get_aspect at nodes.lkt:9429:14>' Fld ada/nodes.lkt:9429
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5222 '<Symbol Implicit_Dereference at nodes.lkt:9429:30>' Sym ada/nodes.lkt:9429
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Implicit_Dereference); 
--# expr-done 5222
--# property-call-start BasicDecl.get_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5223
Fld_1 := Fld.Value;
--# expr-done 5224
   If_Result_1 := Fld_1;
end if;
--# expr-done 5225
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Get_Imp_Deref;
--# end
--# property-start TypeDecl.has_ud_indexing ada/nodes.lkt:9431
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Has_Ud_Indexing
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Sym : Symbol_Type;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Expr;
Is_Null : Boolean;
Not_Val : Boolean;
Sym_1 : Symbol_Type;
Fld_2 : Internal_Aspect;
Fld_3 : Internal_Entity_Expr;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5236 '<BooleanBinaryOp Or at nodes.lkt:9432:9>' If_Result ada/nodes.lkt:9432
--# expr-start 5230 '<Not at nodes.lkt:9432:9>' Not_Val ada/nodes.lkt:9432
--# expr-start 5229 '<IsNull at nodes.lkt:9432:13>' Is_Null ada/nodes.lkt:9432
--# expr-start 5228 '<FieldAccess for value at nodes.lkt:9432:13>' Fld_1 ada/nodes.lkt:9432
--# expr-start 5227 '<FieldAccess for get_aspect at nodes.lkt:9432:13>' Fld ada/nodes.lkt:9432
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5226 '<Symbol Constant_Indexing at nodes.lkt:9432:29>' Sym ada/nodes.lkt:9432
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Constant_Indexing); 
--# expr-done 5226
--# property-call-start BasicDecl.get_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5227
Fld_1 := Fld.Value;
--# expr-done 5228
Is_Null := Fld_1.Node = null; 
--# expr-done 5229
Not_Val := not (Is_Null); 
--# expr-done 5230
if Not_Val then
   If_Result := True;
else
   --# expr-start 5235 '<Not at nodes.lkt:9433:12>' Not_Val_1 ada/nodes.lkt:9433
--# expr-start 5234 '<IsNull at nodes.lkt:9433:16>' Is_Null_1 ada/nodes.lkt:9433
--# expr-start 5233 '<FieldAccess for value at nodes.lkt:9433:16>' Fld_3 ada/nodes.lkt:9433
--# expr-start 5232 '<FieldAccess for get_aspect at nodes.lkt:9433:16>' Fld_2 ada/nodes.lkt:9433
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5231 '<Symbol Variable_Indexing at nodes.lkt:9433:32>' Sym_1 ada/nodes.lkt:9433
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Variable_Indexing); 
--# expr-done 5231
--# property-call-start BasicDecl.get_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym_1, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5232
Fld_3 := Fld_2.Value;
--# expr-done 5233
Is_Null_1 := Fld_3.Node = null; 
--# expr-done 5234
Not_Val_1 := not (Is_Null_1); 
--# expr-done 5235
   If_Result := Not_Val_1;
end if;
--# expr-done 5236
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Has_Ud_Indexing;
--# end
--# property-start TypeDecl.indexing_fns ada/nodes.lkt:9440
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Indexing_Fns
  (Node : Bare_Type_Decl
      ; Name : Internal_Entity_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_812 with Inline_Always;
            procedure Finalizer_Scope_2639 with Inline_Always;
            procedure Finalizer_Scope_2641 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Var_Expr_2 : Internal_Entity_Base_Subp_Spec;
Var_Expr_147 : Internal_Entity_Defining_Name;
Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_2 : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result_1 : Internal_Entity_Array_Access;
Scope_Result : Internal_Entity_Array_Access;
Result_Var : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Base_Subp_Spec;
Fld_4 : Bare_Ada_Node;
Bound_Origin_1 : Bare_Ada_Node;
Fld_5 : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl;
Fld_7 : Internal_Entity_Base_Type_Decl;
Cast_Expr_2 : Internal_Entity_Type_Decl;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Fld_8 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Dyn_Var_Bind_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Map_Result : Internal_Entity_Basic_Decl_Array_Access;
Unique_Array : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_812 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Unique_Array);
            end Finalizer_Scope_812;
            procedure Finalizer_Scope_2639 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
            end Finalizer_Scope_2639;
            procedure Finalizer_Scope_2641 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2641;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5253 '<unique at nodes.lkt:9441:9>' Unique_Array ada/nodes.lkt:9441
--# expr-start 5252 '<Map at nodes.lkt:9441:9>' Map_Result ada/nodes.lkt:9441
Var_Expr_0 := Name;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind name Var_Expr_0
--# expr-start 5241 '<bind at nodes.lkt:9443:17>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:9443
--# expr-start 5237 '<FieldAccess for node_env at nodes.lkt:9443:28>' Fld ada/nodes.lkt:9443
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 5237
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 5240 '<bind at nodes.lkt:9444:17>' Dyn_Var_Bind_Result ada/nodes.lkt:9444
--# expr-start 5238 '<FieldAccess for origin_node at nodes.lkt:9444:31>' Fld_1 ada/nodes.lkt:9444
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Ent.Node);
--# end
--# expr-done 5238
Bound_Origin := Fld_1; 
--# expr-start 5239 '<FieldAccess for all_env_els_impl at nodes.lkt:9447:17>' Fld_2 ada/nodes.lkt:9447
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.all_env_els_impl'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_All_Env_Els_Impl (Node => Var_Expr_0.Node, Seq => False, Env => Bound_Env, Origin => Bound_Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 5239
Dyn_Var_Bind_Result := Fld_2; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 5240
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 5241
Scope_Result := Dyn_Var_Bind_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2639;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var);
      declare
         Map_Result_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Result_Var;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
--# expr-start 5243 '<FieldAccess for subp_spec_or_null at nodes.lkt:9453:13>' Fld_3 ada/nodes.lkt:9453
--# expr-start 5242 '<Cast to BasicDecl at nodes.lkt:9453:13>' Cast_Result_1 ada/nodes.lkt:9453
Cast_Expr_1 := Item_1; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5242
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 5243
Var_Expr_2 := Fld_3;
if Var_Expr_2 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_2
--# expr-start 5250 '<bind at nodes.lkt:9455:21>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:9455
--# expr-start 5244 '<FieldAccess for node at nodes.lkt:9455:35>' Fld_4 ada/nodes.lkt:9455
Fld_4 := Item_1.Node;
--# expr-done 5244
Bound_Origin_1 := Fld_4; 
--# expr-start 5246 '<at at nodes.lkt:9462:21>' Get_Result ada/nodes.lkt:9462
--# expr-start 5245 '<FieldAccess for unpacked_formal_params at nodes.lkt:9462:21>' Fld_5 ada/nodes.lkt:9462
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_5 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 5245
Get_Result := Get (Self, Fld_5, 0, True); 
--# expr-done 5246
Var_Expr_147 := Get_Result;
if Var_Expr_147 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 5249 '<FieldAccess for matching_formal_type at nodes.lkt:9462:21>' Fld_8 ada/nodes.lkt:9462
--# expr-start 5248 '<FieldAccess for formal_type at nodes.lkt:9462:21>' Fld_7 ada/nodes.lkt:9462
--# expr-start 5247 '<FieldAccess for formal_decl at nodes.lkt:9462:21>' Fld_6 ada/nodes.lkt:9462
      if Var_Expr_147.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_6 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Var_Expr_147.Node, E_Info => Var_Expr_147.Info);
--# end
--# expr-done 5247
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_7 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_6.Node, Origin => Bound_Origin_1, E_Info => Fld_6.Info);
--# end
--# expr-done 5248
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr_2 := Ent; 
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
--# property-call-start BaseTypeDecl.matching_formal_type
Fld_8 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Formal_Type (Node => Fld_7.Node, Formal_Type => Cast_Result_2, Origin => Bound_Origin_1, E_Info => Fld_7.Info);
--# end
--# expr-done 5249
Scope_Result_1 := Fld_8;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Dyn_Var_Bind_Result_2 := Result_Var_1; 
--# expr-done 5250
Scope_Result_2 := Dyn_Var_Bind_Result_2;
   --# end
      Finalizer_Scope_2641;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
         if Result_Var_2 then
      --# expr-start 5251 '<Cast to BasicDecl at nodes.lkt:9451:20>' Cast_Result ada/nodes.lkt:9451
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 5251
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Cast_Result;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 5252
Unique_Array := Make_Unique (Map_Result); 
--# expr-done 5253
         Property_Result := Unique_Array;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_812;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_812;
                     Finalizer_Scope_2639;
                     Finalizer_Scope_2641;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Indexing_Fns;
--# end
--# property-start TypeDecl.all_indexing_fns_impl ada/nodes.lkt:9472
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_All_Indexing_Fns_Impl
  (Node : Bare_Type_Decl
      ; Name : Internal_Entity_Name
      ; Root_Type : Internal_Entity_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind root_type Root_Type
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_813 with Inline_Always;
            procedure Finalizer_Scope_2643 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Basic_Decl_Array_Access;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Type_Decl;
Fld_2 : Internal_Entity_Basic_Decl_Array_Access;
Cast_Expr_1 : Internal_Entity_Type_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Expr_2 : Internal_Entity_Type_Decl;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result : Internal_Entity_Basic_Decl_Array_Access;
Result_Var : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_813 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_813;
            procedure Finalizer_Scope_2643 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2643;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5254 '<FieldAccess for indexing_fns at nodes.lkt:9476:9>' Fld ada/nodes.lkt:9476
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDecl.indexing_fns
Fld := Libadalang.Implementation.Type_Decl_P_Indexing_Fns (Node => Ent.Node, Name => Name, E_Info => Ent.Info);
--# end
--# expr-done 5254
--# expr-start 5255 '<FieldAccess for base_type at nodes.lkt:9477:11>' Fld_1 ada/nodes.lkt:9477
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Type (Node => Ent.Node, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 5255
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 5259 '<If at nodes.lkt:9481:13>' If_Result ada/nodes.lkt:9481
--# expr-start 5256 '<Eq at nodes.lkt:9481:16>' Is_Equiv ada/nodes.lkt:9481
Cast_Expr_1 := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Cast_Expr_2 := Root_Type; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 5256
if Is_Equiv then
   If_Result := No_Internal_Entity_Basic_Decl_Array_Type;
else
   --# expr-start 5258 '<FieldAccess for all_indexing_fns_impl at nodes.lkt:9482:18>' Fld_2 ada/nodes.lkt:9482
--# expr-start 5257 '<Cast to TypeDecl at nodes.lkt:9482:18>' Cast_Result ada/nodes.lkt:9482
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5257
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDecl.all_indexing_fns_impl
Fld_2 := Libadalang.Implementation.Type_Decl_P_All_Indexing_Fns_Impl (Node => Cast_Result.Node, Name => Name, Root_Type => Root_Type, E_Info => Cast_Result.Info);
--# end
--# expr-done 5258
   If_Result := Fld_2;
end if;
      Inc_Ref (If_Result);
--# expr-done 5259
Scope_Result := If_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2643;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
Concat_Result := Concat (Fld, Result_Var); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_813;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_813;
                     Finalizer_Scope_2643;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_All_Indexing_Fns_Impl;
--# end
--# property-start TypeDecl.all_indexing_fns ada/nodes.lkt:9487
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_All_Indexing_Fns
  (Node : Bare_Type_Decl
      ; Sym : Symbol_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_814 with Inline_Always;
            procedure Finalizer_Scope_2644 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Local_Fn_Name : Internal_Entity_Name;
Local_Root_Type : Internal_Entity_Type_Decl;
Fld : Internal_Aspect;
Fld_1 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_2 : Internal_Entity;
Fld_3 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Type_Decl;
Fld_4 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result : Internal_Entity_Basic_Decl_Array_Access;
Result_Var : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_814 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_814;
            procedure Finalizer_Scope_2644 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_2644;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5261 '<FieldAccess for value at nodes.lkt:9488:9>' Fld_1 ada/nodes.lkt:9488
--# expr-start 5260 '<FieldAccess for get_aspect at nodes.lkt:9488:9>' Fld ada/nodes.lkt:9488
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.get_aspect
Fld := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Ent.Node, Name => Sym, Previous_Parts_Only => True, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5260
Fld_1 := Fld.Value;
--# expr-done 5261
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind value Var_Expr_0
--# expr-start 5268 '<Let at nodes.lkt:9493:17>' Let_Result_1 ada/nodes.lkt:9493
--# scope-start
--# expr-start 5262 '<Cast to Name at nodes.lkt:9493:31>' Cast_Result ada/nodes.lkt:9493
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5262
Local_Fn_Name := Cast_Result; 
--# bind fn_name Local_Fn_Name
--# expr-start 5267 '<Let at nodes.lkt:9496:17>' Let_Result ada/nodes.lkt:9496
--# scope-start
--# expr-start 5265 '<Cast to TypeDecl at nodes.lkt:9496:33>' Cast_Result_1 ada/nodes.lkt:9496
--# expr-start 5264 '<parent at nodes.lkt:9496:33>' Fld_3 ada/nodes.lkt:9496
--# expr-start 5263 '<parent at nodes.lkt:9496:33>' Fld_2 ada/nodes.lkt:9496
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 5263
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# expr-done 5264
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Type_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result_1 := No_Entity_Type_Decl;
   end if;
--# expr-done 5265
Local_Root_Type := Cast_Result_1; 
--# bind root_type Local_Root_Type
--# expr-start 5266 '<FieldAccess for all_indexing_fns_impl at nodes.lkt:9498:17>' Fld_4 ada/nodes.lkt:9498
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDecl.all_indexing_fns_impl
Fld_4 := Libadalang.Implementation.Type_Decl_P_All_Indexing_Fns_Impl (Node => Ent.Node, Name => Local_Fn_Name, Root_Type => Local_Root_Type, E_Info => Ent.Info);
--# end
--# expr-done 5266
Let_Result := Fld_4; Inc_Ref (Let_Result);
--# end
--# expr-done 5267
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 5268
Scope_Result := Let_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2644;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_814;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_814;
                     Finalizer_Scope_2644;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_All_Indexing_Fns;
--# end
--# property-start TypeDecl.constant_indexing_fns ada/nodes.lkt:9502
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Constant_Indexing_Fns
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_815 with Inline_Always;
      Sym : Symbol_Type;
Fld : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_815 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_815;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5270 '<FieldAccess for all_indexing_fns at nodes.lkt:9503:9>' Fld ada/nodes.lkt:9503
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5269 '<Symbol Constant_Indexing at nodes.lkt:9503:31>' Sym ada/nodes.lkt:9503
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Constant_Indexing); 
--# expr-done 5269
--# property-call-start TypeDecl.all_indexing_fns
Fld := Libadalang.Implementation.Type_Decl_P_All_Indexing_Fns (Node => Ent.Node, Sym => Sym, E_Info => Ent.Info);
--# end
--# expr-done 5270
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_815;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_815;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Constant_Indexing_Fns;
--# end
--# property-start TypeDecl.variable_indexing_fns ada/nodes.lkt:9505
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_Variable_Indexing_Fns
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_816 with Inline_Always;
      Sym : Symbol_Type;
Fld : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_816 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_816;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5272 '<FieldAccess for all_indexing_fns at nodes.lkt:9506:9>' Fld ada/nodes.lkt:9506
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5271 '<Symbol Variable_Indexing at nodes.lkt:9506:31>' Sym ada/nodes.lkt:9506
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Variable_Indexing); 
--# expr-done 5271
--# property-call-start TypeDecl.all_indexing_fns
Fld := Libadalang.Implementation.Type_Decl_P_All_Indexing_Fns (Node => Ent.Node, Sym => Sym, E_Info => Ent.Info);
--# end
--# expr-done 5272
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_816;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_816;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_Variable_Indexing_Fns;
--# end
--# property-start TypeDecl.user_defined_literal_fns ada/nodes.lkt:9510
pragma Warnings (Off, "is not referenced");
 function Type_Decl_P_User_Defined_Literal_Fns
  (Node : Bare_Type_Decl
      ; Aspect : Symbol_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind aspect Aspect
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_817 with Inline_Always;
            procedure Finalizer_Scope_2646 with Inline_Always;
      Local_Expected_Spec : Internal_User_Defined_Function_Subp_Spec := No_User_Defined_Function_Subp_Spec;
Local_Expected_Specs : Internal_User_Defined_Function_Subp_Spec_Array_Access;
Var_Expr_0 : Internal_Entity_Expr;
Var_Expr_2 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Sym : Symbol_Type;
Is_Equal : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Array_Lit : Internal_Entity_Base_Type_Decl_Array_Access;
Cast_Expr : Internal_Entity_Type_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
New_Struct : Internal_User_Defined_Function_Subp_Spec := No_User_Defined_Function_Subp_Spec;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Array_Lit_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Cast_Expr_1 : Internal_Entity_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
New_Struct_1 : Internal_User_Defined_Function_Subp_Spec := No_User_Defined_Function_Subp_Spec;
Sym_1 : Symbol_Type;
Is_Equal_1 : Boolean;
If_Result_1 : Internal_User_Defined_Function_Subp_Spec := No_User_Defined_Function_Subp_Spec;
Array_Lit_2 : Internal_User_Defined_Function_Subp_Spec_Array_Access;
Array_Lit_3 : Internal_User_Defined_Function_Subp_Spec_Array_Access;
Concat_Result : Internal_User_Defined_Function_Subp_Spec_Array_Access;
Fld_4 : Internal_Entity_Expr;
Cast_Expr_2 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_5 : Internal_Entity_Array_Access;
Cast_Expr_3 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Cast_Expr_4 : Internal_Entity;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Fld_6 : Internal_Entity_Base_Subp_Spec;
Fld_7 : Boolean;
Quantifier_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Map_Result : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
Result_Var_1 : Internal_Entity_Basic_Decl_Array_Access;
Let_Result : Internal_Entity_Basic_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_817 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (New_Struct);
                     Dec_Ref (Local_Expected_Spec);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Array_Lit_2);
                     Dec_Ref (Array_Lit_3);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Local_Expected_Specs);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_817;
            procedure Finalizer_Scope_2646 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2646;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5299 '<Let at nodes.lkt:9514:9>' Let_Result_1 ada/nodes.lkt:9514
--# scope-start
--# expr-start 5279 '<New UserDefinedFunctionSubpSpec at nodes.lkt:9515:13>' New_Struct ada/nodes.lkt:9515
--# expr-start 5278 '<ArrayLiteral at nodes.lkt:9516:35>' Array_Lit ada/nodes.lkt:9516
--# expr-start 5277 '<If at nodes.lkt:9517:21>' If_Result ada/nodes.lkt:9517
--# expr-start 5274 '<Eq at nodes.lkt:9517:24>' Is_Equal ada/nodes.lkt:9517
--# expr-start 5273 '<Symbol String_Literal at nodes.lkt:9517:34>' Sym ada/nodes.lkt:9517
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String_Literal); 
--# expr-done 5273
Is_Equal := Aspect = Sym; 
--# expr-done 5274
if Is_Equal then
   --# expr-start 5275 '<FieldAccess for std_wide_wide_string_type at nodes.lkt:9518:26>' Fld ada/nodes.lkt:9518
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_wide_wide_string_type
Fld := Libadalang.Implementation.Ada_Node_P_Std_Wide_Wide_String_Type (Node => Self);
--# end
--# expr-done 5275
   If_Result := Fld;
else
   --# expr-start 5276 '<FieldAccess for std_string_type at nodes.lkt:9519:26>' Fld_1 ada/nodes.lkt:9519
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 5276
   If_Result := Fld_1;
end if;
--# expr-done 5277
Array_Lit := Create_Internal_Entity_Base_Type_Decl_Array (Internal_Internal_Entity_Base_Type_Decl_Array'(1 => If_Result)); 
--# expr-done 5278
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Inc_Ref (Array_Lit);
New_Struct := (Subp_Params_Types => Array_Lit, Subp_Return_Type => Cast_Result); 
--# expr-done 5279
Local_Expected_Spec := New_Struct; Inc_Ref (Local_Expected_Spec);
--# bind expected_spec Local_Expected_Spec
--# expr-start 5298 '<Let at nodes.lkt:9526:9>' Let_Result ada/nodes.lkt:9526
--# scope-start
--# expr-start 5287 '<ArrayLiteral at nodes.lkt:9527:13>' Array_Lit_2 ada/nodes.lkt:9527
--# expr-start 5286 '<If at nodes.lkt:9528:17>' If_Result_1 ada/nodes.lkt:9528
--# expr-start 5281 '<Eq at nodes.lkt:9528:20>' Is_Equal_1 ada/nodes.lkt:9528
--# expr-start 5280 '<Symbol Real_Literal at nodes.lkt:9528:30>' Sym_1 ada/nodes.lkt:9528
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Real_Literal); 
--# expr-done 5280
Is_Equal_1 := Aspect = Sym_1; 
--# expr-done 5281
if Is_Equal_1 then
   --# expr-start 5285 '<New UserDefinedFunctionSubpSpec at nodes.lkt:9530:21>' New_Struct_1 ada/nodes.lkt:9530
--# expr-start 5284 '<ArrayLiteral at nodes.lkt:9531:43>' Array_Lit_1 ada/nodes.lkt:9531
--# expr-start 5282 '<FieldAccess for std_string_type at nodes.lkt:9532:29>' Fld_2 ada/nodes.lkt:9532
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_2 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 5282
--# expr-start 5283 '<FieldAccess for std_string_type at nodes.lkt:9532:53>' Fld_3 ada/nodes.lkt:9532
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 5283
Array_Lit_1 := Create_Internal_Entity_Base_Type_Decl_Array (Internal_Internal_Entity_Base_Type_Decl_Array'(1 => Fld_2, 2 => Fld_3)); 
--# expr-done 5284
Cast_Expr_1 := Ent; 
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Inc_Ref (Array_Lit_1);
New_Struct_1 := (Subp_Params_Types => Array_Lit_1, Subp_Return_Type => Cast_Result_1); 
--# expr-done 5285
   If_Result_1 := New_Struct_1;
else
   If_Result_1 := No_User_Defined_Function_Subp_Spec;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 5286
Array_Lit_2 := Create_Internal_User_Defined_Function_Subp_Spec_Array (Internal_Internal_User_Defined_Function_Subp_Spec_Array'(1 => If_Result_1)); 
--# expr-done 5287
--# expr-start 5288 '<ArrayLiteral at nodes.lkt:9538:15>' Array_Lit_3 ada/nodes.lkt:9538
Array_Lit_3 := Create_Internal_User_Defined_Function_Subp_Spec_Array (Internal_Internal_User_Defined_Function_Subp_Spec_Array'(1 => Local_Expected_Spec)); 
--# expr-done 5288
Concat_Result := Concat (Array_Lit_2, Array_Lit_3); 
Local_Expected_Specs := Concat_Result; Inc_Ref (Local_Expected_Specs);
--# bind expected_specs Local_Expected_Specs
--# expr-start 5289 '<FieldAccess for get_aspect_spec_expr at nodes.lkt:9540:9>' Fld_4 ada/nodes.lkt:9540
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.get_aspect_spec_expr
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect_Spec_Expr (Node => Ent.Node, Name => Aspect, E_Info => Ent.Info);
--# end
--# expr-done 5289
Var_Expr_0 := Fld_4;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind a Var_Expr_0
--# expr-start 5297 '<Map at nodes.lkt:9542:13>' Map_Result ada/nodes.lkt:9542
   --# expr-start 5291 '<FieldAccess for all_env_elements_internal at nodes.lkt:9542:13>' Fld_5 ada/nodes.lkt:9542
--# expr-start 5290 '<Cast to Name at nodes.lkt:9542:13>' Cast_Result_2 ada/nodes.lkt:9542
Cast_Expr_2 := Var_Expr_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5290
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_env_elements_internal
Fld_5 := Libadalang.Implementation.Name_P_All_Env_Elements_Internal (Node => Cast_Result_2.Node, Seq => False, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 5291
      declare
         Map_Result_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_5;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
--# expr-start 5293 '<FieldAccess for subp_spec_or_null at nodes.lkt:9545:17>' Fld_6 ada/nodes.lkt:9545
--# expr-start 5292 '<Cast to BasicDecl at nodes.lkt:9545:17>' Cast_Result_4 ada/nodes.lkt:9545
Cast_Expr_4 := Item_1; 
   if Cast_Expr_4.Node = null
      or else Cast_Expr_4.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5292
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Cast_Result_4.Node, E_Info => Cast_Result_4.Info);
--# end
--# expr-done 5293
Var_Expr_2 := Fld_6;
if Var_Expr_2 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_2
--# expr-start 5295 '<AnyQuantifier at nodes.lkt:9547:21>' Quantifier_Result ada/nodes.lkt:9547
      Quantifier_Result := False;
      declare
         Collection : constant Internal_User_Defined_Function_Subp_Spec_Array_Access := Local_Expected_Specs;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind es Item_3
      --# expr-start 5294 '<FieldAccess for match_expected_user_defined_function at nodes.lkt:9548:33>' Fld_7 ada/nodes.lkt:9548
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.match_expected_user_defined_function
Fld_7 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Expected_User_Defined_Function (Node => Var_Expr_2.Node, Fn => Item_3, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 5294
      Quantifier_Result := Fld_7;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 5295
Scope_Result := Quantifier_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         if Result_Var then
      --# expr-start 5296 '<Cast to BasicDecl at nodes.lkt:9543:24>' Cast_Result_3 ada/nodes.lkt:9543
Cast_Expr_3 := Item_1; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_3 := No_Entity_Basic_Decl;
   end if;
--# expr-done 5296
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Cast_Result_3;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 5297
Scope_Result_1 := Map_Result;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2646;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Let_Result := Result_Var_1; Inc_Ref (Let_Result);
--# end
--# expr-done 5298
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 5299
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_817;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_817;
                     Finalizer_Scope_2646;
            raise;
      end;
   return Property_Result;
end Type_Decl_P_User_Defined_Literal_Fns;
--# end
--# property-start TypeDecl._env_mappings_29 ada/nodes.lkt:9556
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_29
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1693 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Type_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1693 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1693;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5302 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 5300 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 5300
--# expr-start 5301 '<FieldAccess for name_symbol at nodes.lkt:9556:23>' Fld ada/nodes.lkt:9556
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 5301
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 5302
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1693;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1693;
            raise;
      end;
   return Property_Result;
end Env_Mappings_29;
--# end
--# property-start TypeDecl._env_mappings_30 ada/nodes.lkt:9557
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_30
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1694 with Inline_Always;
      As_Entity : Internal_Entity_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Decl;
Fld : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1694 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1694;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5304 '<FieldAccess for predefined_operators at nodes.lkt:9557:20>' Fld ada/nodes.lkt:9557
--# expr-start 5303 '<as_entity at nodes.lkt:9557:20>' If_Result ada/nodes.lkt:9557
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 5303
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDecl.predefined_operators
Fld := Libadalang.Implementation.Type_Decl_P_Predefined_Operators (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 5304
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1694;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1694;
            raise;
      end;
   return Property_Result;
end Env_Mappings_30;
--# end
--# property-start TypeDecl._env_trans_parent_31 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_31
  (Node : Bare_Type_Decl
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_31;
--# end
--# property-start TypeDecl._env_mappings_32 ada/nodes.lkt:9568
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_32
  (Node : Bare_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
     Ent : Internal_Entity_Type_Decl :=
       Internal_Entity_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1696 with Inline_Always;
      Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1696 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1696;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5305 '<FieldAccess for synthetic_object_decl_env_assoc at nodes.lkt:9568:20>' Fld ada/nodes.lkt:9568
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.synthetic_object_decl_env_assoc
Fld := Libadalang.Implementation.Base_Type_Decl_F_Synthetic_Object_Decl_Env_Assoc (Node => Ent.Node);
--# end
--# expr-done 5305
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1696;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1696;
            raise;
      end;
   return Property_Result;
end Env_Mappings_32;
--# end
--# property-start TypeDecl._ref_env_nodes_33 ada/nodes.lkt:9575
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_33
  (Node : Bare_Type_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1697 with Inline_Always;
      Cast_Expr : Bare_Type_Decl;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1697 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1697;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5307 '<ArrayLiteral at nodes.lkt:9575:13>' Array_Lit ada/nodes.lkt:9575
--# expr-start 5306 '<Cast to AdaNode at nodes.lkt:9575:14>' Cast_Result ada/nodes.lkt:9575
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 5306
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 5307
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1697;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1697;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_33;
--# end
--# property-start TypeDecl._env_dest_34 ada/nodes.lkt:9578
pragma Warnings (Off, "is not referenced");
 function Env_Dest_34
  (Node : Bare_Type_Decl
  )
   return Lexical_Env
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1698 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1698 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1698;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5308 '<FieldAccess for node_env at nodes.lkt:9578:22>' Fld ada/nodes.lkt:9578
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Self);
--# expr-done 5308
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1698;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1698;
            raise;
      end;
   return Property_Result;
end Env_Dest_34;
--# end
--# property-start TypeDecl._ref_cond_35 ada/nodes.lkt:9579
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_35
  (Node : Bare_Type_Decl
  )
   return Boolean
is
   Self : Bare_Type_Decl  := Bare_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Type_Def;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5310 '<IsA DerivedTypeDef, InterfaceTypeDef at nodes.lkt:9579:18>' Is_A ada/nodes.lkt:9579
--# expr-start 5309 '<FieldAccess for type_def at nodes.lkt:9579:18>' Fld ada/nodes.lkt:9579
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Type_Decl_F_Type_Def;
--# expr-done 5309
Is_A := Fld /= null 
and then Fld.Kind in Ada_Derived_Type_Def_Range | Ada_Interface_Type_Def_Range; 
--# expr-done 5310
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_35;
--# end
function Type_Decl_P_Refined_Parent_Primitives_Env
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Type_Decl
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Lexical_Env :=
         Type_Decl_P_Refined_Parent_Primitives_Env (E.Node, E_Info);
   begin
         return Result;
   end;
end;
   --
   --  Primitives for Bare_Anonymous_Type_Decl
   --
      procedure Initialize_Fields_For_Anonymous_Type_Decl
        (Self : Bare_Anonymous_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Type_Decl_F_Type_Def : Bare_Type_Def
        ) is
      begin
            Initialize_Fields_For_Type_Decl
              (Self, Base_Type_Decl_F_Name, Type_Decl_F_Discriminants, Type_Decl_F_Type_Def);
      end Initialize_Fields_For_Anonymous_Type_Decl;
--# property-start AnonymousTypeDecl.access_def_matches ada/nodes.lkt:9600
pragma Warnings (Off, "is not referenced");
 function Anonymous_Type_Decl_P_Access_Def_Matches
  (Node : Bare_Anonymous_Type_Decl
      ; Other : Internal_Entity_Base_Type_Decl
      ; For_Assignment : Boolean
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Anonymous_Type_Decl  := Bare_Anonymous_Type_Decl (Node);
     Ent : Internal_Entity_Anonymous_Type_Decl :=
       Internal_Entity_Anonymous_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind other Other
   --# bind for_assignment For_Assignment
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Self_Subp_Access : Internal_Entity_Access_To_Subp_Def;
Local_Other_Subp_Access : Internal_Entity_Access_To_Subp_Def;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Local_Exp : Internal_Entity_Base_Type_Decl;
Local_Act : Internal_Entity_Base_Type_Decl;
Var_Expr_148 : Internal_Entity_Access_Def;
Fld : Internal_Entity_Type_Def;
Cast_Result : Internal_Entity_Access_To_Subp_Def;
Fld_1 : Internal_Entity_Access_Def;
Cast_Result_1 : Internal_Entity_Access_To_Subp_Def;
Fld_2 : Internal_Entity_Subp_Spec;
Fld_3 : Internal_Entity_Subp_Spec;
Cast_Result_2 : Internal_Entity_Base_Subp_Spec;
Fld_4 : Boolean;
Fld_5 : Internal_Entity_Type_Def;
Cast_Result_3 : Internal_Entity_Access_Def;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Internal_Entity_Base_Type_Decl;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Boolean;
Fld_11 : Boolean;
If_Result : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Is_Null : Boolean;
Is_Null_1 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Is_Null_2 : Boolean;
Not_Val : Boolean;
Is_Null_3 : Boolean;
Not_Val_1 : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Boolean;
Let_Result_2 : Boolean;
Let_Result_3 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5340 '<Let at nodes.lkt:9604:9>' Let_Result_3 ada/nodes.lkt:9604
--# scope-start
--# expr-start 5312 '<Cast to AccessToSubpDef at nodes.lkt:9604:32>' Cast_Result ada/nodes.lkt:9604
--# expr-start 5311 '<FieldAccess for type_def at nodes.lkt:9604:32>' Fld ada/nodes.lkt:9604
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5311
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Access_To_Subp_Def_Range
   then
      Cast_Result := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Access_To_Subp_Def;
   end if;
--# expr-done 5312
Local_Self_Subp_Access := Cast_Result; 
--# bind self_subp_access Local_Self_Subp_Access
--# expr-start 5339 '<Let at nodes.lkt:9605:9>' Let_Result_2 ada/nodes.lkt:9605
--# scope-start
--# expr-start 5314 '<Cast to AccessToSubpDef at nodes.lkt:9605:33>' Cast_Result_1 ada/nodes.lkt:9605
--# expr-start 5313 '<FieldAccess for access_def at nodes.lkt:9605:33>' Fld_1 ada/nodes.lkt:9605
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Other.Node, Origin => Origin, E_Info => Other.Info);
--# end
--# expr-done 5313
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Access_To_Subp_Def_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result_1 := No_Entity_Access_To_Subp_Def;
   end if;
--# expr-done 5314
Local_Other_Subp_Access := Cast_Result_1; 
--# bind other_subp_access Local_Other_Subp_Access
--# expr-start 5338 '<If at nodes.lkt:9609:9>' If_Result_4 ada/nodes.lkt:9609
--# expr-start 5319 '<BooleanBinaryOp And at nodes.lkt:9609:12>' If_Result_3 ada/nodes.lkt:9609
--# expr-start 5316 '<Not at nodes.lkt:9609:12>' Not_Val ada/nodes.lkt:9609
--# expr-start 5315 '<IsNull at nodes.lkt:9609:16>' Is_Null_2 ada/nodes.lkt:9609
Is_Null_2 := Local_Self_Subp_Access.Node = null; 
--# expr-done 5315
Not_Val := not (Is_Null_2); 
--# expr-done 5316
if Not_Val then
   --# expr-start 5318 '<Not at nodes.lkt:9609:45>' Not_Val_1 ada/nodes.lkt:9609
--# expr-start 5317 '<IsNull at nodes.lkt:9609:49>' Is_Null_3 ada/nodes.lkt:9609
Is_Null_3 := Local_Other_Subp_Access.Node = null; 
--# expr-done 5317
Not_Val_1 := not (Is_Null_3); 
--# expr-done 5318
   If_Result_3 := Not_Val_1;
else
   If_Result_3 := False;
end if;
--# expr-done 5319
if If_Result_3 then
   --# expr-start 5322 '<FieldAccess for match_signature at nodes.lkt:9611:13>' Fld_4 ada/nodes.lkt:9611
--# expr-start 5320 '<FieldAccess for subp_spec at nodes.lkt:9611:13>' Fld_2 ada/nodes.lkt:9611
      if Local_Other_Subp_Access.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Subp_Spec (Node => Local_Other_Subp_Access.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Local_Other_Subp_Access.Info);
--# expr-done 5320
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5321 '<FieldAccess for subp_spec at nodes.lkt:9612:17>' Fld_3 ada/nodes.lkt:9612
      if Local_Self_Subp_Access.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Subp_Spec (Node => Local_Self_Subp_Access.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Local_Self_Subp_Access.Info);
--# expr-done 5321
      Cast_Result_2 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
--# property-call-start BaseSubpSpec.match_signature
Fld_4 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Fld_2.Node, Other => Cast_Result_2, Match_Name => False, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 5322
   If_Result_4 := Fld_4;
else
   --# expr-start 5337 '<If at nodes.lkt:9609:9>' If_Result_2 ada/nodes.lkt:9609
--# expr-start 5325 '<BooleanBinaryOp And at nodes.lkt:9615:14>' If_Result_1 ada/nodes.lkt:9615
--# expr-start 5323 '<IsNull at nodes.lkt:9615:14>' Is_Null ada/nodes.lkt:9615
Is_Null := Local_Self_Subp_Access.Node = null; 
--# expr-done 5323
if Is_Null then
   --# expr-start 5324 '<IsNull at nodes.lkt:9615:43>' Is_Null_1 ada/nodes.lkt:9615
Is_Null_1 := Local_Other_Subp_Access.Node = null; 
--# expr-done 5324
   If_Result_1 := Is_Null_1;
else
   If_Result_1 := False;
end if;
--# expr-done 5325
if If_Result_1 then
--# expr-start 5327 '<Cast to AccessDef at nodes.lkt:9617:13>' Cast_Result_3 ada/nodes.lkt:9617
--# expr-start 5326 '<FieldAccess for type_def at nodes.lkt:9617:13>' Fld_5 ada/nodes.lkt:9617
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Type_Def (Node => Ent.Node.Type_Decl_F_Type_Def, Info => Ent.Info);
--# expr-done 5326
   if Fld_5.Node = null
      or else Fld_5.Node.Kind in Ada_Access_Def
   then
      Cast_Result_3 := Create_Internal_Entity_Access_Def
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   else
         Cast_Result_3 := No_Entity_Access_Def;
   end if;
--# expr-done 5327
Var_Expr_148 := Cast_Result_3;
if Var_Expr_148 /= No_Entity_Access_Def then
   --# scope-start
--# expr-start 5328 '<FieldAccess for accessed_type at nodes.lkt:9617:13>' Fld_6 ada/nodes.lkt:9617
      if Var_Expr_148.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.accessed_type'
Fld_6 := Libadalang.Implementation.Dispatcher_Type_Def_P_Accessed_Type (Node => Var_Expr_148.Node, Origin => Origin, E_Info => Var_Expr_148.Info);
--# end
--# expr-done 5328
Var_Expr_0 := Fld_6;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind ast Var_Expr_0
--# expr-start 5329 '<FieldAccess for accessed_type at nodes.lkt:9619:17>' Fld_7 ada/nodes.lkt:9619
      if Other.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Other.Node, Origin => Origin, E_Info => Other.Info);
--# end
--# expr-done 5329
Var_Expr_1 := Fld_7;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind oat Var_Expr_1
--# expr-start 5336 '<Let at nodes.lkt:9624:25>' Let_Result_1 ada/nodes.lkt:9624
--# scope-start
--# expr-start 5330 '<FieldAccess for specific_type at nodes.lkt:9624:35>' Fld_8 ada/nodes.lkt:9624
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_8 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 5330
Local_Exp := Fld_8; 
--# bind exp Local_Exp
--# expr-start 5335 '<Let at nodes.lkt:9625:25>' Let_Result ada/nodes.lkt:9625
--# scope-start
--# expr-start 5331 '<FieldAccess for specific_type at nodes.lkt:9625:35>' Fld_9 ada/nodes.lkt:9625
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.specific_type
Fld_9 := Libadalang.Implementation.Base_Type_Decl_P_Specific_Type (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 5331
Local_Act := Fld_9; 
--# bind act Local_Act
--# expr-start 5334 '<If at nodes.lkt:9627:25>' If_Result ada/nodes.lkt:9627
if For_Assignment then
   --# expr-start 5332 '<FieldAccess for matching_assign_type at nodes.lkt:9632:29>' Fld_10 ada/nodes.lkt:9632
      if Local_Act.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_assign_type
Fld_10 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Assign_Type (Node => Local_Act.Node, Expected_Type => Var_Expr_0, Origin => Origin, E_Info => Local_Act.Info);
--# end
--# expr-done 5332
   If_Result := Fld_10;
else
   --# expr-start 5333 '<FieldAccess for matching_type at nodes.lkt:9634:30>' Fld_11 ada/nodes.lkt:9634
      if Local_Act.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_11 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Local_Act.Node, Expected_Type => Local_Exp, Origin => Origin, E_Info => Local_Act.Info);
--# end
--# expr-done 5333
   If_Result := Fld_11;
end if;
--# expr-done 5334
Let_Result := If_Result; 
--# end
--# expr-done 5335
Let_Result_1 := Let_Result; 
--# end
--# expr-done 5336
Scope_Result := Let_Result_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_2 := Result_Var_2;
else
   If_Result_2 := False;
end if;
--# expr-done 5337
   If_Result_4 := If_Result_2;
end if;
--# expr-done 5338
Let_Result_2 := If_Result_4; 
--# end
--# expr-done 5339
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 5340
         Property_Result := Let_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Anonymous_Type_Decl_P_Access_Def_Matches;
--# end
--# property-start AnonymousTypeDecl.xref_entry_point ada/nodes.lkt:9641
pragma Warnings (Off, "is not referenced");
 function Anonymous_Type_Decl_P_Xref_Entry_Point
  (Node : Bare_Anonymous_Type_Decl
  )
   return Boolean
is
   Self : Bare_Anonymous_Type_Decl  := Bare_Anonymous_Type_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Anonymous_Type_Decl_P_Xref_Entry_Point;
--# end
   --
   --  Primitives for Bare_Synth_Anonymous_Type_Decl
   --
      procedure Initialize_Fields_For_Synth_Anonymous_Type_Decl
        (Self : Bare_Synth_Anonymous_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Type_Decl_F_Type_Def : Bare_Type_Def
        ) is
      begin
            Initialize_Fields_For_Anonymous_Type_Decl
              (Self, Base_Type_Decl_F_Name, Type_Decl_F_Discriminants, Type_Decl_F_Type_Def);
      end Initialize_Fields_For_Synth_Anonymous_Type_Decl;
   --
   --  Primitives for Bare_Concrete_Type_Decl
   --
      procedure Initialize_Fields_For_Concrete_Type_Decl
        (Self : Bare_Concrete_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Type_Decl_F_Type_Def : Bare_Type_Def
         ; Concrete_Type_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Type_Decl
              (Self, Base_Type_Decl_F_Name, Type_Decl_F_Discriminants, Type_Decl_F_Type_Def);
            Self.Concrete_Type_Decl_F_Aspects := Concrete_Type_Decl_F_Aspects;
      end Initialize_Fields_For_Concrete_Type_Decl;
   --
   --  Primitives for Bare_Formal_Type_Decl
   --
      procedure Initialize_Fields_For_Formal_Type_Decl
        (Self : Bare_Formal_Type_Decl
         ; Base_Type_Decl_F_Name : Bare_Defining_Name
         ; Type_Decl_F_Discriminants : Bare_Discriminant_Part
         ; Type_Decl_F_Type_Def : Bare_Type_Def
         ; Formal_Type_Decl_F_Default_Type : Bare_Name
         ; Formal_Type_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Type_Decl
              (Self, Base_Type_Decl_F_Name, Type_Decl_F_Discriminants, Type_Decl_F_Type_Def);
            Self.Formal_Type_Decl_F_Default_Type := Formal_Type_Decl_F_Default_Type;
            Self.Formal_Type_Decl_F_Aspects := Formal_Type_Decl_F_Aspects;
      end Initialize_Fields_For_Formal_Type_Decl;
   function Formal_Type_Decl_F_Default_Type
     (Node : Bare_Formal_Type_Decl) return Bare_Name
   is
   begin
         return Node.Formal_Type_Decl_F_Default_Type;
   end;
--# property-start FormalTypeDecl.corresponding_actual_impl ada/nodes.lkt:9671
pragma Warnings (Off, "is not referenced");
 function Formal_Type_Decl_P_Corresponding_Actual_Impl
  (Node : Bare_Formal_Type_Decl
      ; Rb : Env_Rebindings
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Formal_Type_Decl  := Bare_Formal_Type_Decl (Node);
     Ent : Internal_Entity_Formal_Type_Decl :=
       Internal_Entity_Formal_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind rb Rb
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_820 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Defining_Name;
Fld_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_3 : Env_Rebindings;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Lexical_Env := Empty_Env;
Fld_6 : Bare_Ada_Node;
Fld_7 : Lexical_Env := Empty_Env;
Is_Equal : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Formal_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Is_Equal_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_820 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_820;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5354 '<If at nodes.lkt:9672:9>' If_Result_1 ada/nodes.lkt:9672
--# expr-start 5341 '<IsNull at nodes.lkt:9672:12>' Is_Equal_1 ada/nodes.lkt:9672
Is_Equal_1 := Rb = null; 
--# expr-done 5341
if Is_Equal_1 then
Cast_Expr := Ent; 
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   If_Result_1 := Cast_Result_1;
else
   --# expr-start 5353 '<If at nodes.lkt:9672:9>' If_Result ada/nodes.lkt:9672
--# expr-start 5345 '<Eq at nodes.lkt:9673:14>' Is_Equal ada/nodes.lkt:9673
--# expr-start 5342 '<FieldAccess for old_env at nodes.lkt:9673:14>' Fld_5 ada/nodes.lkt:9673
      if Rb = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Rb.Old_Env;
Inc_Ref (Fld_5);
--# expr-done 5342
--# expr-start 5344 '<FieldAccess for node_env at nodes.lkt:9673:28>' Fld_7 ada/nodes.lkt:9673
--# expr-start 5343 '<parent at nodes.lkt:9673:28>' Fld_6 ada/nodes.lkt:9673
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Parent; 
--# expr-done 5343
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Node_Env (Node => Fld_6);
--# expr-done 5344
Is_Equal := Equivalent (Fld_5, Fld_7); 
--# expr-done 5345
if Is_Equal then
   --# expr-start 5350 '<Cast to BaseTypeDecl at nodes.lkt:9675:13>' Cast_Result ada/nodes.lkt:9675
--# expr-start 5349 '<EnvGet at nodes.lkt:9675:13>' Env_Get_Result ada/nodes.lkt:9675
--# expr-start 5346 '<FieldAccess for new_env at nodes.lkt:9675:13>' Fld ada/nodes.lkt:9675
      if Rb = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Rb.New_Env;
Inc_Ref (Fld);
--# expr-done 5346
--# expr-start 5348 '<FieldAccess for name_symbol at nodes.lkt:9676:17>' Fld_2 ada/nodes.lkt:9676
--# expr-start 5347 '<FieldAccess for defining_name at nodes.lkt:9676:17>' Fld_1 ada/nodes.lkt:9676
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5347
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_1.Node);
--# end
--# expr-done 5348
Env_Get_Result := AST_Envs.Get_First (Self => Fld, Key => Thin (Fld_2), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 5349
   if Env_Get_Result.Node = null
      or else Env_Get_Result.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Env_Get_Result.Node,
         Info => Env_Get_Result.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 5350
   If_Result := Cast_Result;
else
   --# expr-start 5352 '<FieldAccess for corresponding_actual_impl at nodes.lkt:9681:14>' Fld_4 ada/nodes.lkt:9681
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5351 '<FieldAccess for get_parent at nodes.lkt:9681:45>' Fld_3 ada/nodes.lkt:9681
      if Rb = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Rb.Parent;
--# expr-done 5351
--# property-call-start FormalTypeDecl.corresponding_actual_impl
Fld_4 := Libadalang.Implementation.Formal_Type_Decl_P_Corresponding_Actual_Impl (Node => Ent.Node, Rb => Fld_3, E_Info => Ent.Info);
--# end
--# expr-done 5352
   If_Result := Fld_4;
end if;
--# expr-done 5353
   If_Result_1 := If_Result;
end if;
--# expr-done 5354
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_820;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_820;
            raise;
      end;
   return Property_Result;
end Formal_Type_Decl_P_Corresponding_Actual_Impl;
--# end
--# property-start FormalTypeDecl.get_actual ada/nodes.lkt:9685
pragma Warnings (Off, "is not referenced");
 function Formal_Type_Decl_P_Get_Actual
  (Node : Bare_Formal_Type_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Formal_Type_Decl  := Bare_Formal_Type_Decl (Node);
     Ent : Internal_Entity_Formal_Type_Decl :=
       Internal_Entity_Formal_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Info;
Fld_1 : Env_Rebindings;
Fld_2 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5357 '<FieldAccess for corresponding_actual_impl at nodes.lkt:9686:9>' Fld_2 ada/nodes.lkt:9686
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5356 '<FieldAccess for rebindings at nodes.lkt:9686:40>' Fld_1 ada/nodes.lkt:9686
--# expr-start 5355 '<FieldAccess for info at nodes.lkt:9686:40>' Fld ada/nodes.lkt:9686
Fld := Ent.Info;
--# expr-done 5355
Fld_1 := Fld.Rebindings;
--# expr-done 5356
--# property-call-start FormalTypeDecl.corresponding_actual_impl
Fld_2 := Libadalang.Implementation.Formal_Type_Decl_P_Corresponding_Actual_Impl (Node => Ent.Node, Rb => Fld_1, E_Info => Ent.Info);
--# end
--# expr-done 5357
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Formal_Type_Decl_P_Get_Actual;
--# end
--# property-start FormalTypeDecl.xref_equation ada/nodes.lkt:9689
pragma Warnings (Off, "is not referenced");
 function Formal_Type_Decl_P_Xref_Equation
  (Node : Bare_Formal_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Formal_Type_Decl  := Bare_Formal_Type_Decl (Node);
     Ent : Internal_Entity_Formal_Type_Decl :=
       Internal_Entity_Formal_Type_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_822 with Inline_Always;
            procedure Finalizer_Scope_2653 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Fld : Logic_Equation;
Fld_1 : Internal_Entity_Name;
Fld_2 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_822 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_822;
            procedure Finalizer_Scope_2653 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2653;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5361 '<LogicBinaryOp And at nodes.lkt:9690:9>' And_Pred ada/nodes.lkt:9690
--# expr-start 5358 '<Super at nodes.lkt:9690:9>' Fld ada/nodes.lkt:9690
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDecl.xref_equation
Fld := Libadalang.Implementation.Type_Decl_P_Xref_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 5358
--# expr-start 5359 '<FieldAccess for default_type at nodes.lkt:9691:14>' Fld_1 ada/nodes.lkt:9691
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Ent.Node.Formal_Type_Decl_F_Default_Type, Info => Ent.Info);
--# expr-done 5359
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind dt Var_Expr_0
--# expr-start 5360 '<FieldAccess for sub_equation at nodes.lkt:9691:43>' Fld_2 ada/nodes.lkt:9691
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_2 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 5360
Scope_Result := Fld_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2653;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:9691:74") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred := Create_And (Fld, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:9690:9") else null)); 
--# expr-done 5361
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_822;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_822;
                     Finalizer_Scope_2653;
            raise;
      end;
   return Property_Result;
end Formal_Type_Decl_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Basic_Subp_Decl
   --
      procedure Basic_Subp_Decl_Pre_Env_Actions
        (Self            : Bare_Basic_Subp_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_36 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_37 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:9792:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_38 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:9798:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_39 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_40 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_41 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_43 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_42 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_45 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_44 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Basic_Subp_Decl_Post_Env_Actions
        (Self : Bare_Basic_Subp_Decl; State : in out PLE_Node_State) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_46 (Node => 
Self);
      end;
      end;
--# property-start BasicSubpDecl.defining_names ada/nodes.lkt:9697
pragma Warnings (Off, "is not referenced");
 function Basic_Subp_Decl_P_Defining_Names
  (Node : Bare_Basic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
     Ent : Internal_Entity_Basic_Subp_Decl :=
       Internal_Entity_Basic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_823 with Inline_Always;
      Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_823 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_823;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5364 '<ArrayLiteral at nodes.lkt:9698:9>' Array_Lit ada/nodes.lkt:9698
--# expr-start 5363 '<FieldAccess for name at nodes.lkt:9698:10>' Fld_1 ada/nodes.lkt:9698
--# expr-start 5362 '<FieldAccess for subp_decl_spec at nodes.lkt:9698:10>' Fld ada/nodes.lkt:9698
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicSubpDecl.subp_decl_spec'
Fld := Libadalang.Implementation.Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5362
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 5363
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld_1)); 
--# expr-done 5364
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_823;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_823;
            raise;
      end;
   return Property_Result;
end Basic_Subp_Decl_P_Defining_Names;
--# end
--# property-start BasicSubpDecl.defining_env ada/nodes.lkt:9703
pragma Warnings (Off, "is not referenced");
 function Basic_Subp_Decl_P_Defining_Env
  (Node : Bare_Basic_Subp_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
     Ent : Internal_Entity_Basic_Subp_Decl :=
       Internal_Entity_Basic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_824 with Inline_Always;
      Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_824 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_824;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5366 '<FieldAccess for defining_env at nodes.lkt:9703:38>' Fld_1 ada/nodes.lkt:9703
--# expr-start 5365 '<FieldAccess for subp_decl_spec at nodes.lkt:9703:38>' Fld ada/nodes.lkt:9703
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicSubpDecl.subp_decl_spec'
Fld := Libadalang.Implementation.Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5365
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.defining_env
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Defining_Env (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 5366
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_824;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_824;
            raise;
      end;
   return Property_Result;
end Basic_Subp_Decl_P_Defining_Env;
--# end
--# property-start BasicSubpDecl.type_expression ada/nodes.lkt:9707
pragma Warnings (Off, "is not referenced");
 function Basic_Subp_Decl_P_Type_Expression
  (Node : Bare_Basic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
     Ent : Internal_Entity_Basic_Subp_Decl :=
       Internal_Entity_Basic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5368 '<FieldAccess for returns at nodes.lkt:9707:47>' Fld_1 ada/nodes.lkt:9707
--# expr-start 5367 '<FieldAccess for subp_decl_spec at nodes.lkt:9707:47>' Fld ada/nodes.lkt:9707
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicSubpDecl.subp_decl_spec'
Fld := Libadalang.Implementation.Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5367
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 5368
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Subp_Decl_P_Type_Expression;
--# end
--# property-start BasicSubpDecl.get_body_in_env ada/nodes.lkt:9710
pragma Warnings (Off, "is not referenced");
 function Basic_Subp_Decl_P_Get_Body_In_Env
  (Node : Bare_Basic_Subp_Decl
      ; Env : Lexical_Env
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Body_Node
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
     Ent : Internal_Entity_Basic_Subp_Decl :=
       Internal_Entity_Basic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Body_Node;
            procedure Finalizer_Scope_826 with Inline_Always;
      Local_Elements : Internal_Entity_Array_Access;
Local_Self_Spec : Internal_Entity_Base_Subp_Spec;
Local_Precise : Internal_Entity_Body_Node;
Local_Result : Internal_Entity_Body_Node;
Var_Expr_149 : Internal_Entity_Body_Node;
Var_Expr_150 : Internal_Entity_Body_Node;
Fld : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Fld_1 : Internal_Entity_Base_Subp_Spec;
Fld_2 : Bare_Base_Subp_Spec;
As_Entity : Internal_Entity_Base_Subp_Spec;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Subp_Spec;
Fld_3 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_4 : Bare_Ada_Node;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Cast_Result : Internal_Entity_Body_Node;
Fld_5 : Internal_Entity_Base_Formal_Param_Holder;
Cast_Expr : Internal_Entity_Base_Subp_Spec;
Cast_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Fld_6 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Find_Result : Internal_Entity;
Cast_Result_2 : Internal_Entity_Body_Node;
Dyn_Var_Bind_Result : Internal_Entity_Body_Node;
Is_A : Boolean;
Find_Result_1 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Body_Node;
Is_Null_2 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Internal_Entity_Body_Node;
Fld_7 : Bare_Body_Node;
As_Entity_2 : Internal_Entity_Body_Node;
Is_Null_3 : Boolean;
If_Result_4 : Internal_Entity_Body_Node;
Fld_8 : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Cast_Result_4 : Internal_Entity_Body_Node;
Let_Result : Internal_Entity_Body_Node;
Let_Result_1 : Internal_Entity_Body_Node;
Let_Result_2 : Internal_Entity_Body_Node;
Let_Result_3 : Internal_Entity_Body_Node;
            procedure Finalizer_Scope_826 is
            begin
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Local_Elements);
            end Finalizer_Scope_826;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5396 '<Let at nodes.lkt:9711:9>' Let_Result_3 ada/nodes.lkt:9711
--# scope-start
--# expr-start 5370 '<EnvGet at nodes.lkt:9712:13>' Env_Get_Result ada/nodes.lkt:9712
--# expr-start 5369 '<FieldAccess for name_symbol at nodes.lkt:9713:17>' Fld ada/nodes.lkt:9713
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 5369
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Env, Key => Thin (Fld), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 5370
Local_Elements := Env_Get_Result; Inc_Ref (Local_Elements);
--# bind elements Local_Elements
--# expr-start 5395 '<Let at nodes.lkt:9717:9>' Let_Result_2 ada/nodes.lkt:9717
--# scope-start
--# expr-start 5373 '<as_bare_entity at nodes.lkt:9717:25>' If_Result ada/nodes.lkt:9717
--# expr-start 5372 '<FieldAccess for node at nodes.lkt:9717:25>' Fld_2 ada/nodes.lkt:9717
--# expr-start 5371 '<FieldAccess for subp_decl_spec at nodes.lkt:9717:25>' Fld_1 ada/nodes.lkt:9717
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicSubpDecl.subp_decl_spec'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5371
Fld_2 := Fld_1.Node;
--# expr-done 5372
Is_Null := Fld_2 = null; 
if Is_Null then
   If_Result := No_Entity_Base_Subp_Spec;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_2); 
   If_Result := As_Entity;
end if;
--# expr-done 5373
Local_Self_Spec := If_Result; 
--# bind self_spec Local_Self_Spec
--# expr-start 5394 '<Let at nodes.lkt:9718:9>' Let_Result_1 ada/nodes.lkt:9718
--# scope-start
--# expr-start 5382 '<bind at nodes.lkt:9719:13>' Dyn_Var_Bind_Result ada/nodes.lkt:9719
--# expr-start 5374 '<FieldAccess for origin_node at nodes.lkt:9719:27>' Fld_3 ada/nodes.lkt:9719
      if Local_Self_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_3 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Local_Self_Spec.Node);
--# end
--# expr-done 5374
Bound_Origin := Fld_3; 
--# expr-start 5381 '<Cast to Body at nodes.lkt:9721:13>' Cast_Result_2 ada/nodes.lkt:9721
--# expr-start 5380 '<Find at nodes.lkt:9721:13>' Find_Result ada/nodes.lkt:9721
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Elements;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind ent Item_0
--# expr-start 5377 '<Cast to Body at nodes.lkt:9725:17>' Cast_Result ada/nodes.lkt:9725
--# expr-start 5376 '<as_bare_entity at nodes.lkt:9725:17>' If_Result_1 ada/nodes.lkt:9725
--# expr-start 5375 '<FieldAccess for node at nodes.lkt:9725:17>' Fld_4 ada/nodes.lkt:9725
Fld_4 := Item_0.Node;
--# expr-done 5375
Is_Null_1 := Fld_4 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Fld_4); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 5376
   if If_Result_1.Node = null
      or else If_Result_1.Node.Kind in Ada_Body_Node
   then
      Cast_Result := Create_Internal_Entity_Body_Node
        (Node => If_Result_1.Node,
         Info => If_Result_1.Info);
   else
         Cast_Result := No_Entity_Body_Node;
   end if;
--# expr-done 5377
Var_Expr_149 := Cast_Result;
if Var_Expr_149 /= No_Entity_Body_Node then
   --# scope-start
--# expr-start 5379 '<FieldAccess for match_other at nodes.lkt:9725:17>' Fld_6 ada/nodes.lkt:9725
--# expr-start 5378 '<FieldAccess for formal_param_holder_or_null at nodes.lkt:9725:17>' Fld_5 ada/nodes.lkt:9725
      if Var_Expr_149.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.formal_param_holder_or_null
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Formal_Param_Holder_Or_Null (Node => Var_Expr_149.Node, E_Info => Var_Expr_149.Info);
--# end
--# expr-done 5378
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Local_Self_Spec; 
      Cast_Result_1 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# property-call-start '[dispatcher]BaseFormalParamHolder.match_other'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Match_Other (Node => Fld_5.Node, Other => Cast_Result_1, Match_Names => True, Origin => Bound_Origin, E_Info => Fld_5.Info);
--# end
--# expr-done 5379
Scope_Result := Fld_6;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
--# expr-done 5380
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Body_Node
   then
      Cast_Result_2 := Create_Internal_Entity_Body_Node
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_2 := No_Entity_Body_Node;
   end if;
--# expr-done 5381
Dyn_Var_Bind_Result := Cast_Result_2; 
--# expr-done 5382
Local_Precise := Dyn_Var_Bind_Result; 
--# bind precise Local_Precise
--# expr-start 5393 '<Let at nodes.lkt:9730:9>' Let_Result ada/nodes.lkt:9730
--# scope-start
--# expr-start 5388 '<If at nodes.lkt:9731:13>' If_Result_3 ada/nodes.lkt:9731
--# expr-start 5384 '<BooleanBinaryOp And at nodes.lkt:9731:16>' If_Result_2 ada/nodes.lkt:9731
--# expr-start 5383 '<IsNull at nodes.lkt:9731:16>' Is_Null_2 ada/nodes.lkt:9731
Is_Null_2 := Local_Precise.Node = null; 
--# expr-done 5383
if Is_Null_2 then
   If_Result_2 := Imprecise_Fallback;
else
   If_Result_2 := False;
end if;
--# expr-done 5384
if If_Result_2 then
   --# expr-start 5387 '<Cast to Body at nodes.lkt:9732:18>' Cast_Result_3 ada/nodes.lkt:9732
--# expr-start 5386 '<Find at nodes.lkt:9732:18>' Find_Result_1 ada/nodes.lkt:9732
      Find_Result_1 := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Elements;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
      --# expr-start 5385 '<IsA Body at nodes.lkt:9732:39>' Is_A ada/nodes.lkt:9732
Is_A := Item_1.Node /= null 
and then Item_1.Node.Kind in Ada_Body_Node; 
--# expr-done 5385
      if Is_A then
         Find_Result_1 := Item_1; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 5386
   if Find_Result_1.Node = null
      or else Find_Result_1.Node.Kind in Ada_Body_Node
   then
      Cast_Result_3 := Create_Internal_Entity_Body_Node
        (Node => Find_Result_1.Node,
         Info => Find_Result_1.Info);
   else
         Cast_Result_3 := No_Entity_Body_Node;
   end if;
--# expr-done 5387
   If_Result_3 := Cast_Result_3;
else
   If_Result_3 := Local_Precise;
end if;
--# expr-done 5388
Local_Result := If_Result_3; 
--# bind result Local_Result
--# expr-start 5392 '<Cast to Body at nodes.lkt:9736:9>' Cast_Result_4 ada/nodes.lkt:9736
--# expr-start 5390 '<as_entity at nodes.lkt:9736:9>' If_Result_4 ada/nodes.lkt:9736
--# expr-start 5389 '<FieldAccess for node at nodes.lkt:9736:9>' Fld_7 ada/nodes.lkt:9736
Fld_7 := Local_Result.Node;
--# expr-done 5389
Is_Null_3 := Fld_7 = null; 
if Is_Null_3 then
   If_Result_4 := No_Entity_Body_Node;
else
As_Entity_2 := (Info => E_Info, Node => Fld_7); 
   If_Result_4 := As_Entity_2;
end if;
--# expr-done 5390
Var_Expr_150 := If_Result_4;
if Var_Expr_150 /= No_Entity_Body_Node then
   --# scope-start
--# expr-start 5391 '<FieldAccess for without_md at nodes.lkt:9736:9>' Fld_8 ada/nodes.lkt:9736
      if Var_Expr_150.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.without_md
Fld_8 := Libadalang.Implementation.Ada_Node_P_Without_Md (Node => Var_Expr_150.Node, E_Info => Var_Expr_150.Info);
--# end
--# expr-done 5391
Scope_Result_1 := Fld_8;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
   if Result_Var_1.Node = null
      or else Result_Var_1.Node.Kind in Ada_Body_Node
   then
      Cast_Result_4 := Create_Internal_Entity_Body_Node
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
   else
         Cast_Result_4 := No_Entity_Body_Node;
   end if;
--# expr-done 5392
Let_Result := Cast_Result_4; 
--# end
--# expr-done 5393
Let_Result_1 := Let_Result; 
--# end
--# expr-done 5394
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 5395
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 5396
         Property_Result := Let_Result_3;
   --# end
      Finalizer_Scope_826;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_826;
            raise;
      end;
   return Property_Result;
end Basic_Subp_Decl_P_Get_Body_In_Env;
--# end
--# property-start BasicSubpDecl.next_part_for_decl ada/nodes.lkt:9740
pragma Warnings (Off, "is not referenced");
 function Basic_Subp_Decl_P_Next_Part_For_Decl
  (Node : Bare_Basic_Subp_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
     Ent : Internal_Entity_Basic_Subp_Decl :=
       Internal_Entity_Basic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_827 with Inline_Always;
            procedure Finalizer_Scope_2659 with Inline_Always;
            procedure Finalizer_Scope_2661 with Inline_Always;
      Local_Decl_Scope : Bare_Declarative_Part;
Local_Parent_Decl : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Declarative_Part;
Local_Default_Next_Part : Internal_Entity_Basic_Decl;
Local_Other_Part : Internal_Entity;
Var_Expr_1 : Internal_Entity;
Var_Expr_2 : Internal_Entity_Body_Node;
Var_Expr : Internal_Entity_Body_Node;
Fld : Bare_Declarative_Part;
As_Entity : Internal_Entity_Declarative_Part;
Is_Null : Boolean;
If_Result : Internal_Entity_Declarative_Part;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Private_Part;
Cast_Result_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity;
Is_A : Boolean;
If_Result_1 : Internal_Entity;
Fld_5 : Lexical_Env := Empty_Env;
Fld_6 : Internal_Entity_Body_Node;
Scope_Result_1 : Internal_Entity_Body_Node;
Result_Var_1 : Internal_Entity_Body_Node;
Scope_Result_2 : Internal_Entity_Body_Node;
Fld_7 : Internal_Entity_Body_Node;
Fld_8 : Lexical_Env := Empty_Env;
Fld_9 : Internal_Entity_Body_Node;
Scope_Result_3 : Internal_Entity_Body_Node;
Result_Var_2 : Internal_Entity_Body_Node;
Result_Var_3 : Internal_Entity_Body_Node;
Let_Result : Internal_Entity_Body_Node;
Fld_10 : Lexical_Env := Empty_Env;
Fld_11 : Internal_Entity_Body_Node;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity_Body_Node;
Is_A_1 : Boolean;
If_Result_3 : Internal_Entity_Body_Node;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Is_Null_2 : Boolean;
Not_Val : Boolean;
If_Result_4 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Basic_Decl;
Let_Result_3 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_827 is
            begin
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_827;
            procedure Finalizer_Scope_2659 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2659;
            procedure Finalizer_Scope_2661 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_2661;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5423 '<Let at nodes.lkt:9741:9>' Let_Result_3 ada/nodes.lkt:9741
--# scope-start
--# expr-start 5397 '<FieldAccess for declarative_scope at nodes.lkt:9741:26>' Fld ada/nodes.lkt:9741
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 5397
Local_Decl_Scope := Fld; 
--# bind decl_scope Local_Decl_Scope
--# expr-start 5422 '<Let at nodes.lkt:9742:9>' Let_Result_2 ada/nodes.lkt:9742
--# scope-start
--# expr-start 5398 '<as_entity at nodes.lkt:9743:13>' If_Result ada/nodes.lkt:9743
Is_Null := Local_Decl_Scope = null; 
if Is_Null then
   If_Result := No_Entity_Declarative_Part;
else
As_Entity := (Info => E_Info, Node => Local_Decl_Scope); 
   If_Result := As_Entity;
end if;
--# expr-done 5398
Var_Expr_0 := If_Result;
if Var_Expr_0 /= No_Entity_Declarative_Part then
   --# scope-start
   --# bind ds Var_Expr_0
--# expr-start 5400 '<Cast to BasicDecl at nodes.lkt:9744:25>' Cast_Result ada/nodes.lkt:9744
--# expr-start 5399 '<FieldAccess for semantic_parent at nodes.lkt:9744:25>' Fld_1 ada/nodes.lkt:9744
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_1 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 5399
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 5400
Scope_Result := Cast_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
Local_Parent_Decl := Result_Var; 
--# bind parent_decl Local_Parent_Decl
--# expr-start 5421 '<Let at nodes.lkt:9746:9>' Let_Result_1 ada/nodes.lkt:9746
--# scope-start
--# expr-start 5401 '<Super at nodes.lkt:9746:33>' Fld_2 ada/nodes.lkt:9746
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.next_part_for_decl
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Next_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5401
Local_Default_Next_Part := Fld_2; 
--# bind default_next_part Local_Default_Next_Part
--# expr-start 5420 '<If at nodes.lkt:9750:9>' If_Result_4 ada/nodes.lkt:9750
--# expr-start 5403 '<Not at nodes.lkt:9750:12>' Not_Val ada/nodes.lkt:9750
--# expr-start 5402 '<IsNull at nodes.lkt:9750:16>' Is_Null_2 ada/nodes.lkt:9750
Is_Null_2 := Local_Default_Next_Part.Node = null; 
--# expr-done 5402
Not_Val := not (Is_Null_2); 
--# expr-done 5403
if Not_Val then
   If_Result_4 := Local_Default_Next_Part;
else
--# expr-start 5419 '<If at nodes.lkt:9750:9>' If_Result_3 ada/nodes.lkt:9750
--# expr-start 5404 '<IsA PrivatePart, PublicPart at nodes.lkt:9751:14>' Is_A_1 ada/nodes.lkt:9751
Is_A_1 := Local_Decl_Scope /= null 
and then Local_Decl_Scope.Kind in Ada_Private_Part_Range | Ada_Public_Part_Range; 
--# expr-done 5404
if Is_A_1 then
   --# expr-start 5414 '<Let at nodes.lkt:9753:13>' Let_Result ada/nodes.lkt:9753
--# scope-start
--# expr-start 5408 '<If at nodes.lkt:9754:17>' If_Result_1 ada/nodes.lkt:9754
--# expr-start 5405 '<IsA PrivatePart at nodes.lkt:9754:20>' Is_A ada/nodes.lkt:9754
Is_A := Local_Decl_Scope /= null 
and then Local_Decl_Scope.Kind in Ada_Private_Part_Range; 
--# expr-done 5405
if Is_A then
--# expr-start 5406 '<FieldAccess for next_part_for_decl at nodes.lkt:9755:22>' Fld_3 ada/nodes.lkt:9755
      if Local_Parent_Decl.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Local_Parent_Decl.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Local_Parent_Decl.Info);
--# end
--# expr-done 5406
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   If_Result_1 := Cast_Result_1;
else
--# expr-start 5407 '<FieldAccess for decl_private_part at nodes.lkt:9756:22>' Fld_4 ada/nodes.lkt:9756
      if Local_Parent_Decl.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.decl_private_part
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Decl_Private_Part (Node => Local_Parent_Decl.Node, E_Info => Local_Parent_Decl.Info);
--# end
--# expr-done 5407
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   If_Result_1 := Cast_Result_2;
end if;
--# expr-done 5408
Local_Other_Part := If_Result_1; 
--# bind other_part Local_Other_Part
Var_Expr_1 := Local_Other_Part;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind op Var_Expr_1
--# expr-start 5410 '<FieldAccess for get_body_in_env at nodes.lkt:9759:35>' Fld_6 ada/nodes.lkt:9759
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5409 '<FieldAccess for children_env at nodes.lkt:9759:56>' Fld_5 ada/nodes.lkt:9759
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Children_Env (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# expr-done 5409
--# property-call-start BasicSubpDecl.get_body_in_env
Fld_6 := Libadalang.Implementation.Basic_Subp_Decl_P_Get_Body_In_Env (Node => Ent.Node, Env => Fld_5, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5410
Scope_Result_1 := Fld_6;
   --# end
      Finalizer_Scope_2659;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Body_Node;
end if;
Var_Expr := Result_Var_1;
if Var_Expr /= No_Entity_Body_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_2 := Var_Expr;
   --# end
   Result_Var_3 := Scope_Result_2;
else
--# expr-start 5411 '<FieldAccess for body_part_for_decl at nodes.lkt:9760:17>' Fld_7 ada/nodes.lkt:9760
      if Local_Parent_Decl.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.body_part_for_decl
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Body_Part_For_Decl (Node => Local_Parent_Decl.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Local_Parent_Decl.Info);
--# end
--# expr-done 5411
Var_Expr_2 := Fld_7;
if Var_Expr_2 /= No_Entity_Body_Node then
   --# scope-start
   --# bind np Var_Expr_2
--# expr-start 5413 '<FieldAccess for get_body_in_env at nodes.lkt:9762:25>' Fld_9 ada/nodes.lkt:9762
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5412 '<FieldAccess for children_env at nodes.lkt:9762:46>' Fld_8 ada/nodes.lkt:9762
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Children_Env (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# expr-done 5412
--# property-call-start BasicSubpDecl.get_body_in_env
Fld_9 := Libadalang.Implementation.Basic_Subp_Decl_P_Get_Body_In_Env (Node => Ent.Node, Env => Fld_8, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5413
Scope_Result_3 := Fld_9;
   --# end
      Finalizer_Scope_2661;
   Result_Var_2 := Scope_Result_3;
else
   Result_Var_2 := No_Entity_Body_Node;
end if;
   Result_Var_3 := Result_Var_2;
end if;
Let_Result := Result_Var_3; 
--# end
--# expr-done 5414
   If_Result_3 := Let_Result;
else
   --# expr-start 5418 '<If at nodes.lkt:9750:9>' If_Result_2 ada/nodes.lkt:9750
--# expr-start 5415 '<IsNull at nodes.lkt:9767:14>' Is_Null_1 ada/nodes.lkt:9767
Is_Null_1 := Local_Decl_Scope = null; 
--# expr-done 5415
if Is_Null_1 then
   If_Result_2 := No_Entity_Body_Node;
else
   --# expr-start 5417 '<FieldAccess for get_body_in_env at nodes.lkt:9770:14>' Fld_11 ada/nodes.lkt:9770
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5416 '<FieldAccess for children_env at nodes.lkt:9770:35>' Fld_10 ada/nodes.lkt:9770
      if Local_Decl_Scope = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Children_Env (Node => Local_Decl_Scope);
--# expr-done 5416
--# property-call-start BasicSubpDecl.get_body_in_env
Fld_11 := Libadalang.Implementation.Basic_Subp_Decl_P_Get_Body_In_Env (Node => Ent.Node, Env => Fld_10, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5417
   If_Result_2 := Fld_11;
end if;
--# expr-done 5418
   If_Result_3 := If_Result_2;
end if;
--# expr-done 5419
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => If_Result_3.Node,
         Info => If_Result_3.Info);
   If_Result_4 := Cast_Result_3;
end if;
--# expr-done 5420
Let_Result_1 := If_Result_4; 
--# end
--# expr-done 5421
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 5422
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 5423
         Property_Result := Let_Result_3;
   --# end
      Finalizer_Scope_827;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_827;
                     Finalizer_Scope_2659;
                     Finalizer_Scope_2661;
            raise;
      end;
   return Property_Result;
end Basic_Subp_Decl_P_Next_Part_For_Decl;
--# end
--# property-start BasicSubpDecl.constrain_prefix ada/nodes.lkt:9774
pragma Warnings (Off, "is not referenced");
 function Basic_Subp_Decl_P_Constrain_Prefix
  (Node : Bare_Basic_Subp_Decl
      ; Prefix : Bare_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
     Ent : Internal_Entity_Basic_Subp_Decl :=
       Internal_Entity_Basic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind prefix Prefix
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_828 with Inline_Always;
      Fld : Logic_Equation;
            procedure Finalizer_Scope_828 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_828;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5424 '<FieldAccess for subp_constrain_prefix at nodes.lkt:9775:9>' Fld ada/nodes.lkt:9775
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_constrain_prefix
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Constrain_Prefix (Node => Ent.Node, Prefix => Prefix, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5424
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_828;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_828;
            raise;
      end;
   return Property_Result;
end Basic_Subp_Decl_P_Constrain_Prefix;
--# end
--# property-start BasicSubpDecl.expr_type ada/nodes.lkt:9778
pragma Warnings (Off, "is not referenced");
 function Basic_Subp_Decl_P_Expr_Type
  (Node : Bare_Basic_Subp_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
     Ent : Internal_Entity_Basic_Subp_Decl :=
       Internal_Entity_Basic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_151 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5425 '<FieldAccess for subp_spec_or_null at nodes.lkt:9779:9>' Fld ada/nodes.lkt:9779
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5425
Var_Expr_151 := Fld;
if Var_Expr_151 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 5426 '<FieldAccess for return_type at nodes.lkt:9779:9>' Fld_1 ada/nodes.lkt:9779
      if Var_Expr_151.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Var_Expr_151.Node, Origin => Origin, E_Info => Var_Expr_151.Info);
--# end
--# expr-done 5426
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Basic_Subp_Decl_P_Expr_Type;
--# end
--# property-start BasicSubpDecl.env_names ada/nodes.lkt:9781
pragma Warnings (Off, "is not referenced");
 function Basic_Subp_Decl_P_Env_Names
  (Node : Bare_Basic_Subp_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_830 with Inline_Always;
            procedure Finalizer_Scope_2663 with Inline_Always;
      Var_Expr_0 : String_Type;
Fld : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_830 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_830;
            procedure Finalizer_Scope_2663 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2663;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5427 '<FieldAccess for top_level_env_name at nodes.lkt:9782:9>' Fld ada/nodes.lkt:9782
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 5427
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_String then
   --# scope-start
   --# bind fqn Var_Expr_0
--# expr-start 5429 '<ArrayLiteral at nodes.lkt:9782:47>' Array_Lit ada/nodes.lkt:9782
--# expr-start 5428 '<to_symbol at nodes.lkt:9782:48>' Sym ada/nodes.lkt:9782
Sym := String_To_Symbol (Self, Self.Unit.Context, Var_Expr_0); 
--# expr-done 5428
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 5429
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2663;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_830;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_830;
                     Finalizer_Scope_2663;
            raise;
      end;
   return Property_Result;
end Basic_Subp_Decl_P_Env_Names;
--# end
--# property-start '[dispatcher]BasicSubpDecl.subp_decl_spec' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec
  (Node : Bare_Basic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Subp_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Basic_Subp_Decl (Self.Kind) is
               when Ada_Abstract_Subp_Decl .. Ada_Subp_Decl =>
                  --# property-call-start ClassicSubpDecl.subp_decl_spec
                  Property_Result := Classic_Subp_Decl_P_Subp_Decl_Spec
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Entry_Decl =>
                  --# property-call-start EntryDecl.subp_decl_spec
                  Property_Result := Entry_Decl_P_Subp_Decl_Spec
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Literal_Decl .. Ada_Synthetic_Char_Enum_Lit =>
                  --# property-call-start EnumLiteralDecl.subp_decl_spec
                  Property_Result := Enum_Literal_Decl_P_Subp_Decl_Spec
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Internal =>
                  --# property-call-start GenericSubpInternal.subp_decl_spec
                  Property_Result := Generic_Subp_Internal_P_Subp_Decl_Spec
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Subp_Decl =>
                  --# property-call-start SyntheticSubpDecl.subp_decl_spec
                  Property_Result := Synthetic_Subp_Decl_P_Subp_Decl_Spec
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec;
--# end
--# property-start BasicSubpDecl._env_do_36 ada/nodes.lkt:9791
pragma Warnings (Off, "is not referenced");
 function Env_Do_36
  (Node : Bare_Basic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5430 '<FieldAccess for env_hook at nodes.lkt:9791:12>' Fld ada/nodes.lkt:9791
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 5430
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_36;
--# end
--# property-start BasicSubpDecl._env_init_37 ada/nodes.lkt:9796
pragma Warnings (Off, "is not referenced");
 function Env_Init_37
  (Node : Bare_Basic_Subp_Decl
  )
   return Internal_Designated_Env
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1701 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1701 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1701;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5431 '<FieldAccess for child_decl_initial_env at nodes.lkt:9796:13>' Fld ada/nodes.lkt:9796
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_initial_env
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Initial_Env (Node => Self, Private_Part => True);
--# end
--# expr-done 5431
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1701;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1701;
            raise;
      end;
   return Property_Result;
end Env_Init_37;
--# end
--# property-start BasicSubpDecl._env_mappings_38 ada/nodes.lkt:9798
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_38
  (Node : Bare_Basic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
     Ent : Internal_Entity_Basic_Subp_Decl :=
       Internal_Entity_Basic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1702 with Inline_Always;
      Fld : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1702 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1702;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5432 '<FieldAccess for child_decl_env_assocs at nodes.lkt:9798:20>' Fld ada/nodes.lkt:9798
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_env_assocs
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Env_Assocs (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5432
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1702;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1702;
            raise;
      end;
   return Property_Result;
end Env_Mappings_38;
--# end
--# property-start BasicSubpDecl._env_trans_parent_39 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_39
  (Node : Bare_Basic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_39;
--# end
--# property-start BasicSubpDecl._env_names_40 ada/nodes.lkt:9799
pragma Warnings (Off, "is not referenced");
 function Env_Names_40
  (Node : Bare_Basic_Subp_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1704 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1704 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1704;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5433 '<FieldAccess for env_names at nodes.lkt:9799:23>' Fld ada/nodes.lkt:9799
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicSubpDecl.env_names
Fld := Libadalang.Implementation.Basic_Subp_Decl_P_Env_Names (Node => Self);
--# end
--# expr-done 5433
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1704;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1704;
            raise;
      end;
   return Property_Result;
end Env_Names_40;
--# end
--# property-start BasicSubpDecl._env_do_41 ada/nodes.lkt:9800
pragma Warnings (Off, "is not referenced");
 function Env_Do_41
  (Node : Bare_Basic_Subp_Decl
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1705 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1705 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1705;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5434 '<FieldAccess for populate_dependent_units at nodes.lkt:9800:12>' Fld ada/nodes.lkt:9800
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 5434
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1705;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1705;
            raise;
      end;
   return Property_Result;
end Env_Do_41;
--# end
--# property-start BasicSubpDecl._ref_env_nodes_42 ada/nodes.lkt:9802
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_42
  (Node : Bare_Basic_Subp_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1706 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1706 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1706;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5435 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:9802:13>' Fld ada/nodes.lkt:9802
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 5435
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1706;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1706;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_42;
--# end
--# property-start BasicSubpDecl._ref_cond_43 ada/nodes.lkt:9804
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_43
  (Node : Bare_Basic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5437 '<IsA LibraryItem, Subunit at nodes.lkt:9804:18>' Is_A ada/nodes.lkt:9804
--# expr-start 5436 '<parent at nodes.lkt:9804:18>' Fld ada/nodes.lkt:9804
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 5436
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 5437
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_43;
--# end
--# property-start BasicSubpDecl._ref_env_nodes_44 ada/nodes.lkt:9807
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_44
  (Node : Bare_Basic_Subp_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1708 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1708 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1708;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5438 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:9807:13>' Fld ada/nodes.lkt:9807
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 5438
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1708;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1708;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_44;
--# end
--# property-start BasicSubpDecl._ref_cond_45 ada/nodes.lkt:9809
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_45
  (Node : Bare_Basic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5440 '<IsA LibraryItem, Subunit at nodes.lkt:9809:18>' Is_A ada/nodes.lkt:9809
--# expr-start 5439 '<parent at nodes.lkt:9809:18>' Fld ada/nodes.lkt:9809
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 5439
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 5440
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_45;
--# end
--# property-start BasicSubpDecl._env_do_46 ada/nodes.lkt:9812
pragma Warnings (Off, "is not referenced");
 function Env_Do_46
  (Node : Bare_Basic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Basic_Subp_Decl  := Bare_Basic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5441 '<FieldAccess for populate_body_unit at nodes.lkt:9812:12>' Fld ada/nodes.lkt:9812
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_body_unit
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Body_Unit (Node => Self);
--# end
--# expr-done 5441
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_46;
--# end
   --
   --  Primitives for Bare_Classic_Subp_Decl
   --
      procedure Initialize_Fields_For_Classic_Subp_Decl
        (Self : Bare_Classic_Subp_Decl
         ; Classic_Subp_Decl_F_Overriding : Bare_Overriding_Node
         ; Classic_Subp_Decl_F_Subp_Spec : Bare_Subp_Spec
        ) is
      begin
            Self.Classic_Subp_Decl_F_Overriding := Classic_Subp_Decl_F_Overriding;
            Self.Classic_Subp_Decl_F_Subp_Spec := Classic_Subp_Decl_F_Subp_Spec;
      end Initialize_Fields_For_Classic_Subp_Decl;
   function Classic_Subp_Decl_F_Overriding
     (Node : Bare_Classic_Subp_Decl) return Bare_Overriding_Node
   is
   begin
         return Node.Classic_Subp_Decl_F_Overriding;
   end;
   function Classic_Subp_Decl_F_Subp_Spec
     (Node : Bare_Classic_Subp_Decl) return Bare_Subp_Spec
   is
   begin
         return Node.Classic_Subp_Decl_F_Subp_Spec;
   end;
--# property-start ClassicSubpDecl.subp_decl_spec ada/nodes.lkt:9826
pragma Warnings (Off, "is not referenced");
 function Classic_Subp_Decl_P_Subp_Decl_Spec
  (Node : Bare_Classic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Classic_Subp_Decl  := Bare_Classic_Subp_Decl (Node);
     Ent : Internal_Entity_Classic_Subp_Decl :=
       Internal_Entity_Classic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Subp_Spec;
      Fld : Internal_Entity_Subp_Spec;
Cast_Result : Internal_Entity_Base_Subp_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 5442 '<FieldAccess for subp_spec at nodes.lkt:9826:50>' Fld ada/nodes.lkt:9826
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Classic_Subp_Decl_F_Subp_Spec, Info => Ent.Info);
--# expr-done 5442
      Cast_Result := Create_Internal_Entity_Base_Subp_Spec
        (Node => Fld.Node,
         Info => Fld.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classic_Subp_Decl_P_Subp_Decl_Spec;
--# end
--# property-start ClassicSubpDecl.body_part ada/nodes.lkt:9831
pragma Warnings (Off, "is not referenced");
 function Classic_Subp_Decl_P_Body_Part
  (Node : Bare_Classic_Subp_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Body
is
   Self : Bare_Classic_Subp_Decl  := Bare_Classic_Subp_Decl (Node);
     Ent : Internal_Entity_Classic_Subp_Decl :=
       Internal_Entity_Classic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Base_Subp_Body;
      Fld : Internal_Entity_Body_Node;
Cast_Result : Internal_Entity_Base_Subp_Body;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 5444 '<Cast to BaseSubpBody at nodes.lkt:9832:9>' Cast_Result ada/nodes.lkt:9832
--# expr-start 5443 '<FieldAccess for body_part_for_decl at nodes.lkt:9832:9>' Fld ada/nodes.lkt:9832
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.body_part_for_decl
Fld := Libadalang.Implementation.Basic_Decl_P_Body_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5443
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Subp_Body
   then
      Cast_Result := Create_Internal_Entity_Base_Subp_Body
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5444
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Classic_Subp_Decl_P_Body_Part;
--# end
   --
   --  Primitives for Bare_Abstract_Subp_Decl
   --
      procedure Initialize_Fields_For_Abstract_Subp_Decl
        (Self : Bare_Abstract_Subp_Decl
         ; Classic_Subp_Decl_F_Overriding : Bare_Overriding_Node
         ; Classic_Subp_Decl_F_Subp_Spec : Bare_Subp_Spec
         ; Abstract_Subp_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Classic_Subp_Decl
              (Self, Classic_Subp_Decl_F_Overriding, Classic_Subp_Decl_F_Subp_Spec);
            Self.Abstract_Subp_Decl_F_Aspects := Abstract_Subp_Decl_F_Aspects;
      end Initialize_Fields_For_Abstract_Subp_Decl;
   --
   --  Primitives for Bare_Formal_Subp_Decl
   --
      procedure Initialize_Fields_For_Formal_Subp_Decl
        (Self : Bare_Formal_Subp_Decl
         ; Classic_Subp_Decl_F_Overriding : Bare_Overriding_Node
         ; Classic_Subp_Decl_F_Subp_Spec : Bare_Subp_Spec
         ; Formal_Subp_Decl_F_Default_Expr : Bare_Expr
         ; Formal_Subp_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Classic_Subp_Decl
              (Self, Classic_Subp_Decl_F_Overriding, Classic_Subp_Decl_F_Subp_Spec);
            Self.Formal_Subp_Decl_F_Default_Expr := Formal_Subp_Decl_F_Default_Expr;
            Self.Formal_Subp_Decl_F_Aspects := Formal_Subp_Decl_F_Aspects;
      end Initialize_Fields_For_Formal_Subp_Decl;
   function Formal_Subp_Decl_F_Default_Expr
     (Node : Bare_Formal_Subp_Decl) return Bare_Expr
   is
   begin
         return Node.Formal_Subp_Decl_F_Default_Expr;
   end;
--# property-start FormalSubpDecl.defining_names ada/nodes.lkt:9851
pragma Warnings (Off, "is not referenced");
 function Formal_Subp_Decl_P_Defining_Names
  (Node : Bare_Formal_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Formal_Subp_Decl  := Bare_Formal_Subp_Decl (Node);
     Ent : Internal_Entity_Formal_Subp_Decl :=
       Internal_Entity_Formal_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_834 with Inline_Always;
      Fld : Internal_Entity_Subp_Spec;
Fld_1 : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_834 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_834;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5447 '<ArrayLiteral at nodes.lkt:9851:57>' Array_Lit ada/nodes.lkt:9851
--# expr-start 5446 '<FieldAccess for name at nodes.lkt:9851:58>' Fld_1 ada/nodes.lkt:9851
--# expr-start 5445 '<FieldAccess for subp_spec at nodes.lkt:9851:58>' Fld ada/nodes.lkt:9851
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Classic_Subp_Decl_F_Subp_Spec, Info => Ent.Info);
--# expr-done 5445
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 5446
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld_1)); 
--# expr-done 5447
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_834;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_834;
            raise;
      end;
   return Property_Result;
end Formal_Subp_Decl_P_Defining_Names;
--# end
--# property-start FormalSubpDecl.xref_entry_point ada/nodes.lkt:9853
pragma Warnings (Off, "is not referenced");
 function Formal_Subp_Decl_P_Xref_Entry_Point
  (Node : Bare_Formal_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Formal_Subp_Decl  := Bare_Formal_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Formal_Subp_Decl_P_Xref_Entry_Point;
--# end
--# property-start FormalSubpDecl.xref_equation ada/nodes.lkt:9856
pragma Warnings (Off, "is not referenced");
 function Formal_Subp_Decl_P_Xref_Equation
  (Node : Bare_Formal_Subp_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Formal_Subp_Decl  := Bare_Formal_Subp_Decl (Node);
     Ent : Internal_Entity_Formal_Subp_Decl :=
       Internal_Entity_Formal_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_836 with Inline_Always;
            procedure Finalizer_Scope_2664 with Inline_Always;
            procedure Finalizer_Scope_2665 with Inline_Always;
            procedure Finalizer_Scope_2666 with Inline_Always;
            procedure Finalizer_Scope_2667 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Match_0 : Internal_Entity_Null_Literal;
Match_1 : Internal_Entity_Box_Expr;
Match_2 : Internal_Entity_Name;
Match_3 : Internal_Entity_Expr;
Fld : Internal_Entity_Expr;
True_Rel : Logic_Equation;
True_Rel_1 : Logic_Equation;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Equation;
Is_A : Boolean;
If_Result : Logic_Equation;
Fld_3 : Logic_Var;
Cast_Expr : Internal_Entity_Formal_Subp_Decl;
Cast_Result : Internal_Entity_Basic_Decl;
Pred : Logic_Equation;
And_Pred : Logic_Equation;
Match_Prefix : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Null_Literal;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_2 : Internal_Entity_Box_Expr;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_3 : Internal_Entity_Name;
Let_Result_2 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Cast_Result_4 : Internal_Entity_Expr;
Let_Result_3 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
Match_Result : Logic_Equation;
Scope_Result_4 : Logic_Equation;
True_Rel_2 : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_836 is
            begin
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (True_Rel_2);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_836;
            procedure Finalizer_Scope_2664 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_2664;
            procedure Finalizer_Scope_2665 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_2665;
            procedure Finalizer_Scope_2666 is
            begin
                     Dec_Ref (True_Rel_1);
            end Finalizer_Scope_2666;
            procedure Finalizer_Scope_2667 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (If_Result);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_2667;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5448 '<FieldAccess for default_expr at nodes.lkt:9857:9>' Fld ada/nodes.lkt:9857
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Formal_Subp_Decl_F_Default_Expr, Info => Ent.Info);
--# expr-done 5448
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind e Var_Expr_0
--# expr-start 5457 '<Match at nodes.lkt:9859:13>' Match_Result ada/nodes.lkt:9859
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Expr (Match_Prefix.Node.Kind) is
         when Ada_Null_Literal =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Null_Literal
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind _ Match_0
True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:9860:40") else null)); 
Let_Result := True_Rel; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2665;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Box_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Box_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind _ Match_1
True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:9861:36") else null)); 
Let_Result_1 := True_Rel_1; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2666;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_String_Literal | Ada_Int_Literal .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind n Match_2
--# expr-start 5456 '<LogicBinaryOp And at nodes.lkt:9863:21>' And_Pred ada/nodes.lkt:9863
--# expr-start 5452 '<If at nodes.lkt:9864:25>' If_Result ada/nodes.lkt:9864
--# expr-start 5449 '<IsA AttributeRef at nodes.lkt:9864:28>' Is_A ada/nodes.lkt:9864
Is_A := Match_2.Node /= null 
and then Match_2.Node.Kind in Ada_Attribute_Ref_Range; 
--# expr-done 5449
if Is_A then
   --# expr-start 5450 '<FieldAccess for sub_equation at nodes.lkt:9864:51>' Fld_1 ada/nodes.lkt:9864
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_2.Info);
--# end
--# expr-done 5450
   If_Result := Fld_1;
else
   --# expr-start 5451 '<FieldAccess for xref_no_overloading at nodes.lkt:9865:30>' Fld_2 ada/nodes.lkt:9865
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_2 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Match_2.Node, All_Els => True, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_2.Info);
--# end
--# expr-done 5451
   If_Result := Fld_2;
end if;
      Inc_Ref (If_Result);
--# expr-done 5452
--# expr-start 5455 '<Predicate on BasicDecl.subp_decl_match_signature at nodes.lkt:9867:26>' Pred ada/nodes.lkt:9867
--# expr-start 5453 '<FieldAccess for ref_var at nodes.lkt:9867:63>' Fld_3 ada/nodes.lkt:9867
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Match_2.Node);
--# end
--# expr-done 5453
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 5454 '<Cast to BasicDecl at nodes.lkt:9868:21>' Cast_Result ada/nodes.lkt:9868
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-done 5454
Pred := Solver.Create_Predicate (Fld_3, Create_Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate (Cast_Result, Origin)); 
--# expr-done 5455
And_Pred := Create_And (If_Result, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:9863:21") else null)); 
--# expr-done 5456
Let_Result_2 := And_Pred; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2667;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Abstract_State_Decl_Expr .. Ada_Relation_Op | Ada_Case_Expr_Alternative .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_4; 
--# bind _ Match_3
Let_Result_3 := raise Property_Error with "Should not happen"; Inc_Ref (Let_Result_3);
--# end
Scope_Result_3 := Let_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
end case;
--# expr-done 5457
Scope_Result_4 := Match_Result;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2664;
   Result_Var := Scope_Result_4;
else
   True_Rel_2 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:9871:25") else null)); 
   Result_Var := True_Rel_2;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_836;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_836;
                     Finalizer_Scope_2664;
                     Finalizer_Scope_2665;
                     Finalizer_Scope_2666;
                     Finalizer_Scope_2667;
            raise;
      end;
   return Property_Result;
end Formal_Subp_Decl_P_Xref_Equation;
--# end
--# property-start FormalSubpDecl.resolve_actual_name ada/nodes.lkt:9882
pragma Warnings (Off, "is not referenced");
 function Formal_Subp_Decl_P_Resolve_Actual_Name
  (Node : Bare_Formal_Subp_Decl
      ; Name : Internal_Entity_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Formal_Subp_Decl  := Bare_Formal_Subp_Decl (Node);
     Ent : Internal_Entity_Formal_Subp_Decl :=
       Internal_Entity_Formal_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_837 with Inline_Always;
      Var_Expr_152 : Internal_Entity_Basic_Decl;
Fld : Bare_Expr;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Cast_Expr : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Attribute_Ref;
Fld_1 : Internal_Entity_Basic_Decl;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_2 : Internal_Entity_Array_Access;
Cast_Expr_2 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Cast_Expr_3 : Internal_Entity_Formal_Subp_Decl;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Fld_3 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Find_Result : Internal_Entity;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Is_A_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Is_A_2 : Boolean;
If_Result_2 : Internal_Entity_Basic_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_837 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_837;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Formal_Subp_Decl_Formal_Subp_Decl_P_Resolve_Actual_Name,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Formal_Subp_Decl,
                                As_Bare_Formal_Subp_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Internal_Entity_Expr,
                                      As_Internal_Entity_Expr => Name);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Basic_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 5473 '<bind at nodes.lkt:9883:9>' Dyn_Var_Bind_Result ada/nodes.lkt:9883
--# expr-start 5458 '<FieldAccess for node at nodes.lkt:9883:23>' Fld ada/nodes.lkt:9883
Fld := Name.Node;
--# expr-done 5458
      Cast_Result := Fld;
Bound_Origin := Cast_Result; 
--# expr-start 5472 '<If at nodes.lkt:9885:9>' If_Result_2 ada/nodes.lkt:9885
--# expr-start 5459 '<IsA AttributeRef at nodes.lkt:9885:12>' Is_A_2 ada/nodes.lkt:9885
Is_A_2 := Name.Node /= null 
and then Name.Node.Kind in Ada_Attribute_Ref_Range; 
--# expr-done 5459
if Is_A_2 then
   --# expr-start 5461 '<FieldAccess for attribute_subprogram at nodes.lkt:9886:14>' Fld_1 ada/nodes.lkt:9886
--# expr-start 5460 '<Cast to AttributeRef at nodes.lkt:9886:14>' Cast_Result_1 ada/nodes.lkt:9886
Cast_Expr := Name; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Attribute_Ref_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Attribute_Ref
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Attribute_Ref;
   end if;
--# expr-done 5460
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.attribute_subprogram
Fld_1 := Libadalang.Implementation.Attribute_Ref_P_Attribute_Subprogram (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 5461
   If_Result_2 := Fld_1;
else
   --# expr-start 5471 '<If at nodes.lkt:9885:9>' If_Result_1 ada/nodes.lkt:9885
--# expr-start 5462 '<IsA BoxExpr at nodes.lkt:9887:14>' Is_A_1 ada/nodes.lkt:9887
Is_A_1 := Name.Node /= null 
and then Name.Node.Kind in Ada_Box_Expr_Range; 
--# expr-done 5462
if Is_A_1 then
   If_Result_1 := No_Entity_Basic_Decl;
else
   --# expr-start 5470 '<If at nodes.lkt:9885:9>' If_Result ada/nodes.lkt:9885
--# expr-start 5463 '<IsA Name at nodes.lkt:9892:14>' Is_A ada/nodes.lkt:9892
Is_A := Name.Node /= null 
and then Name.Node.Kind in Ada_Name; 
--# expr-done 5463
if Is_A then
   --# expr-start 5469 '<Cast to BasicDecl at nodes.lkt:9894:13>' Cast_Result_5 ada/nodes.lkt:9894
--# expr-start 5468 '<Find at nodes.lkt:9894:13>' Find_Result ada/nodes.lkt:9894
   --# expr-start 5465 '<FieldAccess for all_env_elements at nodes.lkt:9894:13>' Fld_2 ada/nodes.lkt:9894
--# expr-start 5464 '<Cast to Name at nodes.lkt:9894:13>' Cast_Result_2 ada/nodes.lkt:9894
Cast_Expr_1 := Name; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 5464
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_env_elements
Fld_2 := Libadalang.Implementation.Name_P_All_Env_Elements (Node => Cast_Result_2.Node, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 5465
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_2;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind el Item_0
--# expr-start 5466 '<Cast to BasicDecl at nodes.lkt:9895:25>' Cast_Result_3 ada/nodes.lkt:9895
Cast_Expr_2 := Item_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_3 := No_Entity_Basic_Decl;
   end if;
--# expr-done 5466
Var_Expr_152 := Cast_Result_3;
if Var_Expr_152 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 5467 '<FieldAccess for subp_decl_match_signature at nodes.lkt:9895:25>' Fld_3 ada/nodes.lkt:9895
      if Var_Expr_152.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr_3 := Ent; 
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
--# property-call-start BasicDecl.subp_decl_match_signature
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Subp_Decl_Match_Signature (Node => Var_Expr_152.Node, Other => Cast_Result_4, Origin => Bound_Origin, E_Info => Var_Expr_152.Info);
--# end
--# expr-done 5467
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
--# expr-done 5468
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_5 := No_Entity_Basic_Decl;
   end if;
--# expr-done 5469
   If_Result := Cast_Result_5;
else
   If_Result := raise Property_Error with "invalid actual for subprogram formal";
end if;
--# expr-done 5470
   If_Result_1 := If_Result;
end if;
--# expr-done 5471
   If_Result_2 := If_Result_1;
end if;
--# expr-done 5472
Dyn_Var_Bind_Result := If_Result_2; 
--# expr-done 5473
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      Finalizer_Scope_837;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_837;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Basic_Decl,
                        As_Internal_Entity_Basic_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Formal_Subp_Decl_P_Resolve_Actual_Name;
--# end
--# property-start FormalSubpDecl.corresponding_actual_impl ada/nodes.lkt:9907
pragma Warnings (Off, "is not referenced");
 function Formal_Subp_Decl_P_Corresponding_Actual_Impl
  (Node : Bare_Formal_Subp_Decl
      ; Rb : Env_Rebindings
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Formal_Subp_Decl  := Bare_Formal_Subp_Decl (Node);
     Ent : Internal_Entity_Formal_Subp_Decl :=
       Internal_Entity_Formal_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind rb Rb
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_838 with Inline_Always;
      Var_Expr_0 : Bare_Generic_Instantiation;
Var_Expr_1 : Internal_Entity_Expr;
Var_Expr_2 : Internal_Entity_Basic_Decl;
Var_Expr : Internal_Entity_Basic_Decl;
Fld : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Cast_Result : Bare_Generic_Instantiation;
Fld_1 : Env_Rebindings;
New_Struct : Internal_Entity_Info;
New_Struct_1 : Internal_Entity_Generic_Instantiation;
Scope_Result : Internal_Entity_Generic_Instantiation;
Result_Var : Internal_Entity_Generic_Instantiation;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Bare_Defining_Name;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Result_Var_1 : Internal_Entity_Basic_Decl;
Fld_6 : Bare_Basic_Decl;
Fld_7 : Internal_Entity_Info;
Fld_8 : Internal_Metadata;
Fld_9 : Internal_Entity_Info;
Fld_10 : Env_Rebindings;
New_Struct_2 : Internal_Entity_Info;
New_Struct_3 : Internal_Entity_Basic_Decl;
Fld_11 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Result_Var_2 : Internal_Entity_Basic_Decl;
Scope_Result_3 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity_Formal_Subp_Decl;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Result_Var_3 : Internal_Entity_Basic_Decl;
Fld_12 : Env_Rebindings;
Fld_13 : Internal_Entity_Basic_Decl;
Fld_14 : Lexical_Env := Empty_Env;
Fld_15 : Bare_Ada_Node;
Fld_16 : Lexical_Env := Empty_Env;
Is_Equal : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Cast_Expr_1 : Internal_Entity_Formal_Subp_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Is_Equal_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_838 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_16);
            end Finalizer_Scope_838;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5500 '<If at nodes.lkt:9908:9>' If_Result_1 ada/nodes.lkt:9908
--# expr-start 5474 '<IsNull at nodes.lkt:9908:12>' Is_Equal_1 ada/nodes.lkt:9908
Is_Equal_1 := Rb = null; 
--# expr-done 5474
if Is_Equal_1 then
Cast_Expr_1 := Ent; 
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   If_Result_1 := Cast_Result_2;
else
   --# expr-start 5499 '<If at nodes.lkt:9908:9>' If_Result ada/nodes.lkt:9908
--# expr-start 5478 '<Eq at nodes.lkt:9909:14>' Is_Equal ada/nodes.lkt:9909
--# expr-start 5475 '<FieldAccess for old_env at nodes.lkt:9909:14>' Fld_14 ada/nodes.lkt:9909
      if Rb = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Rb.Old_Env;
Inc_Ref (Fld_14);
--# expr-done 5475
--# expr-start 5477 '<FieldAccess for node_env at nodes.lkt:9909:28>' Fld_16 ada/nodes.lkt:9909
--# expr-start 5476 '<parent at nodes.lkt:9909:28>' Fld_15 ada/nodes.lkt:9909
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Self.Parent; 
--# expr-done 5476
      if Fld_15 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Node_Env (Node => Fld_15);
--# expr-done 5477
Is_Equal := Equivalent (Fld_14, Fld_16); 
--# expr-done 5478
if Is_Equal then
--# expr-start 5487 '<FieldAccess for actual_for_formal at nodes.lkt:9911:13>' Fld_4 ada/nodes.lkt:9911
--# expr-start 5481 '<Cast to GenericInstantiation at nodes.lkt:9911:13>' Cast_Result ada/nodes.lkt:9911
--# expr-start 5480 '<env_node at nodes.lkt:9911:13>' Env_Node ada/nodes.lkt:9911
--# expr-start 5479 '<FieldAccess for new_env at nodes.lkt:9911:13>' Fld ada/nodes.lkt:9911
      if Rb = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Rb.New_Env;
Inc_Ref (Fld);
--# expr-done 5479
Env_Node := AST_Envs.Env_Node (Fld); 
--# expr-done 5480
   if Env_Node = null
      or else Env_Node.Kind in Ada_Generic_Instantiation
   then
      Cast_Result := Env_Node;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 5481
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind inst Var_Expr_0
--# expr-start 5484 '<New GenericInstantiation.entity at nodes.lkt:9913:17>' New_Struct_1 ada/nodes.lkt:9913
--# expr-start 5483 '<New EntityInfo at nodes.lkt:9915:26>' New_Struct ada/nodes.lkt:9915
--# expr-start 5482 '<FieldAccess for get_parent at nodes.lkt:9917:36>' Fld_1 ada/nodes.lkt:9917
      if Rb = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Rb.Parent;
--# expr-done 5482
New_Struct := (From_Rebound => False, Md => No_Metadata, Rebindings => Fld_1); 
--# expr-done 5483
New_Struct_1 := (Info => New_Struct, Node => Var_Expr_0); 
--# expr-done 5484
Scope_Result := New_Struct_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Generic_Instantiation;
end if;
      if Result_Var.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5486 '<FieldAccess for node at nodes.lkt:9922:32>' Fld_3 ada/nodes.lkt:9922
--# expr-start 5485 '<FieldAccess for defining_name at nodes.lkt:9922:32>' Fld_2 ada/nodes.lkt:9922
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5485
Fld_3 := Fld_2.Node;
--# expr-done 5486
--# property-call-start GenericInstantiation.actual_for_formal
Fld_4 := Libadalang.Implementation.Generic_Instantiation_P_Actual_For_Formal (Node => Result_Var.Node, Formal_Name => Fld_3, E_Info => Result_Var.Info);
--# end
--# expr-done 5487
Var_Expr_1 := Fld_4;
if Var_Expr_1 /= No_Entity_Expr then
   --# scope-start
   --# bind name Var_Expr_1
--# expr-start 5488 '<FieldAccess for resolve_actual_name at nodes.lkt:9923:27>' Fld_5 ada/nodes.lkt:9923
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start FormalSubpDecl.resolve_actual_name
Fld_5 := Libadalang.Implementation.Formal_Subp_Decl_P_Resolve_Actual_Name (Node => Ent.Node, Name => Var_Expr_1, E_Info => Ent.Info);
--# end
--# expr-done 5488
Scope_Result_1 := Fld_5;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Basic_Decl;
end if;
Var_Expr_2 := Result_Var_1;
if Var_Expr_2 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind actual Var_Expr_2
--# expr-start 5496 '<FieldAccess for corresponding_actual at nodes.lkt:9926:17>' Fld_11 ada/nodes.lkt:9926
--# expr-start 5495 '<New BasicDecl.entity at nodes.lkt:9926:17>' New_Struct_3 ada/nodes.lkt:9926
--# expr-start 5493 '<New EntityInfo at nodes.lkt:9928:26>' New_Struct_2 ada/nodes.lkt:9928
--# expr-start 5490 '<FieldAccess for md at nodes.lkt:9929:28>' Fld_8 ada/nodes.lkt:9929
--# expr-start 5489 '<FieldAccess for info at nodes.lkt:9929:28>' Fld_7 ada/nodes.lkt:9929
Fld_7 := Var_Expr_2.Info;
--# expr-done 5489
Fld_8 := Fld_7.Md;
--# expr-done 5490
--# expr-start 5492 '<FieldAccess for rebindings at nodes.lkt:9930:36>' Fld_10 ada/nodes.lkt:9930
--# expr-start 5491 '<FieldAccess for info at nodes.lkt:9930:36>' Fld_9 ada/nodes.lkt:9930
Fld_9 := Var_Expr_2.Info;
--# expr-done 5491
Fld_10 := Fld_9.Rebindings;
--# expr-done 5492
New_Struct_2 := (From_Rebound => True, Md => Fld_8, Rebindings => Fld_10); 
--# expr-done 5493
--# expr-start 5494 '<FieldAccess for node at nodes.lkt:9927:26>' Fld_6 ada/nodes.lkt:9927
Fld_6 := Var_Expr_2.Node;
--# expr-done 5494
New_Struct_3 := (Info => New_Struct_2, Node => Fld_6); 
--# expr-done 5495
      if New_Struct_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.corresponding_actual'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Corresponding_Actual (Node => New_Struct_3.Node, E_Info => New_Struct_3.Info);
--# end
--# expr-done 5496
Scope_Result_2 := Fld_11;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Basic_Decl;
end if;
Var_Expr := Result_Var_2;
if Var_Expr /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_3 := Var_Expr;
   --# end
   Result_Var_3 := Scope_Result_3;
else
Cast_Expr := Ent; 
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   Result_Var_3 := Cast_Result_1;
end if;
   If_Result := Result_Var_3;
else
   --# expr-start 5498 '<FieldAccess for corresponding_actual_impl at nodes.lkt:9939:14>' Fld_13 ada/nodes.lkt:9939
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5497 '<FieldAccess for get_parent at nodes.lkt:9939:45>' Fld_12 ada/nodes.lkt:9939
      if Rb = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Rb.Parent;
--# expr-done 5497
--# property-call-start FormalSubpDecl.corresponding_actual_impl
Fld_13 := Libadalang.Implementation.Formal_Subp_Decl_P_Corresponding_Actual_Impl (Node => Ent.Node, Rb => Fld_12, E_Info => Ent.Info);
--# end
--# expr-done 5498
   If_Result := Fld_13;
end if;
--# expr-done 5499
   If_Result_1 := If_Result;
end if;
--# expr-done 5500
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_838;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_838;
            raise;
      end;
   return Property_Result;
end Formal_Subp_Decl_P_Corresponding_Actual_Impl;
--# end
--# property-start FormalSubpDecl.corresponding_actual ada/nodes.lkt:9943
pragma Warnings (Off, "is not referenced");
 function Formal_Subp_Decl_P_Corresponding_Actual
  (Node : Bare_Formal_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Formal_Subp_Decl  := Bare_Formal_Subp_Decl (Node);
     Ent : Internal_Entity_Formal_Subp_Decl :=
       Internal_Entity_Formal_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Info;
Fld_1 : Env_Rebindings;
Fld_2 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5503 '<FieldAccess for corresponding_actual_impl at nodes.lkt:9944:9>' Fld_2 ada/nodes.lkt:9944
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5502 '<FieldAccess for rebindings at nodes.lkt:9944:40>' Fld_1 ada/nodes.lkt:9944
--# expr-start 5501 '<FieldAccess for info at nodes.lkt:9944:40>' Fld ada/nodes.lkt:9944
Fld := Ent.Info;
--# expr-done 5501
Fld_1 := Fld.Rebindings;
--# expr-done 5502
--# property-call-start FormalSubpDecl.corresponding_actual_impl
Fld_2 := Libadalang.Implementation.Formal_Subp_Decl_P_Corresponding_Actual_Impl (Node => Ent.Node, Rb => Fld_1, E_Info => Ent.Info);
--# end
--# expr-done 5503
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Formal_Subp_Decl_P_Corresponding_Actual;
--# end
--# property-start FormalSubpDecl.designated_subprogram_from ada/nodes.lkt:9951
pragma Warnings (Off, "is not referenced");
 function Formal_Subp_Decl_P_Designated_Subprogram_From
  (Node : Bare_Formal_Subp_Decl
      ; Inst : Internal_Entity_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Formal_Subp_Decl  := Bare_Formal_Subp_Decl (Node);
     Ent : Internal_Entity_Formal_Subp_Decl :=
       Internal_Entity_Formal_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind inst Inst
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_840 with Inline_Always;
      Local_Subps : Internal_Entity_Array_Access;
Local_Found : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Entity_Base_Subp_Spec;
Var_Expr_153 : Internal_Entity_Basic_Decl;
Fld : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Defining_Name;
Fld_2 : Symbol_Type;
Fld_3 : Bare_Generic_Instantiation;
Cast_Result : Bare_Ada_Node;
Fld_4 : Internal_Entity_Array_Access;
Fld_5 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_6 : Internal_Entity_Base_Subp_Spec;
Fld_7 : Internal_Entity_Subp_Spec;
Fld_8 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Find_Result : Internal_Entity;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl;
Fld_9 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Result_Var_1 : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_840 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Local_Subps);
            end Finalizer_Scope_840;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5519 '<Let at nodes.lkt:9954:9>' Let_Result_1 ada/nodes.lkt:9954
--# scope-start
--# expr-start 5508 '<FieldAccess for env_get at nodes.lkt:9955:13>' Fld_4 ada/nodes.lkt:9955
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5504 '<FieldAccess for node_env at nodes.lkt:9956:21>' Fld ada/nodes.lkt:9956
      if Inst.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Inst.Node, E_Info => Inst.Info);
--# expr-done 5504
--# expr-start 5506 '<FieldAccess for name_symbol at nodes.lkt:9957:24>' Fld_2 ada/nodes.lkt:9957
--# expr-start 5505 '<FieldAccess for defining_name at nodes.lkt:9957:24>' Fld_1 ada/nodes.lkt:9957
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5505
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_1.Node);
--# end
--# expr-done 5506
--# expr-start 5507 '<FieldAccess for node at nodes.lkt:9958:27>' Fld_3 ada/nodes.lkt:9958
Fld_3 := Inst.Node;
--# expr-done 5507
      Cast_Result := Fld_3;
--# property-call-start AdaNode.env_get
Fld_4 := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Fld, Symbol => Fld_2, From_Node => Cast_Result);
--# end
--# expr-done 5508
Local_Subps := Fld_4; Inc_Ref (Local_Subps);
--# bind subps Local_Subps
--# expr-start 5518 '<Let at nodes.lkt:9961:9>' Let_Result ada/nodes.lkt:9961
--# scope-start
--# expr-start 5516 '<bind at nodes.lkt:9962:13>' Dyn_Var_Bind_Result ada/nodes.lkt:9962
--# expr-start 5509 '<FieldAccess for origin_node at nodes.lkt:9962:27>' Fld_5 ada/nodes.lkt:9962
      if Inst.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_5 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Inst.Node);
--# end
--# expr-done 5509
Bound_Origin := Fld_5; 
--# expr-start 5515 '<Cast to BasicDecl at nodes.lkt:9964:13>' Cast_Result_2 ada/nodes.lkt:9964
--# expr-start 5514 '<Find at nodes.lkt:9964:13>' Find_Result ada/nodes.lkt:9964
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Subps;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind subp Item_0
--# expr-start 5511 '<FieldAccess for subp_spec_or_null at nodes.lkt:9966:17>' Fld_6 ada/nodes.lkt:9966
--# expr-start 5510 '<Cast to BasicDecl at nodes.lkt:9966:17>' Cast_Result_1 ada/nodes.lkt:9966
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 5510
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 5511
Var_Expr_1 := Fld_6;
if Var_Expr_1 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_1
--# expr-start 5513 '<FieldAccess for match_signature at nodes.lkt:9968:21>' Fld_8 ada/nodes.lkt:9968
--# expr-start 5512 '<FieldAccess for subp_spec at nodes.lkt:9968:21>' Fld_7 ada/nodes.lkt:9968
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Classic_Subp_Decl_F_Subp_Spec, Info => Ent.Info);
--# expr-done 5512
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.match_signature
Fld_8 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Fld_7.Node, Other => Var_Expr_1, Match_Name => False, Origin => Bound_Origin, E_Info => Fld_7.Info);
--# end
--# expr-done 5513
Scope_Result := Fld_8;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
--# expr-done 5514
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_2 := No_Entity_Basic_Decl;
   end if;
--# expr-done 5515
Dyn_Var_Bind_Result := Cast_Result_2; 
--# expr-done 5516
Local_Found := Dyn_Var_Bind_Result; 
--# bind found Local_Found
Var_Expr_153 := Local_Found;
if Var_Expr_153 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 5517 '<FieldAccess for wrap_public_reference at nodes.lkt:9980:9>' Fld_9 ada/nodes.lkt:9980
      if Var_Expr_153.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.wrap_public_reference
Fld_9 := Libadalang.Implementation.Basic_Decl_P_Wrap_Public_Reference (Node => Var_Expr_153.Node, E_Info => Var_Expr_153.Info);
--# end
--# expr-done 5517
Scope_Result_1 := Fld_9;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Basic_Decl;
end if;
Let_Result := Result_Var_1; 
--# end
--# expr-done 5518
Let_Result_1 := Let_Result; 
--# end
--# expr-done 5519
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_840;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_840;
            raise;
      end;
   return Property_Result;
end Formal_Subp_Decl_P_Designated_Subprogram_From;
--# end
   --
   --  Primitives for Bare_Abstract_Formal_Subp_Decl
   --
      procedure Initialize_Fields_For_Abstract_Formal_Subp_Decl
        (Self : Bare_Abstract_Formal_Subp_Decl
         ; Classic_Subp_Decl_F_Overriding : Bare_Overriding_Node
         ; Classic_Subp_Decl_F_Subp_Spec : Bare_Subp_Spec
         ; Formal_Subp_Decl_F_Default_Expr : Bare_Expr
         ; Formal_Subp_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Formal_Subp_Decl
              (Self, Classic_Subp_Decl_F_Overriding, Classic_Subp_Decl_F_Subp_Spec, Formal_Subp_Decl_F_Default_Expr, Formal_Subp_Decl_F_Aspects);
      end Initialize_Fields_For_Abstract_Formal_Subp_Decl;
   --
   --  Primitives for Bare_Concrete_Formal_Subp_Decl
   --
      procedure Initialize_Fields_For_Concrete_Formal_Subp_Decl
        (Self : Bare_Concrete_Formal_Subp_Decl
         ; Classic_Subp_Decl_F_Overriding : Bare_Overriding_Node
         ; Classic_Subp_Decl_F_Subp_Spec : Bare_Subp_Spec
         ; Formal_Subp_Decl_F_Default_Expr : Bare_Expr
         ; Formal_Subp_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Formal_Subp_Decl
              (Self, Classic_Subp_Decl_F_Overriding, Classic_Subp_Decl_F_Subp_Spec, Formal_Subp_Decl_F_Default_Expr, Formal_Subp_Decl_F_Aspects);
      end Initialize_Fields_For_Concrete_Formal_Subp_Decl;
   --
   --  Primitives for Bare_Subp_Decl
   --
      procedure Initialize_Fields_For_Subp_Decl
        (Self : Bare_Subp_Decl
         ; Classic_Subp_Decl_F_Overriding : Bare_Overriding_Node
         ; Classic_Subp_Decl_F_Subp_Spec : Bare_Subp_Spec
         ; Subp_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Classic_Subp_Decl
              (Self, Classic_Subp_Decl_F_Overriding, Classic_Subp_Decl_F_Subp_Spec);
            Self.Subp_Decl_F_Aspects := Subp_Decl_F_Aspects;
      end Initialize_Fields_For_Subp_Decl;
--# property-start SubpDecl.is_constant_object ada/nodes.lkt:9997
pragma Warnings (Off, "is not referenced");
 function Subp_Decl_P_Is_Constant_Object
  (Node : Bare_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Subp_Decl  := Bare_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subp_Decl_P_Is_Constant_Object;
--# end
   --
   --  Primitives for Bare_Entry_Decl
   --
      procedure Entry_Decl_Pre_Env_Actions
        (Self            : Bare_Entry_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_47 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:10072:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_48 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Entry_Decl
        (Self : Bare_Entry_Decl
         ; Entry_Decl_F_Overriding : Bare_Overriding_Node
         ; Entry_Decl_F_Spec : Bare_Entry_Spec
         ; Entry_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Entry_Decl_F_Overriding := Entry_Decl_F_Overriding;
            Self.Entry_Decl_F_Spec := Entry_Decl_F_Spec;
            Self.Entry_Decl_F_Aspects := Entry_Decl_F_Aspects;
      end Initialize_Fields_For_Entry_Decl;
   function Entry_Decl_F_Overriding
     (Node : Bare_Entry_Decl) return Bare_Overriding_Node
   is
   begin
         return Node.Entry_Decl_F_Overriding;
   end;
   function Entry_Decl_F_Spec
     (Node : Bare_Entry_Decl) return Bare_Entry_Spec
   is
   begin
         return Node.Entry_Decl_F_Spec;
   end;
--# property-start EntryDecl.subp_decl_spec ada/nodes.lkt:10009
pragma Warnings (Off, "is not referenced");
 function Entry_Decl_P_Subp_Decl_Spec
  (Node : Bare_Entry_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
     Ent : Internal_Entity_Entry_Decl :=
       Internal_Entity_Entry_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Subp_Spec;
      Fld : Internal_Entity_Entry_Spec;
Cast_Result : Internal_Entity_Base_Subp_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 5520 '<FieldAccess for spec at nodes.lkt:10009:50>' Fld ada/nodes.lkt:10009
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Entry_Spec (Node => Ent.Node.Entry_Decl_F_Spec, Info => Ent.Info);
--# expr-done 5520
      Cast_Result := Create_Internal_Entity_Base_Subp_Spec
        (Node => Fld.Node,
         Info => Fld.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Decl_P_Subp_Decl_Spec;
--# end
--# property-start EntryDecl.defining_names ada/nodes.lkt:10011
pragma Warnings (Off, "is not referenced");
 function Entry_Decl_P_Defining_Names
  (Node : Bare_Entry_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
     Ent : Internal_Entity_Entry_Decl :=
       Internal_Entity_Entry_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_843 with Inline_Always;
      Fld : Internal_Entity_Entry_Spec;
Fld_1 : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_843 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_843;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5523 '<ArrayLiteral at nodes.lkt:10011:57>' Array_Lit ada/nodes.lkt:10011
--# expr-start 5522 '<FieldAccess for name at nodes.lkt:10011:58>' Fld_1 ada/nodes.lkt:10011
--# expr-start 5521 '<FieldAccess for spec at nodes.lkt:10011:58>' Fld ada/nodes.lkt:10011
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Entry_Spec (Node => Ent.Node.Entry_Decl_F_Spec, Info => Ent.Info);
--# expr-done 5521
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 5522
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld_1)); 
--# expr-done 5523
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_843;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_843;
            raise;
      end;
   return Property_Result;
end Entry_Decl_P_Defining_Names;
--# end
--# property-start EntryDecl.body_part ada/nodes.lkt:10016
pragma Warnings (Off, "is not referenced");
 function Entry_Decl_P_Body_Part
  (Node : Bare_Entry_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Body_Node
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
     Ent : Internal_Entity_Entry_Decl :=
       Internal_Entity_Entry_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Body_Node;
      Fld : Internal_Entity_Body_Node;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 5524 '<FieldAccess for body_part_for_decl at nodes.lkt:10016:37>' Fld ada/nodes.lkt:10016
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.body_part_for_decl
Fld := Libadalang.Implementation.Basic_Decl_P_Body_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5524
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Decl_P_Body_Part;
--# end
--# property-start EntryDecl.has_family ada/nodes.lkt:10019
pragma Warnings (Off, "is not referenced");
 function Entry_Decl_P_Has_Family
  (Node : Bare_Entry_Decl
  )
   return Boolean
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Entry_Spec;
Fld_1 : Bare_Ada_Node;
Is_Null : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5528 '<Not at nodes.lkt:10019:30>' Not_Val ada/nodes.lkt:10019
--# expr-start 5527 '<IsNull at nodes.lkt:10019:34>' Is_Null ada/nodes.lkt:10019
--# expr-start 5526 '<FieldAccess for family_type at nodes.lkt:10019:34>' Fld_1 ada/nodes.lkt:10019
--# expr-start 5525 '<FieldAccess for spec at nodes.lkt:10019:34>' Fld ada/nodes.lkt:10019
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Entry_Decl_F_Spec;
--# expr-done 5525
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Entry_Spec_F_Family_Type;
--# expr-done 5526
Is_Null := Fld_1 = null; 
--# expr-done 5527
Not_Val := not (Is_Null); 
--# expr-done 5528
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Decl_P_Has_Family;
--# end
--# property-start EntryDecl.family_type ada/nodes.lkt:10025
pragma Warnings (Off, "is not referenced");
 function Entry_Decl_P_Family_Type
  (Node : Bare_Entry_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
     Ent : Internal_Entity_Entry_Decl :=
       Internal_Entity_Entry_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_154 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_Entry_Spec;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Type_Expr;
Fld_2 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5531 '<Cast to TypeExpr at nodes.lkt:10026:9>' Cast_Result ada/nodes.lkt:10026
--# expr-start 5530 '<FieldAccess for family_type at nodes.lkt:10026:9>' Fld_1 ada/nodes.lkt:10026
--# expr-start 5529 '<FieldAccess for spec at nodes.lkt:10026:9>' Fld ada/nodes.lkt:10026
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Entry_Spec (Node => Ent.Node.Entry_Decl_F_Spec, Info => Ent.Info);
--# expr-done 5529
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity (Node => Fld.Node.Entry_Spec_F_Family_Type, Info => Fld.Info);
--# expr-done 5530
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Type_Expr
   then
      Cast_Result := Create_Internal_Entity_Type_Expr
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Type_Expr;
   end if;
--# expr-done 5531
Var_Expr_154 := Cast_Result;
if Var_Expr_154 /= No_Entity_Type_Expr then
   --# scope-start
--# expr-start 5532 '<FieldAccess for designated_type at nodes.lkt:10026:9>' Fld_2 ada/nodes.lkt:10026
      if Var_Expr_154.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Var_Expr_154.Node, Origin => Origin, E_Info => Var_Expr_154.Info);
--# end
--# expr-done 5532
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Decl_P_Family_Type;
--# end
--# property-start EntryDecl.accept_stmts ada/nodes.lkt:10030
pragma Warnings (Off, "is not referenced");
 function Entry_Decl_P_Accept_Stmts
  (Node : Bare_Entry_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Accept_Stmt_Array_Access
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
     Ent : Internal_Entity_Entry_Decl :=
       Internal_Entity_Entry_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Accept_Stmt_Array_Access;
            procedure Finalizer_Scope_847 with Inline_Always;
      Match_0 : Internal_Entity_Single_Task_Type_Decl;
Match_1 : Internal_Entity_Task_Type_Decl;
Match_2 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Single_Task_Type_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Task_Type_Decl;
Cast_Expr : Internal_Entity_Task_Type_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Body_Node;
Cast_Result_4 : Internal_Entity;
Fld_3 : Internal_Entity_Accept_Stmt_Array_Access;
            procedure Finalizer_Scope_847 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_847;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 5537 '<FieldAccess for find_accept_stmts at nodes.lkt:10031:9>' Fld_3 ada/nodes.lkt:10031
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5536 '<FieldAccess for body_part_for_decl at nodes.lkt:10033:13>' Fld_2 ada/nodes.lkt:10033
--# expr-start 5535 '<Match at nodes.lkt:10033:13>' Match_Result ada/nodes.lkt:10033
--# expr-start 5533 '<FieldAccess for parent_basic_decl at nodes.lkt:10033:19>' Fld ada/nodes.lkt:10033
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5533
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Single_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Single_Task_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind st Match_0
--# expr-start 5534 '<FieldAccess for parent_basic_decl at nodes.lkt:10034:56>' Fld_1 ada/nodes.lkt:10034
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_1 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 5534
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Task_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind tt Match_1
Cast_Expr := Match_1; 
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Let_Result_1 := Cast_Result_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Protected_Type_Decl | Ada_Anonymous_Type_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := raise Precondition_Failure with "Can only be called on EntryDecl in Tasks"; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 5535
      if Match_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.body_part_for_decl
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Body_Part_For_Decl (Node => Match_Result.Node, Imprecise_Fallback => False, E_Info => Match_Result.Info);
--# end
--# expr-done 5536
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
--# property-call-start EntryDecl.find_accept_stmts
Fld_3 := Libadalang.Implementation.Entry_Decl_P_Find_Accept_Stmts (Node => Ent.Node, Root => Cast_Result_4, E_Info => Ent.Info);
--# end
--# expr-done 5537
         Property_Result := Fld_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_847;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_847;
            raise;
      end;
   return Property_Result;
end Entry_Decl_P_Accept_Stmts;
--# end
--# property-start EntryDecl.find_accept_stmts ada/nodes.lkt:10046
pragma Warnings (Off, "is not referenced");
 function Entry_Decl_P_Find_Accept_Stmts
  (Node : Bare_Entry_Decl
      ; Root : Internal_Entity
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Accept_Stmt_Array_Access
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
     Ent : Internal_Entity_Entry_Decl :=
       Internal_Entity_Entry_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind root Root
   Property_Result : Internal_Entity_Accept_Stmt_Array_Access;
            procedure Finalizer_Scope_848 with Inline_Always;
            procedure Finalizer_Scope_2682 with Inline_Always;
            procedure Finalizer_Scope_2684 with Inline_Always;
            procedure Finalizer_Scope_2685 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Array_Access;
Var_Expr_3 : Internal_Entity_Accept_Stmt;
Fld : Internal_Entity_Array_Access;
Is_Null : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Array_Access;
Fld_1 : Internal_Entity_Accept_Stmt_Array_Access;
Map_Result_1 : Internal_Entity_Accept_Stmt_Array_Access;
Scope_Result : Internal_Entity_Accept_Stmt_Array_Access;
Result_Var : Internal_Entity_Accept_Stmt_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Accept_Stmt;
Array_Lit : Internal_Entity_Accept_Stmt_Array_Access;
Fld_2 : Internal_Entity_Entry_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Entry_Decl;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Accept_Stmt_Array_Access;
Scope_Result_1 : Internal_Entity_Accept_Stmt_Array_Access;
Result_Var_1 : Internal_Entity_Accept_Stmt_Array_Access;
Concat_Result : Internal_Entity_Accept_Stmt_Array_Access;
            procedure Finalizer_Scope_848 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_848;
            procedure Finalizer_Scope_2682 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_2682;
            procedure Finalizer_Scope_2684 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2684;
            procedure Finalizer_Scope_2685 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2685;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5538 '<children at nodes.lkt:10047:9>' Fld ada/nodes.lkt:10047
      if Root.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children (Node => Root.Node, E_Info => Root.Info);
--# expr-done 5538
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= No_Internal_Entity_Array_Type then
   --# scope-start
   --# bind child Var_Expr_0
--# expr-start 5543 '<Mapcat at nodes.lkt:10049:13>' Map_Result_1 ada/nodes.lkt:10049
   --# expr-start 5541 '<Map at nodes.lkt:10049:13>' Map_Result ada/nodes.lkt:10049
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Var_Expr_0;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_1
         --# expr-start 5540 '<Not at nodes.lkt:10049:33>' Not_Val ada/nodes.lkt:10049
--# expr-start 5539 '<IsNull at nodes.lkt:10049:37>' Is_Null ada/nodes.lkt:10049
Is_Null := Item_1.Node = null; 
--# expr-done 5539
Not_Val := not (Is_Null); 
--# expr-done 5540
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity := Item_1;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 5541
      declare
         Map_Result_1_Vec : Internal_Entity_Accept_Stmt_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_2
      --# expr-start 5542 '<FieldAccess for find_accept_stmts at nodes.lkt:10050:24>' Fld_1 ada/nodes.lkt:10050
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EntryDecl.find_accept_stmts
Fld_1 := Libadalang.Implementation.Entry_Decl_P_Find_Accept_Stmts (Node => Ent.Node, Root => Item_2, E_Info => Ent.Info);
--# end
--# expr-done 5542
         for Item_To_Append of
               Fld_1.Items
         loop
            Internal_Entity_Accept_Stmt_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2684;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Accept_Stmt_Array
           (Items_Count => Natural (Internal_Entity_Accept_Stmt_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Accept_Stmt_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Accept_Stmt_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Accept_Stmt_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 5543
Scope_Result := Map_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2682;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Accept_Stmt_Array_Type;
end if;
      Inc_Ref (Result_Var);
--# expr-start 5544 '<Cast to AcceptStmt at nodes.lkt:10053:11>' Cast_Result ada/nodes.lkt:10053
Cast_Expr := Root; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Accept_Stmt_Range
   then
      Cast_Result := Create_Internal_Entity_Accept_Stmt
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Accept_Stmt;
   end if;
--# expr-done 5544
Var_Expr_3 := Cast_Result;
if Var_Expr_3 /= No_Entity_Accept_Stmt then
   --# scope-start
   --# bind stmt Var_Expr_3
--# expr-start 5548 '<If at nodes.lkt:10055:13>' If_Result ada/nodes.lkt:10055
--# expr-start 5546 '<Eq at nodes.lkt:10055:16>' Is_Equiv ada/nodes.lkt:10055
--# expr-start 5545 '<FieldAccess for corresponding_entry at nodes.lkt:10055:16>' Fld_2 ada/nodes.lkt:10055
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AcceptStmt.corresponding_entry
Fld_2 := Libadalang.Implementation.Accept_Stmt_P_Corresponding_Entry (Node => Var_Expr_3.Node, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 5545
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Cast_Expr_1 := Ent; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 5546
if Is_Equiv then
   --# expr-start 5547 '<ArrayLiteral at nodes.lkt:10055:56>' Array_Lit ada/nodes.lkt:10055
Array_Lit := Create_Internal_Entity_Accept_Stmt_Array (Internal_Internal_Entity_Accept_Stmt_Array'(1 => Var_Expr_3)); 
--# expr-done 5547
   If_Result := Array_Lit;
else
   If_Result := No_Internal_Entity_Accept_Stmt_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 5548
Scope_Result_1 := If_Result;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2685;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Accept_Stmt_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Concat_Result := Concat (Result_Var, Result_Var_1); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_848;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_848;
                     Finalizer_Scope_2682;
                     Finalizer_Scope_2684;
                     Finalizer_Scope_2685;
            raise;
      end;
   return Property_Result;
end Entry_Decl_P_Find_Accept_Stmts;
--# end
--# property-start EntryDecl.next_part_for_decl ada/nodes.lkt:10063
pragma Warnings (Off, "is not referenced");
 function Entry_Decl_P_Next_Part_For_Decl
  (Node : Bare_Entry_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
     Ent : Internal_Entity_Entry_Decl :=
       Internal_Entity_Entry_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_849 with Inline_Always;
      Var_Expr_155 : Internal_Entity_Accept_Stmt;
Fld : Internal_Entity_Accept_Stmt_Array_Access;
Get_Result : Internal_Entity_Accept_Stmt;
Fld_1 : Internal_Entity_Accept_Stmt_Body;
Scope_Result : Internal_Entity_Accept_Stmt_Body;
Result_Var : Internal_Entity_Accept_Stmt_Body;
Fld_2 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
If_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_849 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_849;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5555 '<If at nodes.lkt:10065:9>' If_Result ada/nodes.lkt:10065
--# expr-start 5550 '<IsA SingleTaskTypeDecl, TaskTypeDecl at nodes.lkt:10065:12>' Is_A ada/nodes.lkt:10065
--# expr-start 5549 '<FieldAccess for parent_basic_decl at nodes.lkt:10065:12>' Fld_3 ada/nodes.lkt:10065
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_3 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5549
Is_A := Fld_3.Node /= null 
and then Fld_3.Node.Kind in Ada_Single_Task_Type_Decl_Range | Ada_Task_Type_Decl_Range; 
--# expr-done 5550
if Is_A then
--# expr-start 5552 '<at at nodes.lkt:10066:14>' Get_Result ada/nodes.lkt:10066
--# expr-start 5551 '<FieldAccess for accept_stmts at nodes.lkt:10066:14>' Fld ada/nodes.lkt:10066
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EntryDecl.accept_stmts
Fld := Libadalang.Implementation.Entry_Decl_P_Accept_Stmts (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5551
Get_Result := Get (Self, Fld, 0, True); 
--# expr-done 5552
Var_Expr_155 := Get_Result;
if Var_Expr_155 /= No_Entity_Accept_Stmt then
   --# scope-start
--# expr-start 5553 '<FieldAccess for body_decl at nodes.lkt:10066:14>' Fld_1 ada/nodes.lkt:10066
      if Var_Expr_155.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Accept_Stmt_Body (Node => Var_Expr_155.Node.Accept_Stmt_F_Body_Decl, Info => Var_Expr_155.Info);
--# expr-done 5553
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Accept_Stmt_Body;
end if;
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   If_Result := Cast_Result;
else
   --# expr-start 5554 '<Super at nodes.lkt:10069:14>' Fld_2 ada/nodes.lkt:10069
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicSubpDecl.next_part_for_decl
Fld_2 := Libadalang.Implementation.Basic_Subp_Decl_P_Next_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5554
   If_Result := Fld_2;
end if;
--# expr-done 5555
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_849;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_849;
            raise;
      end;
   return Property_Result;
end Entry_Decl_P_Next_Part_For_Decl;
--# end
--# property-start EntryDecl._env_mappings_47 ada/nodes.lkt:10072
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_47
  (Node : Bare_Entry_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
     Ent : Internal_Entity_Entry_Decl :=
       Internal_Entity_Entry_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1711 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Entry_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1711 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1711;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5558 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 5556 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 5556
--# expr-start 5557 '<FieldAccess for name_symbol at nodes.lkt:10072:23>' Fld ada/nodes.lkt:10072
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 5557
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 5558
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1711;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1711;
            raise;
      end;
   return Property_Result;
end Env_Mappings_47;
--# end
--# property-start EntryDecl._env_trans_parent_48 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_48
  (Node : Bare_Entry_Decl
  )
   return Boolean
is
   Self : Bare_Entry_Decl  := Bare_Entry_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_48;
--# end
   --
   --  Primitives for Bare_Enum_Literal_Decl
   --
      procedure Enum_Literal_Decl_Pre_Env_Actions
        (Self            : Bare_Enum_Literal_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_49 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:10135:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_50 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Enum_Literal_Decl
        (Self : Bare_Enum_Literal_Decl
         ; Enum_Literal_Decl_F_Name : Bare_Defining_Name
        ) is
      begin
            Self.Enum_Literal_Decl_F_Name := Enum_Literal_Decl_F_Name;
      end Initialize_Fields_For_Enum_Literal_Decl;
   function Enum_Literal_Decl_F_Name
     (Node : Bare_Enum_Literal_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Enum_Literal_Decl_F_Name;
   end;
--# property-start EnumLiteralDecl.is_static_decl ada/nodes.lkt:10087
pragma Warnings (Off, "is not referenced");
 function Enum_Literal_Decl_P_Is_Static_Decl
  (Node : Bare_Enum_Literal_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Literal_Decl_P_Is_Static_Decl;
--# end
--# property-start EnumLiteralDecl.is_constant_object ada/nodes.lkt:10089
pragma Warnings (Off, "is not referenced");
 function Enum_Literal_Decl_P_Is_Constant_Object
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Literal_Decl_P_Is_Constant_Object;
--# end
--# property-start EnumLiteralDecl.enum_rep ada/nodes.lkt:10096
pragma Warnings (Off, "is not referenced");
 function Enum_Literal_Decl_P_Enum_Rep
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Big_Integer_Type
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
     Ent : Internal_Entity_Enum_Literal_Decl :=
       Internal_Entity_Enum_Literal_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Big_Integer_Type;
            procedure Finalizer_Scope_852 with Inline_Always;
      Local_Enum_Type : Internal_Entity_Type_Decl;
Local_Rep_Clause : Internal_Entity_Enum_Rep_Clause;
Local_Pos : Integer;
Fld : Internal_Entity_Type_Decl;
Fld_1 : Internal_Entity_Enum_Rep_Clause;
Fld_2 : Integer;
Big_Int : Big_Integer_Type;
Fld_3 : Internal_Entity_Base_Aggregate;
Fld_4 : Internal_Entity_Assoc_List;
Fld_5 : Bare_Assoc_List;
Fld_6 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_7 : Internal_Entity_Expr;
Fld_8 : Big_Integer_Type;
Is_Null_1 : Boolean;
If_Result_1 : Big_Integer_Type;
Let_Result : Big_Integer_Type;
Let_Result_1 : Big_Integer_Type;
Let_Result_2 : Big_Integer_Type;
            procedure Finalizer_Scope_852 is
            begin
                     Dec_Ref (Big_Int);
                     Dec_Ref (Fld_8);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_852;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 5571 '<Let at nodes.lkt:10097:9>' Let_Result_2 ada/nodes.lkt:10097
--# scope-start
--# expr-start 5559 '<FieldAccess for enum_type at nodes.lkt:10097:25>' Fld ada/nodes.lkt:10097
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]EnumLiteralDecl.enum_type'
Fld := Libadalang.Implementation.Dispatcher_Enum_Literal_Decl_P_Enum_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5559
Local_Enum_Type := Fld; 
--# bind enum_type Local_Enum_Type
--# expr-start 5570 '<Let at nodes.lkt:10098:9>' Let_Result_1 ada/nodes.lkt:10098
--# scope-start
--# expr-start 5560 '<FieldAccess for get_enum_representation_clause at nodes.lkt:10098:26>' Fld_1 ada/nodes.lkt:10098
      if Local_Enum_Type.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.get_enum_representation_clause
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Get_Enum_Representation_Clause (Node => Local_Enum_Type.Node, Imprecise_Fallback => False, E_Info => Local_Enum_Type.Info);
--# end
--# expr-done 5560
Local_Rep_Clause := Fld_1; 
--# bind rep_clause Local_Rep_Clause
--# expr-start 5569 '<Let at nodes.lkt:10101:9>' Let_Result ada/nodes.lkt:10101
--# scope-start
--# expr-start 5561 '<FieldAccess for child_index at nodes.lkt:10101:19>' Fld_2 ada/nodes.lkt:10101
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Child_Index (Node => Self);
--# expr-done 5561
Local_Pos := Fld_2; 
--# bind pos Local_Pos
--# expr-start 5568 '<If at nodes.lkt:10103:9>' If_Result_1 ada/nodes.lkt:10103
--# expr-start 5562 '<IsNull at nodes.lkt:10103:12>' Is_Null_1 ada/nodes.lkt:10103
Is_Null_1 := Local_Rep_Clause.Node = null; 
--# expr-done 5562
if Is_Null_1 then
   --# expr-start 5563 '<BigInteger <Ref for <Var pos at nodes.lkt:10101:9>> at nodes.lkt:10107:13>' Big_Int ada/nodes.lkt:10107
Big_Int := Create_Big_Integer (Local_Pos); 
--# expr-done 5563
   If_Result_1 := Big_Int;
else
   --# expr-start 5567 '<FieldAccess for eval_as_int at nodes.lkt:10114:13>' Fld_8 ada/nodes.lkt:10114
--# expr-start 5566 '<FieldAccess for expr at nodes.lkt:10114:13>' Fld_7 ada/nodes.lkt:10114
--# expr-start 5565 '<FieldAccess for assocs at nodes.lkt:10114:13>' Fld_4 ada/nodes.lkt:10114
--# expr-start 5564 '<FieldAccess for aggregate at nodes.lkt:10114:13>' Fld_3 ada/nodes.lkt:10114
      if Local_Rep_Clause.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Base_Aggregate (Node => Local_Rep_Clause.Node.Enum_Rep_Clause_F_Aggregate, Info => Local_Rep_Clause.Info);
--# expr-done 5564
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Assoc_List (Node => Fld_3.Node.Base_Aggregate_F_Assocs, Info => Fld_3.Info);
--# expr-done 5565
Fld_5 := Fld_4.Node;
Get_Result := Get (Self, Fld_5, Local_Pos, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_6 := Fld_4.Info;
As_Entity := (Info => Fld_6, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 5566
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_8 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 5567
   If_Result_1 := Fld_8;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 5568
Let_Result := If_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 5569
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 5570
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 5571
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_852;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_852;
            raise;
      end;
   return Property_Result;
end Enum_Literal_Decl_P_Enum_Rep;
--# end
--# property-start EnumLiteralDecl.defining_names ada/nodes.lkt:10118
pragma Warnings (Off, "is not referenced");
 function Enum_Literal_Decl_P_Defining_Names
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
     Ent : Internal_Entity_Enum_Literal_Decl :=
       Internal_Entity_Enum_Literal_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_853 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_853 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_853;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5573 '<ArrayLiteral at nodes.lkt:10118:57>' Array_Lit ada/nodes.lkt:10118
--# expr-start 5572 '<FieldAccess for name at nodes.lkt:10118:58>' Fld ada/nodes.lkt:10118
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Enum_Literal_Decl_F_Name, Info => Ent.Info);
--# expr-done 5572
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 5573
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_853;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_853;
            raise;
      end;
   return Property_Result;
end Enum_Literal_Decl_P_Defining_Names;
--# end
--# property-start EnumLiteralDecl.synth_type_expr ada/nodes.lkt:10121
pragma Warnings (Off, "is not referenced");
 function Enum_Literal_Decl_P_Synth_Type_Expr
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Enum_Lit_Synth_Type_Expr
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Enum_Lit_Synth_Type_Expr;
      New_Node : Bare_Enum_Lit_Synth_Type_Expr;
As_Entity : Internal_Entity_Enum_Lit_Synth_Type_Expr;
Is_Null : Boolean;
If_Result : Internal_Entity_Enum_Lit_Synth_Type_Expr;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Enum_Literal_Decl_Enum_Literal_Decl_P_Synth_Type_Expr,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Enum_Literal_Decl,
                                As_Bare_Enum_Literal_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Enum_Lit_Synth_Type_Expr;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 5575 '<as_entity at nodes.lkt:10122:9>' If_Result ada/nodes.lkt:10122
--# expr-start 5574 '<New EnumLitSynthTypeExpr at nodes.lkt:10122:9>' New_Node ada/nodes.lkt:10122
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
New_Node := new Root_Node_Record
  (Ada_Enum_Lit_Synth_Type_Expr);
Initialize
  (Self => New_Node,
   Kind => Ada_Enum_Lit_Synth_Type_Expr,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
--# expr-done 5574
Is_Null := New_Node = null; 
if Is_Null then
   If_Result := No_Entity_Enum_Lit_Synth_Type_Expr;
else
As_Entity := (Info => E_Info, Node => New_Node); 
   If_Result := As_Entity;
end if;
--# expr-done 5575
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Enum_Lit_Synth_Type_Expr,
                        As_Internal_Entity_Enum_Lit_Synth_Type_Expr => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Enum_Literal_Decl_P_Synth_Type_Expr;
--# end
--# property-start EnumLiteralDecl.subp_decl_spec ada/nodes.lkt:10125
pragma Warnings (Off, "is not referenced");
 function Enum_Literal_Decl_P_Subp_Decl_Spec
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Subp_Spec;
      New_Node : Bare_Enum_Subp_Spec;
As_Entity : Internal_Entity_Enum_Subp_Spec;
Is_Null : Boolean;
If_Result : Internal_Entity_Enum_Subp_Spec;
Cast_Result : Internal_Entity_Base_Subp_Spec;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Enum_Literal_Decl_Enum_Literal_Decl_P_Subp_Decl_Spec,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Enum_Literal_Decl,
                                As_Bare_Enum_Literal_Decl => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Subp_Spec;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
--# expr-start 5577 '<as_entity at nodes.lkt:10125:50>' If_Result ada/nodes.lkt:10125
--# expr-start 5576 '<New EnumSubpSpec at nodes.lkt:10125:50>' New_Node ada/nodes.lkt:10125
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
New_Node := new Root_Node_Record
  (Ada_Enum_Subp_Spec);
Initialize
  (Self => New_Node,
   Kind => Ada_Enum_Subp_Spec,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
--# expr-done 5576
Is_Null := New_Node = null; 
if Is_Null then
   If_Result := No_Entity_Enum_Subp_Spec;
else
As_Entity := (Info => E_Info, Node => New_Node); 
   If_Result := As_Entity;
end if;
--# expr-done 5577
      Cast_Result := Create_Internal_Entity_Base_Subp_Spec
        (Node => If_Result.Node,
         Info => If_Result.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Subp_Spec,
                        As_Internal_Entity_Base_Subp_Spec => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Enum_Literal_Decl_P_Subp_Decl_Spec;
--# end
--# property-start '[dispatcher]EnumLiteralDecl.enum_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Enum_Literal_Decl_P_Enum_Type
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Decl
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Enum_Literal_Decl_Range (Self.Kind) is
               when Ada_Enum_Literal_Decl =>
                  --# property-call-start EnumLiteralDecl.enum_type
                  Property_Result := Enum_Literal_Decl_P_Enum_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Char_Enum_Lit =>
                  --# property-call-start SyntheticCharEnumLit.enum_type
                  Property_Result := Synthetic_Char_Enum_Lit_P_Enum_Type
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Enum_Literal_Decl_P_Enum_Type;
--# end
--# property-start '[dispatcher]EnumLiteralDecl.enum_decl_name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Enum_Literal_Decl_P_Enum_Decl_Name
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
     Ent : Internal_Entity_Enum_Literal_Decl :=
       Internal_Entity_Enum_Literal_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Enum_Literal_Decl_Range (Self.Kind) is
               when Ada_Enum_Literal_Decl =>
                  --# property-call-start EnumLiteralDecl.enum_decl_name
                  Property_Result := Enum_Literal_Decl_P_Enum_Decl_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Char_Enum_Lit =>
                  --# property-call-start SyntheticCharEnumLit.enum_decl_name
                  Property_Result := Synthetic_Char_Enum_Lit_P_Enum_Decl_Name
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Enum_Literal_Decl_P_Enum_Decl_Name;
--# end
--# property-start EnumLiteralDecl._env_mappings_49 ada/nodes.lkt:10135
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_49
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
     Ent : Internal_Entity_Enum_Literal_Decl :=
       Internal_Entity_Enum_Literal_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1713 with Inline_Always;
      Fld : Symbol_Type;
Fld_1 : Internal_Entity_Type_Decl;
Fld_2 : Lexical_Env := Empty_Env;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Enum_Literal_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1713 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1713;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5582 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 5580 '<New DesignatedEnv at nodes.lkt:10138:22>' New_Struct ada/nodes.lkt:10138
--# expr-start 5579 '<FieldAccess for node_env at nodes.lkt:10141:28>' Fld_2 ada/nodes.lkt:10141
--# expr-start 5578 '<FieldAccess for enum_type at nodes.lkt:10141:28>' Fld_1 ada/nodes.lkt:10141
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]EnumLiteralDecl.enum_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Enum_Literal_Decl_P_Enum_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5578
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Node_Env (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# expr-done 5579
Inc_Ref (Fld_2);
New_Struct := (Direct_Env => Fld_2, Env_Name => No_Symbol, Kind => Direct_Env); 
--# expr-done 5580
--# expr-start 5581 '<FieldAccess for name_symbol at nodes.lkt:10136:13>' Fld ada/nodes.lkt:10136
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 5581
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 5582
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1713;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1713;
            raise;
      end;
   return Property_Result;
end Env_Mappings_49;
--# end
--# property-start EnumLiteralDecl._env_trans_parent_50 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_50
  (Node : Bare_Enum_Literal_Decl
  )
   return Boolean
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_50;
--# end
--# property-start EnumLiteralDecl.enum_type ada/nodes.lkt:10129
pragma Warnings (Off, "is not referenced");
 function Enum_Literal_Decl_P_Enum_Type
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Decl
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Decl;
            procedure Finalizer_Scope_856 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Cast_Result : Internal_Entity_Type_Decl;
            procedure Finalizer_Scope_856 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_856;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5587 '<Cast to TypeDecl at nodes.lkt:10130:9>' Cast_Result ada/nodes.lkt:10130
--# expr-start 5586 '<as_entity at nodes.lkt:10130:9>' If_Result ada/nodes.lkt:10130
--# expr-start 5585 '<Find at nodes.lkt:10130:9>' Find_Result ada/nodes.lkt:10130
   --# expr-start 5583 '<FieldAccess for parents at nodes.lkt:10130:9>' Node_Parents ada/nodes.lkt:10130
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 5583
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 5584 '<IsA TypeDecl at nodes.lkt:10130:36>' Is_A ada/nodes.lkt:10130
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Type_Decl; 
--# expr-done 5584
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 5585
Is_Null := Find_Result = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Find_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 5586
   if If_Result.Node = null
      or else If_Result.Node.Kind in Ada_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => If_Result.Node,
         Info => If_Result.Info);
   else
         Cast_Result := No_Entity_Type_Decl;
   end if;
--# expr-done 5587
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_856;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_856;
            raise;
      end;
   return Property_Result;
end Enum_Literal_Decl_P_Enum_Type;
--# end
--# property-start EnumLiteralDecl.enum_decl_name ada/nodes.lkt:10132
pragma Warnings (Off, "is not referenced");
 function Enum_Literal_Decl_P_Enum_Decl_Name
  (Node : Bare_Enum_Literal_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Enum_Literal_Decl  := Bare_Enum_Literal_Decl (Node);
     Ent : Internal_Entity_Enum_Literal_Decl :=
       Internal_Entity_Enum_Literal_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5588 '<FieldAccess for name at nodes.lkt:10132:50>' Fld ada/nodes.lkt:10132
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Enum_Literal_Decl_F_Name, Info => Ent.Info);
--# expr-done 5588
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Literal_Decl_P_Enum_Decl_Name;
--# end
   --
   --  Primitives for Bare_Synthetic_Char_Enum_Lit
   --
      procedure Initialize_Fields_For_Synthetic_Char_Enum_Lit
        (Self : Bare_Synthetic_Char_Enum_Lit
         ; Enum_Literal_Decl_F_Name : Bare_Defining_Name
        ) is
      begin
            Initialize_Fields_For_Enum_Literal_Decl
              (Self, Enum_Literal_Decl_F_Name);
      Self.Synthetic_Char_Enum_Lit_Char_Symbol := No_Symbol;
      Self.Synthetic_Char_Enum_Lit_Enum_Type_Decl := No_Entity_Type_Decl;
      end Initialize_Fields_For_Synthetic_Char_Enum_Lit;
--# property-start SyntheticCharEnumLit.enum_type ada/nodes.lkt:10157
pragma Warnings (Off, "is not referenced");
 function Synthetic_Char_Enum_Lit_P_Enum_Type
  (Node : Bare_Synthetic_Char_Enum_Lit
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Decl
is
   Self : Bare_Synthetic_Char_Enum_Lit  := Bare_Synthetic_Char_Enum_Lit (Node);
     Ent : Internal_Entity_Synthetic_Char_Enum_Lit :=
       Internal_Entity_Synthetic_Char_Enum_Lit'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Decl;
      Fld : Internal_Entity_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5589 '<FieldAccess for enum_type_decl at nodes.lkt:10157:41>' Fld ada/nodes.lkt:10157
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Ent.Node.Synthetic_Char_Enum_Lit_Enum_Type_Decl;
--# expr-done 5589
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Char_Enum_Lit_P_Enum_Type;
--# end
--# property-start SyntheticCharEnumLit.expr ada/nodes.lkt:10161
pragma Warnings (Off, "is not referenced");
 function Synthetic_Char_Enum_Lit_P_Expr
  (Node : Bare_Synthetic_Char_Enum_Lit
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Synthetic_Char_Enum_Lit  := Bare_Synthetic_Char_Enum_Lit (Node);
     Ent : Internal_Entity_Synthetic_Char_Enum_Lit :=
       Internal_Entity_Synthetic_Char_Enum_Lit'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_859 with Inline_Always;
      Fld : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_859 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_859;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 5591 '<at at nodes.lkt:10161:40>' Get_Result ada/nodes.lkt:10161
--# expr-start 5590 '<FieldAccess for defining_names at nodes.lkt:10161:40>' Fld ada/nodes.lkt:10161
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5590
Get_Result := Get (Self, Fld, 0, True); 
--# expr-done 5591
         Property_Result := Get_Result;
   --# end
      Finalizer_Scope_859;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_859;
            raise;
      end;
   return Property_Result;
end Synthetic_Char_Enum_Lit_P_Expr;
--# end
--# property-start SyntheticCharEnumLit.enum_decl_name ada/nodes.lkt:10163
pragma Warnings (Off, "is not referenced");
 function Synthetic_Char_Enum_Lit_P_Enum_Decl_Name
  (Node : Bare_Synthetic_Char_Enum_Lit
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Synthetic_Char_Enum_Lit  := Bare_Synthetic_Char_Enum_Lit (Node);
     Ent : Internal_Entity_Synthetic_Char_Enum_Lit :=
       Internal_Entity_Synthetic_Char_Enum_Lit'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5592 '<FieldAccess for expr at nodes.lkt:10163:50>' Fld ada/nodes.lkt:10163
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SyntheticCharEnumLit.expr
Fld := Libadalang.Implementation.Synthetic_Char_Enum_Lit_P_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5592
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Char_Enum_Lit_P_Enum_Decl_Name;
--# end
--# property-start SyntheticCharEnumLit.defining_names ada/nodes.lkt:10165
pragma Warnings (Off, "is not referenced");
 function Synthetic_Char_Enum_Lit_P_Defining_Names
  (Node : Bare_Synthetic_Char_Enum_Lit
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Synthetic_Char_Enum_Lit  := Bare_Synthetic_Char_Enum_Lit (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_861 with Inline_Always;
      Fld : Symbol_Type;
Fld_1 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_861 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_861;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5596 '<ArrayLiteral at nodes.lkt:10166:9>' Array_Lit ada/nodes.lkt:10166
--# expr-start 5595 '<as_entity at nodes.lkt:10166:10>' If_Result ada/nodes.lkt:10166
--# expr-start 5594 '<FieldAccess for synthesize_defining_name at nodes.lkt:10166:10>' Fld_1 ada/nodes.lkt:10166
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5593 '<FieldAccess for char_symbol at nodes.lkt:10166:40>' Fld ada/nodes.lkt:10166
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Synthetic_Char_Enum_Lit_Char_Symbol;
--# expr-done 5593
--# property-call-start AdaNode.synthesize_defining_name
Fld_1 := Libadalang.Implementation.Ada_Node_P_Synthesize_Defining_Name (Node => Self, Sym => Fld);
--# end
--# expr-done 5594
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 5595
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => If_Result)); 
--# expr-done 5596
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_861;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_861;
            raise;
      end;
   return Property_Result;
end Synthetic_Char_Enum_Lit_P_Defining_Names;
--# end
   --
   --  Primitives for Bare_Generic_Subp_Internal
   --
      procedure Generic_Subp_Internal_Pre_Env_Actions
        (Self            : Bare_Generic_Subp_Internal;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_51 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_52 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Generic_Subp_Internal
        (Self : Bare_Generic_Subp_Internal
         ; Generic_Subp_Internal_F_Subp_Spec : Bare_Subp_Spec
         ; Generic_Subp_Internal_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Generic_Subp_Internal_F_Subp_Spec := Generic_Subp_Internal_F_Subp_Spec;
            Self.Generic_Subp_Internal_F_Aspects := Generic_Subp_Internal_F_Aspects;
      end Initialize_Fields_For_Generic_Subp_Internal;
   function Generic_Subp_Internal_F_Subp_Spec
     (Node : Bare_Generic_Subp_Internal) return Bare_Subp_Spec
   is
   begin
         return Node.Generic_Subp_Internal_F_Subp_Spec;
   end;
--# property-start GenericSubpInternal.subp_decl_spec ada/nodes.lkt:10176
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Internal_P_Subp_Decl_Spec
  (Node : Bare_Generic_Subp_Internal
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Generic_Subp_Internal  := Bare_Generic_Subp_Internal (Node);
     Ent : Internal_Entity_Generic_Subp_Internal :=
       Internal_Entity_Generic_Subp_Internal'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Subp_Spec;
      Fld : Internal_Entity_Subp_Spec;
Cast_Result : Internal_Entity_Base_Subp_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 5597 '<FieldAccess for subp_spec at nodes.lkt:10176:50>' Fld ada/nodes.lkt:10176
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Generic_Subp_Internal_F_Subp_Spec, Info => Ent.Info);
--# expr-done 5597
      Cast_Result := Create_Internal_Entity_Base_Subp_Spec
        (Node => Fld.Node,
         Info => Fld.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Internal_P_Subp_Decl_Spec;
--# end
--# property-start GenericSubpInternal._env_trans_parent_51 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_51
  (Node : Bare_Generic_Subp_Internal
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Internal  := Bare_Generic_Subp_Internal (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_51;
--# end
--# property-start GenericSubpInternal._env_names_52 ada/nodes.lkt:10179
pragma Warnings (Off, "is not referenced");
 function Env_Names_52
  (Node : Bare_Generic_Subp_Internal
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Generic_Subp_Internal  := Bare_Generic_Subp_Internal (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1716 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1716 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1716;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5598 '<FieldAccess for env_names at nodes.lkt:10179:23>' Fld ada/nodes.lkt:10179
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicSubpDecl.env_names
Fld := Libadalang.Implementation.Basic_Subp_Decl_P_Env_Names (Node => Self);
--# end
--# expr-done 5598
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1716;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1716;
            raise;
      end;
   return Property_Result;
end Env_Names_52;
--# end
   --
   --  Primitives for Bare_Synthetic_Subp_Decl
   --
      procedure Initialize_Fields_For_Synthetic_Subp_Decl
        (Self : Bare_Synthetic_Subp_Decl
         ; Synthetic_Subp_Decl_F_Spec : Bare_Base_Subp_Spec
        ) is
      begin
            Self.Synthetic_Subp_Decl_F_Spec := Synthetic_Subp_Decl_F_Spec;
      end Initialize_Fields_For_Synthetic_Subp_Decl;
   function Synthetic_Subp_Decl_F_Spec
     (Node : Bare_Synthetic_Subp_Decl) return Bare_Base_Subp_Spec
   is
   begin
         return Node.Synthetic_Subp_Decl_F_Spec;
   end;
--# property-start SyntheticSubpDecl.subp_decl_spec ada/nodes.lkt:10195
pragma Warnings (Off, "is not referenced");
 function Synthetic_Subp_Decl_P_Subp_Decl_Spec
  (Node : Bare_Synthetic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Spec
is
   Self : Bare_Synthetic_Subp_Decl  := Bare_Synthetic_Subp_Decl (Node);
     Ent : Internal_Entity_Synthetic_Subp_Decl :=
       Internal_Entity_Synthetic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Subp_Spec;
      Fld : Internal_Entity_Base_Subp_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5599 '<FieldAccess for spec at nodes.lkt:10195:50>' Fld ada/nodes.lkt:10195
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Base_Subp_Spec (Node => Ent.Node.Synthetic_Subp_Decl_F_Spec, Info => Ent.Info);
--# expr-done 5599
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Subp_Decl_P_Subp_Decl_Spec;
--# end
--# property-start SyntheticSubpDecl.next_part_for_decl ada/nodes.lkt:10198
pragma Warnings (Off, "is not referenced");
 function Synthetic_Subp_Decl_P_Next_Part_For_Decl
  (Node : Bare_Synthetic_Subp_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Synthetic_Subp_Decl  := Bare_Synthetic_Subp_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Basic_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Subp_Decl_P_Next_Part_For_Decl;
--# end
--# property-start SyntheticSubpDecl.is_static_decl ada/nodes.lkt:10201
pragma Warnings (Off, "is not referenced");
 function Synthetic_Subp_Decl_P_Is_Static_Decl
  (Node : Bare_Synthetic_Subp_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Synthetic_Subp_Decl  := Bare_Synthetic_Subp_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Subp_Decl_P_Is_Static_Decl;
--# end
   --
   --  Primitives for Bare_Body_Node
   --
--# property-start Body.env_hook_body ada/nodes.lkt:10209
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Env_Hook_Body
  (Node : Bare_Body_Node
  )
   return Boolean
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
            procedure Finalizer_Scope_866 with Inline_Always;
      Ignored : Internal_Unit;
Var_Expr_0 : Bare_Subp_Body;
As_Entity : Internal_Entity_Body_Node;
Is_Null : Boolean;
If_Result : Internal_Entity_Body_Node;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Symbol_Type_Array_Access;
Is_A : Boolean;
Not_Val : Boolean;
Fld_2 : Internal_Unit;
Cast_Expr : Bare_Body_Node;
Cast_Result : Bare_Subp_Body;
Fld_3 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Let_Result : Boolean;
Is_A_1 : Boolean;
If_Result_1 : Boolean;
            procedure Finalizer_Scope_866 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_866;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5610 '<If at nodes.lkt:10212:9>' If_Result_1 ada/nodes.lkt:10212
--# expr-start 5600 '<IsA PackageBody, SubpBody at nodes.lkt:10212:12>' Is_A_1 ada/nodes.lkt:10212
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Package_Body_Range | Ada_Subp_Body_Range; 
--# expr-done 5600
if Is_A_1 then
   --# expr-start 5609 '<Let at nodes.lkt:10214:13>' Let_Result ada/nodes.lkt:10214
--# scope-start
--# expr-start 5606 '<FieldAccess for get_unit at nodes.lkt:10215:17>' Fld_2 ada/nodes.lkt:10215
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5603 '<FieldAccess for as_symbol_array at nodes.lkt:10216:21>' Fld_1 ada/nodes.lkt:10216
--# expr-start 5602 '<FieldAccess for defining_name at nodes.lkt:10216:21>' Fld ada/nodes.lkt:10216
--# expr-start 5601 '<as_bare_entity at nodes.lkt:10216:21>' If_Result ada/nodes.lkt:10216
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Body_Node;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 5601
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 5602
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Fld.Node);
--# end
--# expr-done 5603
--# expr-start 5605 '<Not at nodes.lkt:10219:40>' Not_Val ada/nodes.lkt:10219
--# expr-start 5604 '<IsA SubpBody at nodes.lkt:10219:44>' Is_A ada/nodes.lkt:10219
Is_A := Self /= null 
and then Self.Kind in Ada_Subp_Body_Range; 
--# expr-done 5604
Not_Val := not (Is_A); 
--# expr-done 5605
Fld_2 := Libadalang.Implementation.Extensions.Ada_Node_P_Get_Unit (Node => Self, Name => Fld_1, Kind => Unit_Specification, Load_If_Needed => True, Not_Found_Is_Error => Not_Val);
--# expr-done 5606
Ignored := Fld_2; 
--# bind _ Ignored
--# expr-start 5607 '<Cast to SubpBody at nodes.lkt:10224:13>' Cast_Result ada/nodes.lkt:10224
Cast_Expr := Self; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Subp_Body_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 5607
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind subp_body Var_Expr_0
--# expr-start 5608 '<FieldAccess for env_hook_basic_decl at nodes.lkt:10225:32>' Fld_3 ada/nodes.lkt:10225
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.env_hook_basic_decl
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Env_Hook_Basic_Decl (Node => Var_Expr_0);
--# end
--# expr-done 5608
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Let_Result := Result_Var; 
--# end
--# expr-done 5609
   If_Result_1 := Let_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 5610
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_866;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_866;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Env_Hook_Body;
--# end
--# property-start Body.subunit_decl_env ada/nodes.lkt:10230
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Subunit_Decl_Env
  (Node : Bare_Body_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_867 with Inline_Always;
            procedure Finalizer_Scope_2689 with Inline_Always;
            procedure Finalizer_Scope_2690 with Inline_Always;
            procedure Finalizer_Scope_2692 with Inline_Always;
            procedure Finalizer_Scope_2693 with Inline_Always;
      Match_0 : Internal_Entity_Generic_Package_Decl;
Match_1 : Internal_Entity_Basic_Decl;
Match_2 : Internal_Entity;
Var_Expr_0 : Lexical_Env := Empty_Env;
Var_Expr_1 : Internal_Entity;
Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Internal_Entity_Generic_Package_Internal;
Fld_5 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Fld_6 : Lexical_Env := Empty_Env;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Generic_Package_Decl;
Let_Result : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Let_Result_1 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Cast_Result_2 : Internal_Entity;
Let_Result_2 : Lexical_Env := Empty_Env;
Scope_Result_2 : Lexical_Env := Empty_Env;
Match_Result : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Env_Get_Result_1 : Internal_Entity_Array_Access;
Get_Result_1 : Internal_Entity;
Fld_7 : Lexical_Env := Empty_Env;
Array_Lit_1 : Lexical_Env_Array_Access;
Group_Env_1 : Lexical_Env := Empty_Env;
Scope_Result_3 : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
Scope_Result_4 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_867 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Match_Result);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_867;
            procedure Finalizer_Scope_2689 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_2689;
            procedure Finalizer_Scope_2690 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_2690;
            procedure Finalizer_Scope_2692 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Env_Get_Result_1);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2692;
            procedure Finalizer_Scope_2693 is
            begin
                     Dec_Ref (Fld_7);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Group_Env_1);
            end Finalizer_Scope_2693;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5629 '<bind at nodes.lkt:10231:9>' Dyn_Var_Bind_Result ada/nodes.lkt:10231
--# expr-start 5611 '<FieldAccess for default_initial_env at nodes.lkt:10231:20>' Fld ada/nodes.lkt:10231
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.default_initial_env
Fld := Libadalang.Implementation.Ada_Node_P_Default_Initial_Env (Node => Self);
--# end
--# expr-done 5611
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 5622 '<Match at nodes.lkt:10233:9>' Match_Result ada/nodes.lkt:10233
--# expr-start 5615 '<at at nodes.lkt:10234:13>' Get_Result ada/nodes.lkt:10234
--# expr-start 5614 '<EnvGet at nodes.lkt:10234:13>' Env_Get_Result ada/nodes.lkt:10234
--# expr-start 5612 '<FieldAccess for body_scope at nodes.lkt:10234:13>' Fld_1 ada/nodes.lkt:10234
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_scope
Fld_1 := Libadalang.Implementation.Body_Node_P_Body_Scope (Node => Ent.Node, Follow_Private => True, Env => Bound_Env, E_Info => Ent.Info);
--# end
--# expr-done 5612
--# expr-start 5613 '<FieldAccess for name_symbol at nodes.lkt:10235:17>' Fld_2 ada/nodes.lkt:10235
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 5613
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_1, Key => Thin (Fld_2), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 5614
Get_Result := Get (Self, Env_Get_Result, 0, True); 
--# expr-done 5615
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Get_Result; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Generic_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Generic_Package_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind gpd Match_0
--# expr-start 5620 '<env_group at nodes.lkt:10245:17>' Group_Env ada/nodes.lkt:10245
--# expr-start 5619 '<ArrayLiteral at nodes.lkt:10245:17>' Array_Lit ada/nodes.lkt:10245
--# expr-start 5616 '<FieldAccess for children_env at nodes.lkt:10245:18>' Fld_3 ada/nodes.lkt:10245
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Match_0.Node, E_Info => Match_0.Info);
--# expr-done 5616
--# expr-start 5618 '<FieldAccess for children_env at nodes.lkt:10245:36>' Fld_5 ada/nodes.lkt:10245
--# expr-start 5617 '<FieldAccess for package_decl at nodes.lkt:10245:36>' Fld_4 ada/nodes.lkt:10245
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Generic_Package_Internal (Node => Match_0.Node.Generic_Package_Decl_F_Package_Decl, Info => Match_0.Info);
--# expr-done 5617
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Children_Env (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# expr-done 5618
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_3, 2 => Fld_5)); 
--# expr-done 5619
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 5620
Let_Result := Group_Env; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2689;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Abstract_State_Decl .. Ada_For_Loop_Var_Decl | Ada_Generic_Subp_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind pd Match_1
--# expr-start 5621 '<FieldAccess for children_env at nodes.lkt:10247:35>' Fld_6 ada/nodes.lkt:10247
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Children_Env (Node => Match_1.Node, E_Info => Match_1.Info);
--# expr-done 5621
Let_Result_1 := Fld_6; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2690;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := raise Property_Error with "PropertyError exception"; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
end case;
--# expr-done 5622
Var_Expr_0 := Match_Result;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_Env then
   --# scope-start
   --# bind public_part Var_Expr_0
--# expr-start 5625 '<at at nodes.lkt:10252:13>' Get_Result_1 ada/nodes.lkt:10252
--# expr-start 5624 '<EnvGet at nodes.lkt:10252:13>' Env_Get_Result_1 ada/nodes.lkt:10252
--# expr-start 5623 '<Symbol __privatepart at nodes.lkt:10253:17>' Sym ada/nodes.lkt:10253
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Privatepart); 
--# expr-done 5623
Env_Get_Result_1 := Construct_Entity_Array (AST_Envs.Get (Self => Var_Expr_0, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 5624
Get_Result_1 := Get (Self, Env_Get_Result_1, 0, True); 
--# expr-done 5625
Var_Expr_1 := Get_Result_1;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind pp Var_Expr_1
--# expr-start 5628 '<env_group at nodes.lkt:10261:25>' Group_Env_1 ada/nodes.lkt:10261
--# expr-start 5627 '<ArrayLiteral at nodes.lkt:10261:25>' Array_Lit_1 ada/nodes.lkt:10261
--# expr-start 5626 '<FieldAccess for children_env at nodes.lkt:10261:26>' Fld_7 ada/nodes.lkt:10261
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Children_Env (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# expr-done 5626
Array_Lit_1 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_7, 2 => Var_Expr_0)); 
--# expr-done 5627
Group_Env_1 := Group (Array_Lit_1, No_Metadata); 
--# expr-done 5628
Scope_Result_3 := Group_Env_1;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2693;
   Result_Var := Scope_Result_3;
else
   Result_Var := Var_Expr_0;
end if;
      Inc_Ref (Result_Var);
Scope_Result_4 := Result_Var;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2692;
   Result_Var_1 := Scope_Result_4;
else
   Result_Var_1 := Empty_Env;
end if;
      Inc_Ref (Result_Var_1);
Dyn_Var_Bind_Result := Result_Var_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 5629
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_867;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_867;
                     Finalizer_Scope_2689;
                     Finalizer_Scope_2690;
                     Finalizer_Scope_2692;
                     Finalizer_Scope_2693;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Subunit_Decl_Env;
--# end
--# property-start Body.in_scope ada/nodes.lkt:10269
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_In_Scope
  (Node : Bare_Body_Node
      ; Origin : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_868 with Inline_Always;
            procedure Finalizer_Scope_2695 with Inline_Always;
      Var_Expr_1 : Bare_Subunit;
Is_Null : Boolean;
Not_Val : Boolean;
Fld : Internal_Unit;
Fld_1 : Internal_Unit;
Is_Equal : Boolean;
Node_Parents : Bare_Ada_Node_Array_Access;
Cast_Expr : Bare_Body_Node;
Cast_Result : Bare_Ada_Node;
Is_Equal_1 : Boolean;
Find_Result : Bare_Ada_Node;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
Fld_2 : Bare_Compilation_Unit;
Fld_3 : Bare_Ada_Node;
Cast_Result_1 : Bare_Subunit;
Fld_4 : Internal_Entity_Basic_Decl_Array_Access;
Is_A : Boolean;
Fld_5 : Internal_Unit;
Fld_6 : Internal_Unit;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Quantifier_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
            procedure Finalizer_Scope_868 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_868;
            procedure Finalizer_Scope_2695 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_2695;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5652 '<BooleanBinaryOp And at nodes.lkt:10270:9>' If_Result_3 ada/nodes.lkt:10270
--# expr-start 5631 '<Not at nodes.lkt:10270:9>' Not_Val ada/nodes.lkt:10270
--# expr-start 5630 '<IsNull at nodes.lkt:10270:13>' Is_Null ada/nodes.lkt:10270
Is_Null := Origin = null; 
--# expr-done 5630
Not_Val := not (Is_Null); 
--# expr-done 5631
if Not_Val then
   --# expr-start 5651 '<BooleanBinaryOp Or at nodes.lkt:10272:13>' If_Result_2 ada/nodes.lkt:10272
--# expr-start 5640 '<BooleanBinaryOp And at nodes.lkt:10274:17>' If_Result ada/nodes.lkt:10274
--# expr-start 5634 '<Eq at nodes.lkt:10274:17>' Is_Equal ada/nodes.lkt:10274
--# expr-start 5632 '<FieldAccess for unit at nodes.lkt:10274:17>' Fld ada/nodes.lkt:10274
      if Origin = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Unit (Node => Origin);
--# expr-done 5632
--# expr-start 5633 '<FieldAccess for unit at nodes.lkt:10274:32>' Fld_1 ada/nodes.lkt:10274
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 5633
Is_Equal := Fld = Fld_1; 
--# expr-done 5634
if Is_Equal then
   --# expr-start 5639 '<Not at nodes.lkt:10275:21>' Not_Val_1 ada/nodes.lkt:10275
--# expr-start 5638 '<IsNull at nodes.lkt:10275:25>' Is_Null_1 ada/nodes.lkt:10275
--# expr-start 5637 '<Find at nodes.lkt:10275:25>' Find_Result ada/nodes.lkt:10275
   --# expr-start 5635 '<FieldAccess for parents at nodes.lkt:10275:25>' Node_Parents ada/nodes.lkt:10275
      if Origin = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Origin, True); 
--# expr-done 5635
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 5636 '<Eq at nodes.lkt:10275:54>' Is_Equal_1 ada/nodes.lkt:10275
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Is_Equal_1 := Cast_Result = Item_0; 
--# expr-done 5636
      if Is_Equal_1 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_Equal_1;
         end loop;
      end;
--# expr-done 5637
Is_Null_1 := Find_Result = null; 
--# expr-done 5638
Not_Val_1 := not (Is_Null_1); 
--# expr-done 5639
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 5640
if If_Result then
   If_Result_2 := True;
else
--# expr-start 5643 '<Cast to Subunit at nodes.lkt:10279:17>' Cast_Result_1 ada/nodes.lkt:10279
--# expr-start 5642 '<FieldAccess for body at nodes.lkt:10279:17>' Fld_3 ada/nodes.lkt:10279
--# expr-start 5641 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:10279:17>' Fld_2 ada/nodes.lkt:10279
      if Origin = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld_2 := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Origin);
--# end
--# expr-done 5641
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Fld_2.Compilation_Unit_F_Body;
--# expr-done 5642
   if Fld_3 = null
      or else Fld_3.Kind in Ada_Subunit_Range
   then
      Cast_Result_1 := Fld_3;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 5643
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind su Var_Expr_1
--# expr-start 5650 '<AnyQuantifier at nodes.lkt:10281:21>' Quantifier_Result ada/nodes.lkt:10281
   --# expr-start 5644 '<FieldAccess for bodies_root at nodes.lkt:10281:21>' Fld_4 ada/nodes.lkt:10281
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.bodies_root
Fld_4 := Libadalang.Implementation.Subunit_P_Bodies_Root (Node => Var_Expr_1);
--# end
--# expr-done 5644
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Fld_4;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind br Item_2
      --# expr-start 5649 '<BooleanBinaryOp And at nodes.lkt:10282:33>' If_Result_1 ada/nodes.lkt:10282
--# expr-start 5645 '<IsA BaseSubpBody at nodes.lkt:10282:33>' Is_A ada/nodes.lkt:10282
Is_A := Item_2.Node /= null 
and then Item_2.Node.Kind in Ada_Base_Subp_Body; 
--# expr-done 5645
if Is_A then
   --# expr-start 5648 '<Eq at nodes.lkt:10282:56>' Is_Equal_2 ada/nodes.lkt:10282
--# expr-start 5646 '<FieldAccess for unit at nodes.lkt:10282:56>' Fld_5 ada/nodes.lkt:10282
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Unit (Node => Item_2.Node);
--# expr-done 5646
--# expr-start 5647 '<FieldAccess for unit at nodes.lkt:10282:67>' Fld_6 ada/nodes.lkt:10282
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 5647
Is_Equal_2 := Fld_5 = Fld_6; 
--# expr-done 5648
   If_Result_1 := Is_Equal_2;
else
   If_Result_1 := False;
end if;
--# expr-done 5649
      Quantifier_Result := If_Result_1;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 5650
Scope_Result := Quantifier_Result;
   --# end
      Finalizer_Scope_2695;
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result_2 := Result_Var;
end if;
--# expr-done 5651
   If_Result_3 := If_Result_2;
else
   If_Result_3 := False;
end if;
--# expr-done 5652
         Property_Result := If_Result_3;
   --# end
      Finalizer_Scope_868;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_868;
                     Finalizer_Scope_2695;
            raise;
      end;
   return Property_Result;
end Body_Node_P_In_Scope;
--# end
--# property-start Body.body_decl_scope ada/nodes.lkt:10289
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Body_Decl_Scope
  (Node : Bare_Body_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_869 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_869 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_869;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5655 '<bind at nodes.lkt:10290:9>' Dyn_Var_Bind_Result ada/nodes.lkt:10290
--# expr-start 5653 '<FieldAccess for default_initial_env at nodes.lkt:10290:20>' Fld ada/nodes.lkt:10290
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.default_initial_env
Fld := Libadalang.Implementation.Ada_Node_P_Default_Initial_Env (Node => Self);
--# end
--# expr-done 5653
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 5654 '<FieldAccess for body_scope at nodes.lkt:10292:9>' Fld_1 ada/nodes.lkt:10292
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_scope
Fld_1 := Libadalang.Implementation.Body_Node_P_Body_Scope (Node => Ent.Node, Follow_Private => True, Force_Decl => True, Env => Bound_Env, E_Info => Ent.Info);
--# end
--# expr-done 5654
Dyn_Var_Bind_Result := Fld_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 5655
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_869;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_869;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Body_Decl_Scope;
--# end
--# property-start Body.body_initial_env_name ada/nodes.lkt:10298
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Body_Initial_Env_Name
  (Node : Bare_Body_Node
  )
   return Symbol_Type
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
            procedure Finalizer_Scope_870 with Inline_Always;
      Fld : String_Type;
Str : String_Type;
Concat_Result : String_Type;
Sym : Symbol_Type;
Fld_1 : String_Type;
Str_1 : String_Type;
Concat_Result_1 : String_Type;
Sym_1 : Symbol_Type;
Fld_2 : Boolean;
If_Result : Symbol_Type;
Fld_3 : Boolean;
If_Result_1 : Symbol_Type;
            procedure Finalizer_Scope_870 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Str_1);
                     Dec_Ref (Concat_Result_1);
            end Finalizer_Scope_870;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5665 '<If at nodes.lkt:10299:9>' If_Result_1 ada/nodes.lkt:10299
--# expr-start 5656 '<FieldAccess for is_library_item at nodes.lkt:10299:12>' Fld_3 ada/nodes.lkt:10299
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Self);
--# end
--# expr-done 5656
if Fld_3 then
   --# expr-start 5659 '<to_symbol at nodes.lkt:10300:14>' Sym ada/nodes.lkt:10300
--# expr-start 5657 '<FieldAccess for top_level_env_name at nodes.lkt:10300:15>' Fld ada/nodes.lkt:10300
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 5657
--# expr-start 5658 '<String at nodes.lkt:10300:43>' Str ada/nodes.lkt:10300
Str := Create_String (".__privatepart"); 
--# expr-done 5658
Concat_Result := Concat_String (Fld, Str); 
Sym := String_To_Symbol (Self, Self.Unit.Context, Concat_Result); 
--# expr-done 5659
   If_Result_1 := Sym;
else
   --# expr-start 5664 '<If at nodes.lkt:10299:9>' If_Result ada/nodes.lkt:10299
--# expr-start 5660 '<FieldAccess for is_subunit at nodes.lkt:10301:14>' Fld_2 ada/nodes.lkt:10301
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.is_subunit
Fld_2 := Libadalang.Implementation.Body_Node_P_Is_Subunit (Node => Self);
--# end
--# expr-done 5660
if Fld_2 then
   --# expr-start 5663 '<to_symbol at nodes.lkt:10302:14>' Sym_1 ada/nodes.lkt:10302
--# expr-start 5661 '<FieldAccess for top_level_env_name at nodes.lkt:10302:15>' Fld_1 ada/nodes.lkt:10302
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 5661
--# expr-start 5662 '<String at nodes.lkt:10302:43>' Str_1 ada/nodes.lkt:10302
Str_1 := Create_String ("__stub"); 
--# expr-done 5662
Concat_Result_1 := Concat_String (Fld_1, Str_1); 
Sym_1 := String_To_Symbol (Self, Self.Unit.Context, Concat_Result_1); 
--# expr-done 5663
   If_Result := Sym_1;
else
   If_Result := No_Symbol;
end if;
--# expr-done 5664
   If_Result_1 := If_Result;
end if;
--# expr-done 5665
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_870;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_870;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Body_Initial_Env_Name;
--# end
--# property-start Body.body_initial_env ada/nodes.lkt:10308
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Body_Initial_Env
  (Node : Bare_Body_Node
  )
   return Internal_Designated_Env
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_871 with Inline_Always;
            procedure Finalizer_Scope_2697 with Inline_Always;
      Var_Expr_0 : Symbol_Type;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_871 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_871;
            procedure Finalizer_Scope_2697 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2697;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5666 '<FieldAccess for body_initial_env_name at nodes.lkt:10309:9>' Fld ada/nodes.lkt:10309
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_initial_env_name
Fld := Libadalang.Implementation.Body_Node_P_Body_Initial_Env_Name (Node => Self);
--# end
--# expr-done 5666
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind non_null_name Var_Expr_0
--# expr-start 5667 '<New DesignatedEnv at nodes.lkt:10311:13>' New_Struct ada/nodes.lkt:10311
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Var_Expr_0, Kind => Named_Env); 
--# expr-done 5667
Scope_Result := New_Struct;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2697;
   Result_Var := Scope_Result;
else
   --# expr-start 5668 '<New DesignatedEnv at nodes.lkt:10316:25>' New_Struct_1 ada/nodes.lkt:10316
Inc_Ref (Empty_Env);
New_Struct_1 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 5668
   Result_Var := New_Struct_1;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_871;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_871;
                     Finalizer_Scope_2697;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Body_Initial_Env;
--# end
--# property-start Body.subp_previous_part ada/nodes.lkt:10331
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Subp_Previous_Part
  (Node : Bare_Body_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_872 with Inline_Always;
            procedure Finalizer_Scope_2698 with Inline_Always;
      Local_Parent : Internal_Entity;
Local_Elements : Internal_Entity_Array_Access;
Var_Expr_0 : Internal_Entity_Compilation_Unit;
Local_Already_Precise : Boolean;
Local_Precise : Internal_Entity_Basic_Decl;
Match_0 : Internal_Entity_Generic_Subp_Decl;
Match_1 : Internal_Entity_Formal_Subp_Decl;
Match_2 : Internal_Entity_Basic_Subp_Decl;
Match_3 : Internal_Entity_Subp_Body_Stub;
Match_4 : Internal_Entity;
Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Fld_2 : Internal_Entity;
Fld_3 : Boolean;
If_Result : Internal_Entity;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Compilation_Unit;
Fld_4 : Internal_Entity_Compilation_Unit;
Fld_5 : Bare_Basic_Decl;
Cast_Result_1 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result_1 : Internal_Entity;
Array_Lit : Internal_Entity_Array_Access;
Fld_6 : Bare_Basic_Decl;
Is_A : Boolean;
If_Result_2 : Internal_Entity_Array_Access;
Scope_Result : Internal_Entity_Array_Access;
Result_Var : Internal_Entity_Array_Access;
Array_Lit_1 : Internal_Entity_Array_Access;
Fld_7 : Lexical_Env := Empty_Env;
Fld_8 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Is_A_1 : Boolean;
If_Result_3 : Internal_Entity_Array_Access;
Is_A_2 : Boolean;
If_Result_4 : Internal_Entity_Array_Access;
Is_Null_1 : Boolean;
If_Result_5 : Internal_Entity_Array_Access;
Is_A_3 : Boolean;
Get_Result : Internal_Entity;
Is_Null_2 : Boolean;
Not_Val : Boolean;
Fld_9 : Bare_Ada_Node;
Cast_Expr_1 : Bare_Body_Node;
Cast_Result_2 : Bare_Ada_Node;
Is_Equal : Boolean;
Not_Val_1 : Boolean;
If_Result_6 : Boolean;
Fld_10 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_11 : Internal_Entity_Base_Subp_Spec;
Fld_12 : Internal_Entity_Base_Subp_Spec;
Cast_Result_3 : Internal_Entity_Subp_Spec;
Cast_Result_4 : Internal_Entity_Base_Subp_Spec;
Fld_13 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Fld_14 : Bare_Ada_Node;
Bound_Origin_1 : Bare_Ada_Node;
Fld_15 : Internal_Entity_Subp_Spec;
Fld_16 : Internal_Entity_Base_Subp_Spec;
Cast_Result_5 : Internal_Entity_Subp_Spec;
Cast_Result_6 : Internal_Entity_Base_Subp_Spec;
Fld_17 : Boolean;
Dyn_Var_Bind_Result_1 : Boolean;
Match_Prefix : Internal_Entity;
Cast_Result_7 : Internal_Entity_Generic_Subp_Decl;
Let_Result : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_8 : Internal_Entity_Formal_Subp_Decl;
Let_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Cast_Result_9 : Internal_Entity_Basic_Subp_Decl;
Let_Result_2 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_10 : Internal_Entity_Subp_Body_Stub;
Let_Result_3 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_11 : Internal_Entity;
Let_Result_4 : Boolean;
Scope_Result_5 : Boolean;
Match_Result : Boolean;
If_Result_7 : Boolean;
Find_Result : Internal_Entity;
If_Result_8 : Internal_Entity;
Cast_Result_12 : Internal_Entity_Basic_Decl;
Is_Null_3 : Boolean;
Not_Val_2 : Boolean;
Fld_18 : Bare_Ada_Node;
Cast_Expr_2 : Bare_Body_Node;
Cast_Result_13 : Bare_Ada_Node;
Is_Equal_1 : Boolean;
Not_Val_3 : Boolean;
If_Result_9 : Boolean;
Is_A_4 : Boolean;
If_Result_10 : Boolean;
Find_Result_1 : Internal_Entity;
Cast_Result_14 : Internal_Entity_Basic_Decl;
Is_Null_4 : Boolean;
If_Result_11 : Boolean;
If_Result_12 : Internal_Entity_Basic_Decl;
Let_Result_5 : Internal_Entity_Basic_Decl;
Let_Result_6 : Internal_Entity_Basic_Decl;
Let_Result_7 : Internal_Entity_Basic_Decl;
Let_Result_8 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_872 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (Local_Elements);
            end Finalizer_Scope_872;
            procedure Finalizer_Scope_2698 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (If_Result_2);
            end Finalizer_Scope_2698;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5734 '<Let at nodes.lkt:10332:9>' Let_Result_8 ada/nodes.lkt:10332
--# scope-start
--# expr-start 5673 '<If at nodes.lkt:10333:13>' If_Result ada/nodes.lkt:10333
--# expr-start 5669 '<FieldAccess for is_library_item at nodes.lkt:10333:16>' Fld_3 ada/nodes.lkt:10333
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Ent.Node);
--# end
--# expr-done 5669
if Fld_3 then
   --# expr-start 5671 '<parent at nodes.lkt:10333:44>' Fld_1 ada/nodes.lkt:10333
--# expr-start 5670 '<parent at nodes.lkt:10333:44>' Fld ada/nodes.lkt:10333
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 5670
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 5671
   If_Result := Fld_1;
else
   --# expr-start 5672 '<FieldAccess for semantic_parent at nodes.lkt:10334:18>' Fld_2 ada/nodes.lkt:10334
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_2 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5672
   If_Result := Fld_2;
end if;
--# expr-done 5673
Local_Parent := If_Result; 
--# bind parent Local_Parent
--# expr-start 5733 '<Let at nodes.lkt:10335:9>' Let_Result_7 ada/nodes.lkt:10335
--# scope-start
--# expr-start 5692 '<If at nodes.lkt:10336:13>' If_Result_5 ada/nodes.lkt:10336
--# expr-start 5674 '<IsNull at nodes.lkt:10336:16>' Is_Null_1 ada/nodes.lkt:10336
Is_Null_1 := Local_Parent.Node = null; 
--# expr-done 5674
if Is_Null_1 then
   If_Result_5 := No_Internal_Entity_Array_Type;
else
   --# expr-start 5691 '<If at nodes.lkt:10336:13>' If_Result_4 ada/nodes.lkt:10336
--# expr-start 5675 '<IsA CompilationUnit at nodes.lkt:10340:18>' Is_A_2 ada/nodes.lkt:10340
Is_A_2 := Local_Parent.Node /= null 
and then Local_Parent.Node.Kind in Ada_Compilation_Unit_Range; 
--# expr-done 5675
if Is_A_2 then
--# expr-start 5677 '<FieldAccess for other_part at nodes.lkt:10342:17>' Fld_4 ada/nodes.lkt:10342
--# expr-start 5676 '<Cast to CompilationUnit at nodes.lkt:10342:17>' Cast_Result ada/nodes.lkt:10342
Cast_Expr := Local_Parent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Create_Internal_Entity_Compilation_Unit
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Compilation_Unit;
   end if;
--# expr-done 5676
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.other_part
Fld_4 := Libadalang.Implementation.Compilation_Unit_P_Other_Part (Node => Cast_Result.Node);
--# end
--# expr-done 5677
Var_Expr_0 := Fld_4;
if Var_Expr_0 /= No_Entity_Compilation_Unit then
   --# scope-start
   --# bind cu Var_Expr_0
--# expr-start 5684 '<If at nodes.lkt:10346:21>' If_Result_2 ada/nodes.lkt:10346
--# expr-start 5679 '<IsA BasicSubpDecl, GenericSubpDecl at nodes.lkt:10346:24>' Is_A ada/nodes.lkt:10346
--# expr-start 5678 '<FieldAccess for decl at nodes.lkt:10346:24>' Fld_6 ada/nodes.lkt:10346
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_6 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Var_Expr_0.Node);
--# end
--# expr-done 5678
Is_A := Fld_6 /= null 
and then Fld_6.Kind in Ada_Basic_Subp_Decl | Ada_Generic_Subp_Decl_Range; 
--# expr-done 5679
if Is_A then
   --# expr-start 5683 '<ArrayLiteral at nodes.lkt:10347:26>' Array_Lit ada/nodes.lkt:10347
--# expr-start 5682 '<as_entity at nodes.lkt:10347:27>' If_Result_1 ada/nodes.lkt:10347
--# expr-start 5681 '<Cast to AdaNode at nodes.lkt:10347:27>' Cast_Result_1 ada/nodes.lkt:10347
--# expr-start 5680 '<FieldAccess for decl at nodes.lkt:10347:27>' Fld_5 ada/nodes.lkt:10347
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_5 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Var_Expr_0.Node);
--# end
--# expr-done 5680
      Cast_Result_1 := Fld_5;
--# expr-done 5681
Is_Null := Cast_Result_1 = null; 
if Is_Null then
   If_Result_1 := No_Entity;
else
As_Entity := (Info => E_Info, Node => Cast_Result_1); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 5682
Array_Lit := Create_Internal_Entity_Array (Internal_Internal_Entity_Array'(1 => If_Result_1)); 
--# expr-done 5683
   If_Result_2 := Array_Lit;
else
   If_Result_2 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 5684
Scope_Result := If_Result_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2698;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var);
   If_Result_4 := Result_Var;
else
   --# expr-start 5690 '<If at nodes.lkt:10336:13>' If_Result_3 ada/nodes.lkt:10336
--# expr-start 5685 '<IsA BodyStub at nodes.lkt:10353:18>' Is_A_1 ada/nodes.lkt:10353
Is_A_1 := Local_Parent.Node /= null 
and then Local_Parent.Node.Kind in Ada_Body_Stub; 
--# expr-done 5685
if Is_A_1 then
   --# expr-start 5686 '<ArrayLiteral at nodes.lkt:10353:42>' Array_Lit_1 ada/nodes.lkt:10353
Array_Lit_1 := Create_Internal_Entity_Array (Internal_Internal_Entity_Array'(1 => Local_Parent)); 
--# expr-done 5686
   If_Result_3 := Array_Lit_1;
else
   --# expr-start 5689 '<EnvGet at nodes.lkt:10356:17>' Env_Get_Result ada/nodes.lkt:10356
--# expr-start 5687 '<FieldAccess for immediate_declarative_region at nodes.lkt:10356:17>' Fld_7 ada/nodes.lkt:10356
      if Local_Parent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.immediate_declarative_region'
Fld_7 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Immediate_Declarative_Region (Node => Local_Parent.Node, E_Info => Local_Parent.Info);
--# end
--# expr-done 5687
--# expr-start 5688 '<FieldAccess for name_symbol at nodes.lkt:10357:21>' Fld_8 ada/nodes.lkt:10357
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 5688
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_7, Key => Thin (Fld_8), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 5689
   If_Result_3 := Env_Get_Result;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 5690
   If_Result_4 := If_Result_3;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 5691
   If_Result_5 := If_Result_4;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 5692
Local_Elements := If_Result_5; Inc_Ref (Local_Elements);
--# bind elements Local_Elements
--# expr-start 5732 '<Let at nodes.lkt:10363:9>' Let_Result_6 ada/nodes.lkt:10363
--# scope-start
--# expr-start 5693 '<IsA CompilationUnit, BodyStub at nodes.lkt:10363:31>' Is_A_3 ada/nodes.lkt:10363
Is_A_3 := Local_Parent.Node /= null 
and then Local_Parent.Node.Kind in Ada_Compilation_Unit_Range | Ada_Body_Stub; 
--# expr-done 5693
Local_Already_Precise := Is_A_3; 
--# bind already_precise Local_Already_Precise
--# expr-start 5731 '<Let at nodes.lkt:10364:9>' Let_Result_5 ada/nodes.lkt:10364
--# scope-start
--# expr-start 5717 '<Cast to BasicDecl at nodes.lkt:10365:13>' Cast_Result_12 ada/nodes.lkt:10365
--# expr-start 5716 '<If at nodes.lkt:10366:17>' If_Result_8 ada/nodes.lkt:10366
if Local_Already_Precise then
   --# expr-start 5694 '<at at nodes.lkt:10366:41>' Get_Result ada/nodes.lkt:10366
Get_Result := Get (Self, Local_Elements, 0, True); 
--# expr-done 5694
   If_Result_8 := Get_Result;
else
   --# expr-start 5715 '<Find at nodes.lkt:10368:21>' Find_Result ada/nodes.lkt:10368
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Elements;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind sp Item_1
      --# expr-start 5714 '<BooleanBinaryOp And at nodes.lkt:10370:25>' If_Result_7 ada/nodes.lkt:10370
--# expr-start 5700 '<BooleanBinaryOp And at nodes.lkt:10370:25>' If_Result_6 ada/nodes.lkt:10370
--# expr-start 5696 '<Not at nodes.lkt:10370:25>' Not_Val ada/nodes.lkt:10370
--# expr-start 5695 '<IsNull at nodes.lkt:10370:29>' Is_Null_2 ada/nodes.lkt:10370
Is_Null_2 := Item_1.Node = null; 
--# expr-done 5695
Not_Val := not (Is_Null_2); 
--# expr-done 5696
if Not_Val then
   --# expr-start 5699 '<Not at nodes.lkt:10370:44>' Not_Val_1 ada/nodes.lkt:10370
--# expr-start 5698 '<Eq at nodes.lkt:10370:44>' Is_Equal ada/nodes.lkt:10370
--# expr-start 5697 '<FieldAccess for node at nodes.lkt:10370:44>' Fld_9 ada/nodes.lkt:10370
Fld_9 := Item_1.Node;
--# expr-done 5697
Cast_Expr_1 := Self; 
      Cast_Result_2 := Cast_Expr_1;
Is_Equal := Fld_9 = Cast_Result_2; 
--# expr-done 5698
Not_Val_1 := not (Is_Equal); 
--# expr-done 5699
   If_Result_6 := Not_Val_1;
else
   If_Result_6 := False;
end if;
--# expr-done 5700
if If_Result_6 then
   --# expr-start 5713 '<Match at nodes.lkt:10371:29>' Match_Result ada/nodes.lkt:10371
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Generic_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Generic_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_7; 
--# bind _ Match_0
Let_Result := True; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_Formal_Subp_Decl .. Ada_Concrete_Formal_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Create_Internal_Entity_Formal_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_8; 
--# bind _ Match_1
Let_Result_1 := False; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Abstract_Subp_Decl | Ada_Subp_Decl .. Ada_Synthetic_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Basic_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_9; 
--# bind subp_decl Match_2
--# expr-start 5706 '<bind at nodes.lkt:10382:37>' Dyn_Var_Bind_Result ada/nodes.lkt:10382
--# expr-start 5701 '<FieldAccess for origin_node at nodes.lkt:10382:51>' Fld_10 ada/nodes.lkt:10382
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_10 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 5701
Bound_Origin := Fld_10; 
--# expr-start 5705 '<FieldAccess for match_signature at nodes.lkt:10384:37>' Fld_13 ada/nodes.lkt:10384
--# expr-start 5702 '<FieldAccess for subp_decl_spec at nodes.lkt:10384:37>' Fld_11 ada/nodes.lkt:10384
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicSubpDecl.subp_decl_spec'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Subp_Decl_P_Subp_Decl_Spec (Node => Match_2.Node, E_Info => Match_2.Info);
--# end
--# expr-done 5702
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5704 '<Cast to SubpSpec at nodes.lkt:10385:41>' Cast_Result_3 ada/nodes.lkt:10385
--# expr-start 5703 '<FieldAccess for subp_spec_or_null at nodes.lkt:10385:41>' Fld_12 ada/nodes.lkt:10385
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5703
   if Fld_12.Node = null
      or else Fld_12.Node.Kind in Ada_Subp_Spec_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Subp_Spec
        (Node => Fld_12.Node,
         Info => Fld_12.Info);
   else
         Cast_Result_3 := No_Entity_Subp_Spec;
   end if;
--# expr-done 5704
      Cast_Result_4 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Result_3.Node,
         Info => Cast_Result_3.Info);
--# property-call-start BaseSubpSpec.match_signature
Fld_13 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Fld_11.Node, Other => Cast_Result_4, Match_Name => True, Use_Entity_Info => False, Origin => Bound_Origin, E_Info => Fld_11.Info);
--# end
--# expr-done 5705
Dyn_Var_Bind_Result := Fld_13; 
--# expr-done 5706
Let_Result_2 := Dyn_Var_Bind_Result; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Subp_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Create_Internal_Entity_Subp_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_10; 
--# bind subp_stub Match_3
--# expr-start 5712 '<bind at nodes.lkt:10394:37>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:10394
--# expr-start 5707 '<FieldAccess for origin_node at nodes.lkt:10394:51>' Fld_14 ada/nodes.lkt:10394
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_14 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 5707
Bound_Origin_1 := Fld_14; 
--# expr-start 5711 '<FieldAccess for match_signature at nodes.lkt:10396:37>' Fld_17 ada/nodes.lkt:10396
--# expr-start 5708 '<FieldAccess for subp_spec at nodes.lkt:10396:37>' Fld_15 ada/nodes.lkt:10396
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Subp_Spec (Node => Match_3.Node.Subp_Body_Stub_F_Subp_Spec, Info => Match_3.Info);
--# expr-done 5708
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5710 '<Cast to SubpSpec at nodes.lkt:10397:41>' Cast_Result_5 ada/nodes.lkt:10397
--# expr-start 5709 '<FieldAccess for subp_spec_or_null at nodes.lkt:10397:41>' Fld_16 ada/nodes.lkt:10397
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_16 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5709
   if Fld_16.Node = null
      or else Fld_16.Node.Kind in Ada_Subp_Spec_Range
   then
      Cast_Result_5 := Create_Internal_Entity_Subp_Spec
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
   else
         Cast_Result_5 := No_Entity_Subp_Spec;
   end if;
--# expr-done 5710
      Cast_Result_6 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Result_5.Node,
         Info => Cast_Result_5.Info);
--# property-call-start BaseSubpSpec.match_signature
Fld_17 := Libadalang.Implementation.Base_Subp_Spec_P_Match_Signature (Node => Fld_15.Node, Other => Cast_Result_6, Match_Name => True, Use_Entity_Info => False, Origin => Bound_Origin_1, E_Info => Fld_15.Info);
--# end
--# expr-done 5711
Dyn_Var_Bind_Result_1 := Fld_17; 
--# expr-done 5712
Let_Result_3 := Dyn_Var_Bind_Result_1; 
--# end
Scope_Result_4 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Abort_Absent .. Ada_Formal_Type_Decl | Ada_Accept_Stmt_Body .. Ada_Protected_Body_Stub | Ada_Task_Body_Stub .. Ada_Generic_Package_Decl | Ada_Generic_Package_Instantiation .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_11; 
--# bind _ Match_4
Let_Result_4 := False; 
--# end
Scope_Result_5 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 5713
   If_Result_7 := Match_Result;
else
   If_Result_7 := False;
end if;
--# expr-done 5714
      if If_Result_7 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when If_Result_7;
         end loop;
      end;
--# expr-done 5715
   If_Result_8 := Find_Result;
end if;
--# expr-done 5716
   if If_Result_8.Node = null
      or else If_Result_8.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_12 := Create_Internal_Entity_Basic_Decl
        (Node => If_Result_8.Node,
         Info => If_Result_8.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5717
Local_Precise := Cast_Result_12; 
--# bind precise Local_Precise
--# expr-start 5730 '<If at nodes.lkt:10410:9>' If_Result_12 ada/nodes.lkt:10410
--# expr-start 5719 '<BooleanBinaryOp And at nodes.lkt:10410:12>' If_Result_11 ada/nodes.lkt:10410
--# expr-start 5718 '<IsNull at nodes.lkt:10410:12>' Is_Null_4 ada/nodes.lkt:10410
Is_Null_4 := Local_Precise.Node = null; 
--# expr-done 5718
if Is_Null_4 then
   If_Result_11 := Imprecise_Fallback;
else
   If_Result_11 := False;
end if;
--# expr-done 5719
if If_Result_11 then
   --# expr-start 5729 '<Cast to BasicDecl at nodes.lkt:10412:13>' Cast_Result_14 ada/nodes.lkt:10412
--# expr-start 5728 '<Find at nodes.lkt:10412:13>' Find_Result_1 ada/nodes.lkt:10412
      Find_Result_1 := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Elements;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind sp Item_2
      --# expr-start 5727 '<BooleanBinaryOp And at nodes.lkt:10414:17>' If_Result_10 ada/nodes.lkt:10414
--# expr-start 5725 '<BooleanBinaryOp And at nodes.lkt:10414:17>' If_Result_9 ada/nodes.lkt:10414
--# expr-start 5721 '<Not at nodes.lkt:10414:17>' Not_Val_2 ada/nodes.lkt:10414
--# expr-start 5720 '<IsNull at nodes.lkt:10414:21>' Is_Null_3 ada/nodes.lkt:10414
Is_Null_3 := Item_2.Node = null; 
--# expr-done 5720
Not_Val_2 := not (Is_Null_3); 
--# expr-done 5721
if Not_Val_2 then
   --# expr-start 5724 '<Not at nodes.lkt:10414:36>' Not_Val_3 ada/nodes.lkt:10414
--# expr-start 5723 '<Eq at nodes.lkt:10414:36>' Is_Equal_1 ada/nodes.lkt:10414
--# expr-start 5722 '<FieldAccess for node at nodes.lkt:10414:36>' Fld_18 ada/nodes.lkt:10414
Fld_18 := Item_2.Node;
--# expr-done 5722
Cast_Expr_2 := Self; 
      Cast_Result_13 := Cast_Expr_2;
Is_Equal_1 := Fld_18 = Cast_Result_13; 
--# expr-done 5723
Not_Val_3 := not (Is_Equal_1); 
--# expr-done 5724
   If_Result_9 := Not_Val_3;
else
   If_Result_9 := False;
end if;
--# expr-done 5725
if If_Result_9 then
   --# expr-start 5726 '<IsA BasicSubpDecl, SubpBodyStub at nodes.lkt:10415:21>' Is_A_4 ada/nodes.lkt:10415
Is_A_4 := Item_2.Node /= null 
and then Item_2.Node.Kind in Ada_Basic_Subp_Decl | Ada_Subp_Body_Stub_Range; 
--# expr-done 5726
   If_Result_10 := Is_A_4;
else
   If_Result_10 := False;
end if;
--# expr-done 5727
      if If_Result_10 then
         Find_Result_1 := Item_2; 
      end if;
   --# end
               exit when If_Result_10;
         end loop;
      end;
--# expr-done 5728
   if Find_Result_1.Node = null
      or else Find_Result_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_14 := Create_Internal_Entity_Basic_Decl
        (Node => Find_Result_1.Node,
         Info => Find_Result_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5729
   If_Result_12 := Cast_Result_14;
else
   If_Result_12 := Local_Precise;
end if;
--# expr-done 5730
Let_Result_5 := If_Result_12; 
--# end
--# expr-done 5731
Let_Result_6 := Let_Result_5; 
--# end
--# expr-done 5732
Let_Result_7 := Let_Result_6; 
--# end
--# expr-done 5733
Let_Result_8 := Let_Result_7; 
--# end
--# expr-done 5734
         Property_Result := Let_Result_8;
   --# end
      Finalizer_Scope_872;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_872;
                     Finalizer_Scope_2698;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Subp_Previous_Part;
--# end
--# property-start Body.entry_previous_part ada/nodes.lkt:10423
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Entry_Previous_Part
  (Node : Bare_Body_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Entry_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Entry_Decl;
            procedure Finalizer_Scope_873 with Inline_Always;
      Local_Spec : Internal_Entity_Entry_Completion_Formal_Params;
Match_0 : Internal_Entity_Entry_Decl;
Match_1 : Internal_Entity;
Cast_Expr : Internal_Entity_Body_Node;
Cast_Result : Internal_Entity_Entry_Body;
Fld : Internal_Entity_Entry_Completion_Formal_Params;
Fld_1 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_2 : Bare_Ada_Node;
Cast_Expr_1 : Bare_Body_Node;
Cast_Result_1 : Bare_Ada_Node;
Is_Equal : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
Fld_3 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_4 : Internal_Entity_Entry_Spec;
Cast_Expr_2 : Internal_Entity_Entry_Completion_Formal_Params;
Cast_Result_2 : Internal_Entity_Base_Formal_Param_Holder;
Fld_5 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Match_Prefix : Internal_Entity;
Cast_Result_3 : Internal_Entity_Entry_Decl;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_4 : Internal_Entity;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Match_Result : Boolean;
If_Result_1 : Boolean;
Find_Result : Internal_Entity;
Cast_Result_5 : Internal_Entity_Entry_Decl;
Let_Result_2 : Internal_Entity_Entry_Decl;
            procedure Finalizer_Scope_873 is
            begin
                     Dec_Ref (Env_Get_Result);
            end Finalizer_Scope_873;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5753 '<Let at nodes.lkt:10424:9>' Let_Result_2 ada/nodes.lkt:10424
--# scope-start
--# expr-start 5736 '<FieldAccess for params at nodes.lkt:10424:20>' Fld ada/nodes.lkt:10424
--# expr-start 5735 '<Cast to EntryBody at nodes.lkt:10424:20>' Cast_Result ada/nodes.lkt:10424
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Entry_Body_Range
   then
      Cast_Result := Create_Internal_Entity_Entry_Body
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5735
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Entry_Completion_Formal_Params (Node => Cast_Result.Node.Entry_Body_F_Params, Info => Cast_Result.Info);
--# expr-done 5736
Local_Spec := Fld; 
--# bind spec Local_Spec
--# expr-start 5752 '<Cast to EntryDecl at nodes.lkt:10426:9>' Cast_Result_5 ada/nodes.lkt:10426
--# expr-start 5751 '<Find at nodes.lkt:10426:9>' Find_Result ada/nodes.lkt:10426
   --# expr-start 5738 '<EnvGet at nodes.lkt:10426:9>' Env_Get_Result ada/nodes.lkt:10426
--# expr-start 5737 '<FieldAccess for name_symbol at nodes.lkt:10427:13>' Fld_1 ada/nodes.lkt:10427
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 5737
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Env, Key => Thin (Fld_1), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 5738
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind sp Item_0
      --# expr-start 5750 '<BooleanBinaryOp And at nodes.lkt:10432:13>' If_Result_1 ada/nodes.lkt:10432
--# expr-start 5744 '<BooleanBinaryOp And at nodes.lkt:10432:13>' If_Result ada/nodes.lkt:10432
--# expr-start 5740 '<Not at nodes.lkt:10432:13>' Not_Val ada/nodes.lkt:10432
--# expr-start 5739 '<IsNull at nodes.lkt:10432:17>' Is_Null ada/nodes.lkt:10432
Is_Null := Item_0.Node = null; 
--# expr-done 5739
Not_Val := not (Is_Null); 
--# expr-done 5740
if Not_Val then
   --# expr-start 5743 '<Not at nodes.lkt:10432:32>' Not_Val_1 ada/nodes.lkt:10432
--# expr-start 5742 '<Eq at nodes.lkt:10432:32>' Is_Equal ada/nodes.lkt:10432
--# expr-start 5741 '<FieldAccess for node at nodes.lkt:10432:32>' Fld_2 ada/nodes.lkt:10432
Fld_2 := Item_0.Node;
--# expr-done 5741
Cast_Expr_1 := Self; 
      Cast_Result_1 := Cast_Expr_1;
Is_Equal := Fld_2 = Cast_Result_1; 
--# expr-done 5742
Not_Val_1 := not (Is_Equal); 
--# expr-done 5743
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 5744
if If_Result then
   --# expr-start 5749 '<Match at nodes.lkt:10433:17>' Match_Result ada/nodes.lkt:10433
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Entry_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Entry_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_3; 
--# bind entry_decl Match_0
--# expr-start 5748 '<bind at nodes.lkt:10436:25>' Dyn_Var_Bind_Result ada/nodes.lkt:10436
--# expr-start 5745 '<FieldAccess for origin_node at nodes.lkt:10436:39>' Fld_3 ada/nodes.lkt:10436
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_3 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 5745
Bound_Origin := Fld_3; 
--# expr-start 5747 '<FieldAccess for match_formal_params at nodes.lkt:10438:25>' Fld_5 ada/nodes.lkt:10438
--# expr-start 5746 '<FieldAccess for spec at nodes.lkt:10438:25>' Fld_4 ada/nodes.lkt:10438
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Entry_Spec (Node => Match_0.Node.Entry_Decl_F_Spec, Info => Match_0.Info);
--# expr-done 5746
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr_2 := Local_Spec; 
      Cast_Result_2 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
--# property-call-start BaseFormalParamHolder.match_formal_params
Fld_5 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Formal_Params (Node => Fld_4.Node, Other => Cast_Result_2, Origin => Bound_Origin, E_Info => Fld_4.Info);
--# end
--# expr-done 5747
Dyn_Var_Bind_Result := Fld_5; 
--# expr-done 5748
Let_Result := Dyn_Var_Bind_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abort_Absent .. Ada_Subp_Decl | Ada_Enum_Literal_Decl .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_4; 
--# bind _ Match_1
Let_Result_1 := False; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 5749
   If_Result_1 := Match_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 5750
      if If_Result_1 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when If_Result_1;
         end loop;
      end;
--# expr-done 5751
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Entry_Decl_Range
   then
      Cast_Result_5 := Create_Internal_Entity_Entry_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5752
Let_Result_2 := Cast_Result_5; 
--# end
--# expr-done 5753
         Property_Result := Let_Result_2;
   --# end
      Finalizer_Scope_873;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_873;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Entry_Previous_Part;
--# end
--# property-start Body.package_previous_part ada/nodes.lkt:10451
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Package_Previous_Part
  (Node : Bare_Body_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_874 with Inline_Always;
            procedure Finalizer_Scope_2709 with Inline_Always;
            procedure Finalizer_Scope_2710 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Compilation_Unit;
Var_Expr_1 : Internal_Entity;
Match_0 : Internal_Entity_Package_Decl;
Match_1 : Internal_Entity_Generic_Package_Decl;
Match_2 : Internal_Entity;
Fld : Bare_Compilation_Unit;
Fld_1 : Internal_Entity_Compilation_Unit;
Fld_2 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Array_Lit : Internal_Entity_Array_Access;
Scope_Result : Internal_Entity_Array_Access;
Result_Var : Internal_Entity_Array_Access;
Scope_Result_1 : Internal_Entity_Array_Access;
Result_Var_1 : Internal_Entity_Array_Access;
Fld_3 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_4 : Internal_Entity_Defining_Name;
Fld_5 : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Array_Access;
Fld_6 : Boolean;
If_Result_1 : Internal_Entity_Array_Access;
Fld_7 : Internal_Entity_Generic_Package_Internal;
Match_Prefix : Internal_Entity;
Cast_Result_1 : Internal_Entity_Package_Decl;
Cast_Expr : Internal_Entity_Package_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Generic_Package_Decl;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_3 : Internal_Entity_Basic_Decl;
Cast_Result_5 : Internal_Entity;
Let_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_4 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Map_Result : Internal_Entity_Basic_Decl_Array_Access;
Is_Null_1 : Boolean;
Not_Val : Boolean;
Find_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_874 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_874;
            procedure Finalizer_Scope_2709 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2709;
            procedure Finalizer_Scope_2710 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2710;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5771 '<Find at nodes.lkt:10452:9>' Find_Result ada/nodes.lkt:10452
   --# expr-start 5768 '<Map at nodes.lkt:10452:9>' Map_Result ada/nodes.lkt:10452
   --# expr-start 5765 '<If at nodes.lkt:10453:13>' If_Result_1 ada/nodes.lkt:10453
--# expr-start 5754 '<FieldAccess for is_library_item at nodes.lkt:10453:16>' Fld_6 ada/nodes.lkt:10453
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Self);
--# end
--# expr-done 5754
if Fld_6 then
--# expr-start 5756 '<FieldAccess for other_part at nodes.lkt:10455:17>' Fld_1 ada/nodes.lkt:10455
--# expr-start 5755 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:10455:17>' Fld ada/nodes.lkt:10455
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Self);
--# end
--# expr-done 5755
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.other_part
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Other_Part (Node => Fld);
--# end
--# expr-done 5756
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Compilation_Unit then
   --# scope-start
   --# bind part Var_Expr_0
--# expr-start 5759 '<Cast to AdaNode at nodes.lkt:10457:21>' Cast_Result ada/nodes.lkt:10457
--# expr-start 5758 '<as_entity at nodes.lkt:10457:21>' If_Result ada/nodes.lkt:10457
--# expr-start 5757 '<FieldAccess for decl at nodes.lkt:10457:21>' Fld_2 ada/nodes.lkt:10457
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_2 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Var_Expr_0.Node);
--# end
--# expr-done 5757
Is_Null := Fld_2 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => E_Info, Node => Fld_2); 
   If_Result := As_Entity;
end if;
--# expr-done 5758
      Cast_Result := Create_Internal_Entity
        (Node => If_Result.Node,
         Info => If_Result.Info);
--# expr-done 5759
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 5760 '<ArrayLiteral at nodes.lkt:10457:66>' Array_Lit ada/nodes.lkt:10457
Array_Lit := Create_Internal_Entity_Array (Internal_Internal_Entity_Array'(1 => Var_Expr_1)); 
--# expr-done 5760
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2710;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var);
Scope_Result_1 := Result_Var;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2709;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
   If_Result_1 := Result_Var_1;
else
   --# expr-start 5764 '<bind at nodes.lkt:10460:17>' Dyn_Var_Bind_Result ada/nodes.lkt:10460
--# expr-start 5761 '<FieldAccess for origin_node at nodes.lkt:10460:31>' Fld_3 ada/nodes.lkt:10460
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_3 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 5761
Bound_Origin := Fld_3; 
--# expr-start 5763 '<FieldAccess for all_env_els_impl at nodes.lkt:10462:17>' Fld_5 ada/nodes.lkt:10462
--# expr-start 5762 '<FieldAccess for defining_name at nodes.lkt:10462:17>' Fld_4 ada/nodes.lkt:10462
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5762
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.all_env_els_impl'
Fld_5 := Libadalang.Implementation.Dispatcher_Name_P_All_Env_Els_Impl (Node => Fld_4.Node, Categories => (Inherited_Primitives => False, Nocat => True), Env => Env, Origin => Bound_Origin, E_Info => Fld_4.Info);
--# end
--# expr-done 5763
Dyn_Var_Bind_Result := Fld_5; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 5764
   If_Result_1 := Dyn_Var_Bind_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 5765
      declare
         Map_Result_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := If_Result_1;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_2
      --# expr-start 5767 '<Match at nodes.lkt:10472:13>' Match_Result ada/nodes.lkt:10472
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_2; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Package_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind pkg_decl Match_0
Cast_Expr := Match_0; 
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Let_Result := Cast_Result_2; 
--# end
Scope_Result_2 := Let_Result;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Generic_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Generic_Package_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind gen_pkg_decl Match_1
--# expr-start 5766 '<FieldAccess for package_decl at nodes.lkt:10475:21>' Fld_7 ada/nodes.lkt:10475
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Generic_Package_Internal (Node => Match_1.Node.Generic_Package_Decl_F_Package_Decl, Info => Match_1.Info);
--# expr-done 5766
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
Let_Result_1 := Cast_Result_4; 
--# end
Scope_Result_3 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Abort_Absent .. Ada_Generic_Package_Internal | Ada_Discrete_Base_Subtype_Decl .. Ada_For_Loop_Var_Decl | Ada_Generic_Subp_Decl .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_5; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Basic_Decl; 
--# end
Scope_Result_4 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_4; 
end case;
--# expr-done 5767
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Match_Result;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 5768
      Find_Result := No_Entity_Basic_Decl;
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Map_Result;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_3
      --# expr-start 5770 '<Not at nodes.lkt:10479:22>' Not_Val ada/nodes.lkt:10479
--# expr-start 5769 '<IsNull at nodes.lkt:10479:26>' Is_Null_1 ada/nodes.lkt:10479
Is_Null_1 := Item_3.Node = null; 
--# expr-done 5769
Not_Val := not (Is_Null_1); 
--# expr-done 5770
      if Not_Val then
         Find_Result := Item_3; 
      end if;
   --# end
               exit when Not_Val;
         end loop;
      end;
--# expr-done 5771
         Property_Result := Find_Result;
   --# end
      Finalizer_Scope_874;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_874;
                     Finalizer_Scope_2709;
                     Finalizer_Scope_2710;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Package_Previous_Part;
--# end
--# property-start Body.task_previous_part ada/nodes.lkt:10483
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Task_Previous_Part
  (Node : Bare_Body_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_875 with Inline_Always;
      Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Defining_Name;
Fld_2 : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_875 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_875;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5777 '<Cast to BasicDecl at nodes.lkt:10484:9>' Cast_Result ada/nodes.lkt:10484
--# expr-start 5776 '<at at nodes.lkt:10484:9>' Get_Result ada/nodes.lkt:10484
--# expr-start 5775 '<bind at nodes.lkt:10485:13>' Dyn_Var_Bind_Result ada/nodes.lkt:10485
--# expr-start 5772 '<FieldAccess for origin_node at nodes.lkt:10485:27>' Fld ada/nodes.lkt:10485
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 5772
Bound_Origin := Fld; 
--# expr-start 5774 '<FieldAccess for all_env_els_impl at nodes.lkt:10487:13>' Fld_2 ada/nodes.lkt:10487
--# expr-start 5773 '<FieldAccess for defining_name at nodes.lkt:10487:13>' Fld_1 ada/nodes.lkt:10487
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5773
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.all_env_els_impl'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_All_Env_Els_Impl (Node => Fld_1.Node, Env => Env, Origin => Bound_Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 5774
Dyn_Var_Bind_Result := Fld_2; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 5775
Get_Result := Get (Self, Dyn_Var_Bind_Result, 0, True); 
--# expr-done 5776
   if Get_Result.Node = null
      or else Get_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Get_Result.Node,
         Info => Get_Result.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 5777
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_875;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_875;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Task_Previous_Part;
--# end
--# property-start Body.protected_previous_part ada/nodes.lkt:10495
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Protected_Previous_Part
  (Node : Bare_Body_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_876 with Inline_Always;
      Var_Expr_0 : Internal_Entity;
Match_0 : Internal_Entity_Protected_Type_Decl;
Match_1 : Internal_Entity_Single_Protected_Decl;
Match_2 : Internal_Entity;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Protected_Type_Decl;
Cast_Expr : Internal_Entity_Protected_Type_Decl;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Single_Protected_Decl;
Cast_Expr_1 : Internal_Entity_Single_Protected_Decl;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity;
Let_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Scope_Result_3 : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_876 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_876;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5780 '<at at nodes.lkt:10496:9>' Get_Result ada/nodes.lkt:10496
--# expr-start 5779 '<FieldAccess for env_elements at nodes.lkt:10496:9>' Fld_1 ada/nodes.lkt:10496
--# expr-start 5778 '<FieldAccess for defining_name at nodes.lkt:10496:9>' Fld ada/nodes.lkt:10496
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5778
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.env_elements
Fld_1 := Libadalang.Implementation.Expr_P_Env_Elements (Node => Fld.Node, Env => Env, No_Visibility => False, E_Info => Fld.Info);
--# end
--# expr-done 5779
Get_Result := Get (Self, Fld_1, 0, True); 
--# expr-done 5780
Var_Expr_0 := Get_Result;
if Var_Expr_0 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 5781 '<Match at nodes.lkt:10498:13>' Match_Result ada/nodes.lkt:10498
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Protected_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Protected_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind prot_type Match_0
Cast_Expr := Match_0; 
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Let_Result := Cast_Result_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Single_Protected_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Single_Protected_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind prot_decl Match_1
Cast_Expr_1 := Match_1; 
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Let_Result_1 := Cast_Result_3; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Incomplete_Tagged_Type_Decl | Ada_Task_Type_Decl .. Ada_Package_Renaming_Decl | Ada_Single_Task_Decl .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Basic_Decl; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 5781
Scope_Result_3 := Match_Result;
   --# end
   Result_Var := Scope_Result_3;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      Finalizer_Scope_876;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_876;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Protected_Previous_Part;
--# end
--# property-start Body.unbound_previous_part ada/nodes.lkt:10508
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Unbound_Previous_Part
  (Node : Bare_Body_Node
      ; Env : Lexical_Env
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Local_Pp : Internal_Entity_Basic_Decl;
Match_0 : Internal_Entity_Base_Subp_Body;
Match_1 : Internal_Entity_Subp_Body_Stub;
Match_2 : Internal_Entity_Entry_Body;
Match_3 : Internal_Entity_Package_Body;
Match_4 : Internal_Entity_Package_Body_Stub;
Match_5 : Internal_Entity_Protected_Body;
Match_6 : Internal_Entity_Protected_Body_Stub;
Match_7 : Internal_Entity_Task_Body;
Match_8 : Internal_Entity_Task_Body_Stub;
Match_9 : Internal_Entity_Accept_Stmt_Body;
Local_Pp_Next_Part : Internal_Entity_Basic_Decl;
Var_Expr_156 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Entry_Decl;
Fld_3 : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Internal_Entity_Basic_Decl;
Fld_6 : Internal_Entity_Basic_Decl;
Fld_7 : Internal_Entity_Basic_Decl;
Fld_8 : Internal_Entity_Basic_Decl;
Fld_9 : Internal_Entity_Entry_Decl;
Match_Prefix : Internal_Entity_Body_Node;
Cast_Result : Internal_Entity_Base_Subp_Body;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Subp_Body_Stub;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Entry_Body;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity_Package_Body;
Let_Result_3 : Internal_Entity_Basic_Decl;
Scope_Result_3 : Internal_Entity_Basic_Decl;
Cast_Result_5 : Internal_Entity_Package_Body_Stub;
Let_Result_4 : Internal_Entity_Basic_Decl;
Scope_Result_4 : Internal_Entity_Basic_Decl;
Cast_Result_6 : Internal_Entity_Protected_Body;
Let_Result_5 : Internal_Entity_Basic_Decl;
Scope_Result_5 : Internal_Entity_Basic_Decl;
Cast_Result_7 : Internal_Entity_Protected_Body_Stub;
Let_Result_6 : Internal_Entity_Basic_Decl;
Scope_Result_6 : Internal_Entity_Basic_Decl;
Cast_Result_8 : Internal_Entity_Task_Body;
Let_Result_7 : Internal_Entity_Basic_Decl;
Scope_Result_7 : Internal_Entity_Basic_Decl;
Cast_Result_9 : Internal_Entity_Task_Body_Stub;
Let_Result_8 : Internal_Entity_Basic_Decl;
Scope_Result_8 : Internal_Entity_Basic_Decl;
Cast_Result_10 : Internal_Entity_Accept_Stmt_Body;
Cast_Result_11 : Internal_Entity_Basic_Decl;
Let_Result_9 : Internal_Entity_Basic_Decl;
Scope_Result_9 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Fld_10 : Internal_Entity_Basic_Decl;
Scope_Result_10 : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Is_A : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Let_Result_10 : Internal_Entity_Basic_Decl;
Is_A_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Let_Result_11 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5799 '<Let at nodes.lkt:10509:9>' Let_Result_11 ada/nodes.lkt:10509
--# scope-start
--# expr-start 5792 '<Match at nodes.lkt:10509:18>' Match_Result ada/nodes.lkt:10509
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Body_Node (Match_Prefix.Node.Kind) is
         when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Base_Subp_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind _ Match_0
--# expr-start 5782 '<FieldAccess for subp_previous_part at nodes.lkt:10510:37>' Fld ada/nodes.lkt:10510
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.subp_previous_part
Fld := Libadalang.Implementation.Body_Node_P_Subp_Previous_Part (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5782
Let_Result := Fld; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Subp_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Subp_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind _ Match_1
--# expr-start 5783 '<FieldAccess for subp_previous_part at nodes.lkt:10511:37>' Fld_1 ada/nodes.lkt:10511
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.subp_previous_part
Fld_1 := Libadalang.Implementation.Body_Node_P_Subp_Previous_Part (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5783
Let_Result_1 := Fld_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Entry_Body =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Entry_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
--# expr-start 5784 '<FieldAccess for entry_previous_part at nodes.lkt:10512:34>' Fld_2 ada/nodes.lkt:10512
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.entry_previous_part
Fld_2 := Libadalang.Implementation.Body_Node_P_Entry_Previous_Part (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 5784
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Let_Result_2 := Cast_Result_3; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Package_Body =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Package_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_4; 
--# bind _ Match_3
--# expr-start 5785 '<FieldAccess for package_previous_part at nodes.lkt:10513:36>' Fld_3 ada/nodes.lkt:10513
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.package_previous_part
Fld_3 := Libadalang.Implementation.Body_Node_P_Package_Previous_Part (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 5785
Let_Result_3 := Fld_3; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Package_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Package_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_5; 
--# bind _ Match_4
--# expr-start 5786 '<FieldAccess for package_previous_part at nodes.lkt:10514:40>' Fld_4 ada/nodes.lkt:10514
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.package_previous_part
Fld_4 := Libadalang.Implementation.Body_Node_P_Package_Previous_Part (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 5786
Let_Result_4 := Fld_4; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Protected_Body =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Protected_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_6; 
--# bind _ Match_5
--# expr-start 5787 '<FieldAccess for protected_previous_part at nodes.lkt:10515:38>' Fld_5 ada/nodes.lkt:10515
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.protected_previous_part
Fld_5 := Libadalang.Implementation.Body_Node_P_Protected_Previous_Part (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 5787
Let_Result_5 := Fld_5; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Protected_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Protected_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_6 := Cast_Result_7; 
--# bind _ Match_6
--# expr-start 5788 '<FieldAccess for protected_previous_part at nodes.lkt:10516:42>' Fld_6 ada/nodes.lkt:10516
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.protected_previous_part
Fld_6 := Libadalang.Implementation.Body_Node_P_Protected_Previous_Part (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 5788
Let_Result_6 := Fld_6; 
--# end
Scope_Result_6 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Create_Internal_Entity_Task_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_7 := Cast_Result_8; 
--# bind _ Match_7
--# expr-start 5789 '<FieldAccess for task_previous_part at nodes.lkt:10517:33>' Fld_7 ada/nodes.lkt:10517
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.task_previous_part
Fld_7 := Libadalang.Implementation.Body_Node_P_Task_Previous_Part (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 5789
Let_Result_7 := Fld_7; 
--# end
Scope_Result_7 := Let_Result_7;
   --# end
            Match_Result := Scope_Result_7; 
         when Ada_Task_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Task_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_8 := Cast_Result_9; 
--# bind _ Match_8
--# expr-start 5790 '<FieldAccess for task_previous_part at nodes.lkt:10518:37>' Fld_8 ada/nodes.lkt:10518
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.task_previous_part
Fld_8 := Libadalang.Implementation.Body_Node_P_Task_Previous_Part (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 5790
Let_Result_8 := Fld_8; 
--# end
Scope_Result_8 := Let_Result_8;
   --# end
            Match_Result := Scope_Result_8; 
         when Ada_Accept_Stmt_Body =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Create_Internal_Entity_Accept_Stmt_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_9 := Cast_Result_10; 
--# bind a Match_9
--# expr-start 5791 '<FieldAccess for accept_stmt_previous_part at nodes.lkt:10519:39>' Fld_9 ada/nodes.lkt:10519
      if Match_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AcceptStmtBody.accept_stmt_previous_part
Fld_9 := Libadalang.Implementation.Accept_Stmt_Body_P_Accept_Stmt_Previous_Part (Node => Match_9.Node, E_Info => Match_9.Info);
--# end
--# expr-done 5791
      Cast_Result_11 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_9.Node,
         Info => Fld_9.Info);
Let_Result_9 := Cast_Result_11; 
--# end
Scope_Result_9 := Let_Result_9;
   --# end
            Match_Result := Scope_Result_9; 
end case;
--# expr-done 5792
Local_Pp := Match_Result; 
--# bind pp Local_Pp
--# expr-start 5798 '<If at nodes.lkt:10525:9>' If_Result_1 ada/nodes.lkt:10525
--# expr-start 5793 '<IsA BodyStub at nodes.lkt:10525:12>' Is_A_1 ada/nodes.lkt:10525
Is_A_1 := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Body_Stub; 
--# expr-done 5793
if Is_A_1 then
   If_Result_1 := Local_Pp;
else
   --# expr-start 5797 '<Let at nodes.lkt:10527:13>' Let_Result_10 ada/nodes.lkt:10527
--# scope-start
Var_Expr_156 := Local_Pp;
if Var_Expr_156 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 5794 '<FieldAccess for next_part_for_decl at nodes.lkt:10527:32>' Fld_10 ada/nodes.lkt:10527
      if Var_Expr_156.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Var_Expr_156.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_156.Info);
--# end
--# expr-done 5794
Scope_Result_10 := Fld_10;
   --# end
   Result_Var := Scope_Result_10;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
Local_Pp_Next_Part := Result_Var; 
--# bind pp_next_part Local_Pp_Next_Part
--# expr-start 5796 '<If at nodes.lkt:10529:13>' If_Result ada/nodes.lkt:10529
--# expr-start 5795 '<IsA BodyStub at nodes.lkt:10529:16>' Is_A ada/nodes.lkt:10529
Is_A := Local_Pp_Next_Part.Node /= null 
and then Local_Pp_Next_Part.Node.Kind in Ada_Body_Stub; 
--# expr-done 5795
if Is_A then
   If_Result := Local_Pp_Next_Part;
else
   If_Result := Local_Pp;
end if;
--# expr-done 5796
Let_Result_10 := If_Result; 
--# end
--# expr-done 5797
   If_Result_1 := Let_Result_10;
end if;
--# expr-done 5798
Let_Result_11 := If_Result_1; 
--# end
--# expr-done 5799
         Property_Result := Let_Result_11;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Body_Node_P_Unbound_Previous_Part;
--# end
--# property-start Body.previous_part_internal ada/nodes.lkt:10540
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Previous_Part_Internal
  (Node : Bare_Body_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_878 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
As_Entity : Internal_Entity_Body_Node;
Is_Null : Boolean;
If_Result : Internal_Entity_Body_Node;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Bare_Basic_Decl;
As_Entity_1 : Internal_Entity_Basic_Decl;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_878 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_878;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5805 '<bind at nodes.lkt:10547:9>' Dyn_Var_Bind_Result ada/nodes.lkt:10547
--# expr-start 5800 '<FieldAccess for node_env at nodes.lkt:10547:20>' Fld ada/nodes.lkt:10547
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Self);
--# expr-done 5800
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 5804 '<as_entity at nodes.lkt:10549:9>' If_Result_1 ada/nodes.lkt:10549
--# expr-start 5803 '<FieldAccess for node at nodes.lkt:10549:9>' Fld_2 ada/nodes.lkt:10549
--# expr-start 5802 '<FieldAccess for unbound_previous_part at nodes.lkt:10549:9>' Fld_1 ada/nodes.lkt:10549
--# expr-start 5801 '<as_bare_entity at nodes.lkt:10549:9>' If_Result ada/nodes.lkt:10549
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Body_Node;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 5801
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.unbound_previous_part
Fld_1 := Libadalang.Implementation.Body_Node_P_Unbound_Previous_Part (Node => If_Result.Node, Env => Bound_Env, Imprecise_Fallback => Imprecise_Fallback, E_Info => If_Result.Info);
--# end
--# expr-done 5802
Fld_2 := Fld_1.Node;
--# expr-done 5803
Is_Null_1 := Fld_2 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Basic_Decl;
else
As_Entity_1 := (Info => E_Info, Node => Fld_2); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 5804
Dyn_Var_Bind_Result := If_Result_1; 
--# expr-done 5805
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      Finalizer_Scope_878;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_878;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Previous_Part_Internal;
--# end
--# property-start Body.previous_part ada/nodes.lkt:10557
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Previous_Part
  (Node : Bare_Body_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Basic_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Body_Node_Body_Node_P_Previous_Part,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Body_Node,
                                As_Bare_Body_Node => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Imprecise_Fallback);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Basic_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 5806 '<FieldAccess for previous_part_internal at nodes.lkt:10557:46>' Fld ada/nodes.lkt:10557
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.previous_part_internal
Fld := Libadalang.Implementation.Body_Node_P_Previous_Part_Internal (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5806
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Basic_Decl,
                        As_Internal_Entity_Basic_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Body_Node_P_Previous_Part;
--# end
--# property-start Body.decl_part ada/nodes.lkt:10562
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Decl_Part
  (Node : Bare_Body_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Match_0 : Internal_Entity_Body_Stub;
Match_1 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Body_Stub;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 5807 '<FieldAccess for previous_part_internal at nodes.lkt:10563:9>' Fld ada/nodes.lkt:10563
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.previous_part_internal
Fld := Libadalang.Implementation.Body_Node_P_Previous_Part_Internal (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5807
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind prev_part Var_Expr_0
--# expr-start 5809 '<Match at nodes.lkt:10565:13>' Match_Result ada/nodes.lkt:10565
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_0; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Package_Body_Stub .. Ada_Task_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind stub Match_0
--# expr-start 5808 '<FieldAccess for previous_part_internal at nodes.lkt:10568:40>' Fld_1 ada/nodes.lkt:10568
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.previous_part_internal
Fld_1 := Libadalang.Implementation.Body_Node_P_Previous_Part_Internal (Node => Match_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_0.Info);
--# end
--# expr-done 5808
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl .. Ada_Subp_Renaming_Decl | Ada_Entry_Body .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind other Match_1
Let_Result_1 := Match_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 5809
Scope_Result_2 := Match_Result;
   --# end
   Result_Var := Scope_Result_2;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Body_Node_P_Decl_Part;
--# end
--# property-start Body.safe_generic_decl_part ada/nodes.lkt:10575
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Safe_Generic_Decl_Part
  (Node : Bare_Body_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Generic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Generic_Decl;
            procedure Finalizer_Scope_881 with Inline_Always;
            procedure Finalizer_Scope_2735 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Basic_Decl;
Var_Expr_157 : Internal_Entity_Array_Access;
Bound_Imprecise_Fallback : Boolean;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Generic_Package_Decl;
Scope_Result : Internal_Entity_Generic_Package_Decl;
Result_Var : Internal_Entity_Generic_Package_Decl;
Fld_2 : Lexical_Env := Empty_Env;
Env_Parent : Lexical_Env := Empty_Env;
Fld_3 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Generic_Subp_Decl;
Cast_Result_2 : Internal_Entity_Generic_Decl;
Is_A_1 : Boolean;
If_Result : Internal_Entity_Generic_Decl;
Cast_Result_3 : Internal_Entity_Generic_Decl;
Is_A_2 : Boolean;
If_Result_1 : Internal_Entity_Generic_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Generic_Decl;
            procedure Finalizer_Scope_881 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Env_Parent);
                     Dec_Ref (Env_Get_Result);
            end Finalizer_Scope_881;
            procedure Finalizer_Scope_2735 is
            begin
                     Dec_Ref (Var_Expr_157);
            end Finalizer_Scope_2735;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5824 '<bind at nodes.lkt:10576:9>' Dyn_Var_Bind_Result ada/nodes.lkt:10576
Bound_Imprecise_Fallback := False; 
--# expr-start 5823 '<If at nodes.lkt:10578:9>' If_Result_1 ada/nodes.lkt:10578
--# expr-start 5810 '<IsA PackageBody at nodes.lkt:10578:12>' Is_A_2 ada/nodes.lkt:10578
Is_A_2 := Self /= null 
and then Self.Kind in Ada_Package_Body_Range; 
--# expr-done 5810
if Is_A_2 then
--# expr-start 5811 '<FieldAccess for decl_part at nodes.lkt:10579:14>' Fld ada/nodes.lkt:10579
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Ent.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 5811
Var_Expr_1 := Fld;
if Var_Expr_1 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind d Var_Expr_1
--# expr-start 5813 '<Cast to GenericPackageDecl at nodes.lkt:10579:41>' Cast_Result ada/nodes.lkt:10579
--# expr-start 5812 '<parent at nodes.lkt:10579:41>' Fld_1 ada/nodes.lkt:10579
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# expr-done 5812
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Generic_Package_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Generic_Package_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Generic_Package_Decl;
   end if;
--# expr-done 5813
Scope_Result := Cast_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Generic_Package_Decl;
end if;
      Cast_Result_3 := Create_Internal_Entity_Generic_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   If_Result_1 := Cast_Result_3;
else
   --# expr-start 5822 '<If at nodes.lkt:10578:9>' If_Result ada/nodes.lkt:10578
--# expr-start 5814 '<IsA BaseSubpBody, SubpBodyStub at nodes.lkt:10580:14>' Is_A_1 ada/nodes.lkt:10580
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Base_Subp_Body | Ada_Subp_Body_Stub_Range; 
--# expr-done 5814
if Is_A_1 then
--# expr-start 5821 '<Cast to GenericSubpDecl at nodes.lkt:10587:13>' Cast_Result_1 ada/nodes.lkt:10587
--# expr-start 5818 '<EnvGet at nodes.lkt:10587:13>' Env_Get_Result ada/nodes.lkt:10587
--# expr-start 5816 '<env_parent at nodes.lkt:10587:13>' Env_Parent ada/nodes.lkt:10587
--# expr-start 5815 '<FieldAccess for children_env at nodes.lkt:10587:13>' Fld_2 ada/nodes.lkt:10587
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 5815
Env_Parent := AST_Envs.Parent (Fld_2); 
--# expr-done 5816
--# expr-start 5817 '<FieldAccess for name_symbol at nodes.lkt:10588:17>' Fld_3 ada/nodes.lkt:10588
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 5817
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Env_Parent, Key => Thin (Fld_3), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 5818
Var_Expr_157 := Env_Get_Result;
      Inc_Ref (Var_Expr_157);
if Var_Expr_157 /= No_Internal_Entity_Array_Type then
   --# scope-start
--# expr-start 5820 '<Find at nodes.lkt:10587:13>' Find_Result ada/nodes.lkt:10587
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Var_Expr_157;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind r Item_0
      --# expr-start 5819 '<IsA GenericSubpDecl at nodes.lkt:10591:27>' Is_A ada/nodes.lkt:10591
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Generic_Subp_Decl_Range; 
--# expr-done 5819
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 5820
Scope_Result_1 := Find_Result;
   --# end
      Finalizer_Scope_2735;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
   if Result_Var_1.Node = null
      or else Result_Var_1.Node.Kind in Ada_Generic_Subp_Decl_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Generic_Subp_Decl
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
   else
         Cast_Result_1 := No_Entity_Generic_Subp_Decl;
   end if;
--# expr-done 5821
      Cast_Result_2 := Create_Internal_Entity_Generic_Decl
        (Node => Cast_Result_1.Node,
         Info => Cast_Result_1.Info);
   If_Result := Cast_Result_2;
else
   If_Result := No_Entity_Generic_Decl;
end if;
--# expr-done 5822
   If_Result_1 := If_Result;
end if;
--# expr-done 5823
Dyn_Var_Bind_Result := If_Result_1; 
--# expr-done 5824
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      Finalizer_Scope_881;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_881;
                     Finalizer_Scope_2735;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Safe_Generic_Decl_Part;
--# end
--# property-start Body.next_part_for_decl ada/nodes.lkt:10600
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Next_Part_For_Decl
  (Node : Bare_Body_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Basic_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Body_Node_P_Next_Part_For_Decl;
--# end
--# property-start Body.is_subunit ada/nodes.lkt:10602
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Is_Subunit
  (Node : Bare_Body_Node
  )
   return Boolean
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5826 '<IsA Subunit at nodes.lkt:10602:30>' Is_A ada/nodes.lkt:10602
--# expr-start 5825 '<parent at nodes.lkt:10602:30>' Fld ada/nodes.lkt:10602
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 5825
Is_A := Fld /= null 
and then Fld.Kind in Ada_Subunit_Range; 
--# expr-done 5826
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Body_Node_P_Is_Subunit;
--# end
--# property-start Body.subunit_root ada/nodes.lkt:10606
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Subunit_Root
  (Node : Bare_Body_Node
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_0 : Bare_Subunit;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Subunit;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 5828 '<Cast to Subunit at nodes.lkt:10607:9>' Cast_Result ada/nodes.lkt:10607
--# expr-start 5827 '<parent at nodes.lkt:10607:9>' Fld ada/nodes.lkt:10607
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 5827
   if Fld = null
      or else Fld.Kind in Ada_Subunit_Range
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 5828
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind su Var_Expr_0
--# expr-start 5829 '<FieldAccess for body_root at nodes.lkt:10607:44>' Fld_1 ada/nodes.lkt:10607
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.body_root
Fld_1 := Libadalang.Implementation.Subunit_P_Body_Root (Node => Var_Expr_0);
--# end
--# expr-done 5829
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Body_Node_P_Subunit_Root;
--# end
--# property-start Body.body_scope ada/nodes.lkt:10615
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Body_Scope
  (Node : Bare_Body_Node
      ; Follow_Private : Boolean
      ; Force_Decl : Boolean
         := False
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind follow_private Follow_Private
   --# bind force_decl Force_Decl
   --# bind env Env
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_885 with Inline_Always;
            procedure Finalizer_Scope_2738 with Inline_Always;
            procedure Finalizer_Scope_2739 with Inline_Always;
      Local_Scope : Lexical_Env := Empty_Env;
Local_Dns : Lexical_Env := Empty_Env;
Local_Public_Scope : Lexical_Env := Empty_Env;
Var_Expr_0 : Bare_Generic_Package_Decl;
Var_Expr_1 : Bare_Ada_Node;
Var_Expr_2 : Internal_Entity;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Internal_Entity_Defining_Name;
Fld_5 : Lexical_Env := Empty_Env;
Is_Equal : Boolean;
Env_Node : Bare_Ada_Node;
Cast_Expr : Bare_Body_Node;
Cast_Result : Bare_Ada_Node;
Is_Equal_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
Fld_6 : Internal_Entity_Defining_Name;
Fld_7 : Lexical_Env := Empty_Env;
Fld_8 : Bare_Ada_Node;
Fld_9 : Lexical_Env := Empty_Env;
Fld_10 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Lexical_Env := Empty_Env;
Fld_11 : Boolean;
Fld_12 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : Lexical_Env := Empty_Env;
Fld_13 : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result_6 : Lexical_Env := Empty_Env;
Env_Node_1 : Bare_Ada_Node;
Cast_Result_1 : Bare_Generic_Package_Decl;
Fld_14 : Bare_Generic_Package_Internal;
Fld_15 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Fld_16 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
Env_Node_2 : Bare_Ada_Node;
Is_A : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_7 : Boolean;
If_Result_8 : Lexical_Env := Empty_Env;
Let_Result_1 : Lexical_Env := Empty_Env;
Let_Result_2 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_885 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Local_Dns);
                     Dec_Ref (Fld_5);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_9);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (Local_Scope);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Public_Scope);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (If_Result_8);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_885;
            procedure Finalizer_Scope_2738 is
            begin
                     Dec_Ref (Fld_15);
            end Finalizer_Scope_2738;
            procedure Finalizer_Scope_2739 is
            begin
                     Dec_Ref (Fld_16);
            end Finalizer_Scope_2739;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5870 '<Let at nodes.lkt:10619:9>' Let_Result_2 ada/nodes.lkt:10619
--# scope-start
--# expr-start 5856 '<If at nodes.lkt:10624:13>' If_Result_6 ada/nodes.lkt:10624
--# expr-start 5832 '<Not at nodes.lkt:10624:16>' Not_Val ada/nodes.lkt:10624
--# expr-start 5831 '<IsNull at nodes.lkt:10624:20>' Is_Null ada/nodes.lkt:10624
--# expr-start 5830 '<FieldAccess for subunit_root at nodes.lkt:10624:20>' Fld_13 ada/nodes.lkt:10624
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.subunit_root
Fld_13 := Libadalang.Implementation.Body_Node_P_Subunit_Root (Node => Self);
--# end
--# expr-done 5830
Is_Null := Fld_13.Node = null; 
--# expr-done 5831
Not_Val := not (Is_Null); 
--# expr-done 5832
if Not_Val then
   --# expr-start 5834 '<FieldAccess for children_env at nodes.lkt:10625:18>' Fld_1 ada/nodes.lkt:10625
--# expr-start 5833 '<FieldAccess for subunit_root at nodes.lkt:10625:18>' Fld ada/nodes.lkt:10625
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.subunit_root
Fld := Libadalang.Implementation.Body_Node_P_Subunit_Root (Node => Self);
--# end
--# expr-done 5833
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 5834
   If_Result_6 := Fld_1;
else
   --# expr-start 5855 '<If at nodes.lkt:10624:13>' If_Result_5 ada/nodes.lkt:10624
--# expr-start 5837 '<BooleanBinaryOp And at nodes.lkt:10630:18>' If_Result_4 ada/nodes.lkt:10630
--# expr-start 5835 '<FieldAccess for is_subprogram at nodes.lkt:10630:18>' Fld_11 ada/nodes.lkt:10630
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_subprogram
Fld_11 := Libadalang.Implementation.Basic_Decl_P_Is_Subprogram (Node => Self);
--# end
--# expr-done 5835
if Fld_11 then
   --# expr-start 5836 '<FieldAccess for is_compilation_unit_root at nodes.lkt:10630:43>' Fld_12 ada/nodes.lkt:10630
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Self);
--# end
--# expr-done 5836
   If_Result_4 := Fld_12;
else
   If_Result_4 := False;
end if;
--# expr-done 5837
if If_Result_4 then
   --# expr-start 5847 '<Let at nodes.lkt:10632:17>' Let_Result ada/nodes.lkt:10632
--# scope-start
--# expr-start 5839 '<FieldAccess for scope at nodes.lkt:10632:27>' Fld_3 ada/nodes.lkt:10632
--# expr-start 5838 '<FieldAccess for defining_name at nodes.lkt:10632:27>' Fld_2 ada/nodes.lkt:10632
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5838
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.scope'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Scope (Node => Fld_2.Node, Env => Env);
--# end
--# expr-done 5839
Local_Dns := Fld_3; Inc_Ref (Local_Dns);
--# bind dns Local_Dns
--# expr-start 5846 '<If at nodes.lkt:10636:17>' If_Result_1 ada/nodes.lkt:10636
--# expr-start 5843 '<BooleanBinaryOp Or at nodes.lkt:10636:20>' If_Result ada/nodes.lkt:10636
--# expr-start 5840 '<IsNull at nodes.lkt:10636:20>' Is_Equal ada/nodes.lkt:10636
Is_Equal := Equivalent (Local_Dns, Empty_Env); 
--# expr-done 5840
if Is_Equal then
   If_Result := True;
else
   --# expr-start 5842 '<Eq at nodes.lkt:10636:35>' Is_Equal_1 ada/nodes.lkt:10636
--# expr-start 5841 '<env_node at nodes.lkt:10636:35>' Env_Node ada/nodes.lkt:10636
Env_Node := AST_Envs.Env_Node (Local_Dns); 
--# expr-done 5841
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Is_Equal_1 := Env_Node = Cast_Result; 
--# expr-done 5842
   If_Result := Is_Equal_1;
end if;
--# expr-done 5843
if If_Result then
   --# expr-start 5845 '<FieldAccess for parent_scope at nodes.lkt:10637:22>' Fld_5 ada/nodes.lkt:10637
--# expr-start 5844 '<FieldAccess for defining_name at nodes.lkt:10637:22>' Fld_4 ada/nodes.lkt:10637
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5844
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.parent_scope'
Fld_5 := Libadalang.Implementation.Dispatcher_Name_P_Parent_Scope (Node => Fld_4.Node, Env => Env);
--# end
--# expr-done 5845
   If_Result_1 := Fld_5;
else
   If_Result_1 := Local_Dns;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 5846
Let_Result := If_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 5847
   If_Result_5 := Let_Result;
else
   --# expr-start 5854 '<If at nodes.lkt:10624:13>' If_Result_3 ada/nodes.lkt:10624
--# expr-start 5849 '<BooleanBinaryOp Or at nodes.lkt:10643:18>' If_Result_2 ada/nodes.lkt:10643
--# expr-start 5848 '<FieldAccess for is_compilation_unit_root at nodes.lkt:10643:18>' Fld_10 ada/nodes.lkt:10643
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld_10 := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Self);
--# end
--# expr-done 5848
if Fld_10 then
   If_Result_2 := True;
else
   If_Result_2 := Force_Decl;
end if;
--# expr-done 5849
if If_Result_2 then
   --# expr-start 5851 '<FieldAccess for scope at nodes.lkt:10644:18>' Fld_7 ada/nodes.lkt:10644
--# expr-start 5850 '<FieldAccess for defining_name at nodes.lkt:10644:18>' Fld_6 ada/nodes.lkt:10644
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5850
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.scope'
Fld_7 := Libadalang.Implementation.Dispatcher_Name_P_Scope (Node => Fld_6.Node, Env => Env);
--# end
--# expr-done 5851
   If_Result_3 := Fld_7;
else
   --# expr-start 5853 '<FieldAccess for children_env at nodes.lkt:10647:18>' Fld_9 ada/nodes.lkt:10647
--# expr-start 5852 '<parent at nodes.lkt:10647:18>' Fld_8 ada/nodes.lkt:10647
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.Parent; 
--# expr-done 5852
      if Fld_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Children_Env (Node => Fld_8);
--# expr-done 5853
   If_Result_3 := Fld_9;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 5854
   If_Result_5 := If_Result_3;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 5855
   If_Result_6 := If_Result_5;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 5856
Local_Scope := If_Result_6; Inc_Ref (Local_Scope);
--# bind scope Local_Scope
--# expr-start 5869 '<Let at nodes.lkt:10650:9>' Let_Result_1 ada/nodes.lkt:10650
--# scope-start
--# expr-start 5858 '<Cast to GenericPackageDecl at nodes.lkt:10651:13>' Cast_Result_1 ada/nodes.lkt:10651
--# expr-start 5857 '<env_node at nodes.lkt:10651:13>' Env_Node_1 ada/nodes.lkt:10651
Env_Node_1 := AST_Envs.Env_Node (Local_Scope); 
--# expr-done 5857
   if Env_Node_1 = null
      or else Env_Node_1.Kind in Ada_Generic_Package_Decl_Range
   then
      Cast_Result_1 := Env_Node_1;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 5858
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind gen_pkg_decl Var_Expr_0
--# expr-start 5860 '<FieldAccess for children_env at nodes.lkt:10652:35>' Fld_15 ada/nodes.lkt:10652
--# expr-start 5859 '<FieldAccess for package_decl at nodes.lkt:10652:35>' Fld_14 ada/nodes.lkt:10652
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Var_Expr_0.Generic_Package_Decl_F_Package_Decl;
--# expr-done 5859
      if Fld_14 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Children_Env (Node => Fld_14);
--# expr-done 5860
Scope_Result := Fld_15;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2738;
   Result_Var := Scope_Result;
else
   Result_Var := Local_Scope;
end if;
      Inc_Ref (Result_Var);
Local_Public_Scope := Result_Var; Inc_Ref (Local_Public_Scope);
--# bind public_scope Local_Public_Scope
--# expr-start 5868 '<If at nodes.lkt:10658:9>' If_Result_8 ada/nodes.lkt:10658
--# expr-start 5863 '<BooleanBinaryOp And at nodes.lkt:10659:13>' If_Result_7 ada/nodes.lkt:10659
if Follow_Private then
--# expr-start 5861 '<env_node at nodes.lkt:10660:17>' Env_Node_2 ada/nodes.lkt:10660
Env_Node_2 := AST_Envs.Env_Node (Local_Public_Scope); 
--# expr-done 5861
Var_Expr_1 := Env_Node_2;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 5862 '<IsA BasePackageDecl, SingleProtectedDecl, ProtectedTypeDecl at nodes.lkt:10662:17>' Is_A ada/nodes.lkt:10662
Is_A := Var_Expr_1 /= null 
and then Var_Expr_1.Kind in Ada_Base_Package_Decl | Ada_Single_Protected_Decl_Range | Ada_Protected_Type_Decl_Range; 
--# expr-done 5862
Scope_Result_2 := Is_A;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_7 := Result_Var_2;
else
   If_Result_7 := False;
end if;
--# expr-done 5863
if If_Result_7 then
--# expr-start 5866 '<at at nodes.lkt:10665:13>' Get_Result ada/nodes.lkt:10665
--# expr-start 5865 '<EnvGet at nodes.lkt:10665:13>' Env_Get_Result ada/nodes.lkt:10665
--# expr-start 5864 '<Symbol __privatepart at nodes.lkt:10666:17>' Sym ada/nodes.lkt:10666
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Privatepart); 
--# expr-done 5864
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Local_Public_Scope, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 5865
Get_Result := Get (Self, Env_Get_Result, 0, True); 
--# expr-done 5866
Var_Expr_2 := Get_Result;
if Var_Expr_2 /= No_Entity then
   --# scope-start
   --# bind pp Var_Expr_2
--# expr-start 5867 '<FieldAccess for children_env at nodes.lkt:10672:25>' Fld_16 ada/nodes.lkt:10672
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Children_Env (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# expr-done 5867
Scope_Result_1 := Fld_16;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2739;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Local_Public_Scope;
end if;
      Inc_Ref (Result_Var_1);
   If_Result_8 := Result_Var_1;
else
   If_Result_8 := Local_Public_Scope;
end if;
      Inc_Ref (If_Result_8);
--# expr-done 5868
Let_Result_1 := If_Result_8; Inc_Ref (Let_Result_1);
--# end
--# expr-done 5869
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 5870
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_885;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_885;
                     Finalizer_Scope_2738;
                     Finalizer_Scope_2739;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Body_Scope;
--# end
--# property-start Body.gnatprove_annotations ada/nodes.lkt:10678
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Gnatprove_Annotations
  (Node : Bare_Body_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr_Array_Access
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_886 with Inline_Always;
            procedure Finalizer_Scope_2742 with Inline_Always;
            procedure Finalizer_Scope_2746 with Inline_Always;
            procedure Finalizer_Scope_2747 with Inline_Always;
            procedure Finalizer_Scope_2749 with Inline_Always;
            procedure Finalizer_Scope_2750 with Inline_Always;
            procedure Finalizer_Scope_2757 with Inline_Always;
            procedure Finalizer_Scope_2759 with Inline_Always;
      Local_Subp_Decl_Part : Internal_Entity_Basic_Decl;
Local_Aspects : Internal_Entity_Expr_Array_Access;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Local_Pragma_Scope : Internal_Entity_Basic_Decl;
Local_Scope_Decls : Bare_Pragma_Node_Array_Access;
Local_Pragmas : Internal_Entity_Expr_Array_Access;
Local_Enclosing_Subp_Annotations : Internal_Entity_Expr_Array_Access;
Var_Expr_158 : Internal_Entity_Aspect_Spec;
Var_Expr_159 : Internal_Entity_Name;
Var_Expr : Internal_Entity_Basic_Decl;
Var_Expr_1 : Bare_Pragma_Node_Array_Access;
Var_Expr_160 : Internal_Entity_Basic_Decl;
Var_Expr_161 : Bare_Declarative_Part;
Var_Expr_162 : Internal_Entity_Basic_Decl;
Var_Expr_163 : Bare_Pragma_Node;
Var_Expr_164 : Bare_Base_Assoc;
Var_Expr_165 : Internal_Entity_Name;
Var_Expr_166 : Bare_Base_Assoc;
Var_Expr_167 : Internal_Entity_Name;
Var_Expr_168 : Internal_Entity_Base_Subp_Body;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Aspect_Spec;
Scope_Result : Internal_Entity_Aspect_Spec;
Fld_2 : Internal_Entity_Aspect_Spec;
Result_Var : Internal_Entity_Aspect_Spec;
Fld_3 : Internal_Entity_Aspect_Assoc_List;
Fld_4 : Bare_Aspect_Assoc_List;
Fld_5 : Internal_Entity_Info;
Item_1 : Internal_Entity_Aspect_Assoc;
Bare_Item_1 : Bare_Aspect_Assoc;
Fld_6 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Aggregate;
Fld_7 : Internal_Entity_Assoc_List;
Fld_8 : Bare_Assoc_List;
Fld_9 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_10 : Internal_Entity_Expr;
As_Entity_1 : Internal_Entity_Aspect_Assoc;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Aspect_Assoc;
Fld_11 : Internal_Entity_Name;
Sym : Symbol_Type;
Fld_12 : Boolean;
Fld_13 : Internal_Entity_Expr;
Is_A : Boolean;
If_Result_2 : Boolean;
Fld_14 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Aggregate;
Fld_15 : Internal_Entity_Assoc_List;
Fld_16 : Bare_Assoc_List;
Fld_17 : Internal_Entity_Info;
Get_Result_1 : Bare_Basic_Assoc;
As_Entity_2 : Internal_Entity_Basic_Assoc;
Is_Null_2 : Boolean;
If_Result_3 : Internal_Entity_Basic_Assoc;
Fld_18 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Sym_1 : Symbol_Type;
Fld_19 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_4 : Boolean;
Map_Result : Internal_Entity_Expr_Array_Access;
Scope_Result_2 : Internal_Entity_Expr_Array_Access;
Result_Var_2 : Internal_Entity_Expr_Array_Access;
Scope_Result_3 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity_Body_Node;
Cast_Result_3 : Internal_Entity_Expr_Function;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Result_Var_3 : Internal_Entity_Basic_Decl;
Fld_20 : Bare_Declarative_Part;
Fld_21 : Bare_Ada_Node_List;
Item_2 : Bare_Ada_Node;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_5 : Bare_Pragma_Node;
Is_A_1 : Boolean;
Map_Result_1 : Bare_Pragma_Node_Array_Access;
Scope_Result_4 : Bare_Pragma_Node_Array_Access;
Fld_22 : Internal_Entity_Pragma_Node_List;
Fld_23 : Bare_Pragma_Node_List;
Fld_24 : Internal_Entity_Info;
Item_3 : Internal_Entity_Pragma_Node;
Bare_Item_3 : Bare_Pragma_Node;
Fld_25 : Bare_Pragma_Node;
As_Entity_3 : Internal_Entity_Pragma_Node;
Is_Null_3 : Boolean;
If_Result_5 : Internal_Entity_Pragma_Node;
Map_Result_2 : Bare_Pragma_Node_Array_Access;
Scope_Result_5 : Bare_Pragma_Node_Array_Access;
Result_Var_4 : Bare_Pragma_Node_Array_Access;
Result_Var_5 : Bare_Pragma_Node_Array_Access;
Scope_Result_6 : Bare_Pragma_Node_Array_Access;
Result_Var_6 : Bare_Pragma_Node_Array_Access;
Scope_Result_7 : Bare_Pragma_Node_Array_Access;
Result_Var_7 : Bare_Pragma_Node_Array_Access;
Fld_26 : Bare_Base_Assoc_List;
Get_Result_2 : Bare_Base_Assoc;
As_Entity_4 : Internal_Entity_Base_Assoc;
Is_Null_4 : Boolean;
If_Result_6 : Internal_Entity_Base_Assoc;
Fld_27 : Internal_Entity_Expr;
Fld_28 : Bare_Basic_Decl;
Node_Comp : Boolean;
Fld_29 : Bare_Identifier;
Sym_2 : Symbol_Type;
Fld_30 : Boolean;
Scope_Result_8 : Boolean;
Result_Var_8 : Boolean;
If_Result_7 : Boolean;
Fld_31 : Bare_Base_Assoc_List;
Get_Result_3 : Bare_Base_Assoc;
As_Entity_5 : Internal_Entity_Base_Assoc;
Is_Null_5 : Boolean;
If_Result_8 : Internal_Entity_Base_Assoc;
Fld_32 : Internal_Entity_Expr;
Scope_Result_9 : Internal_Entity_Expr;
Result_Var_9 : Internal_Entity_Expr;
Cast_Result_6 : Internal_Entity_Name;
Sym_3 : Symbol_Type;
Fld_33 : Boolean;
Scope_Result_10 : Boolean;
Result_Var_10 : Boolean;
If_Result_9 : Boolean;
Fld_34 : Bare_Base_Assoc_List;
Get_Result_4 : Bare_Base_Assoc;
As_Entity_6 : Internal_Entity_Base_Assoc;
Is_Null_6 : Boolean;
If_Result_10 : Internal_Entity_Base_Assoc;
Fld_35 : Internal_Entity_Expr;
Scope_Result_11 : Internal_Entity_Expr;
Result_Var_11 : Internal_Entity_Expr;
Cast_Result_7 : Internal_Entity_Name;
Fld_36 : Internal_Entity_Defining_Name_Array_Access;
Get_Result_5 : Internal_Entity_Defining_Name;
Fld_37 : Symbol_Type;
Fld_38 : Boolean;
Scope_Result_12 : Boolean;
Result_Var_12 : Boolean;
If_Result_11 : Boolean;
Map_Result_3 : Internal_Entity_Expr_Array_Access;
Fld_39 : Internal_Entity_Array_Access;
Is_A_2 : Boolean;
Find_Result : Internal_Entity;
Cast_Result_8 : Internal_Entity_Base_Subp_Body;
Fld_40 : Internal_Entity_Expr_Array_Access;
Scope_Result_13 : Internal_Entity_Expr_Array_Access;
Result_Var_13 : Internal_Entity_Expr_Array_Access;
Concat_Result : Internal_Entity_Expr_Array_Access;
Concat_Result_1 : Internal_Entity_Expr_Array_Access;
Let_Result : Internal_Entity_Expr_Array_Access;
Let_Result_1 : Internal_Entity_Expr_Array_Access;
Let_Result_2 : Internal_Entity_Expr_Array_Access;
Let_Result_3 : Internal_Entity_Expr_Array_Access;
Let_Result_4 : Internal_Entity_Expr_Array_Access;
Let_Result_5 : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_886 is
            begin
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Local_Aspects);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Result_Var_7);
                     Dec_Ref (Local_Scope_Decls);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Local_Pragmas);
                     Dec_Ref (Fld_39);
                     Dec_Ref (Scope_Result_13);
                     Dec_Ref (Result_Var_13);
                     Dec_Ref (Local_Enclosing_Subp_Annotations);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
            end Finalizer_Scope_886;
            procedure Finalizer_Scope_2742 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2742;
            procedure Finalizer_Scope_2746 is
            begin
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Result_Var_6);
            end Finalizer_Scope_2746;
            procedure Finalizer_Scope_2747 is
            begin
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (Result_Var_5);
            end Finalizer_Scope_2747;
            procedure Finalizer_Scope_2749 is
            begin
                     Dec_Ref (Var_Expr_1);
            end Finalizer_Scope_2749;
            procedure Finalizer_Scope_2750 is
            begin
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_2750;
            procedure Finalizer_Scope_2757 is
            begin
                     Dec_Ref (Fld_36);
            end Finalizer_Scope_2757;
            procedure Finalizer_Scope_2759 is
            begin
                     Dec_Ref (Fld_40);
            end Finalizer_Scope_2759;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Body_Node_Body_Node_P_Gnatprove_Annotations,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Body_Node,
                                As_Bare_Body_Node => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Expr_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 5942 '<Let at nodes.lkt:10679:9>' Let_Result_5 ada/nodes.lkt:10679
--# scope-start
--# expr-start 5871 '<FieldAccess for decl_part at nodes.lkt:10679:30>' Fld ada/nodes.lkt:10679
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5871
Local_Subp_Decl_Part := Fld; 
--# bind subp_decl_part Local_Subp_Decl_Part
--# expr-start 5941 '<Let at nodes.lkt:10682:9>' Let_Result_4 ada/nodes.lkt:10682
--# scope-start
Var_Expr_0 := Local_Subp_Decl_Part;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind part Var_Expr_0
--# expr-start 5872 '<FieldAccess for aspects at nodes.lkt:10683:41>' Fld_1 ada/nodes.lkt:10683
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Aspect_Spec (Node => Implementation.Basic_Decl_F_Aspects (Var_Expr_0.Node), Info => Var_Expr_0.Info);
--# expr-done 5872
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 5873 '<FieldAccess for aspects at nodes.lkt:10683:67>' Fld_2 ada/nodes.lkt:10683
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Aspect_Spec (Node => Implementation.Basic_Decl_F_Aspects (Ent.Node), Info => Ent.Info);
--# expr-done 5873
   Result_Var := Fld_2;
end if;
Var_Expr_158 := Result_Var;
if Var_Expr_158 /= No_Entity_Aspect_Spec then
   --# scope-start
--# expr-start 5893 '<Map at nodes.lkt:10683:13>' Map_Result ada/nodes.lkt:10683
   --# expr-start 5874 '<FieldAccess for aspect_assocs at nodes.lkt:10683:13>' Fld_3 ada/nodes.lkt:10683
      if Var_Expr_158.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Aspect_Assoc_List (Node => Var_Expr_158.Node.Aspect_Spec_F_Aspect_Assocs, Info => Var_Expr_158.Info);
--# expr-done 5874
Fld_4 := Fld_3.Node;
      declare
         Map_Result_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      if Fld_4 = null then
      Map_Result := Create_Internal_Entity_Expr_Array (0);
      else
      declare
         Collection : constant Bare_Aspect_Assoc_List := Fld_4;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_1 := Bare_Item_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Aspect_Assoc;
else
Fld_5 := Fld_3.Info;
As_Entity_1 := (Info => Fld_5, Node => Bare_Item_1); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_1 := If_Result_1; 
   --# scope-start
               --# bind a Item_1
         --# expr-start 5888 '<BooleanBinaryOp And at nodes.lkt:10688:17>' If_Result_4 ada/nodes.lkt:10688
--# expr-start 5880 '<BooleanBinaryOp And at nodes.lkt:10688:18>' If_Result_2 ada/nodes.lkt:10688
--# expr-start 5877 '<FieldAccess for name_is at nodes.lkt:10688:18>' Fld_12 ada/nodes.lkt:10688
--# expr-start 5875 '<FieldAccess for id at nodes.lkt:10688:18>' Fld_11 ada/nodes.lkt:10688
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Name (Node => Item_1.Node.Aspect_Assoc_F_Id, Info => Item_1.Info);
--# expr-done 5875
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5876 '<Symbol Annotate at nodes.lkt:10688:31>' Sym ada/nodes.lkt:10688
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Annotate); 
--# expr-done 5876
--# property-call-start Name.name_is
Fld_12 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_11.Node, Sym => Sym);
--# end
--# expr-done 5877
if Fld_12 then
   --# expr-start 5879 '<IsA Aggregate at nodes.lkt:10688:48>' Is_A ada/nodes.lkt:10688
--# expr-start 5878 '<FieldAccess for expr at nodes.lkt:10688:48>' Fld_13 ada/nodes.lkt:10688
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Expr (Node => Item_1.Node.Aspect_Assoc_F_Expr, Info => Item_1.Info);
--# expr-done 5878
Is_A := Fld_13.Node /= null 
and then Fld_13.Node.Kind in Ada_Aggregate_Range; 
--# expr-done 5879
   If_Result_2 := Is_A;
else
   If_Result_2 := False;
end if;
--# expr-done 5880
if If_Result_2 then
--# expr-start 5885 '<Cast to Name at nodes.lkt:10689:21>' Cast_Result_2 ada/nodes.lkt:10689
--# expr-start 5884 '<FieldAccess for expr at nodes.lkt:10689:21>' Fld_18 ada/nodes.lkt:10689
--# expr-start 5883 '<FieldAccess for assocs at nodes.lkt:10689:21>' Fld_15 ada/nodes.lkt:10689
--# expr-start 5882 '<Cast to Aggregate at nodes.lkt:10689:21>' Cast_Result_1 ada/nodes.lkt:10689
--# expr-start 5881 '<FieldAccess for expr at nodes.lkt:10689:21>' Fld_14 ada/nodes.lkt:10689
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Expr (Node => Item_1.Node.Aspect_Assoc_F_Expr, Info => Item_1.Info);
--# expr-done 5881
   if Fld_14.Node = null
      or else Fld_14.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Aggregate
        (Node => Fld_14.Node,
         Info => Fld_14.Info);
   else
         Cast_Result_1 := No_Entity_Aggregate;
   end if;
--# expr-done 5882
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Assoc_List (Node => Cast_Result_1.Node.Base_Aggregate_F_Assocs, Info => Cast_Result_1.Info);
--# expr-done 5883
Fld_16 := Fld_15.Node;
Get_Result_1 := Get (Self, Fld_16, 0, True); 
Is_Null_2 := Get_Result_1 = null; 
if Is_Null_2 then
   If_Result_3 := No_Entity_Basic_Assoc;
else
Fld_17 := Fld_15.Info;
As_Entity_2 := (Info => Fld_17, Node => Get_Result_1); 
   If_Result_3 := As_Entity_2;
end if;
      if If_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_18 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result_3.Node, E_Info => If_Result_3.Info);
--# end
--# expr-done 5884
   if Fld_18.Node = null
      or else Fld_18.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Fld_18.Node,
         Info => Fld_18.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 5885
Var_Expr_159 := Cast_Result_2;
if Var_Expr_159 /= No_Entity_Name then
   --# scope-start
--# expr-start 5887 '<FieldAccess for name_is at nodes.lkt:10689:21>' Fld_19 ada/nodes.lkt:10689
      if Var_Expr_159.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5886 '<Symbol GNATprove at nodes.lkt:10690:21>' Sym_1 ada/nodes.lkt:10690
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Gnatprove); 
--# expr-done 5886
--# property-call-start Name.name_is
Fld_19 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_159.Node, Sym => Sym_1);
--# end
--# expr-done 5887
Scope_Result_1 := Fld_19;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_4 := Result_Var_1;
else
   If_Result_4 := False;
end if;
--# expr-done 5888
         if If_Result_4 then
      --# expr-start 5892 '<FieldAccess for expr at nodes.lkt:10686:24>' Fld_10 ada/nodes.lkt:10686
--# expr-start 5891 '<FieldAccess for assocs at nodes.lkt:10686:24>' Fld_7 ada/nodes.lkt:10686
--# expr-start 5890 '<Cast to Aggregate at nodes.lkt:10686:24>' Cast_Result ada/nodes.lkt:10686
--# expr-start 5889 '<FieldAccess for expr at nodes.lkt:10686:24>' Fld_6 ada/nodes.lkt:10686
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Item_1.Node.Aspect_Assoc_F_Expr, Info => Item_1.Info);
--# expr-done 5889
   if Fld_6.Node = null
      or else Fld_6.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result := Create_Internal_Entity_Aggregate
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
   else
         Cast_Result := No_Entity_Aggregate;
   end if;
--# expr-done 5890
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Assoc_List (Node => Cast_Result.Node.Base_Aggregate_F_Assocs, Info => Cast_Result.Info);
--# expr-done 5891
Fld_8 := Fld_7.Node;
Get_Result := Get (Self, Fld_8, 1, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_9 := Fld_7.Info;
As_Entity := (Info => Fld_9, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 5892
         declare
            Item_To_Append : constant Internal_Entity_Expr := Fld_10;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 5893
Scope_Result_2 := Map_Result;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2742;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Internal_Entity_Expr_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
Local_Aspects := Result_Var_2; Inc_Ref (Local_Aspects);
--# bind aspects Local_Aspects
--# expr-start 5940 '<Let at nodes.lkt:10695:9>' Let_Result_3 ada/nodes.lkt:10695
--# scope-start
Var_Expr := Local_Subp_Decl_Part;
if Var_Expr /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_3 := Var_Expr;
   --# end
   Result_Var_3 := Scope_Result_3;
else
--# expr-start 5894 '<Cast to ExprFunction at nodes.lkt:10695:47>' Cast_Result_3 ada/nodes.lkt:10695
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Expr_Function_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Expr_Function
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_3 := No_Entity_Expr_Function;
   end if;
--# expr-done 5894
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Result_3.Node,
         Info => Cast_Result_3.Info);
   Result_Var_3 := Cast_Result_4;
end if;
Local_Pragma_Scope := Result_Var_3; 
--# bind pragma_scope Local_Pragma_Scope
--# expr-start 5939 '<Let at nodes.lkt:10699:9>' Let_Result_2 ada/nodes.lkt:10699
--# scope-start
Var_Expr_160 := Local_Pragma_Scope;
if Var_Expr_160 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 5895 '<FieldAccess for declarative_scope at nodes.lkt:10700:13>' Fld_20 ada/nodes.lkt:10700
      if Var_Expr_160.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld_20 := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Var_Expr_160.Node);
--# end
--# expr-done 5895
Var_Expr_161 := Fld_20;
if Var_Expr_161 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 5899 '<Map at nodes.lkt:10700:13>' Map_Result_1 ada/nodes.lkt:10700
   --# expr-start 5896 '<FieldAccess for decls at nodes.lkt:10700:13>' Fld_21 ada/nodes.lkt:10700
      if Var_Expr_161 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Var_Expr_161.Declarative_Part_F_Decls;
--# expr-done 5896
      declare
         Map_Result_1_Vec : Bare_Pragma_Node_Vectors.Vector;
      begin
      if Fld_21 = null then
      Map_Result_1 := Create_Bare_Pragma_Node_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_21;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_2 := Untyped_Item_2; 
   --# scope-start
               --# bind p Item_2
         --# expr-start 5897 '<IsA Pragma at nodes.lkt:10702:24>' Is_A_1 ada/nodes.lkt:10702
Is_A_1 := Item_2 /= null 
and then Item_2.Kind in Ada_Pragma_Node_Range; 
--# expr-done 5897
         if Is_A_1 then
      --# expr-start 5898 '<Cast to Pragma at nodes.lkt:10701:24>' Cast_Result_5 ada/nodes.lkt:10701
Cast_Expr_1 := Item_2; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result_5 := Cast_Expr_1;
   else
         Cast_Result_5 := No_Bare_Ada_Node;
   end if;
--# expr-done 5898
         declare
            Item_To_Append : constant Bare_Pragma_Node := Cast_Result_5;
         begin
            Bare_Pragma_Node_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Bare_Pragma_Node_Array
           (Items_Count => Natural (Bare_Pragma_Node_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Bare_Pragma_Node_Vectors.Get
              (Map_Result_1_Vec,
               I + Bare_Pragma_Node_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Bare_Pragma_Node_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 5899
Var_Expr_1 := Map_Result_1;
      Inc_Ref (Var_Expr_1);
if Var_Expr_1 /= No_Bare_Pragma_Node_Array_Type then
   --# scope-start
   --# bind e Var_Expr_1
Scope_Result_4 := Var_Expr_1;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2749;
   Result_Var_5 := Scope_Result_4;
else
Var_Expr_162 := Local_Pragma_Scope;
if Var_Expr_162 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 5902 '<Map at nodes.lkt:10704:17>' Map_Result_2 ada/nodes.lkt:10704
   --# expr-start 5900 '<FieldAccess for library_item_pragmas at nodes.lkt:10704:17>' Fld_22 ada/nodes.lkt:10704
      if Var_Expr_162.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.library_item_pragmas
Fld_22 := Libadalang.Implementation.Basic_Decl_P_Library_Item_Pragmas (Node => Var_Expr_162.Node, E_Info => Var_Expr_162.Info);
--# end
--# expr-done 5900
Fld_23 := Fld_22.Node;
      declare
         Map_Result_2_Vec : Bare_Pragma_Node_Vectors.Vector;
      begin
      if Fld_23 = null then
      Map_Result_2 := Create_Bare_Pragma_Node_Array (0);
      else
      declare
         Collection : constant Bare_Pragma_Node_List := Fld_23;
      begin
         for Untyped_Item_3 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_3 := Untyped_Item_3; 
Is_Null_3 := Bare_Item_3 = null; 
if Is_Null_3 then
   If_Result_5 := No_Entity_Pragma_Node;
else
Fld_24 := Fld_22.Info;
As_Entity_3 := (Info => Fld_24, Node => Bare_Item_3); 
   If_Result_5 := As_Entity_3;
end if;
                  Item_3 := If_Result_5; 
   --# scope-start
               --# bind p Item_3
      --# expr-start 5901 '<FieldAccess for node at nodes.lkt:10704:65>' Fld_25 ada/nodes.lkt:10704
Fld_25 := Item_3.Node;
--# expr-done 5901
         declare
            Item_To_Append : constant Bare_Pragma_Node := Fld_25;
         begin
            Bare_Pragma_Node_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result_2 := Create_Bare_Pragma_Node_Array
           (Items_Count => Natural (Bare_Pragma_Node_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Bare_Pragma_Node_Vectors.Get
              (Map_Result_2_Vec,
               I + Bare_Pragma_Node_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Bare_Pragma_Node_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 5902
Scope_Result_5 := Map_Result_2;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_2750;
   Result_Var_4 := Scope_Result_5;
else
   Result_Var_4 := No_Bare_Pragma_Node_Array_Type;
end if;
      Inc_Ref (Result_Var_4);
   Result_Var_5 := Result_Var_4;
end if;
      Inc_Ref (Result_Var_5);
Scope_Result_6 := Result_Var_5;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_2747;
   Result_Var_6 := Scope_Result_6;
else
   Result_Var_6 := No_Bare_Pragma_Node_Array_Type;
end if;
      Inc_Ref (Result_Var_6);
Scope_Result_7 := Result_Var_6;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_2746;
   Result_Var_7 := Scope_Result_7;
else
   Result_Var_7 := No_Bare_Pragma_Node_Array_Type;
end if;
      Inc_Ref (Result_Var_7);
Local_Scope_Decls := Result_Var_7; Inc_Ref (Local_Scope_Decls);
--# bind scope_decls Local_Scope_Decls
--# expr-start 5938 '<Let at nodes.lkt:10707:9>' Let_Result_1 ada/nodes.lkt:10707
--# scope-start
--# expr-start 5931 '<Map at nodes.lkt:10708:13>' Map_Result_3 ada/nodes.lkt:10708
      declare
         Map_Result_3_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Pragma_Node_Array_Access := Local_Scope_Decls;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind d Item_4
         --# expr-start 5926 '<BooleanBinaryOp And at nodes.lkt:10711:17>' If_Result_11 ada/nodes.lkt:10711
--# expr-start 5916 '<BooleanBinaryOp And at nodes.lkt:10712:21>' If_Result_9 ada/nodes.lkt:10712
--# expr-start 5908 '<BooleanBinaryOp And at nodes.lkt:10712:22>' If_Result_7 ada/nodes.lkt:10712
--# expr-start 5904 '<OrderingTest '"'"'gt'"'"' at nodes.lkt:10712:22>' Node_Comp ada/nodes.lkt:10712
--# expr-start 5903 '<FieldAccess for node at nodes.lkt:10712:26>' Fld_28 ada/nodes.lkt:10712
Fld_28 := Local_Pragma_Scope.Node;
--# expr-done 5903
Node_Comp := Compare (Self, Item_4, Fld_28, Greater_Than); 
--# expr-done 5904
if Node_Comp then
Var_Expr_163 := Item_4;
if Var_Expr_163 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 5907 '<FieldAccess for name_is at nodes.lkt:10712:48>' Fld_30 ada/nodes.lkt:10712
--# expr-start 5905 '<FieldAccess for id at nodes.lkt:10712:48>' Fld_29 ada/nodes.lkt:10712
      if Var_Expr_163 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_29 := Var_Expr_163.Pragma_Node_F_Id;
--# expr-done 5905
      if Fld_29 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5906 '<Symbol Annotate at nodes.lkt:10712:62>' Sym_2 ada/nodes.lkt:10712
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Annotate); 
--# expr-done 5906
--# property-call-start Name.name_is
Fld_30 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_29, Sym => Sym_2);
--# end
--# expr-done 5907
Scope_Result_8 := Fld_30;
   --# end
   Result_Var_8 := Scope_Result_8;
else
   Result_Var_8 := False;
end if;
   If_Result_7 := Result_Var_8;
else
   If_Result_7 := False;
end if;
--# expr-done 5908
if If_Result_7 then
--# expr-start 5913 '<Cast to Name at nodes.lkt:10713:25>' Cast_Result_6 ada/nodes.lkt:10713
--# expr-start 5910 '<at at nodes.lkt:10713:25>' Get_Result_3 ada/nodes.lkt:10713
--# expr-start 5909 '<FieldAccess for args at nodes.lkt:10713:25>' Fld_31 ada/nodes.lkt:10713
      if Item_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Item_4.Pragma_Node_F_Args;
--# expr-done 5909
Get_Result_3 := Get (Self, Fld_31, 0, True); 
--# expr-done 5910
Var_Expr_164 := Get_Result_3;
if Var_Expr_164 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 5912 '<FieldAccess for assoc_expr at nodes.lkt:10713:25>' Fld_32 ada/nodes.lkt:10713
--# expr-start 5911 '<as_entity at nodes.lkt:10713:25>' If_Result_8 ada/nodes.lkt:10713
Is_Null_5 := Var_Expr_164 = null; 
if Is_Null_5 then
   If_Result_8 := No_Entity_Base_Assoc;
else
As_Entity_5 := (Info => E_Info, Node => Var_Expr_164); 
   If_Result_8 := As_Entity_5;
end if;
--# expr-done 5911
      if If_Result_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_32 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result_8.Node, E_Info => If_Result_8.Info);
--# end
--# expr-done 5912
Scope_Result_9 := Fld_32;
   --# end
   Result_Var_9 := Scope_Result_9;
else
   Result_Var_9 := No_Entity_Expr;
end if;
   if Result_Var_9.Node = null
      or else Result_Var_9.Node.Kind in Ada_Name
   then
      Cast_Result_6 := Create_Internal_Entity_Name
        (Node => Result_Var_9.Node,
         Info => Result_Var_9.Info);
   else
         Cast_Result_6 := No_Entity_Name;
   end if;
--# expr-done 5913
Var_Expr_165 := Cast_Result_6;
if Var_Expr_165 /= No_Entity_Name then
   --# scope-start
--# expr-start 5915 '<FieldAccess for name_is at nodes.lkt:10713:25>' Fld_33 ada/nodes.lkt:10713
      if Var_Expr_165.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5914 '<Symbol GNATprove at nodes.lkt:10714:25>' Sym_3 ada/nodes.lkt:10714
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Gnatprove); 
--# expr-done 5914
--# property-call-start Name.name_is
Fld_33 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_165.Node, Sym => Sym_3);
--# end
--# expr-done 5915
Scope_Result_10 := Fld_33;
   --# end
   Result_Var_10 := Scope_Result_10;
else
   Result_Var_10 := False;
end if;
   If_Result_9 := Result_Var_10;
else
   If_Result_9 := False;
end if;
--# expr-done 5916
if If_Result_9 then
--# expr-start 5921 '<Cast to Name at nodes.lkt:10717:21>' Cast_Result_7 ada/nodes.lkt:10717
--# expr-start 5918 '<at at nodes.lkt:10717:21>' Get_Result_4 ada/nodes.lkt:10717
--# expr-start 5917 '<FieldAccess for args at nodes.lkt:10717:21>' Fld_34 ada/nodes.lkt:10717
      if Item_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_34 := Item_4.Pragma_Node_F_Args;
--# expr-done 5917
Get_Result_4 := Get (Self, Fld_34, 2, True); 
--# expr-done 5918
Var_Expr_166 := Get_Result_4;
if Var_Expr_166 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 5920 '<FieldAccess for assoc_expr at nodes.lkt:10717:21>' Fld_35 ada/nodes.lkt:10717
--# expr-start 5919 '<as_entity at nodes.lkt:10717:21>' If_Result_10 ada/nodes.lkt:10717
Is_Null_6 := Var_Expr_166 = null; 
if Is_Null_6 then
   If_Result_10 := No_Entity_Base_Assoc;
else
As_Entity_6 := (Info => E_Info, Node => Var_Expr_166); 
   If_Result_10 := As_Entity_6;
end if;
--# expr-done 5919
      if If_Result_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_35 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result_10.Node, E_Info => If_Result_10.Info);
--# end
--# expr-done 5920
Scope_Result_11 := Fld_35;
   --# end
   Result_Var_11 := Scope_Result_11;
else
   Result_Var_11 := No_Entity_Expr;
end if;
   if Result_Var_11.Node = null
      or else Result_Var_11.Node.Kind in Ada_Name
   then
      Cast_Result_7 := Create_Internal_Entity_Name
        (Node => Result_Var_11.Node,
         Info => Result_Var_11.Info);
   else
         Cast_Result_7 := No_Entity_Name;
   end if;
--# expr-done 5921
Var_Expr_167 := Cast_Result_7;
if Var_Expr_167 /= No_Entity_Name then
   --# scope-start
--# expr-start 5925 '<FieldAccess for name_is at nodes.lkt:10717:21>' Fld_38 ada/nodes.lkt:10717
      if Var_Expr_167.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5924 '<FieldAccess for name_symbol at nodes.lkt:10718:21>' Fld_37 ada/nodes.lkt:10718
--# expr-start 5923 '<at at nodes.lkt:10718:21>' Get_Result_5 ada/nodes.lkt:10718
--# expr-start 5922 '<FieldAccess for defining_names at nodes.lkt:10718:21>' Fld_36 ada/nodes.lkt:10718
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_36 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5922
Get_Result_5 := Get (Self, Fld_36, 0, True); 
--# expr-done 5923
      if Get_Result_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_37 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Get_Result_5.Node);
--# end
--# expr-done 5924
--# property-call-start Name.name_is
Fld_38 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_167.Node, Sym => Fld_37);
--# end
--# expr-done 5925
Scope_Result_12 := Fld_38;
   --# end
      Finalizer_Scope_2757;
   Result_Var_12 := Scope_Result_12;
else
   Result_Var_12 := False;
end if;
   If_Result_11 := Result_Var_12;
else
   If_Result_11 := False;
end if;
--# expr-done 5926
         if If_Result_11 then
      --# expr-start 5930 '<FieldAccess for assoc_expr at nodes.lkt:10709:24>' Fld_27 ada/nodes.lkt:10709
--# expr-start 5929 '<as_entity at nodes.lkt:10709:24>' If_Result_6 ada/nodes.lkt:10709
--# expr-start 5928 '<at at nodes.lkt:10709:24>' Get_Result_2 ada/nodes.lkt:10709
--# expr-start 5927 '<FieldAccess for args at nodes.lkt:10709:24>' Fld_26 ada/nodes.lkt:10709
      if Item_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Item_4.Pragma_Node_F_Args;
--# expr-done 5927
Get_Result_2 := Get (Self, Fld_26, 1, True); 
--# expr-done 5928
Is_Null_4 := Get_Result_2 = null; 
if Is_Null_4 then
   If_Result_6 := No_Entity_Base_Assoc;
else
As_Entity_4 := (Info => E_Info, Node => Get_Result_2); 
   If_Result_6 := As_Entity_4;
end if;
--# expr-done 5929
      if If_Result_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_27 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result_6.Node, E_Info => If_Result_6.Info);
--# end
--# expr-done 5930
         declare
            Item_To_Append : constant Internal_Entity_Expr := Fld_27;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_3 := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 5931
Local_Pragmas := Map_Result_3; Inc_Ref (Local_Pragmas);
--# bind pragmas Local_Pragmas
--# expr-start 5937 '<Let at nodes.lkt:10722:9>' Let_Result ada/nodes.lkt:10722
--# scope-start
--# expr-start 5935 '<Cast to BaseSubpBody at nodes.lkt:10723:13>' Cast_Result_8 ada/nodes.lkt:10723
--# expr-start 5934 '<Find at nodes.lkt:10723:13>' Find_Result ada/nodes.lkt:10723
   --# expr-start 5932 '<FieldAccess for parents at nodes.lkt:10723:13>' Fld_39 ada/nodes.lkt:10723
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_39 := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => False, E_Info => Ent.Info);
--# expr-done 5932
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_39;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_5
      --# expr-start 5933 '<IsA BaseSubpBody at nodes.lkt:10723:55>' Is_A_2 ada/nodes.lkt:10723
Is_A_2 := Item_5.Node /= null 
and then Item_5.Node.Kind in Ada_Base_Subp_Body; 
--# expr-done 5933
      if Is_A_2 then
         Find_Result := Item_5; 
      end if;
   --# end
               exit when Is_A_2;
         end loop;
      end;
--# expr-done 5934
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Base_Subp_Body
   then
      Cast_Result_8 := Create_Internal_Entity_Base_Subp_Body
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_8 := No_Entity_Base_Subp_Body;
   end if;
--# expr-done 5935
Var_Expr_168 := Cast_Result_8;
if Var_Expr_168 /= No_Entity_Base_Subp_Body then
   --# scope-start
--# expr-start 5936 '<FieldAccess for gnatprove_annotations at nodes.lkt:10723:13>' Fld_40 ada/nodes.lkt:10723
      if Var_Expr_168.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.gnatprove_annotations
Fld_40 := Libadalang.Implementation.Body_Node_P_Gnatprove_Annotations (Node => Var_Expr_168.Node, E_Info => Var_Expr_168.Info);
--# end
--# expr-done 5936
Scope_Result_13 := Fld_40;
   Inc_Ref (Scope_Result_13);
   --# end
      Finalizer_Scope_2759;
   Result_Var_13 := Scope_Result_13;
else
   Result_Var_13 := No_Internal_Entity_Expr_Array_Type;
end if;
      Inc_Ref (Result_Var_13);
Local_Enclosing_Subp_Annotations := Result_Var_13; Inc_Ref (Local_Enclosing_Subp_Annotations);
--# bind enclosing_subp_annotations Local_Enclosing_Subp_Annotations
Concat_Result := Concat (Local_Aspects, Local_Pragmas); 
Concat_Result_1 := Concat (Concat_Result, Local_Enclosing_Subp_Annotations); 
Let_Result := Concat_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 5937
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 5938
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 5939
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 5940
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 5941
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 5942
         Property_Result := Let_Result_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_886;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_886;
                     Finalizer_Scope_2742;
                     Finalizer_Scope_2746;
                     Finalizer_Scope_2747;
                     Finalizer_Scope_2749;
                     Finalizer_Scope_2750;
                     Finalizer_Scope_2757;
                     Finalizer_Scope_2759;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Expr_Array_Access,
                        As_Internal_Entity_Expr_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Body_Node_P_Gnatprove_Annotations;
--# end
--# property-start '[dispatcher]Body.previous_part_env_name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Body_Node_P_Previous_Part_Env_Name
  (Node : Bare_Body_Node
  )
   return Symbol_Type
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Body_Node (Self.Kind) is
               when Ada_Accept_Stmt_Body | Ada_Package_Body_Stub .. Ada_Task_Body =>
                  --# property-call-start Body.previous_part_env_name
                  Property_Result := Body_Node_P_Previous_Part_Env_Name
                    (Self
                    );
                  --# end
               when Ada_Expr_Function .. Ada_Subp_Renaming_Decl =>
                  --# property-call-start BaseSubpBody.previous_part_env_name
                  Property_Result := Base_Subp_Body_P_Previous_Part_Env_Name
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Body_Node_P_Previous_Part_Env_Name;
--# end
--# property-start '[dispatcher]Body.previous_part_link_env_assoc' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Body_Node_P_Previous_Part_Link_Env_Assoc
  (Node : Bare_Body_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Body_Node (Self.Kind) is
               when Ada_Accept_Stmt_Body .. Ada_Subp_Renaming_Decl | Ada_Entry_Body .. Ada_Task_Body =>
                  --# property-call-start Body.previous_part_link_env_assoc
                  Property_Result := Body_Node_P_Previous_Part_Link_Env_Assoc
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Package_Body_Stub .. Ada_Task_Body_Stub =>
                  --# property-call-start BodyStub.previous_part_link_env_assoc
                  Property_Result := Body_Stub_P_Previous_Part_Link_Env_Assoc
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Body_Node_P_Previous_Part_Link_Env_Assoc;
--# end
--# property-start Body.previous_part_env_name ada/nodes.lkt:10734
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Previous_Part_Env_Name
  (Node : Bare_Body_Node
  )
   return Symbol_Type
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
            procedure Finalizer_Scope_887 with Inline_Always;
      Fld : String_Type;
Str : String_Type;
Concat_Result : String_Type;
Sym : Symbol_Type;
Fld_1 : String_Type;
Sym_1 : Symbol_Type;
Fld_2 : Boolean;
If_Result : Symbol_Type;
            procedure Finalizer_Scope_887 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_887;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5949 '<If at nodes.lkt:10735:9>' If_Result ada/nodes.lkt:10735
--# expr-start 5943 '<FieldAccess for is_subunit at nodes.lkt:10735:12>' Fld_2 ada/nodes.lkt:10735
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.is_subunit
Fld_2 := Libadalang.Implementation.Body_Node_P_Is_Subunit (Node => Self);
--# end
--# expr-done 5943
if Fld_2 then
   --# expr-start 5946 '<to_symbol at nodes.lkt:10736:14>' Sym ada/nodes.lkt:10736
--# expr-start 5944 '<FieldAccess for top_level_env_name at nodes.lkt:10736:15>' Fld ada/nodes.lkt:10736
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 5944
--# expr-start 5945 '<String at nodes.lkt:10736:43>' Str ada/nodes.lkt:10736
Str := Create_String ("__stub"); 
--# expr-done 5945
Concat_Result := Concat_String (Fld, Str); 
Sym := String_To_Symbol (Self, Self.Unit.Context, Concat_Result); 
--# expr-done 5946
   If_Result := Sym;
else
   --# expr-start 5948 '<to_symbol at nodes.lkt:10737:14>' Sym_1 ada/nodes.lkt:10737
--# expr-start 5947 '<FieldAccess for top_level_env_name at nodes.lkt:10737:14>' Fld_1 ada/nodes.lkt:10737
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 5947
Sym_1 := String_To_Symbol (Self, Self.Unit.Context, Fld_1); 
--# expr-done 5948
   If_Result := Sym_1;
end if;
--# expr-done 5949
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_887;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_887;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Previous_Part_Env_Name;
--# end
--# property-start Body.previous_part_link_env_assoc ada/nodes.lkt:10746
pragma Warnings (Off, "is not referenced");
 function Body_Node_P_Previous_Part_Link_Env_Assoc
  (Node : Bare_Body_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Body_Node  := Bare_Body_Node (Node);
     Ent : Internal_Entity_Body_Node :=
       Internal_Entity_Body_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_888 with Inline_Always;
            procedure Finalizer_Scope_2760 with Inline_Always;
            procedure Finalizer_Scope_2761 with Inline_Always;
      Var_Expr_0 : Symbol_Type;
Var_Expr_1 : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Scope_Result_1 : Internal_Designated_Env := No_Designated_Env;
New_Struct_2 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
Result_Var_1 : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Body_Node;
Cast_Result : Bare_Ada_Node;
New_Struct_3 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_888 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (New_Struct_2);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (New_Struct_3);
            end Finalizer_Scope_888;
            procedure Finalizer_Scope_2760 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2760;
            procedure Finalizer_Scope_2761 is
            begin
                     Dec_Ref (Var_Expr_1);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_2761;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5958 '<New EnvAssoc at nodes.lkt:10747:9>' New_Struct_3 ada/nodes.lkt:10747
--# expr-start 5950 '<FieldAccess for previous_part_env_name at nodes.lkt:10750:22>' Fld ada/nodes.lkt:10750
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Body.previous_part_env_name'
Fld := Libadalang.Implementation.Dispatcher_Body_Node_P_Previous_Part_Env_Name (Node => Self);
--# end
--# expr-done 5950
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind name Var_Expr_0
--# expr-start 5951 '<New DesignatedEnv at nodes.lkt:10752:17>' New_Struct ada/nodes.lkt:10752
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Var_Expr_0, Kind => Named_Env); 
--# expr-done 5951
Scope_Result := New_Struct;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2760;
   Result_Var_1 := Scope_Result;
else
--# expr-start 5954 '<bind at nodes.lkt:10758:21>' Dyn_Var_Bind_Result ada/nodes.lkt:10758
--# expr-start 5952 '<FieldAccess for default_initial_env at nodes.lkt:10758:32>' Fld_1 ada/nodes.lkt:10758
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.default_initial_env
Fld_1 := Libadalang.Implementation.Ada_Node_P_Default_Initial_Env (Node => Self);
--# end
--# expr-done 5952
Bound_Env := Fld_1; Inc_Ref (Bound_Env);
--# expr-start 5953 '<FieldAccess for body_scope at nodes.lkt:10760:21>' Fld_2 ada/nodes.lkt:10760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_scope
Fld_2 := Libadalang.Implementation.Body_Node_P_Body_Scope (Node => Ent.Node, Follow_Private => False, Force_Decl => True, Env => Bound_Env, E_Info => Ent.Info);
--# end
--# expr-done 5953
Dyn_Var_Bind_Result := Fld_2; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 5954
Var_Expr_1 := Dyn_Var_Bind_Result;
      Inc_Ref (Var_Expr_1);
if Var_Expr_1 /= Empty_Env then
   --# scope-start
   --# bind non_null_env Var_Expr_1
--# expr-start 5955 '<New DesignatedEnv at nodes.lkt:10764:21>' New_Struct_1 ada/nodes.lkt:10764
Inc_Ref (Var_Expr_1);
New_Struct_1 := (Direct_Env => Var_Expr_1, Env_Name => No_Symbol, Kind => Direct_Env); 
--# expr-done 5955
Scope_Result_1 := New_Struct_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2761;
   Result_Var := Scope_Result_1;
else
   --# expr-start 5956 '<New DesignatedEnv at nodes.lkt:10769:33>' New_Struct_2 ada/nodes.lkt:10769
Inc_Ref (Empty_Env);
New_Struct_2 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 5956
   Result_Var := New_Struct_2;
end if;
      Inc_Ref (Result_Var);
   Result_Var_1 := Result_Var;
end if;
      Inc_Ref (Result_Var_1);
--# expr-start 5957 '<Symbol __nextpart at nodes.lkt:10748:17>' Sym ada/nodes.lkt:10748
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Nextpart); 
--# expr-done 5957
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (Result_Var_1);
New_Struct_3 := (Dest_Env => Result_Var_1, Key => Sym, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 5958
         Property_Result := New_Struct_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_888;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_888;
                     Finalizer_Scope_2760;
                     Finalizer_Scope_2761;
            raise;
      end;
   return Property_Result;
end Body_Node_P_Previous_Part_Link_Env_Assoc;
--# end
function Body_Node_P_Subunit_Decl_Env
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Body_Node
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Lexical_Env :=
         Body_Node_P_Subunit_Decl_Env (E.Node, E_Info);
   begin
         return Result;
   end;
end;
function Body_Node_P_Body_Decl_Scope
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Body_Node
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Lexical_Env :=
         Body_Node_P_Body_Decl_Scope (E.Node, E_Info);
   begin
         return Result;
   end;
end;
   --
   --  Primitives for Bare_Accept_Stmt_Body
   --
      procedure Initialize_Fields_For_Accept_Stmt_Body
        (Self : Bare_Accept_Stmt_Body
         ; Accept_Stmt_Body_F_Name : Bare_Defining_Name
        ) is
      begin
            Self.Accept_Stmt_Body_F_Name := Accept_Stmt_Body_F_Name;
      end Initialize_Fields_For_Accept_Stmt_Body;
   function Accept_Stmt_Body_F_Name
     (Node : Bare_Accept_Stmt_Body) return Bare_Defining_Name
   is
   begin
         return Node.Accept_Stmt_Body_F_Name;
   end;
--# property-start AcceptStmtBody.defining_names ada/nodes.lkt:10789
pragma Warnings (Off, "is not referenced");
 function Accept_Stmt_Body_P_Defining_Names
  (Node : Bare_Accept_Stmt_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Accept_Stmt_Body  := Bare_Accept_Stmt_Body (Node);
     Ent : Internal_Entity_Accept_Stmt_Body :=
       Internal_Entity_Accept_Stmt_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_889 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_889 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_889;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5960 '<ArrayLiteral at nodes.lkt:10789:57>' Array_Lit ada/nodes.lkt:10789
--# expr-start 5959 '<FieldAccess for name at nodes.lkt:10789:58>' Fld ada/nodes.lkt:10789
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Accept_Stmt_Body_F_Name, Info => Ent.Info);
--# expr-done 5959
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 5960
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_889;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_889;
            raise;
      end;
   return Property_Result;
end Accept_Stmt_Body_P_Defining_Names;
--# end
--# property-start AcceptStmtBody.defining_env ada/nodes.lkt:10794
pragma Warnings (Off, "is not referenced");
 function Accept_Stmt_Body_P_Defining_Env
  (Node : Bare_Accept_Stmt_Body
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Accept_Stmt_Body  := Bare_Accept_Stmt_Body (Node);
      --# bind self Self
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_890 with Inline_Always;
      Fld : Bare_Ada_Node;
Cast_Result : Bare_Accept_Stmt;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_890 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_890;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5963 '<FieldAccess for children_env at nodes.lkt:10794:38>' Fld_1 ada/nodes.lkt:10794
--# expr-start 5962 '<Cast to AcceptStmt at nodes.lkt:10794:38>' Cast_Result ada/nodes.lkt:10794
--# expr-start 5961 '<parent at nodes.lkt:10794:38>' Fld ada/nodes.lkt:10794
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 5961
   if Fld = null
      or else Fld.Kind in Ada_Accept_Stmt_Range
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 5962
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Cast_Result);
--# expr-done 5963
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_890;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_890;
            raise;
      end;
   return Property_Result;
end Accept_Stmt_Body_P_Defining_Env;
--# end
--# property-start AcceptStmtBody.accept_stmt_previous_part ada/nodes.lkt:10796
pragma Warnings (Off, "is not referenced");
 function Accept_Stmt_Body_P_Accept_Stmt_Previous_Part
  (Node : Bare_Accept_Stmt_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Entry_Decl
is
   Self : Bare_Accept_Stmt_Body  := Bare_Accept_Stmt_Body (Node);
     Ent : Internal_Entity_Accept_Stmt_Body :=
       Internal_Entity_Accept_Stmt_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Entry_Decl;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Accept_Stmt;
Fld_1 : Internal_Entity_Entry_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5966 '<FieldAccess for corresponding_entry at nodes.lkt:10797:9>' Fld_1 ada/nodes.lkt:10797
--# expr-start 5965 '<Cast to AcceptStmt at nodes.lkt:10797:9>' Cast_Result ada/nodes.lkt:10797
--# expr-start 5964 '<parent at nodes.lkt:10797:9>' Fld ada/nodes.lkt:10797
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 5964
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Accept_Stmt_Range
   then
      Cast_Result := Create_Internal_Entity_Accept_Stmt
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 5965
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AcceptStmt.corresponding_entry
Fld_1 := Libadalang.Implementation.Accept_Stmt_P_Corresponding_Entry (Node => Cast_Result.Node, Origin => No_Bare_Ada_Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 5966
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Accept_Stmt_Body_P_Accept_Stmt_Previous_Part;
--# end
   --
   --  Primitives for Bare_Base_Subp_Body
   --
      procedure Base_Subp_Body_Pre_Env_Actions
        (Self            : Bare_Base_Subp_Body;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_53 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_54 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:10878:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_55 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:10893:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_56 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_57 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:10911:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_58 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_60 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_59 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_62 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_61 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_64 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_63 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Use_Clauses_In_Spec_Of_Subp_Body'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_66 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_65 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Nested_Generic_Formal_Part'Access,
               Prioritary,
               All_Cats,
               True);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_68 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_67 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Use_Clauses_In_Generic_Formal_Part'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Base_Subp_Body
        (Self : Bare_Base_Subp_Body
         ; Base_Subp_Body_F_Overriding : Bare_Overriding_Node
         ; Base_Subp_Body_F_Subp_Spec : Bare_Subp_Spec
        ) is
      begin
            Self.Base_Subp_Body_F_Overriding := Base_Subp_Body_F_Overriding;
            Self.Base_Subp_Body_F_Subp_Spec := Base_Subp_Body_F_Subp_Spec;
      end Initialize_Fields_For_Base_Subp_Body;
   function Base_Subp_Body_F_Overriding
     (Node : Bare_Base_Subp_Body) return Bare_Overriding_Node
   is
   begin
         return Node.Base_Subp_Body_F_Overriding;
   end;
   function Base_Subp_Body_F_Subp_Spec
     (Node : Bare_Base_Subp_Body) return Bare_Subp_Spec
   is
   begin
         return Node.Base_Subp_Body_F_Subp_Spec;
   end;
--# property-start BaseSubpBody.defining_names ada/nodes.lkt:10808
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Body_P_Defining_Names
  (Node : Bare_Base_Subp_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
     Ent : Internal_Entity_Base_Subp_Body :=
       Internal_Entity_Base_Subp_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_892 with Inline_Always;
      Fld : Internal_Entity_Subp_Spec;
Fld_1 : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_892 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_892;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5969 '<ArrayLiteral at nodes.lkt:10808:57>' Array_Lit ada/nodes.lkt:10808
--# expr-start 5968 '<FieldAccess for name at nodes.lkt:10808:58>' Fld_1 ada/nodes.lkt:10808
--# expr-start 5967 '<FieldAccess for subp_spec at nodes.lkt:10808:58>' Fld ada/nodes.lkt:10808
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Base_Subp_Body_F_Subp_Spec, Info => Ent.Info);
--# expr-done 5967
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 5968
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld_1)); 
--# expr-done 5969
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_892;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_892;
            raise;
      end;
   return Property_Result;
end Base_Subp_Body_P_Defining_Names;
--# end
--# property-start BaseSubpBody.constrain_prefix ada/nodes.lkt:10811
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Body_P_Constrain_Prefix
  (Node : Bare_Base_Subp_Body
      ; Prefix : Bare_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
     Ent : Internal_Entity_Base_Subp_Body :=
       Internal_Entity_Base_Subp_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind prefix Prefix
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_893 with Inline_Always;
      Fld : Logic_Equation;
            procedure Finalizer_Scope_893 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_893;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5970 '<FieldAccess for subp_constrain_prefix at nodes.lkt:10812:9>' Fld ada/nodes.lkt:10812
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_constrain_prefix
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Constrain_Prefix (Node => Ent.Node, Prefix => Prefix, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 5970
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_893;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_893;
            raise;
      end;
   return Property_Result;
end Base_Subp_Body_P_Constrain_Prefix;
--# end
--# property-start BaseSubpBody.defining_env ada/nodes.lkt:10817
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Body_P_Defining_Env
  (Node : Bare_Base_Subp_Body
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
     Ent : Internal_Entity_Base_Subp_Body :=
       Internal_Entity_Base_Subp_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_894 with Inline_Always;
            procedure Finalizer_Scope_2763 with Inline_Always;
            procedure Finalizer_Scope_2764 with Inline_Always;
            procedure Finalizer_Scope_2765 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_169 : Internal_Entity_Base_Subp_Spec;
Var_Expr_170 : Internal_Entity_Generic_Subp_Decl;
Var_Expr_171 : Internal_Entity_Generic_Formal_Part;
Fld : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Subp_Spec;
Fld_2 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Internal_Entity_Base_Subp_Spec;
Fld_5 : Internal_Entity_Info;
Fld_6 : Internal_Metadata;
Fld_7 : Boolean;
Fld_8 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Lexical_Env := Empty_Env;
Fld_9 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Generic_Subp_Decl;
Fld_10 : Internal_Entity_Generic_Formal_Part;
Fld_11 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
Scope_Result_2 : Lexical_Env := Empty_Env;
Result_Var_2 : Lexical_Env := Empty_Env;
Scope_Result_3 : Lexical_Env := Empty_Env;
Result_Var_3 : Lexical_Env := Empty_Env;
Array_Lit_1 : Lexical_Env_Array_Access;
Group_Env_1 : Lexical_Env := Empty_Env;
Fld_12 : Internal_Entity_Subp_Spec;
Fld_13 : Lexical_Env := Empty_Env;
Fld_14 : Boolean;
If_Result_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_894 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (If_Result);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Group_Env_1);
                     Dec_Ref (Fld_13);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_894;
            procedure Finalizer_Scope_2763 is
            begin
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
            end Finalizer_Scope_2763;
            procedure Finalizer_Scope_2764 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_2764;
            procedure Finalizer_Scope_2765 is
            begin
                     Dec_Ref (Fld_11);
            end Finalizer_Scope_2765;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 5992 '<If at nodes.lkt:10818:9>' If_Result_1 ada/nodes.lkt:10818
--# expr-start 5971 '<FieldAccess for in_scope at nodes.lkt:10818:12>' Fld_14 ada/nodes.lkt:10818
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.in_scope
Fld_14 := Libadalang.Implementation.Body_Node_P_In_Scope (Node => Ent.Node, Origin => Origin);
--# end
--# expr-done 5971
if Fld_14 then
   --# expr-start 5989 '<env_group at nodes.lkt:10820:13>' Group_Env_1 ada/nodes.lkt:10820
--# expr-start 5988 '<ArrayLiteral at nodes.lkt:10820:13>' Array_Lit_1 ada/nodes.lkt:10820
--# expr-start 5983 '<If at nodes.lkt:10821:17>' If_Result ada/nodes.lkt:10821
--# expr-start 5972 '<FieldAccess for subp_spec_or_null at nodes.lkt:10822:21>' Fld_4 ada/nodes.lkt:10822
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5972
Var_Expr_169 := Fld_4;
if Var_Expr_169 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 5976 '<FieldAccess for paramless at nodes.lkt:10822:21>' Fld_8 ada/nodes.lkt:10822
      if Var_Expr_169.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 5975 '<FieldAccess for dottable_subp at nodes.lkt:10823:25>' Fld_7 ada/nodes.lkt:10823
--# expr-start 5974 '<FieldAccess for md at nodes.lkt:10823:25>' Fld_6 ada/nodes.lkt:10823
--# expr-start 5973 '<FieldAccess for info at nodes.lkt:10823:25>' Fld_5 ada/nodes.lkt:10823
Fld_5 := Ent.Info;
--# expr-done 5973
Fld_6 := Fld_5.Md;
--# expr-done 5974
Fld_7 := Fld_6.Dottable_Subp;
--# expr-done 5975
--# property-call-start BaseFormalParamHolder.paramless
Fld_8 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Paramless (Node => Var_Expr_169.Node, Dottable_Subp => Fld_7, Can_Be => True);
--# end
--# expr-done 5976
Scope_Result := Fld_8;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   --# expr-start 5981 '<env_group at nodes.lkt:10827:21>' Group_Env ada/nodes.lkt:10827
--# expr-start 5980 '<ArrayLiteral at nodes.lkt:10827:21>' Array_Lit ada/nodes.lkt:10827
--# expr-start 5977 '<FieldAccess for children_env at nodes.lkt:10827:22>' Fld ada/nodes.lkt:10827
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 5977
--# expr-start 5979 '<FieldAccess for defining_env at nodes.lkt:10827:41>' Fld_2 ada/nodes.lkt:10827
--# expr-start 5978 '<FieldAccess for subp_spec at nodes.lkt:10827:41>' Fld_1 ada/nodes.lkt:10827
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Base_Subp_Body_F_Subp_Spec, Info => Ent.Info);
--# expr-done 5978
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.defining_env
Fld_2 := Libadalang.Implementation.Base_Subp_Spec_P_Defining_Env (Node => Fld_1.Node, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 5979
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld, 2 => Fld_2)); 
--# expr-done 5980
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 5981
   If_Result := Group_Env;
else
   --# expr-start 5982 '<FieldAccess for children_env at nodes.lkt:10829:22>' Fld_3 ada/nodes.lkt:10829
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 5982
   If_Result := Fld_3;
end if;
      Inc_Ref (If_Result);
--# expr-done 5983
--# expr-start 5984 '<FieldAccess for decl_part at nodes.lkt:10830:17>' Fld_9 ada/nodes.lkt:10830
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_9 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 5984
Var_Expr_0 := Fld_9;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind decl Var_Expr_0
--# expr-start 5985 '<Cast to GenericSubpDecl at nodes.lkt:10832:21>' Cast_Result ada/nodes.lkt:10832
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Generic_Subp_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Generic_Subp_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Generic_Subp_Decl;
   end if;
--# expr-done 5985
Var_Expr_170 := Cast_Result;
if Var_Expr_170 /= No_Entity_Generic_Subp_Decl then
   --# scope-start
--# expr-start 5986 '<FieldAccess for formal_part at nodes.lkt:10832:21>' Fld_10 ada/nodes.lkt:10832
      if Var_Expr_170.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Generic_Formal_Part (Node => Var_Expr_170.Node.Generic_Decl_F_Formal_Part, Info => Var_Expr_170.Info);
--# expr-done 5986
Var_Expr_171 := Fld_10;
if Var_Expr_171 /= No_Entity_Generic_Formal_Part then
   --# scope-start
--# expr-start 5987 '<FieldAccess for children_env at nodes.lkt:10832:21>' Fld_11 ada/nodes.lkt:10832
      if Var_Expr_171.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Children_Env (Node => Var_Expr_171.Node, E_Info => Var_Expr_171.Info);
--# expr-done 5987
Scope_Result_1 := Fld_11;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2765;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Empty_Env;
end if;
      Inc_Ref (Result_Var_1);
Scope_Result_2 := Result_Var_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2764;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Empty_Env;
end if;
      Inc_Ref (Result_Var_2);
Scope_Result_3 := Result_Var_2;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2763;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := Empty_Env;
end if;
      Inc_Ref (Result_Var_3);
Array_Lit_1 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => If_Result, 2 => Result_Var_3)); 
--# expr-done 5988
Group_Env_1 := Group (Array_Lit_1, No_Metadata); 
--# expr-done 5989
   If_Result_1 := Group_Env_1;
else
   --# expr-start 5991 '<FieldAccess for defining_env at nodes.lkt:10854:14>' Fld_13 ada/nodes.lkt:10854
--# expr-start 5990 '<FieldAccess for subp_spec at nodes.lkt:10854:14>' Fld_12 ada/nodes.lkt:10854
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Base_Subp_Body_F_Subp_Spec, Info => Ent.Info);
--# expr-done 5990
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.defining_env
Fld_13 := Libadalang.Implementation.Base_Subp_Spec_P_Defining_Env (Node => Fld_12.Node, Origin => Origin, E_Info => Fld_12.Info);
--# end
--# expr-done 5991
   If_Result_1 := Fld_13;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 5992
         Property_Result := If_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_894;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_894;
                     Finalizer_Scope_2763;
                     Finalizer_Scope_2764;
                     Finalizer_Scope_2765;
            raise;
      end;
   return Property_Result;
end Base_Subp_Body_P_Defining_Env;
--# end
--# property-start BaseSubpBody.type_expression ada/nodes.lkt:10856
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Body_P_Type_Expression
  (Node : Bare_Base_Subp_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
     Ent : Internal_Entity_Base_Subp_Body :=
       Internal_Entity_Base_Subp_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Subp_Spec;
Fld_1 : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 5994 '<FieldAccess for returns at nodes.lkt:10856:47>' Fld_1 ada/nodes.lkt:10856
--# expr-start 5993 '<FieldAccess for subp_spec at nodes.lkt:10856:47>' Fld ada/nodes.lkt:10856
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Base_Subp_Body_F_Subp_Spec, Info => Ent.Info);
--# expr-done 5993
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 5994
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Body_P_Type_Expression;
--# end
--# property-start BaseSubpBody.expr_type ada/nodes.lkt:10859
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Body_P_Expr_Type
  (Node : Bare_Base_Subp_Body
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
     Ent : Internal_Entity_Base_Subp_Body :=
       Internal_Entity_Base_Subp_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_172 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 5995 '<FieldAccess for subp_spec_or_null at nodes.lkt:10860:9>' Fld ada/nodes.lkt:10860
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 5995
Var_Expr_172 := Fld;
if Var_Expr_172 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 5996 '<FieldAccess for return_type at nodes.lkt:10860:9>' Fld_1 ada/nodes.lkt:10860
      if Var_Expr_172.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Var_Expr_172.Node, Origin => Origin, E_Info => Var_Expr_172.Info);
--# end
--# expr-done 5996
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Body_P_Expr_Type;
--# end
--# property-start BaseSubpBody.initial_env_name ada/nodes.lkt:10862
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Body_P_Initial_Env_Name
  (Node : Bare_Base_Subp_Body
      ; Follow_Private : Boolean
         := False
  )
   return Symbol_Type
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   --# bind follow_private Follow_Private
   Property_Result : Symbol_Type;
      Fld : Symbol_Type;
Fld_1 : Symbol_Type;
Fld_2 : Boolean;
If_Result : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6000 '<If at nodes.lkt:10863:9>' If_Result ada/nodes.lkt:10863
--# expr-start 5997 '<FieldAccess for is_library_item at nodes.lkt:10863:12>' Fld_2 ada/nodes.lkt:10863
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Self);
--# end
--# expr-done 5997
if Fld_2 then
   --# expr-start 5998 '<FieldAccess for child_decl_initial_env_name at nodes.lkt:10864:14>' Fld ada/nodes.lkt:10864
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.child_decl_initial_env_name'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Child_Decl_Initial_Env_Name (Node => Self, Private_Part => Follow_Private);
--# end
--# expr-done 5998
   If_Result := Fld;
else
   --# expr-start 5999 '<FieldAccess for body_initial_env_name at nodes.lkt:10865:14>' Fld_1 ada/nodes.lkt:10865
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_initial_env_name
Fld_1 := Libadalang.Implementation.Body_Node_P_Body_Initial_Env_Name (Node => Self);
--# end
--# expr-done 5999
   If_Result := Fld_1;
end if;
--# expr-done 6000
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Subp_Body_P_Initial_Env_Name;
--# end
--# property-start BaseSubpBody.previous_part_env_name ada/nodes.lkt:10870
pragma Warnings (Off, "is not referenced");
 function Base_Subp_Body_P_Previous_Part_Env_Name
  (Node : Bare_Base_Subp_Body
  )
   return Symbol_Type
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
            procedure Finalizer_Scope_898 with Inline_Always;
      Fld : String_Type;
Str : String_Type;
Concat_Result : String_Type;
Sym : Symbol_Type;
Fld_1 : String_Type;
Sym_1 : Symbol_Type;
Fld_2 : Boolean;
If_Result : Symbol_Type;
Fld_3 : Boolean;
If_Result_1 : Symbol_Type;
            procedure Finalizer_Scope_898 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_898;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6009 '<If at nodes.lkt:10871:9>' If_Result_1 ada/nodes.lkt:10871
--# expr-start 6001 '<FieldAccess for is_subunit at nodes.lkt:10871:12>' Fld_3 ada/nodes.lkt:10871
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.is_subunit
Fld_3 := Libadalang.Implementation.Body_Node_P_Is_Subunit (Node => Self);
--# end
--# expr-done 6001
if Fld_3 then
   --# expr-start 6004 '<to_symbol at nodes.lkt:10872:14>' Sym ada/nodes.lkt:10872
--# expr-start 6002 '<FieldAccess for top_level_env_name at nodes.lkt:10872:15>' Fld ada/nodes.lkt:10872
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 6002
--# expr-start 6003 '<String at nodes.lkt:10872:43>' Str ada/nodes.lkt:10872
Str := Create_String ("__stub"); 
--# expr-done 6003
Concat_Result := Concat_String (Fld, Str); 
Sym := String_To_Symbol (Self, Self.Unit.Context, Concat_Result); 
--# expr-done 6004
   If_Result_1 := Sym;
else
   --# expr-start 6008 '<If at nodes.lkt:10871:9>' If_Result ada/nodes.lkt:10871
--# expr-start 6005 '<FieldAccess for is_library_item at nodes.lkt:10873:14>' Fld_2 ada/nodes.lkt:10873
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Self);
--# end
--# expr-done 6005
if Fld_2 then
   --# expr-start 6007 '<to_symbol at nodes.lkt:10873:42>' Sym_1 ada/nodes.lkt:10873
--# expr-start 6006 '<FieldAccess for top_level_env_name at nodes.lkt:10873:42>' Fld_1 ada/nodes.lkt:10873
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 6006
Sym_1 := String_To_Symbol (Self, Self.Unit.Context, Fld_1); 
--# expr-done 6007
   If_Result := Sym_1;
else
   If_Result := No_Symbol;
end if;
--# expr-done 6008
   If_Result_1 := If_Result;
end if;
--# expr-done 6009
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_898;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_898;
            raise;
      end;
   return Property_Result;
end Base_Subp_Body_P_Previous_Part_Env_Name;
--# end
--# property-start BaseSubpBody._env_do_53 ada/nodes.lkt:10877
pragma Warnings (Off, "is not referenced");
 function Env_Do_53
  (Node : Bare_Base_Subp_Body
  )
   return Boolean
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6010 '<FieldAccess for env_hook at nodes.lkt:10877:12>' Fld ada/nodes.lkt:10877
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6010
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_53;
--# end
--# property-start BaseSubpBody._env_init_54 ada/nodes.lkt:10879
pragma Warnings (Off, "is not referenced");
 function Env_Init_54
  (Node : Bare_Base_Subp_Body
  )
   return Internal_Designated_Env
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1718 with Inline_Always;
            procedure Finalizer_Scope_2767 with Inline_Always;
      Var_Expr_0 : Symbol_Type;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1718 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1718;
            procedure Finalizer_Scope_2767 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2767;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6011 '<FieldAccess for initial_env_name at nodes.lkt:10879:13>' Fld ada/nodes.lkt:10879
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpBody.initial_env_name
Fld := Libadalang.Implementation.Base_Subp_Body_P_Initial_Env_Name (Node => Self, Follow_Private => True);
--# end
--# expr-done 6011
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind non_null_name Var_Expr_0
--# expr-start 6012 '<New DesignatedEnv at nodes.lkt:10881:17>' New_Struct ada/nodes.lkt:10881
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Var_Expr_0, Kind => Named_Env); 
--# expr-done 6012
Scope_Result := New_Struct;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2767;
   Result_Var := Scope_Result;
else
   --# expr-start 6013 '<New DesignatedEnv at nodes.lkt:10886:29>' New_Struct_1 ada/nodes.lkt:10886
Inc_Ref (Empty_Env);
New_Struct_1 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6013
   Result_Var := New_Struct_1;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1718;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1718;
                     Finalizer_Scope_2767;
            raise;
      end;
   return Property_Result;
end Env_Init_54;
--# end
--# property-start BaseSubpBody._env_mappings_55 ada/nodes.lkt:10894
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_55
  (Node : Bare_Base_Subp_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
     Ent : Internal_Entity_Base_Subp_Body :=
       Internal_Entity_Base_Subp_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1719 with Inline_Always;
            procedure Finalizer_Scope_2768 with Inline_Always;
      Var_Expr_0 : Symbol_Type;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
Fld_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1719 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1719;
            procedure Finalizer_Scope_2768 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2768;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6017 '<FieldAccess for basic_decl_env_assocs at nodes.lkt:10894:13>' Fld_1 ada/nodes.lkt:10894
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6014 '<FieldAccess for initial_env_name at nodes.lkt:10895:17>' Fld ada/nodes.lkt:10895
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpBody.initial_env_name
Fld := Libadalang.Implementation.Base_Subp_Body_P_Initial_Env_Name (Node => Self, Follow_Private => False);
--# end
--# expr-done 6014
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind non_null_name Var_Expr_0
--# expr-start 6015 '<New DesignatedEnv at nodes.lkt:10897:21>' New_Struct ada/nodes.lkt:10897
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Var_Expr_0, Kind => Named_Env); 
--# expr-done 6015
Scope_Result := New_Struct;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2768;
   Result_Var := Scope_Result;
else
   --# expr-start 6016 '<New DesignatedEnv at nodes.lkt:10902:33>' New_Struct_1 ada/nodes.lkt:10902
Inc_Ref (Empty_Env);
New_Struct_1 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6016
   Result_Var := New_Struct_1;
end if;
      Inc_Ref (Result_Var);
--# property-call-start BasicDecl.basic_decl_env_assocs
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Basic_Decl_Env_Assocs (Node => Ent.Node, Dest_Env => Result_Var, E_Info => Ent.Info);
--# end
--# expr-done 6017
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1719;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1719;
                     Finalizer_Scope_2768;
            raise;
      end;
   return Property_Result;
end Env_Mappings_55;
--# end
--# property-start BaseSubpBody._env_trans_parent_56 ada/nodes.lkt:10910
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_56
  (Node : Bare_Base_Subp_Body
  )
   return Boolean
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_56;
--# end
--# property-start BaseSubpBody._env_mappings_57 ada/nodes.lkt:10911
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_57
  (Node : Bare_Base_Subp_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
     Ent : Internal_Entity_Base_Subp_Body :=
       Internal_Entity_Base_Subp_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1721 with Inline_Always;
            procedure Finalizer_Scope_2769 with Inline_Always;
            procedure Finalizer_Scope_2770 with Inline_Always;
      Var_Expr_0 : Symbol_Type;
Var_Expr_1 : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Lexical_Env := Empty_Env;
New_Struct_2 : Internal_Designated_Env := No_Designated_Env;
Scope_Result_1 : Internal_Designated_Env := No_Designated_Env;
New_Struct_3 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
Dyn_Var_Bind_Result : Internal_Designated_Env := No_Designated_Env;
Fld_3 : Boolean;
If_Result : Internal_Designated_Env := No_Designated_Env;
Result_Var_1 : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Base_Subp_Body;
Cast_Result : Bare_Ada_Node;
New_Struct_4 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1721 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (New_Struct_3);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (If_Result);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (New_Struct_4);
            end Finalizer_Scope_1721;
            procedure Finalizer_Scope_2769 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2769;
            procedure Finalizer_Scope_2770 is
            begin
                     Dec_Ref (Var_Expr_1);
                     Dec_Ref (New_Struct_2);
            end Finalizer_Scope_2770;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6029 '<New EnvAssoc at ???>' New_Struct_4 None
--# expr-start 6018 '<FieldAccess for previous_part_env_name at nodes.lkt:10914:22>' Fld ada/nodes.lkt:10914
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Body.previous_part_env_name'
Fld := Libadalang.Implementation.Dispatcher_Body_Node_P_Previous_Part_Env_Name (Node => Self);
--# end
--# expr-done 6018
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind name Var_Expr_0
--# expr-start 6019 '<New DesignatedEnv at nodes.lkt:10916:17>' New_Struct ada/nodes.lkt:10916
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Var_Expr_0, Kind => Named_Env); 
--# expr-done 6019
Scope_Result := New_Struct;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2769;
   Result_Var_1 := Scope_Result;
else
   --# expr-start 6027 '<If at nodes.lkt:10925:29>' If_Result ada/nodes.lkt:10925
--# expr-start 6020 '<FieldAccess for has_top_level_env_name at nodes.lkt:10925:32>' Fld_3 ada/nodes.lkt:10925
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.has_top_level_env_name
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Has_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 6020
if Fld_3 then
   --# expr-start 6021 '<New DesignatedEnv at nodes.lkt:10927:21>' New_Struct_1 ada/nodes.lkt:10927
Inc_Ref (Empty_Env);
New_Struct_1 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => None); 
--# expr-done 6021
   If_Result := New_Struct_1;
else
   --# expr-start 6026 '<bind at nodes.lkt:10933:21>' Dyn_Var_Bind_Result ada/nodes.lkt:10933
--# expr-start 6022 '<FieldAccess for default_initial_env at nodes.lkt:10933:32>' Fld_1 ada/nodes.lkt:10933
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.default_initial_env
Fld_1 := Libadalang.Implementation.Ada_Node_P_Default_Initial_Env (Node => Self);
--# end
--# expr-done 6022
Bound_Env := Fld_1; Inc_Ref (Bound_Env);
--# expr-start 6023 '<FieldAccess for body_scope at nodes.lkt:10935:21>' Fld_2 ada/nodes.lkt:10935
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_scope
Fld_2 := Libadalang.Implementation.Body_Node_P_Body_Scope (Node => Ent.Node, Follow_Private => False, Force_Decl => True, Env => Bound_Env, E_Info => Ent.Info);
--# end
--# expr-done 6023
Var_Expr_1 := Fld_2;
      Inc_Ref (Var_Expr_1);
if Var_Expr_1 /= Empty_Env then
   --# scope-start
   --# bind non_null_env Var_Expr_1
--# expr-start 6024 '<New DesignatedEnv at nodes.lkt:10937:25>' New_Struct_2 ada/nodes.lkt:10937
Inc_Ref (Var_Expr_1);
New_Struct_2 := (Direct_Env => Var_Expr_1, Env_Name => No_Symbol, Kind => Direct_Env); 
--# expr-done 6024
Scope_Result_1 := New_Struct_2;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2770;
   Result_Var := Scope_Result_1;
else
   --# expr-start 6025 '<New DesignatedEnv at nodes.lkt:10942:37>' New_Struct_3 ada/nodes.lkt:10942
Inc_Ref (Empty_Env);
New_Struct_3 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6025
   Result_Var := New_Struct_3;
end if;
      Inc_Ref (Result_Var);
Dyn_Var_Bind_Result := Result_Var; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 6026
   If_Result := Dyn_Var_Bind_Result;
end if;
      Inc_Ref (If_Result);
--# expr-done 6027
   Result_Var_1 := If_Result;
end if;
      Inc_Ref (Result_Var_1);
--# expr-start 6028 '<Symbol __nextpart at nodes.lkt:10912:13>' Sym ada/nodes.lkt:10912
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Nextpart); 
--# expr-done 6028
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (Result_Var_1);
New_Struct_4 := (Dest_Env => Result_Var_1, Key => Sym, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6029
         Property_Result := New_Struct_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1721;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1721;
                     Finalizer_Scope_2769;
                     Finalizer_Scope_2770;
            raise;
      end;
   return Property_Result;
end Env_Mappings_57;
--# end
--# property-start BaseSubpBody._env_do_58 ada/nodes.lkt:10951
pragma Warnings (Off, "is not referenced");
 function Env_Do_58
  (Node : Bare_Base_Subp_Body
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1722 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1722 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1722;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6030 '<FieldAccess for populate_dependent_units at nodes.lkt:10951:12>' Fld ada/nodes.lkt:10951
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6030
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1722;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1722;
            raise;
      end;
   return Property_Result;
end Env_Do_58;
--# end
--# property-start BaseSubpBody._ref_env_nodes_59 ada/nodes.lkt:10953
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_59
  (Node : Bare_Base_Subp_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1723 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1723 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1723;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6031 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:10953:13>' Fld ada/nodes.lkt:10953
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6031
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1723;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1723;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_59;
--# end
--# property-start BaseSubpBody._ref_cond_60 ada/nodes.lkt:10955
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_60
  (Node : Bare_Base_Subp_Body
  )
   return Boolean
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6033 '<IsA LibraryItem, Subunit at nodes.lkt:10955:18>' Is_A ada/nodes.lkt:10955
--# expr-start 6032 '<parent at nodes.lkt:10955:18>' Fld ada/nodes.lkt:10955
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6032
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6033
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_60;
--# end
--# property-start BaseSubpBody._ref_env_nodes_61 ada/nodes.lkt:10958
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_61
  (Node : Bare_Base_Subp_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1725 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1725 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1725;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6034 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:10958:13>' Fld ada/nodes.lkt:10958
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6034
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1725;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1725;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_61;
--# end
--# property-start BaseSubpBody._ref_cond_62 ada/nodes.lkt:10960
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_62
  (Node : Bare_Base_Subp_Body
  )
   return Boolean
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6036 '<IsA LibraryItem, Subunit at nodes.lkt:10960:18>' Is_A ada/nodes.lkt:10960
--# expr-start 6035 '<parent at nodes.lkt:10960:18>' Fld ada/nodes.lkt:10960
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6035
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6036
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_62;
--# end
--# property-start BaseSubpBody._ref_env_nodes_63 ada/nodes.lkt:10966
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_63
  (Node : Bare_Base_Subp_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1727 with Inline_Always;
            procedure Finalizer_Scope_2771 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Base_Subp_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1727 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1727;
            procedure Finalizer_Scope_2771 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2771;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6037 '<Cast to AdaNode at nodes.lkt:10966:13>' Cast_Result ada/nodes.lkt:10966
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6037
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 6038 '<ArrayLiteral at nodes.lkt:10966:41>' Array_Lit ada/nodes.lkt:10966
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6038
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2771;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1727;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1727;
                     Finalizer_Scope_2771;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_63;
--# end
--# property-start BaseSubpBody._ref_cond_64 ada/nodes.lkt:10968
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_64
  (Node : Bare_Base_Subp_Body
  )
   return Boolean
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6040 '<IsA LibraryItem at nodes.lkt:10968:18>' Is_A ada/nodes.lkt:10968
--# expr-start 6039 '<parent at nodes.lkt:10968:18>' Fld ada/nodes.lkt:10968
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6039
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range; 
--# expr-done 6040
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_64;
--# end
--# property-start BaseSubpBody._ref_env_nodes_65 ada/nodes.lkt:10971
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_65
  (Node : Bare_Base_Subp_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1729 with Inline_Always;
            procedure Finalizer_Scope_2772 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Base_Subp_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1729 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1729;
            procedure Finalizer_Scope_2772 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2772;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6041 '<Cast to AdaNode at nodes.lkt:10971:13>' Cast_Result ada/nodes.lkt:10971
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6041
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v2 Var_Expr_0
--# expr-start 6042 '<ArrayLiteral at nodes.lkt:10971:41>' Array_Lit ada/nodes.lkt:10971
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6042
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2772;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1729;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1729;
                     Finalizer_Scope_2772;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_65;
--# end
--# property-start BaseSubpBody._ref_cond_66 ada/nodes.lkt:10974
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_66
  (Node : Bare_Base_Subp_Body
  )
   return Boolean
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6043 '<FieldAccess for should_ref_generic_formals at nodes.lkt:10974:18>' Fld ada/nodes.lkt:10974
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6043
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_66;
--# end
--# property-start BaseSubpBody._ref_env_nodes_67 ada/nodes.lkt:10980
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_67
  (Node : Bare_Base_Subp_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1731 with Inline_Always;
            procedure Finalizer_Scope_2773 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Base_Subp_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1731 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1731;
            procedure Finalizer_Scope_2773 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2773;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6044 '<Cast to AdaNode at nodes.lkt:10980:13>' Cast_Result ada/nodes.lkt:10980
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6044
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v3 Var_Expr_0
--# expr-start 6045 '<ArrayLiteral at nodes.lkt:10980:41>' Array_Lit ada/nodes.lkt:10980
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6045
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2773;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1731;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1731;
                     Finalizer_Scope_2773;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_67;
--# end
--# property-start BaseSubpBody._ref_cond_68 ada/nodes.lkt:10982
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_68
  (Node : Bare_Base_Subp_Body
  )
   return Boolean
is
   Self : Bare_Base_Subp_Body  := Bare_Base_Subp_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6046 '<FieldAccess for should_ref_generic_formals at nodes.lkt:10982:18>' Fld ada/nodes.lkt:10982
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6046
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_68;
--# end
   --
   --  Primitives for Bare_Expr_Function
   --
      procedure Initialize_Fields_For_Expr_Function
        (Self : Bare_Expr_Function
         ; Base_Subp_Body_F_Overriding : Bare_Overriding_Node
         ; Base_Subp_Body_F_Subp_Spec : Bare_Subp_Spec
         ; Expr_Function_F_Expr : Bare_Expr
         ; Expr_Function_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Base_Subp_Body
              (Self, Base_Subp_Body_F_Overriding, Base_Subp_Body_F_Subp_Spec);
            Self.Expr_Function_F_Expr := Expr_Function_F_Expr;
            Self.Expr_Function_F_Aspects := Expr_Function_F_Aspects;
      end Initialize_Fields_For_Expr_Function;
   function Expr_Function_F_Expr
     (Node : Bare_Expr_Function) return Bare_Expr
   is
   begin
         return Node.Expr_Function_F_Expr;
   end;
--# property-start ExprFunction.xref_equation ada/nodes.lkt:10995
pragma Warnings (Off, "is not referenced");
 function Expr_Function_P_Xref_Equation
  (Node : Bare_Expr_Function
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Expr_Function  := Bare_Expr_Function (Node);
     Ent : Internal_Entity_Expr_Function :=
       Internal_Entity_Expr_Function'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_899 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Subp_Spec;
Fld_3 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Bare_Expr;
Fld_7 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_899 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_899;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6057 '<LogicBinaryOp And at nodes.lkt:10996:9>' And_Pred_1 ada/nodes.lkt:10996
--# expr-start 6054 '<LogicBinaryOp And at nodes.lkt:10997:13>' And_Pred ada/nodes.lkt:10997
--# expr-start 6051 '<Bind at nodes.lkt:10997:13>' Bind_Result ada/nodes.lkt:10997
--# expr-start 6048 '<FieldAccess for expected_type_var at nodes.lkt:10997:13>' Fld_1 ada/nodes.lkt:10997
--# expr-start 6047 '<FieldAccess for expr at nodes.lkt:10997:13>' Fld ada/nodes.lkt:10997
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Expr_Function_F_Expr, Info => Ent.Info);
--# expr-done 6047
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld.Node);
--# expr-done 6048
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 6050 '<FieldAccess for return_type at nodes.lkt:10997:46>' Fld_3 ada/nodes.lkt:10997
--# expr-start 6049 '<FieldAccess for subp_spec at nodes.lkt:10997:46>' Fld_2 ada/nodes.lkt:10997
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Base_Subp_Body_F_Subp_Spec, Info => Ent.Info);
--# expr-done 6049
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_3 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Fld_2.Node, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 6050
      Cast_Result := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:10997:13") else null)); 
--# expr-done 6051
--# expr-start 6053 '<FieldAccess for sub_equation at nodes.lkt:10998:18>' Fld_5 ada/nodes.lkt:10998
--# expr-start 6052 '<FieldAccess for expr at nodes.lkt:10998:18>' Fld_4 ada/nodes.lkt:10998
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Ent.Node.Expr_Function_F_Expr, Info => Ent.Info);
--# expr-done 6052
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_4.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_4.Info);
--# end
--# expr-done 6053
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:10997:13") else null)); 
--# expr-done 6054
--# expr-start 6056 '<FieldAccess for matches_expected_assign_type at nodes.lkt:11000:14>' Fld_7 ada/nodes.lkt:11000
--# expr-start 6055 '<FieldAccess for expr at nodes.lkt:11000:14>' Fld_6 ada/nodes.lkt:11000
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Expr_Function_F_Expr;
--# expr-done 6055
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_7 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Fld_6, Origin => Origin);
--# end
--# expr-done 6056
And_Pred_1 := Create_And (And_Pred, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:10996:9") else null)); 
--# expr-done 6057
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_899;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_899;
            raise;
      end;
   return Property_Result;
end Expr_Function_P_Xref_Equation;
--# end
--# property-start ExprFunction.xref_entry_point ada/nodes.lkt:11002
pragma Warnings (Off, "is not referenced");
 function Expr_Function_P_Xref_Entry_Point
  (Node : Bare_Expr_Function
  )
   return Boolean
is
   Self : Bare_Expr_Function  := Bare_Expr_Function (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_Function_P_Xref_Entry_Point;
--# end
   --
   --  Primitives for Bare_Null_Subp_Decl
   --
      procedure Initialize_Fields_For_Null_Subp_Decl
        (Self : Bare_Null_Subp_Decl
         ; Base_Subp_Body_F_Overriding : Bare_Overriding_Node
         ; Base_Subp_Body_F_Subp_Spec : Bare_Subp_Spec
         ; Null_Subp_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Base_Subp_Body
              (Self, Base_Subp_Body_F_Overriding, Base_Subp_Body_F_Subp_Spec);
            Self.Null_Subp_Decl_F_Aspects := Null_Subp_Decl_F_Aspects;
      end Initialize_Fields_For_Null_Subp_Decl;
   --
   --  Primitives for Bare_Subp_Body
   --
      procedure Initialize_Fields_For_Subp_Body
        (Self : Bare_Subp_Body
         ; Base_Subp_Body_F_Overriding : Bare_Overriding_Node
         ; Base_Subp_Body_F_Subp_Spec : Bare_Subp_Spec
         ; Subp_Body_F_Aspects : Bare_Aspect_Spec
         ; Subp_Body_F_Decls : Bare_Declarative_Part
         ; Subp_Body_F_Stmts : Bare_Handled_Stmts
         ; Subp_Body_F_End_Name : Bare_End_Name
        ) is
      begin
            Initialize_Fields_For_Base_Subp_Body
              (Self, Base_Subp_Body_F_Overriding, Base_Subp_Body_F_Subp_Spec);
            Self.Subp_Body_F_Aspects := Subp_Body_F_Aspects;
            Self.Subp_Body_F_Decls := Subp_Body_F_Decls;
            Self.Subp_Body_F_Stmts := Subp_Body_F_Stmts;
            Self.Subp_Body_F_End_Name := Subp_Body_F_End_Name;
      end Initialize_Fields_For_Subp_Body;
   function Subp_Body_F_Decls
     (Node : Bare_Subp_Body) return Bare_Declarative_Part
   is
   begin
         return Node.Subp_Body_F_Decls;
   end;
   function Subp_Body_F_Stmts
     (Node : Bare_Subp_Body) return Bare_Handled_Stmts
   is
   begin
         return Node.Subp_Body_F_Stmts;
   end;
   function Subp_Body_F_End_Name
     (Node : Bare_Subp_Body) return Bare_End_Name
   is
   begin
         return Node.Subp_Body_F_End_Name;
   end;
--# property-start SubpBody.declarative_parts ada/nodes.lkt:11023
pragma Warnings (Off, "is not referenced");
 function Subp_Body_P_Declarative_Parts
  (Node : Bare_Subp_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Subp_Body  := Bare_Subp_Body (Node);
     Ent : Internal_Entity_Subp_Body :=
       Internal_Entity_Subp_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_901 with Inline_Always;
      Fld : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_901 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_901;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6059 '<ArrayLiteral at nodes.lkt:11023:63>' Array_Lit ada/nodes.lkt:11023
--# expr-start 6058 '<FieldAccess for decls at nodes.lkt:11023:64>' Fld ada/nodes.lkt:11023
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Declarative_Part (Node => Ent.Node.Subp_Body_F_Decls, Info => Ent.Info);
--# expr-done 6058
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Fld)); 
--# expr-done 6059
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_901;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_901;
            raise;
      end;
   return Property_Result;
end Subp_Body_P_Declarative_Parts;
--# end
   --
   --  Primitives for Bare_Subp_Renaming_Decl
   --
      procedure Initialize_Fields_For_Subp_Renaming_Decl
        (Self : Bare_Subp_Renaming_Decl
         ; Base_Subp_Body_F_Overriding : Bare_Overriding_Node
         ; Base_Subp_Body_F_Subp_Spec : Bare_Subp_Spec
         ; Subp_Renaming_Decl_F_Renames : Bare_Renaming_Clause
         ; Subp_Renaming_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Base_Subp_Body
              (Self, Base_Subp_Body_F_Overriding, Base_Subp_Body_F_Subp_Spec);
            Self.Subp_Renaming_Decl_F_Renames := Subp_Renaming_Decl_F_Renames;
            Self.Subp_Renaming_Decl_F_Aspects := Subp_Renaming_Decl_F_Aspects;
      end Initialize_Fields_For_Subp_Renaming_Decl;
   function Subp_Renaming_Decl_F_Renames
     (Node : Bare_Subp_Renaming_Decl) return Bare_Renaming_Clause
   is
   begin
         return Node.Subp_Renaming_Decl_F_Renames;
   end;
--# property-start SubpRenamingDecl.xref_entry_point ada/nodes.lkt:11033
pragma Warnings (Off, "is not referenced");
 function Subp_Renaming_Decl_P_Xref_Entry_Point
  (Node : Bare_Subp_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Subp_Renaming_Decl  := Bare_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subp_Renaming_Decl_P_Xref_Entry_Point;
--# end
--# property-start SubpRenamingDecl.xref_equation ada/nodes.lkt:11036
pragma Warnings (Off, "is not referenced");
 function Subp_Renaming_Decl_P_Xref_Equation
  (Node : Bare_Subp_Renaming_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Subp_Renaming_Decl  := Bare_Subp_Renaming_Decl (Node);
     Ent : Internal_Entity_Subp_Renaming_Decl :=
       Internal_Entity_Subp_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_903 with Inline_Always;
            procedure Finalizer_Scope_2774 with Inline_Always;
            procedure Finalizer_Scope_2775 with Inline_Always;
            procedure Finalizer_Scope_2776 with Inline_Always;
      Local_Renamed_Object : Internal_Entity_Name;
Match_0 : Internal_Entity_Call_Expr;
Match_1 : Internal_Entity_Explicit_Deref;
Match_2 : Internal_Entity_Name;
Fld : Internal_Entity_Renaming_Clause;
Fld_1 : Internal_Entity_Name;
Fld_2 : Logic_Var;
Fld_3 : Internal_Entity_Subp_Spec;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Equation;
Fld_7 : Logic_Equation;
Fld_8 : Bare_Name;
Fld_9 : Logic_Equation;
Fld_10 : Logic_Equation;
Match_Prefix : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Call_Expr;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_2 : Internal_Entity_Explicit_Deref;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_3 : Internal_Entity_Name;
Let_Result_2 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Match_Result : Logic_Equation;
Fld_11 : Logic_Var;
Cast_Expr : Internal_Entity_Name;
Cast_Result_4 : Internal_Entity_Dotted_Name;
Fld_12 : Internal_Entity_Name;
Fld_13 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Subp_Renaming_Decl;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Pred : Logic_Equation;
Fld_14 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Subp_Renaming_Decl;
Cast_Result_6 : Internal_Entity_Basic_Decl;
Pred_1 : Logic_Equation;
Fld_15 : Logic_Var;
Cast_Expr_3 : Internal_Entity_Subp_Renaming_Decl;
Cast_Result_7 : Internal_Entity_Basic_Decl;
Pred_2 : Logic_Equation;
Is_A : Boolean;
If_Result : Logic_Equation;
Is_A_1 : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_A_2 : Boolean;
If_Result_2 : Logic_Equation;
Is_A_3 : Boolean;
If_Result_3 : Logic_Equation;
True_Rel : Logic_Equation;
False_Rel : Logic_Equation;
Fld_16 : Boolean;
If_Result_4 : Logic_Equation;
Or_Pred : Logic_Equation;
Let_Result_3 : Logic_Equation;
            procedure Finalizer_Scope_903 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Match_Result);
                     Dec_Ref (Pred);
                     Dec_Ref (Pred_1);
                     Dec_Ref (Pred_2);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (True_Rel);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_903;
            procedure Finalizer_Scope_2774 is
            begin
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_2774;
            procedure Finalizer_Scope_2775 is
            begin
                     Dec_Ref (Fld_9);
            end Finalizer_Scope_2775;
            procedure Finalizer_Scope_2776 is
            begin
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_2776;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6098 '<Let at nodes.lkt:11037:9>' Let_Result_3 ada/nodes.lkt:11037
--# scope-start
--# expr-start 6061 '<FieldAccess for renamed_object at nodes.lkt:11037:30>' Fld_1 ada/nodes.lkt:11037
--# expr-start 6060 '<FieldAccess for renames at nodes.lkt:11037:30>' Fld ada/nodes.lkt:11037
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Subp_Renaming_Decl_F_Renames, Info => Ent.Info);
--# expr-done 6060
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Renaming_Clause_F_Renamed_Object, Info => Fld.Info);
--# expr-done 6061
Local_Renamed_Object := Fld_1; 
--# bind renamed_object Local_Renamed_Object
--# expr-start 6097 '<LogicBinaryOp Or at nodes.lkt:11039:9>' Or_Pred ada/nodes.lkt:11039
--# expr-start 6094 '<If at nodes.lkt:11040:13>' If_Result_3 ada/nodes.lkt:11040
--# expr-start 6062 '<IsA CharLiteral at nodes.lkt:11040:16>' Is_A_3 ada/nodes.lkt:11040
Is_A_3 := Local_Renamed_Object.Node /= null 
and then Local_Renamed_Object.Node.Kind in Ada_Char_Literal_Range; 
--# expr-done 6062
if Is_A_3 then
   --# expr-start 6068 '<LogicBinaryOp And at nodes.lkt:11044:17>' And_Pred ada/nodes.lkt:11044
--# expr-start 6066 '<Bind at nodes.lkt:11044:17>' Bind_Result ada/nodes.lkt:11044
--# expr-start 6063 '<FieldAccess for expected_type_var at nodes.lkt:11044:17>' Fld_2 ada/nodes.lkt:11044
      if Local_Renamed_Object.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Local_Renamed_Object.Node);
--# expr-done 6063
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 6065 '<FieldAccess for return_type at nodes.lkt:11045:20>' Fld_4 ada/nodes.lkt:11045
--# expr-start 6064 '<FieldAccess for subp_spec at nodes.lkt:11045:20>' Fld_3 ada/nodes.lkt:11045
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Base_Subp_Body_F_Subp_Spec, Info => Ent.Info);
--# expr-done 6064
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_4 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Fld_3.Node, Origin => Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 6065
      Cast_Result := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Bind_Result := Solver.Create_Assign (Fld_2, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11044:17") else null)); 
--# expr-done 6066
--# expr-start 6067 '<FieldAccess for sub_equation at nodes.lkt:11046:22>' Fld_5 ada/nodes.lkt:11046
      if Local_Renamed_Object.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Renamed_Object.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Renamed_Object.Info);
--# end
--# expr-done 6067
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11044:17") else null)); 
--# expr-done 6068
   If_Result_3 := And_Pred;
else
   --# expr-start 6093 '<If at nodes.lkt:11040:13>' If_Result_2 ada/nodes.lkt:11040
--# expr-start 6069 '<IsA AttributeRef at nodes.lkt:11048:18>' Is_A_2 ada/nodes.lkt:11048
Is_A_2 := Local_Renamed_Object.Node /= null 
and then Local_Renamed_Object.Node.Kind in Ada_Attribute_Ref_Range; 
--# expr-done 6069
if Is_A_2 then
   --# expr-start 6070 '<FieldAccess for sub_equation at nodes.lkt:11052:17>' Fld_6 ada/nodes.lkt:11052
      if Local_Renamed_Object.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_6 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Renamed_Object.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Renamed_Object.Info);
--# end
--# expr-done 6070
   If_Result_2 := Fld_6;
else
   --# expr-start 6092 '<LogicBinaryOp And at nodes.lkt:11055:17>' And_Pred_1 ada/nodes.lkt:11055
--# expr-start 6075 '<Match at nodes.lkt:11055:17>' Match_Result ada/nodes.lkt:11055
      if Local_Renamed_Object.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Local_Renamed_Object; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind ce Match_0
--# expr-start 6071 '<FieldAccess for sub_equation at nodes.lkt:11059:42>' Fld_7 ada/nodes.lkt:11059
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_0.Info);
--# end
--# expr-done 6071
Let_Result := Fld_7; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2774;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Explicit_Deref =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Explicit_Deref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind ed Match_1
--# expr-start 6073 '<FieldAccess for general_xref_equation at nodes.lkt:11061:25>' Fld_9 ada/nodes.lkt:11061
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6072 '<FieldAccess for node at nodes.lkt:11061:50>' Fld_8 ada/nodes.lkt:11061
Fld_8 := Local_Renamed_Object.Node;
--# expr-done 6072
--# property-call-start ExplicitDeref.general_xref_equation
Fld_9 := Libadalang.Implementation.Explicit_Deref_P_General_Xref_Equation (Node => Match_1.Node, Root => Fld_8, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_1.Info);
--# end
--# expr-done 6073
Let_Result_1 := Fld_9; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2775;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_End_Name | Ada_Qual_Expr .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind o Match_2
--# expr-start 6074 '<FieldAccess for xref_no_overloading at nodes.lkt:11064:31>' Fld_10 ada/nodes.lkt:11064
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_10 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Match_2.Node, All_Els => True, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_2.Info);
--# end
--# expr-done 6074
Let_Result_2 := Fld_10; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2776;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
end case;
--# expr-done 6075
--# expr-start 6091 '<If at nodes.lkt:11067:21>' If_Result_1 ada/nodes.lkt:11067
--# expr-start 6076 '<IsA DottedName at nodes.lkt:11067:24>' Is_A_1 ada/nodes.lkt:11067
Is_A_1 := Local_Renamed_Object.Node /= null 
and then Local_Renamed_Object.Node.Kind in Ada_Dotted_Name_Range; 
--# expr-done 6076
if Is_A_1 then
   --# expr-start 6082 '<Predicate on BasicDecl.subp_renaming_decl_match_signature at nodes.lkt:11069:25>' Pred ada/nodes.lkt:11069
--# expr-start 6077 '<FieldAccess for ref_var at nodes.lkt:11070:62>' Fld_11 ada/nodes.lkt:11070
      if Local_Renamed_Object.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_11 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Local_Renamed_Object.Node);
--# end
--# expr-done 6077
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
--# expr-start 6080 '<FieldAccess for ref_var at nodes.lkt:11072:25>' Fld_13 ada/nodes.lkt:11072
--# expr-start 6079 '<FieldAccess for prefix at nodes.lkt:11072:25>' Fld_12 ada/nodes.lkt:11072
--# expr-start 6078 '<Cast to DottedName at nodes.lkt:11072:25>' Cast_Result_4 ada/nodes.lkt:11072
Cast_Expr := Local_Renamed_Object; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_4 := Create_Internal_Entity_Dotted_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_4 := No_Entity_Dotted_Name;
   end if;
--# expr-done 6078
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Name (Node => Cast_Result_4.Node.Dotted_Name_F_Prefix, Info => Cast_Result_4.Info);
--# expr-done 6079
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_13 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_12.Node);
--# end
--# expr-done 6080
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
--# expr-start 6081 '<Cast to BasicDecl at nodes.lkt:11073:25>' Cast_Result_5 ada/nodes.lkt:11073
Cast_Expr_1 := Ent; 
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# expr-done 6081
Pred := Solver.Create_N_Predicate ((Fld_11, Fld_13), Create_Basic_Decl_P_Subp_Renaming_Decl_Match_Signature_0_Predicate (Cast_Result_5, Origin)); 
--# expr-done 6082
   If_Result_1 := Pred;
else
   --# expr-start 6090 '<If at nodes.lkt:11067:21>' If_Result ada/nodes.lkt:11067
--# expr-start 6083 '<IsA ExplicitDeref at nodes.lkt:11074:26>' Is_A ada/nodes.lkt:11074
Is_A := Local_Renamed_Object.Node /= null 
and then Local_Renamed_Object.Node.Kind in Ada_Explicit_Deref_Range; 
--# expr-done 6083
if Is_A then
   --# expr-start 6086 '<Predicate on BasicDecl.access_to_subp_decl_match_signature at nodes.lkt:11076:25>' Pred_1 ada/nodes.lkt:11076
--# expr-start 6084 '<FieldAccess for ref_var at nodes.lkt:11077:63>' Fld_14 ada/nodes.lkt:11077
      if Local_Renamed_Object.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_14 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Local_Renamed_Object.Node);
--# end
--# expr-done 6084
Fld_14.Value := No_Entity;
Entity_Vars.Reset (Fld_14);
--# expr-start 6085 '<Cast to BasicDecl at nodes.lkt:11079:25>' Cast_Result_6 ada/nodes.lkt:11079
Cast_Expr_2 := Ent; 
      Cast_Result_6 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
--# expr-done 6085
Pred_1 := Solver.Create_Predicate (Fld_14, Create_Basic_Decl_P_Access_To_Subp_Decl_Match_Signature_0_Predicate (Cast_Result_6, Origin)); 
--# expr-done 6086
   If_Result := Pred_1;
else
   --# expr-start 6089 '<Predicate on BasicDecl.subp_decl_match_signature at nodes.lkt:11081:25>' Pred_2 ada/nodes.lkt:11081
--# expr-start 6087 '<FieldAccess for ref_var at nodes.lkt:11081:62>' Fld_15 ada/nodes.lkt:11081
      if Local_Renamed_Object.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_15 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Local_Renamed_Object.Node);
--# end
--# expr-done 6087
Fld_15.Value := No_Entity;
Entity_Vars.Reset (Fld_15);
--# expr-start 6088 '<Cast to BasicDecl at nodes.lkt:11083:25>' Cast_Result_7 ada/nodes.lkt:11083
Cast_Expr_3 := Ent; 
      Cast_Result_7 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
--# expr-done 6088
Pred_2 := Solver.Create_Predicate (Fld_15, Create_Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate (Cast_Result_7, Origin)); 
--# expr-done 6089
   If_Result := Pred_2;
end if;
      Inc_Ref (If_Result);
--# expr-done 6090
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 6091
And_Pred_1 := Create_And (Match_Result, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11055:17") else null)); 
--# expr-done 6092
   If_Result_2 := And_Pred_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 6093
   If_Result_3 := If_Result_2;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 6094
--# expr-start 6096 '<If at nodes.lkt:11089:13>' If_Result_4 ada/nodes.lkt:11089
--# expr-start 6095 '<FieldAccess for is_operator_name at nodes.lkt:11089:16>' Fld_16 ada/nodes.lkt:11089
      if Local_Renamed_Object.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_operator_name
Fld_16 := Libadalang.Implementation.Name_P_Is_Operator_Name (Node => Local_Renamed_Object.Node, E_Info => Local_Renamed_Object.Info);
--# end
--# expr-done 6095
if Fld_16 then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11089:55") else null)); 
   If_Result_4 := True_Rel;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11089:66") else null)); 
   If_Result_4 := False_Rel;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 6096
Or_Pred := Create_Or (If_Result_3, If_Result_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11039:9") else null)); 
--# expr-done 6097
Let_Result_3 := Or_Pred; Inc_Ref (Let_Result_3);
--# end
--# expr-done 6098
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_903;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_903;
                     Finalizer_Scope_2774;
                     Finalizer_Scope_2775;
                     Finalizer_Scope_2776;
            raise;
      end;
   return Property_Result;
end Subp_Renaming_Decl_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Body_Stub
   --
--# property-start BodyStub.next_part_for_decl ada/nodes.lkt:11099
pragma Warnings (Off, "is not referenced");
 function Body_Stub_P_Next_Part_For_Decl
  (Node : Bare_Body_Stub
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Body_Stub  := Bare_Body_Stub (Node);
     Ent : Internal_Entity_Body_Stub :=
       Internal_Entity_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_904 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
Fld_1 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_904 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_904;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6101 '<as_entity at nodes.lkt:11100:9>' If_Result ada/nodes.lkt:11100
--# expr-start 6100 '<FieldAccess for get_unit_root_decl at nodes.lkt:11100:9>' Fld_1 ada/nodes.lkt:11100
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6099 '<FieldAccess for syntactic_fully_qualified_name at nodes.lkt:11101:13>' Fld ada/nodes.lkt:11101
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BodyStub.syntactic_fully_qualified_name
Fld := Libadalang.Implementation.Body_Stub_P_Syntactic_Fully_Qualified_Name (Node => Ent.Node);
--# end
--# expr-done 6099
--# property-call-start AdaNode.get_unit_root_decl
Fld_1 := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Fld, Kind => Unit_Body, Process_Parents => False);
--# end
--# expr-done 6100
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 6101
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_904;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_904;
            raise;
      end;
   return Property_Result;
end Body_Stub_P_Next_Part_For_Decl;
--# end
--# property-start BodyStub.syntactic_fully_qualified_name ada/nodes.lkt:11112
pragma Warnings (Off, "is not referenced");
 function Body_Stub_P_Syntactic_Fully_Qualified_Name
  (Node : Bare_Body_Stub
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Body_Stub  := Bare_Body_Stub (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_905 with Inline_Always;
      Local_Rel_Name : Symbol_Type_Array_Access;
Local_Top_Body : Bare_Body_Node;
Match_0 : Bare_Subp_Body;
Match_1 : Bare_Protected_Body;
Match_2 : Bare_Package_Body;
Match_3 : Bare_Task_Body;
Match_4 : Bare_Ada_Node;
Local_Cu : Bare_Compilation_Unit;
As_Entity : Internal_Entity_Body_Stub;
Is_Null : Boolean;
If_Result : Internal_Entity_Body_Stub;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Symbol_Type_Array_Access;
Fld_2 : Bare_Ada_Node;
Fld_3 : Bare_Ada_Node;
Fld_4 : Bare_Ada_Node;
Match_Prefix : Bare_Ada_Node;
Cast_Result : Bare_Subp_Body;
Cast_Expr : Bare_Subp_Body;
Cast_Result_1 : Bare_Body_Node;
Let_Result : Bare_Body_Node;
Scope_Result : Bare_Body_Node;
Cast_Result_2 : Bare_Protected_Body;
Cast_Expr_1 : Bare_Protected_Body;
Cast_Result_3 : Bare_Body_Node;
Let_Result_1 : Bare_Body_Node;
Scope_Result_1 : Bare_Body_Node;
Cast_Result_4 : Bare_Package_Body;
Cast_Expr_2 : Bare_Package_Body;
Cast_Result_5 : Bare_Body_Node;
Let_Result_2 : Bare_Body_Node;
Scope_Result_2 : Bare_Body_Node;
Cast_Result_6 : Bare_Task_Body;
Cast_Expr_3 : Bare_Task_Body;
Cast_Result_7 : Bare_Body_Node;
Let_Result_3 : Bare_Body_Node;
Scope_Result_3 : Bare_Body_Node;
Cast_Result_8 : Bare_Ada_Node;
Let_Result_4 : Bare_Body_Node;
Scope_Result_4 : Bare_Body_Node;
Match_Result : Bare_Body_Node;
Fld_5 : Bare_Ada_Node;
Fld_6 : Bare_Ada_Node;
Cast_Result_9 : Bare_Compilation_Unit;
Fld_7 : Bare_Ada_Node;
Is_A : Boolean;
If_Result_1 : Bare_Compilation_Unit;
Fld_8 : Symbol_Type_Array_Access;
Concat_Result : Symbol_Type_Array_Access;
Let_Result_5 : Symbol_Type_Array_Access;
Let_Result_6 : Symbol_Type_Array_Access;
Let_Result_7 : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_905 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Rel_Name);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Let_Result_7);
            end Finalizer_Scope_905;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 6118 '<Let at nodes.lkt:11114:9>' Let_Result_7 ada/nodes.lkt:11114
--# scope-start
--# expr-start 6104 '<FieldAccess for as_symbol_array at nodes.lkt:11114:24>' Fld_1 ada/nodes.lkt:11114
--# expr-start 6103 '<FieldAccess for defining_name at nodes.lkt:11114:24>' Fld ada/nodes.lkt:11114
--# expr-start 6102 '<as_bare_entity at nodes.lkt:11114:24>' If_Result ada/nodes.lkt:11114
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Body_Stub;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 6102
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 6103
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Fld.Node);
--# end
--# expr-done 6104
Local_Rel_Name := Fld_1; Inc_Ref (Local_Rel_Name);
--# bind rel_name Local_Rel_Name
--# expr-start 6117 '<Let at nodes.lkt:11124:9>' Let_Result_6 ada/nodes.lkt:11124
--# scope-start
--# expr-start 6108 '<Match at nodes.lkt:11124:24>' Match_Result ada/nodes.lkt:11124
--# expr-start 6107 '<parent at nodes.lkt:11124:30>' Fld_4 ada/nodes.lkt:11124
--# expr-start 6106 '<parent at nodes.lkt:11124:30>' Fld_3 ada/nodes.lkt:11124
--# expr-start 6105 '<parent at nodes.lkt:11124:30>' Fld_2 ada/nodes.lkt:11124
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Parent; 
--# expr-done 6105
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Fld_2.Parent; 
--# expr-done 6106
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Fld_3.Parent; 
--# expr-done 6107
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_4; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Subp_Body =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind b Match_0
Cast_Expr := Match_0; 
      Cast_Result_1 := Cast_Expr;
Let_Result := Cast_Result_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Protected_Body =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_1 := Cast_Result_2; 
--# bind b Match_1
Cast_Expr_1 := Match_1; 
      Cast_Result_3 := Cast_Expr_1;
Let_Result_1 := Cast_Result_3; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Package_Body =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix;
Match_2 := Cast_Result_4; 
--# bind b Match_2
Cast_Expr_2 := Match_2; 
      Cast_Result_5 := Cast_Expr_2;
Let_Result_2 := Cast_Result_5; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Match_Prefix;
Match_3 := Cast_Result_6; 
--# bind b Match_3
Cast_Expr_3 := Match_3; 
      Cast_Result_7 := Cast_Expr_3;
Let_Result_3 := Cast_Result_7; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Abort_Absent .. Ada_Null_Subp_Decl | Ada_Subp_Renaming_Decl .. Ada_Entry_Body | Ada_Entry_Index_Spec .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Match_Prefix;
Match_4 := Cast_Result_8; 
--# bind _ Match_4
Let_Result_4 := raise Property_Error with "invalid body stub"; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_4; 
end case;
--# expr-done 6108
Local_Top_Body := Match_Result; 
--# bind top_body Local_Top_Body
--# expr-start 6116 '<Let at nodes.lkt:11132:9>' Let_Result_5 ada/nodes.lkt:11132
--# scope-start
--# expr-start 6114 '<If at nodes.lkt:11133:13>' If_Result_1 ada/nodes.lkt:11133
--# expr-start 6110 '<IsA LibraryItem, Subunit at nodes.lkt:11133:16>' Is_A ada/nodes.lkt:11133
--# expr-start 6109 '<parent at nodes.lkt:11133:16>' Fld_7 ada/nodes.lkt:11133
      if Local_Top_Body = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Local_Top_Body.Parent; 
--# expr-done 6109
Is_A := Fld_7 /= null 
and then Fld_7.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6110
if Is_A then
   --# expr-start 6113 '<Cast to CompilationUnit at nodes.lkt:11134:18>' Cast_Result_9 ada/nodes.lkt:11134
--# expr-start 6112 '<parent at nodes.lkt:11134:18>' Fld_6 ada/nodes.lkt:11134
--# expr-start 6111 '<parent at nodes.lkt:11134:18>' Fld_5 ada/nodes.lkt:11134
      if Local_Top_Body = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Local_Top_Body.Parent; 
--# expr-done 6111
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Fld_5.Parent; 
--# expr-done 6112
   if Fld_6 = null
      or else Fld_6.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result_9 := Fld_6;
   else
         Cast_Result_9 := No_Bare_Ada_Node;
   end if;
--# expr-done 6113
   If_Result_1 := Cast_Result_9;
else
   If_Result_1 := raise Property_Error with "invalid body stub";
end if;
--# expr-done 6114
Local_Cu := If_Result_1; 
--# bind cu Local_Cu
--# expr-start 6115 '<FieldAccess for syntactic_fully_qualified_name at nodes.lkt:11137:9>' Fld_8 ada/nodes.lkt:11137
      if Local_Cu = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.syntactic_fully_qualified_name
Fld_8 := Libadalang.Implementation.Compilation_Unit_P_Syntactic_Fully_Qualified_Name (Node => Local_Cu);
--# end
--# expr-done 6115
Concat_Result := Concat (Fld_8, Local_Rel_Name); 
Let_Result_5 := Concat_Result; Inc_Ref (Let_Result_5);
--# end
--# expr-done 6116
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 6117
Let_Result_7 := Let_Result_6; Inc_Ref (Let_Result_7);
--# end
--# expr-done 6118
         Property_Result := Let_Result_7;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_905;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_905;
            raise;
      end;
   return Property_Result;
end Body_Stub_P_Syntactic_Fully_Qualified_Name;
--# end
--# property-start BodyStub.env_names ada/nodes.lkt:11142
pragma Warnings (Off, "is not referenced");
 function Body_Stub_P_Env_Names
  (Node : Bare_Body_Stub
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Body_Stub  := Bare_Body_Stub (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_906 with Inline_Always;
      Fld : String_Type;
Str : String_Type;
Concat_Result : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_906 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_906;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6122 '<ArrayLiteral at nodes.lkt:11143:9>' Array_Lit ada/nodes.lkt:11143
--# expr-start 6121 '<to_symbol at nodes.lkt:11143:10>' Sym ada/nodes.lkt:11143
--# expr-start 6119 '<FieldAccess for top_level_env_name at nodes.lkt:11143:11>' Fld ada/nodes.lkt:11143
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 6119
--# expr-start 6120 '<String at nodes.lkt:11143:39>' Str ada/nodes.lkt:11143
Str := Create_String ("__stub"); 
--# expr-done 6120
Concat_Result := Concat_String (Fld, Str); 
Sym := String_To_Symbol (Self, Self.Unit.Context, Concat_Result); 
--# expr-done 6121
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 6122
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_906;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_906;
            raise;
      end;
   return Property_Result;
end Body_Stub_P_Env_Names;
--# end
--# property-start BodyStub.previous_part_link_env_assoc ada/nodes.lkt:11145
pragma Warnings (Off, "is not referenced");
 function Body_Stub_P_Previous_Part_Link_Env_Assoc
  (Node : Bare_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Body_Stub  := Bare_Body_Stub (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_907 with Inline_Always;
      Sym : Symbol_Type;
Fld : String_Type;
Sym_1 : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Body_Stub;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_907 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_907;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6127 '<New EnvAssoc at nodes.lkt:11146:9>' New_Struct_1 ada/nodes.lkt:11146
--# expr-start 6125 '<New DesignatedEnv at nodes.lkt:11149:22>' New_Struct ada/nodes.lkt:11149
--# expr-start 6124 '<to_symbol at nodes.lkt:11151:26>' Sym_1 ada/nodes.lkt:11151
--# expr-start 6123 '<FieldAccess for top_level_env_name at nodes.lkt:11151:26>' Fld ada/nodes.lkt:11151
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 6123
Sym_1 := String_To_Symbol (Self, Self.Unit.Context, Fld); 
--# expr-done 6124
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Sym_1, Kind => Named_Env); 
--# expr-done 6125
--# expr-start 6126 '<Symbol __nextpart at nodes.lkt:11147:17>' Sym ada/nodes.lkt:11147
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Nextpart); 
--# expr-done 6126
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Sym, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6127
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_907;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_907;
            raise;
      end;
   return Property_Result;
end Body_Stub_P_Previous_Part_Link_Env_Assoc;
--# end
   --
   --  Primitives for Bare_Package_Body_Stub
   --
      procedure Package_Body_Stub_Pre_Env_Actions
        (Self            : Bare_Package_Body_Stub;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_69 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11168:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_70 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_71 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Package_Body_Stub
        (Self : Bare_Package_Body_Stub
         ; Package_Body_Stub_F_Name : Bare_Defining_Name
         ; Package_Body_Stub_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Package_Body_Stub_F_Name := Package_Body_Stub_F_Name;
            Self.Package_Body_Stub_F_Aspects := Package_Body_Stub_F_Aspects;
      end Initialize_Fields_For_Package_Body_Stub;
   function Package_Body_Stub_F_Name
     (Node : Bare_Package_Body_Stub) return Bare_Defining_Name
   is
   begin
         return Node.Package_Body_Stub_F_Name;
   end;
--# property-start PackageBodyStub.defining_names ada/nodes.lkt:11165
pragma Warnings (Off, "is not referenced");
 function Package_Body_Stub_P_Defining_Names
  (Node : Bare_Package_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Package_Body_Stub  := Bare_Package_Body_Stub (Node);
     Ent : Internal_Entity_Package_Body_Stub :=
       Internal_Entity_Package_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_908 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_908 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_908;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6129 '<ArrayLiteral at nodes.lkt:11165:57>' Array_Lit ada/nodes.lkt:11165
--# expr-start 6128 '<FieldAccess for name at nodes.lkt:11165:58>' Fld ada/nodes.lkt:11165
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Package_Body_Stub_F_Name, Info => Ent.Info);
--# expr-done 6128
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6129
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_908;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_908;
            raise;
      end;
   return Property_Result;
end Package_Body_Stub_P_Defining_Names;
--# end
--# property-start PackageBodyStub._env_mappings_69 ada/nodes.lkt:11168
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_69
  (Node : Bare_Package_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Package_Body_Stub  := Bare_Package_Body_Stub (Node);
     Ent : Internal_Entity_Package_Body_Stub :=
       Internal_Entity_Package_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1733 with Inline_Always;
      Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1733 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1733;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6130 '<FieldAccess for previous_part_link_env_assoc at nodes.lkt:11168:20>' Fld ada/nodes.lkt:11168
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Body.previous_part_link_env_assoc'
Fld := Libadalang.Implementation.Dispatcher_Body_Node_P_Previous_Part_Link_Env_Assoc (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6130
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1733;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1733;
            raise;
      end;
   return Property_Result;
end Env_Mappings_69;
--# end
--# property-start PackageBodyStub._env_trans_parent_70 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_70
  (Node : Bare_Package_Body_Stub
  )
   return Boolean
is
   Self : Bare_Package_Body_Stub  := Bare_Package_Body_Stub (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_70;
--# end
--# property-start PackageBodyStub._env_names_71 ada/nodes.lkt:11169
pragma Warnings (Off, "is not referenced");
 function Env_Names_71
  (Node : Bare_Package_Body_Stub
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Package_Body_Stub  := Bare_Package_Body_Stub (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1735 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1735 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1735;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6131 '<FieldAccess for env_names at nodes.lkt:11169:23>' Fld ada/nodes.lkt:11169
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BodyStub.env_names
Fld := Libadalang.Implementation.Body_Stub_P_Env_Names (Node => Self);
--# end
--# expr-done 6131
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1735;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1735;
            raise;
      end;
   return Property_Result;
end Env_Names_71;
--# end
   --
   --  Primitives for Bare_Protected_Body_Stub
   --
      procedure Protected_Body_Stub_Pre_Env_Actions
        (Self            : Bare_Protected_Body_Stub;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_72 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11183:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_73 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_74 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Protected_Body_Stub
        (Self : Bare_Protected_Body_Stub
         ; Protected_Body_Stub_F_Name : Bare_Defining_Name
         ; Protected_Body_Stub_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Protected_Body_Stub_F_Name := Protected_Body_Stub_F_Name;
            Self.Protected_Body_Stub_F_Aspects := Protected_Body_Stub_F_Aspects;
      end Initialize_Fields_For_Protected_Body_Stub;
   function Protected_Body_Stub_F_Name
     (Node : Bare_Protected_Body_Stub) return Bare_Defining_Name
   is
   begin
         return Node.Protected_Body_Stub_F_Name;
   end;
--# property-start ProtectedBodyStub.defining_names ada/nodes.lkt:11180
pragma Warnings (Off, "is not referenced");
 function Protected_Body_Stub_P_Defining_Names
  (Node : Bare_Protected_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Protected_Body_Stub  := Bare_Protected_Body_Stub (Node);
     Ent : Internal_Entity_Protected_Body_Stub :=
       Internal_Entity_Protected_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_909 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_909 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_909;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6133 '<ArrayLiteral at nodes.lkt:11180:57>' Array_Lit ada/nodes.lkt:11180
--# expr-start 6132 '<FieldAccess for name at nodes.lkt:11180:58>' Fld ada/nodes.lkt:11180
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Protected_Body_Stub_F_Name, Info => Ent.Info);
--# expr-done 6132
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6133
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_909;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_909;
            raise;
      end;
   return Property_Result;
end Protected_Body_Stub_P_Defining_Names;
--# end
--# property-start ProtectedBodyStub._env_mappings_72 ada/nodes.lkt:11183
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_72
  (Node : Bare_Protected_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Protected_Body_Stub  := Bare_Protected_Body_Stub (Node);
     Ent : Internal_Entity_Protected_Body_Stub :=
       Internal_Entity_Protected_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1736 with Inline_Always;
      Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1736 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1736;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6134 '<FieldAccess for previous_part_link_env_assoc at nodes.lkt:11183:20>' Fld ada/nodes.lkt:11183
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Body.previous_part_link_env_assoc'
Fld := Libadalang.Implementation.Dispatcher_Body_Node_P_Previous_Part_Link_Env_Assoc (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6134
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1736;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1736;
            raise;
      end;
   return Property_Result;
end Env_Mappings_72;
--# end
--# property-start ProtectedBodyStub._env_trans_parent_73 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_73
  (Node : Bare_Protected_Body_Stub
  )
   return Boolean
is
   Self : Bare_Protected_Body_Stub  := Bare_Protected_Body_Stub (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_73;
--# end
--# property-start ProtectedBodyStub._env_names_74 ada/nodes.lkt:11184
pragma Warnings (Off, "is not referenced");
 function Env_Names_74
  (Node : Bare_Protected_Body_Stub
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Protected_Body_Stub  := Bare_Protected_Body_Stub (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1738 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1738 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1738;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6135 '<FieldAccess for env_names at nodes.lkt:11184:23>' Fld ada/nodes.lkt:11184
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BodyStub.env_names
Fld := Libadalang.Implementation.Body_Stub_P_Env_Names (Node => Self);
--# end
--# expr-done 6135
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1738;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1738;
            raise;
      end;
   return Property_Result;
end Env_Names_74;
--# end
   --
   --  Primitives for Bare_Subp_Body_Stub
   --
      procedure Subp_Body_Stub_Pre_Env_Actions
        (Self            : Bare_Subp_Body_Stub;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_75 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11204:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_76 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_77 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      if Libadalang.Implementation.Ref_Cond_79 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_78 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Nested_Generic_Formal_Part'Access,
               Prioritary,
               All_Cats,
               True);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_81 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_80 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Use_Clauses_In_Generic_Formal_Part'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Subp_Body_Stub
        (Self : Bare_Subp_Body_Stub
         ; Subp_Body_Stub_F_Overriding : Bare_Overriding_Node
         ; Subp_Body_Stub_F_Subp_Spec : Bare_Subp_Spec
         ; Subp_Body_Stub_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Subp_Body_Stub_F_Overriding := Subp_Body_Stub_F_Overriding;
            Self.Subp_Body_Stub_F_Subp_Spec := Subp_Body_Stub_F_Subp_Spec;
            Self.Subp_Body_Stub_F_Aspects := Subp_Body_Stub_F_Aspects;
      end Initialize_Fields_For_Subp_Body_Stub;
   function Subp_Body_Stub_F_Overriding
     (Node : Bare_Subp_Body_Stub) return Bare_Overriding_Node
   is
   begin
         return Node.Subp_Body_Stub_F_Overriding;
   end;
   function Subp_Body_Stub_F_Subp_Spec
     (Node : Bare_Subp_Body_Stub) return Bare_Subp_Spec
   is
   begin
         return Node.Subp_Body_Stub_F_Subp_Spec;
   end;
--# property-start SubpBodyStub.defining_names ada/nodes.lkt:11197
pragma Warnings (Off, "is not referenced");
 function Subp_Body_Stub_P_Defining_Names
  (Node : Bare_Subp_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
     Ent : Internal_Entity_Subp_Body_Stub :=
       Internal_Entity_Subp_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_910 with Inline_Always;
      Fld : Internal_Entity_Subp_Spec;
Fld_1 : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_910 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_910;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6138 '<ArrayLiteral at nodes.lkt:11197:57>' Array_Lit ada/nodes.lkt:11197
--# expr-start 6137 '<FieldAccess for name at nodes.lkt:11197:58>' Fld_1 ada/nodes.lkt:11197
--# expr-start 6136 '<FieldAccess for subp_spec at nodes.lkt:11197:58>' Fld ada/nodes.lkt:11197
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Subp_Body_Stub_F_Subp_Spec, Info => Ent.Info);
--# expr-done 6136
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 6137
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld_1)); 
--# expr-done 6138
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_910;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_910;
            raise;
      end;
   return Property_Result;
end Subp_Body_Stub_P_Defining_Names;
--# end
--# property-start SubpBodyStub.type_expression ada/nodes.lkt:11201
pragma Warnings (Off, "is not referenced");
 function Subp_Body_Stub_P_Type_Expression
  (Node : Bare_Subp_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
     Ent : Internal_Entity_Subp_Body_Stub :=
       Internal_Entity_Subp_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Subp_Spec;
Fld_1 : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6140 '<FieldAccess for returns at nodes.lkt:11201:47>' Fld_1 ada/nodes.lkt:11201
--# expr-start 6139 '<FieldAccess for subp_spec at nodes.lkt:11201:47>' Fld ada/nodes.lkt:11201
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Subp_Body_Stub_F_Subp_Spec, Info => Ent.Info);
--# expr-done 6139
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 6140
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subp_Body_Stub_P_Type_Expression;
--# end
--# property-start SubpBodyStub._env_mappings_75 ada/nodes.lkt:11204
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_75
  (Node : Bare_Subp_Body_Stub
  )
   return Internal_Env_Assoc
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1739 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Subp_Body_Stub;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1739 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1739;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6143 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6141 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6141
--# expr-start 6142 '<FieldAccess for name_symbol at nodes.lkt:11204:23>' Fld ada/nodes.lkt:11204
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 6142
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6143
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1739;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1739;
            raise;
      end;
   return Property_Result;
end Env_Mappings_75;
--# end
--# property-start SubpBodyStub._env_trans_parent_76 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_76
  (Node : Bare_Subp_Body_Stub
  )
   return Boolean
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_76;
--# end
--# property-start SubpBodyStub._env_names_77 ada/nodes.lkt:11205
pragma Warnings (Off, "is not referenced");
 function Env_Names_77
  (Node : Bare_Subp_Body_Stub
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1741 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1741 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1741;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6144 '<FieldAccess for env_names at nodes.lkt:11205:23>' Fld ada/nodes.lkt:11205
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BodyStub.env_names
Fld := Libadalang.Implementation.Body_Stub_P_Env_Names (Node => Self);
--# end
--# expr-done 6144
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1741;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1741;
            raise;
      end;
   return Property_Result;
end Env_Names_77;
--# end
--# property-start SubpBodyStub._ref_env_nodes_78 ada/nodes.lkt:11207
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_78
  (Node : Bare_Subp_Body_Stub
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1742 with Inline_Always;
            procedure Finalizer_Scope_2782 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Subp_Body_Stub;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1742 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1742;
            procedure Finalizer_Scope_2782 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2782;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6145 '<Cast to AdaNode at nodes.lkt:11207:13>' Cast_Result ada/nodes.lkt:11207
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6145
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 6146 '<ArrayLiteral at nodes.lkt:11207:41>' Array_Lit ada/nodes.lkt:11207
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6146
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2782;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1742;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1742;
                     Finalizer_Scope_2782;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_78;
--# end
--# property-start SubpBodyStub._ref_cond_79 ada/nodes.lkt:11210
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_79
  (Node : Bare_Subp_Body_Stub
  )
   return Boolean
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6147 '<FieldAccess for should_ref_generic_formals at nodes.lkt:11210:18>' Fld ada/nodes.lkt:11210
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6147
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_79;
--# end
--# property-start SubpBodyStub._ref_env_nodes_80 ada/nodes.lkt:11216
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_80
  (Node : Bare_Subp_Body_Stub
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1744 with Inline_Always;
            procedure Finalizer_Scope_2783 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Subp_Body_Stub;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1744 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1744;
            procedure Finalizer_Scope_2783 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2783;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6148 '<Cast to AdaNode at nodes.lkt:11216:13>' Cast_Result ada/nodes.lkt:11216
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6148
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v2 Var_Expr_0
--# expr-start 6149 '<ArrayLiteral at nodes.lkt:11216:41>' Array_Lit ada/nodes.lkt:11216
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6149
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2783;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1744;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1744;
                     Finalizer_Scope_2783;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_80;
--# end
--# property-start SubpBodyStub._ref_cond_81 ada/nodes.lkt:11218
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_81
  (Node : Bare_Subp_Body_Stub
  )
   return Boolean
is
   Self : Bare_Subp_Body_Stub  := Bare_Subp_Body_Stub (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6150 '<FieldAccess for should_ref_generic_formals at nodes.lkt:11218:18>' Fld ada/nodes.lkt:11218
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6150
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_81;
--# end
   --
   --  Primitives for Bare_Task_Body_Stub
   --
      procedure Task_Body_Stub_Pre_Env_Actions
        (Self            : Bare_Task_Body_Stub;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_82 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11233:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_83 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_84 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Task_Body_Stub
        (Self : Bare_Task_Body_Stub
         ; Task_Body_Stub_F_Name : Bare_Defining_Name
         ; Task_Body_Stub_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Task_Body_Stub_F_Name := Task_Body_Stub_F_Name;
            Self.Task_Body_Stub_F_Aspects := Task_Body_Stub_F_Aspects;
      end Initialize_Fields_For_Task_Body_Stub;
   function Task_Body_Stub_F_Name
     (Node : Bare_Task_Body_Stub) return Bare_Defining_Name
   is
   begin
         return Node.Task_Body_Stub_F_Name;
   end;
--# property-start TaskBodyStub.defining_names ada/nodes.lkt:11230
pragma Warnings (Off, "is not referenced");
 function Task_Body_Stub_P_Defining_Names
  (Node : Bare_Task_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Task_Body_Stub  := Bare_Task_Body_Stub (Node);
     Ent : Internal_Entity_Task_Body_Stub :=
       Internal_Entity_Task_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_912 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_912 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_912;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6152 '<ArrayLiteral at nodes.lkt:11230:57>' Array_Lit ada/nodes.lkt:11230
--# expr-start 6151 '<FieldAccess for name at nodes.lkt:11230:58>' Fld ada/nodes.lkt:11230
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Task_Body_Stub_F_Name, Info => Ent.Info);
--# expr-done 6151
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6152
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_912;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_912;
            raise;
      end;
   return Property_Result;
end Task_Body_Stub_P_Defining_Names;
--# end
--# property-start TaskBodyStub._env_mappings_82 ada/nodes.lkt:11233
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_82
  (Node : Bare_Task_Body_Stub
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Task_Body_Stub  := Bare_Task_Body_Stub (Node);
     Ent : Internal_Entity_Task_Body_Stub :=
       Internal_Entity_Task_Body_Stub'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1746 with Inline_Always;
      Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1746 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1746;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6153 '<FieldAccess for previous_part_link_env_assoc at nodes.lkt:11233:20>' Fld ada/nodes.lkt:11233
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Body.previous_part_link_env_assoc'
Fld := Libadalang.Implementation.Dispatcher_Body_Node_P_Previous_Part_Link_Env_Assoc (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6153
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1746;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1746;
            raise;
      end;
   return Property_Result;
end Env_Mappings_82;
--# end
--# property-start TaskBodyStub._env_trans_parent_83 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_83
  (Node : Bare_Task_Body_Stub
  )
   return Boolean
is
   Self : Bare_Task_Body_Stub  := Bare_Task_Body_Stub (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_83;
--# end
--# property-start TaskBodyStub._env_names_84 ada/nodes.lkt:11234
pragma Warnings (Off, "is not referenced");
 function Env_Names_84
  (Node : Bare_Task_Body_Stub
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Task_Body_Stub  := Bare_Task_Body_Stub (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1748 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1748 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1748;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6154 '<FieldAccess for env_names at nodes.lkt:11234:23>' Fld ada/nodes.lkt:11234
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BodyStub.env_names
Fld := Libadalang.Implementation.Body_Stub_P_Env_Names (Node => Self);
--# end
--# expr-done 6154
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1748;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1748;
            raise;
      end;
   return Property_Result;
end Env_Names_84;
--# end
   --
   --  Primitives for Bare_Entry_Body
   --
      procedure Entry_Body_Pre_Env_Actions
        (Self            : Bare_Entry_Body;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_85 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_86 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:11273:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_87 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11285:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_88 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Entry_Body
        (Self : Bare_Entry_Body
         ; Entry_Body_F_Entry_Name : Bare_Defining_Name
         ; Entry_Body_F_Index_Spec : Bare_Entry_Index_Spec
         ; Entry_Body_F_Params : Bare_Entry_Completion_Formal_Params
         ; Entry_Body_F_Aspects : Bare_Aspect_Spec
         ; Entry_Body_F_Barrier : Bare_Expr
         ; Entry_Body_F_Decls : Bare_Declarative_Part
         ; Entry_Body_F_Stmts : Bare_Handled_Stmts
         ; Entry_Body_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Entry_Body_F_Entry_Name := Entry_Body_F_Entry_Name;
            Self.Entry_Body_F_Index_Spec := Entry_Body_F_Index_Spec;
            Self.Entry_Body_F_Params := Entry_Body_F_Params;
            Self.Entry_Body_F_Aspects := Entry_Body_F_Aspects;
            Self.Entry_Body_F_Barrier := Entry_Body_F_Barrier;
            Self.Entry_Body_F_Decls := Entry_Body_F_Decls;
            Self.Entry_Body_F_Stmts := Entry_Body_F_Stmts;
            Self.Entry_Body_F_End_Name := Entry_Body_F_End_Name;
      end Initialize_Fields_For_Entry_Body;
   function Entry_Body_F_Entry_Name
     (Node : Bare_Entry_Body) return Bare_Defining_Name
   is
   begin
         return Node.Entry_Body_F_Entry_Name;
   end;
   function Entry_Body_F_Index_Spec
     (Node : Bare_Entry_Body) return Bare_Entry_Index_Spec
   is
   begin
         return Node.Entry_Body_F_Index_Spec;
   end;
   function Entry_Body_F_Params
     (Node : Bare_Entry_Body) return Bare_Entry_Completion_Formal_Params
   is
   begin
         return Node.Entry_Body_F_Params;
   end;
   function Entry_Body_F_Barrier
     (Node : Bare_Entry_Body) return Bare_Expr
   is
   begin
         return Node.Entry_Body_F_Barrier;
   end;
   function Entry_Body_F_Decls
     (Node : Bare_Entry_Body) return Bare_Declarative_Part
   is
   begin
         return Node.Entry_Body_F_Decls;
   end;
   function Entry_Body_F_Stmts
     (Node : Bare_Entry_Body) return Bare_Handled_Stmts
   is
   begin
         return Node.Entry_Body_F_Stmts;
   end;
   function Entry_Body_F_End_Name
     (Node : Bare_Entry_Body) return Bare_End_Name
   is
   begin
         return Node.Entry_Body_F_End_Name;
   end;
--# property-start EntryBody.defining_names ada/nodes.lkt:11259
pragma Warnings (Off, "is not referenced");
 function Entry_Body_P_Defining_Names
  (Node : Bare_Entry_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Entry_Body  := Bare_Entry_Body (Node);
     Ent : Internal_Entity_Entry_Body :=
       Internal_Entity_Entry_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_913 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_913 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_913;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6156 '<ArrayLiteral at nodes.lkt:11259:57>' Array_Lit ada/nodes.lkt:11259
--# expr-start 6155 '<FieldAccess for entry_name at nodes.lkt:11259:58>' Fld ada/nodes.lkt:11259
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Entry_Body_F_Entry_Name, Info => Ent.Info);
--# expr-done 6155
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6156
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_913;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_913;
            raise;
      end;
   return Property_Result;
end Entry_Body_P_Defining_Names;
--# end
--# property-start EntryBody.declarative_parts ada/nodes.lkt:11261
pragma Warnings (Off, "is not referenced");
 function Entry_Body_P_Declarative_Parts
  (Node : Bare_Entry_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Entry_Body  := Bare_Entry_Body (Node);
     Ent : Internal_Entity_Entry_Body :=
       Internal_Entity_Entry_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_914 with Inline_Always;
      Fld : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_914 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_914;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6158 '<ArrayLiteral at nodes.lkt:11261:63>' Array_Lit ada/nodes.lkt:11261
--# expr-start 6157 '<FieldAccess for decls at nodes.lkt:11261:64>' Fld ada/nodes.lkt:11261
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Declarative_Part (Node => Ent.Node.Entry_Body_F_Decls, Info => Ent.Info);
--# expr-done 6157
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Fld)); 
--# expr-done 6158
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_914;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_914;
            raise;
      end;
   return Property_Result;
end Entry_Body_P_Declarative_Parts;
--# end
--# property-start EntryBody.xref_entry_point ada/nodes.lkt:11263
pragma Warnings (Off, "is not referenced");
 function Entry_Body_P_Xref_Entry_Point
  (Node : Bare_Entry_Body
  )
   return Boolean
is
   Self : Bare_Entry_Body  := Bare_Entry_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Body_P_Xref_Entry_Point;
--# end
--# property-start EntryBody.xref_equation ada/nodes.lkt:11266
pragma Warnings (Off, "is not referenced");
 function Entry_Body_P_Xref_Equation
  (Node : Bare_Entry_Body
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Entry_Body  := Bare_Entry_Body (Node);
     Ent : Internal_Entity_Entry_Body :=
       Internal_Entity_Entry_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_916 with Inline_Always;
      Fld : Bare_Expr;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_916 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_916;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6168 '<LogicBinaryOp And at nodes.lkt:11267:9>' And_Pred_1 ada/nodes.lkt:11267
--# expr-start 6165 '<LogicBinaryOp And at nodes.lkt:11267:9>' And_Pred ada/nodes.lkt:11267
--# expr-start 6162 '<Bind at nodes.lkt:11267:9>' Bind_Result ada/nodes.lkt:11267
--# expr-start 6160 '<FieldAccess for expected_type_var at nodes.lkt:11267:9>' Fld_1 ada/nodes.lkt:11267
--# expr-start 6159 '<FieldAccess for barrier at nodes.lkt:11267:9>' Fld ada/nodes.lkt:11267
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Entry_Body_F_Barrier;
--# expr-done 6159
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld);
--# expr-done 6160
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 6161 '<FieldAccess for bool_type at nodes.lkt:11267:45>' Fld_2 ada/nodes.lkt:11267
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_2 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 6161
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11267:9") else null)); 
--# expr-done 6162
--# expr-start 6164 '<FieldAccess for sub_equation at nodes.lkt:11268:14>' Fld_4 ada/nodes.lkt:11268
--# expr-start 6163 '<FieldAccess for barrier at nodes.lkt:11268:14>' Fld_3 ada/nodes.lkt:11268
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Entry_Body_F_Barrier, Info => Ent.Info);
--# expr-done 6163
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 6164
And_Pred := Create_And (Bind_Result, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11267:9") else null)); 
--# expr-done 6165
--# expr-start 6167 '<FieldAccess for matches_expected_formal_type at nodes.lkt:11269:14>' Fld_6 ada/nodes.lkt:11269
--# expr-start 6166 '<FieldAccess for barrier at nodes.lkt:11269:14>' Fld_5 ada/nodes.lkt:11269
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Entry_Body_F_Barrier, Info => Ent.Info);
--# expr-done 6166
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 6167
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11267:9") else null)); 
--# expr-done 6168
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_916;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_916;
            raise;
      end;
   return Property_Result;
end Entry_Body_P_Xref_Equation;
--# end
--# property-start EntryBody._env_do_85 ada/nodes.lkt:11272
pragma Warnings (Off, "is not referenced");
 function Env_Do_85
  (Node : Bare_Entry_Body
  )
   return Boolean
is
   Self : Bare_Entry_Body  := Bare_Entry_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6169 '<FieldAccess for env_hook at nodes.lkt:11272:12>' Fld ada/nodes.lkt:11272
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6169
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_85;
--# end
--# property-start EntryBody._env_init_86 ada/nodes.lkt:11274
pragma Warnings (Off, "is not referenced");
 function Env_Init_86
  (Node : Bare_Entry_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Designated_Env
is
   Self : Bare_Entry_Body  := Bare_Entry_Body (Node);
     Ent : Internal_Entity_Entry_Body :=
       Internal_Entity_Entry_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1750 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
New_Struct : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1750 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_1750;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6173 '<New DesignatedEnv at nodes.lkt:11274:13>' New_Struct ada/nodes.lkt:11274
--# expr-start 6172 '<bind at nodes.lkt:11278:21>' Dyn_Var_Bind_Result ada/nodes.lkt:11278
--# expr-start 6170 '<FieldAccess for default_initial_env at nodes.lkt:11278:32>' Fld ada/nodes.lkt:11278
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.default_initial_env
Fld := Libadalang.Implementation.Ada_Node_P_Default_Initial_Env (Node => Self);
--# end
--# expr-done 6170
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 6171 '<FieldAccess for body_scope at nodes.lkt:11280:21>' Fld_1 ada/nodes.lkt:11280
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_scope
Fld_1 := Libadalang.Implementation.Body_Node_P_Body_Scope (Node => Ent.Node, Follow_Private => False, Env => Bound_Env, E_Info => Ent.Info);
--# end
--# expr-done 6171
Dyn_Var_Bind_Result := Fld_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 6172
Inc_Ref (Dyn_Var_Bind_Result);
New_Struct := (Direct_Env => Dyn_Var_Bind_Result, Env_Name => No_Symbol, Kind => Direct_Env); 
--# expr-done 6173
         Property_Result := New_Struct;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1750;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1750;
            raise;
      end;
   return Property_Result;
end Env_Init_86;
--# end
--# property-start EntryBody._env_mappings_87 ada/nodes.lkt:11286
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_87
  (Node : Bare_Entry_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Entry_Body  := Bare_Entry_Body (Node);
     Ent : Internal_Entity_Entry_Body :=
       Internal_Entity_Entry_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1751 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Entry_Body;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1751 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1751;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6177 '<ArrayLiteral at nodes.lkt:11286:13>' Array_Lit ada/nodes.lkt:11286
--# expr-start 6176 '<New EnvAssoc at nodes.lkt:11287:17>' New_Struct_1 ada/nodes.lkt:11287
--# expr-start 6174 '<New DesignatedEnv at nodes.lkt:11290:30>' New_Struct ada/nodes.lkt:11290
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6174
--# expr-start 6175 '<FieldAccess for name_symbol at nodes.lkt:11288:25>' Fld ada/nodes.lkt:11288
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 6175
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6176
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => New_Struct_1)); 
--# expr-done 6177
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1751;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1751;
            raise;
      end;
   return Property_Result;
end Env_Mappings_87;
--# end
--# property-start EntryBody._env_trans_parent_88 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_88
  (Node : Bare_Entry_Body
  )
   return Boolean
is
   Self : Bare_Entry_Body  := Bare_Entry_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_88;
--# end
   --
   --  Primitives for Bare_Package_Body
   --
      procedure Package_Body_Pre_Env_Actions
        (Self            : Bare_Package_Body;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_89 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_90 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:11347:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_91 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11348:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_92 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_93 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_95 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_94 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_97 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_96 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_99 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_98 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Nested_Generic_Formal_Part'Access,
               Prioritary,
               All_Cats,
               True);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_101 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_100 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Use_Clauses_In_Generic_Formal_Part'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_103 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_102 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Body_Node_P_Subunit_Decl_Env'Access,
               Prioritary,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_105 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_104 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Body_Node_P_Body_Decl_Scope'Access,
               Prioritary,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_107 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_106 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Package_Body_P_Package_Decl_Use_Clauses_Envs'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Package_Body
        (Self : Bare_Package_Body
         ; Package_Body_F_Package_Name : Bare_Defining_Name
         ; Package_Body_F_Aspects : Bare_Aspect_Spec
         ; Package_Body_F_Decls : Bare_Declarative_Part
         ; Package_Body_F_Stmts : Bare_Handled_Stmts
         ; Package_Body_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Package_Body_F_Package_Name := Package_Body_F_Package_Name;
            Self.Package_Body_F_Aspects := Package_Body_F_Aspects;
            Self.Package_Body_F_Decls := Package_Body_F_Decls;
            Self.Package_Body_F_Stmts := Package_Body_F_Stmts;
            Self.Package_Body_F_End_Name := Package_Body_F_End_Name;
      end Initialize_Fields_For_Package_Body;
   function Package_Body_F_Package_Name
     (Node : Bare_Package_Body) return Bare_Defining_Name
   is
   begin
         return Node.Package_Body_F_Package_Name;
   end;
   function Package_Body_F_Decls
     (Node : Bare_Package_Body) return Bare_Declarative_Part
   is
   begin
         return Node.Package_Body_F_Decls;
   end;
   function Package_Body_F_Stmts
     (Node : Bare_Package_Body) return Bare_Handled_Stmts
   is
   begin
         return Node.Package_Body_F_Stmts;
   end;
   function Package_Body_F_End_Name
     (Node : Bare_Package_Body) return Bare_End_Name
   is
   begin
         return Node.Package_Body_F_End_Name;
   end;
--# property-start PackageBody.defining_names ada/nodes.lkt:11318
pragma Warnings (Off, "is not referenced");
 function Package_Body_P_Defining_Names
  (Node : Bare_Package_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
     Ent : Internal_Entity_Package_Body :=
       Internal_Entity_Package_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_917 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_917 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_917;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6179 '<ArrayLiteral at nodes.lkt:11318:57>' Array_Lit ada/nodes.lkt:11318
--# expr-start 6178 '<FieldAccess for package_name at nodes.lkt:11318:58>' Fld ada/nodes.lkt:11318
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Package_Body_F_Package_Name, Info => Ent.Info);
--# expr-done 6178
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6179
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_917;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_917;
            raise;
      end;
   return Property_Result;
end Package_Body_P_Defining_Names;
--# end
--# property-start PackageBody.defining_env ada/nodes.lkt:11323
pragma Warnings (Off, "is not referenced");
 function Package_Body_P_Defining_Env
  (Node : Bare_Package_Body
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
     Ent : Internal_Entity_Package_Body :=
       Internal_Entity_Package_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_918 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_918 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_918;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6180 '<FieldAccess for children_env at nodes.lkt:11323:38>' Fld ada/nodes.lkt:11323
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6180
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_918;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_918;
            raise;
      end;
   return Property_Result;
end Package_Body_P_Defining_Env;
--# end
--# property-start PackageBody.declarative_parts ada/nodes.lkt:11325
pragma Warnings (Off, "is not referenced");
 function Package_Body_P_Declarative_Parts
  (Node : Bare_Package_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
     Ent : Internal_Entity_Package_Body :=
       Internal_Entity_Package_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_919 with Inline_Always;
      Fld : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_919 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_919;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6182 '<ArrayLiteral at nodes.lkt:11325:63>' Array_Lit ada/nodes.lkt:11325
--# expr-start 6181 '<FieldAccess for decls at nodes.lkt:11325:64>' Fld ada/nodes.lkt:11325
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Declarative_Part (Node => Ent.Node.Package_Body_F_Decls, Info => Ent.Info);
--# expr-done 6181
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Fld)); 
--# expr-done 6182
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_919;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_919;
            raise;
      end;
   return Property_Result;
end Package_Body_P_Declarative_Parts;
--# end
--# property-start PackageBody.package_decl_use_clauses_envs ada/nodes.lkt:11329
pragma Warnings (Off, "is not referenced");
 function Package_Body_P_Package_Decl_Use_Clauses_Envs
  (Node : Bare_Package_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
     Ent : Internal_Entity_Package_Body :=
       Internal_Entity_Package_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_920 with Inline_Always;
            procedure Finalizer_Scope_2784 with Inline_Always;
            procedure Finalizer_Scope_2785 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Package_Decl;
Var_Expr_173 : Internal_Entity_Private_Part;
Bound_Imprecise_Fallback : Boolean;
Fld : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Base_Package_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Package_Decl;
Fld_1 : Internal_Entity_Public_Part;
Fld_2 : Lexical_Env := Empty_Env;
Fld_3 : Internal_Entity_Private_Part;
Fld_4 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_920 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_920;
            procedure Finalizer_Scope_2784 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_2784;
            procedure Finalizer_Scope_2785 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_2785;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6185 '<bind at nodes.lkt:11331:13>' Dyn_Var_Bind_Result ada/nodes.lkt:11331
Bound_Imprecise_Fallback := False; 
--# expr-start 6184 '<Cast to BasePackageDecl at nodes.lkt:11333:13>' Cast_Result ada/nodes.lkt:11333
--# expr-start 6183 '<FieldAccess for decl_part at nodes.lkt:11333:13>' Fld ada/nodes.lkt:11333
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Ent.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 6183
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Package_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Package_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 6184
Dyn_Var_Bind_Result := Cast_Result; 
--# expr-done 6185
Var_Expr_0 := Dyn_Var_Bind_Result;
if Var_Expr_0 /= No_Entity_Base_Package_Decl then
   --# scope-start
   --# bind pd Var_Expr_0
--# expr-start 6191 '<env_group at nodes.lkt:11337:13>' Group_Env ada/nodes.lkt:11337
--# expr-start 6190 '<ArrayLiteral at nodes.lkt:11337:13>' Array_Lit ada/nodes.lkt:11337
--# expr-start 6187 '<FieldAccess for use_clauses_envs at nodes.lkt:11338:17>' Fld_2 ada/nodes.lkt:11338
--# expr-start 6186 '<FieldAccess for public_part at nodes.lkt:11338:17>' Fld_1 ada/nodes.lkt:11338
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Public_Part (Node => Var_Expr_0.Node.Base_Package_Decl_F_Public_Part, Info => Var_Expr_0.Info);
--# expr-done 6186
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DeclarativePart.use_clauses_envs
Fld_2 := Libadalang.Implementation.Declarative_Part_P_Use_Clauses_Envs (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 6187
--# expr-start 6188 '<FieldAccess for private_part at nodes.lkt:11339:17>' Fld_3 ada/nodes.lkt:11339
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Private_Part (Node => Var_Expr_0.Node.Base_Package_Decl_F_Private_Part, Info => Var_Expr_0.Info);
--# expr-done 6188
Var_Expr_173 := Fld_3;
if Var_Expr_173 /= No_Entity_Private_Part then
   --# scope-start
--# expr-start 6189 '<FieldAccess for use_clauses_envs at nodes.lkt:11339:17>' Fld_4 ada/nodes.lkt:11339
      if Var_Expr_173.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DeclarativePart.use_clauses_envs
Fld_4 := Libadalang.Implementation.Declarative_Part_P_Use_Clauses_Envs (Node => Var_Expr_173.Node, E_Info => Var_Expr_173.Info);
--# end
--# expr-done 6189
Scope_Result := Fld_4;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2785;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_Env;
end if;
      Inc_Ref (Result_Var);
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_2, 2 => Result_Var)); 
--# expr-done 6190
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 6191
Scope_Result_1 := Group_Env;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2784;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Empty_Env;
end if;
      Inc_Ref (Result_Var_1);
         Property_Result := Result_Var_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_920;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_920;
                     Finalizer_Scope_2784;
                     Finalizer_Scope_2785;
            raise;
      end;
   return Property_Result;
end Package_Body_P_Package_Decl_Use_Clauses_Envs;
--# end
--# property-start PackageBody._env_do_89 ada/nodes.lkt:11345
pragma Warnings (Off, "is not referenced");
 function Env_Do_89
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6192 '<FieldAccess for env_hook at nodes.lkt:11345:12>' Fld ada/nodes.lkt:11345
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6192
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_89;
--# end
--# property-start PackageBody._env_init_90 ada/nodes.lkt:11347
pragma Warnings (Off, "is not referenced");
 function Env_Init_90
  (Node : Bare_Package_Body
  )
   return Internal_Designated_Env
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1754 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1754 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1754;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6193 '<FieldAccess for body_initial_env at nodes.lkt:11347:25>' Fld ada/nodes.lkt:11347
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_initial_env
Fld := Libadalang.Implementation.Body_Node_P_Body_Initial_Env (Node => Self);
--# end
--# expr-done 6193
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1754;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1754;
            raise;
      end;
   return Property_Result;
end Env_Init_90;
--# end
--# property-start PackageBody._env_mappings_91 ada/nodes.lkt:11348
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_91
  (Node : Bare_Package_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
     Ent : Internal_Entity_Package_Body :=
       Internal_Entity_Package_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1755 with Inline_Always;
      Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1755 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1755;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6194 '<FieldAccess for previous_part_link_env_assoc at nodes.lkt:11348:20>' Fld ada/nodes.lkt:11348
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Body.previous_part_link_env_assoc'
Fld := Libadalang.Implementation.Dispatcher_Body_Node_P_Previous_Part_Link_Env_Assoc (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6194
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1755;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1755;
            raise;
      end;
   return Property_Result;
end Env_Mappings_91;
--# end
--# property-start PackageBody._env_trans_parent_92 ada/nodes.lkt:11351
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_92
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6195 '<FieldAccess for is_library_item at nodes.lkt:11351:35>' Fld ada/nodes.lkt:11351
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Self);
--# end
--# expr-done 6195
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_92;
--# end
--# property-start PackageBody._env_do_93 ada/nodes.lkt:11352
pragma Warnings (Off, "is not referenced");
 function Env_Do_93
  (Node : Bare_Package_Body
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1757 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1757 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1757;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6196 '<FieldAccess for populate_dependent_units at nodes.lkt:11352:12>' Fld ada/nodes.lkt:11352
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6196
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1757;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1757;
            raise;
      end;
   return Property_Result;
end Env_Do_93;
--# end
--# property-start PackageBody._ref_env_nodes_94 ada/nodes.lkt:11354
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_94
  (Node : Bare_Package_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1758 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1758 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1758;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6197 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:11354:13>' Fld ada/nodes.lkt:11354
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6197
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1758;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1758;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_94;
--# end
--# property-start PackageBody._ref_cond_95 ada/nodes.lkt:11356
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_95
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6199 '<IsA LibraryItem, Subunit at nodes.lkt:11356:18>' Is_A ada/nodes.lkt:11356
--# expr-start 6198 '<parent at nodes.lkt:11356:18>' Fld ada/nodes.lkt:11356
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6198
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6199
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_95;
--# end
--# property-start PackageBody._ref_env_nodes_96 ada/nodes.lkt:11359
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_96
  (Node : Bare_Package_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1760 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1760 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1760;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6200 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:11359:13>' Fld ada/nodes.lkt:11359
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6200
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1760;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1760;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_96;
--# end
--# property-start PackageBody._ref_cond_97 ada/nodes.lkt:11361
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_97
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6202 '<IsA LibraryItem, Subunit at nodes.lkt:11361:18>' Is_A ada/nodes.lkt:11361
--# expr-start 6201 '<parent at nodes.lkt:11361:18>' Fld ada/nodes.lkt:11361
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6201
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6202
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_97;
--# end
--# property-start PackageBody._ref_env_nodes_98 ada/nodes.lkt:11364
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_98
  (Node : Bare_Package_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1762 with Inline_Always;
            procedure Finalizer_Scope_2786 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Package_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1762 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1762;
            procedure Finalizer_Scope_2786 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2786;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6203 '<Cast to AdaNode at nodes.lkt:11364:13>' Cast_Result ada/nodes.lkt:11364
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6203
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 6204 '<ArrayLiteral at nodes.lkt:11364:41>' Array_Lit ada/nodes.lkt:11364
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6204
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2786;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1762;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1762;
                     Finalizer_Scope_2786;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_98;
--# end
--# property-start PackageBody._ref_cond_99 ada/nodes.lkt:11367
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_99
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6205 '<FieldAccess for should_ref_generic_formals at nodes.lkt:11367:18>' Fld ada/nodes.lkt:11367
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6205
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_99;
--# end
--# property-start PackageBody._ref_env_nodes_100 ada/nodes.lkt:11373
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_100
  (Node : Bare_Package_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1764 with Inline_Always;
            procedure Finalizer_Scope_2787 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Package_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1764 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1764;
            procedure Finalizer_Scope_2787 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2787;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6206 '<Cast to AdaNode at nodes.lkt:11373:13>' Cast_Result ada/nodes.lkt:11373
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6206
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v2 Var_Expr_0
--# expr-start 6207 '<ArrayLiteral at nodes.lkt:11373:41>' Array_Lit ada/nodes.lkt:11373
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6207
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2787;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1764;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1764;
                     Finalizer_Scope_2787;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_100;
--# end
--# property-start PackageBody._ref_cond_101 ada/nodes.lkt:11375
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_101
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6208 '<FieldAccess for should_ref_generic_formals at nodes.lkt:11375:18>' Fld ada/nodes.lkt:11375
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6208
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_101;
--# end
--# property-start PackageBody._ref_env_nodes_102 ada/nodes.lkt:11385
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_102
  (Node : Bare_Package_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1766 with Inline_Always;
      Cast_Expr : Bare_Package_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1766 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1766;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6210 '<ArrayLiteral at nodes.lkt:11385:13>' Array_Lit ada/nodes.lkt:11385
--# expr-start 6209 '<Cast to AdaNode at nodes.lkt:11385:14>' Cast_Result ada/nodes.lkt:11385
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6209
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 6210
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1766;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1766;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_102;
--# end
--# property-start PackageBody._ref_cond_103 ada/nodes.lkt:11388
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_103
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6211 '<FieldAccess for is_subunit at nodes.lkt:11388:18>' Fld ada/nodes.lkt:11388
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.is_subunit
Fld := Libadalang.Implementation.Body_Node_P_Is_Subunit (Node => Self);
--# end
--# expr-done 6211
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_103;
--# end
--# property-start PackageBody._ref_env_nodes_104 ada/nodes.lkt:11400
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_104
  (Node : Bare_Package_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1768 with Inline_Always;
      Cast_Expr : Bare_Package_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1768 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1768;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6213 '<ArrayLiteral at nodes.lkt:11400:13>' Array_Lit ada/nodes.lkt:11400
--# expr-start 6212 '<Cast to AdaNode at nodes.lkt:11400:14>' Cast_Result ada/nodes.lkt:11400
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6212
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 6213
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1768;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1768;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_104;
--# end
--# property-start PackageBody._ref_cond_105 ada/nodes.lkt:11403
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_105
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6215 '<Not at nodes.lkt:11403:18>' Not_Val ada/nodes.lkt:11403
--# expr-start 6214 '<FieldAccess for is_compilation_unit_root at nodes.lkt:11403:22>' Fld ada/nodes.lkt:11403
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Self);
--# end
--# expr-done 6214
Not_Val := not (Fld); 
--# expr-done 6215
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_105;
--# end
--# property-start PackageBody._ref_env_nodes_106 ada/nodes.lkt:11408
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_106
  (Node : Bare_Package_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1770 with Inline_Always;
      Cast_Expr : Bare_Package_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1770 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1770;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6217 '<ArrayLiteral at nodes.lkt:11408:13>' Array_Lit ada/nodes.lkt:11408
--# expr-start 6216 '<Cast to AdaNode at nodes.lkt:11408:14>' Cast_Result ada/nodes.lkt:11408
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6216
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 6217
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1770;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1770;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_106;
--# end
--# property-start PackageBody._ref_cond_107 ada/nodes.lkt:11410
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_107
  (Node : Bare_Package_Body
  )
   return Boolean
is
   Self : Bare_Package_Body  := Bare_Package_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
Not_Val : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6221 '<BooleanBinaryOp Or at nodes.lkt:11410:18>' If_Result ada/nodes.lkt:11410
--# expr-start 6219 '<Not at nodes.lkt:11410:18>' Not_Val ada/nodes.lkt:11410
--# expr-start 6218 '<FieldAccess for is_compilation_unit_root at nodes.lkt:11410:22>' Fld ada/nodes.lkt:11410
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Self);
--# end
--# expr-done 6218
Not_Val := not (Fld); 
--# expr-done 6219
if Not_Val then
   If_Result := True;
else
   --# expr-start 6220 '<FieldAccess for is_subunit at nodes.lkt:11410:57>' Fld_1 ada/nodes.lkt:11410
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.is_subunit
Fld_1 := Libadalang.Implementation.Body_Node_P_Is_Subunit (Node => Self);
--# end
--# expr-done 6220
   If_Result := Fld_1;
end if;
--# expr-done 6221
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_107;
--# end
function Package_Body_P_Package_Decl_Use_Clauses_Envs
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Package_Body_Range
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Lexical_Env :=
         Package_Body_P_Package_Decl_Use_Clauses_Envs (E.Node, E_Info);
   begin
         return Result;
   end;
end;
   --
   --  Primitives for Bare_Protected_Body
   --
      procedure Protected_Body_Pre_Env_Actions
        (Self            : Bare_Protected_Body;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_108 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_109 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:11440:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_110 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11441:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_111 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_112 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_114 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_113 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_116 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_115 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_118 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_117 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Nested_Generic_Formal_Part'Access,
               Prioritary,
               All_Cats,
               True);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_120 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_119 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Use_Clauses_In_Generic_Formal_Part'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_121 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Body_Node_P_Body_Decl_Scope'Access,
               Prioritary,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      if Libadalang.Implementation.Ref_Cond_123 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_122 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Body_Node_P_Subunit_Decl_Env'Access,
               Prioritary,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Protected_Body
        (Self : Bare_Protected_Body
         ; Protected_Body_F_Name : Bare_Defining_Name
         ; Protected_Body_F_Aspects : Bare_Aspect_Spec
         ; Protected_Body_F_Decls : Bare_Declarative_Part
         ; Protected_Body_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Protected_Body_F_Name := Protected_Body_F_Name;
            Self.Protected_Body_F_Aspects := Protected_Body_F_Aspects;
            Self.Protected_Body_F_Decls := Protected_Body_F_Decls;
            Self.Protected_Body_F_End_Name := Protected_Body_F_End_Name;
      end Initialize_Fields_For_Protected_Body;
   function Protected_Body_F_Name
     (Node : Bare_Protected_Body) return Bare_Defining_Name
   is
   begin
         return Node.Protected_Body_F_Name;
   end;
   function Protected_Body_F_Decls
     (Node : Bare_Protected_Body) return Bare_Declarative_Part
   is
   begin
         return Node.Protected_Body_F_Decls;
   end;
   function Protected_Body_F_End_Name
     (Node : Bare_Protected_Body) return Bare_End_Name
   is
   begin
         return Node.Protected_Body_F_End_Name;
   end;
--# property-start ProtectedBody.defining_names ada/nodes.lkt:11427
pragma Warnings (Off, "is not referenced");
 function Protected_Body_P_Defining_Names
  (Node : Bare_Protected_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
     Ent : Internal_Entity_Protected_Body :=
       Internal_Entity_Protected_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_921 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_921 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_921;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6223 '<ArrayLiteral at nodes.lkt:11427:57>' Array_Lit ada/nodes.lkt:11427
--# expr-start 6222 '<FieldAccess for name at nodes.lkt:11427:58>' Fld ada/nodes.lkt:11427
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Protected_Body_F_Name, Info => Ent.Info);
--# expr-done 6222
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6223
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_921;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_921;
            raise;
      end;
   return Property_Result;
end Protected_Body_P_Defining_Names;
--# end
--# property-start ProtectedBody.declarative_parts ada/nodes.lkt:11429
pragma Warnings (Off, "is not referenced");
 function Protected_Body_P_Declarative_Parts
  (Node : Bare_Protected_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
     Ent : Internal_Entity_Protected_Body :=
       Internal_Entity_Protected_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_922 with Inline_Always;
      Fld : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_922 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_922;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6225 '<ArrayLiteral at nodes.lkt:11429:63>' Array_Lit ada/nodes.lkt:11429
--# expr-start 6224 '<FieldAccess for decls at nodes.lkt:11429:64>' Fld ada/nodes.lkt:11429
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Declarative_Part (Node => Ent.Node.Protected_Body_F_Decls, Info => Ent.Info);
--# expr-done 6224
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Fld)); 
--# expr-done 6225
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_922;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_922;
            raise;
      end;
   return Property_Result;
end Protected_Body_P_Declarative_Parts;
--# end
--# property-start ProtectedBody.protected_type ada/nodes.lkt:11431
pragma Warnings (Off, "is not referenced");
 function Protected_Body_P_Protected_Type
  (Node : Bare_Protected_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Protected_Type_Decl
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
     Ent : Internal_Entity_Protected_Body :=
       Internal_Entity_Protected_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Protected_Type_Decl;
      Match_0 : Internal_Entity_Protected_Type_Decl;
Match_1 : Internal_Entity_Single_Protected_Decl;
Match_2 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Protected_Type_Decl;
Let_Result : Internal_Entity_Protected_Type_Decl;
Scope_Result : Internal_Entity_Protected_Type_Decl;
Cast_Result_1 : Internal_Entity_Single_Protected_Decl;
Let_Result_1 : Internal_Entity_Protected_Type_Decl;
Scope_Result_1 : Internal_Entity_Protected_Type_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Protected_Type_Decl;
Scope_Result_2 : Internal_Entity_Protected_Type_Decl;
Match_Result : Internal_Entity_Protected_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6227 '<Match at nodes.lkt:11431:55>' Match_Result ada/nodes.lkt:11431
--# expr-start 6226 '<FieldAccess for decl_part at nodes.lkt:11431:61>' Fld ada/nodes.lkt:11431
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 6226
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Protected_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Protected_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind t Match_0
Let_Result := Match_0; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Single_Protected_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Single_Protected_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind _ Match_1
Let_Result_1 := No_Entity_Protected_Type_Decl; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Incomplete_Tagged_Type_Decl | Ada_Task_Type_Decl .. Ada_Package_Renaming_Decl | Ada_Single_Task_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := raise Property_Error with "Should not happen"; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 6227
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Protected_Body_P_Protected_Type;
--# end
--# property-start ProtectedBody._env_do_108 ada/nodes.lkt:11439
pragma Warnings (Off, "is not referenced");
 function Env_Do_108
  (Node : Bare_Protected_Body
  )
   return Boolean
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6228 '<FieldAccess for env_hook at nodes.lkt:11439:12>' Fld ada/nodes.lkt:11439
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6228
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_108;
--# end
--# property-start ProtectedBody._env_init_109 ada/nodes.lkt:11440
pragma Warnings (Off, "is not referenced");
 function Env_Init_109
  (Node : Bare_Protected_Body
  )
   return Internal_Designated_Env
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1773 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1773 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1773;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6229 '<FieldAccess for body_initial_env at nodes.lkt:11440:25>' Fld ada/nodes.lkt:11440
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_initial_env
Fld := Libadalang.Implementation.Body_Node_P_Body_Initial_Env (Node => Self);
--# end
--# expr-done 6229
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1773;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1773;
            raise;
      end;
   return Property_Result;
end Env_Init_109;
--# end
--# property-start ProtectedBody._env_mappings_110 ada/nodes.lkt:11441
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_110
  (Node : Bare_Protected_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
     Ent : Internal_Entity_Protected_Body :=
       Internal_Entity_Protected_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1774 with Inline_Always;
      Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1774 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1774;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6230 '<FieldAccess for previous_part_link_env_assoc at nodes.lkt:11441:20>' Fld ada/nodes.lkt:11441
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Body.previous_part_link_env_assoc'
Fld := Libadalang.Implementation.Dispatcher_Body_Node_P_Previous_Part_Link_Env_Assoc (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6230
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1774;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1774;
            raise;
      end;
   return Property_Result;
end Env_Mappings_110;
--# end
--# property-start ProtectedBody._env_trans_parent_111 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_111
  (Node : Bare_Protected_Body
  )
   return Boolean
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_111;
--# end
--# property-start ProtectedBody._env_do_112 ada/nodes.lkt:11443
pragma Warnings (Off, "is not referenced");
 function Env_Do_112
  (Node : Bare_Protected_Body
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1776 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1776 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1776;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6231 '<FieldAccess for populate_dependent_units at nodes.lkt:11443:12>' Fld ada/nodes.lkt:11443
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6231
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1776;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1776;
            raise;
      end;
   return Property_Result;
end Env_Do_112;
--# end
--# property-start ProtectedBody._ref_env_nodes_113 ada/nodes.lkt:11445
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_113
  (Node : Bare_Protected_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1777 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1777 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1777;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6232 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:11445:13>' Fld ada/nodes.lkt:11445
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6232
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1777;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1777;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_113;
--# end
--# property-start ProtectedBody._ref_cond_114 ada/nodes.lkt:11447
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_114
  (Node : Bare_Protected_Body
  )
   return Boolean
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6234 '<IsA LibraryItem, Subunit at nodes.lkt:11447:18>' Is_A ada/nodes.lkt:11447
--# expr-start 6233 '<parent at nodes.lkt:11447:18>' Fld ada/nodes.lkt:11447
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6233
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6234
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_114;
--# end
--# property-start ProtectedBody._ref_env_nodes_115 ada/nodes.lkt:11450
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_115
  (Node : Bare_Protected_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1779 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1779 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1779;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6235 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:11450:13>' Fld ada/nodes.lkt:11450
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6235
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1779;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1779;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_115;
--# end
--# property-start ProtectedBody._ref_cond_116 ada/nodes.lkt:11452
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_116
  (Node : Bare_Protected_Body
  )
   return Boolean
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6237 '<IsA LibraryItem, Subunit at nodes.lkt:11452:18>' Is_A ada/nodes.lkt:11452
--# expr-start 6236 '<parent at nodes.lkt:11452:18>' Fld ada/nodes.lkt:11452
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6236
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6237
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_116;
--# end
--# property-start ProtectedBody._ref_env_nodes_117 ada/nodes.lkt:11455
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_117
  (Node : Bare_Protected_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1781 with Inline_Always;
            procedure Finalizer_Scope_2791 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Protected_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1781 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1781;
            procedure Finalizer_Scope_2791 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2791;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6238 '<Cast to AdaNode at nodes.lkt:11455:13>' Cast_Result ada/nodes.lkt:11455
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6238
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 6239 '<ArrayLiteral at nodes.lkt:11455:41>' Array_Lit ada/nodes.lkt:11455
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6239
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2791;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1781;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1781;
                     Finalizer_Scope_2791;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_117;
--# end
--# property-start ProtectedBody._ref_cond_118 ada/nodes.lkt:11458
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_118
  (Node : Bare_Protected_Body
  )
   return Boolean
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6240 '<FieldAccess for should_ref_generic_formals at nodes.lkt:11458:18>' Fld ada/nodes.lkt:11458
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6240
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_118;
--# end
--# property-start ProtectedBody._ref_env_nodes_119 ada/nodes.lkt:11464
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_119
  (Node : Bare_Protected_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1783 with Inline_Always;
            procedure Finalizer_Scope_2792 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Protected_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1783 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1783;
            procedure Finalizer_Scope_2792 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2792;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6241 '<Cast to AdaNode at nodes.lkt:11464:13>' Cast_Result ada/nodes.lkt:11464
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6241
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v2 Var_Expr_0
--# expr-start 6242 '<ArrayLiteral at nodes.lkt:11464:41>' Array_Lit ada/nodes.lkt:11464
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6242
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2792;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1783;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1783;
                     Finalizer_Scope_2792;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_119;
--# end
--# property-start ProtectedBody._ref_cond_120 ada/nodes.lkt:11466
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_120
  (Node : Bare_Protected_Body
  )
   return Boolean
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6243 '<FieldAccess for should_ref_generic_formals at nodes.lkt:11466:18>' Fld ada/nodes.lkt:11466
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6243
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_120;
--# end
--# property-start ProtectedBody._ref_env_nodes_121 ada/nodes.lkt:11468
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_121
  (Node : Bare_Protected_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1785 with Inline_Always;
      Cast_Expr : Bare_Protected_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1785 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1785;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6245 '<ArrayLiteral at nodes.lkt:11468:19>' Array_Lit ada/nodes.lkt:11468
--# expr-start 6244 '<Cast to AdaNode at nodes.lkt:11468:20>' Cast_Result ada/nodes.lkt:11468
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6244
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 6245
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1785;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1785;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_121;
--# end
--# property-start ProtectedBody._ref_env_nodes_122 ada/nodes.lkt:11471
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_122
  (Node : Bare_Protected_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1786 with Inline_Always;
      Cast_Expr : Bare_Protected_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1786 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1786;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6247 '<ArrayLiteral at nodes.lkt:11471:13>' Array_Lit ada/nodes.lkt:11471
--# expr-start 6246 '<Cast to AdaNode at nodes.lkt:11471:14>' Cast_Result ada/nodes.lkt:11471
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6246
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 6247
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1786;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1786;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_122;
--# end
--# property-start ProtectedBody._ref_cond_123 ada/nodes.lkt:11474
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_123
  (Node : Bare_Protected_Body
  )
   return Boolean
is
   Self : Bare_Protected_Body  := Bare_Protected_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6248 '<FieldAccess for is_subunit at nodes.lkt:11474:18>' Fld ada/nodes.lkt:11474
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.is_subunit
Fld := Libadalang.Implementation.Body_Node_P_Is_Subunit (Node => Self);
--# end
--# expr-done 6248
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_123;
--# end
   --
   --  Primitives for Bare_Task_Body
   --
      procedure Task_Body_Pre_Env_Actions
        (Self            : Bare_Task_Body;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_124 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_125 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:11521:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_126 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11522:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_127 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_128 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_130 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_129 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_132 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_131 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_134 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_133 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Nested_Generic_Formal_Part'Access,
               Prioritary,
               All_Cats,
               True);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_136 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_135 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Ada_Node_P_Use_Clauses_In_Generic_Formal_Part'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_137 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Task_Body_P_Task_Type_Decl_Scope'Access,
               Prioritary,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      if Libadalang.Implementation.Ref_Cond_139 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_138 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Body_Node_P_Subunit_Decl_Env'Access,
               Prioritary,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Task_Body
        (Self : Bare_Task_Body
         ; Task_Body_F_Name : Bare_Defining_Name
         ; Task_Body_F_Aspects : Bare_Aspect_Spec
         ; Task_Body_F_Decls : Bare_Declarative_Part
         ; Task_Body_F_Stmts : Bare_Handled_Stmts
         ; Task_Body_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Task_Body_F_Name := Task_Body_F_Name;
            Self.Task_Body_F_Aspects := Task_Body_F_Aspects;
            Self.Task_Body_F_Decls := Task_Body_F_Decls;
            Self.Task_Body_F_Stmts := Task_Body_F_Stmts;
            Self.Task_Body_F_End_Name := Task_Body_F_End_Name;
      end Initialize_Fields_For_Task_Body;
   function Task_Body_F_Name
     (Node : Bare_Task_Body) return Bare_Defining_Name
   is
   begin
         return Node.Task_Body_F_Name;
   end;
   function Task_Body_F_Decls
     (Node : Bare_Task_Body) return Bare_Declarative_Part
   is
   begin
         return Node.Task_Body_F_Decls;
   end;
   function Task_Body_F_Stmts
     (Node : Bare_Task_Body) return Bare_Handled_Stmts
   is
   begin
         return Node.Task_Body_F_Stmts;
   end;
   function Task_Body_F_End_Name
     (Node : Bare_Task_Body) return Bare_End_Name
   is
   begin
         return Node.Task_Body_F_End_Name;
   end;
--# property-start TaskBody.defining_names ada/nodes.lkt:11493
pragma Warnings (Off, "is not referenced");
 function Task_Body_P_Defining_Names
  (Node : Bare_Task_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
     Ent : Internal_Entity_Task_Body :=
       Internal_Entity_Task_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_924 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_924 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_924;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6250 '<ArrayLiteral at nodes.lkt:11493:57>' Array_Lit ada/nodes.lkt:11493
--# expr-start 6249 '<FieldAccess for name at nodes.lkt:11493:58>' Fld ada/nodes.lkt:11493
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Task_Body_F_Name, Info => Ent.Info);
--# expr-done 6249
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6250
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_924;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_924;
            raise;
      end;
   return Property_Result;
end Task_Body_P_Defining_Names;
--# end
--# property-start TaskBody.defining_env ada/nodes.lkt:11498
pragma Warnings (Off, "is not referenced");
 function Task_Body_P_Defining_Env
  (Node : Bare_Task_Body
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
     Ent : Internal_Entity_Task_Body :=
       Internal_Entity_Task_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_925 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_925 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_925;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6251 '<FieldAccess for children_env at nodes.lkt:11498:38>' Fld ada/nodes.lkt:11498
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6251
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_925;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_925;
            raise;
      end;
   return Property_Result;
end Task_Body_P_Defining_Env;
--# end
--# property-start TaskBody.declarative_parts ada/nodes.lkt:11500
pragma Warnings (Off, "is not referenced");
 function Task_Body_P_Declarative_Parts
  (Node : Bare_Task_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
     Ent : Internal_Entity_Task_Body :=
       Internal_Entity_Task_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_926 with Inline_Always;
      Fld : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_926 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_926;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6253 '<ArrayLiteral at nodes.lkt:11500:63>' Array_Lit ada/nodes.lkt:11500
--# expr-start 6252 '<FieldAccess for decls at nodes.lkt:11500:64>' Fld ada/nodes.lkt:11500
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Declarative_Part (Node => Ent.Node.Task_Body_F_Decls, Info => Ent.Info);
--# expr-done 6252
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Fld)); 
--# expr-done 6253
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_926;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_926;
            raise;
      end;
   return Property_Result;
end Task_Body_P_Declarative_Parts;
--# end
--# property-start TaskBody.task_type_decl_scope ada/nodes.lkt:11502
pragma Warnings (Off, "is not referenced");
 function Task_Body_P_Task_Type_Decl_Scope
  (Node : Bare_Task_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
     Ent : Internal_Entity_Task_Body :=
       Internal_Entity_Task_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_927 with Inline_Always;
      Local_Pp : Internal_Entity_Private_Part;
Var_Expr_174 : Internal_Entity_Task_Type_Decl;
Var_Expr_175 : Internal_Entity_Task_Def;
Fld : Internal_Entity_Task_Type_Decl;
Fld_1 : Internal_Entity_Task_Def;
Fld_2 : Internal_Entity_Private_Part;
Scope_Result : Internal_Entity_Private_Part;
Result_Var : Internal_Entity_Private_Part;
Scope_Result_1 : Internal_Entity_Private_Part;
Result_Var_1 : Internal_Entity_Private_Part;
Fld_3 : Internal_Entity_Task_Type_Decl;
Fld_4 : Lexical_Env := Empty_Env;
Fld_5 : Lexical_Env := Empty_Env;
Is_Null : Boolean;
If_Result : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_927 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_5);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_927;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6262 '<Let at nodes.lkt:11503:9>' Let_Result ada/nodes.lkt:11503
--# scope-start
--# expr-start 6254 '<FieldAccess for task_type at nodes.lkt:11503:18>' Fld ada/nodes.lkt:11503
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TaskBody.task_type
Fld := Libadalang.Implementation.Task_Body_P_Task_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6254
Var_Expr_174 := Fld;
if Var_Expr_174 /= No_Entity_Task_Type_Decl then
   --# scope-start
--# expr-start 6255 '<FieldAccess for definition at nodes.lkt:11503:18>' Fld_1 ada/nodes.lkt:11503
      if Var_Expr_174.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Task_Def (Node => Var_Expr_174.Node.Task_Type_Decl_F_Definition, Info => Var_Expr_174.Info);
--# expr-done 6255
Var_Expr_175 := Fld_1;
if Var_Expr_175 /= No_Entity_Task_Def then
   --# scope-start
--# expr-start 6256 '<FieldAccess for private_part at nodes.lkt:11503:18>' Fld_2 ada/nodes.lkt:11503
      if Var_Expr_175.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Private_Part (Node => Var_Expr_175.Node.Task_Def_F_Private_Part, Info => Var_Expr_175.Info);
--# expr-done 6256
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Private_Part;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Private_Part;
end if;
Local_Pp := Result_Var_1; 
--# bind pp Local_Pp
--# expr-start 6261 '<If at nodes.lkt:11505:9>' If_Result ada/nodes.lkt:11505
--# expr-start 6257 '<IsNull at nodes.lkt:11505:12>' Is_Null ada/nodes.lkt:11505
Is_Null := Local_Pp.Node = null; 
--# expr-done 6257
if Is_Null then
   --# expr-start 6259 '<FieldAccess for children_env at nodes.lkt:11505:28>' Fld_4 ada/nodes.lkt:11505
--# expr-start 6258 '<FieldAccess for task_type at nodes.lkt:11505:28>' Fld_3 ada/nodes.lkt:11505
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TaskBody.task_type
Fld_3 := Libadalang.Implementation.Task_Body_P_Task_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6258
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Children_Env (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# expr-done 6259
   If_Result := Fld_4;
else
   --# expr-start 6260 '<FieldAccess for children_env at nodes.lkt:11505:63>' Fld_5 ada/nodes.lkt:11505
      if Local_Pp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Children_Env (Node => Local_Pp.Node, E_Info => Local_Pp.Info);
--# expr-done 6260
   If_Result := Fld_5;
end if;
      Inc_Ref (If_Result);
--# expr-done 6261
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 6262
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_927;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_927;
            raise;
      end;
   return Property_Result;
end Task_Body_P_Task_Type_Decl_Scope;
--# end
--# property-start TaskBody.task_type ada/nodes.lkt:11508
pragma Warnings (Off, "is not referenced");
 function Task_Body_P_Task_Type
  (Node : Bare_Task_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Task_Type_Decl
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
     Ent : Internal_Entity_Task_Body :=
       Internal_Entity_Task_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Task_Type_Decl;
      Match_0 : Internal_Entity_Task_Type_Decl;
Match_1 : Internal_Entity_Single_Task_Decl;
Match_2 : Internal_Entity_Basic_Decl;
Bound_Imprecise_Fallback : Boolean;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Single_Task_Type_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Task_Type_Decl;
Let_Result : Internal_Entity_Task_Type_Decl;
Scope_Result : Internal_Entity_Task_Type_Decl;
Cast_Result_1 : Internal_Entity_Single_Task_Decl;
Cast_Result_2 : Internal_Entity_Task_Type_Decl;
Let_Result_1 : Internal_Entity_Task_Type_Decl;
Scope_Result_1 : Internal_Entity_Task_Type_Decl;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Task_Type_Decl;
Scope_Result_2 : Internal_Entity_Task_Type_Decl;
Match_Result : Internal_Entity_Task_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Task_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6266 '<bind at nodes.lkt:11509:9>' Dyn_Var_Bind_Result ada/nodes.lkt:11509
Bound_Imprecise_Fallback := False; 
--# expr-start 6265 '<Match at nodes.lkt:11511:9>' Match_Result ada/nodes.lkt:11511
--# expr-start 6263 '<FieldAccess for decl_part at nodes.lkt:11511:15>' Fld ada/nodes.lkt:11511
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Ent.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 6263
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Task_Type_Decl .. Ada_Single_Task_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Task_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind t Match_0
Let_Result := Match_0; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Single_Task_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Single_Task_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind t Match_1
--# expr-start 6264 '<FieldAccess for task_type at nodes.lkt:11513:39>' Fld_1 ada/nodes.lkt:11513
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Single_Task_Type_Decl (Node => Match_1.Node.Single_Task_Decl_F_Task_Type, Info => Match_1.Info);
--# expr-done 6264
      Cast_Result_2 := Create_Internal_Entity_Task_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Let_Result_1 := Cast_Result_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Protected_Type_Decl | Ada_Anonymous_Type_Decl .. Ada_Single_Protected_Decl | Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := raise Property_Error with "Should not happen"; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 6265
Dyn_Var_Bind_Result := Match_Result; 
--# expr-done 6266
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Task_Body_P_Task_Type;
--# end
--# property-start TaskBody._env_do_124 ada/nodes.lkt:11520
pragma Warnings (Off, "is not referenced");
 function Env_Do_124
  (Node : Bare_Task_Body
  )
   return Boolean
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6267 '<FieldAccess for env_hook at nodes.lkt:11520:12>' Fld ada/nodes.lkt:11520
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6267
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_124;
--# end
--# property-start TaskBody._env_init_125 ada/nodes.lkt:11521
pragma Warnings (Off, "is not referenced");
 function Env_Init_125
  (Node : Bare_Task_Body
  )
   return Internal_Designated_Env
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1789 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1789 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1789;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6268 '<FieldAccess for body_initial_env at nodes.lkt:11521:25>' Fld ada/nodes.lkt:11521
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.body_initial_env
Fld := Libadalang.Implementation.Body_Node_P_Body_Initial_Env (Node => Self);
--# end
--# expr-done 6268
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1789;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1789;
            raise;
      end;
   return Property_Result;
end Env_Init_125;
--# end
--# property-start TaskBody._env_mappings_126 ada/nodes.lkt:11522
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_126
  (Node : Bare_Task_Body
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
     Ent : Internal_Entity_Task_Body :=
       Internal_Entity_Task_Body'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1790 with Inline_Always;
      Fld : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1790 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1790;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6269 '<FieldAccess for previous_part_link_env_assoc at nodes.lkt:11522:20>' Fld ada/nodes.lkt:11522
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Body.previous_part_link_env_assoc'
Fld := Libadalang.Implementation.Dispatcher_Body_Node_P_Previous_Part_Link_Env_Assoc (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6269
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1790;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1790;
            raise;
      end;
   return Property_Result;
end Env_Mappings_126;
--# end
--# property-start TaskBody._env_trans_parent_127 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_127
  (Node : Bare_Task_Body
  )
   return Boolean
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_127;
--# end
--# property-start TaskBody._env_do_128 ada/nodes.lkt:11524
pragma Warnings (Off, "is not referenced");
 function Env_Do_128
  (Node : Bare_Task_Body
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1792 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1792 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1792;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6270 '<FieldAccess for populate_dependent_units at nodes.lkt:11524:12>' Fld ada/nodes.lkt:11524
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6270
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1792;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1792;
            raise;
      end;
   return Property_Result;
end Env_Do_128;
--# end
--# property-start TaskBody._ref_env_nodes_129 ada/nodes.lkt:11526
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_129
  (Node : Bare_Task_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1793 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1793 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1793;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6271 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:11526:13>' Fld ada/nodes.lkt:11526
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6271
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1793;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1793;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_129;
--# end
--# property-start TaskBody._ref_cond_130 ada/nodes.lkt:11528
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_130
  (Node : Bare_Task_Body
  )
   return Boolean
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6273 '<IsA LibraryItem, Subunit at nodes.lkt:11528:18>' Is_A ada/nodes.lkt:11528
--# expr-start 6272 '<parent at nodes.lkt:11528:18>' Fld ada/nodes.lkt:11528
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6272
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6273
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_130;
--# end
--# property-start TaskBody._ref_env_nodes_131 ada/nodes.lkt:11531
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_131
  (Node : Bare_Task_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1795 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1795 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1795;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6274 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:11531:13>' Fld ada/nodes.lkt:11531
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6274
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1795;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1795;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_131;
--# end
--# property-start TaskBody._ref_cond_132 ada/nodes.lkt:11533
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_132
  (Node : Bare_Task_Body
  )
   return Boolean
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6276 '<IsA LibraryItem, Subunit at nodes.lkt:11533:18>' Is_A ada/nodes.lkt:11533
--# expr-start 6275 '<parent at nodes.lkt:11533:18>' Fld ada/nodes.lkt:11533
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6275
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6276
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_132;
--# end
--# property-start TaskBody._ref_env_nodes_133 ada/nodes.lkt:11536
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_133
  (Node : Bare_Task_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1797 with Inline_Always;
            procedure Finalizer_Scope_2798 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Task_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1797 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1797;
            procedure Finalizer_Scope_2798 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2798;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6277 '<Cast to AdaNode at nodes.lkt:11536:13>' Cast_Result ada/nodes.lkt:11536
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6277
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 6278 '<ArrayLiteral at nodes.lkt:11536:41>' Array_Lit ada/nodes.lkt:11536
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6278
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2798;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1797;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1797;
                     Finalizer_Scope_2798;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_133;
--# end
--# property-start TaskBody._ref_cond_134 ada/nodes.lkt:11539
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_134
  (Node : Bare_Task_Body
  )
   return Boolean
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6279 '<FieldAccess for should_ref_generic_formals at nodes.lkt:11539:18>' Fld ada/nodes.lkt:11539
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6279
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_134;
--# end
--# property-start TaskBody._ref_env_nodes_135 ada/nodes.lkt:11545
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_135
  (Node : Bare_Task_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1799 with Inline_Always;
            procedure Finalizer_Scope_2799 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Cast_Expr : Bare_Task_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
Scope_Result : Bare_Ada_Node_Array_Access;
Result_Var : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1799 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1799;
            procedure Finalizer_Scope_2799 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2799;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6280 '<Cast to AdaNode at nodes.lkt:11545:13>' Cast_Result ada/nodes.lkt:11545
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6280
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v2 Var_Expr_0
--# expr-start 6281 '<ArrayLiteral at nodes.lkt:11545:41>' Array_Lit ada/nodes.lkt:11545
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Var_Expr_0)); 
--# expr-done 6281
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2799;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1799;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1799;
                     Finalizer_Scope_2799;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_135;
--# end
--# property-start TaskBody._ref_cond_136 ada/nodes.lkt:11547
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_136
  (Node : Bare_Task_Body
  )
   return Boolean
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6282 '<FieldAccess for should_ref_generic_formals at nodes.lkt:11547:18>' Fld ada/nodes.lkt:11547
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.should_ref_generic_formals
Fld := Libadalang.Implementation.Basic_Decl_P_Should_Ref_Generic_Formals (Node => Self);
--# end
--# expr-done 6282
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_136;
--# end
--# property-start TaskBody._ref_env_nodes_137 ada/nodes.lkt:11550
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_137
  (Node : Bare_Task_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1801 with Inline_Always;
      Cast_Expr : Bare_Task_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1801 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1801;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6284 '<ArrayLiteral at nodes.lkt:11550:13>' Array_Lit ada/nodes.lkt:11550
--# expr-start 6283 '<Cast to AdaNode at nodes.lkt:11550:14>' Cast_Result ada/nodes.lkt:11550
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6283
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 6284
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1801;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1801;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_137;
--# end
--# property-start TaskBody._ref_env_nodes_138 ada/nodes.lkt:11556
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_138
  (Node : Bare_Task_Body
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1802 with Inline_Always;
      Cast_Expr : Bare_Task_Body;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1802 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1802;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6286 '<ArrayLiteral at nodes.lkt:11556:13>' Array_Lit ada/nodes.lkt:11556
--# expr-start 6285 '<Cast to AdaNode at nodes.lkt:11556:14>' Cast_Result ada/nodes.lkt:11556
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6285
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 6286
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1802;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1802;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_138;
--# end
--# property-start TaskBody._ref_cond_139 ada/nodes.lkt:11559
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_139
  (Node : Bare_Task_Body
  )
   return Boolean
is
   Self : Bare_Task_Body  := Bare_Task_Body (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6287 '<FieldAccess for is_subunit at nodes.lkt:11559:18>' Fld ada/nodes.lkt:11559
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.is_subunit
Fld := Libadalang.Implementation.Body_Node_P_Is_Subunit (Node => Self);
--# end
--# expr-done 6287
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_139;
--# end
function Task_Body_P_Task_Type_Decl_Scope
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Task_Body_Range
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Lexical_Env :=
         Task_Body_P_Task_Type_Decl_Scope (E.Node, E_Info);
   begin
         return Result;
   end;
end;
   --
   --  Primitives for Bare_Entry_Index_Spec
   --
      procedure Entry_Index_Spec_Pre_Env_Actions
        (Self            : Bare_Entry_Index_Spec;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_140 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11592:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      end;
      procedure Initialize_Fields_For_Entry_Index_Spec
        (Self : Bare_Entry_Index_Spec
         ; Entry_Index_Spec_F_Id : Bare_Defining_Name
         ; Entry_Index_Spec_F_Subtype : Bare_Ada_Node
         ; Entry_Index_Spec_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Entry_Index_Spec_F_Id := Entry_Index_Spec_F_Id;
            Self.Entry_Index_Spec_F_Subtype := Entry_Index_Spec_F_Subtype;
            Self.Entry_Index_Spec_F_Aspects := Entry_Index_Spec_F_Aspects;
      end Initialize_Fields_For_Entry_Index_Spec;
   function Entry_Index_Spec_F_Id
     (Node : Bare_Entry_Index_Spec) return Bare_Defining_Name
   is
   begin
         return Node.Entry_Index_Spec_F_Id;
   end;
   function Entry_Index_Spec_F_Subtype
     (Node : Bare_Entry_Index_Spec) return Bare_Ada_Node
   is
   begin
         return Node.Entry_Index_Spec_F_Subtype;
   end;
--# property-start EntryIndexSpec.defining_names ada/nodes.lkt:11573
pragma Warnings (Off, "is not referenced");
 function Entry_Index_Spec_P_Defining_Names
  (Node : Bare_Entry_Index_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Entry_Index_Spec  := Bare_Entry_Index_Spec (Node);
     Ent : Internal_Entity_Entry_Index_Spec :=
       Internal_Entity_Entry_Index_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_929 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_929 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_929;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6289 '<ArrayLiteral at nodes.lkt:11573:57>' Array_Lit ada/nodes.lkt:11573
--# expr-start 6288 '<FieldAccess for id at nodes.lkt:11573:58>' Fld ada/nodes.lkt:11573
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Entry_Index_Spec_F_Id, Info => Ent.Info);
--# expr-done 6288
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6289
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_929;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_929;
            raise;
      end;
   return Property_Result;
end Entry_Index_Spec_P_Defining_Names;
--# end
--# property-start EntryIndexSpec.defining_env ada/nodes.lkt:11578
pragma Warnings (Off, "is not referenced");
 function Entry_Index_Spec_P_Defining_Env
  (Node : Bare_Entry_Index_Spec
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Entry_Index_Spec  := Bare_Entry_Index_Spec (Node);
     Ent : Internal_Entity_Entry_Index_Spec :=
       Internal_Entity_Entry_Index_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_930 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_930 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_930;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6291 '<FieldAccess for defining_env at nodes.lkt:11578:38>' Fld_1 ada/nodes.lkt:11578
--# expr-start 6290 '<FieldAccess for expr_type at nodes.lkt:11578:38>' Fld ada/nodes.lkt:11578
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 6290
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 6291
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_930;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_930;
            raise;
      end;
   return Property_Result;
end Entry_Index_Spec_P_Defining_Env;
--# end
--# property-start EntryIndexSpec.expr_type ada/nodes.lkt:11581
pragma Warnings (Off, "is not referenced");
 function Entry_Index_Spec_P_Expr_Type
  (Node : Bare_Entry_Index_Spec
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Entry_Index_Spec  := Bare_Entry_Index_Spec (Node);
     Ent : Internal_Entity_Entry_Index_Spec :=
       Internal_Entity_Entry_Index_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Subtype_Indication;
Match_1 : Internal_Entity;
Fld : Internal_Entity;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Expr;
Fld_2 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity;
Cast_Result_1 : Internal_Entity_Subtype_Indication;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6296 '<Match at nodes.lkt:11581:45>' Match_Result ada/nodes.lkt:11581
--# expr-start 6292 '<FieldAccess for subtype at nodes.lkt:11581:51>' Fld ada/nodes.lkt:11581
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Ent.Node.Entry_Index_Spec_F_Subtype, Info => Ent.Info);
--# expr-done 6292
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind subt Match_0
--# expr-start 6293 '<FieldAccess for designated_type at nodes.lkt:11582:41>' Fld_1 ada/nodes.lkt:11582
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Match_0.Node, Origin => Origin, E_Info => Match_0.Info);
--# end
--# expr-done 6293
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abort_Absent .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind e Match_1
--# expr-start 6295 '<FieldAccess for expression_type at nodes.lkt:11583:19>' Fld_2 ada/nodes.lkt:11583
--# expr-start 6294 '<Cast to Expr at nodes.lkt:11583:19>' Cast_Result ada/nodes.lkt:11583
Cast_Expr := Match_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Expr
   then
      Cast_Result := Create_Internal_Entity_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 6294
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_2 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 6295
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 6296
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Index_Spec_P_Expr_Type;
--# end
--# property-start EntryIndexSpec.xref_equation ada/nodes.lkt:11587
pragma Warnings (Off, "is not referenced");
 function Entry_Index_Spec_P_Xref_Equation
  (Node : Bare_Entry_Index_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Entry_Index_Spec  := Bare_Entry_Index_Spec (Node);
     Ent : Internal_Entity_Entry_Index_Spec :=
       Internal_Entity_Entry_Index_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_932 with Inline_Always;
      Fld : Internal_Entity;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_932 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_932;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6298 '<FieldAccess for sub_equation at nodes.lkt:11587:37>' Fld_1 ada/nodes.lkt:11587
--# expr-start 6297 '<FieldAccess for subtype at nodes.lkt:11587:37>' Fld ada/nodes.lkt:11587
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Ent.Node.Entry_Index_Spec_F_Subtype, Info => Ent.Info);
--# expr-done 6297
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 6298
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_932;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_932;
            raise;
      end;
   return Property_Result;
end Entry_Index_Spec_P_Xref_Equation;
--# end
--# property-start EntryIndexSpec.xref_entry_point ada/nodes.lkt:11589
pragma Warnings (Off, "is not referenced");
 function Entry_Index_Spec_P_Xref_Entry_Point
  (Node : Bare_Entry_Index_Spec
  )
   return Boolean
is
   Self : Bare_Entry_Index_Spec  := Bare_Entry_Index_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Entry_Index_Spec_P_Xref_Entry_Point;
--# end
--# property-start EntryIndexSpec._env_mappings_140 ada/nodes.lkt:11592
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_140
  (Node : Bare_Entry_Index_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Entry_Index_Spec  := Bare_Entry_Index_Spec (Node);
     Ent : Internal_Entity_Entry_Index_Spec :=
       Internal_Entity_Entry_Index_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1804 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Entry_Index_Spec;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1804 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1804;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6301 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6299 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6299
--# expr-start 6300 '<FieldAccess for name_symbol at nodes.lkt:11592:23>' Fld ada/nodes.lkt:11592
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 6300
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6301
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1804;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1804;
            raise;
      end;
   return Property_Result;
end Env_Mappings_140;
--# end
   --
   --  Primitives for Bare_Error_Decl
   --
--# property-start ErrorDecl.defining_names ada/nodes.lkt:11602
pragma Warnings (Off, "is not referenced");
 function Error_Decl_P_Defining_Names
  (Node : Bare_Error_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Error_Decl  := Bare_Error_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Defining_Name_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Error_Decl_P_Defining_Names;
--# end
--# property-start ErrorDecl.child_decl_initial_env_name ada/nodes.lkt:11606
pragma Warnings (Off, "is not referenced");
 function Error_Decl_P_Child_Decl_Initial_Env_Name
  (Node : Bare_Error_Decl
      ; Private_Part : Boolean
         := False
  )
   return Symbol_Type
is
   Self : Bare_Error_Decl  := Bare_Error_Decl (Node);
      --# bind self Self
   --# bind private_part Private_Part
   Property_Result : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Symbol;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Error_Decl_P_Child_Decl_Initial_Env_Name;
--# end
   --
   --  Primitives for Bare_Exception_Decl
   --
      procedure Exception_Decl_Pre_Env_Actions
        (Self            : Bare_Exception_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_141 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11641:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      end;
      procedure Initialize_Fields_For_Exception_Decl
        (Self : Bare_Exception_Decl
         ; Exception_Decl_F_Ids : Bare_Defining_Name_List
         ; Exception_Decl_F_Renames : Bare_Renaming_Clause
         ; Exception_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Exception_Decl_F_Ids := Exception_Decl_F_Ids;
            Self.Exception_Decl_F_Renames := Exception_Decl_F_Renames;
            Self.Exception_Decl_F_Aspects := Exception_Decl_F_Aspects;
      end Initialize_Fields_For_Exception_Decl;
   function Exception_Decl_F_Ids
     (Node : Bare_Exception_Decl) return Bare_Defining_Name_List
   is
   begin
         return Node.Exception_Decl_F_Ids;
   end;
   function Exception_Decl_F_Renames
     (Node : Bare_Exception_Decl) return Bare_Renaming_Clause
   is
   begin
         return Node.Exception_Decl_F_Renames;
   end;
--# property-start ExceptionDecl.defining_names ada/nodes.lkt:11624
pragma Warnings (Off, "is not referenced");
 function Exception_Decl_P_Defining_Names
  (Node : Bare_Exception_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Exception_Decl  := Bare_Exception_Decl (Node);
     Ent : Internal_Entity_Exception_Decl :=
       Internal_Entity_Exception_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_936 with Inline_Always;
      Fld : Internal_Entity_Defining_Name_List;
Fld_1 : Bare_Defining_Name_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Defining_Name;
Bare_Item_0 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_936 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_936;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6303 '<Map at nodes.lkt:11625:9>' Map_Result ada/nodes.lkt:11625
   --# expr-start 6302 '<FieldAccess for ids at nodes.lkt:11625:9>' Fld ada/nodes.lkt:11625
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name_List (Node => Ent.Node.Exception_Decl_F_Ids, Info => Ent.Info);
--# expr-done 6302
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Defining_Name_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind id Item_0
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_0;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6303
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_936;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_936;
            raise;
      end;
   return Property_Result;
end Exception_Decl_P_Defining_Names;
--# end
--# property-start ExceptionDecl.next_part_for_decl ada/nodes.lkt:11629
pragma Warnings (Off, "is not referenced");
 function Exception_Decl_P_Next_Part_For_Decl
  (Node : Bare_Exception_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Exception_Decl  := Bare_Exception_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Basic_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Exception_Decl_P_Next_Part_For_Decl;
--# end
--# property-start ExceptionDecl.xref_entry_point ada/nodes.lkt:11631
pragma Warnings (Off, "is not referenced");
 function Exception_Decl_P_Xref_Entry_Point
  (Node : Bare_Exception_Decl
  )
   return Boolean
is
   Self : Bare_Exception_Decl  := Bare_Exception_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Exception_Decl_P_Xref_Entry_Point;
--# end
--# property-start ExceptionDecl.xref_equation ada/nodes.lkt:11634
pragma Warnings (Off, "is not referenced");
 function Exception_Decl_P_Xref_Equation
  (Node : Bare_Exception_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Exception_Decl  := Bare_Exception_Decl (Node);
     Ent : Internal_Entity_Exception_Decl :=
       Internal_Entity_Exception_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_939 with Inline_Always;
            procedure Finalizer_Scope_2803 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Renaming_Clause;
Fld : Internal_Entity_Renaming_Clause;
Fld_1 : Internal_Entity_Name;
Fld_2 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_939 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_939;
            procedure Finalizer_Scope_2803 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2803;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6304 '<FieldAccess for renames at nodes.lkt:11635:9>' Fld ada/nodes.lkt:11635
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Exception_Decl_F_Renames, Info => Ent.Info);
--# expr-done 6304
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Renaming_Clause then
   --# scope-start
   --# bind c Var_Expr_0
--# expr-start 6306 '<FieldAccess for xref_no_overloading at nodes.lkt:11636:20>' Fld_2 ada/nodes.lkt:11636
--# expr-start 6305 '<FieldAccess for renamed_object at nodes.lkt:11636:20>' Fld_1 ada/nodes.lkt:11636
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Renaming_Clause_F_Renamed_Object, Info => Var_Expr_0.Info);
--# expr-done 6305
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_2 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_1.Info);
--# end
--# expr-done 6306
Scope_Result := Fld_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2803;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11637:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_939;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_939;
                     Finalizer_Scope_2803;
            raise;
      end;
   return Property_Result;
end Exception_Decl_P_Xref_Equation;
--# end
--# property-start ExceptionDecl._env_mappings_141 ada/nodes.lkt:11641
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_141
  (Node : Bare_Exception_Decl
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Exception_Decl  := Bare_Exception_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1805 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Cast_Expr : Bare_Exception_Decl;
Cast_Result : Bare_Ada_Node;
Fld_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1805 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1805;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6308 '<FieldAccess for env_mappings at nodes.lkt:11641:20>' Fld_1 ada/nodes.lkt:11641
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6307 '<FieldAccess for ids at nodes.lkt:11641:38>' Fld ada/nodes.lkt:11641
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Exception_Decl_F_Ids;
--# expr-done 6307
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# property-call-start AdaNode.env_mappings
Fld_1 := Libadalang.Implementation.Ada_Node_P_Env_Mappings (Node => Self, Defining_Names => Fld, Value => Cast_Result);
--# end
--# expr-done 6308
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1805;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1805;
            raise;
      end;
   return Property_Result;
end Env_Mappings_141;
--# end
   --
   --  Primitives for Bare_Exception_Handler
   --
      procedure Exception_Handler_Pre_Env_Actions
        (Self            : Bare_Exception_Handler;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_142 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_143 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11681:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      end;
      procedure Initialize_Fields_For_Exception_Handler
        (Self : Bare_Exception_Handler
         ; Exception_Handler_F_Exception_Name : Bare_Defining_Name
         ; Exception_Handler_F_Handled_Exceptions : Bare_Alternatives_List
         ; Exception_Handler_F_Stmts : Bare_Stmt_List
        ) is
      begin
            Self.Exception_Handler_F_Exception_Name := Exception_Handler_F_Exception_Name;
            Self.Exception_Handler_F_Handled_Exceptions := Exception_Handler_F_Handled_Exceptions;
            Self.Exception_Handler_F_Stmts := Exception_Handler_F_Stmts;
      end Initialize_Fields_For_Exception_Handler;
   function Exception_Handler_F_Exception_Name
     (Node : Bare_Exception_Handler) return Bare_Defining_Name
   is
   begin
         return Node.Exception_Handler_F_Exception_Name;
   end;
   function Exception_Handler_F_Handled_Exceptions
     (Node : Bare_Exception_Handler) return Bare_Alternatives_List
   is
   begin
         return Node.Exception_Handler_F_Handled_Exceptions;
   end;
   function Exception_Handler_F_Stmts
     (Node : Bare_Exception_Handler) return Bare_Stmt_List
   is
   begin
         return Node.Exception_Handler_F_Stmts;
   end;
--# property-start ExceptionHandler.defining_names ada/nodes.lkt:11658
pragma Warnings (Off, "is not referenced");
 function Exception_Handler_P_Defining_Names
  (Node : Bare_Exception_Handler
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Exception_Handler  := Bare_Exception_Handler (Node);
     Ent : Internal_Entity_Exception_Handler :=
       Internal_Entity_Exception_Handler'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_940 with Inline_Always;
            procedure Finalizer_Scope_2804 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
Scope_Result : Internal_Entity_Defining_Name_Array_Access;
Result_Var : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_940 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_940;
            procedure Finalizer_Scope_2804 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2804;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6309 '<FieldAccess for exception_name at nodes.lkt:11659:9>' Fld ada/nodes.lkt:11659
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Exception_Handler_F_Exception_Name, Info => Ent.Info);
--# expr-done 6309
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind n Var_Expr_0
--# expr-start 6310 '<ArrayLiteral at nodes.lkt:11659:39>' Array_Lit ada/nodes.lkt:11659
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Var_Expr_0)); 
--# expr-done 6310
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2804;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_940;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_940;
                     Finalizer_Scope_2804;
            raise;
      end;
   return Property_Result;
end Exception_Handler_P_Defining_Names;
--# end
--# property-start ExceptionHandler.expr_type ada/nodes.lkt:11662
pragma Warnings (Off, "is not referenced");
 function Exception_Handler_P_Expr_Type
  (Node : Bare_Exception_Handler
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Exception_Handler  := Bare_Exception_Handler (Node);
     Ent : Internal_Entity_Exception_Handler :=
       Internal_Entity_Exception_Handler'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_941 with Inline_Always;
            procedure Finalizer_Scope_2805 with Inline_Always;
      Var_Expr_176 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_941 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_941;
            procedure Finalizer_Scope_2805 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2805;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6318 '<Cast to BaseTypeDecl at nodes.lkt:11663:9>' Cast_Result ada/nodes.lkt:11663
--# expr-start 6314 '<FieldAccess for get_unit_root_decl at nodes.lkt:11663:9>' Fld ada/nodes.lkt:11663
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6313 '<ArrayLiteral at nodes.lkt:11664:13>' Array_Lit ada/nodes.lkt:11664
--# expr-start 6311 '<Symbol Ada at nodes.lkt:11664:14>' Sym ada/nodes.lkt:11664
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 6311
--# expr-start 6312 '<Symbol Exceptions at nodes.lkt:11664:22>' Sym_1 ada/nodes.lkt:11664
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exceptions); 
--# expr-done 6312
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 6313
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Ent.Node, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 6314
Var_Expr_176 := Fld;
if Var_Expr_176 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 6317 '<EnvGet at nodes.lkt:11663:9>' Env_Get_Result ada/nodes.lkt:11663
--# expr-start 6315 '<FieldAccess for children_env at nodes.lkt:11663:9>' Fld_1 ada/nodes.lkt:11663
      if Var_Expr_176 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_176);
--# expr-done 6315
--# expr-start 6316 '<Symbol Exception_Occurrence at nodes.lkt:11668:20>' Sym_2 ada/nodes.lkt:11668
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exception_Occurrence); 
--# expr-done 6316
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 6317
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_2805;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 6318
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_941;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_941;
                     Finalizer_Scope_2805;
            raise;
      end;
   return Property_Result;
end Exception_Handler_P_Expr_Type;
--# end
--# property-start ExceptionHandler.xref_equation ada/nodes.lkt:11672
pragma Warnings (Off, "is not referenced");
 function Exception_Handler_P_Xref_Equation
  (Node : Bare_Exception_Handler
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Exception_Handler  := Bare_Exception_Handler (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_942 with Inline_Always;
            procedure Finalizer_Scope_2806 with Inline_Always;
      Fld : Bare_Alternatives_List;
Item_0 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Fld_1 : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_942 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_942;
            procedure Finalizer_Scope_2806 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2806;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6323 '<LogicAll at nodes.lkt:11673:9>' Logic_Boolean_Op ada/nodes.lkt:11673
--# expr-start 6322 '<Map at nodes.lkt:11673:9>' Map_Result ada/nodes.lkt:11673
   --# expr-start 6319 '<FieldAccess for handled_exceptions at nodes.lkt:11673:9>' Fld ada/nodes.lkt:11673
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Exception_Handler_F_Handled_Exceptions;
--# expr-done 6319
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind he Item_0
      --# expr-start 6321 '<FieldAccess for sub_equation at nodes.lkt:11673:51>' Fld_1 ada/nodes.lkt:11673
--# expr-start 6320 '<as_entity at nodes.lkt:11673:51>' If_Result ada/nodes.lkt:11673
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 6320
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => If_Result.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => If_Result.Info);
--# end
--# expr-done 6321
         declare
            Item_To_Append : constant Logic_Equation := Fld_1;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2806;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6322
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11673:9") else null)); 
--# expr-done 6323
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_942;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_942;
                     Finalizer_Scope_2806;
            raise;
      end;
   return Property_Result;
end Exception_Handler_P_Xref_Equation;
--# end
--# property-start ExceptionHandler.xref_entry_point ada/nodes.lkt:11675
pragma Warnings (Off, "is not referenced");
 function Exception_Handler_P_Xref_Entry_Point
  (Node : Bare_Exception_Handler
  )
   return Boolean
is
   Self : Bare_Exception_Handler  := Bare_Exception_Handler (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Exception_Handler_P_Xref_Entry_Point;
--# end
--# property-start ExceptionHandler.is_constant_object ada/nodes.lkt:11677
pragma Warnings (Off, "is not referenced");
 function Exception_Handler_P_Is_Constant_Object
  (Node : Bare_Exception_Handler
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Exception_Handler  := Bare_Exception_Handler (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Exception_Handler_P_Is_Constant_Object;
--# end
--# property-start ExceptionHandler._env_trans_parent_142 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_142
  (Node : Bare_Exception_Handler
  )
   return Boolean
is
   Self : Bare_Exception_Handler  := Bare_Exception_Handler (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_142;
--# end
--# property-start ExceptionHandler._env_mappings_143 ada/nodes.lkt:11682
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_143
  (Node : Bare_Exception_Handler
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Exception_Handler  := Bare_Exception_Handler (Node);
     Ent : Internal_Entity_Exception_Handler :=
       Internal_Entity_Exception_Handler'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1807 with Inline_Always;
            procedure Finalizer_Scope_2807 with Inline_Always;
            procedure Finalizer_Scope_2808 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Exception_Handler;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
Map_Result : Internal_Env_Assoc_Array_Access;
Scope_Result : Internal_Env_Assoc_Array_Access;
Result_Var : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1807 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1807;
            procedure Finalizer_Scope_2807 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2807;
            procedure Finalizer_Scope_2808 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_2808;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6324 '<FieldAccess for exception_name at nodes.lkt:11682:13>' Fld ada/nodes.lkt:11682
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Exception_Handler_F_Exception_Name, Info => Ent.Info);
--# expr-done 6324
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind n Var_Expr_0
--# expr-start 6329 '<Map at nodes.lkt:11684:17>' Map_Result ada/nodes.lkt:11684
   --# expr-start 6325 '<ArrayLiteral at nodes.lkt:11684:17>' Array_Lit ada/nodes.lkt:11684
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Var_Expr_0)); 
--# expr-done 6325
      declare
         Map_Result_Vec : Internal_Env_Assoc_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Array_Lit;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_1
      --# expr-start 6328 '<New EnvAssoc at nodes.lkt:11686:21>' New_Struct_1 ada/nodes.lkt:11686
--# expr-start 6326 '<New DesignatedEnv at nodes.lkt:11689:34>' New_Struct ada/nodes.lkt:11689
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6326
--# expr-start 6327 '<FieldAccess for name_symbol at nodes.lkt:11687:29>' Fld_1 ada/nodes.lkt:11687
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Item_1.Node);
--# end
--# expr-done 6327
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld_1, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6328
         declare
            Item_To_Append : constant Internal_Env_Assoc := New_Struct_1;
         begin
               Inc_Ref (Item_To_Append);
            Internal_Env_Assoc_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2808;
         end loop;
      end;
         Map_Result := Create_Internal_Env_Assoc_Array
           (Items_Count => Natural (Internal_Env_Assoc_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Env_Assoc_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Env_Assoc_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Env_Assoc_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6329
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2807;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Env_Assoc_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1807;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1807;
                     Finalizer_Scope_2807;
                     Finalizer_Scope_2808;
            raise;
      end;
   return Property_Result;
end Env_Mappings_143;
--# end
   --
   --  Primitives for Bare_For_Loop_Var_Decl
   --
      procedure For_Loop_Var_Decl_Pre_Env_Actions
        (Self            : Bare_For_Loop_Var_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_144 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11763:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      end;
      procedure Initialize_Fields_For_For_Loop_Var_Decl
        (Self : Bare_For_Loop_Var_Decl
         ; For_Loop_Var_Decl_F_Id : Bare_Defining_Name
         ; For_Loop_Var_Decl_F_Id_Type : Bare_Type_Expr
        ) is
      begin
            Self.For_Loop_Var_Decl_F_Id := For_Loop_Var_Decl_F_Id;
            Self.For_Loop_Var_Decl_F_Id_Type := For_Loop_Var_Decl_F_Id_Type;
      end Initialize_Fields_For_For_Loop_Var_Decl;
   function For_Loop_Var_Decl_F_Id
     (Node : Bare_For_Loop_Var_Decl) return Bare_Defining_Name
   is
   begin
         return Node.For_Loop_Var_Decl_F_Id;
   end;
   function For_Loop_Var_Decl_F_Id_Type
     (Node : Bare_For_Loop_Var_Decl) return Bare_Type_Expr
   is
   begin
         return Node.For_Loop_Var_Decl_F_Id_Type;
   end;
--# property-start ForLoopVarDecl.defining_names ada/nodes.lkt:11714
pragma Warnings (Off, "is not referenced");
 function For_Loop_Var_Decl_P_Defining_Names
  (Node : Bare_For_Loop_Var_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_For_Loop_Var_Decl  := Bare_For_Loop_Var_Decl (Node);
     Ent : Internal_Entity_For_Loop_Var_Decl :=
       Internal_Entity_For_Loop_Var_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_945 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_945 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_945;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6331 '<ArrayLiteral at nodes.lkt:11714:57>' Array_Lit ada/nodes.lkt:11714
--# expr-start 6330 '<FieldAccess for id at nodes.lkt:11714:58>' Fld ada/nodes.lkt:11714
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.For_Loop_Var_Decl_F_Id, Info => Ent.Info);
--# expr-done 6330
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6331
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_945;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_945;
            raise;
      end;
   return Property_Result;
end For_Loop_Var_Decl_P_Defining_Names;
--# end
--# property-start ForLoopVarDecl.defining_env ada/nodes.lkt:11719
pragma Warnings (Off, "is not referenced");
 function For_Loop_Var_Decl_P_Defining_Env
  (Node : Bare_For_Loop_Var_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_For_Loop_Var_Decl  := Bare_For_Loop_Var_Decl (Node);
     Ent : Internal_Entity_For_Loop_Var_Decl :=
       Internal_Entity_For_Loop_Var_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_946 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_946 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_946;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6333 '<FieldAccess for defining_env at nodes.lkt:11719:38>' Fld_1 ada/nodes.lkt:11719
--# expr-start 6332 '<FieldAccess for expr_type at nodes.lkt:11719:38>' Fld ada/nodes.lkt:11719
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 6332
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 6333
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_946;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_946;
            raise;
      end;
   return Property_Result;
end For_Loop_Var_Decl_P_Defining_Env;
--# end
--# property-start ForLoopVarDecl.expr_type ada/nodes.lkt:11724
pragma Warnings (Off, "is not referenced");
 function For_Loop_Var_Decl_P_Expr_Type
  (Node : Bare_For_Loop_Var_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_For_Loop_Var_Decl  := Bare_For_Loop_Var_Decl (Node);
     Ent : Internal_Entity_For_Loop_Var_Decl :=
       Internal_Entity_For_Loop_Var_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Bare_Defining_Name;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Ada_Node;
Cast_Result_1 : Bare_For_Loop_Spec;
Fld_5 : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_6 : Internal_Entity_Type_Expr;
Fld_7 : Internal_Entity_Base_Type_Decl;
Fld_8 : Bare_Type_Expr;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_For_Loop_Var_Decl_For_Loop_Var_Decl_P_Expr_Type,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_For_Loop_Var_Decl,
                                As_Bare_For_Loop_Var_Decl => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 6347 '<If at nodes.lkt:11725:9>' If_Result_1 ada/nodes.lkt:11725
--# expr-start 6335 '<IsNull at nodes.lkt:11725:12>' Is_Null ada/nodes.lkt:11725
--# expr-start 6334 '<FieldAccess for id_type at nodes.lkt:11725:12>' Fld_8 ada/nodes.lkt:11725
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.For_Loop_Var_Decl_F_Id_Type;
--# expr-done 6334
Is_Null := Fld_8 = null; 
--# expr-done 6335
if Is_Null then
   --# expr-start 6344 '<If at nodes.lkt:11736:13>' If_Result ada/nodes.lkt:11736
--# expr-start 6338 '<FieldAccess for is_iterated_assoc_spec at nodes.lkt:11736:16>' Fld_5 ada/nodes.lkt:11736
--# expr-start 6337 '<Cast to ForLoopSpec at nodes.lkt:11736:16>' Cast_Result_1 ada/nodes.lkt:11736
--# expr-start 6336 '<parent at nodes.lkt:11736:16>' Fld_4 ada/nodes.lkt:11736
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Parent; 
--# expr-done 6336
   if Fld_4 = null
      or else Fld_4.Kind in Ada_For_Loop_Spec_Range
   then
      Cast_Result_1 := Fld_4;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 6337
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ForLoopSpec.is_iterated_assoc_spec
Fld_5 := Libadalang.Implementation.For_Loop_Spec_P_Is_Iterated_Assoc_Spec (Node => Cast_Result_1);
--# end
--# expr-done 6338
if Fld_5 then
   --# expr-start 6341 '<Cast to BaseTypeDecl at nodes.lkt:11737:18>' Cast_Result ada/nodes.lkt:11737
--# expr-start 6340 '<FieldAccess for type_val at nodes.lkt:11737:18>' Fld_1 ada/nodes.lkt:11737
--# expr-start 6339 '<FieldAccess for id at nodes.lkt:11737:18>' Fld ada/nodes.lkt:11737
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.For_Loop_Var_Decl_F_Id;
--# expr-done 6339
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_1 := Libadalang.Implementation.Expr_P_Type_Val (Node => Fld);
--# end
--# expr-done 6340
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 6341
   If_Result := Cast_Result;
else
   --# expr-start 6343 '<FieldAccess for expression_type at nodes.lkt:11738:18>' Fld_3 ada/nodes.lkt:11738
--# expr-start 6342 '<FieldAccess for id at nodes.lkt:11738:18>' Fld_2 ada/nodes.lkt:11738
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Defining_Name (Node => Ent.Node.For_Loop_Var_Decl_F_Id, Info => Ent.Info);
--# expr-done 6342
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_3 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 6343
   If_Result := Fld_3;
end if;
--# expr-done 6344
   If_Result_1 := If_Result;
else
   --# expr-start 6346 '<FieldAccess for designated_type at nodes.lkt:11741:14>' Fld_7 ada/nodes.lkt:11741
--# expr-start 6345 '<FieldAccess for id_type at nodes.lkt:11741:14>' Fld_6 ada/nodes.lkt:11741
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Type_Expr (Node => Ent.Node.For_Loop_Var_Decl_F_Id_Type, Info => Ent.Info);
--# expr-done 6345
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_7 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Fld_6.Node, Origin => Origin, E_Info => Fld_6.Info);
--# end
--# expr-done 6346
   If_Result_1 := Fld_7;
end if;
--# expr-done 6347
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end For_Loop_Var_Decl_P_Expr_Type;
--# end
--# property-start ForLoopVarDecl.is_constant_object ada/nodes.lkt:11743
pragma Warnings (Off, "is not referenced");
 function For_Loop_Var_Decl_P_Is_Constant_Object
  (Node : Bare_For_Loop_Var_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_For_Loop_Var_Decl  := Bare_For_Loop_Var_Decl (Node);
     Ent : Internal_Entity_For_Loop_Var_Decl :=
       Internal_Entity_For_Loop_Var_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Local_Loop_Spec : Internal_Entity_For_Loop_Spec;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_For_Loop_Spec;
Fld_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Name;
Fld_2 : Boolean;
Fld_3 : Internal_Entity_Iter_Type;
Is_A : Boolean;
If_Result : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6356 '<Let at nodes.lkt:11745:9>' Let_Result ada/nodes.lkt:11745
--# scope-start
--# expr-start 6349 '<Cast to ForLoopSpec at nodes.lkt:11745:25>' Cast_Result ada/nodes.lkt:11745
--# expr-start 6348 '<parent at nodes.lkt:11745:25>' Fld ada/nodes.lkt:11745
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6348
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_For_Loop_Spec_Range
   then
      Cast_Result := Create_Internal_Entity_For_Loop_Spec
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_For_Loop_Spec;
   end if;
--# expr-done 6349
Local_Loop_Spec := Cast_Result; 
--# bind loop_spec Local_Loop_Spec
--# expr-start 6355 '<If at nodes.lkt:11749:9>' If_Result ada/nodes.lkt:11749
--# expr-start 6351 '<IsA IterType.Of at nodes.lkt:11749:12>' Is_A ada/nodes.lkt:11749
--# expr-start 6350 '<FieldAccess for loop_type at nodes.lkt:11749:12>' Fld_3 ada/nodes.lkt:11749
      if Local_Loop_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Iter_Type (Node => Local_Loop_Spec.Node.For_Loop_Spec_F_Loop_Type, Info => Local_Loop_Spec.Info);
--# expr-done 6350
Is_A := Fld_3.Node /= null 
and then Fld_3.Node.Kind in Ada_Iter_Type_Of_Range; 
--# expr-done 6351
if Is_A then
   --# expr-start 6354 '<FieldAccess for is_constant at nodes.lkt:11750:14>' Fld_2 ada/nodes.lkt:11750
--# expr-start 6353 '<Cast to Name at nodes.lkt:11750:14>' Cast_Result_1 ada/nodes.lkt:11750
--# expr-start 6352 '<FieldAccess for iter_expr at nodes.lkt:11750:14>' Fld_1 ada/nodes.lkt:11750
      if Local_Loop_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity (Node => Local_Loop_Spec.Node.For_Loop_Spec_F_Iter_Expr, Info => Local_Loop_Spec.Info);
--# expr-done 6352
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 6353
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.is_constant'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Is_Constant (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 6354
   If_Result := Fld_2;
else
   If_Result := True;
end if;
--# expr-done 6355
Let_Result := If_Result; 
--# end
--# expr-done 6356
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end For_Loop_Var_Decl_P_Is_Constant_Object;
--# end
--# property-start ForLoopVarDecl.xref_equation ada/nodes.lkt:11757
pragma Warnings (Off, "is not referenced");
 function For_Loop_Var_Decl_P_Xref_Equation
  (Node : Bare_For_Loop_Var_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_For_Loop_Var_Decl  := Bare_For_Loop_Var_Decl (Node);
     Ent : Internal_Entity_For_Loop_Var_Decl :=
       Internal_Entity_For_Loop_Var_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_949 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_2 : Internal_Entity_Type_Expr;
Fld_3 : Logic_Equation;
Fld_4 : Internal_Entity_Type_Expr;
Is_Null : Boolean;
If_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_949 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_3);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_949;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6364 '<LogicBinaryOp And at nodes.lkt:11758:9>' And_Pred ada/nodes.lkt:11758
--# expr-start 6358 '<FieldAccess for sub_equation at nodes.lkt:11758:9>' Fld_1 ada/nodes.lkt:11758
--# expr-start 6357 '<FieldAccess for id at nodes.lkt:11758:9>' Fld ada/nodes.lkt:11758
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.For_Loop_Var_Decl_F_Id, Info => Ent.Info);
--# expr-done 6357
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 6358
--# expr-start 6363 '<If at nodes.lkt:11759:14>' If_Result ada/nodes.lkt:11759
--# expr-start 6360 '<IsNull at nodes.lkt:11759:17>' Is_Null ada/nodes.lkt:11759
--# expr-start 6359 '<FieldAccess for id_type at nodes.lkt:11759:17>' Fld_4 ada/nodes.lkt:11759
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Type_Expr (Node => Ent.Node.For_Loop_Var_Decl_F_Id_Type, Info => Ent.Info);
--# expr-done 6359
Is_Null := Fld_4.Node = null; 
--# expr-done 6360
if Is_Null then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11759:43") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 6362 '<FieldAccess for sub_equation at nodes.lkt:11760:14>' Fld_3 ada/nodes.lkt:11760
--# expr-start 6361 '<FieldAccess for id_type at nodes.lkt:11760:14>' Fld_2 ada/nodes.lkt:11760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Type_Expr (Node => Ent.Node.For_Loop_Var_Decl_F_Id_Type, Info => Ent.Info);
--# expr-done 6361
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 6362
   If_Result := Fld_3;
end if;
      Inc_Ref (If_Result);
--# expr-done 6363
And_Pred := Create_And (Fld_1, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:11758:9") else null)); 
--# expr-done 6364
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_949;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_949;
            raise;
      end;
   return Property_Result;
end For_Loop_Var_Decl_P_Xref_Equation;
--# end
--# property-start ForLoopVarDecl._env_mappings_144 ada/nodes.lkt:11763
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_144
  (Node : Bare_For_Loop_Var_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_For_Loop_Var_Decl  := Bare_For_Loop_Var_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1808 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_For_Loop_Var_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1808 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1808;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6367 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6365 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6365
--# expr-start 6366 '<FieldAccess for name_symbol at nodes.lkt:11763:23>' Fld ada/nodes.lkt:11763
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 6366
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6367
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1808;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1808;
            raise;
      end;
   return Property_Result;
end Env_Mappings_144;
--# end
   --
   --  Primitives for Bare_Generic_Decl
   --
      procedure Initialize_Fields_For_Generic_Decl
        (Self : Bare_Generic_Decl
         ; Generic_Decl_F_Formal_Part : Bare_Generic_Formal_Part
        ) is
      begin
            Self.Generic_Decl_F_Formal_Part := Generic_Decl_F_Formal_Part;
      end Initialize_Fields_For_Generic_Decl;
   function Generic_Decl_F_Formal_Part
     (Node : Bare_Generic_Decl) return Bare_Generic_Formal_Part
   is
   begin
         return Node.Generic_Decl_F_Formal_Part;
   end;
--# property-start '[dispatcher]GenericDecl.decl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Generic_Decl_P_Decl
  (Node : Bare_Generic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Generic_Decl  := Bare_Generic_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Generic_Decl (Self.Kind) is
               when Ada_Generic_Package_Decl =>
                  --# property-call-start GenericPackageDecl.decl
                  Property_Result := Generic_Package_Decl_P_Decl
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Decl =>
                  --# property-call-start GenericSubpDecl.decl
                  Property_Result := Generic_Subp_Decl_P_Decl
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Generic_Decl_P_Decl;
--# end
--# property-start GenericDecl.get_aspect_spec ada/nodes.lkt:11777
pragma Warnings (Off, "is not referenced");
 function Generic_Decl_P_Get_Aspect_Spec
  (Node : Bare_Generic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Aspect_Spec
is
   Self : Bare_Generic_Decl  := Bare_Generic_Decl (Node);
     Ent : Internal_Entity_Generic_Decl :=
       Internal_Entity_Generic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Aspect_Spec;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Aspect_Spec;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6369 '<FieldAccess for get_aspect_spec at nodes.lkt:11780:9>' Fld_1 ada/nodes.lkt:11780
--# expr-start 6368 '<FieldAccess for decl at nodes.lkt:11780:9>' Fld ada/nodes.lkt:11780
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericDecl.decl'
Fld := Libadalang.Implementation.Dispatcher_Generic_Decl_P_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6368
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.get_aspect_spec'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Get_Aspect_Spec (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 6369
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Decl_P_Get_Aspect_Spec;
--# end
--# property-start GenericDecl.next_part_for_decl ada/nodes.lkt:11783
pragma Warnings (Off, "is not referenced");
 function Generic_Decl_P_Next_Part_For_Decl
  (Node : Bare_Generic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Generic_Decl  := Bare_Generic_Decl (Node);
     Ent : Internal_Entity_Generic_Decl :=
       Internal_Entity_Generic_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6371 '<FieldAccess for next_part_for_decl at nodes.lkt:11784:9>' Fld_1 ada/nodes.lkt:11784
--# expr-start 6370 '<FieldAccess for decl at nodes.lkt:11784:9>' Fld ada/nodes.lkt:11784
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericDecl.decl'
Fld := Libadalang.Implementation.Dispatcher_Generic_Decl_P_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6370
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 6371
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Decl_P_Next_Part_For_Decl;
--# end
   --
   --  Primitives for Bare_Generic_Package_Decl
   --
      procedure Generic_Package_Decl_Pre_Env_Actions
        (Self            : Bare_Generic_Package_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_145 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_146 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:11815:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_147 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11821:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_148 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_149 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_151 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_150 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_153 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_152 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Generic_Package_Decl
        (Self : Bare_Generic_Package_Decl
         ; Generic_Decl_F_Formal_Part : Bare_Generic_Formal_Part
         ; Generic_Package_Decl_F_Package_Decl : Bare_Generic_Package_Internal
        ) is
      begin
            Initialize_Fields_For_Generic_Decl
              (Self, Generic_Decl_F_Formal_Part);
            Self.Generic_Package_Decl_F_Package_Decl := Generic_Package_Decl_F_Package_Decl;
      end Initialize_Fields_For_Generic_Package_Decl;
   function Generic_Package_Decl_F_Package_Decl
     (Node : Bare_Generic_Package_Decl) return Bare_Generic_Package_Internal
   is
   begin
         return Node.Generic_Package_Decl_F_Package_Decl;
   end;
--# property-start GenericPackageDecl.defining_env ada/nodes.lkt:11798
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Decl_P_Defining_Env
  (Node : Bare_Generic_Package_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Decl :=
       Internal_Entity_Generic_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_953 with Inline_Always;
      Fld : Internal_Entity_Generic_Package_Internal;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_953 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_953;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6373 '<FieldAccess for defining_env at nodes.lkt:11798:38>' Fld_1 ada/nodes.lkt:11798
--# expr-start 6372 '<FieldAccess for package_decl at nodes.lkt:11798:38>' Fld ada/nodes.lkt:11798
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Generic_Package_Internal (Node => Ent.Node.Generic_Package_Decl_F_Package_Decl, Info => Ent.Info);
--# expr-done 6372
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 6373
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_953;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_953;
            raise;
      end;
   return Property_Result;
end Generic_Package_Decl_P_Defining_Env;
--# end
--# property-start GenericPackageDecl.defining_names ada/nodes.lkt:11800
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Decl_P_Defining_Names
  (Node : Bare_Generic_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_954 with Inline_Always;
      Fld : Bare_Generic_Package_Internal;
Fld_1 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_954 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_954;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6377 '<ArrayLiteral at nodes.lkt:11801:9>' Array_Lit ada/nodes.lkt:11801
--# expr-start 6376 '<as_entity at nodes.lkt:11801:10>' If_Result ada/nodes.lkt:11801
--# expr-start 6375 '<FieldAccess for package_name at nodes.lkt:11801:10>' Fld_1 ada/nodes.lkt:11801
--# expr-start 6374 '<FieldAccess for package_decl at nodes.lkt:11801:10>' Fld ada/nodes.lkt:11801
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Generic_Package_Decl_F_Package_Decl;
--# expr-done 6374
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Base_Package_Decl_F_Package_Name;
--# expr-done 6375
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 6376
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => If_Result)); 
--# expr-done 6377
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_954;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_954;
            raise;
      end;
   return Property_Result;
end Generic_Package_Decl_P_Defining_Names;
--# end
--# property-start GenericPackageDecl.declarative_parts ada/nodes.lkt:11803
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Decl_P_Declarative_Parts
  (Node : Bare_Generic_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Decl :=
       Internal_Entity_Generic_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_955 with Inline_Always;
      Fld : Internal_Entity_Generic_Package_Internal;
Fld_1 : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_955 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_955;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6379 '<FieldAccess for declarative_parts at nodes.lkt:11804:9>' Fld_1 ada/nodes.lkt:11804
--# expr-start 6378 '<FieldAccess for package_decl at nodes.lkt:11804:9>' Fld ada/nodes.lkt:11804
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Generic_Package_Internal (Node => Ent.Node.Generic_Package_Decl_F_Package_Decl, Info => Ent.Info);
--# expr-done 6378
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.declarative_parts'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Declarative_Parts (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 6379
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_955;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_955;
            raise;
      end;
   return Property_Result;
end Generic_Package_Decl_P_Declarative_Parts;
--# end
--# property-start GenericPackageDecl.body_part ada/nodes.lkt:11809
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Decl_P_Body_Part
  (Node : Bare_Generic_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Package_Body
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Decl :=
       Internal_Entity_Generic_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Package_Body;
      Fld : Internal_Entity_Generic_Package_Internal;
Fld_1 : Internal_Entity_Package_Body;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 6381 '<FieldAccess for body_part at nodes.lkt:11809:44>' Fld_1 ada/nodes.lkt:11809
--# expr-start 6380 '<FieldAccess for package_decl at nodes.lkt:11809:44>' Fld ada/nodes.lkt:11809
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Generic_Package_Internal (Node => Ent.Node.Generic_Package_Decl_F_Package_Decl, Info => Ent.Info);
--# expr-done 6380
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasePackageDecl.body_part
Fld_1 := Libadalang.Implementation.Base_Package_Decl_P_Body_Part (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 6381
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Package_Decl_P_Body_Part;
--# end
--# property-start GenericPackageDecl.decl ada/nodes.lkt:11811
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Decl_P_Decl
  (Node : Bare_Generic_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Decl :=
       Internal_Entity_Generic_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Generic_Package_Internal;
Cast_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6382 '<FieldAccess for package_decl at nodes.lkt:11811:37>' Fld ada/nodes.lkt:11811
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Generic_Package_Internal (Node => Ent.Node.Generic_Package_Decl_F_Package_Decl, Info => Ent.Info);
--# expr-done 6382
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Package_Decl_P_Decl;
--# end
--# property-start GenericPackageDecl._env_do_145 ada/nodes.lkt:11814
pragma Warnings (Off, "is not referenced");
 function Env_Do_145
  (Node : Bare_Generic_Package_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6383 '<FieldAccess for env_hook at nodes.lkt:11814:12>' Fld ada/nodes.lkt:11814
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6383
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_145;
--# end
--# property-start GenericPackageDecl._env_init_146 ada/nodes.lkt:11819
pragma Warnings (Off, "is not referenced");
 function Env_Init_146
  (Node : Bare_Generic_Package_Decl
  )
   return Internal_Designated_Env
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1810 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1810 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1810;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6384 '<FieldAccess for child_decl_initial_env at nodes.lkt:11819:13>' Fld ada/nodes.lkt:11819
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_initial_env
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Initial_Env (Node => Self, Private_Part => True);
--# end
--# expr-done 6384
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1810;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1810;
            raise;
      end;
   return Property_Result;
end Env_Init_146;
--# end
--# property-start GenericPackageDecl._env_mappings_147 ada/nodes.lkt:11821
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_147
  (Node : Bare_Generic_Package_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Decl :=
       Internal_Entity_Generic_Package_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1811 with Inline_Always;
      Fld : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1811 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1811;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6385 '<FieldAccess for child_decl_env_assocs at nodes.lkt:11821:20>' Fld ada/nodes.lkt:11821
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_env_assocs
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Env_Assocs (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6385
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1811;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1811;
            raise;
      end;
   return Property_Result;
end Env_Mappings_147;
--# end
--# property-start GenericPackageDecl._env_trans_parent_148 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_148
  (Node : Bare_Generic_Package_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_148;
--# end
--# property-start GenericPackageDecl._env_do_149 ada/nodes.lkt:11823
pragma Warnings (Off, "is not referenced");
 function Env_Do_149
  (Node : Bare_Generic_Package_Decl
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1813 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1813 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1813;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6386 '<FieldAccess for populate_dependent_units at nodes.lkt:11823:12>' Fld ada/nodes.lkt:11823
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6386
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1813;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1813;
            raise;
      end;
   return Property_Result;
end Env_Do_149;
--# end
--# property-start GenericPackageDecl._ref_env_nodes_150 ada/nodes.lkt:11825
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_150
  (Node : Bare_Generic_Package_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1814 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1814 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1814;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6387 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:11825:13>' Fld ada/nodes.lkt:11825
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6387
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1814;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1814;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_150;
--# end
--# property-start GenericPackageDecl._ref_cond_151 ada/nodes.lkt:11827
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_151
  (Node : Bare_Generic_Package_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6389 '<IsA LibraryItem, Subunit at nodes.lkt:11827:18>' Is_A ada/nodes.lkt:11827
--# expr-start 6388 '<parent at nodes.lkt:11827:18>' Fld ada/nodes.lkt:11827
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6388
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6389
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_151;
--# end
--# property-start GenericPackageDecl._ref_env_nodes_152 ada/nodes.lkt:11830
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_152
  (Node : Bare_Generic_Package_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1816 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1816 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1816;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6390 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:11830:13>' Fld ada/nodes.lkt:11830
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6390
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1816;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1816;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_152;
--# end
--# property-start GenericPackageDecl._ref_cond_153 ada/nodes.lkt:11832
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_153
  (Node : Bare_Generic_Package_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Package_Decl  := Bare_Generic_Package_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6392 '<IsA LibraryItem, Subunit at nodes.lkt:11832:18>' Is_A ada/nodes.lkt:11832
--# expr-start 6391 '<parent at nodes.lkt:11832:18>' Fld ada/nodes.lkt:11832
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6391
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6392
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_153;
--# end
   --
   --  Primitives for Bare_Generic_Subp_Decl
   --
      procedure Generic_Subp_Decl_Pre_Env_Actions
        (Self            : Bare_Generic_Subp_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_154 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_155 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:11866:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_156 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:11872:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_157 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_158 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_160 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_159 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_162 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_161 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Generic_Subp_Decl_Post_Env_Actions
        (Self : Bare_Generic_Subp_Decl; State : in out PLE_Node_State) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_163 (Node => 
Self);
      end;
      end;
      procedure Initialize_Fields_For_Generic_Subp_Decl
        (Self : Bare_Generic_Subp_Decl
         ; Generic_Decl_F_Formal_Part : Bare_Generic_Formal_Part
         ; Generic_Subp_Decl_F_Subp_Decl : Bare_Generic_Subp_Internal
        ) is
      begin
            Initialize_Fields_For_Generic_Decl
              (Self, Generic_Decl_F_Formal_Part);
            Self.Generic_Subp_Decl_F_Subp_Decl := Generic_Subp_Decl_F_Subp_Decl;
      end Initialize_Fields_For_Generic_Subp_Decl;
   function Generic_Subp_Decl_F_Subp_Decl
     (Node : Bare_Generic_Subp_Decl) return Bare_Generic_Subp_Internal
   is
   begin
         return Node.Generic_Subp_Decl_F_Subp_Decl;
   end;
--# property-start GenericSubpDecl.defining_names ada/nodes.lkt:11845
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Decl_P_Defining_Names
  (Node : Bare_Generic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Decl :=
       Internal_Entity_Generic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_958 with Inline_Always;
      Fld : Internal_Entity_Generic_Subp_Internal;
Fld_1 : Internal_Entity_Subp_Spec;
Fld_2 : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_958 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_958;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6396 '<ArrayLiteral at nodes.lkt:11846:9>' Array_Lit ada/nodes.lkt:11846
--# expr-start 6395 '<FieldAccess for name at nodes.lkt:11846:10>' Fld_2 ada/nodes.lkt:11846
--# expr-start 6394 '<FieldAccess for subp_spec at nodes.lkt:11846:10>' Fld_1 ada/nodes.lkt:11846
--# expr-start 6393 '<FieldAccess for subp_decl at nodes.lkt:11846:10>' Fld ada/nodes.lkt:11846
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Generic_Subp_Internal (Node => Ent.Node.Generic_Subp_Decl_F_Subp_Decl, Info => Ent.Info);
--# expr-done 6393
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Subp_Spec (Node => Fld.Node.Generic_Subp_Internal_F_Subp_Spec, Info => Fld.Info);
--# expr-done 6394
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.name'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Name (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 6395
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld_2)); 
--# expr-done 6396
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_958;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_958;
            raise;
      end;
   return Property_Result;
end Generic_Subp_Decl_P_Defining_Names;
--# end
--# property-start GenericSubpDecl.body_part ada/nodes.lkt:11851
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Decl_P_Body_Part
  (Node : Bare_Generic_Subp_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Subp_Body
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Decl :=
       Internal_Entity_Generic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Base_Subp_Body;
      Fld : Internal_Entity_Body_Node;
Cast_Result : Internal_Entity_Base_Subp_Body;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 6398 '<Cast to BaseSubpBody at nodes.lkt:11852:9>' Cast_Result ada/nodes.lkt:11852
--# expr-start 6397 '<FieldAccess for body_part_for_decl at nodes.lkt:11852:9>' Fld ada/nodes.lkt:11852
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.body_part_for_decl
Fld := Libadalang.Implementation.Basic_Decl_P_Body_Part_For_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 6397
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Subp_Body
   then
      Cast_Result := Create_Internal_Entity_Base_Subp_Body
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Subp_Body;
   end if;
--# expr-done 6398
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Decl_P_Body_Part;
--# end
--# property-start GenericSubpDecl.decl ada/nodes.lkt:11854
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Decl_P_Decl
  (Node : Bare_Generic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Decl :=
       Internal_Entity_Generic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Generic_Subp_Internal;
Cast_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6399 '<FieldAccess for subp_decl at nodes.lkt:11854:37>' Fld ada/nodes.lkt:11854
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Generic_Subp_Internal (Node => Ent.Node.Generic_Subp_Decl_F_Subp_Decl, Info => Ent.Info);
--# expr-done 6399
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Decl_P_Decl;
--# end
--# property-start GenericSubpDecl.is_imported ada/nodes.lkt:11857
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Decl_P_Is_Imported
  (Node : Bare_Generic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Decl :=
       Internal_Entity_Generic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Generic_Subp_Internal;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6401 '<FieldAccess for is_imported at nodes.lkt:11857:31>' Fld_1 ada/nodes.lkt:11857
--# expr-start 6400 '<FieldAccess for subp_decl at nodes.lkt:11857:31>' Fld ada/nodes.lkt:11857
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Generic_Subp_Internal (Node => Ent.Node.Generic_Subp_Decl_F_Subp_Decl, Info => Ent.Info);
--# expr-done 6400
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_imported'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Imported (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 6401
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Decl_P_Is_Imported;
--# end
--# property-start GenericSubpDecl.next_part_for_decl ada/nodes.lkt:11860
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Decl_P_Next_Part_For_Decl
  (Node : Bare_Generic_Subp_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Decl :=
       Internal_Entity_Generic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Generic_Subp_Internal;
Fld_1 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6403 '<FieldAccess for next_part_for_decl at nodes.lkt:11861:9>' Fld_1 ada/nodes.lkt:11861
--# expr-start 6402 '<FieldAccess for subp_decl at nodes.lkt:11861:9>' Fld ada/nodes.lkt:11861
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Generic_Subp_Internal (Node => Ent.Node.Generic_Subp_Decl_F_Subp_Decl, Info => Ent.Info);
--# expr-done 6402
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.next_part_for_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Decl (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 6403
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Decl_P_Next_Part_For_Decl;
--# end
--# property-start GenericSubpDecl._env_do_154 ada/nodes.lkt:11865
pragma Warnings (Off, "is not referenced");
 function Env_Do_154
  (Node : Bare_Generic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6404 '<FieldAccess for env_hook at nodes.lkt:11865:12>' Fld ada/nodes.lkt:11865
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6404
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_154;
--# end
--# property-start GenericSubpDecl._env_init_155 ada/nodes.lkt:11870
pragma Warnings (Off, "is not referenced");
 function Env_Init_155
  (Node : Bare_Generic_Subp_Decl
  )
   return Internal_Designated_Env
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1819 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1819 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1819;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6405 '<FieldAccess for child_decl_initial_env at nodes.lkt:11870:13>' Fld ada/nodes.lkt:11870
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_initial_env
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Initial_Env (Node => Self, Private_Part => True);
--# end
--# expr-done 6405
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1819;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1819;
            raise;
      end;
   return Property_Result;
end Env_Init_155;
--# end
--# property-start GenericSubpDecl._env_mappings_156 ada/nodes.lkt:11872
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_156
  (Node : Bare_Generic_Subp_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Decl :=
       Internal_Entity_Generic_Subp_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1820 with Inline_Always;
      Fld : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1820 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1820;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6406 '<FieldAccess for child_decl_env_assocs at nodes.lkt:11872:20>' Fld ada/nodes.lkt:11872
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_env_assocs
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Env_Assocs (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6406
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1820;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1820;
            raise;
      end;
   return Property_Result;
end Env_Mappings_156;
--# end
--# property-start GenericSubpDecl._env_trans_parent_157 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_157
  (Node : Bare_Generic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_157;
--# end
--# property-start GenericSubpDecl._env_do_158 ada/nodes.lkt:11874
pragma Warnings (Off, "is not referenced");
 function Env_Do_158
  (Node : Bare_Generic_Subp_Decl
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1822 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1822 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1822;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6407 '<FieldAccess for populate_dependent_units at nodes.lkt:11874:12>' Fld ada/nodes.lkt:11874
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6407
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1822;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1822;
            raise;
      end;
   return Property_Result;
end Env_Do_158;
--# end
--# property-start GenericSubpDecl._ref_env_nodes_159 ada/nodes.lkt:11876
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_159
  (Node : Bare_Generic_Subp_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1823 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1823 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1823;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6408 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:11876:13>' Fld ada/nodes.lkt:11876
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6408
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1823;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1823;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_159;
--# end
--# property-start GenericSubpDecl._ref_cond_160 ada/nodes.lkt:11878
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_160
  (Node : Bare_Generic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6410 '<IsA LibraryItem, Subunit at nodes.lkt:11878:18>' Is_A ada/nodes.lkt:11878
--# expr-start 6409 '<parent at nodes.lkt:11878:18>' Fld ada/nodes.lkt:11878
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6409
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6410
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_160;
--# end
--# property-start GenericSubpDecl._ref_env_nodes_161 ada/nodes.lkt:11881
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_161
  (Node : Bare_Generic_Subp_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1825 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1825 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1825;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6411 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:11881:13>' Fld ada/nodes.lkt:11881
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6411
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1825;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1825;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_161;
--# end
--# property-start GenericSubpDecl._ref_cond_162 ada/nodes.lkt:11883
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_162
  (Node : Bare_Generic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6413 '<IsA LibraryItem, Subunit at nodes.lkt:11883:18>' Is_A ada/nodes.lkt:11883
--# expr-start 6412 '<parent at nodes.lkt:11883:18>' Fld ada/nodes.lkt:11883
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6412
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6413
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_162;
--# end
--# property-start GenericSubpDecl._env_do_163 ada/nodes.lkt:11886
pragma Warnings (Off, "is not referenced");
 function Env_Do_163
  (Node : Bare_Generic_Subp_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Decl  := Bare_Generic_Subp_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6414 '<FieldAccess for populate_body_unit at nodes.lkt:11886:12>' Fld ada/nodes.lkt:11886
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_body_unit
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Body_Unit (Node => Self);
--# end
--# expr-done 6414
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_163;
--# end
   --
   --  Primitives for Bare_Generic_Instantiation
   --
      procedure Generic_Instantiation_Pre_Env_Actions
        (Self            : Bare_Generic_Instantiation;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_164 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_165 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:12207:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_166 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12222:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_167 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_168 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_169 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_171 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_170 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_173 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_172 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_175 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_174 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Generic_Instantiation_P_Parent_Instantiation_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Generic_Instantiation
        (Self : Bare_Generic_Instantiation
        ) is
      begin
      Self.Bare_Generic_Instantiation_Lf_State_Instantiation_Env := Uninitialized;
      Self.Bare_Generic_Instantiation_Lf_Stg_Instantiation_Env := Empty_Env;
      Self.Bare_Generic_Instantiation_Lf_State_Actual_Expr_Decls := Uninitialized;
      Self.Bare_Generic_Instantiation_Lf_Stg_Actual_Expr_Decls := No_Bare_Anonymous_Expr_Decl_Array_Type;
      end Initialize_Fields_For_Generic_Instantiation;
--# property-start GenericInstantiation.instantiation_env ada/nodes.lkt:11894
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_F_Instantiation_Env
  (Node : Bare_Generic_Instantiation
  )
   return Lexical_Env
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_963 with Inline_Always;
      Dyn_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_963 is
            begin
                     Dec_Ref (Dyn_Env);
            end Finalizer_Scope_963;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Generic_Instantiation_Lf_State_Instantiation_Env is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Generic_Instantiation_Lf_Stg_Instantiation_Env;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Generic_Instantiation_Lf_State_Instantiation_Env,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6415 '<DynamicLexicalEnv at nodes.lkt:11895:9>' Dyn_Env ada/nodes.lkt:11895
Dyn_Env := Create_Dynamic_Lexical_Env (Self, Generic_Instantiation_P_Instantiation_Bindings'Access, Ada_Node_P_Resolve_Generic_Actual'Access, False, Self.Unit.Context.Symbols); 
--# expr-done 6415
         Property_Result := Dyn_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_963;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_963;
               Self.Bare_Generic_Instantiation_Lf_State_Instantiation_Env :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Generic_Instantiation_Lf_State_Instantiation_Env := Initialized;
      Self.Bare_Generic_Instantiation_Lf_Stg_Instantiation_Env := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Generic_Instantiation_F_Instantiation_Env;
--# end
--# property-start GenericInstantiation.instantiation_bindings ada/nodes.lkt:11901
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Instantiation_Bindings
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Inner_Env_Assoc_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_964 with Inline_Always;
      Ignored : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Inner_Env_Assoc_Array_Access;
Let_Result : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_964 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_964;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6418 '<Let at nodes.lkt:11906:9>' Let_Result ada/nodes.lkt:11906
--# scope-start
--# expr-start 6416 '<FieldAccess for nonbound_generic_decl_from_self at nodes.lkt:11906:17>' Fld ada/nodes.lkt:11906
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.nonbound_generic_decl_from_self
Fld := Libadalang.Implementation.Generic_Instantiation_P_Nonbound_Generic_Decl_From_Self (Node => Self);
--# end
--# expr-done 6416
Ignored := Fld; 
--# bind _ Ignored
--# expr-start 6417 '<FieldAccess for instantiation_bindings_internal at nodes.lkt:11908:9>' Fld_1 ada/nodes.lkt:11908
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.instantiation_bindings_internal
Fld_1 := Libadalang.Implementation.Generic_Instantiation_P_Instantiation_Bindings_Internal (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6417
Let_Result := Fld_1; Inc_Ref (Let_Result);
--# end
--# expr-done 6418
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_964;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_964;
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Instantiation_Bindings;
--# end
--# property-start GenericInstantiation.instantiation_bindings_internal ada/nodes.lkt:11912
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Instantiation_Bindings_Internal
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Inner_Env_Assoc_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_965 with Inline_Always;
            procedure Finalizer_Scope_2809 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Generic_Decl;
Fld_1 : Internal_Entity_Generic_Formal_Part;
Fld_2 : Internal_Entity_Assoc_List;
Fld_3 : Internal_Param_Match_Array_Access;
Index_1 : Integer;
Fld_4 : Internal_Entity_Defining_Name;
Fld_5 : Internal_Entity_Name;
Fld_6 : Symbol_Type;
Fld_7 : Bare_Anonymous_Expr_Decl_Array_Access;
Get_Result : Bare_Anonymous_Expr_Decl;
Fld_8 : Internal_Single_Actual;
Fld_9 : Internal_Entity_Basic_Assoc;
Fld_10 : Internal_Entity_Expr;
Fld_11 : Bare_Expr;
Cast_Result_1 : Bare_Ada_Node;
Cast_Result_2 : Bare_Ada_Node;
Fld_12 : Internal_Entity_Defining_Name;
Fld_13 : Internal_Entity_Base_Formal_Param_Decl;
Is_A : Boolean;
If_Result : Bare_Ada_Node;
Cast_Expr : Bare_Expr;
Cast_Result_3 : Bare_Ada_Node;
Fld_14 : Internal_Single_Actual;
Fld_15 : Internal_Entity_Basic_Assoc;
Fld_16 : Internal_Entity_Expr;
Is_A_1 : Boolean;
Fld_17 : Internal_Entity_Defining_Name;
Fld_18 : Internal_Entity_Base_Formal_Param_Decl;
Is_A_2 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Bare_Ada_Node;
New_Struct : Internal_Metadata;
New_Struct_1 : Internal_Inner_Env_Assoc;
Map_Result : Internal_Inner_Env_Assoc_Array_Access;
Fld_19 : Bare_Ada_Node;
Is_Null : Boolean;
Not_Val : Boolean;
Map_Result_1 : Internal_Inner_Env_Assoc_Array_Access;
Fld_20 : Boolean;
If_Result_3 : Internal_Inner_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_965 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (If_Result_3);
            end Finalizer_Scope_965;
            procedure Finalizer_Scope_2809 is
            begin
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_2809;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Generic_Instantiation_Generic_Instantiation_P_Instantiation_Bindings_Internal,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Generic_Instantiation,
                                As_Bare_Generic_Instantiation => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Inner_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 6454 '<If at nodes.lkt:11913:9>' If_Result_3 ada/nodes.lkt:11913
--# expr-start 6419 '<FieldAccess for is_any_formal at nodes.lkt:11913:12>' Fld_20 ada/nodes.lkt:11913
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.is_any_formal
Fld_20 := Libadalang.Implementation.Generic_Instantiation_P_Is_Any_Formal (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6419
if Fld_20 then
   If_Result_3 := No_Internal_Inner_Env_Assoc_Array_Type;
else
   --# expr-start 6453 '<Map at nodes.lkt:11915:13>' Map_Result_1 ada/nodes.lkt:11915
   --# expr-start 6449 '<Map at nodes.lkt:11915:13>' Map_Result ada/nodes.lkt:11915
   --# expr-start 6424 '<FieldAccess for match_param_list at nodes.lkt:11915:13>' Fld_3 ada/nodes.lkt:11915
--# expr-start 6422 '<FieldAccess for formal_part at nodes.lkt:11915:13>' Fld_1 ada/nodes.lkt:11915
--# expr-start 6421 '<Cast to GenericDecl at nodes.lkt:11915:13>' Cast_Result ada/nodes.lkt:11915
--# expr-start 6420 '<FieldAccess for nonbound_generic_decl_from_self at nodes.lkt:11915:13>' Fld ada/nodes.lkt:11915
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.nonbound_generic_decl_from_self
Fld := Libadalang.Implementation.Generic_Instantiation_P_Nonbound_Generic_Decl_From_Self (Node => Self);
--# end
--# expr-done 6420
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Generic_Decl
   then
      Cast_Result := Create_Internal_Entity_Generic_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 6421
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Generic_Formal_Part (Node => Cast_Result.Node.Generic_Decl_F_Formal_Part, Info => Cast_Result.Info);
--# expr-done 6422
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6423 '<FieldAccess for generic_inst_params at nodes.lkt:11918:31>' Fld_2 ada/nodes.lkt:11918
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.generic_inst_params'
Fld_2 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Generic_Inst_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6423
--# property-call-start BaseFormalParamHolder.match_param_list
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Param_List (Node => Fld_1.Node, Params => Fld_2, Is_Dottable_Subp => False, E_Info => Fld_1.Info);
--# end
--# expr-done 6424
      declare
         Map_Result_Vec : Internal_Inner_Env_Assoc_Vectors.Vector;
      begin
         Index_1 := 0;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_3;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_0
               --# bind i Index_1
      --# expr-start 6448 '<New InnerEnvAssoc at nodes.lkt:11921:17>' New_Struct_1 ada/nodes.lkt:11921
--# expr-start 6427 '<FieldAccess for name_symbol at nodes.lkt:11922:25>' Fld_6 ada/nodes.lkt:11922
--# expr-start 6426 '<FieldAccess for name at nodes.lkt:11922:25>' Fld_5 ada/nodes.lkt:11922
--# expr-start 6425 '<FieldAccess for formal at nodes.lkt:11922:25>' Fld_4 ada/nodes.lkt:11922
Fld_4 := Item_0.Formal;
--# expr-done 6425
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Name (Node => Fld_4.Node.Defining_Name_F_Name, Info => Fld_4.Info);
--# expr-done 6426
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_5.Node);
--# end
--# expr-done 6427
--# expr-start 6428 '<New Metadata at nodes.lkt:11936:30>' New_Struct ada/nodes.lkt:11936
New_Struct := (Dottable_Subp => False, Primitive => No_Bare_Ada_Node, Primitive_Real_Type => No_Bare_Ada_Node); 
--# expr-done 6428
--# expr-start 6447 '<If at nodes.lkt:11929:27>' If_Result_2 ada/nodes.lkt:11929
--# expr-start 6436 '<BooleanBinaryOp Or at nodes.lkt:11930:25>' If_Result_1 ada/nodes.lkt:11930
--# expr-start 6432 '<IsA BoxExpr at nodes.lkt:11930:25>' Is_A_1 ada/nodes.lkt:11930
--# expr-start 6431 '<FieldAccess for expr at nodes.lkt:11930:25>' Fld_16 ada/nodes.lkt:11930
--# expr-start 6430 '<FieldAccess for assoc at nodes.lkt:11930:25>' Fld_15 ada/nodes.lkt:11930
--# expr-start 6429 '<FieldAccess for actual at nodes.lkt:11930:25>' Fld_14 ada/nodes.lkt:11930
Fld_14 := Item_0.Actual;
--# expr-done 6429
Fld_15 := Fld_14.Assoc;
--# expr-done 6430
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_16 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_15.Node, E_Info => Fld_15.Info);
--# end
--# expr-done 6431
Is_A_1 := Fld_16.Node /= null 
and then Fld_16.Node.Kind in Ada_Box_Expr_Range; 
--# expr-done 6432
if Is_A_1 then
   If_Result_1 := True;
else
   --# expr-start 6435 '<IsA GenericFormalSubpDecl at nodes.lkt:11931:28>' Is_A_2 ada/nodes.lkt:11931
--# expr-start 6434 '<FieldAccess for formal_decl at nodes.lkt:11931:28>' Fld_18 ada/nodes.lkt:11931
--# expr-start 6433 '<FieldAccess for formal at nodes.lkt:11931:28>' Fld_17 ada/nodes.lkt:11931
Fld_17 := Item_0.Formal;
--# expr-done 6433
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_18 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_17.Node, E_Info => Fld_17.Info);
--# end
--# expr-done 6434
Is_A_2 := Fld_18.Node /= null 
and then Fld_18.Node.Kind in Ada_Generic_Formal_Subp_Decl_Range; 
--# expr-done 6435
   If_Result_1 := Is_A_2;
end if;
--# expr-done 6436
if If_Result_1 then
Cast_Expr := No_Bare_Ada_Node; 
      Cast_Result_3 := Cast_Expr;
   If_Result_2 := Cast_Result_3;
else
   --# expr-start 6446 '<If at nodes.lkt:11929:27>' If_Result ada/nodes.lkt:11929
--# expr-start 6439 '<IsA GenericFormalObjDecl at nodes.lkt:11933:26>' Is_A ada/nodes.lkt:11933
--# expr-start 6438 '<FieldAccess for formal_decl at nodes.lkt:11933:26>' Fld_13 ada/nodes.lkt:11933
--# expr-start 6437 '<FieldAccess for formal at nodes.lkt:11933:26>' Fld_12 ada/nodes.lkt:11933
Fld_12 := Item_0.Formal;
--# expr-done 6437
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_13 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_12.Node, E_Info => Fld_12.Info);
--# end
--# expr-done 6438
Is_A := Fld_13.Node /= null 
and then Fld_13.Node.Kind in Ada_Generic_Formal_Obj_Decl_Range; 
--# expr-done 6439
if Is_A then
--# expr-start 6441 '<at at nodes.lkt:11934:26>' Get_Result ada/nodes.lkt:11934
--# expr-start 6440 '<FieldAccess for actual_expr_decls at nodes.lkt:11934:26>' Fld_7 ada/nodes.lkt:11934
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.actual_expr_decls
Fld_7 := Libadalang.Implementation.Generic_Instantiation_F_Actual_Expr_Decls (Node => Ent.Node);
--# end
--# expr-done 6440
Get_Result := Get (Self, Fld_7, Index_1, True); 
--# expr-done 6441
      Cast_Result_1 := Get_Result;
   If_Result := Cast_Result_1;
else
--# expr-start 6445 '<FieldAccess for node at nodes.lkt:11935:26>' Fld_11 ada/nodes.lkt:11935
--# expr-start 6444 '<FieldAccess for expr at nodes.lkt:11935:26>' Fld_10 ada/nodes.lkt:11935
--# expr-start 6443 '<FieldAccess for assoc at nodes.lkt:11935:26>' Fld_9 ada/nodes.lkt:11935
--# expr-start 6442 '<FieldAccess for actual at nodes.lkt:11935:26>' Fld_8 ada/nodes.lkt:11935
Fld_8 := Item_0.Actual;
--# expr-done 6442
Fld_9 := Fld_8.Assoc;
--# expr-done 6443
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_9.Node, E_Info => Fld_9.Info);
--# end
--# expr-done 6444
Fld_11 := Fld_10.Node;
--# expr-done 6445
      Cast_Result_2 := Fld_11;
   If_Result := Cast_Result_2;
end if;
--# expr-done 6446
   If_Result_2 := If_Result;
end if;
--# expr-done 6447
New_Struct_1 := (Key => Fld_6, Metadata => New_Struct, Rebindings => null, Value => If_Result_2); 
--# expr-done 6448
         declare
            Item_To_Append : constant Internal_Inner_Env_Assoc := New_Struct_1;
         begin
            Internal_Inner_Env_Assoc_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2809;
               Index_1 := Index_1 + 1;
         end loop;
      end;
         Map_Result := Create_Internal_Inner_Env_Assoc_Array
           (Items_Count => Natural (Internal_Inner_Env_Assoc_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Inner_Env_Assoc_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Inner_Env_Assoc_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Inner_Env_Assoc_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6449
      declare
         Map_Result_1_Vec : Internal_Inner_Env_Assoc_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Inner_Env_Assoc_Array_Access := Map_Result;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind env_assoc Item_2
         --# expr-start 6452 '<Not at nodes.lkt:11939:36>' Not_Val ada/nodes.lkt:11939
--# expr-start 6451 '<IsNull at nodes.lkt:11939:40>' Is_Null ada/nodes.lkt:11939
--# expr-start 6450 '<FieldAccess for value at nodes.lkt:11939:40>' Fld_19 ada/nodes.lkt:11939
Fld_19 := Item_2.Value;
--# expr-done 6450
Is_Null := Fld_19 = null; 
--# expr-done 6451
Not_Val := not (Is_Null); 
--# expr-done 6452
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Inner_Env_Assoc := Item_2;
         begin
            Internal_Inner_Env_Assoc_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Inner_Env_Assoc_Array
           (Items_Count => Natural (Internal_Inner_Env_Assoc_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Inner_Env_Assoc_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Inner_Env_Assoc_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Inner_Env_Assoc_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 6453
   If_Result_3 := Map_Result_1;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 6454
         Property_Result := If_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_965;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_965;
                     Finalizer_Scope_2809;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Inner_Env_Assoc_Array_Access,
                        As_Internal_Inner_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Generic_Instantiation_P_Instantiation_Bindings_Internal;
--# end
--# property-start '[dispatcher]GenericInstantiation.generic_entity_name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Generic_Instantiation_P_Generic_Entity_Name
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Generic_Instantiation (Self.Kind) is
               when Ada_Generic_Package_Instantiation =>
                  --# property-call-start GenericPackageInstantiation.generic_entity_name
                  Property_Result := Generic_Package_Instantiation_P_Generic_Entity_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Instantiation =>
                  --# property-call-start GenericSubpInstantiation.generic_entity_name
                  Property_Result := Generic_Subp_Instantiation_P_Generic_Entity_Name
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Generic_Instantiation_P_Generic_Entity_Name;
--# end
--# property-start '[dispatcher]GenericInstantiation.generic_inst_params' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Generic_Instantiation_P_Generic_Inst_Params
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Assoc_List
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Assoc_List;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Generic_Instantiation (Self.Kind) is
               when Ada_Generic_Package_Instantiation =>
                  --# property-call-start GenericPackageInstantiation.generic_inst_params
                  Property_Result := Generic_Package_Instantiation_P_Generic_Inst_Params
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Instantiation =>
                  --# property-call-start GenericSubpInstantiation.generic_inst_params
                  Property_Result := Generic_Subp_Instantiation_P_Generic_Inst_Params
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Generic_Instantiation_P_Generic_Inst_Params;
--# end
--# property-start GenericInstantiation.is_any_formal ada/nodes.lkt:11950
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Is_Any_Formal
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Basic_Assoc;
Fld : Internal_Entity_Assoc_List;
Fld_1 : Bare_Assoc_List;
Fld_2 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_3 : Internal_Entity_Expr;
Is_A : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6455 '<FieldAccess for generic_inst_params at nodes.lkt:11951:9>' Fld ada/nodes.lkt:11951
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.generic_inst_params'
Fld := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Generic_Inst_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6455
Fld_1 := Fld.Node;
Get_Result := Get (Self, Fld_1, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Get_Result); 
   If_Result := As_Entity;
end if;
Var_Expr_0 := If_Result;
if Var_Expr_0 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 6457 '<IsA BoxExpr at nodes.lkt:11951:51>' Is_A ada/nodes.lkt:11951
--# expr-start 6456 '<FieldAccess for expr at nodes.lkt:11951:51>' Fld_3 ada/nodes.lkt:11951
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 6456
Is_A := Fld_3.Node /= null 
and then Fld_3.Node.Kind in Ada_Box_Expr_Range; 
--# expr-done 6457
Scope_Result := Is_A;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Is_Any_Formal;
--# end
--# property-start GenericInstantiation.nonbound_generic_decl_from_entity ada/nodes.lkt:11958
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Nonbound_Generic_Decl_From_Entity
  (Node : Bare_Generic_Instantiation
      ; Follow_Renaming : Boolean
         := True
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind follow_renaming Follow_Renaming
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_969 with Inline_Always;
      Var_Expr_1 : Internal_Entity;
Match_0 : Internal_Entity_Body_Node;
Match_1 : Internal_Entity_Generic_Renaming_Decl;
Match_2 : Internal_Entity_Basic_Decl;
Match_3 : Internal_Entity;
Fld : Internal_Entity_Name;
Cast_Expr : Bare_Generic_Instantiation;
Cast_Result : Bare_Ada_Node;
Fld_1 : Internal_Entity_Array_Access;
Fld_2 : Boolean;
Find_Result : Internal_Entity;
Bound_Imprecise_Fallback : Boolean;
Fld_3 : Internal_Entity_Basic_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Generic_Decl;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Cast_Expr_1 : Internal_Entity_Generic_Renaming_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
If_Result : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity;
Cast_Result_3 : Internal_Entity_Body_Node;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity_Generic_Renaming_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Let_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Cast_Result_6 : Internal_Entity;
Let_Result_3 : Internal_Entity_Basic_Decl;
Scope_Result_3 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Scope_Result_4 : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_969 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_969;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6461 '<Find at nodes.lkt:11961:9>' Find_Result ada/nodes.lkt:11961
   --# expr-start 6459 '<FieldAccess for all_env_elements_internal at nodes.lkt:11961:9>' Fld_1 ada/nodes.lkt:11961
--# expr-start 6458 '<FieldAccess for generic_entity_name at nodes.lkt:11961:9>' Fld ada/nodes.lkt:11961
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.generic_entity_name'
Fld := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Generic_Entity_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6458
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# property-call-start Name.all_env_elements_internal
Fld_1 := Libadalang.Implementation.Name_P_All_Env_Elements_Internal (Node => Fld.Node, Seq => True, Seq_From => Cast_Result, Categories => (Inherited_Primitives => False, Nocat => True), E_Info => Fld.Info);
--# end
--# expr-done 6459
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
      --# expr-start 6460 '<FieldAccess for has_visibility at nodes.lkt:11966:22>' Fld_2 ada/nodes.lkt:11966
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_2 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 6460
      if Fld_2 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Fld_2;
         end loop;
      end;
--# expr-done 6461
Var_Expr_1 := Find_Result;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 6466 '<Match at nodes.lkt:11969:13>' Match_Result ada/nodes.lkt:11969
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Accept_Stmt_Body .. Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Body_Node
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_3; 
--# bind b Match_0
--# expr-start 6463 '<bind at nodes.lkt:11972:25>' Dyn_Var_Bind_Result ada/nodes.lkt:11972
Bound_Imprecise_Fallback := False; 
--# expr-start 6462 '<FieldAccess for decl_part at nodes.lkt:11974:25>' Fld_3 ada/nodes.lkt:11974
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_3 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Match_0.Node, Imprecise_Fallback => Bound_Imprecise_Fallback, E_Info => Match_0.Info);
--# end
--# expr-done 6462
Dyn_Var_Bind_Result := Fld_3; 
--# expr-done 6463
Let_Result := Dyn_Var_Bind_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Generic_Package_Renaming_Decl .. Ada_Generic_Subp_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Generic_Renaming_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_4; 
--# bind rd Match_1
--# expr-start 6465 '<If at nodes.lkt:11977:21>' If_Result ada/nodes.lkt:11977
if Follow_Renaming then
--# expr-start 6464 '<FieldAccess for resolve at nodes.lkt:11977:45>' Fld_4 ada/nodes.lkt:11977
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericRenamingDecl.resolve
Fld_4 := Libadalang.Implementation.Generic_Renaming_Decl_P_Resolve (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 6464
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   If_Result := Cast_Result_1;
else
Cast_Expr_1 := Match_1; 
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   If_Result := Cast_Result_2;
end if;
--# expr-done 6465
Let_Result_1 := If_Result; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Synthetic_Subp_Decl | Ada_Entry_Index_Spec .. Ada_Generic_Subp_Instantiation | Ada_Label_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_5; 
--# bind d Match_2
Let_Result_2 := Match_2; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_6; 
--# bind _ Match_3
Let_Result_3 := No_Entity_Basic_Decl; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 6466
Scope_Result_4 := Match_Result;
   --# end
   Result_Var := Scope_Result_4;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      Finalizer_Scope_969;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_969;
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Nonbound_Generic_Decl_From_Entity;
--# end
--# property-start GenericInstantiation.nonbound_generic_decl_from_self ada/nodes.lkt:11989
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Nonbound_Generic_Decl_From_Self
  (Node : Bare_Generic_Instantiation
      ; Follow_Renaming : Boolean
         := True
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   --# bind follow_renaming Follow_Renaming
   Property_Result : Internal_Entity_Basic_Decl;
      As_Entity : Internal_Entity_Generic_Instantiation;
Is_Null : Boolean;
If_Result : Internal_Entity_Generic_Instantiation;
Fld : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6468 '<FieldAccess for nonbound_generic_decl_from_entity at nodes.lkt:11992:9>' Fld ada/nodes.lkt:11992
--# expr-start 6467 '<as_bare_entity at nodes.lkt:11992:9>' If_Result ada/nodes.lkt:11992
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Generic_Instantiation;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 6467
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.nonbound_generic_decl_from_entity
Fld := Libadalang.Implementation.Generic_Instantiation_P_Nonbound_Generic_Decl_From_Entity (Node => If_Result.Node, Follow_Renaming => Follow_Renaming, E_Info => If_Result.Info);
--# end
--# expr-done 6468
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Nonbound_Generic_Decl_From_Self;
--# end
--# property-start '[dispatcher]GenericInstantiation.designated_generic_decl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Generic_Instantiation_P_Designated_Generic_Decl
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Generic_Decl
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Generic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Generic_Instantiation (Self.Kind) is
               when Ada_Generic_Package_Instantiation =>
                  --# property-call-start GenericPackageInstantiation.designated_generic_decl
                  Property_Result := Generic_Package_Instantiation_P_Designated_Generic_Decl
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Instantiation =>
                  --# property-call-start GenericSubpInstantiation.designated_generic_decl
                  Property_Result := Generic_Subp_Instantiation_P_Designated_Generic_Decl
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Generic_Instantiation_P_Designated_Generic_Decl;
--# end
--# property-start GenericInstantiation.designated_bare_generic_decl ada/nodes.lkt:12003
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Designated_Bare_Generic_Decl
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Local_Decl : Internal_Entity_Generic_Decl;
Fld : Internal_Entity_Generic_Decl;
Fld_1 : Bare_Generic_Decl;
Fld_2 : Internal_Entity_Info;
Fld_3 : Internal_Metadata;
Fld_4 : Internal_Entity_Info;
Fld_5 : Env_Rebindings;
Fld_6 : Env_Rebindings;
Fld_7 : Internal_Entity_Info;
Fld_8 : Boolean;
New_Struct : Internal_Entity_Info;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6481 '<Let at nodes.lkt:12004:9>' Let_Result ada/nodes.lkt:12004
--# scope-start
--# expr-start 6469 '<FieldAccess for designated_generic_decl at nodes.lkt:12004:20>' Fld ada/nodes.lkt:12004
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.designated_generic_decl'
Fld := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Designated_Generic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6469
Local_Decl := Fld; 
--# bind decl Local_Decl
--# expr-start 6480 '<Cast to BasicDecl at nodes.lkt:12006:9>' Cast_Result_1 ada/nodes.lkt:12006
--# expr-start 6479 '<New AdaNode.entity at nodes.lkt:12006:9>' New_Struct_1 ada/nodes.lkt:12006
--# expr-start 6477 '<New EntityInfo at nodes.lkt:12008:18>' New_Struct ada/nodes.lkt:12008
--# expr-start 6471 '<FieldAccess for from_rebound at nodes.lkt:12011:30>' Fld_8 ada/nodes.lkt:12011
--# expr-start 6470 '<FieldAccess for info at nodes.lkt:12011:30>' Fld_7 ada/nodes.lkt:12011
Fld_7 := Local_Decl.Info;
--# expr-done 6470
Fld_8 := Fld_7.From_Rebound;
--# expr-done 6471
--# expr-start 6473 '<FieldAccess for md at nodes.lkt:12009:20>' Fld_3 ada/nodes.lkt:12009
--# expr-start 6472 '<FieldAccess for info at nodes.lkt:12009:20>' Fld_2 ada/nodes.lkt:12009
Fld_2 := Local_Decl.Info;
--# expr-done 6472
Fld_3 := Fld_2.Md;
--# expr-done 6473
--# expr-start 6476 '<FieldAccess for get_parent at nodes.lkt:12010:28>' Fld_6 ada/nodes.lkt:12010
--# expr-start 6475 '<FieldAccess for rebindings at nodes.lkt:12010:28>' Fld_5 ada/nodes.lkt:12010
--# expr-start 6474 '<FieldAccess for info at nodes.lkt:12010:28>' Fld_4 ada/nodes.lkt:12010
Fld_4 := Local_Decl.Info;
--# expr-done 6474
Fld_5 := Fld_4.Rebindings;
--# expr-done 6475
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Fld_5.Parent;
--# expr-done 6476
New_Struct := (From_Rebound => Fld_8, Md => Fld_3, Rebindings => Fld_6); 
--# expr-done 6477
--# expr-start 6478 '<FieldAccess for node at nodes.lkt:12007:18>' Fld_1 ada/nodes.lkt:12007
Fld_1 := Local_Decl.Node;
--# expr-done 6478
      Cast_Result := Fld_1;
New_Struct_1 := (Info => New_Struct, Node => Cast_Result); 
--# expr-done 6479
   if New_Struct_1.Node = null
      or else New_Struct_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => New_Struct_1.Node,
         Info => New_Struct_1.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 6480
Let_Result := Cast_Result_1; 
--# end
--# expr-done 6481
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Designated_Bare_Generic_Decl;
--# end
--# property-start GenericInstantiation.actual_expr_decls ada/nodes.lkt:12018
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_F_Actual_Expr_Decls
  (Node : Bare_Generic_Instantiation
  )
   return Bare_Anonymous_Expr_Decl_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Bare_Anonymous_Expr_Decl_Array_Access;
            procedure Finalizer_Scope_973 with Inline_Always;
      Match_0 : Bare_Generic_Subp_Instantiation;
Match_1 : Bare_Generic_Package_Instantiation;
Fld : Bare_Assoc_List;
Fld_1 : Bare_Assoc_List;
Match_Prefix : Bare_Generic_Instantiation;
Cast_Result : Bare_Generic_Subp_Instantiation;
Let_Result : Bare_Assoc_List;
Scope_Result : Bare_Assoc_List;
Cast_Result_1 : Bare_Generic_Package_Instantiation;
Let_Result_1 : Bare_Assoc_List;
Scope_Result_1 : Bare_Assoc_List;
Match_Result : Bare_Assoc_List;
Item_0 : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Bare_Expr;
New_Node : Bare_Anonymous_Expr_Decl;
Map_Result : Bare_Anonymous_Expr_Decl_Array_Access;
            procedure Finalizer_Scope_973 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_973;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Generic_Instantiation_Lf_State_Actual_Expr_Decls is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Generic_Instantiation_Lf_Stg_Actual_Expr_Decls;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Generic_Instantiation_Lf_State_Actual_Expr_Decls,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6489 '<Map at nodes.lkt:12019:9>' Map_Result ada/nodes.lkt:12019
   --# expr-start 6484 '<Match at nodes.lkt:12019:9>' Match_Result ada/nodes.lkt:12019
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Self; 
case Ada_Generic_Instantiation (Match_Prefix.Kind) is
         when Ada_Generic_Subp_Instantiation =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind subp Match_0
--# expr-start 6482 '<FieldAccess for params at nodes.lkt:12020:52>' Fld ada/nodes.lkt:12020
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Match_0.Generic_Subp_Instantiation_F_Params;
--# expr-done 6482
Let_Result := Fld; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Generic_Package_Instantiation =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind pkg Match_1
--# expr-start 6483 '<FieldAccess for params at nodes.lkt:12021:54>' Fld_1 ada/nodes.lkt:12021
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Match_1.Generic_Package_Instantiation_F_Params;
--# expr-done 6483
Let_Result_1 := Fld_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 6484
      declare
         Map_Result_Vec : Bare_Anonymous_Expr_Decl_Vectors.Vector;
      begin
      if Match_Result = null then
      Map_Result := Create_Bare_Anonymous_Expr_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Match_Result;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind assoc Item_0
      --# expr-start 6488 '<New AnonymousExprDecl at nodes.lkt:12024:24>' New_Node ada/nodes.lkt:12024
--# expr-start 6487 '<FieldAccess for node at nodes.lkt:12024:47>' Fld_3 ada/nodes.lkt:12024
--# expr-start 6486 '<FieldAccess for expr at nodes.lkt:12024:47>' Fld_2 ada/nodes.lkt:12024
--# expr-start 6485 '<as_bare_entity at nodes.lkt:12024:47>' If_Result ada/nodes.lkt:12024
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
As_Entity := (Info => No_Entity_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 6485
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 6486
Fld_3 := Fld_2.Node;
--# expr-done 6487
if Is_Foreign_Strict (Self.Self_Env, Self) then
   Raise_Property_Exception
     (Self,
      Property_Error'Identity,
      "synthetic nodes cannot have foreign lexical envs");
end if;
      if Fld_3 = null then
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            "AnonymousExprDecl.expr cannot be null in synthetic nodes; add a"
            & " nullable annotation to this field to allow it");
      end if;
New_Node := new Root_Node_Record
  (Ada_Anonymous_Expr_Decl);
Initialize
  (Self => New_Node,
   Kind => Ada_Anonymous_Expr_Decl,
   Unit => Self.Unit,
   Token_Start_Index => No_Token_Index,
   Token_End_Index   => No_Token_Index,
   Parent => Self,
   Self_Env => Self.Self_Env);
Register_Destroyable (Self.Unit, New_Node);
   Initialize_Fields_For_Anonymous_Expr_Decl
     (Self => New_Node,
      Anonymous_Expr_Decl_F_Expr => Fld_3);
--# expr-done 6488
         declare
            Item_To_Append : constant Bare_Anonymous_Expr_Decl := New_Node;
         begin
            Bare_Anonymous_Expr_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Anonymous_Expr_Decl_Array
           (Items_Count => Natural (Bare_Anonymous_Expr_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Anonymous_Expr_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Anonymous_Expr_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Anonymous_Expr_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6489
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_973;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_973;
               Self.Bare_Generic_Instantiation_Lf_State_Actual_Expr_Decls :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Generic_Instantiation_Lf_State_Actual_Expr_Decls := Initialized;
      Self.Bare_Generic_Instantiation_Lf_Stg_Actual_Expr_Decls := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Generic_Instantiation_F_Actual_Expr_Decls;
--# end
--# property-start GenericInstantiation.parent_instantiation_env ada/nodes.lkt:12053
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Parent_Instantiation_Env
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_974 with Inline_Always;
            procedure Finalizer_Scope_2821 with Inline_Always;
            procedure Finalizer_Scope_2822 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Var_Expr_177 : Internal_Entity_Dotted_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Name;
Cast_Result : Internal_Entity_Dotted_Name;
Fld_2 : Internal_Entity_Name;
Cast_Expr : Bare_Generic_Instantiation;
Cast_Result_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_3 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_4 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result_1 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Fld_5 : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_974 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_974;
            procedure Finalizer_Scope_2821 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2821;
            procedure Finalizer_Scope_2822 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
            end Finalizer_Scope_2822;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6492 '<Cast to DottedName at nodes.lkt:12054:9>' Cast_Result ada/nodes.lkt:12054
--# expr-start 6491 '<FieldAccess for name at nodes.lkt:12054:9>' Fld_1 ada/nodes.lkt:12054
--# expr-start 6490 '<FieldAccess for defining_name at nodes.lkt:12054:9>' Fld ada/nodes.lkt:12054
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6490
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Defining_Name_F_Name, Info => Fld.Info);
--# expr-done 6491
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Create_Internal_Entity_Dotted_Name
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Dotted_Name;
   end if;
--# expr-done 6492
Var_Expr_177 := Cast_Result;
if Var_Expr_177 /= No_Entity_Dotted_Name then
   --# scope-start
--# expr-start 6493 '<FieldAccess for prefix at nodes.lkt:12054:9>' Fld_2 ada/nodes.lkt:12054
      if Var_Expr_177.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Var_Expr_177.Node.Dotted_Name_F_Prefix, Info => Var_Expr_177.Info);
--# expr-done 6493
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind parent_name Var_Expr_0
--# expr-start 6497 '<bind at nodes.lkt:12056:17>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:12056
Cast_Expr := Self; 
      Cast_Result_1 := Cast_Expr;
Bound_Origin := Cast_Result_1; 
--# expr-start 6496 '<bind at nodes.lkt:12057:17>' Dyn_Var_Bind_Result ada/nodes.lkt:12057
--# expr-start 6494 '<FieldAccess for children_env at nodes.lkt:12057:28>' Fld_3 ada/nodes.lkt:12057
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6494
Bound_Env := Fld_3; Inc_Ref (Bound_Env);
--# expr-start 6495 '<FieldAccess for designated_env_no_overloading at nodes.lkt:12059:17>' Fld_4 ada/nodes.lkt:12059
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env_no_overloading'
Fld_4 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env_No_Overloading (Node => Var_Expr_0.Node, Env => Bound_Env, Origin => Bound_Origin, No_Visibility => False, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 6495
Dyn_Var_Bind_Result := Fld_4; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 6496
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 6497
Scope_Result := Dyn_Var_Bind_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2822;
   Result_Var := Scope_Result;
else
   --# expr-start 6498 '<FieldAccess for empty_env at nodes.lkt:12061:25>' Fld_5 ada/nodes.lkt:12061
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.empty_env
Fld_5 := Libadalang.Implementation.Ada_Node_P_Empty_Env (Node => Self);
--# end
--# expr-done 6498
   Result_Var := Fld_5;
end if;
      Inc_Ref (Result_Var);
Scope_Result_1 := Result_Var;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2821;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Empty_Env;
end if;
      Inc_Ref (Result_Var_1);
         Property_Result := Result_Var_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_974;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_974;
                     Finalizer_Scope_2821;
                     Finalizer_Scope_2822;
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Parent_Instantiation_Env;
--# end
--# property-start GenericInstantiation.xref_entry_point ada/nodes.lkt:12064
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Xref_Entry_Point
  (Node : Bare_Generic_Instantiation
  )
   return Boolean
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Xref_Entry_Point;
--# end
--# property-start GenericInstantiation.xref_equation ada/nodes.lkt:12067
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Xref_Equation
  (Node : Bare_Generic_Instantiation
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_976 with Inline_Always;
            procedure Finalizer_Scope_2823 with Inline_Always;
            procedure Finalizer_Scope_2824 with Inline_Always;
            procedure Finalizer_Scope_2825 with Inline_Always;
            procedure Finalizer_Scope_2827 with Inline_Always;
            procedure Finalizer_Scope_2828 with Inline_Always;
            procedure Finalizer_Scope_2829 with Inline_Always;
            procedure Finalizer_Scope_2830 with Inline_Always;
            procedure Finalizer_Scope_2831 with Inline_Always;
            procedure Finalizer_Scope_2832 with Inline_Always;
            procedure Finalizer_Scope_2833 with Inline_Always;
      Match_0 : Internal_Entity_Dotted_Name;
Match_1 : Internal_Entity_Name;
Local_Actual_Name : Internal_Entity_Name;
Match_0_1 : Internal_Entity_Base_Type_Decl;
Match_1_1 : Internal_Entity_Generic_Package_Instantiation;
Match_2 : Internal_Entity_Formal_Subp_Decl;
Match_3 : Internal_Entity_Object_Decl;
Match_4 : Internal_Entity_Basic_Decl;
Var_Expr_2 : Bare_Base_Id;
Var_Expr_178 : Internal_Entity_Generic_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_3 : Internal_Entity_Name;
Fld_4 : Internal_Entity_Name;
Fld_5 : Logic_Equation;
True_Rel : Logic_Equation;
Match_Prefix : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Dotted_Name;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_2 : Internal_Entity_Name;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Match_Result : Logic_Equation;
And_Pred : Logic_Equation;
True_Rel_1 : Logic_Equation;
Fld_6 : Internal_Entity_Generic_Decl;
Fld_7 : Internal_Entity_Generic_Formal_Part;
Fld_8 : Internal_Entity_Assoc_List;
Fld_9 : Internal_Param_Match_Array_Access;
Fld_10 : Internal_Single_Actual;
Fld_11 : Internal_Entity_Basic_Assoc;
Fld_12 : Internal_Entity_Expr;
Is_A : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Param_Match_Array_Access;
Fld_13 : Internal_Single_Actual;
Fld_14 : Internal_Entity_Basic_Assoc;
Fld_15 : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Name;
Fld_16 : Internal_Entity_Defining_Name;
Fld_17 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_4 : Internal_Entity_Generic_Formal;
Fld_18 : Internal_Entity_Basic_Decl;
Fld_19 : Logic_Equation;
Fld_20 : Logic_Equation;
Fld_21 : Logic_Equation;
Fld_22 : Logic_Equation;
Fld_23 : Logic_Var;
Cast_Expr : Internal_Entity_Formal_Subp_Decl;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Pred : Logic_Equation;
And_Pred_1 : Logic_Equation;
True_Rel_2 : Logic_Equation;
Or_Pred : Logic_Equation;
Is_A_1 : Boolean;
If_Result : Logic_Equation;
Fld_24 : Internal_Single_Actual;
Fld_25 : Internal_Entity_Basic_Assoc;
Fld_26 : Internal_Entity_Expr;
Fld_27 : Logic_Var;
Fld_28 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_29 : Internal_Single_Actual;
Fld_30 : Internal_Entity_Basic_Assoc;
Fld_31 : Internal_Entity_Expr;
Fld_32 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_33 : Internal_Single_Actual;
Fld_34 : Internal_Entity_Basic_Assoc;
Fld_35 : Internal_Entity_Expr;
Fld_36 : Logic_Equation;
And_Pred_3 : Logic_Equation;
True_Rel_3 : Logic_Equation;
Match_Prefix_1 : Internal_Entity_Basic_Decl;
Cast_Result_7 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Cast_Result_8 : Internal_Entity_Generic_Package_Instantiation;
Let_Result_3 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
Cast_Result_9 : Internal_Entity_Formal_Subp_Decl;
Let_Result_4 : Logic_Equation;
Scope_Result_4 : Logic_Equation;
Cast_Result_10 : Internal_Entity_Object_Decl;
Let_Result_5 : Logic_Equation;
Scope_Result_5 : Logic_Equation;
Cast_Result_11 : Internal_Entity_Basic_Decl;
Let_Result_6 : Logic_Equation;
Scope_Result_6 : Logic_Equation;
Match_Result_1 : Logic_Equation;
Fld_37 : Internal_Single_Actual;
Fld_38 : Bare_Base_Id;
Fld_39 : Logic_Var;
Fld_40 : Internal_Entity_Defining_Name;
Fld_41 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Defining_Name;
Fld_42 : Internal_Entity_Basic_Decl;
Cast_Result_12 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
Scope_Result_7 : Logic_Equation;
True_Rel_4 : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_4 : Logic_Equation;
Let_Result_7 : Logic_Equation;
Map_Result_1 : Logic_Equation_Array_Access;
Scope_Result_8 : Logic_Equation_Array_Access;
Result_Var_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Fld_43 : Boolean;
If_Result_2 : Logic_Equation;
And_Pred_5 : Logic_Equation;
            procedure Finalizer_Scope_976 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Match_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Scope_Result_8);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (And_Pred_5);
            end Finalizer_Scope_976;
            procedure Finalizer_Scope_2823 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2823;
            procedure Finalizer_Scope_2824 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_2824;
            procedure Finalizer_Scope_2825 is
            begin
                     Dec_Ref (Fld_9);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_2825;
            procedure Finalizer_Scope_2827 is
            begin
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Match_Result_1);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (True_Rel_4);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Let_Result_7);
            end Finalizer_Scope_2827;
            procedure Finalizer_Scope_2828 is
            begin
                     Dec_Ref (Fld_19);
            end Finalizer_Scope_2828;
            procedure Finalizer_Scope_2829 is
            begin
                     Dec_Ref (Fld_20);
            end Finalizer_Scope_2829;
            procedure Finalizer_Scope_2830 is
            begin
                     Dec_Ref (Fld_21);
                     Dec_Ref (Fld_22);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (True_Rel_2);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_2830;
            procedure Finalizer_Scope_2831 is
            begin
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_32);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_36);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_2831;
            procedure Finalizer_Scope_2832 is
            begin
                     Dec_Ref (True_Rel_3);
            end Finalizer_Scope_2832;
            procedure Finalizer_Scope_2833 is
            begin
                     Dec_Ref (Bind_Result_2);
            end Finalizer_Scope_2833;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6568 '<LogicBinaryOp And at nodes.lkt:12068:9>' And_Pred_5 ada/nodes.lkt:12068
--# expr-start 6507 '<LogicBinaryOp And at nodes.lkt:12069:13>' And_Pred ada/nodes.lkt:12069
--# expr-start 6502 '<Bind at nodes.lkt:12069:13>' Bind_Result ada/nodes.lkt:12069
--# expr-start 6500 '<FieldAccess for ref_var at nodes.lkt:12069:13>' Fld_1 ada/nodes.lkt:12069
--# expr-start 6499 '<FieldAccess for generic_entity_name at nodes.lkt:12069:13>' Fld ada/nodes.lkt:12069
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.generic_entity_name'
Fld := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Generic_Entity_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6499
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld.Node);
--# end
--# expr-done 6500
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 6501 '<FieldAccess for nonbound_generic_decl_from_self at nodes.lkt:12070:16>' Fld_2 ada/nodes.lkt:12070
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.nonbound_generic_decl_from_self
Fld_2 := Libadalang.Implementation.Generic_Instantiation_P_Nonbound_Generic_Decl_From_Self (Node => Ent.Node, Follow_Renaming => False);
--# end
--# expr-done 6501
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12069:13") else null)); 
--# expr-done 6502
--# expr-start 6506 '<Match at nodes.lkt:12071:18>' Match_Result ada/nodes.lkt:12071
--# expr-start 6503 '<FieldAccess for generic_entity_name at nodes.lkt:12071:24>' Fld_3 ada/nodes.lkt:12071
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.generic_entity_name'
Fld_3 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Generic_Entity_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6503
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_3; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind dn Match_0
--# expr-start 6505 '<FieldAccess for xref_no_overloading at nodes.lkt:12072:40>' Fld_5 ada/nodes.lkt:12072
--# expr-start 6504 '<FieldAccess for prefix at nodes.lkt:12072:40>' Fld_4 ada/nodes.lkt:12072
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 6504
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_5 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_4.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_4.Info);
--# end
--# expr-done 6505
Let_Result := Fld_5; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2823;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind _ Match_1
True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12073:27") else null)); 
Let_Result_1 := True_Rel; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2824;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
end case;
--# expr-done 6506
And_Pred := Create_And (Bind_Result, Match_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12069:13") else null)); 
--# expr-done 6507
--# expr-start 6567 '<If at nodes.lkt:12076:14>' If_Result_2 ada/nodes.lkt:12076
--# expr-start 6508 '<FieldAccess for is_any_formal at nodes.lkt:12076:17>' Fld_43 ada/nodes.lkt:12076
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.is_any_formal
Fld_43 := Libadalang.Implementation.Generic_Instantiation_P_Is_Any_Formal (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6508
if Fld_43 then
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12076:43") else null)); 
   If_Result_2 := True_Rel_1;
else
   --# expr-start 6566 '<LogicAll at nodes.lkt:12078:13>' Logic_Boolean_Op ada/nodes.lkt:12078
--# expr-start 6509 '<FieldAccess for designated_generic_decl at nodes.lkt:12078:13>' Fld_6 ada/nodes.lkt:12078
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.designated_generic_decl'
Fld_6 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Designated_Generic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6509
Var_Expr_178 := Fld_6;
if Var_Expr_178 /= No_Entity_Generic_Decl then
   --# scope-start
--# expr-start 6565 '<Map at nodes.lkt:12078:13>' Map_Result_1 ada/nodes.lkt:12078
   --# expr-start 6518 '<Map at nodes.lkt:12078:13>' Map_Result ada/nodes.lkt:12078
   --# expr-start 6512 '<FieldAccess for match_param_list at nodes.lkt:12078:13>' Fld_9 ada/nodes.lkt:12078
--# expr-start 6510 '<FieldAccess for formal_part at nodes.lkt:12078:13>' Fld_7 ada/nodes.lkt:12078
      if Var_Expr_178.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Generic_Formal_Part (Node => Var_Expr_178.Node.Generic_Decl_F_Formal_Part, Info => Var_Expr_178.Info);
--# expr-done 6510
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6511 '<FieldAccess for generic_inst_params at nodes.lkt:12079:17>' Fld_8 ada/nodes.lkt:12079
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.generic_inst_params'
Fld_8 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Generic_Inst_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6511
--# property-call-start BaseFormalParamHolder.match_param_list
Fld_9 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Param_List (Node => Fld_7.Node, Params => Fld_8, Is_Dottable_Subp => False, E_Info => Fld_7.Info);
--# end
--# expr-done 6512
      declare
         Map_Result_Vec : Internal_Param_Match_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_9;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_0
         --# expr-start 6517 '<Not at nodes.lkt:12082:29>' Not_Val ada/nodes.lkt:12082
--# expr-start 6516 '<IsA BoxExpr at nodes.lkt:12082:33>' Is_A ada/nodes.lkt:12082
--# expr-start 6515 '<FieldAccess for expr at nodes.lkt:12082:33>' Fld_12 ada/nodes.lkt:12082
--# expr-start 6514 '<FieldAccess for assoc at nodes.lkt:12082:33>' Fld_11 ada/nodes.lkt:12082
--# expr-start 6513 '<FieldAccess for actual at nodes.lkt:12082:33>' Fld_10 ada/nodes.lkt:12082
Fld_10 := Item_0.Actual;
--# expr-done 6513
Fld_11 := Fld_10.Assoc;
--# expr-done 6514
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_11.Node, E_Info => Fld_11.Info);
--# end
--# expr-done 6515
Is_A := Fld_12.Node /= null 
and then Fld_12.Node.Kind in Ada_Box_Expr_Range; 
--# expr-done 6516
Not_Val := not (Is_A); 
--# expr-done 6517
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Param_Match := Item_0;
         begin
            Internal_Param_Match_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Param_Match_Array
           (Items_Count => Natural (Internal_Param_Match_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Match_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Match_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Match_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6518
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Map_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_1
      --# expr-start 6564 '<Let at nodes.lkt:12085:21>' Let_Result_7 ada/nodes.lkt:12085
--# scope-start
--# expr-start 6522 '<Cast to Name at nodes.lkt:12085:39>' Cast_Result_3 ada/nodes.lkt:12085
--# expr-start 6521 '<FieldAccess for expr at nodes.lkt:12085:39>' Fld_15 ada/nodes.lkt:12085
--# expr-start 6520 '<FieldAccess for assoc at nodes.lkt:12085:39>' Fld_14 ada/nodes.lkt:12085
--# expr-start 6519 '<FieldAccess for actual at nodes.lkt:12085:39>' Fld_13 ada/nodes.lkt:12085
Fld_13 := Item_1.Actual;
--# expr-done 6519
Fld_14 := Fld_13.Assoc;
--# expr-done 6520
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_15 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_14.Node, E_Info => Fld_14.Info);
--# end
--# expr-done 6521
   if Fld_15.Node = null
      or else Fld_15.Node.Kind in Ada_Name
   then
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
   else
         Cast_Result_3 := No_Entity_Name;
   end if;
--# expr-done 6522
Local_Actual_Name := Cast_Result_3; 
--# bind actual_name Local_Actual_Name
--# expr-start 6563 '<LogicBinaryOp And at nodes.lkt:12087:21>' And_Pred_4 ada/nodes.lkt:12087
--# expr-start 6554 '<Match at nodes.lkt:12087:21>' Match_Result_1 ada/nodes.lkt:12087
--# expr-start 6526 '<FieldAccess for decl at nodes.lkt:12087:27>' Fld_18 ada/nodes.lkt:12087
--# expr-start 6525 '<Cast to GenericFormal at nodes.lkt:12087:27>' Cast_Result_4 ada/nodes.lkt:12087
--# expr-start 6524 '<FieldAccess for formal_decl at nodes.lkt:12087:27>' Fld_17 ada/nodes.lkt:12087
--# expr-start 6523 '<FieldAccess for formal at nodes.lkt:12087:27>' Fld_16 ada/nodes.lkt:12087
Fld_16 := Item_1.Formal;
--# expr-done 6523
      if Fld_16.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_17 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_16.Node, E_Info => Fld_16.Info);
--# end
--# expr-done 6524
   if Fld_17.Node = null
      or else Fld_17.Node.Kind in Ada_Generic_Formal
   then
      Cast_Result_4 := Create_Internal_Entity_Generic_Formal
        (Node => Fld_17.Node,
         Info => Fld_17.Info);
   else
         Cast_Result_4 := No_Entity_Generic_Formal;
   end if;
--# expr-done 6525
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Create_Internal_Entity_Basic_Decl (Node => Cast_Result_4.Node.Generic_Formal_F_Decl, Info => Cast_Result_4.Info);
--# expr-done 6526
      if Fld_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Fld_18; 
case Ada_Basic_Decl (Match_Prefix_1.Node.Kind) is
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_0_1 := Cast_Result_7; 
--# bind _ Match_0_1
--# expr-start 6527 '<FieldAccess for xref_type_equation at nodes.lkt:12089:29>' Fld_19 ada/nodes.lkt:12089
      if Local_Actual_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_19 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Local_Actual_Name.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Actual_Name.Info);
--# end
--# expr-done 6527
Let_Result_2 := Fld_19; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2828;
            Match_Result_1 := Scope_Result_2; Inc_Ref (Match_Result_1);
         when Ada_Generic_Package_Instantiation =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Create_Internal_Entity_Generic_Package_Instantiation
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_1_1 := Cast_Result_8; 
--# bind _ Match_1_1
--# expr-start 6528 '<FieldAccess for xref_no_overloading at nodes.lkt:12091:29>' Fld_20 ada/nodes.lkt:12091
      if Local_Actual_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_20 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Local_Actual_Name.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Actual_Name.Info);
--# end
--# expr-done 6528
Let_Result_3 := Fld_20; Inc_Ref (Let_Result_3);
--# end
Scope_Result_3 := Let_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2829;
            Match_Result_1 := Scope_Result_3; Inc_Ref (Match_Result_1);
         when Ada_Abstract_Formal_Subp_Decl .. Ada_Concrete_Formal_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Formal_Subp_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_2 := Cast_Result_9; 
--# bind subp_decl Match_2
--# expr-start 6537 '<If at nodes.lkt:12093:29>' If_Result ada/nodes.lkt:12093
--# expr-start 6529 '<IsA AttributeRef at nodes.lkt:12093:32>' Is_A_1 ada/nodes.lkt:12093
Is_A_1 := Local_Actual_Name.Node /= null 
and then Local_Actual_Name.Node.Kind in Ada_Attribute_Ref_Range; 
--# expr-done 6529
if Is_A_1 then
   --# expr-start 6530 '<FieldAccess for sub_equation at nodes.lkt:12094:34>' Fld_21 ada/nodes.lkt:12094
      if Local_Actual_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_21 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Actual_Name.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Actual_Name.Info);
--# end
--# expr-done 6530
   If_Result := Fld_21;
else
   --# expr-start 6536 '<LogicBinaryOp Or at nodes.lkt:12096:33>' Or_Pred ada/nodes.lkt:12096
--# expr-start 6535 '<LogicBinaryOp And at nodes.lkt:12096:33>' And_Pred_1 ada/nodes.lkt:12096
--# expr-start 6531 '<FieldAccess for xref_no_overloading at nodes.lkt:12096:33>' Fld_22 ada/nodes.lkt:12096
      if Local_Actual_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_22 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Local_Actual_Name.Node, All_Els => True, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Actual_Name.Info);
--# end
--# expr-done 6531
--# expr-start 6534 '<Predicate on BasicDecl.subp_decl_match_signature at nodes.lkt:12097:38>' Pred ada/nodes.lkt:12097
--# expr-start 6532 '<FieldAccess for ref_var at nodes.lkt:12098:61>' Fld_23 ada/nodes.lkt:12098
      if Local_Actual_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_23 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Local_Actual_Name.Node);
--# end
--# expr-done 6532
Fld_23.Value := No_Entity;
Entity_Vars.Reset (Fld_23);
--# expr-start 6533 '<Cast to BasicDecl at nodes.lkt:12100:33>' Cast_Result_5 ada/nodes.lkt:12100
Cast_Expr := Match_2; 
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-done 6533
Pred := Solver.Create_Predicate (Fld_23, Create_Basic_Decl_P_Subp_Decl_Match_Signature_0_Predicate (Cast_Result_5, Origin)); 
--# expr-done 6534
And_Pred_1 := Create_And (Fld_22, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12096:33") else null)); 
--# expr-done 6535
True_Rel_2 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12101:37") else null)); 
Or_Pred := Create_Or (And_Pred_1, True_Rel_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12096:33") else null)); 
--# expr-done 6536
   If_Result := Or_Pred;
end if;
      Inc_Ref (If_Result);
--# expr-done 6537
Let_Result_4 := If_Result; Inc_Ref (Let_Result_4);
--# end
Scope_Result_4 := Let_Result_4;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2830;
            Match_Result_1 := Scope_Result_4; Inc_Ref (Match_Result_1);
         when Ada_Object_Decl .. Ada_No_Type_Object_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Create_Internal_Entity_Object_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_3 := Cast_Result_10; 
--# bind obj_decl Match_3
--# expr-start 6553 '<LogicBinaryOp And at nodes.lkt:12103:29>' And_Pred_3 ada/nodes.lkt:12103
--# expr-start 6548 '<LogicBinaryOp And at nodes.lkt:12103:29>' And_Pred_2 ada/nodes.lkt:12103
--# expr-start 6543 '<Bind at nodes.lkt:12103:29>' Bind_Result_1 ada/nodes.lkt:12103
--# expr-start 6541 '<FieldAccess for expected_type_var at nodes.lkt:12103:29>' Fld_27 ada/nodes.lkt:12103
--# expr-start 6540 '<FieldAccess for expr at nodes.lkt:12103:29>' Fld_26 ada/nodes.lkt:12103
--# expr-start 6539 '<FieldAccess for assoc at nodes.lkt:12103:29>' Fld_25 ada/nodes.lkt:12103
--# expr-start 6538 '<FieldAccess for actual at nodes.lkt:12103:29>' Fld_24 ada/nodes.lkt:12103
Fld_24 := Item_1.Actual;
--# expr-done 6538
Fld_25 := Fld_24.Assoc;
--# expr-done 6539
      if Fld_25.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_26 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_25.Node, E_Info => Fld_25.Info);
--# end
--# expr-done 6540
      if Fld_26.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_26.Node);
--# expr-done 6541
Fld_27.Value := No_Entity;
Entity_Vars.Reset (Fld_27);
--# expr-start 6542 '<FieldAccess for expr_type at nodes.lkt:12104:32>' Fld_28 ada/nodes.lkt:12104
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_28 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Match_3.Node, Origin => Origin, E_Info => Match_3.Info);
--# end
--# expr-done 6542
      Cast_Result_6 := Create_Internal_Entity
        (Node => Fld_28.Node,
         Info => Fld_28.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_27, Cast_Result_6, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12103:29") else null)); 
--# expr-done 6543
--# expr-start 6547 '<FieldAccess for sub_equation at nodes.lkt:12105:34>' Fld_32 ada/nodes.lkt:12105
--# expr-start 6546 '<FieldAccess for expr at nodes.lkt:12105:34>' Fld_31 ada/nodes.lkt:12105
--# expr-start 6545 '<FieldAccess for assoc at nodes.lkt:12105:34>' Fld_30 ada/nodes.lkt:12105
--# expr-start 6544 '<FieldAccess for actual at nodes.lkt:12105:34>' Fld_29 ada/nodes.lkt:12105
Fld_29 := Item_1.Actual;
--# expr-done 6544
Fld_30 := Fld_29.Assoc;
--# expr-done 6545
      if Fld_30.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_31 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_30.Node, E_Info => Fld_30.Info);
--# end
--# expr-done 6546
      if Fld_31.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_32 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_31.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_31.Info);
--# end
--# expr-done 6547
And_Pred_2 := Create_And (Bind_Result_1, Fld_32, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12103:29") else null)); 
--# expr-done 6548
--# expr-start 6552 '<FieldAccess for matches_expected_assign_type at nodes.lkt:12106:34>' Fld_36 ada/nodes.lkt:12106
--# expr-start 6551 '<FieldAccess for expr at nodes.lkt:12106:34>' Fld_35 ada/nodes.lkt:12106
--# expr-start 6550 '<FieldAccess for assoc at nodes.lkt:12106:34>' Fld_34 ada/nodes.lkt:12106
--# expr-start 6549 '<FieldAccess for actual at nodes.lkt:12106:34>' Fld_33 ada/nodes.lkt:12106
Fld_33 := Item_1.Actual;
--# expr-done 6549
Fld_34 := Fld_33.Assoc;
--# expr-done 6550
      if Fld_34.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_35 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_34.Node, E_Info => Fld_34.Info);
--# end
--# expr-done 6551
      if Fld_35.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_36 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Fld_35.Node, Origin => Origin);
--# end
--# expr-done 6552
And_Pred_3 := Create_And (And_Pred_2, Fld_36, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12103:29") else null)); 
--# expr-done 6553
Let_Result_5 := And_Pred_3; Inc_Ref (Let_Result_5);
--# end
Scope_Result_5 := Let_Result_5;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_2831;
            Match_Result_1 := Scope_Result_5; Inc_Ref (Match_Result_1);
         when Ada_Abstract_State_Decl .. Ada_Package_Decl | Ada_Abstract_Subp_Decl | Ada_Subp_Decl .. Ada_Generic_Subp_Decl | Ada_Generic_Subp_Instantiation .. Ada_Number_Decl | Ada_Package_Renaming_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_4 := Cast_Result_11; 
--# bind _ Match_4
True_Rel_3 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12108:35") else null)); 
Let_Result_6 := True_Rel_3; Inc_Ref (Let_Result_6);
--# end
Scope_Result_6 := Let_Result_6;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_2832;
            Match_Result_1 := Scope_Result_6; Inc_Ref (Match_Result_1);
end case;
--# expr-done 6554
--# expr-start 6556 '<FieldAccess for name at nodes.lkt:12110:26>' Fld_38 ada/nodes.lkt:12110
--# expr-start 6555 '<FieldAccess for actual at nodes.lkt:12110:26>' Fld_37 ada/nodes.lkt:12110
Fld_37 := Item_1.Actual;
--# expr-done 6555
Fld_38 := Fld_37.Name;
--# expr-done 6556
Var_Expr_2 := Fld_38;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind n Var_Expr_2
--# expr-start 6562 '<Bind at nodes.lkt:12112:25>' Bind_Result_2 ada/nodes.lkt:12112
--# expr-start 6557 '<FieldAccess for ref_var at nodes.lkt:12112:25>' Fld_39 ada/nodes.lkt:12112
      if Var_Expr_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_39 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Var_Expr_2);
--# end
--# expr-done 6557
Fld_39.Value := No_Entity;
Entity_Vars.Reset (Fld_39);
--# expr-start 6561 '<FieldAccess for basic_decl at nodes.lkt:12113:28>' Fld_42 ada/nodes.lkt:12113
--# expr-start 6560 '<as_bare_entity at nodes.lkt:12113:28>' If_Result_1 ada/nodes.lkt:12113
--# expr-start 6559 '<FieldAccess for node at nodes.lkt:12113:28>' Fld_41 ada/nodes.lkt:12113
--# expr-start 6558 '<FieldAccess for formal at nodes.lkt:12113:28>' Fld_40 ada/nodes.lkt:12113
Fld_40 := Item_1.Formal;
--# expr-done 6558
Fld_41 := Fld_40.Node;
--# expr-done 6559
Is_Null := Fld_41 = null; 
if Is_Null then
   If_Result_1 := No_Entity_Defining_Name;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_41); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 6560
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_42 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => If_Result_1.Node, E_Info => If_Result_1.Info);
--# end
--# expr-done 6561
      Cast_Result_12 := Create_Internal_Entity
        (Node => Fld_42.Node,
         Info => Fld_42.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_39, Cast_Result_12, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12112:25") else null)); 
--# expr-done 6562
Scope_Result_7 := Bind_Result_2;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_2833;
   Result_Var := Scope_Result_7;
else
   True_Rel_4 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12114:37") else null)); 
   Result_Var := True_Rel_4;
end if;
      Inc_Ref (Result_Var);
And_Pred_4 := Create_And (Match_Result_1, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12087:21") else null)); 
--# expr-done 6563
Let_Result_7 := And_Pred_4; Inc_Ref (Let_Result_7);
--# end
--# expr-done 6564
         declare
            Item_To_Append : constant Logic_Equation := Let_Result_7;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2827;
         end loop;
      end;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 6565
Scope_Result_8 := Map_Result_1;
   Inc_Ref (Scope_Result_8);
   --# end
      Finalizer_Scope_2825;
   Result_Var_1 := Scope_Result_8;
else
   Result_Var_1 := No_Logic_Equation_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Result_Var_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12078:13") else null)); 
--# expr-done 6566
   If_Result_2 := Logic_Boolean_Op;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 6567
And_Pred_5 := Create_And (And_Pred, If_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12068:9") else null)); 
--# expr-done 6568
         Property_Result := And_Pred_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_976;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_976;
                     Finalizer_Scope_2823;
                     Finalizer_Scope_2824;
                     Finalizer_Scope_2825;
                     Finalizer_Scope_2827;
                     Finalizer_Scope_2828;
                     Finalizer_Scope_2829;
                     Finalizer_Scope_2830;
                     Finalizer_Scope_2831;
                     Finalizer_Scope_2832;
                     Finalizer_Scope_2833;
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Xref_Equation;
--# end
--# property-start GenericInstantiation.initial_env_name ada/nodes.lkt:12119
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Initial_Env_Name
  (Node : Bare_Generic_Instantiation
  )
   return Symbol_Type
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Fld : Symbol_Type;
Fld_1 : Boolean;
If_Result : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6571 '<If at nodes.lkt:12120:9>' If_Result ada/nodes.lkt:12120
--# expr-start 6569 '<FieldAccess for is_library_item at nodes.lkt:12120:12>' Fld_1 ada/nodes.lkt:12120
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_library_item'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Library_Item (Node => Self);
--# end
--# expr-done 6569
if Fld_1 then
   --# expr-start 6570 '<FieldAccess for child_decl_initial_env_name at nodes.lkt:12120:40>' Fld ada/nodes.lkt:12120
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.child_decl_initial_env_name'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Child_Decl_Initial_Env_Name (Node => Self);
--# end
--# expr-done 6570
   If_Result := Fld;
else
   If_Result := No_Symbol;
end if;
--# expr-done 6571
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Initial_Env_Name;
--# end
--# property-start GenericInstantiation.env_names ada/nodes.lkt:12123
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Env_Names
  (Node : Bare_Generic_Instantiation
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_978 with Inline_Always;
            procedure Finalizer_Scope_2834 with Inline_Always;
      Var_Expr_0 : String_Type;
Fld : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_978 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_978;
            procedure Finalizer_Scope_2834 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2834;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6572 '<FieldAccess for top_level_env_name at nodes.lkt:12124:9>' Fld ada/nodes.lkt:12124
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 6572
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_String then
   --# scope-start
   --# bind fqn Var_Expr_0
--# expr-start 6574 '<ArrayLiteral at nodes.lkt:12124:47>' Array_Lit ada/nodes.lkt:12124
--# expr-start 6573 '<to_symbol at nodes.lkt:12124:48>' Sym ada/nodes.lkt:12124
Sym := String_To_Symbol (Self, Self.Unit.Context, Var_Expr_0); 
--# expr-done 6573
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 6574
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2834;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_978;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_978;
                     Finalizer_Scope_2834;
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Env_Names;
--# end
--# property-start GenericInstantiation.inst_params ada/nodes.lkt:12129
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Inst_Params
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Actual_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_979 with Inline_Always;
            procedure Finalizer_Scope_2835 with Inline_Always;
            procedure Finalizer_Scope_2836 with Inline_Always;
            procedure Finalizer_Scope_2837 with Inline_Always;
            procedure Finalizer_Scope_2838 with Inline_Always;
            procedure Finalizer_Scope_2839 with Inline_Always;
            procedure Finalizer_Scope_2841 with Inline_Always;
      Local_Ap : Internal_Entity_Assoc_List;
Match_0 : Internal_Entity_Generic_Formal_Package;
Match_1 : Internal_Entity_Generic_Formal_Type_Decl;
Match_2 : Internal_Entity_Generic_Formal_Obj_Decl;
Match_3 : Internal_Entity_Generic_Formal_Subp_Decl;
Local_Subp : Internal_Entity_Formal_Subp_Decl;
Match_4 : Internal_Entity_Pragma_Node;
Match_5 : Internal_Entity_Use_Clause;
Match_6 : Internal_Entity;
Var_Expr_179 : Internal_Entity_Generic_Decl;
Var_Expr_180 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Assoc_List;
Fld_1 : Internal_Entity_Generic_Decl;
Fld_2 : Internal_Entity_Generic_Formal_Part;
Fld_3 : Internal_Entity_Ada_Node_List;
Fld_4 : Bare_Ada_Node_List;
Fld_5 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Fld_6 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Generic_Package_Instantiation;
Fld_7 : Internal_Entity_Defining_Name;
New_Struct : Internal_Param_Actual;
Array_Lit : Internal_Param_Actual_Array_Access;
Fld_8 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Entity_Defining_Name;
New_Struct_1 : Internal_Param_Actual;
Array_Lit_1 : Internal_Param_Actual_Array_Access;
Fld_10 : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Object_Decl;
Fld_11 : Internal_Entity_Defining_Name_List;
Fld_12 : Bare_Defining_Name_List;
Fld_13 : Internal_Entity_Info;
Item_1 : Internal_Entity_Defining_Name;
Bare_Item_1 : Bare_Defining_Name;
Fld_14 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Object_Decl;
Fld_15 : Internal_Entity_Expr;
New_Struct_2 : Internal_Param_Actual;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Param_Actual_Array_Access;
Fld_16 : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity_Formal_Subp_Decl;
Fld_17 : Internal_Entity_Defining_Name;
Fld_18 : Internal_Entity_Basic_Decl;
Fld_19 : Internal_Entity_Defining_Name;
Scope_Result : Internal_Entity_Defining_Name;
Result_Var : Internal_Entity_Defining_Name;
Fld_20 : Internal_Entity_Expr;
Cast_Result_5 : Internal_Entity_Expr;
Fld_21 : Internal_Entity_Expr;
Is_A : Boolean;
If_Result_1 : Internal_Entity_Expr;
New_Struct_3 : Internal_Param_Actual;
Let_Result : Internal_Param_Actual;
Array_Lit_2 : Internal_Param_Actual_Array_Access;
Match_Prefix : Internal_Entity;
Cast_Result_6 : Internal_Entity_Generic_Formal_Package;
Let_Result_1 : Internal_Param_Actual_Array_Access;
Scope_Result_1 : Internal_Param_Actual_Array_Access;
Cast_Result_7 : Internal_Entity_Generic_Formal_Type_Decl;
Let_Result_2 : Internal_Param_Actual_Array_Access;
Scope_Result_2 : Internal_Param_Actual_Array_Access;
Cast_Result_8 : Internal_Entity_Generic_Formal_Obj_Decl;
Let_Result_3 : Internal_Param_Actual_Array_Access;
Scope_Result_3 : Internal_Param_Actual_Array_Access;
Cast_Result_9 : Internal_Entity_Generic_Formal_Subp_Decl;
Let_Result_4 : Internal_Param_Actual_Array_Access;
Scope_Result_4 : Internal_Param_Actual_Array_Access;
Cast_Result_10 : Internal_Entity_Pragma_Node;
Let_Result_5 : Internal_Param_Actual_Array_Access;
Scope_Result_5 : Internal_Param_Actual_Array_Access;
Cast_Result_11 : Internal_Entity_Use_Clause;
Let_Result_6 : Internal_Param_Actual_Array_Access;
Scope_Result_6 : Internal_Param_Actual_Array_Access;
Cast_Result_12 : Internal_Entity;
Let_Result_7 : Internal_Param_Actual_Array_Access;
Scope_Result_7 : Internal_Param_Actual_Array_Access;
Match_Result : Internal_Param_Actual_Array_Access;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity;
Map_Result_1 : Internal_Param_Actual_Array_Access;
Index_3 : Integer;
Fld_22 : Internal_Entity_Defining_Name;
Fld_23 : Internal_Entity_Defining_Name;
Fld_24 : Internal_Entity_Expr;
Fld_25 : Internal_Entity_Expr;
New_Struct_4 : Internal_Param_Actual;
Map_Result_2 : Internal_Param_Actual_Array_Access;
Scope_Result_8 : Internal_Param_Actual_Array_Access;
Result_Var_1 : Internal_Param_Actual_Array_Access;
Let_Result_8 : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_979 is
            begin
                     Dec_Ref (Scope_Result_8);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Let_Result_8);
            end Finalizer_Scope_979;
            procedure Finalizer_Scope_2835 is
            begin
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_2835;
            procedure Finalizer_Scope_2836 is
            begin
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Let_Result_7);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_2836;
            procedure Finalizer_Scope_2837 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2837;
            procedure Finalizer_Scope_2838 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_2838;
            procedure Finalizer_Scope_2839 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_2839;
            procedure Finalizer_Scope_2841 is
            begin
                     Dec_Ref (Array_Lit_2);
            end Finalizer_Scope_2841;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 6617 '<Let at nodes.lkt:12130:9>' Let_Result_8 ada/nodes.lkt:12130
--# scope-start
--# expr-start 6575 '<FieldAccess for generic_inst_params at nodes.lkt:12130:18>' Fld ada/nodes.lkt:12130
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.generic_inst_params'
Fld := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Generic_Inst_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6575
Local_Ap := Fld; 
--# bind ap Local_Ap
--# expr-start 6576 '<FieldAccess for designated_generic_decl at nodes.lkt:12132:9>' Fld_1 ada/nodes.lkt:12132
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.designated_generic_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Designated_Generic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6576
Var_Expr_179 := Fld_1;
if Var_Expr_179 /= No_Entity_Generic_Decl then
   --# scope-start
--# expr-start 6616 '<Map at nodes.lkt:12132:9>' Map_Result_2 ada/nodes.lkt:12132
   --# expr-start 6610 '<Mapcat at nodes.lkt:12132:9>' Map_Result_1 ada/nodes.lkt:12132
   --# expr-start 6578 '<FieldAccess for decls at nodes.lkt:12132:9>' Fld_3 ada/nodes.lkt:12132
--# expr-start 6577 '<FieldAccess for formal_part at nodes.lkt:12132:9>' Fld_2 ada/nodes.lkt:12132
      if Var_Expr_179.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Generic_Formal_Part (Node => Var_Expr_179.Node.Generic_Decl_F_Formal_Part, Info => Var_Expr_179.Info);
--# expr-done 6577
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Ada_Node_List (Node => Fld_2.Node.Generic_Formal_Part_F_Decls, Info => Fld_2.Info);
--# expr-done 6578
Fld_4 := Fld_3.Node;
      declare
         Map_Result_1_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      if Fld_4 = null then
      Map_Result_1 := Create_Internal_Param_Actual_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_4;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity;
else
Fld_5 := Fld_3.Info;
As_Entity_1 := (Info => Fld_5, Node => Bare_Item_0); 
   If_Result_2 := As_Entity_1;
end if;
                  Item_0 := If_Result_2; 
   --# scope-start
               --# bind d Item_0
      --# expr-start 6609 '<Match at nodes.lkt:12135:13>' Match_Result ada/nodes.lkt:12135
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Generic_Formal_Package =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Generic_Formal_Package
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_6; 
--# bind t Match_0
--# expr-start 6583 '<ArrayLiteral at nodes.lkt:12137:21>' Array_Lit ada/nodes.lkt:12137
--# expr-start 6582 '<New ParamActual at nodes.lkt:12138:25>' New_Struct ada/nodes.lkt:12138
--# expr-start 6581 '<FieldAccess for name at nodes.lkt:12139:35>' Fld_7 ada/nodes.lkt:12139
--# expr-start 6580 '<Cast to GenericPackageInstantiation at nodes.lkt:12139:35>' Cast_Result ada/nodes.lkt:12139
--# expr-start 6579 '<FieldAccess for decl at nodes.lkt:12139:35>' Fld_6 ada/nodes.lkt:12139
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Basic_Decl (Node => Match_0.Node.Generic_Formal_F_Decl, Info => Match_0.Info);
--# expr-done 6579
   if Fld_6.Node = null
      or else Fld_6.Node.Kind in Ada_Generic_Package_Instantiation_Range
   then
      Cast_Result := Create_Internal_Entity_Generic_Package_Instantiation
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
   else
         Cast_Result := No_Entity_Generic_Package_Instantiation;
   end if;
--# expr-done 6580
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Defining_Name (Node => Cast_Result.Node.Generic_Package_Instantiation_F_Name, Info => Cast_Result.Info);
--# expr-done 6581
New_Struct := (Actual => No_Entity_Expr, Param => Fld_7); 
--# expr-done 6582
Array_Lit := Create_Internal_Param_Actual_Array (Internal_Internal_Param_Actual_Array'(1 => New_Struct)); 
--# expr-done 6583
Let_Result_1 := Array_Lit; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2837;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Generic_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Generic_Formal_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_7; 
--# bind t Match_1
--# expr-start 6588 '<ArrayLiteral at nodes.lkt:12144:21>' Array_Lit_1 ada/nodes.lkt:12144
--# expr-start 6587 '<New ParamActual at nodes.lkt:12145:25>' New_Struct_1 ada/nodes.lkt:12145
--# expr-start 6586 '<FieldAccess for name at nodes.lkt:12146:35>' Fld_9 ada/nodes.lkt:12146
--# expr-start 6585 '<Cast to BaseTypeDecl at nodes.lkt:12146:35>' Cast_Result_1 ada/nodes.lkt:12146
--# expr-start 6584 '<FieldAccess for decl at nodes.lkt:12146:35>' Fld_8 ada/nodes.lkt:12146
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Basic_Decl (Node => Match_1.Node.Generic_Formal_F_Decl, Info => Match_1.Info);
--# expr-done 6584
   if Fld_8.Node = null
      or else Fld_8.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
   else
         Cast_Result_1 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 6585
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Defining_Name (Node => Cast_Result_1.Node.Base_Type_Decl_F_Name, Info => Cast_Result_1.Info);
--# expr-done 6586
New_Struct_1 := (Actual => No_Entity_Expr, Param => Fld_9); 
--# expr-done 6587
Array_Lit_1 := Create_Internal_Param_Actual_Array (Internal_Internal_Param_Actual_Array'(1 => New_Struct_1)); 
--# expr-done 6588
Let_Result_2 := Array_Lit_1; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2838;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Generic_Formal_Obj_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Create_Internal_Entity_Generic_Formal_Obj_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_8; 
--# bind o Match_2
--# expr-start 6596 '<Map at nodes.lkt:12151:21>' Map_Result ada/nodes.lkt:12151
   --# expr-start 6591 '<FieldAccess for ids at nodes.lkt:12151:21>' Fld_11 ada/nodes.lkt:12151
--# expr-start 6590 '<Cast to ObjectDecl at nodes.lkt:12151:21>' Cast_Result_2 ada/nodes.lkt:12151
--# expr-start 6589 '<FieldAccess for decl at nodes.lkt:12151:21>' Fld_10 ada/nodes.lkt:12151
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Basic_Decl (Node => Match_2.Node.Generic_Formal_F_Decl, Info => Match_2.Info);
--# expr-done 6589
   if Fld_10.Node = null
      or else Fld_10.Node.Kind in Ada_Object_Decl_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Object_Decl
        (Node => Fld_10.Node,
         Info => Fld_10.Info);
   else
         Cast_Result_2 := No_Entity_Object_Decl;
   end if;
--# expr-done 6590
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Defining_Name_List (Node => Cast_Result_2.Node.Object_Decl_F_Ids, Info => Cast_Result_2.Info);
--# expr-done 6591
Fld_12 := Fld_11.Node;
      declare
         Map_Result_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      if Fld_12 = null then
      Map_Result := Create_Internal_Param_Actual_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Fld_12;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
Fld_13 := Fld_11.Info;
As_Entity := (Info => Fld_13, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind i Item_1
      --# expr-start 6595 '<New ParamActual at nodes.lkt:12153:25>' New_Struct_2 ada/nodes.lkt:12153
--# expr-start 6594 '<FieldAccess for default_expr at nodes.lkt:12155:36>' Fld_15 ada/nodes.lkt:12155
--# expr-start 6593 '<Cast to ObjectDecl at nodes.lkt:12155:36>' Cast_Result_3 ada/nodes.lkt:12155
--# expr-start 6592 '<FieldAccess for decl at nodes.lkt:12155:36>' Fld_14 ada/nodes.lkt:12155
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Basic_Decl (Node => Match_2.Node.Generic_Formal_F_Decl, Info => Match_2.Info);
--# expr-done 6592
   if Fld_14.Node = null
      or else Fld_14.Node.Kind in Ada_Object_Decl_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Object_Decl
        (Node => Fld_14.Node,
         Info => Fld_14.Info);
   else
         Cast_Result_3 := No_Entity_Object_Decl;
   end if;
--# expr-done 6593
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Expr (Node => Cast_Result_3.Node.Object_Decl_F_Default_Expr, Info => Cast_Result_3.Info);
--# expr-done 6594
New_Struct_2 := (Actual => Fld_15, Param => Item_1); 
--# expr-done 6595
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct_2;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6596
Let_Result_3 := Map_Result; Inc_Ref (Let_Result_3);
--# end
Scope_Result_3 := Let_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2839;
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
         when Ada_Generic_Formal_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Generic_Formal_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_9; 
--# bind sp Match_3
--# expr-start 6608 '<ArrayLiteral at nodes.lkt:12159:21>' Array_Lit_2 ada/nodes.lkt:12159
--# expr-start 6607 '<Let at nodes.lkt:12161:29>' Let_Result ada/nodes.lkt:12161
--# scope-start
--# expr-start 6598 '<Cast to FormalSubpDecl at nodes.lkt:12161:40>' Cast_Result_4 ada/nodes.lkt:12161
--# expr-start 6597 '<FieldAccess for decl at nodes.lkt:12161:40>' Fld_16 ada/nodes.lkt:12161
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Create_Internal_Entity_Basic_Decl (Node => Match_3.Node.Generic_Formal_F_Decl, Info => Match_3.Info);
--# expr-done 6597
   if Fld_16.Node = null
      or else Fld_16.Node.Kind in Ada_Formal_Subp_Decl
   then
      Cast_Result_4 := Create_Internal_Entity_Formal_Subp_Decl
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
   else
         Cast_Result_4 := No_Entity_Formal_Subp_Decl;
   end if;
--# expr-done 6598
Local_Subp := Cast_Result_4; 
--# bind subp Local_Subp
--# expr-start 6606 '<New ParamActual at nodes.lkt:12163:29>' New_Struct_3 ada/nodes.lkt:12163
--# expr-start 6604 '<If at nodes.lkt:12165:40>' If_Result_1 ada/nodes.lkt:12165
--# expr-start 6600 '<IsA BoxExpr at nodes.lkt:12165:43>' Is_A ada/nodes.lkt:12165
--# expr-start 6599 '<FieldAccess for default_expr at nodes.lkt:12165:43>' Fld_21 ada/nodes.lkt:12165
      if Local_Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Create_Internal_Entity_Expr (Node => Local_Subp.Node.Formal_Subp_Decl_F_Default_Expr, Info => Local_Subp.Info);
--# expr-done 6599
Is_A := Fld_21.Node /= null 
and then Fld_21.Node.Kind in Ada_Box_Expr_Range; 
--# expr-done 6600
if Is_A then
--# expr-start 6601 '<FieldAccess for designated_subprogram_from at nodes.lkt:12167:37>' Fld_18 ada/nodes.lkt:12167
      if Local_Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start FormalSubpDecl.designated_subprogram_from
Fld_18 := Libadalang.Implementation.Formal_Subp_Decl_P_Designated_Subprogram_From (Node => Local_Subp.Node, Inst => Ent, E_Info => Local_Subp.Info);
--# end
--# expr-done 6601
Var_Expr_180 := Fld_18;
if Var_Expr_180 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 6602 '<FieldAccess for defining_name at nodes.lkt:12167:37>' Fld_19 ada/nodes.lkt:12167
      if Var_Expr_180.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_19 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_180.Node, E_Info => Var_Expr_180.Info);
--# end
--# expr-done 6602
Scope_Result := Fld_19;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Defining_Name;
end if;
      Cast_Result_5 := Create_Internal_Entity_Expr
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   If_Result_1 := Cast_Result_5;
else
   --# expr-start 6603 '<FieldAccess for default_expr at nodes.lkt:12169:38>' Fld_20 ada/nodes.lkt:12169
      if Local_Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Create_Internal_Entity_Expr (Node => Local_Subp.Node.Formal_Subp_Decl_F_Default_Expr, Info => Local_Subp.Info);
--# expr-done 6603
   If_Result_1 := Fld_20;
end if;
--# expr-done 6604
--# expr-start 6605 '<FieldAccess for defining_name at nodes.lkt:12164:39>' Fld_17 ada/nodes.lkt:12164
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_17 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Match_3.Node, E_Info => Match_3.Info);
--# end
--# expr-done 6605
New_Struct_3 := (Actual => If_Result_1, Param => Fld_17); 
--# expr-done 6606
Let_Result := New_Struct_3; 
--# end
--# expr-done 6607
Array_Lit_2 := Create_Internal_Param_Actual_Array (Internal_Internal_Param_Actual_Array'(1 => Let_Result)); 
--# expr-done 6608
Let_Result_4 := Array_Lit_2; Inc_Ref (Let_Result_4);
--# end
Scope_Result_4 := Let_Result_4;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2841;
            Match_Result := Scope_Result_4; Inc_Ref (Match_Result);
         when Ada_Pragma_Node =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Create_Internal_Entity_Pragma_Node
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_10; 
--# bind _ Match_4
Let_Result_5 := No_Internal_Param_Actual_Array_Type; Inc_Ref (Let_Result_5);
--# end
Scope_Result_5 := Let_Result_5;
   Inc_Ref (Scope_Result_5);
   --# end
            Match_Result := Scope_Result_5; Inc_Ref (Match_Result);
         when Ada_Use_Package_Clause .. Ada_Use_Type_Clause =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Create_Internal_Entity_Use_Clause
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_11; 
--# bind _ Match_5
Let_Result_6 := No_Internal_Param_Actual_Array_Type; Inc_Ref (Let_Result_6);
--# end
Scope_Result_6 := Let_Result_6;
   Inc_Ref (Scope_Result_6);
   --# end
            Match_Result := Scope_Result_6; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Discriminant_Spec | Ada_Param_Spec .. Ada_Pp_Then_Kw | Ada_Private_Absent .. Ada_Until_Present | Ada_Value_Sequence .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_12 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_6 := Cast_Result_12; 
--# bind _ Match_6
Let_Result_7 := raise Property_Error with "unexpected declaration in generic formal part"; Inc_Ref (Let_Result_7);
--# end
Scope_Result_7 := Let_Result_7;
   Inc_Ref (Scope_Result_7);
   --# end
            Match_Result := Scope_Result_7; Inc_Ref (Match_Result);
end case;
--# expr-done 6609
         for Item_To_Append of
               Match_Result.Items
         loop
            Internal_Param_Actual_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2836;
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 6610
      declare
         Map_Result_2_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
         Index_3 := 0;
      declare
         Collection : constant Internal_Param_Actual_Array_Access := Map_Result_1;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind dp Item_2
               --# bind i Index_3
      --# expr-start 6615 '<New ParamActual at nodes.lkt:12183:13>' New_Struct_4 ada/nodes.lkt:12183
--# expr-start 6613 '<FieldAccess for actual_for_param_at at nodes.lkt:12186:24>' Fld_25 ada/nodes.lkt:12186
      if Local_Ap.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6611 '<FieldAccess for param at nodes.lkt:12186:47>' Fld_23 ada/nodes.lkt:12186
Fld_23 := Item_2.Param;
--# expr-done 6611
--# expr-start 6612 '<FieldAccess for actual at nodes.lkt:12186:60>' Fld_24 ada/nodes.lkt:12186
Fld_24 := Item_2.Actual;
--# expr-done 6612
--# property-call-start AssocList.actual_for_param_at
Fld_25 := Libadalang.Implementation.Assoc_List_P_Actual_For_Param_At (Node => Local_Ap.Node, Param => Fld_23, Pos => Index_3, Default_Expr => Fld_24, E_Info => Local_Ap.Info);
--# end
--# expr-done 6613
--# expr-start 6614 '<FieldAccess for param at nodes.lkt:12184:23>' Fld_22 ada/nodes.lkt:12184
Fld_22 := Item_2.Param;
--# expr-done 6614
New_Struct_4 := (Actual => Fld_25, Param => Fld_22); 
--# expr-done 6615
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct_4;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
               Index_3 := Index_3 + 1;
         end loop;
      end;
         Map_Result_2 := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 6616
Scope_Result_8 := Map_Result_2;
   Inc_Ref (Scope_Result_8);
   --# end
      Finalizer_Scope_2835;
   Result_Var_1 := Scope_Result_8;
else
   Result_Var_1 := No_Internal_Param_Actual_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Let_Result_8 := Result_Var_1; Inc_Ref (Let_Result_8);
--# end
--# expr-done 6617
         Property_Result := Let_Result_8;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_979;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_979;
                     Finalizer_Scope_2835;
                     Finalizer_Scope_2836;
                     Finalizer_Scope_2837;
                     Finalizer_Scope_2838;
                     Finalizer_Scope_2839;
                     Finalizer_Scope_2841;
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Inst_Params;
--# end
--# property-start GenericInstantiation.actual_for_formal ada/nodes.lkt:12194
pragma Warnings (Off, "is not referenced");
 function Generic_Instantiation_P_Actual_For_Formal
  (Node : Bare_Generic_Instantiation
      ; Formal_Name : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind formal_name Formal_Name
   Property_Result : Internal_Entity_Expr;
            procedure Finalizer_Scope_2847 with Inline_Always;
      Local_Gen_Decl : Internal_Entity_Generic_Decl;
Var_Expr_1 : Internal_Param_Match;
Var_Expr_181 : Internal_Entity_Generic_Decl;
Fld : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Generic_Decl;
Fld_1 : Internal_Entity_Generic_Formal_Part;
Fld_2 : Internal_Entity_Assoc_List;
Fld_3 : Internal_Param_Match_Array_Access;
Fld_4 : Internal_Entity_Defining_Name;
Fld_5 : Bare_Defining_Name;
Cast_Result_1 : Bare_Defining_Name;
Is_Equal : Boolean;
Find_Result : Internal_Param_Match;
Fld_6 : Internal_Single_Actual;
Fld_7 : Internal_Entity_Basic_Assoc;
Fld_8 : Internal_Entity_Expr;
Scope_Result : Internal_Entity_Expr;
Result_Var : Internal_Entity_Expr;
Scope_Result_1 : Internal_Entity_Expr;
Result_Var_1 : Internal_Entity_Expr;
Let_Result : Internal_Entity_Expr;
            procedure Finalizer_Scope_2847 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2847;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6630 '<Let at nodes.lkt:12195:9>' Let_Result ada/nodes.lkt:12195
--# scope-start
--# expr-start 6619 '<Cast to GenericDecl at nodes.lkt:12195:24>' Cast_Result ada/nodes.lkt:12195
--# expr-start 6618 '<FieldAccess for nonbound_generic_decl_from_self at nodes.lkt:12195:24>' Fld ada/nodes.lkt:12195
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.nonbound_generic_decl_from_self
Fld := Libadalang.Implementation.Generic_Instantiation_P_Nonbound_Generic_Decl_From_Self (Node => Self);
--# end
--# expr-done 6618
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Generic_Decl
   then
      Cast_Result := Create_Internal_Entity_Generic_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Generic_Decl;
   end if;
--# expr-done 6619
Local_Gen_Decl := Cast_Result; 
--# bind gen_decl Local_Gen_Decl
Var_Expr_181 := Local_Gen_Decl;
if Var_Expr_181 /= No_Entity_Generic_Decl then
   --# scope-start
--# expr-start 6626 '<Find at nodes.lkt:12197:9>' Find_Result ada/nodes.lkt:12197
   --# expr-start 6622 '<FieldAccess for match_param_list at nodes.lkt:12197:9>' Fld_3 ada/nodes.lkt:12197
--# expr-start 6620 '<FieldAccess for formal_part at nodes.lkt:12197:9>' Fld_1 ada/nodes.lkt:12197
      if Var_Expr_181.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Generic_Formal_Part (Node => Var_Expr_181.Node.Generic_Decl_F_Formal_Part, Info => Var_Expr_181.Info);
--# expr-done 6620
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6621 '<FieldAccess for generic_inst_params at nodes.lkt:12198:13>' Fld_2 ada/nodes.lkt:12198
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.generic_inst_params'
Fld_2 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Generic_Inst_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6621
--# property-call-start BaseFormalParamHolder.match_param_list
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Param_List (Node => Fld_1.Node, Params => Fld_2, Is_Dottable_Subp => False, E_Info => Fld_1.Info);
--# end
--# expr-done 6622
      Find_Result := No_Param_Match;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_3;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_0
      --# expr-start 6625 '<Eq at nodes.lkt:12201:23>' Is_Equal ada/nodes.lkt:12201
--# expr-start 6624 '<FieldAccess for node at nodes.lkt:12201:23>' Fld_5 ada/nodes.lkt:12201
--# expr-start 6623 '<FieldAccess for formal at nodes.lkt:12201:23>' Fld_4 ada/nodes.lkt:12201
Fld_4 := Item_0.Formal;
--# expr-done 6623
Fld_5 := Fld_4.Node;
--# expr-done 6624
      Cast_Result_1 := Fld_5;
Is_Equal := Cast_Result_1 = Formal_Name; 
--# expr-done 6625
      if Is_Equal then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_Equal;
         end loop;
      end;
--# expr-done 6626
Var_Expr_1 := Find_Result;
if Var_Expr_1 /= No_Param_Match then
   --# scope-start
   --# bind pm Var_Expr_1
--# expr-start 6629 '<FieldAccess for expr at nodes.lkt:12202:21>' Fld_8 ada/nodes.lkt:12202
--# expr-start 6628 '<FieldAccess for assoc at nodes.lkt:12202:21>' Fld_7 ada/nodes.lkt:12202
--# expr-start 6627 '<FieldAccess for actual at nodes.lkt:12202:21>' Fld_6 ada/nodes.lkt:12202
Fld_6 := Var_Expr_1.Actual;
--# expr-done 6627
Fld_7 := Fld_6.Assoc;
--# expr-done 6628
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_8 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 6629
Scope_Result := Fld_8;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Expr;
end if;
Scope_Result_1 := Result_Var;
   --# end
      Finalizer_Scope_2847;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Expr;
end if;
Let_Result := Result_Var_1; 
--# end
--# expr-done 6630
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2847;
            raise;
      end;
   return Property_Result;
end Generic_Instantiation_P_Actual_For_Formal;
--# end
--# property-start GenericInstantiation._env_do_164 ada/nodes.lkt:12206
pragma Warnings (Off, "is not referenced");
 function Env_Do_164
  (Node : Bare_Generic_Instantiation
  )
   return Boolean
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6631 '<FieldAccess for env_hook at nodes.lkt:12206:12>' Fld ada/nodes.lkt:12206
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6631
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_164;
--# end
--# property-start GenericInstantiation._env_init_165 ada/nodes.lkt:12208
pragma Warnings (Off, "is not referenced");
 function Env_Init_165
  (Node : Bare_Generic_Instantiation
  )
   return Internal_Designated_Env
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1829 with Inline_Always;
            procedure Finalizer_Scope_2850 with Inline_Always;
      Var_Expr_0 : Symbol_Type;
Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1829 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1829;
            procedure Finalizer_Scope_2850 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_2850;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6632 '<FieldAccess for initial_env_name at nodes.lkt:12208:13>' Fld ada/nodes.lkt:12208
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.initial_env_name
Fld := Libadalang.Implementation.Generic_Instantiation_P_Initial_Env_Name (Node => Self);
--# end
--# expr-done 6632
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind non_null_name Var_Expr_0
--# expr-start 6633 '<New DesignatedEnv at nodes.lkt:12210:17>' New_Struct ada/nodes.lkt:12210
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Var_Expr_0, Kind => Named_Env); 
--# expr-done 6633
Scope_Result := New_Struct;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2850;
   Result_Var := Scope_Result;
else
   --# expr-start 6634 '<New DesignatedEnv at nodes.lkt:12215:29>' New_Struct_1 ada/nodes.lkt:12215
Inc_Ref (Empty_Env);
New_Struct_1 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6634
   Result_Var := New_Struct_1;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1829;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1829;
                     Finalizer_Scope_2850;
            raise;
      end;
   return Property_Result;
end Env_Init_165;
--# end
--# property-start GenericInstantiation._env_mappings_166 ada/nodes.lkt:12222
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_166
  (Node : Bare_Generic_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
     Ent : Internal_Entity_Generic_Instantiation :=
       Internal_Entity_Generic_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1830 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Generic_Instantiation;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1830 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1830;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6637 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6635 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6635
--# expr-start 6636 '<FieldAccess for name_symbol at nodes.lkt:12222:23>' Fld ada/nodes.lkt:12222
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 6636
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6637
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1830;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1830;
            raise;
      end;
   return Property_Result;
end Env_Mappings_166;
--# end
--# property-start GenericInstantiation._env_trans_parent_167 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_167
  (Node : Bare_Generic_Instantiation
  )
   return Boolean
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_167;
--# end
--# property-start GenericInstantiation._env_names_168 ada/nodes.lkt:12223
pragma Warnings (Off, "is not referenced");
 function Env_Names_168
  (Node : Bare_Generic_Instantiation
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1832 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1832 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1832;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6638 '<FieldAccess for env_names at nodes.lkt:12223:23>' Fld ada/nodes.lkt:12223
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.env_names
Fld := Libadalang.Implementation.Generic_Instantiation_P_Env_Names (Node => Self);
--# end
--# expr-done 6638
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1832;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1832;
            raise;
      end;
   return Property_Result;
end Env_Names_168;
--# end
--# property-start GenericInstantiation._env_do_169 ada/nodes.lkt:12224
pragma Warnings (Off, "is not referenced");
 function Env_Do_169
  (Node : Bare_Generic_Instantiation
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1833 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1833 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1833;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6639 '<FieldAccess for populate_dependent_units at nodes.lkt:12224:12>' Fld ada/nodes.lkt:12224
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6639
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1833;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1833;
            raise;
      end;
   return Property_Result;
end Env_Do_169;
--# end
--# property-start GenericInstantiation._ref_env_nodes_170 ada/nodes.lkt:12226
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_170
  (Node : Bare_Generic_Instantiation
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1834 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1834 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1834;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6640 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:12226:13>' Fld ada/nodes.lkt:12226
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6640
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1834;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1834;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_170;
--# end
--# property-start GenericInstantiation._ref_cond_171 ada/nodes.lkt:12228
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_171
  (Node : Bare_Generic_Instantiation
  )
   return Boolean
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6642 '<IsA LibraryItem, Subunit at nodes.lkt:12228:18>' Is_A ada/nodes.lkt:12228
--# expr-start 6641 '<parent at nodes.lkt:12228:18>' Fld ada/nodes.lkt:12228
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6641
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6642
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_171;
--# end
--# property-start GenericInstantiation._ref_env_nodes_172 ada/nodes.lkt:12231
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_172
  (Node : Bare_Generic_Instantiation
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1836 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1836 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1836;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6643 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:12231:13>' Fld ada/nodes.lkt:12231
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6643
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1836;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1836;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_172;
--# end
--# property-start GenericInstantiation._ref_cond_173 ada/nodes.lkt:12233
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_173
  (Node : Bare_Generic_Instantiation
  )
   return Boolean
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6645 '<IsA LibraryItem, Subunit at nodes.lkt:12233:18>' Is_A ada/nodes.lkt:12233
--# expr-start 6644 '<parent at nodes.lkt:12233:18>' Fld ada/nodes.lkt:12233
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6644
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6645
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_173;
--# end
--# property-start GenericInstantiation._ref_env_nodes_174 ada/nodes.lkt:12236
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_174
  (Node : Bare_Generic_Instantiation
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1838 with Inline_Always;
      Cast_Expr : Bare_Generic_Instantiation;
Cast_Result : Bare_Ada_Node;
Array_Lit : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1838 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1838;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6647 '<ArrayLiteral at nodes.lkt:12236:13>' Array_Lit ada/nodes.lkt:12236
--# expr-start 6646 '<Cast to AdaNode at nodes.lkt:12236:14>' Cast_Result ada/nodes.lkt:12236
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# expr-done 6646
Array_Lit := Create_Bare_Ada_Node_Array (Internal_Bare_Ada_Node_Array'(1 => Cast_Result)); 
--# expr-done 6647
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1838;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1838;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_174;
--# end
--# property-start GenericInstantiation._ref_cond_175 ada/nodes.lkt:12238
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_175
  (Node : Bare_Generic_Instantiation
  )
   return Boolean
is
   Self : Bare_Generic_Instantiation  := Bare_Generic_Instantiation (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6649 '<IsA LibraryItem, Subunit at nodes.lkt:12238:18>' Is_A ada/nodes.lkt:12238
--# expr-start 6648 '<parent at nodes.lkt:12238:18>' Fld ada/nodes.lkt:12238
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6648
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6649
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_175;
--# end
function Generic_Instantiation_P_Instantiation_Bindings
  (E : Entity
  ) return Internal_Inner_Env_Assoc_Array_Access
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Generic_Instantiation
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Internal_Inner_Env_Assoc_Array_Access :=
         Generic_Instantiation_P_Instantiation_Bindings (E.Node, E_Info);
   begin
         return Result;
   end;
end;
function Generic_Instantiation_P_Parent_Instantiation_Env
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Generic_Instantiation
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Lexical_Env :=
         Generic_Instantiation_P_Parent_Instantiation_Env (E.Node, E_Info);
   begin
         return Result;
   end;
end;
   --
   --  Primitives for Bare_Generic_Package_Instantiation
   --
      procedure Initialize_Fields_For_Generic_Package_Instantiation
        (Self : Bare_Generic_Package_Instantiation
         ; Generic_Package_Instantiation_F_Name : Bare_Defining_Name
         ; Generic_Package_Instantiation_F_Generic_Pkg_Name : Bare_Name
         ; Generic_Package_Instantiation_F_Params : Bare_Assoc_List
         ; Generic_Package_Instantiation_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Generic_Instantiation
              (Self);
            Self.Generic_Package_Instantiation_F_Name := Generic_Package_Instantiation_F_Name;
            Self.Generic_Package_Instantiation_F_Generic_Pkg_Name := Generic_Package_Instantiation_F_Generic_Pkg_Name;
            Self.Generic_Package_Instantiation_F_Params := Generic_Package_Instantiation_F_Params;
            Self.Generic_Package_Instantiation_F_Aspects := Generic_Package_Instantiation_F_Aspects;
      end Initialize_Fields_For_Generic_Package_Instantiation;
   function Generic_Package_Instantiation_F_Name
     (Node : Bare_Generic_Package_Instantiation) return Bare_Defining_Name
   is
   begin
         return Node.Generic_Package_Instantiation_F_Name;
   end;
   function Generic_Package_Instantiation_F_Generic_Pkg_Name
     (Node : Bare_Generic_Package_Instantiation) return Bare_Name
   is
   begin
         return Node.Generic_Package_Instantiation_F_Generic_Pkg_Name;
   end;
   function Generic_Package_Instantiation_F_Params
     (Node : Bare_Generic_Package_Instantiation) return Bare_Assoc_List
   is
   begin
         return Node.Generic_Package_Instantiation_F_Params;
   end;
--# property-start GenericPackageInstantiation.generic_entity_name ada/nodes.lkt:12254
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Instantiation_P_Generic_Entity_Name
  (Node : Bare_Generic_Package_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Generic_Package_Instantiation  := Bare_Generic_Package_Instantiation (Node);
     Ent : Internal_Entity_Generic_Package_Instantiation :=
       Internal_Entity_Generic_Package_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6650 '<FieldAccess for generic_pkg_name at nodes.lkt:12254:47>' Fld ada/nodes.lkt:12254
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Generic_Package_Instantiation_F_Generic_Pkg_Name, Info => Ent.Info);
--# expr-done 6650
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Package_Instantiation_P_Generic_Entity_Name;
--# end
--# property-start GenericPackageInstantiation.generic_inst_params ada/nodes.lkt:12256
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Instantiation_P_Generic_Inst_Params
  (Node : Bare_Generic_Package_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Assoc_List
is
   Self : Bare_Generic_Package_Instantiation  := Bare_Generic_Package_Instantiation (Node);
     Ent : Internal_Entity_Generic_Package_Instantiation :=
       Internal_Entity_Generic_Package_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Assoc_List;
      Fld : Internal_Entity_Assoc_List;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6651 '<FieldAccess for params at nodes.lkt:12256:52>' Fld ada/nodes.lkt:12256
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Generic_Package_Instantiation_F_Params, Info => Ent.Info);
--# expr-done 6651
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Package_Instantiation_P_Generic_Inst_Params;
--# end
--# property-start GenericPackageInstantiation.designated_package ada/nodes.lkt:12258
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Instantiation_P_Designated_Package
  (Node : Bare_Generic_Package_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Package_Decl
is
   Self : Bare_Generic_Package_Instantiation  := Bare_Generic_Package_Instantiation (Node);
     Ent : Internal_Entity_Generic_Package_Instantiation :=
       Internal_Entity_Generic_Package_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Package_Decl;
            procedure Finalizer_Scope_2851 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Bare_Basic_Decl;
Cast_Result : Bare_Generic_Package_Decl;
Fld_2 : Bare_Generic_Package_Internal;
Fld_3 : Internal_Entity_Info;
Fld_4 : Internal_Metadata;
Fld_5 : Internal_Entity_Info;
Fld_6 : Env_Rebindings;
Fld_7 : Internal_Entity_Info;
Fld_8 : Env_Rebindings;
Fld_9 : Env_Rebindings;
Fld_10 : Bare_Basic_Decl;
Fld_11 : Lexical_Env := Empty_Env;
Fld_12 : Lexical_Env := Empty_Env;
Fld_13 : Env_Rebindings;
Fld_14 : Internal_Entity_Info;
Fld_15 : Boolean;
New_Struct : Internal_Entity_Info;
Cast_Result_1 : Bare_Base_Package_Decl;
New_Struct_1 : Internal_Entity_Base_Package_Decl;
Scope_Result : Internal_Entity_Base_Package_Decl;
Result_Var : Internal_Entity_Base_Package_Decl;
            procedure Finalizer_Scope_2851 is
            begin
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
            end Finalizer_Scope_2851;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6652 '<FieldAccess for nonbound_generic_decl_from_entity at nodes.lkt:12259:9>' Fld ada/nodes.lkt:12259
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.nonbound_generic_decl_from_entity
Fld := Libadalang.Implementation.Generic_Instantiation_P_Nonbound_Generic_Decl_From_Entity (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6652
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 6670 '<New BasePackageDecl.entity at nodes.lkt:12261:13>' New_Struct_1 ada/nodes.lkt:12261
--# expr-start 6666 '<New EntityInfo at nodes.lkt:12263:22>' New_Struct ada/nodes.lkt:12263
--# expr-start 6654 '<FieldAccess for from_rebound at nodes.lkt:12282:34>' Fld_15 ada/nodes.lkt:12282
--# expr-start 6653 '<FieldAccess for info at nodes.lkt:12282:34>' Fld_14 ada/nodes.lkt:12282
Fld_14 := Var_Expr_0.Info;
--# expr-done 6653
Fld_15 := Fld_14.From_Rebound;
--# expr-done 6654
--# expr-start 6656 '<FieldAccess for md at nodes.lkt:12264:24>' Fld_4 ada/nodes.lkt:12264
--# expr-start 6655 '<FieldAccess for info at nodes.lkt:12264:24>' Fld_3 ada/nodes.lkt:12264
Fld_3 := Var_Expr_0.Info;
--# expr-done 6655
Fld_4 := Fld_3.Md;
--# expr-done 6656
--# expr-start 6665 '<FieldAccess for add_rebinding at nodes.lkt:12265:32>' Fld_13 ada/nodes.lkt:12265
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6661 '<FieldAccess for insert_rebindings at nodes.lkt:12269:25>' Fld_9 ada/nodes.lkt:12269
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6658 '<FieldAccess for rebindings at nodes.lkt:12270:29>' Fld_6 ada/nodes.lkt:12270
--# expr-start 6657 '<FieldAccess for info at nodes.lkt:12270:29>' Fld_5 ada/nodes.lkt:12270
Fld_5 := Var_Expr_0.Info;
--# expr-done 6657
Fld_6 := Fld_5.Rebindings;
--# expr-done 6658
--# expr-start 6660 '<FieldAccess for rebindings at nodes.lkt:12271:29>' Fld_8 ada/nodes.lkt:12271
--# expr-start 6659 '<FieldAccess for info at nodes.lkt:12271:29>' Fld_7 ada/nodes.lkt:12271
Fld_7 := Ent.Info;
--# expr-done 6659
Fld_8 := Fld_7.Rebindings;
--# expr-done 6660
--# property-call-start AdaNode.insert_rebindings
Fld_9 := Libadalang.Implementation.Ada_Node_P_Insert_Rebindings (Node => Self, Base => Fld_6, To_Insert => Fld_8);
--# end
--# expr-done 6661
--# expr-start 6663 '<FieldAccess for children_env at nodes.lkt:12279:25>' Fld_11 ada/nodes.lkt:12279
--# expr-start 6662 '<FieldAccess for node at nodes.lkt:12279:25>' Fld_10 ada/nodes.lkt:12279
Fld_10 := Var_Expr_0.Node;
--# expr-done 6662
      if Fld_10 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Children_Env (Node => Fld_10);
--# expr-done 6663
--# expr-start 6664 '<FieldAccess for instantiation_env at nodes.lkt:12280:25>' Fld_12 ada/nodes.lkt:12280
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.instantiation_env
Fld_12 := Libadalang.Implementation.Generic_Instantiation_F_Instantiation_Env (Node => Self);
--# end
--# expr-done 6664
--# property-call-start AdaNode.add_rebinding
Fld_13 := Libadalang.Implementation.Ada_Node_P_Add_Rebinding (Node => Self, Base => Fld_9, Old_Env => Fld_11, New_Env => Fld_12);
--# end
--# expr-done 6665
New_Struct := (From_Rebound => Fld_15, Md => Fld_4, Rebindings => Fld_13); 
--# expr-done 6666
--# expr-start 6669 '<FieldAccess for package_decl at nodes.lkt:12262:22>' Fld_2 ada/nodes.lkt:12262
--# expr-start 6668 '<Cast to GenericPackageDecl at nodes.lkt:12262:22>' Cast_Result ada/nodes.lkt:12262
--# expr-start 6667 '<FieldAccess for node at nodes.lkt:12262:22>' Fld_1 ada/nodes.lkt:12262
Fld_1 := Var_Expr_0.Node;
--# expr-done 6667
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Generic_Package_Decl_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 6668
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Generic_Package_Decl_F_Package_Decl;
--# expr-done 6669
      Cast_Result_1 := Fld_2;
New_Struct_1 := (Info => New_Struct, Node => Cast_Result_1); 
--# expr-done 6670
Scope_Result := New_Struct_1;
   --# end
      Finalizer_Scope_2851;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Package_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2851;
            raise;
      end;
   return Property_Result;
end Generic_Package_Instantiation_P_Designated_Package;
--# end
--# property-start GenericPackageInstantiation.designated_generic_decl ada/nodes.lkt:12287
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Instantiation_P_Designated_Generic_Decl
  (Node : Bare_Generic_Package_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Generic_Decl
is
   Self : Bare_Generic_Package_Instantiation  := Bare_Generic_Package_Instantiation (Node);
     Ent : Internal_Entity_Generic_Package_Instantiation :=
       Internal_Entity_Generic_Package_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Generic_Decl;
      Fld : Internal_Entity_Base_Package_Decl;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Generic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6673 '<Cast to GenericDecl at nodes.lkt:12288:9>' Cast_Result ada/nodes.lkt:12288
--# expr-start 6672 '<parent at nodes.lkt:12288:9>' Fld_1 ada/nodes.lkt:12288
--# expr-start 6671 '<FieldAccess for designated_package at nodes.lkt:12288:9>' Fld ada/nodes.lkt:12288
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericPackageInstantiation.designated_package
Fld := Libadalang.Implementation.Generic_Package_Instantiation_P_Designated_Package (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6671
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 6672
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Generic_Decl
   then
      Cast_Result := Create_Internal_Entity_Generic_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 6673
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Package_Instantiation_P_Designated_Generic_Decl;
--# end
--# property-start GenericPackageInstantiation.defining_env_impl ada/nodes.lkt:12297
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Instantiation_P_Defining_Env_Impl
  (Node : Bare_Generic_Package_Instantiation
      ; Inst_From_Formal : Boolean
         := False
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Generic_Package_Instantiation  := Bare_Generic_Package_Instantiation (Node);
     Ent : Internal_Entity_Generic_Package_Instantiation :=
       Internal_Entity_Generic_Package_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind inst_from_formal Inst_From_Formal
   --# bind origin Origin
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_985 with Inline_Always;
      Local_Dp : Internal_Entity_Base_Package_Decl;
Fld : Internal_Entity_Base_Package_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity;
Fld_3 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Fld_4 : Lexical_Env := Empty_Env;
Fld_5 : Boolean;
If_Result : Boolean;
If_Result_1 : Lexical_Env := Empty_Env;
Fld_6 : Lexical_Env := Empty_Env;
Array_Lit_1 : Lexical_Env_Array_Access;
Group_Env_1 : Lexical_Env := Empty_Env;
Is_Null : Boolean;
If_Result_2 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_985 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
                     Dec_Ref (Fld_4);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Group_Env_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_985;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6689 '<Let at nodes.lkt:12298:9>' Let_Result ada/nodes.lkt:12298
--# scope-start
--# expr-start 6674 '<FieldAccess for designated_package at nodes.lkt:12298:18>' Fld ada/nodes.lkt:12298
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericPackageInstantiation.designated_package
Fld := Libadalang.Implementation.Generic_Package_Instantiation_P_Designated_Package (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6674
Local_Dp := Fld; 
--# bind dp Local_Dp
--# expr-start 6688 '<If at nodes.lkt:12319:9>' If_Result_2 ada/nodes.lkt:12319
--# expr-start 6675 '<IsNull at nodes.lkt:12319:12>' Is_Null ada/nodes.lkt:12319
Is_Null := Local_Dp.Node = null; 
--# expr-done 6675
if Is_Null then
   If_Result_2 := Empty_Env;
else
   --# expr-start 6687 '<env_group at nodes.lkt:12321:13>' Group_Env_1 ada/nodes.lkt:12321
--# expr-start 6686 '<ArrayLiteral at nodes.lkt:12321:13>' Array_Lit_1 ada/nodes.lkt:12321
--# expr-start 6684 '<If at nodes.lkt:12322:17>' If_Result_1 ada/nodes.lkt:12322
--# expr-start 6677 '<BooleanBinaryOp Or at nodes.lkt:12322:20>' If_Result ada/nodes.lkt:12322
--# expr-start 6676 '<FieldAccess for is_formal at nodes.lkt:12322:20>' Fld_5 ada/nodes.lkt:12322
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_formal
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Is_Formal (Node => Self);
--# end
--# expr-done 6676
if Fld_5 then
   If_Result := True;
else
   If_Result := Inst_From_Formal;
end if;
--# expr-done 6677
if If_Result then
   --# expr-start 6682 '<env_group at nodes.lkt:12323:22>' Group_Env ada/nodes.lkt:12323
--# expr-start 6681 '<ArrayLiteral at nodes.lkt:12323:22>' Array_Lit ada/nodes.lkt:12323
--# expr-start 6678 '<FieldAccess for children_env at nodes.lkt:12323:23>' Fld_1 ada/nodes.lkt:12323
      if Local_Dp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Local_Dp.Node, E_Info => Local_Dp.Info);
--# expr-done 6678
--# expr-start 6680 '<FieldAccess for children_env at nodes.lkt:12323:40>' Fld_3 ada/nodes.lkt:12323
--# expr-start 6679 '<parent at nodes.lkt:12323:40>' Fld_2 ada/nodes.lkt:12323
      if Local_Dp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Local_Dp.Node, E_Info => Local_Dp.Info);
--# expr-done 6679
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# expr-done 6680
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_1, 2 => Fld_3)); 
--# expr-done 6681
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 6682
   If_Result_1 := Group_Env;
else
   --# expr-start 6683 '<FieldAccess for children_env at nodes.lkt:12324:22>' Fld_4 ada/nodes.lkt:12324
      if Local_Dp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Children_Env (Node => Local_Dp.Node, E_Info => Local_Dp.Info);
--# expr-done 6683
   If_Result_1 := Fld_4;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 6684
--# expr-start 6685 '<FieldAccess for children_env at nodes.lkt:12335:17>' Fld_6 ada/nodes.lkt:12335
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6685
Array_Lit_1 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => If_Result_1, 2 => Fld_6)); 
--# expr-done 6686
Group_Env_1 := Group (Array_Lit_1, No_Metadata); 
--# expr-done 6687
   If_Result_2 := Group_Env_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 6688
Let_Result := If_Result_2; Inc_Ref (Let_Result);
--# end
--# expr-done 6689
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_985;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_985;
            raise;
      end;
   return Property_Result;
end Generic_Package_Instantiation_P_Defining_Env_Impl;
--# end
--# property-start GenericPackageInstantiation.defining_env ada/nodes.lkt:12343
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Instantiation_P_Defining_Env
  (Node : Bare_Generic_Package_Instantiation
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Generic_Package_Instantiation  := Bare_Generic_Package_Instantiation (Node);
     Ent : Internal_Entity_Generic_Package_Instantiation :=
       Internal_Entity_Generic_Package_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_986 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_986 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_986;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6690 '<FieldAccess for defining_env_impl at nodes.lkt:12343:38>' Fld ada/nodes.lkt:12343
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericPackageInstantiation.defining_env_impl
Fld := Libadalang.Implementation.Generic_Package_Instantiation_P_Defining_Env_Impl (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 6690
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_986;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_986;
            raise;
      end;
   return Property_Result;
end Generic_Package_Instantiation_P_Defining_Env;
--# end
--# property-start GenericPackageInstantiation.defining_names ada/nodes.lkt:12345
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Instantiation_P_Defining_Names
  (Node : Bare_Generic_Package_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Generic_Package_Instantiation  := Bare_Generic_Package_Instantiation (Node);
     Ent : Internal_Entity_Generic_Package_Instantiation :=
       Internal_Entity_Generic_Package_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_987 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_987 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_987;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6692 '<ArrayLiteral at nodes.lkt:12345:57>' Array_Lit ada/nodes.lkt:12345
--# expr-start 6691 '<FieldAccess for name at nodes.lkt:12345:58>' Fld ada/nodes.lkt:12345
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Generic_Package_Instantiation_F_Name, Info => Ent.Info);
--# expr-done 6691
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6692
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_987;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_987;
            raise;
      end;
   return Property_Result;
end Generic_Package_Instantiation_P_Defining_Names;
--# end
   --
   --  Primitives for Bare_Generic_Subp_Instantiation
   --
      procedure Initialize_Fields_For_Generic_Subp_Instantiation
        (Self : Bare_Generic_Subp_Instantiation
         ; Generic_Subp_Instantiation_F_Overriding : Bare_Overriding_Node
         ; Generic_Subp_Instantiation_F_Kind : Bare_Subp_Kind
         ; Generic_Subp_Instantiation_F_Subp_Name : Bare_Defining_Name
         ; Generic_Subp_Instantiation_F_Generic_Subp_Name : Bare_Name
         ; Generic_Subp_Instantiation_F_Params : Bare_Assoc_List
         ; Generic_Subp_Instantiation_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Generic_Instantiation
              (Self);
            Self.Generic_Subp_Instantiation_F_Overriding := Generic_Subp_Instantiation_F_Overriding;
            Self.Generic_Subp_Instantiation_F_Kind := Generic_Subp_Instantiation_F_Kind;
            Self.Generic_Subp_Instantiation_F_Subp_Name := Generic_Subp_Instantiation_F_Subp_Name;
            Self.Generic_Subp_Instantiation_F_Generic_Subp_Name := Generic_Subp_Instantiation_F_Generic_Subp_Name;
            Self.Generic_Subp_Instantiation_F_Params := Generic_Subp_Instantiation_F_Params;
            Self.Generic_Subp_Instantiation_F_Aspects := Generic_Subp_Instantiation_F_Aspects;
      end Initialize_Fields_For_Generic_Subp_Instantiation;
   function Generic_Subp_Instantiation_F_Overriding
     (Node : Bare_Generic_Subp_Instantiation) return Bare_Overriding_Node
   is
   begin
         return Node.Generic_Subp_Instantiation_F_Overriding;
   end;
   function Generic_Subp_Instantiation_F_Kind
     (Node : Bare_Generic_Subp_Instantiation) return Bare_Subp_Kind
   is
   begin
         return Node.Generic_Subp_Instantiation_F_Kind;
   end;
   function Generic_Subp_Instantiation_F_Subp_Name
     (Node : Bare_Generic_Subp_Instantiation) return Bare_Defining_Name
   is
   begin
         return Node.Generic_Subp_Instantiation_F_Subp_Name;
   end;
   function Generic_Subp_Instantiation_F_Generic_Subp_Name
     (Node : Bare_Generic_Subp_Instantiation) return Bare_Name
   is
   begin
         return Node.Generic_Subp_Instantiation_F_Generic_Subp_Name;
   end;
   function Generic_Subp_Instantiation_F_Params
     (Node : Bare_Generic_Subp_Instantiation) return Bare_Assoc_List
   is
   begin
         return Node.Generic_Subp_Instantiation_F_Params;
   end;
--# property-start GenericSubpInstantiation.defining_names ada/nodes.lkt:12363
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Instantiation_P_Defining_Names
  (Node : Bare_Generic_Subp_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Generic_Subp_Instantiation  := Bare_Generic_Subp_Instantiation (Node);
     Ent : Internal_Entity_Generic_Subp_Instantiation :=
       Internal_Entity_Generic_Subp_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_988 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_988 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_988;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6694 '<ArrayLiteral at nodes.lkt:12363:57>' Array_Lit ada/nodes.lkt:12363
--# expr-start 6693 '<FieldAccess for subp_name at nodes.lkt:12363:58>' Fld ada/nodes.lkt:12363
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Generic_Subp_Instantiation_F_Subp_Name, Info => Ent.Info);
--# expr-done 6693
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6694
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_988;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_988;
            raise;
      end;
   return Property_Result;
end Generic_Subp_Instantiation_P_Defining_Names;
--# end
--# property-start GenericSubpInstantiation.generic_entity_name ada/nodes.lkt:12365
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Instantiation_P_Generic_Entity_Name
  (Node : Bare_Generic_Subp_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Generic_Subp_Instantiation  := Bare_Generic_Subp_Instantiation (Node);
     Ent : Internal_Entity_Generic_Subp_Instantiation :=
       Internal_Entity_Generic_Subp_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6695 '<FieldAccess for generic_subp_name at nodes.lkt:12365:47>' Fld ada/nodes.lkt:12365
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Generic_Subp_Instantiation_F_Generic_Subp_Name, Info => Ent.Info);
--# expr-done 6695
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Instantiation_P_Generic_Entity_Name;
--# end
--# property-start GenericSubpInstantiation.generic_inst_params ada/nodes.lkt:12367
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Instantiation_P_Generic_Inst_Params
  (Node : Bare_Generic_Subp_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Assoc_List
is
   Self : Bare_Generic_Subp_Instantiation  := Bare_Generic_Subp_Instantiation (Node);
     Ent : Internal_Entity_Generic_Subp_Instantiation :=
       Internal_Entity_Generic_Subp_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Assoc_List;
      Fld : Internal_Entity_Assoc_List;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6696 '<FieldAccess for params at nodes.lkt:12367:52>' Fld ada/nodes.lkt:12367
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Generic_Subp_Instantiation_F_Params, Info => Ent.Info);
--# expr-done 6696
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Instantiation_P_Generic_Inst_Params;
--# end
--# property-start GenericSubpInstantiation.expr_type ada/nodes.lkt:12370
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Instantiation_P_Expr_Type
  (Node : Bare_Generic_Subp_Instantiation
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Generic_Subp_Instantiation  := Bare_Generic_Subp_Instantiation (Node);
     Ent : Internal_Entity_Generic_Subp_Instantiation :=
       Internal_Entity_Generic_Subp_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_182 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6697 '<FieldAccess for subp_spec_or_null at nodes.lkt:12371:9>' Fld ada/nodes.lkt:12371
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6697
Var_Expr_182 := Fld;
if Var_Expr_182 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 6698 '<FieldAccess for return_type at nodes.lkt:12371:9>' Fld_1 ada/nodes.lkt:12371
      if Var_Expr_182.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Var_Expr_182.Node, Origin => Origin, E_Info => Var_Expr_182.Info);
--# end
--# expr-done 6698
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Instantiation_P_Expr_Type;
--# end
--# property-start GenericSubpInstantiation.defining_env ada/nodes.lkt:12376
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Instantiation_P_Defining_Env
  (Node : Bare_Generic_Subp_Instantiation
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Generic_Subp_Instantiation  := Bare_Generic_Subp_Instantiation (Node);
     Ent : Internal_Entity_Generic_Subp_Instantiation :=
       Internal_Entity_Generic_Subp_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_992 with Inline_Always;
            procedure Finalizer_Scope_2853 with Inline_Always;
      Var_Expr_183 : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_992 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_992;
            procedure Finalizer_Scope_2853 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2853;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6699 '<FieldAccess for subp_spec_or_null at nodes.lkt:12376:38>' Fld ada/nodes.lkt:12376
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6699
Var_Expr_183 := Fld;
if Var_Expr_183 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 6700 '<FieldAccess for defining_env at nodes.lkt:12376:38>' Fld_1 ada/nodes.lkt:12376
      if Var_Expr_183.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.defining_env
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Defining_Env (Node => Var_Expr_183.Node, Origin => Origin, E_Info => Var_Expr_183.Info);
--# end
--# expr-done 6700
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2853;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_Env;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_992;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_992;
                     Finalizer_Scope_2853;
            raise;
      end;
   return Property_Result;
end Generic_Subp_Instantiation_P_Defining_Env;
--# end
--# property-start GenericSubpInstantiation.designated_subp ada/nodes.lkt:12380
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Instantiation_P_Designated_Subp
  (Node : Bare_Generic_Subp_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Subp_Decl
is
   Self : Bare_Generic_Subp_Instantiation  := Bare_Generic_Subp_Instantiation (Node);
     Ent : Internal_Entity_Generic_Subp_Instantiation :=
       Internal_Entity_Generic_Subp_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Subp_Decl;
            procedure Finalizer_Scope_2854 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Bare_Basic_Decl;
Cast_Result : Bare_Generic_Subp_Decl;
Fld_2 : Bare_Generic_Subp_Internal;
Fld_3 : Internal_Entity_Info;
Fld_4 : Internal_Metadata;
Fld_5 : Internal_Entity_Info;
Fld_6 : Env_Rebindings;
Fld_7 : Internal_Entity_Info;
Fld_8 : Env_Rebindings;
Fld_9 : Env_Rebindings;
Fld_10 : Bare_Basic_Decl;
Fld_11 : Lexical_Env := Empty_Env;
Fld_12 : Lexical_Env := Empty_Env;
Fld_13 : Env_Rebindings;
Fld_14 : Internal_Entity_Info;
Fld_15 : Boolean;
New_Struct : Internal_Entity_Info;
Cast_Result_1 : Bare_Basic_Subp_Decl;
New_Struct_1 : Internal_Entity_Basic_Subp_Decl;
Scope_Result : Internal_Entity_Basic_Subp_Decl;
Result_Var : Internal_Entity_Basic_Subp_Decl;
            procedure Finalizer_Scope_2854 is
            begin
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
            end Finalizer_Scope_2854;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 6701 '<FieldAccess for nonbound_generic_decl_from_entity at nodes.lkt:12381:9>' Fld ada/nodes.lkt:12381
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.nonbound_generic_decl_from_entity
Fld := Libadalang.Implementation.Generic_Instantiation_P_Nonbound_Generic_Decl_From_Entity (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6701
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 6719 '<New BasicSubpDecl.entity at nodes.lkt:12383:13>' New_Struct_1 ada/nodes.lkt:12383
--# expr-start 6715 '<New EntityInfo at nodes.lkt:12385:22>' New_Struct ada/nodes.lkt:12385
--# expr-start 6703 '<FieldAccess for from_rebound at nodes.lkt:12395:34>' Fld_15 ada/nodes.lkt:12395
--# expr-start 6702 '<FieldAccess for info at nodes.lkt:12395:34>' Fld_14 ada/nodes.lkt:12395
Fld_14 := Var_Expr_0.Info;
--# expr-done 6702
Fld_15 := Fld_14.From_Rebound;
--# expr-done 6703
--# expr-start 6705 '<FieldAccess for md at nodes.lkt:12386:24>' Fld_4 ada/nodes.lkt:12386
--# expr-start 6704 '<FieldAccess for info at nodes.lkt:12386:24>' Fld_3 ada/nodes.lkt:12386
Fld_3 := Ent.Info;
--# expr-done 6704
Fld_4 := Fld_3.Md;
--# expr-done 6705
--# expr-start 6714 '<FieldAccess for add_rebinding at nodes.lkt:12387:32>' Fld_13 ada/nodes.lkt:12387
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6710 '<FieldAccess for insert_rebindings at nodes.lkt:12388:25>' Fld_9 ada/nodes.lkt:12388
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6707 '<FieldAccess for rebindings at nodes.lkt:12389:29>' Fld_6 ada/nodes.lkt:12389
--# expr-start 6706 '<FieldAccess for info at nodes.lkt:12389:29>' Fld_5 ada/nodes.lkt:12389
Fld_5 := Var_Expr_0.Info;
--# expr-done 6706
Fld_6 := Fld_5.Rebindings;
--# expr-done 6707
--# expr-start 6709 '<FieldAccess for rebindings at nodes.lkt:12390:29>' Fld_8 ada/nodes.lkt:12390
--# expr-start 6708 '<FieldAccess for info at nodes.lkt:12390:29>' Fld_7 ada/nodes.lkt:12390
Fld_7 := Ent.Info;
--# expr-done 6708
Fld_8 := Fld_7.Rebindings;
--# expr-done 6709
--# property-call-start AdaNode.insert_rebindings
Fld_9 := Libadalang.Implementation.Ada_Node_P_Insert_Rebindings (Node => Self, Base => Fld_6, To_Insert => Fld_8);
--# end
--# expr-done 6710
--# expr-start 6712 '<FieldAccess for children_env at nodes.lkt:12392:25>' Fld_11 ada/nodes.lkt:12392
--# expr-start 6711 '<FieldAccess for node at nodes.lkt:12392:25>' Fld_10 ada/nodes.lkt:12392
Fld_10 := Var_Expr_0.Node;
--# expr-done 6711
      if Fld_10 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Children_Env (Node => Fld_10);
--# expr-done 6712
--# expr-start 6713 '<FieldAccess for instantiation_env at nodes.lkt:12393:25>' Fld_12 ada/nodes.lkt:12393
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.instantiation_env
Fld_12 := Libadalang.Implementation.Generic_Instantiation_F_Instantiation_Env (Node => Self);
--# end
--# expr-done 6713
--# property-call-start AdaNode.add_rebinding
Fld_13 := Libadalang.Implementation.Ada_Node_P_Add_Rebinding (Node => Self, Base => Fld_9, Old_Env => Fld_11, New_Env => Fld_12);
--# end
--# expr-done 6714
New_Struct := (From_Rebound => Fld_15, Md => Fld_4, Rebindings => Fld_13); 
--# expr-done 6715
--# expr-start 6718 '<FieldAccess for subp_decl at nodes.lkt:12384:22>' Fld_2 ada/nodes.lkt:12384
--# expr-start 6717 '<Cast to GenericSubpDecl at nodes.lkt:12384:22>' Cast_Result ada/nodes.lkt:12384
--# expr-start 6716 '<FieldAccess for node at nodes.lkt:12384:22>' Fld_1 ada/nodes.lkt:12384
Fld_1 := Var_Expr_0.Node;
--# expr-done 6716
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Generic_Subp_Decl_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 6717
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Generic_Subp_Decl_F_Subp_Decl;
--# expr-done 6718
      Cast_Result_1 := Fld_2;
New_Struct_1 := (Info => New_Struct, Node => Cast_Result_1); 
--# expr-done 6719
Scope_Result := New_Struct_1;
   --# end
      Finalizer_Scope_2854;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Subp_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2854;
            raise;
      end;
   return Property_Result;
end Generic_Subp_Instantiation_P_Designated_Subp;
--# end
--# property-start GenericSubpInstantiation.designated_generic_decl ada/nodes.lkt:12400
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Instantiation_P_Designated_Generic_Decl
  (Node : Bare_Generic_Subp_Instantiation
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Generic_Decl
is
   Self : Bare_Generic_Subp_Instantiation  := Bare_Generic_Subp_Instantiation (Node);
     Ent : Internal_Entity_Generic_Subp_Instantiation :=
       Internal_Entity_Generic_Subp_Instantiation'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Generic_Decl;
      Fld : Internal_Entity_Basic_Subp_Decl;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Generic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6722 '<Cast to GenericDecl at nodes.lkt:12401:9>' Cast_Result ada/nodes.lkt:12401
--# expr-start 6721 '<parent at nodes.lkt:12401:9>' Fld_1 ada/nodes.lkt:12401
--# expr-start 6720 '<FieldAccess for designated_subp at nodes.lkt:12401:9>' Fld ada/nodes.lkt:12401
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericSubpInstantiation.designated_subp
Fld := Libadalang.Implementation.Generic_Subp_Instantiation_P_Designated_Subp (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6720
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 6721
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Generic_Decl
   then
      Cast_Result := Create_Internal_Entity_Generic_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 6722
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Instantiation_P_Designated_Generic_Decl;
--# end
   --
   --  Primitives for Bare_Generic_Renaming_Decl
   --
--# property-start '[dispatcher]GenericRenamingDecl.renaming_name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Generic_Renaming_Decl_P_Renaming_Name
  (Node : Bare_Generic_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Generic_Renaming_Decl  := Bare_Generic_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Generic_Renaming_Decl (Self.Kind) is
               when Ada_Generic_Package_Renaming_Decl =>
                  --# property-call-start GenericPackageRenamingDecl.renaming_name
                  Property_Result := Generic_Package_Renaming_Decl_P_Renaming_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Generic_Subp_Renaming_Decl =>
                  --# property-call-start GenericSubpRenamingDecl.renaming_name
                  Property_Result := Generic_Subp_Renaming_Decl_P_Renaming_Name
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Generic_Renaming_Decl_P_Renaming_Name;
--# end
--# property-start GenericRenamingDecl.resolve ada/nodes.lkt:12411
pragma Warnings (Off, "is not referenced");
 function Generic_Renaming_Decl_P_Resolve
  (Node : Bare_Generic_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Generic_Decl
is
   Self : Bare_Generic_Renaming_Decl  := Bare_Generic_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Renaming_Decl :=
       Internal_Entity_Generic_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Generic_Decl;
            procedure Finalizer_Scope_996 with Inline_Always;
      Var_Expr_1 : Internal_Entity;
Match_0 : Internal_Entity_Generic_Decl;
Match_1 : Internal_Entity_Generic_Renaming_Decl;
Match_2 : Internal_Entity;
Fld : Internal_Entity_Name;
Cast_Expr : Bare_Generic_Renaming_Decl;
Cast_Result : Bare_Ada_Node;
Fld_1 : Internal_Entity_Array_Access;
Is_A : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Fld_2 : Internal_Entity_Generic_Decl;
Match_Prefix : Internal_Entity;
Cast_Result_1 : Internal_Entity_Generic_Decl;
Let_Result : Internal_Entity_Generic_Decl;
Scope_Result : Internal_Entity_Generic_Decl;
Cast_Result_2 : Internal_Entity_Generic_Renaming_Decl;
Let_Result_1 : Internal_Entity_Generic_Decl;
Scope_Result_1 : Internal_Entity_Generic_Decl;
Cast_Result_3 : Internal_Entity;
Let_Result_2 : Internal_Entity_Generic_Decl;
Scope_Result_2 : Internal_Entity_Generic_Decl;
Match_Result : Internal_Entity_Generic_Decl;
Scope_Result_3 : Internal_Entity_Generic_Decl;
Result_Var : Internal_Entity_Generic_Decl;
            procedure Finalizer_Scope_996 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_996;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6728 '<at at nodes.lkt:12415:9>' Get_Result ada/nodes.lkt:12415
--# expr-start 6727 '<Map at nodes.lkt:12415:9>' Map_Result ada/nodes.lkt:12415
   --# expr-start 6724 '<FieldAccess for all_env_elements_internal at nodes.lkt:12415:9>' Fld_1 ada/nodes.lkt:12415
--# expr-start 6723 '<FieldAccess for renaming_name at nodes.lkt:12415:9>' Fld ada/nodes.lkt:12415
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericRenamingDecl.renaming_name'
Fld := Libadalang.Implementation.Dispatcher_Generic_Renaming_Decl_P_Renaming_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6723
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# property-call-start Name.all_env_elements_internal
Fld_1 := Libadalang.Implementation.Name_P_All_Env_Elements_Internal (Node => Fld.Node, Seq => True, Seq_From => Cast_Result, Categories => (Inherited_Primitives => False, Nocat => True), E_Info => Fld.Info);
--# end
--# expr-done 6724
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
         --# expr-start 6726 '<Not at nodes.lkt:12420:24>' Not_Val ada/nodes.lkt:12420
--# expr-start 6725 '<IsA Body at nodes.lkt:12420:28>' Is_A ada/nodes.lkt:12420
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Body_Node; 
--# expr-done 6725
Not_Val := not (Is_A); 
--# expr-done 6726
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity := Item_0;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6727
Get_Result := Get (Self, Map_Result, 0, True); 
--# expr-done 6728
Var_Expr_1 := Get_Result;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 6730 '<Match at nodes.lkt:12425:13>' Match_Result ada/nodes.lkt:12425
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Generic_Package_Decl .. Ada_Generic_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Generic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind gd Match_0
Let_Result := Match_0; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Generic_Package_Renaming_Decl .. Ada_Generic_Subp_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Generic_Renaming_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind grd Match_1
--# expr-start 6729 '<FieldAccess for resolve at nodes.lkt:12427:50>' Fld_2 ada/nodes.lkt:12427
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericRenamingDecl.resolve
Fld_2 := Libadalang.Implementation.Generic_Renaming_Decl_P_Resolve (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 6729
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_For_Loop_Var_Decl | Ada_Generic_Package_Instantiation .. Ada_Generic_Subp_Instantiation | Ada_Label_Decl .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Generic_Decl; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 6730
Scope_Result_3 := Match_Result;
   --# end
   Result_Var := Scope_Result_3;
else
   Result_Var := No_Entity_Generic_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      Finalizer_Scope_996;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_996;
            raise;
      end;
   return Property_Result;
end Generic_Renaming_Decl_P_Resolve;
--# end
--# property-start GenericRenamingDecl.xref_entry_point ada/nodes.lkt:12432
pragma Warnings (Off, "is not referenced");
 function Generic_Renaming_Decl_P_Xref_Entry_Point
  (Node : Bare_Generic_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Renaming_Decl  := Bare_Generic_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Renaming_Decl_P_Xref_Entry_Point;
--# end
--# property-start GenericRenamingDecl.xref_equation ada/nodes.lkt:12435
pragma Warnings (Off, "is not referenced");
 function Generic_Renaming_Decl_P_Xref_Equation
  (Node : Bare_Generic_Renaming_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Generic_Renaming_Decl  := Bare_Generic_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Renaming_Decl :=
       Internal_Entity_Generic_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_998 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_998 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_998;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6732 '<FieldAccess for xref_no_overloading at nodes.lkt:12435:37>' Fld_1 ada/nodes.lkt:12435
--# expr-start 6731 '<FieldAccess for renaming_name at nodes.lkt:12435:37>' Fld ada/nodes.lkt:12435
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericRenamingDecl.renaming_name'
Fld := Libadalang.Implementation.Dispatcher_Generic_Renaming_Decl_P_Renaming_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6731
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_1 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 6732
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_998;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_998;
            raise;
      end;
   return Property_Result;
end Generic_Renaming_Decl_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Generic_Package_Renaming_Decl
   --
      procedure Generic_Package_Renaming_Decl_Pre_Env_Actions
        (Self            : Bare_Generic_Package_Renaming_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_176 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_177 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:12458:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_178 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12459:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_179 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_180 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_182 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_181 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_184 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_183 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Generic_Package_Renaming_Decl
        (Self : Bare_Generic_Package_Renaming_Decl
         ; Generic_Package_Renaming_Decl_F_Name : Bare_Defining_Name
         ; Generic_Package_Renaming_Decl_F_Renames : Bare_Renaming_Clause
         ; Generic_Package_Renaming_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Generic_Package_Renaming_Decl_F_Name := Generic_Package_Renaming_Decl_F_Name;
            Self.Generic_Package_Renaming_Decl_F_Renames := Generic_Package_Renaming_Decl_F_Renames;
            Self.Generic_Package_Renaming_Decl_F_Aspects := Generic_Package_Renaming_Decl_F_Aspects;
      end Initialize_Fields_For_Generic_Package_Renaming_Decl;
   function Generic_Package_Renaming_Decl_F_Name
     (Node : Bare_Generic_Package_Renaming_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Generic_Package_Renaming_Decl_F_Name;
   end;
   function Generic_Package_Renaming_Decl_F_Renames
     (Node : Bare_Generic_Package_Renaming_Decl) return Bare_Renaming_Clause
   is
   begin
         return Node.Generic_Package_Renaming_Decl_F_Renames;
   end;
--# property-start GenericPackageRenamingDecl.defining_names ada/nodes.lkt:12447
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Renaming_Decl_P_Defining_Names
  (Node : Bare_Generic_Package_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Renaming_Decl :=
       Internal_Entity_Generic_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_999 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_999 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_999;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6734 '<ArrayLiteral at nodes.lkt:12447:57>' Array_Lit ada/nodes.lkt:12447
--# expr-start 6733 '<FieldAccess for name at nodes.lkt:12447:58>' Fld ada/nodes.lkt:12447
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Generic_Package_Renaming_Decl_F_Name, Info => Ent.Info);
--# expr-done 6733
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6734
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_999;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_999;
            raise;
      end;
   return Property_Result;
end Generic_Package_Renaming_Decl_P_Defining_Names;
--# end
--# property-start GenericPackageRenamingDecl.defining_env ada/nodes.lkt:12452
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Renaming_Decl_P_Defining_Env
  (Node : Bare_Generic_Package_Renaming_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Renaming_Decl :=
       Internal_Entity_Generic_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1000 with Inline_Always;
      Fld : Internal_Entity_Generic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1000 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1000;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6736 '<FieldAccess for defining_env at nodes.lkt:12452:38>' Fld_1 ada/nodes.lkt:12452
--# expr-start 6735 '<FieldAccess for resolve at nodes.lkt:12452:38>' Fld ada/nodes.lkt:12452
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericRenamingDecl.resolve
Fld := Libadalang.Implementation.Generic_Renaming_Decl_P_Resolve (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6735
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 6736
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1000;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1000;
            raise;
      end;
   return Property_Result;
end Generic_Package_Renaming_Decl_P_Defining_Env;
--# end
--# property-start GenericPackageRenamingDecl.renaming_name ada/nodes.lkt:12454
pragma Warnings (Off, "is not referenced");
 function Generic_Package_Renaming_Decl_P_Renaming_Name
  (Node : Bare_Generic_Package_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Renaming_Decl :=
       Internal_Entity_Generic_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Renaming_Clause;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6738 '<FieldAccess for renamed_object at nodes.lkt:12454:41>' Fld_1 ada/nodes.lkt:12454
--# expr-start 6737 '<FieldAccess for renames at nodes.lkt:12454:41>' Fld ada/nodes.lkt:12454
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Generic_Package_Renaming_Decl_F_Renames, Info => Ent.Info);
--# expr-done 6737
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Renaming_Clause_F_Renamed_Object, Info => Fld.Info);
--# expr-done 6738
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Package_Renaming_Decl_P_Renaming_Name;
--# end
--# property-start GenericPackageRenamingDecl._env_do_176 ada/nodes.lkt:12457
pragma Warnings (Off, "is not referenced");
 function Env_Do_176
  (Node : Bare_Generic_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6739 '<FieldAccess for env_hook at nodes.lkt:12457:12>' Fld ada/nodes.lkt:12457
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6739
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_176;
--# end
--# property-start GenericPackageRenamingDecl._env_init_177 ada/nodes.lkt:12458
pragma Warnings (Off, "is not referenced");
 function Env_Init_177
  (Node : Bare_Generic_Package_Renaming_Decl
  )
   return Internal_Designated_Env
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1841 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1841 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1841;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6740 '<FieldAccess for child_decl_initial_env at nodes.lkt:12458:25>' Fld ada/nodes.lkt:12458
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_initial_env
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Initial_Env (Node => Self);
--# end
--# expr-done 6740
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1841;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1841;
            raise;
      end;
   return Property_Result;
end Env_Init_177;
--# end
--# property-start GenericPackageRenamingDecl._env_mappings_178 ada/nodes.lkt:12459
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_178
  (Node : Bare_Generic_Package_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Package_Renaming_Decl :=
       Internal_Entity_Generic_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1842 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Generic_Package_Renaming_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1842 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1842;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6743 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6741 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6741
--# expr-start 6742 '<FieldAccess for name_symbol at nodes.lkt:12459:23>' Fld ada/nodes.lkt:12459
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 6742
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6743
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1842;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1842;
            raise;
      end;
   return Property_Result;
end Env_Mappings_178;
--# end
--# property-start GenericPackageRenamingDecl._env_trans_parent_179 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_179
  (Node : Bare_Generic_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_179;
--# end
--# property-start GenericPackageRenamingDecl._env_do_180 ada/nodes.lkt:12461
pragma Warnings (Off, "is not referenced");
 function Env_Do_180
  (Node : Bare_Generic_Package_Renaming_Decl
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1844 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1844 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1844;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6744 '<FieldAccess for populate_dependent_units at nodes.lkt:12461:12>' Fld ada/nodes.lkt:12461
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6744
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1844;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1844;
            raise;
      end;
   return Property_Result;
end Env_Do_180;
--# end
--# property-start GenericPackageRenamingDecl._ref_env_nodes_181 ada/nodes.lkt:12463
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_181
  (Node : Bare_Generic_Package_Renaming_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1845 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1845 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1845;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6745 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:12463:13>' Fld ada/nodes.lkt:12463
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6745
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1845;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1845;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_181;
--# end
--# property-start GenericPackageRenamingDecl._ref_cond_182 ada/nodes.lkt:12465
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_182
  (Node : Bare_Generic_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6747 '<IsA LibraryItem, Subunit at nodes.lkt:12465:18>' Is_A ada/nodes.lkt:12465
--# expr-start 6746 '<parent at nodes.lkt:12465:18>' Fld ada/nodes.lkt:12465
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6746
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6747
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_182;
--# end
--# property-start GenericPackageRenamingDecl._ref_env_nodes_183 ada/nodes.lkt:12468
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_183
  (Node : Bare_Generic_Package_Renaming_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1847 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1847 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1847;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6748 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:12468:13>' Fld ada/nodes.lkt:12468
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6748
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1847;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1847;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_183;
--# end
--# property-start GenericPackageRenamingDecl._ref_cond_184 ada/nodes.lkt:12470
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_184
  (Node : Bare_Generic_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Package_Renaming_Decl  := Bare_Generic_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6750 '<IsA LibraryItem, Subunit at nodes.lkt:12470:18>' Is_A ada/nodes.lkt:12470
--# expr-start 6749 '<parent at nodes.lkt:12470:18>' Fld ada/nodes.lkt:12470
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6749
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6750
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_184;
--# end
   --
   --  Primitives for Bare_Generic_Subp_Renaming_Decl
   --
      procedure Generic_Subp_Renaming_Decl_Pre_Env_Actions
        (Self            : Bare_Generic_Subp_Renaming_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_185 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_186 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:12492:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_187 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12493:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_188 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_189 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_191 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_190 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_193 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_192 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Generic_Subp_Renaming_Decl
        (Self : Bare_Generic_Subp_Renaming_Decl
         ; Generic_Subp_Renaming_Decl_F_Kind : Bare_Subp_Kind
         ; Generic_Subp_Renaming_Decl_F_Name : Bare_Defining_Name
         ; Generic_Subp_Renaming_Decl_F_Renames : Bare_Renaming_Clause
         ; Generic_Subp_Renaming_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Generic_Subp_Renaming_Decl_F_Kind := Generic_Subp_Renaming_Decl_F_Kind;
            Self.Generic_Subp_Renaming_Decl_F_Name := Generic_Subp_Renaming_Decl_F_Name;
            Self.Generic_Subp_Renaming_Decl_F_Renames := Generic_Subp_Renaming_Decl_F_Renames;
            Self.Generic_Subp_Renaming_Decl_F_Aspects := Generic_Subp_Renaming_Decl_F_Aspects;
      end Initialize_Fields_For_Generic_Subp_Renaming_Decl;
   function Generic_Subp_Renaming_Decl_F_Kind
     (Node : Bare_Generic_Subp_Renaming_Decl) return Bare_Subp_Kind
   is
   begin
         return Node.Generic_Subp_Renaming_Decl_F_Kind;
   end;
   function Generic_Subp_Renaming_Decl_F_Name
     (Node : Bare_Generic_Subp_Renaming_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Generic_Subp_Renaming_Decl_F_Name;
   end;
   function Generic_Subp_Renaming_Decl_F_Renames
     (Node : Bare_Generic_Subp_Renaming_Decl) return Bare_Renaming_Clause
   is
   begin
         return Node.Generic_Subp_Renaming_Decl_F_Renames;
   end;
--# property-start GenericSubpRenamingDecl.defining_names ada/nodes.lkt:12486
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Renaming_Decl_P_Defining_Names
  (Node : Bare_Generic_Subp_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Renaming_Decl :=
       Internal_Entity_Generic_Subp_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1002 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1002 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1002;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6752 '<ArrayLiteral at nodes.lkt:12486:57>' Array_Lit ada/nodes.lkt:12486
--# expr-start 6751 '<FieldAccess for name at nodes.lkt:12486:58>' Fld ada/nodes.lkt:12486
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Generic_Subp_Renaming_Decl_F_Name, Info => Ent.Info);
--# expr-done 6751
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6752
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1002;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1002;
            raise;
      end;
   return Property_Result;
end Generic_Subp_Renaming_Decl_P_Defining_Names;
--# end
--# property-start GenericSubpRenamingDecl.renaming_name ada/nodes.lkt:12488
pragma Warnings (Off, "is not referenced");
 function Generic_Subp_Renaming_Decl_P_Renaming_Name
  (Node : Bare_Generic_Subp_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Renaming_Decl :=
       Internal_Entity_Generic_Subp_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Renaming_Clause;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6754 '<FieldAccess for renamed_object at nodes.lkt:12488:41>' Fld_1 ada/nodes.lkt:12488
--# expr-start 6753 '<FieldAccess for renames at nodes.lkt:12488:41>' Fld ada/nodes.lkt:12488
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Generic_Subp_Renaming_Decl_F_Renames, Info => Ent.Info);
--# expr-done 6753
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Renaming_Clause_F_Renamed_Object, Info => Fld.Info);
--# expr-done 6754
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Generic_Subp_Renaming_Decl_P_Renaming_Name;
--# end
--# property-start GenericSubpRenamingDecl._env_do_185 ada/nodes.lkt:12491
pragma Warnings (Off, "is not referenced");
 function Env_Do_185
  (Node : Bare_Generic_Subp_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6755 '<FieldAccess for env_hook at nodes.lkt:12491:12>' Fld ada/nodes.lkt:12491
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6755
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_185;
--# end
--# property-start GenericSubpRenamingDecl._env_init_186 ada/nodes.lkt:12492
pragma Warnings (Off, "is not referenced");
 function Env_Init_186
  (Node : Bare_Generic_Subp_Renaming_Decl
  )
   return Internal_Designated_Env
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1850 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1850 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1850;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6756 '<FieldAccess for child_decl_initial_env at nodes.lkt:12492:25>' Fld ada/nodes.lkt:12492
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_initial_env
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Initial_Env (Node => Self);
--# end
--# expr-done 6756
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1850;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1850;
            raise;
      end;
   return Property_Result;
end Env_Init_186;
--# end
--# property-start GenericSubpRenamingDecl._env_mappings_187 ada/nodes.lkt:12493
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_187
  (Node : Bare_Generic_Subp_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
     Ent : Internal_Entity_Generic_Subp_Renaming_Decl :=
       Internal_Entity_Generic_Subp_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1851 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Generic_Subp_Renaming_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1851 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1851;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6759 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6757 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6757
--# expr-start 6758 '<FieldAccess for name_symbol at nodes.lkt:12493:23>' Fld ada/nodes.lkt:12493
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 6758
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6759
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1851;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1851;
            raise;
      end;
   return Property_Result;
end Env_Mappings_187;
--# end
--# property-start GenericSubpRenamingDecl._env_trans_parent_188 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_188
  (Node : Bare_Generic_Subp_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_188;
--# end
--# property-start GenericSubpRenamingDecl._env_do_189 ada/nodes.lkt:12495
pragma Warnings (Off, "is not referenced");
 function Env_Do_189
  (Node : Bare_Generic_Subp_Renaming_Decl
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1853 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1853 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1853;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6760 '<FieldAccess for populate_dependent_units at nodes.lkt:12495:12>' Fld ada/nodes.lkt:12495
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6760
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1853;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1853;
            raise;
      end;
   return Property_Result;
end Env_Do_189;
--# end
--# property-start GenericSubpRenamingDecl._ref_env_nodes_190 ada/nodes.lkt:12497
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_190
  (Node : Bare_Generic_Subp_Renaming_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1854 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1854 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1854;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6761 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:12497:13>' Fld ada/nodes.lkt:12497
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6761
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1854;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1854;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_190;
--# end
--# property-start GenericSubpRenamingDecl._ref_cond_191 ada/nodes.lkt:12499
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_191
  (Node : Bare_Generic_Subp_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6763 '<IsA LibraryItem, Subunit at nodes.lkt:12499:18>' Is_A ada/nodes.lkt:12499
--# expr-start 6762 '<parent at nodes.lkt:12499:18>' Fld ada/nodes.lkt:12499
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6762
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6763
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_191;
--# end
--# property-start GenericSubpRenamingDecl._ref_env_nodes_192 ada/nodes.lkt:12502
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_192
  (Node : Bare_Generic_Subp_Renaming_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1856 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1856 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1856;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6764 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:12502:13>' Fld ada/nodes.lkt:12502
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6764
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1856;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1856;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_192;
--# end
--# property-start GenericSubpRenamingDecl._ref_cond_193 ada/nodes.lkt:12504
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_193
  (Node : Bare_Generic_Subp_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Generic_Subp_Renaming_Decl  := Bare_Generic_Subp_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6766 '<IsA LibraryItem, Subunit at nodes.lkt:12504:18>' Is_A ada/nodes.lkt:12504
--# expr-start 6765 '<parent at nodes.lkt:12504:18>' Fld ada/nodes.lkt:12504
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6765
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6766
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_193;
--# end
   --
   --  Primitives for Bare_Label_Decl
   --
      procedure Label_Decl_Pre_Env_Actions
        (Self            : Bare_Label_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_194 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12520:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      end;
      procedure Initialize_Fields_For_Label_Decl
        (Self : Bare_Label_Decl
         ; Label_Decl_F_Name : Bare_Defining_Name
        ) is
      begin
            Self.Label_Decl_F_Name := Label_Decl_F_Name;
      end Initialize_Fields_For_Label_Decl;
   function Label_Decl_F_Name
     (Node : Bare_Label_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Label_Decl_F_Name;
   end;
--# property-start LabelDecl.defining_names ada/nodes.lkt:12517
pragma Warnings (Off, "is not referenced");
 function Label_Decl_P_Defining_Names
  (Node : Bare_Label_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Label_Decl  := Bare_Label_Decl (Node);
     Ent : Internal_Entity_Label_Decl :=
       Internal_Entity_Label_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1004 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1004 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1004;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6768 '<ArrayLiteral at nodes.lkt:12517:57>' Array_Lit ada/nodes.lkt:12517
--# expr-start 6767 '<FieldAccess for name at nodes.lkt:12517:58>' Fld ada/nodes.lkt:12517
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Label_Decl_F_Name, Info => Ent.Info);
--# expr-done 6767
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6768
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1004;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1004;
            raise;
      end;
   return Property_Result;
end Label_Decl_P_Defining_Names;
--# end
--# property-start LabelDecl._env_mappings_194 ada/nodes.lkt:12520
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_194
  (Node : Bare_Label_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Label_Decl  := Bare_Label_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1858 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Label_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1858 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1858;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6771 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6769 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6769
--# expr-start 6770 '<FieldAccess for name_symbol at nodes.lkt:12520:23>' Fld ada/nodes.lkt:12520
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 6770
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6771
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1858;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1858;
            raise;
      end;
   return Property_Result;
end Env_Mappings_194;
--# end
   --
   --  Primitives for Bare_Named_Stmt_Decl
   --
      procedure Initialize_Fields_For_Named_Stmt_Decl
        (Self : Bare_Named_Stmt_Decl
         ; Named_Stmt_Decl_F_Name : Bare_Defining_Name
        ) is
      begin
            Self.Named_Stmt_Decl_F_Name := Named_Stmt_Decl_F_Name;
      end Initialize_Fields_For_Named_Stmt_Decl;
   function Named_Stmt_Decl_F_Name
     (Node : Bare_Named_Stmt_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Named_Stmt_Decl_F_Name;
   end;
--# property-start NamedStmtDecl.defining_names ada/nodes.lkt:12532
pragma Warnings (Off, "is not referenced");
 function Named_Stmt_Decl_P_Defining_Names
  (Node : Bare_Named_Stmt_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Named_Stmt_Decl  := Bare_Named_Stmt_Decl (Node);
     Ent : Internal_Entity_Named_Stmt_Decl :=
       Internal_Entity_Named_Stmt_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1005 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1005 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1005;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6773 '<ArrayLiteral at nodes.lkt:12532:57>' Array_Lit ada/nodes.lkt:12532
--# expr-start 6772 '<FieldAccess for name at nodes.lkt:12532:58>' Fld ada/nodes.lkt:12532
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Named_Stmt_Decl_F_Name, Info => Ent.Info);
--# expr-done 6772
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6773
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1005;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1005;
            raise;
      end;
   return Property_Result;
end Named_Stmt_Decl_P_Defining_Names;
--# end
--# property-start NamedStmtDecl.defining_env ada/nodes.lkt:12537
pragma Warnings (Off, "is not referenced");
 function Named_Stmt_Decl_P_Defining_Env
  (Node : Bare_Named_Stmt_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Named_Stmt_Decl  := Bare_Named_Stmt_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1006 with Inline_Always;
      Fld : Bare_Ada_Node;
Cast_Result : Bare_Named_Stmt;
Fld_1 : Bare_Composite_Stmt;
Fld_2 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1006 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1006;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6777 '<FieldAccess for children_env at nodes.lkt:12538:9>' Fld_2 ada/nodes.lkt:12538
--# expr-start 6776 '<FieldAccess for stmt at nodes.lkt:12538:9>' Fld_1 ada/nodes.lkt:12538
--# expr-start 6775 '<Cast to NamedStmt at nodes.lkt:12538:9>' Cast_Result ada/nodes.lkt:12538
--# expr-start 6774 '<parent at nodes.lkt:12538:9>' Fld ada/nodes.lkt:12538
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6774
   if Fld = null
      or else Fld.Kind in Ada_Named_Stmt_Range
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 6775
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Cast_Result.Named_Stmt_F_Stmt;
--# expr-done 6776
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Fld_1);
--# expr-done 6777
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1006;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1006;
            raise;
      end;
   return Property_Result;
end Named_Stmt_Decl_P_Defining_Env;
--# end
   --
   --  Primitives for Bare_Number_Decl
   --
      procedure Number_Decl_Pre_Env_Actions
        (Self            : Bare_Number_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_195 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12580:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      end;
      procedure Initialize_Fields_For_Number_Decl
        (Self : Bare_Number_Decl
         ; Number_Decl_F_Ids : Bare_Defining_Name_List
         ; Number_Decl_F_Expr : Bare_Expr
        ) is
      begin
            Self.Number_Decl_F_Ids := Number_Decl_F_Ids;
            Self.Number_Decl_F_Expr := Number_Decl_F_Expr;
      end Initialize_Fields_For_Number_Decl;
   function Number_Decl_F_Ids
     (Node : Bare_Number_Decl) return Bare_Defining_Name_List
   is
   begin
         return Node.Number_Decl_F_Ids;
   end;
   function Number_Decl_F_Expr
     (Node : Bare_Number_Decl) return Bare_Expr
   is
   begin
         return Node.Number_Decl_F_Expr;
   end;
--# property-start NumberDecl.defining_names ada/nodes.lkt:12551
pragma Warnings (Off, "is not referenced");
 function Number_Decl_P_Defining_Names
  (Node : Bare_Number_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Number_Decl  := Bare_Number_Decl (Node);
     Ent : Internal_Entity_Number_Decl :=
       Internal_Entity_Number_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1007 with Inline_Always;
      Fld : Internal_Entity_Defining_Name_List;
Fld_1 : Bare_Defining_Name_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Defining_Name;
Bare_Item_0 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1007 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1007;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6779 '<Map at nodes.lkt:12552:9>' Map_Result ada/nodes.lkt:12552
   --# expr-start 6778 '<FieldAccess for ids at nodes.lkt:12552:9>' Fld ada/nodes.lkt:12552
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name_List (Node => Ent.Node.Number_Decl_F_Ids, Info => Ent.Info);
--# expr-done 6778
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Defining_Name_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind id Item_0
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_0;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6779
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1007;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1007;
            raise;
      end;
   return Property_Result;
end Number_Decl_P_Defining_Names;
--# end
--# property-start NumberDecl.expr_type ada/nodes.lkt:12556
pragma Warnings (Off, "is not referenced");
 function Number_Decl_P_Expr_Type
  (Node : Bare_Number_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Number_Decl  := Bare_Number_Decl (Node);
     Ent : Internal_Entity_Number_Decl :=
       Internal_Entity_Number_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6785 '<If at nodes.lkt:12557:9>' If_Result ada/nodes.lkt:12557
--# expr-start 6782 '<FieldAccess for is_int_type at nodes.lkt:12557:12>' Fld_4 ada/nodes.lkt:12557
--# expr-start 6781 '<FieldAccess for expression_type at nodes.lkt:12557:12>' Fld_3 ada/nodes.lkt:12557
--# expr-start 6780 '<FieldAccess for expr at nodes.lkt:12557:12>' Fld_2 ada/nodes.lkt:12557
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Number_Decl_F_Expr, Info => Ent.Info);
--# expr-done 6780
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_3 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 6781
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_int_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Int_Type (Node => Fld_3.Node, Origin => Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 6782
if Fld_4 then
   --# expr-start 6783 '<FieldAccess for universal_int_type at nodes.lkt:12558:14>' Fld ada/nodes.lkt:12558
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Self);
--# end
--# expr-done 6783
   If_Result := Fld;
else
   --# expr-start 6784 '<FieldAccess for universal_real_type at nodes.lkt:12559:14>' Fld_1 ada/nodes.lkt:12559
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_real_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Type (Node => Self);
--# end
--# expr-done 6784
   If_Result := Fld_1;
end if;
--# expr-done 6785
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Number_Decl_P_Expr_Type;
--# end
--# property-start NumberDecl.xref_entry_point ada/nodes.lkt:12561
pragma Warnings (Off, "is not referenced");
 function Number_Decl_P_Xref_Entry_Point
  (Node : Bare_Number_Decl
  )
   return Boolean
is
   Self : Bare_Number_Decl  := Bare_Number_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Number_Decl_P_Xref_Entry_Point;
--# end
--# property-start NumberDecl.is_static_decl ada/nodes.lkt:12564
pragma Warnings (Off, "is not referenced");
 function Number_Decl_P_Is_Static_Decl
  (Node : Bare_Number_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Number_Decl  := Bare_Number_Decl (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Number_Decl_P_Is_Static_Decl;
--# end
--# property-start NumberDecl.xref_equation ada/nodes.lkt:12567
pragma Warnings (Off, "is not referenced");
 function Number_Decl_P_Xref_Equation
  (Node : Bare_Number_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Number_Decl  := Bare_Number_Decl (Node);
     Ent : Internal_Entity_Number_Decl :=
       Internal_Entity_Number_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1011 with Inline_Always;
      Fld : Bare_Expr;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_3 : Bare_Expr;
Fld_4 : Logic_Var;
Fld_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_6 : Internal_Entity_Expr;
Fld_7 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1011 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1011;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6800 '<LogicBinaryOp And at nodes.lkt:12568:9>' And_Pred_1 ada/nodes.lkt:12568
--# expr-start 6797 '<LogicBinaryOp And at nodes.lkt:12569:13>' And_Pred ada/nodes.lkt:12569
--# expr-start 6794 '<LogicBinaryOp Or at nodes.lkt:12570:17>' Or_Pred ada/nodes.lkt:12570
--# expr-start 6789 '<Bind at nodes.lkt:12570:17>' Bind_Result ada/nodes.lkt:12570
--# expr-start 6787 '<FieldAccess for expected_type_var at nodes.lkt:12570:17>' Fld_1 ada/nodes.lkt:12570
--# expr-start 6786 '<FieldAccess for expr at nodes.lkt:12570:17>' Fld ada/nodes.lkt:12570
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Number_Decl_F_Expr;
--# expr-done 6786
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld);
--# expr-done 6787
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 6788 '<FieldAccess for universal_int_type at nodes.lkt:12570:50>' Fld_2 ada/nodes.lkt:12570
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld_2 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Self);
--# end
--# expr-done 6788
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12570:17") else null)); 
--# expr-done 6789
--# expr-start 6793 '<Bind at nodes.lkt:12571:21>' Bind_Result_1 ada/nodes.lkt:12571
--# expr-start 6791 '<FieldAccess for expected_type_var at nodes.lkt:12571:21>' Fld_4 ada/nodes.lkt:12571
--# expr-start 6790 '<FieldAccess for expr at nodes.lkt:12571:21>' Fld_3 ada/nodes.lkt:12571
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Number_Decl_F_Expr;
--# expr-done 6790
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_3);
--# expr-done 6791
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 6792 '<FieldAccess for universal_real_type at nodes.lkt:12571:54>' Fld_5 ada/nodes.lkt:12571
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_real_type
Fld_5 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Type (Node => Self);
--# end
--# expr-done 6792
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_4, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12571:21") else null)); 
--# expr-done 6793
Or_Pred := Create_Or (Bind_Result, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12570:17") else null)); 
--# expr-done 6794
--# expr-start 6796 '<FieldAccess for sub_equation at nodes.lkt:12573:18>' Fld_7 ada/nodes.lkt:12573
--# expr-start 6795 '<FieldAccess for expr at nodes.lkt:12573:18>' Fld_6 ada/nodes.lkt:12573
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Ent.Node.Number_Decl_F_Expr, Info => Ent.Info);
--# expr-done 6795
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_6.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_6.Info);
--# end
--# expr-done 6796
And_Pred := Create_And (Or_Pred, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12569:13") else null)); 
--# expr-done 6797
--# expr-start 6799 '<FieldAccess for matches_expected_type at nodes.lkt:12575:14>' Fld_9 ada/nodes.lkt:12575
--# expr-start 6798 '<FieldAccess for expr at nodes.lkt:12575:14>' Fld_8 ada/nodes.lkt:12575
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Expr (Node => Ent.Node.Number_Decl_F_Expr, Info => Ent.Info);
--# expr-done 6798
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_9 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_8.Node, Origin => Origin);
--# end
--# expr-done 6799
And_Pred_1 := Create_And (And_Pred, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12568:9") else null)); 
--# expr-done 6800
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1011;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1011;
            raise;
      end;
   return Property_Result;
end Number_Decl_P_Xref_Equation;
--# end
--# property-start NumberDecl.is_constant_object ada/nodes.lkt:12577
pragma Warnings (Off, "is not referenced");
 function Number_Decl_P_Is_Constant_Object
  (Node : Bare_Number_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Number_Decl  := Bare_Number_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Number_Decl_P_Is_Constant_Object;
--# end
--# property-start NumberDecl._env_mappings_195 ada/nodes.lkt:12580
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_195
  (Node : Bare_Number_Decl
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Number_Decl  := Bare_Number_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1859 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Cast_Expr : Bare_Number_Decl;
Cast_Result : Bare_Ada_Node;
Fld_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1859 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1859;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6802 '<FieldAccess for env_mappings at nodes.lkt:12580:20>' Fld_1 ada/nodes.lkt:12580
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6801 '<FieldAccess for ids at nodes.lkt:12580:38>' Fld ada/nodes.lkt:12580
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Number_Decl_F_Ids;
--# expr-done 6801
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# property-call-start AdaNode.env_mappings
Fld_1 := Libadalang.Implementation.Ada_Node_P_Env_Mappings (Node => Self, Defining_Names => Fld, Value => Cast_Result);
--# end
--# expr-done 6802
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1859;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1859;
            raise;
      end;
   return Property_Result;
end Env_Mappings_195;
--# end
   --
   --  Primitives for Bare_Object_Decl
   --
      procedure Object_Decl_Pre_Env_Actions
        (Self            : Bare_Object_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_196 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12727:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      end;
      procedure Initialize_Fields_For_Object_Decl
        (Self : Bare_Object_Decl
         ; Object_Decl_F_Ids : Bare_Defining_Name_List
         ; Object_Decl_F_Has_Aliased : Bare_Aliased_Node
         ; Object_Decl_F_Has_Constant : Bare_Constant_Node
         ; Object_Decl_F_Mode : Bare_Mode
         ; Object_Decl_F_Type_Expr : Bare_Type_Expr
         ; Object_Decl_F_Default_Expr : Bare_Expr
         ; Object_Decl_F_Renaming_Clause : Bare_Renaming_Clause
         ; Object_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Object_Decl_F_Ids := Object_Decl_F_Ids;
            Self.Object_Decl_F_Has_Aliased := Object_Decl_F_Has_Aliased;
            Self.Object_Decl_F_Has_Constant := Object_Decl_F_Has_Constant;
            Self.Object_Decl_F_Mode := Object_Decl_F_Mode;
            Self.Object_Decl_F_Type_Expr := Object_Decl_F_Type_Expr;
            Self.Object_Decl_F_Default_Expr := Object_Decl_F_Default_Expr;
            Self.Object_Decl_F_Renaming_Clause := Object_Decl_F_Renaming_Clause;
            Self.Object_Decl_F_Aspects := Object_Decl_F_Aspects;
      end Initialize_Fields_For_Object_Decl;
   function Object_Decl_F_Ids
     (Node : Bare_Object_Decl) return Bare_Defining_Name_List
   is
   begin
         return Node.Object_Decl_F_Ids;
   end;
   function Object_Decl_F_Has_Aliased
     (Node : Bare_Object_Decl) return Bare_Aliased_Node
   is
   begin
         return Node.Object_Decl_F_Has_Aliased;
   end;
   function Object_Decl_F_Has_Constant
     (Node : Bare_Object_Decl) return Bare_Constant_Node
   is
   begin
         return Node.Object_Decl_F_Has_Constant;
   end;
   function Object_Decl_F_Mode
     (Node : Bare_Object_Decl) return Bare_Mode
   is
   begin
         return Node.Object_Decl_F_Mode;
   end;
   function Object_Decl_F_Type_Expr
     (Node : Bare_Object_Decl) return Bare_Type_Expr
   is
   begin
         return Node.Object_Decl_F_Type_Expr;
   end;
   function Object_Decl_F_Default_Expr
     (Node : Bare_Object_Decl) return Bare_Expr
   is
   begin
         return Node.Object_Decl_F_Default_Expr;
   end;
   function Object_Decl_F_Renaming_Clause
     (Node : Bare_Object_Decl) return Bare_Renaming_Clause
   is
   begin
         return Node.Object_Decl_F_Renaming_Clause;
   end;
--# property-start ObjectDecl.defining_names ada/nodes.lkt:12611
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Defining_Names
  (Node : Bare_Object_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1013 with Inline_Always;
      Fld : Internal_Entity_Defining_Name_List;
Fld_1 : Bare_Defining_Name_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Defining_Name;
Bare_Item_0 : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1013 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1013;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6804 '<Map at nodes.lkt:12612:9>' Map_Result ada/nodes.lkt:12612
   --# expr-start 6803 '<FieldAccess for ids at nodes.lkt:12612:9>' Fld ada/nodes.lkt:12612
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name_List (Node => Ent.Node.Object_Decl_F_Ids, Info => Ent.Info);
--# expr-done 6803
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Defining_Name_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind id Item_0
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_0;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6804
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1013;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1013;
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Defining_Names;
--# end
--# property-start ObjectDecl.defining_env ada/nodes.lkt:12617
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Defining_Env
  (Node : Bare_Object_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1014 with Inline_Always;
      Fld : Internal_Entity_Type_Expr;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1014 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1014;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6806 '<FieldAccess for defining_env at nodes.lkt:12617:38>' Fld_1 ada/nodes.lkt:12617
--# expr-start 6805 '<FieldAccess for type_expr at nodes.lkt:12617:38>' Fld ada/nodes.lkt:12617
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Object_Decl_F_Type_Expr, Info => Ent.Info);
--# expr-done 6805
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.defining_env
Fld_1 := Libadalang.Implementation.Type_Expr_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 6806
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1014;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1014;
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Defining_Env;
--# end
--# property-start ObjectDecl.type_expression ada/nodes.lkt:12619
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Type_Expression
  (Node : Bare_Object_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6807 '<FieldAccess for type_expr at nodes.lkt:12619:47>' Fld ada/nodes.lkt:12619
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Object_Decl_F_Type_Expr, Info => Ent.Info);
--# expr-done 6807
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Type_Expression;
--# end
--# property-start ObjectDecl.is_constant_object ada/nodes.lkt:12621
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Is_Constant_Object
  (Node : Bare_Object_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Constant_Node;
Var_Expr_1 : Internal_Entity_Mode;
Var_Expr_184 : Internal_Entity_Renaming_Clause;
Fld : Internal_Entity_Constant_Node;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Fld_2 : Internal_Entity_Mode;
Fld_3 : Bare_Ada_Node;
Is_A : Boolean;
Is_A_1 : Boolean;
If_Result : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_1 : Boolean;
Fld_4 : Internal_Entity_Renaming_Clause;
Fld_5 : Internal_Entity_Name;
Fld_6 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_2 : Boolean;
Fld_7 : Internal_Entity_Type_Expr;
Fld_8 : Internal_Entity_Base_Type_Decl;
Is_A_2 : Boolean;
If_Result_3 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6823 '<BooleanBinaryOp Or at nodes.lkt:12622:9>' If_Result_3 ada/nodes.lkt:12622
--# expr-start 6819 '<BooleanBinaryOp Or at nodes.lkt:12622:9>' If_Result_2 ada/nodes.lkt:12622
--# expr-start 6815 '<BooleanBinaryOp Or at nodes.lkt:12622:9>' If_Result_1 ada/nodes.lkt:12622
--# expr-start 6808 '<FieldAccess for has_constant at nodes.lkt:12622:9>' Fld ada/nodes.lkt:12622
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Constant_Node (Node => Ent.Node.Object_Decl_F_Has_Constant, Info => Ent.Info);
--# expr-done 6808
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Constant_Node then
   --# scope-start
   --# bind c Var_Expr_0
--# expr-start 6809 '<FieldAccess for as_bool at nodes.lkt:12622:37>' Fld_1 ada/nodes.lkt:12622
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Constant.as_bool'
Fld_1 := Libadalang.Implementation.Dispatcher_Constant_Node_P_As_Bool (Node => Var_Expr_0.Node);
--# end
--# expr-done 6809
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   If_Result_1 := True;
else
--# expr-start 6810 '<FieldAccess for mode at nodes.lkt:12625:12>' Fld_2 ada/nodes.lkt:12625
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Mode (Node => Ent.Node.Object_Decl_F_Mode, Info => Ent.Info);
--# expr-done 6810
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Entity_Mode then
   --# scope-start
   --# bind m Var_Expr_1
--# expr-start 6814 '<BooleanBinaryOp And at nodes.lkt:12627:13>' If_Result ada/nodes.lkt:12627
--# expr-start 6812 '<IsA GenericFormalObjDecl at nodes.lkt:12627:13>' Is_A ada/nodes.lkt:12627
--# expr-start 6811 '<parent at nodes.lkt:12627:13>' Fld_3 ada/nodes.lkt:12627
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Parent; 
--# expr-done 6811
Is_A := Fld_3 /= null 
and then Fld_3.Kind in Ada_Generic_Formal_Obj_Decl_Range; 
--# expr-done 6812
if Is_A then
   --# expr-start 6813 '<IsA Mode.In, Mode.Default at nodes.lkt:12627:53>' Is_A_1 ada/nodes.lkt:12627
Is_A_1 := Var_Expr_1.Node /= null 
and then Var_Expr_1.Node.Kind in Ada_Mode_In_Range | Ada_Mode_Default_Range; 
--# expr-done 6813
   If_Result := Is_A_1;
else
   If_Result := False;
end if;
--# expr-done 6814
Scope_Result_1 := If_Result;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_1 := Result_Var_1;
end if;
--# expr-done 6815
if If_Result_1 then
   If_Result_2 := True;
else
--# expr-start 6816 '<FieldAccess for renaming_clause at nodes.lkt:12631:12>' Fld_4 ada/nodes.lkt:12631
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Object_Decl_F_Renaming_Clause, Info => Ent.Info);
--# expr-done 6816
Var_Expr_184 := Fld_4;
if Var_Expr_184 /= No_Entity_Renaming_Clause then
   --# scope-start
--# expr-start 6818 '<FieldAccess for is_constant at nodes.lkt:12631:12>' Fld_6 ada/nodes.lkt:12631
--# expr-start 6817 '<FieldAccess for renamed_object at nodes.lkt:12631:12>' Fld_5 ada/nodes.lkt:12631
      if Var_Expr_184.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Name (Node => Var_Expr_184.Node.Renaming_Clause_F_Renamed_Object, Info => Var_Expr_184.Info);
--# expr-done 6817
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.is_constant'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Is_Constant (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 6818
Scope_Result_2 := Fld_6;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_2 := Result_Var_2;
end if;
--# expr-done 6819
if If_Result_2 then
   If_Result_3 := True;
else
   --# expr-start 6822 '<IsA ProtectedTypeDecl at nodes.lkt:12634:12>' Is_A_2 ada/nodes.lkt:12634
--# expr-start 6821 '<FieldAccess for designated_type_decl at nodes.lkt:12634:12>' Fld_8 ada/nodes.lkt:12634
--# expr-start 6820 '<FieldAccess for type_expr at nodes.lkt:12634:12>' Fld_7 ada/nodes.lkt:12634
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Object_Decl_F_Type_Expr, Info => Ent.Info);
--# expr-done 6820
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld_8 := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 6821
Is_A_2 := Fld_8.Node /= null 
and then Fld_8.Node.Kind in Ada_Protected_Type_Decl_Range; 
--# expr-done 6822
   If_Result_3 := Is_A_2;
end if;
--# expr-done 6823
         Property_Result := If_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Is_Constant_Object;
--# end
--# property-start ObjectDecl.is_static_decl ada/nodes.lkt:12637
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Is_Static_Decl
  (Node : Bare_Object_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Expr;
Var_Expr_185 : Internal_Entity_Renaming_Clause;
Fld : Bare_Constant_Node;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
Fld_4 : Internal_Entity_Renaming_Clause;
Fld_5 : Internal_Entity_Name;
Fld_6 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6832 '<BooleanBinaryOp Or at nodes.lkt:12638:9>' If_Result_1 ada/nodes.lkt:12638
--# expr-start 6828 '<BooleanBinaryOp And at nodes.lkt:12639:13>' If_Result ada/nodes.lkt:12639
--# expr-start 6825 '<FieldAccess for as_bool at nodes.lkt:12639:13>' Fld_1 ada/nodes.lkt:12639
--# expr-start 6824 '<FieldAccess for has_constant at nodes.lkt:12639:13>' Fld ada/nodes.lkt:12639
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Object_Decl_F_Has_Constant;
--# expr-done 6824
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Constant.as_bool'
Fld_1 := Libadalang.Implementation.Dispatcher_Constant_Node_P_As_Bool (Node => Fld);
--# end
--# expr-done 6825
if Fld_1 then
--# expr-start 6826 '<FieldAccess for default_expr at nodes.lkt:12640:17>' Fld_2 ada/nodes.lkt:12640
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Object_Decl_F_Default_Expr, Info => Ent.Info);
--# expr-done 6826
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind expr Var_Expr_0
--# expr-start 6827 '<FieldAccess for is_static_expr at nodes.lkt:12640:48>' Fld_3 ada/nodes.lkt:12640
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_3 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 6827
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
else
   If_Result := False;
end if;
--# expr-done 6828
if If_Result then
   If_Result_1 := True;
else
--# expr-start 6829 '<FieldAccess for renaming_clause at nodes.lkt:12642:12>' Fld_4 ada/nodes.lkt:12642
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Object_Decl_F_Renaming_Clause, Info => Ent.Info);
--# expr-done 6829
Var_Expr_185 := Fld_4;
if Var_Expr_185 /= No_Entity_Renaming_Clause then
   --# scope-start
--# expr-start 6831 '<FieldAccess for is_static_expr at nodes.lkt:12642:12>' Fld_6 ada/nodes.lkt:12642
--# expr-start 6830 '<FieldAccess for renamed_object at nodes.lkt:12642:12>' Fld_5 ada/nodes.lkt:12642
      if Var_Expr_185.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Name (Node => Var_Expr_185.Node.Renaming_Clause_F_Renamed_Object, Info => Var_Expr_185.Info);
--# expr-done 6830
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_6 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_5.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_5.Info);
--# end
--# expr-done 6831
Scope_Result_1 := Fld_6;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_1 := Result_Var_1;
end if;
--# expr-done 6832
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Is_Static_Decl;
--# end
--# property-start ObjectDecl.xref_equation ada/nodes.lkt:12645
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Xref_Equation
  (Node : Bare_Object_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1018 with Inline_Always;
            procedure Finalizer_Scope_2867 with Inline_Always;
            procedure Finalizer_Scope_2868 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Expr;
Var_Expr_1 : Internal_Entity_Renaming_Clause;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_7 : Internal_Entity_Renaming_Clause;
Fld_8 : Internal_Entity_Name;
Fld_9 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_10 : Internal_Entity_Name;
Fld_11 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_12 : Internal_Entity_Name;
Fld_13 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1018 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1018;
            procedure Finalizer_Scope_2867 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_2867;
            procedure Finalizer_Scope_2868 is
            begin
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_11);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_13);
                     Dec_Ref (And_Pred_4);
            end Finalizer_Scope_2868;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6855 '<Let at nodes.lkt:12646:9>' Let_Result ada/nodes.lkt:12646
--# scope-start
--# expr-start 6833 '<FieldAccess for expr_type at nodes.lkt:12646:19>' Fld ada/nodes.lkt:12646
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 6833
Local_Typ := Fld; 
--# bind typ Local_Typ
--# expr-start 6854 '<LogicBinaryOp And at nodes.lkt:12648:9>' And_Pred_5 ada/nodes.lkt:12648
--# expr-start 6843 '<LogicBinaryOp And at nodes.lkt:12649:13>' And_Pred_2 ada/nodes.lkt:12649
--# expr-start 6835 '<FieldAccess for sub_equation at nodes.lkt:12649:13>' Fld_2 ada/nodes.lkt:12649
--# expr-start 6834 '<FieldAccess for type_expr at nodes.lkt:12649:13>' Fld_1 ada/nodes.lkt:12649
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Object_Decl_F_Type_Expr, Info => Ent.Info);
--# expr-done 6834
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_2 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_1.Info);
--# end
--# expr-done 6835
--# expr-start 6836 '<FieldAccess for default_expr at nodes.lkt:12650:18>' Fld_3 ada/nodes.lkt:12650
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Object_Decl_F_Default_Expr, Info => Ent.Info);
--# expr-done 6836
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind de Var_Expr_0
--# expr-start 6842 '<LogicBinaryOp And at nodes.lkt:12652:17>' And_Pred_1 ada/nodes.lkt:12652
--# expr-start 6840 '<LogicBinaryOp And at nodes.lkt:12652:18>' And_Pred ada/nodes.lkt:12652
--# expr-start 6838 '<Bind at nodes.lkt:12652:18>' Bind_Result ada/nodes.lkt:12652
--# expr-start 6837 '<FieldAccess for expected_type_var at nodes.lkt:12652:18>' Fld_4 ada/nodes.lkt:12652
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_0.Node);
--# expr-done 6837
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Cast_Expr := Local_Typ; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12652:18") else null)); 
--# expr-done 6838
--# expr-start 6839 '<FieldAccess for sub_equation at nodes.lkt:12652:53>' Fld_5 ada/nodes.lkt:12652
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 6839
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12652:18") else null)); 
--# expr-done 6840
--# expr-start 6841 '<FieldAccess for matches_expected_assign_type at nodes.lkt:12653:22>' Fld_6 ada/nodes.lkt:12653
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Var_Expr_0.Node, Origin => Origin);
--# end
--# expr-done 6841
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12652:17") else null)); 
--# expr-done 6842
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2867;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12654:29") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (Fld_2, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12649:13") else null)); 
--# expr-done 6843
--# expr-start 6844 '<FieldAccess for renaming_clause at nodes.lkt:12657:14>' Fld_7 ada/nodes.lkt:12657
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Object_Decl_F_Renaming_Clause, Info => Ent.Info);
--# expr-done 6844
Var_Expr_1 := Fld_7;
if Var_Expr_1 /= No_Entity_Renaming_Clause then
   --# scope-start
   --# bind rc Var_Expr_1
--# expr-start 6853 '<LogicBinaryOp And at nodes.lkt:12659:13>' And_Pred_4 ada/nodes.lkt:12659
--# expr-start 6850 '<LogicBinaryOp And at nodes.lkt:12660:17>' And_Pred_3 ada/nodes.lkt:12660
--# expr-start 6847 '<Bind at nodes.lkt:12660:17>' Bind_Result_1 ada/nodes.lkt:12660
--# expr-start 6846 '<FieldAccess for expected_type_var at nodes.lkt:12660:17>' Fld_9 ada/nodes.lkt:12660
--# expr-start 6845 '<FieldAccess for renamed_object at nodes.lkt:12660:17>' Fld_8 ada/nodes.lkt:12660
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Name (Node => Var_Expr_1.Node.Renaming_Clause_F_Renamed_Object, Info => Var_Expr_1.Info);
--# expr-done 6845
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_8.Node);
--# expr-done 6846
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
Cast_Expr_1 := Local_Typ; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_9, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12660:17") else null)); 
--# expr-done 6847
--# expr-start 6849 '<FieldAccess for sub_equation at nodes.lkt:12661:22>' Fld_11 ada/nodes.lkt:12661
--# expr-start 6848 '<FieldAccess for renamed_object at nodes.lkt:12661:22>' Fld_10 ada/nodes.lkt:12661
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Name (Node => Var_Expr_1.Node.Renaming_Clause_F_Renamed_Object, Info => Var_Expr_1.Info);
--# expr-done 6848
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_11 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_10.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_10.Info);
--# end
--# expr-done 6849
And_Pred_3 := Create_And (Bind_Result_1, Fld_11, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12660:17") else null)); 
--# expr-done 6850
--# expr-start 6852 '<FieldAccess for matches_expected_assign_type at nodes.lkt:12663:18>' Fld_13 ada/nodes.lkt:12663
--# expr-start 6851 '<FieldAccess for renamed_object at nodes.lkt:12663:18>' Fld_12 ada/nodes.lkt:12663
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Name (Node => Var_Expr_1.Node.Renaming_Clause_F_Renamed_Object, Info => Var_Expr_1.Info);
--# expr-done 6851
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_13 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Fld_12.Node, Origin => Origin);
--# end
--# expr-done 6852
And_Pred_4 := Create_And (And_Pred_3, Fld_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12659:13") else null)); 
--# expr-done 6853
Scope_Result_1 := And_Pred_4;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2868;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12664:25") else null)); 
   Result_Var_1 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
And_Pred_5 := Create_And (And_Pred_2, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12648:9") else null)); 
--# expr-done 6854
Let_Result := And_Pred_5; Inc_Ref (Let_Result);
--# end
--# expr-done 6855
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1018;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1018;
                     Finalizer_Scope_2867;
                     Finalizer_Scope_2868;
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Xref_Equation;
--# end
--# property-start ObjectDecl.next_part_for_name ada/nodes.lkt:12669
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Next_Part_For_Name
  (Node : Bare_Object_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_2869 with Inline_Always;
      Var_Expr_186 : Internal_Entity_Private_Part;
Fld : Bare_Declarative_Part;
Fld_1 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Cast_Result : Internal_Entity_Base_Package_Decl;
Fld_2 : Internal_Entity_Private_Part;
Fld_3 : Lexical_Env := Empty_Env;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_4 : Boolean;
Fld_5 : Bare_Constant_Node;
Fld_6 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_2869 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2869;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6868 '<If at nodes.lkt:12670:9>' If_Result_2 ada/nodes.lkt:12670
--# expr-start 6859 '<BooleanBinaryOp And at nodes.lkt:12670:12>' If_Result_1 ada/nodes.lkt:12670
--# expr-start 6856 '<FieldAccess for is_in_public_part at nodes.lkt:12670:12>' Fld_4 ada/nodes.lkt:12670
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_public_part'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Public_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6856
if Fld_4 then
   --# expr-start 6858 '<FieldAccess for as_bool at nodes.lkt:12670:41>' Fld_6 ada/nodes.lkt:12670
--# expr-start 6857 '<FieldAccess for has_constant at nodes.lkt:12670:41>' Fld_5 ada/nodes.lkt:12670
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Object_Decl_F_Has_Constant;
--# expr-done 6857
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Constant.as_bool'
Fld_6 := Libadalang.Implementation.Dispatcher_Constant_Node_P_As_Bool (Node => Fld_5);
--# end
--# expr-done 6858
   If_Result_1 := Fld_6;
else
   If_Result_1 := False;
end if;
--# expr-done 6859
if If_Result_1 then
   --# expr-start 6867 '<Cast to BasicDecl at nodes.lkt:12672:13>' Cast_Result_1 ada/nodes.lkt:12672
--# expr-start 6864 '<FieldAccess for private_part at nodes.lkt:12672:13>' Fld_2 ada/nodes.lkt:12672
--# expr-start 6863 '<Cast to BasePackageDecl at nodes.lkt:12672:13>' Cast_Result ada/nodes.lkt:12672
--# expr-start 6862 '<as_entity at nodes.lkt:12672:13>' If_Result ada/nodes.lkt:12672
--# expr-start 6861 '<parent at nodes.lkt:12672:13>' Fld_1 ada/nodes.lkt:12672
--# expr-start 6860 '<FieldAccess for declarative_scope at nodes.lkt:12672:13>' Fld ada/nodes.lkt:12672
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Self);
--# end
--# expr-done 6860
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 6861
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 6862
   if If_Result.Node = null
      or else If_Result.Node.Kind in Ada_Base_Package_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Package_Decl
        (Node => If_Result.Node,
         Info => If_Result.Info);
   else
         Cast_Result := No_Entity_Base_Package_Decl;
   end if;
--# expr-done 6863
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Private_Part (Node => Cast_Result.Node.Base_Package_Decl_F_Private_Part, Info => Cast_Result.Info);
--# expr-done 6864
Var_Expr_186 := Fld_2;
if Var_Expr_186 /= No_Entity_Private_Part then
   --# scope-start
--# expr-start 6866 '<EnvGet at nodes.lkt:12672:13>' Env_Get_Result ada/nodes.lkt:12672
--# expr-start 6865 '<FieldAccess for children_env at nodes.lkt:12672:13>' Fld_3 ada/nodes.lkt:12672
      if Var_Expr_186.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Var_Expr_186.Node, E_Info => Var_Expr_186.Info);
--# expr-done 6865
Env_Get_Result := AST_Envs.Get_First (Self => Fld_3, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 6866
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_2869;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 6867
   If_Result_2 := Cast_Result_1;
else
   If_Result_2 := No_Entity_Basic_Decl;
end if;
--# expr-done 6868
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2869;
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Next_Part_For_Name;
--# end
--# property-start ObjectDecl.previous_part_for_name ada/nodes.lkt:12687
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Previous_Part_For_Name
  (Node : Bare_Object_Decl
      ; Sym : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sym Sym
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_1020 with Inline_Always;
      Fld : Bare_Declarative_Part;
Fld_1 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Cast_Result : Internal_Entity_Base_Package_Decl;
Fld_2 : Internal_Entity_Public_Part;
Fld_3 : Lexical_Env := Empty_Env;
Env_Get_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_4 : Boolean;
Fld_5 : Bare_Constant_Node;
Fld_6 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_1020 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_1020;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6881 '<If at nodes.lkt:12688:9>' If_Result_2 ada/nodes.lkt:12688
--# expr-start 6872 '<BooleanBinaryOp And at nodes.lkt:12688:12>' If_Result_1 ada/nodes.lkt:12688
--# expr-start 6869 '<FieldAccess for is_in_private_part at nodes.lkt:12688:12>' Fld_4 ada/nodes.lkt:12688
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6869
if Fld_4 then
   --# expr-start 6871 '<FieldAccess for as_bool at nodes.lkt:12688:42>' Fld_6 ada/nodes.lkt:12688
--# expr-start 6870 '<FieldAccess for has_constant at nodes.lkt:12688:42>' Fld_5 ada/nodes.lkt:12688
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Object_Decl_F_Has_Constant;
--# expr-done 6870
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Constant.as_bool'
Fld_6 := Libadalang.Implementation.Dispatcher_Constant_Node_P_As_Bool (Node => Fld_5);
--# end
--# expr-done 6871
   If_Result_1 := Fld_6;
else
   If_Result_1 := False;
end if;
--# expr-done 6872
if If_Result_1 then
   --# expr-start 6880 '<Cast to BasicDecl at nodes.lkt:12690:13>' Cast_Result_1 ada/nodes.lkt:12690
--# expr-start 6879 '<EnvGet at nodes.lkt:12690:13>' Env_Get_Result ada/nodes.lkt:12690
--# expr-start 6878 '<FieldAccess for children_env at nodes.lkt:12690:13>' Fld_3 ada/nodes.lkt:12690
--# expr-start 6877 '<FieldAccess for public_part at nodes.lkt:12690:13>' Fld_2 ada/nodes.lkt:12690
--# expr-start 6876 '<Cast to BasePackageDecl at nodes.lkt:12690:13>' Cast_Result ada/nodes.lkt:12690
--# expr-start 6875 '<as_entity at nodes.lkt:12690:13>' If_Result ada/nodes.lkt:12690
--# expr-start 6874 '<parent at nodes.lkt:12690:13>' Fld_1 ada/nodes.lkt:12690
--# expr-start 6873 '<FieldAccess for declarative_scope at nodes.lkt:12690:13>' Fld ada/nodes.lkt:12690
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Self);
--# end
--# expr-done 6873
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 6874
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 6875
   if If_Result.Node = null
      or else If_Result.Node.Kind in Ada_Base_Package_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Package_Decl
        (Node => If_Result.Node,
         Info => If_Result.Info);
   else
         Cast_Result := No_Entity_Base_Package_Decl;
   end if;
--# expr-done 6876
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Public_Part (Node => Cast_Result.Node.Base_Package_Decl_F_Public_Part, Info => Cast_Result.Info);
--# expr-done 6877
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# expr-done 6878
Env_Get_Result := AST_Envs.Get_First (Self => Fld_3, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 6879
   if Env_Get_Result.Node = null
      or else Env_Get_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Env_Get_Result.Node,
         Info => Env_Get_Result.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 6880
   If_Result_2 := Cast_Result_1;
else
   If_Result_2 := No_Entity_Basic_Decl;
end if;
--# expr-done 6881
         Property_Result := If_Result_2;
   --# end
      Finalizer_Scope_1020;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1020;
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Previous_Part_For_Name;
--# end
--# property-start ObjectDecl.private_part_decl ada/nodes.lkt:12707
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Private_Part_Decl
  (Node : Bare_Object_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 6884 '<FieldAccess for next_part_for_name at nodes.lkt:12708:9>' Fld_2 ada/nodes.lkt:12708
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6883 '<FieldAccess for name_symbol at nodes.lkt:12708:33>' Fld_1 ada/nodes.lkt:12708
--# expr-start 6882 '<FieldAccess for defining_name_or_raise at nodes.lkt:12708:33>' Fld ada/nodes.lkt:12708
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6882
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 6883
--# property-call-start '[dispatcher]BasicDecl.next_part_for_name'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Name (Node => Ent.Node, Sym => Fld_1, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 6884
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Private_Part_Decl;
--# end
--# property-start ObjectDecl.public_part_decl ada/nodes.lkt:12713
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Public_Part_Decl
  (Node : Bare_Object_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 6887 '<FieldAccess for previous_part_for_name at nodes.lkt:12714:9>' Fld_2 ada/nodes.lkt:12714
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6886 '<FieldAccess for name_symbol at nodes.lkt:12715:13>' Fld_1 ada/nodes.lkt:12715
--# expr-start 6885 '<FieldAccess for defining_name_or_raise at nodes.lkt:12715:13>' Fld ada/nodes.lkt:12715
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6885
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 6886
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_name'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Name (Node => Ent.Node, Sym => Fld_1, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 6887
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Public_Part_Decl;
--# end
--# property-start ObjectDecl.next_part_for_decl ada/nodes.lkt:12719
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Next_Part_For_Decl
  (Node : Bare_Object_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6888 '<FieldAccess for private_part_decl at nodes.lkt:12719:51>' Fld ada/nodes.lkt:12719
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ObjectDecl.private_part_decl
Fld := Libadalang.Implementation.Object_Decl_P_Private_Part_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6888
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Next_Part_For_Decl;
--# end
--# property-start ObjectDecl.previous_part_for_decl ada/nodes.lkt:12722
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Previous_Part_For_Decl
  (Node : Bare_Object_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
     Ent : Internal_Entity_Object_Decl :=
       Internal_Entity_Object_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6889 '<FieldAccess for public_part_decl at nodes.lkt:12722:55>' Fld ada/nodes.lkt:12722
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ObjectDecl.public_part_decl
Fld := Libadalang.Implementation.Object_Decl_P_Public_Part_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6889
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Previous_Part_For_Decl;
--# end
--# property-start ObjectDecl.xref_entry_point ada/nodes.lkt:12724
pragma Warnings (Off, "is not referenced");
 function Object_Decl_P_Xref_Entry_Point
  (Node : Bare_Object_Decl
  )
   return Boolean
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Object_Decl_P_Xref_Entry_Point;
--# end
--# property-start ObjectDecl._env_mappings_196 ada/nodes.lkt:12727
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_196
  (Node : Bare_Object_Decl
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Object_Decl  := Bare_Object_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1860 with Inline_Always;
      Fld : Bare_Defining_Name_List;
Cast_Expr : Bare_Object_Decl;
Cast_Result : Bare_Ada_Node;
Fld_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1860 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1860;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6891 '<FieldAccess for env_mappings at nodes.lkt:12727:20>' Fld_1 ada/nodes.lkt:12727
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6890 '<FieldAccess for ids at nodes.lkt:12727:38>' Fld ada/nodes.lkt:12727
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Object_Decl_F_Ids;
--# expr-done 6890
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
--# property-call-start AdaNode.env_mappings
Fld_1 := Libadalang.Implementation.Ada_Node_P_Env_Mappings (Node => Self, Defining_Names => Fld, Value => Cast_Result);
--# end
--# expr-done 6891
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1860;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1860;
            raise;
      end;
   return Property_Result;
end Env_Mappings_196;
--# end
   --
   --  Primitives for Bare_Extended_Return_Stmt_Object_Decl
   --
      procedure Initialize_Fields_For_Extended_Return_Stmt_Object_Decl
        (Self : Bare_Extended_Return_Stmt_Object_Decl
         ; Object_Decl_F_Ids : Bare_Defining_Name_List
         ; Object_Decl_F_Has_Aliased : Bare_Aliased_Node
         ; Object_Decl_F_Has_Constant : Bare_Constant_Node
         ; Object_Decl_F_Mode : Bare_Mode
         ; Object_Decl_F_Type_Expr : Bare_Type_Expr
         ; Object_Decl_F_Default_Expr : Bare_Expr
         ; Object_Decl_F_Renaming_Clause : Bare_Renaming_Clause
         ; Object_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Object_Decl
              (Self, Object_Decl_F_Ids, Object_Decl_F_Has_Aliased, Object_Decl_F_Has_Constant, Object_Decl_F_Mode, Object_Decl_F_Type_Expr, Object_Decl_F_Default_Expr, Object_Decl_F_Renaming_Clause, Object_Decl_F_Aspects);
      end Initialize_Fields_For_Extended_Return_Stmt_Object_Decl;
   --
   --  Primitives for Bare_No_Type_Object_Renaming_Decl
   --
      procedure Initialize_Fields_For_No_Type_Object_Renaming_Decl
        (Self : Bare_No_Type_Object_Renaming_Decl
         ; Object_Decl_F_Ids : Bare_Defining_Name_List
         ; Object_Decl_F_Has_Aliased : Bare_Aliased_Node
         ; Object_Decl_F_Has_Constant : Bare_Constant_Node
         ; Object_Decl_F_Mode : Bare_Mode
         ; Object_Decl_F_Type_Expr : Bare_Type_Expr
         ; Object_Decl_F_Default_Expr : Bare_Expr
         ; Object_Decl_F_Renaming_Clause : Bare_Renaming_Clause
         ; Object_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Initialize_Fields_For_Object_Decl
              (Self, Object_Decl_F_Ids, Object_Decl_F_Has_Aliased, Object_Decl_F_Has_Constant, Object_Decl_F_Mode, Object_Decl_F_Type_Expr, Object_Decl_F_Default_Expr, Object_Decl_F_Renaming_Clause, Object_Decl_F_Aspects);
      end Initialize_Fields_For_No_Type_Object_Renaming_Decl;
--# property-start NoTypeObjectRenamingDecl.expr_type ada/nodes.lkt:12742
pragma Warnings (Off, "is not referenced");
 function No_Type_Object_Renaming_Decl_P_Expr_Type
  (Node : Bare_No_Type_Object_Renaming_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_No_Type_Object_Renaming_Decl  := Bare_No_Type_Object_Renaming_Decl (Node);
     Ent : Internal_Entity_No_Type_Object_Renaming_Decl :=
       Internal_Entity_No_Type_Object_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Renaming_Clause;
Fld_1 : Internal_Entity_Name;
Fld_2 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6894 '<FieldAccess for expression_type at nodes.lkt:12743:9>' Fld_2 ada/nodes.lkt:12743
--# expr-start 6893 '<FieldAccess for renamed_object at nodes.lkt:12743:9>' Fld_1 ada/nodes.lkt:12743
--# expr-start 6892 '<FieldAccess for renaming_clause at nodes.lkt:12743:9>' Fld ada/nodes.lkt:12743
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Object_Decl_F_Renaming_Clause, Info => Ent.Info);
--# expr-done 6892
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Renaming_Clause_F_Renamed_Object, Info => Fld.Info);
--# expr-done 6893
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_2 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 6894
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end No_Type_Object_Renaming_Decl_P_Expr_Type;
--# end
--# property-start NoTypeObjectRenamingDecl.defining_env ada/nodes.lkt:12748
pragma Warnings (Off, "is not referenced");
 function No_Type_Object_Renaming_Decl_P_Defining_Env
  (Node : Bare_No_Type_Object_Renaming_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_No_Type_Object_Renaming_Decl  := Bare_No_Type_Object_Renaming_Decl (Node);
     Ent : Internal_Entity_No_Type_Object_Renaming_Decl :=
       Internal_Entity_No_Type_Object_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1027 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1027 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1027;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6896 '<FieldAccess for defining_env at nodes.lkt:12748:38>' Fld_1 ada/nodes.lkt:12748
--# expr-start 6895 '<FieldAccess for expr_type at nodes.lkt:12748:38>' Fld ada/nodes.lkt:12748
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 6895
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 6896
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1027;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1027;
            raise;
      end;
   return Property_Result;
end No_Type_Object_Renaming_Decl_P_Defining_Env;
--# end
--# property-start NoTypeObjectRenamingDecl.xref_equation ada/nodes.lkt:12751
pragma Warnings (Off, "is not referenced");
 function No_Type_Object_Renaming_Decl_P_Xref_Equation
  (Node : Bare_No_Type_Object_Renaming_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_No_Type_Object_Renaming_Decl  := Bare_No_Type_Object_Renaming_Decl (Node);
     Ent : Internal_Entity_No_Type_Object_Renaming_Decl :=
       Internal_Entity_No_Type_Object_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1028 with Inline_Always;
      Fld : Internal_Entity_Renaming_Clause;
Fld_1 : Internal_Entity_Name;
Fld_2 : Logic_Equation;
            procedure Finalizer_Scope_1028 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1028;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6899 '<FieldAccess for sub_equation at nodes.lkt:12752:9>' Fld_2 ada/nodes.lkt:12752
--# expr-start 6898 '<FieldAccess for renamed_object at nodes.lkt:12752:9>' Fld_1 ada/nodes.lkt:12752
--# expr-start 6897 '<FieldAccess for renaming_clause at nodes.lkt:12752:9>' Fld ada/nodes.lkt:12752
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Object_Decl_F_Renaming_Clause, Info => Ent.Info);
--# expr-done 6897
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Renaming_Clause_F_Renamed_Object, Info => Fld.Info);
--# expr-done 6898
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_2 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_1.Info);
--# end
--# expr-done 6899
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1028;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1028;
            raise;
      end;
   return Property_Result;
end No_Type_Object_Renaming_Decl_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Package_Renaming_Decl
   --
      procedure Package_Renaming_Decl_Pre_Env_Actions
        (Self            : Bare_Package_Renaming_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Dummy : Boolean;
      begin
         Dummy := Libadalang.Implementation.Env_Do_197 (Node => 
Self);
      end;
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_198 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:12819:9");
      end;
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_199 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12820:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_200 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      declare
         Dummy : Bare_Compilation_Unit_Array_Access;
      begin
         Dummy := Libadalang.Implementation.Env_Do_201 (Node => 
Self);
         Dec_Ref (Dummy);
      end;
      if Libadalang.Implementation.Ref_Cond_203 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_202 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      if Libadalang.Implementation.Ref_Cond_205 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_204 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Package_Renaming_Decl
        (Self : Bare_Package_Renaming_Decl
         ; Package_Renaming_Decl_F_Name : Bare_Defining_Name
         ; Package_Renaming_Decl_F_Renames : Bare_Renaming_Clause
         ; Package_Renaming_Decl_F_Aspects : Bare_Aspect_Spec
        ) is
      begin
            Self.Package_Renaming_Decl_F_Name := Package_Renaming_Decl_F_Name;
            Self.Package_Renaming_Decl_F_Renames := Package_Renaming_Decl_F_Renames;
            Self.Package_Renaming_Decl_F_Aspects := Package_Renaming_Decl_F_Aspects;
      end Initialize_Fields_For_Package_Renaming_Decl;
   function Package_Renaming_Decl_F_Name
     (Node : Bare_Package_Renaming_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Package_Renaming_Decl_F_Name;
   end;
   function Package_Renaming_Decl_F_Renames
     (Node : Bare_Package_Renaming_Decl) return Bare_Renaming_Clause
   is
   begin
         return Node.Package_Renaming_Decl_F_Renames;
   end;
--# property-start PackageRenamingDecl.renamed_package ada/nodes.lkt:12766
pragma Warnings (Off, "is not referenced");
 function Package_Renaming_Decl_P_Renamed_Package
  (Node : Bare_Package_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Package_Renaming_Decl :=
       Internal_Entity_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_1029 with Inline_Always;
      Local_Node_Env : Lexical_Env := Empty_Env;
Ignored : Internal_Entity_Array_Access;
Fld : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Renaming_Clause;
Fld_2 : Internal_Entity_Name;
Fld_3 : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_1029 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Node_Env);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Ignored);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_1029;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 6910 '<Let at nodes.lkt:12776:9>' Let_Result_1 ada/nodes.lkt:12776
--# scope-start
--# expr-start 6900 '<FieldAccess for node_env at nodes.lkt:12776:24>' Fld ada/nodes.lkt:12776
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6900
Local_Node_Env := Fld; Inc_Ref (Local_Node_Env);
--# bind node_env Local_Node_Env
--# expr-start 6909 '<Let at nodes.lkt:12777:9>' Let_Result ada/nodes.lkt:12777
--# scope-start
--# expr-start 6902 '<EnvGet at nodes.lkt:12778:13>' Env_Get_Result ada/nodes.lkt:12778
--# expr-start 6901 '<Symbol __dummy at nodes.lkt:12779:17>' Sym ada/nodes.lkt:12779
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Dummy); 
--# expr-done 6901
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Local_Node_Env, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 6902
Ignored := Env_Get_Result; Inc_Ref (Ignored);
--# bind _ Ignored
--# expr-start 6908 '<bind at nodes.lkt:12786:13>' Dyn_Var_Bind_Result ada/nodes.lkt:12786
Bound_Env := Local_Node_Env; Inc_Ref (Bound_Env);
--# expr-start 6907 '<Cast to BasicDecl at nodes.lkt:12788:13>' Cast_Result ada/nodes.lkt:12788
--# expr-start 6906 '<at at nodes.lkt:12788:13>' Get_Result ada/nodes.lkt:12788
--# expr-start 6905 '<FieldAccess for env_elements at nodes.lkt:12788:13>' Fld_3 ada/nodes.lkt:12788
--# expr-start 6904 '<FieldAccess for renamed_object at nodes.lkt:12788:13>' Fld_2 ada/nodes.lkt:12788
--# expr-start 6903 '<FieldAccess for renames at nodes.lkt:12788:13>' Fld_1 ada/nodes.lkt:12788
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Package_Renaming_Decl_F_Renames, Info => Ent.Info);
--# expr-done 6903
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Fld_1.Node.Renaming_Clause_F_Renamed_Object, Info => Fld_1.Info);
--# expr-done 6904
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.env_elements
Fld_3 := Libadalang.Implementation.Expr_P_Env_Elements (Node => Fld_2.Node, Env => Bound_Env, No_Visibility => False, E_Info => Fld_2.Info);
--# end
--# expr-done 6905
Get_Result := Get (Self, Fld_3, 0, True); 
--# expr-done 6906
   if Get_Result.Node = null
      or else Get_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Get_Result.Node,
         Info => Get_Result.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 6907
Dyn_Var_Bind_Result := Cast_Result; 
--# expr-done 6908
Let_Result := Dyn_Var_Bind_Result; 
--# end
--# expr-done 6909
Let_Result_1 := Let_Result; 
--# end
--# expr-done 6910
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_1029;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1029;
            raise;
      end;
   return Property_Result;
end Package_Renaming_Decl_P_Renamed_Package;
--# end
--# property-start PackageRenamingDecl.final_renamed_package ada/nodes.lkt:12795
pragma Warnings (Off, "is not referenced");
 function Package_Renaming_Decl_P_Final_Renamed_Package
  (Node : Bare_Package_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Package_Renaming_Decl :=
       Internal_Entity_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Local_Pkg : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Package_Renaming_Decl;
Fld : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Package_Renaming_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Let_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 6914 '<Let at nodes.lkt:12796:9>' Let_Result ada/nodes.lkt:12796
--# scope-start
--# expr-start 6911 '<FieldAccess for renamed_package at nodes.lkt:12796:19>' Fld ada/nodes.lkt:12796
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start PackageRenamingDecl.renamed_package
Fld := Libadalang.Implementation.Package_Renaming_Decl_P_Renamed_Package (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6911
Local_Pkg := Fld; 
--# bind pkg Local_Pkg
--# expr-start 6912 '<Cast to PackageRenamingDecl at nodes.lkt:12798:9>' Cast_Result ada/nodes.lkt:12798
Cast_Expr := Local_Pkg; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Package_Renaming_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Package_Renaming_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Package_Renaming_Decl;
   end if;
--# expr-done 6912
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Package_Renaming_Decl then
   --# scope-start
   --# bind r Var_Expr_0
--# expr-start 6913 '<FieldAccess for final_renamed_package at nodes.lkt:12799:20>' Fld_1 ada/nodes.lkt:12799
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start PackageRenamingDecl.final_renamed_package
Fld_1 := Libadalang.Implementation.Package_Renaming_Decl_P_Final_Renamed_Package (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 6913
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := Local_Pkg;
end if;
Let_Result := Result_Var; 
--# end
--# expr-done 6914
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Package_Renaming_Decl_P_Final_Renamed_Package;
--# end
--# property-start PackageRenamingDecl.defining_names ada/nodes.lkt:12804
pragma Warnings (Off, "is not referenced");
 function Package_Renaming_Decl_P_Defining_Names
  (Node : Bare_Package_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Package_Renaming_Decl :=
       Internal_Entity_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1031 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1031 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1031;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6916 '<ArrayLiteral at nodes.lkt:12804:57>' Array_Lit ada/nodes.lkt:12804
--# expr-start 6915 '<FieldAccess for name at nodes.lkt:12804:58>' Fld ada/nodes.lkt:12804
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Package_Renaming_Decl_F_Name, Info => Ent.Info);
--# expr-done 6915
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6916
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1031;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1031;
            raise;
      end;
   return Property_Result;
end Package_Renaming_Decl_P_Defining_Names;
--# end
--# property-start PackageRenamingDecl.defining_env ada/nodes.lkt:12809
pragma Warnings (Off, "is not referenced");
 function Package_Renaming_Decl_P_Defining_Env
  (Node : Bare_Package_Renaming_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Package_Renaming_Decl :=
       Internal_Entity_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1032 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1032 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1032;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6918 '<FieldAccess for defining_env at nodes.lkt:12809:38>' Fld_1 ada/nodes.lkt:12809
--# expr-start 6917 '<FieldAccess for renamed_package at nodes.lkt:12809:38>' Fld ada/nodes.lkt:12809
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start PackageRenamingDecl.renamed_package
Fld := Libadalang.Implementation.Package_Renaming_Decl_P_Renamed_Package (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 6917
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 6918
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1032;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1032;
            raise;
      end;
   return Property_Result;
end Package_Renaming_Decl_P_Defining_Env;
--# end
--# property-start PackageRenamingDecl.xref_entry_point ada/nodes.lkt:12811
pragma Warnings (Off, "is not referenced");
 function Package_Renaming_Decl_P_Xref_Entry_Point
  (Node : Bare_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Package_Renaming_Decl_P_Xref_Entry_Point;
--# end
--# property-start PackageRenamingDecl.xref_equation ada/nodes.lkt:12814
pragma Warnings (Off, "is not referenced");
 function Package_Renaming_Decl_P_Xref_Equation
  (Node : Bare_Package_Renaming_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Package_Renaming_Decl :=
       Internal_Entity_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1034 with Inline_Always;
      Fld : Internal_Entity_Renaming_Clause;
Fld_1 : Internal_Entity_Name;
Fld_2 : Logic_Equation;
            procedure Finalizer_Scope_1034 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1034;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6921 '<FieldAccess for xref_no_overloading at nodes.lkt:12815:9>' Fld_2 ada/nodes.lkt:12815
--# expr-start 6920 '<FieldAccess for renamed_object at nodes.lkt:12815:9>' Fld_1 ada/nodes.lkt:12815
--# expr-start 6919 '<FieldAccess for renames at nodes.lkt:12815:9>' Fld ada/nodes.lkt:12815
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Renaming_Clause (Node => Ent.Node.Package_Renaming_Decl_F_Renames, Info => Ent.Info);
--# expr-done 6919
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Renaming_Clause_F_Renamed_Object, Info => Fld.Info);
--# expr-done 6920
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_2 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_1.Info);
--# end
--# expr-done 6921
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1034;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1034;
            raise;
      end;
   return Property_Result;
end Package_Renaming_Decl_P_Xref_Equation;
--# end
--# property-start PackageRenamingDecl._env_do_197 ada/nodes.lkt:12818
pragma Warnings (Off, "is not referenced");
 function Env_Do_197
  (Node : Bare_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6922 '<FieldAccess for env_hook at nodes.lkt:12818:12>' Fld ada/nodes.lkt:12818
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_hook
Fld := Libadalang.Implementation.Ada_Node_P_Env_Hook (Node => Self);
--# end
--# expr-done 6922
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Do_197;
--# end
--# property-start PackageRenamingDecl._env_init_198 ada/nodes.lkt:12819
pragma Warnings (Off, "is not referenced");
 function Env_Init_198
  (Node : Bare_Package_Renaming_Decl
  )
   return Internal_Designated_Env
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1862 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1862 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1862;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6923 '<FieldAccess for child_decl_initial_env at nodes.lkt:12819:25>' Fld ada/nodes.lkt:12819
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.child_decl_initial_env
Fld := Libadalang.Implementation.Basic_Decl_P_Child_Decl_Initial_Env (Node => Self);
--# end
--# expr-done 6923
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1862;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1862;
            raise;
      end;
   return Property_Result;
end Env_Init_198;
--# end
--# property-start PackageRenamingDecl._env_mappings_199 ada/nodes.lkt:12820
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_199
  (Node : Bare_Package_Renaming_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
     Ent : Internal_Entity_Package_Renaming_Decl :=
       Internal_Entity_Package_Renaming_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1863 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Package_Renaming_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1863 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1863;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6926 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6924 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6924
--# expr-start 6925 '<FieldAccess for name_symbol at nodes.lkt:12820:23>' Fld ada/nodes.lkt:12820
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 6925
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6926
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1863;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1863;
            raise;
      end;
   return Property_Result;
end Env_Mappings_199;
--# end
--# property-start PackageRenamingDecl._env_trans_parent_200 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_200
  (Node : Bare_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_200;
--# end
--# property-start PackageRenamingDecl._env_do_201 ada/nodes.lkt:12822
pragma Warnings (Off, "is not referenced");
 function Env_Do_201
  (Node : Bare_Package_Renaming_Decl
  )
   return Bare_Compilation_Unit_Array_Access
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1865 with Inline_Always;
      Fld : Bare_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1865 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1865;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6927 '<FieldAccess for populate_dependent_units at nodes.lkt:12822:12>' Fld ada/nodes.lkt:12822
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.populate_dependent_units
Fld := Libadalang.Implementation.Basic_Decl_P_Populate_Dependent_Units (Node => Self);
--# end
--# expr-done 6927
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1865;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1865;
            raise;
      end;
   return Property_Result;
end Env_Do_201;
--# end
--# property-start PackageRenamingDecl._ref_env_nodes_202 ada/nodes.lkt:12824
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_202
  (Node : Bare_Package_Renaming_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1866 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1866 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1866;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6928 '<FieldAccess for top_level_use_package_clauses at nodes.lkt:12824:13>' Fld ada/nodes.lkt:12824
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Package_Clauses (Node => Self);
--# end
--# expr-done 6928
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1866;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1866;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_202;
--# end
--# property-start PackageRenamingDecl._ref_cond_203 ada/nodes.lkt:12826
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_203
  (Node : Bare_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6930 '<IsA LibraryItem, Subunit at nodes.lkt:12826:18>' Is_A ada/nodes.lkt:12826
--# expr-start 6929 '<parent at nodes.lkt:12826:18>' Fld ada/nodes.lkt:12826
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6929
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6930
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_203;
--# end
--# property-start PackageRenamingDecl._ref_env_nodes_204 ada/nodes.lkt:12829
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_204
  (Node : Bare_Package_Renaming_Decl
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1868 with Inline_Always;
      Fld : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1868 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1868;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6931 '<FieldAccess for top_level_use_type_clauses at nodes.lkt:12829:13>' Fld ada/nodes.lkt:12829
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_use_type_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_Use_Type_Clauses (Node => Self);
--# end
--# expr-done 6931
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1868;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1868;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_204;
--# end
--# property-start PackageRenamingDecl._ref_cond_205 ada/nodes.lkt:12831
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_205
  (Node : Bare_Package_Renaming_Decl
  )
   return Boolean
is
   Self : Bare_Package_Renaming_Decl  := Bare_Package_Renaming_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6933 '<IsA LibraryItem, Subunit at nodes.lkt:12831:18>' Is_A ada/nodes.lkt:12831
--# expr-start 6932 '<parent at nodes.lkt:12831:18>' Fld ada/nodes.lkt:12831
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 6932
Is_A := Fld /= null 
and then Fld.Kind in Ada_Library_Item_Range | Ada_Subunit_Range; 
--# expr-done 6933
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_205;
--# end
   --
   --  Primitives for Bare_Single_Protected_Decl
   --
      procedure Single_Protected_Decl_Pre_Env_Actions
        (Self            : Bare_Single_Protected_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_206 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12879:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_207 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_208 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Single_Protected_Decl
        (Self : Bare_Single_Protected_Decl
         ; Single_Protected_Decl_F_Name : Bare_Defining_Name
         ; Single_Protected_Decl_F_Aspects : Bare_Aspect_Spec
         ; Single_Protected_Decl_F_Interfaces : Bare_Parent_List
         ; Single_Protected_Decl_F_Definition : Bare_Protected_Def
        ) is
      begin
            Self.Single_Protected_Decl_F_Name := Single_Protected_Decl_F_Name;
            Self.Single_Protected_Decl_F_Aspects := Single_Protected_Decl_F_Aspects;
            Self.Single_Protected_Decl_F_Interfaces := Single_Protected_Decl_F_Interfaces;
            Self.Single_Protected_Decl_F_Definition := Single_Protected_Decl_F_Definition;
      end Initialize_Fields_For_Single_Protected_Decl;
   function Single_Protected_Decl_F_Name
     (Node : Bare_Single_Protected_Decl) return Bare_Defining_Name
   is
   begin
         return Node.Single_Protected_Decl_F_Name;
   end;
   function Single_Protected_Decl_F_Interfaces
     (Node : Bare_Single_Protected_Decl) return Bare_Parent_List
   is
   begin
         return Node.Single_Protected_Decl_F_Interfaces;
   end;
   function Single_Protected_Decl_F_Definition
     (Node : Bare_Single_Protected_Decl) return Bare_Protected_Def
   is
   begin
         return Node.Single_Protected_Decl_F_Definition;
   end;
--# property-start SingleProtectedDecl.defining_names ada/nodes.lkt:12847
pragma Warnings (Off, "is not referenced");
 function Single_Protected_Decl_P_Defining_Names
  (Node : Bare_Single_Protected_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
     Ent : Internal_Entity_Single_Protected_Decl :=
       Internal_Entity_Single_Protected_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1035 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1035 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1035;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6935 '<ArrayLiteral at nodes.lkt:12847:57>' Array_Lit ada/nodes.lkt:12847
--# expr-start 6934 '<FieldAccess for name at nodes.lkt:12847:58>' Fld ada/nodes.lkt:12847
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Defining_Name (Node => Ent.Node.Single_Protected_Decl_F_Name, Info => Ent.Info);
--# expr-done 6934
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld)); 
--# expr-done 6935
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1035;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1035;
            raise;
      end;
   return Property_Result;
end Single_Protected_Decl_P_Defining_Names;
--# end
--# property-start SingleProtectedDecl.defining_env ada/nodes.lkt:12852
pragma Warnings (Off, "is not referenced");
 function Single_Protected_Decl_P_Defining_Env
  (Node : Bare_Single_Protected_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
     Ent : Internal_Entity_Single_Protected_Decl :=
       Internal_Entity_Single_Protected_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1036 with Inline_Always;
            procedure Finalizer_Scope_2871 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Private_Part;
Fld : Internal_Entity_Protected_Def;
Fld_1 : Internal_Entity_Private_Part;
Fld_2 : Lexical_Env := Empty_Env;
Fld_3 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Fld_4 : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1036 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1036;
            procedure Finalizer_Scope_2871 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_2871;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6937 '<FieldAccess for private_part at nodes.lkt:12853:9>' Fld_1 ada/nodes.lkt:12853
--# expr-start 6936 '<FieldAccess for definition at nodes.lkt:12853:9>' Fld ada/nodes.lkt:12853
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Protected_Def (Node => Ent.Node.Single_Protected_Decl_F_Definition, Info => Ent.Info);
--# expr-done 6936
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Private_Part (Node => Fld.Node.Protected_Def_F_Private_Part, Info => Fld.Info);
--# expr-done 6937
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Private_Part then
   --# scope-start
   --# bind pp Var_Expr_0
--# expr-start 6941 '<env_group at nodes.lkt:12858:13>' Group_Env ada/nodes.lkt:12858
--# expr-start 6940 '<ArrayLiteral at nodes.lkt:12858:13>' Array_Lit ada/nodes.lkt:12858
--# expr-start 6938 '<FieldAccess for children_env at nodes.lkt:12858:14>' Fld_2 ada/nodes.lkt:12858
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6938
--# expr-start 6939 '<FieldAccess for children_env at nodes.lkt:12858:33>' Fld_3 ada/nodes.lkt:12858
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 6939
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_2, 2 => Fld_3)); 
--# expr-done 6940
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 6941
Scope_Result := Group_Env;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2871;
   Result_Var := Scope_Result;
else
   --# expr-start 6942 '<FieldAccess for children_env at nodes.lkt:12859:25>' Fld_4 ada/nodes.lkt:12859
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6942
   Result_Var := Fld_4;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1036;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1036;
                     Finalizer_Scope_2871;
            raise;
      end;
   return Property_Result;
end Single_Protected_Decl_P_Defining_Env;
--# end
--# property-start SingleProtectedDecl.xref_entry_point ada/nodes.lkt:12862
pragma Warnings (Off, "is not referenced");
 function Single_Protected_Decl_P_Xref_Entry_Point
  (Node : Bare_Single_Protected_Decl
  )
   return Boolean
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Single_Protected_Decl_P_Xref_Entry_Point;
--# end
--# property-start SingleProtectedDecl.xref_equation ada/nodes.lkt:12865
pragma Warnings (Off, "is not referenced");
 function Single_Protected_Decl_P_Xref_Equation
  (Node : Bare_Single_Protected_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
     Ent : Internal_Entity_Single_Protected_Decl :=
       Internal_Entity_Single_Protected_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1038 with Inline_Always;
            procedure Finalizer_Scope_2872 with Inline_Always;
      Fld : Internal_Entity_Parent_List;
Fld_1 : Bare_Parent_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1038 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1038;
            procedure Finalizer_Scope_2872 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2872;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6946 '<LogicAll at nodes.lkt:12866:9>' Logic_Boolean_Op ada/nodes.lkt:12866
--# expr-start 6945 '<Map at nodes.lkt:12866:9>' Map_Result ada/nodes.lkt:12866
   --# expr-start 6943 '<FieldAccess for interfaces at nodes.lkt:12866:9>' Fld ada/nodes.lkt:12866
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Parent_List (Node => Ent.Node.Single_Protected_Decl_F_Interfaces, Info => Ent.Info);
--# expr-done 6943
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind ifc Item_0
      --# expr-start 6944 '<FieldAccess for xref_equation at nodes.lkt:12866:44>' Fld_3 ada/nodes.lkt:12866
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 6944
         declare
            Item_To_Append : constant Logic_Equation := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2872;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 6945
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12866:9") else null)); 
--# expr-done 6946
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1038;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1038;
                     Finalizer_Scope_2872;
            raise;
      end;
   return Property_Result;
end Single_Protected_Decl_P_Xref_Equation;
--# end
--# property-start SingleProtectedDecl.env_names ada/nodes.lkt:12868
pragma Warnings (Off, "is not referenced");
 function Single_Protected_Decl_P_Env_Names
  (Node : Bare_Single_Protected_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1039 with Inline_Always;
            procedure Finalizer_Scope_2873 with Inline_Always;
      Var_Expr_0 : String_Type;
Fld : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1039 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1039;
            procedure Finalizer_Scope_2873 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2873;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6947 '<FieldAccess for top_level_env_name at nodes.lkt:12869:9>' Fld ada/nodes.lkt:12869
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 6947
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_String then
   --# scope-start
   --# bind fqn Var_Expr_0
--# expr-start 6949 '<ArrayLiteral at nodes.lkt:12869:47>' Array_Lit ada/nodes.lkt:12869
--# expr-start 6948 '<to_symbol at nodes.lkt:12869:48>' Sym ada/nodes.lkt:12869
Sym := String_To_Symbol (Self, Self.Unit.Context, Var_Expr_0); 
--# expr-done 6948
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 6949
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2873;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1039;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1039;
                     Finalizer_Scope_2873;
            raise;
      end;
   return Property_Result;
end Single_Protected_Decl_P_Env_Names;
--# end
--# property-start SingleProtectedDecl.declarative_parts ada/nodes.lkt:12871
pragma Warnings (Off, "is not referenced");
 function Single_Protected_Decl_P_Declarative_Parts
  (Node : Bare_Single_Protected_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Declarative_Part_Array_Access
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
     Ent : Internal_Entity_Single_Protected_Decl :=
       Internal_Entity_Single_Protected_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_1040 with Inline_Always;
            procedure Finalizer_Scope_2874 with Inline_Always;
      Local_Pdef : Internal_Entity_Protected_Def;
Var_Expr_0 : Internal_Entity_Declarative_Part;
Fld : Internal_Entity_Protected_Def;
Fld_1 : Internal_Entity_Public_Part;
Cast_Result : Internal_Entity_Declarative_Part;
Array_Lit : Internal_Entity_Declarative_Part_Array_Access;
Fld_2 : Internal_Entity_Private_Part;
Cast_Result_1 : Internal_Entity_Declarative_Part;
Array_Lit_1 : Internal_Entity_Declarative_Part_Array_Access;
Scope_Result : Internal_Entity_Declarative_Part_Array_Access;
Result_Var : Internal_Entity_Declarative_Part_Array_Access;
Concat_Result : Internal_Entity_Declarative_Part_Array_Access;
Let_Result : Internal_Entity_Declarative_Part_Array_Access;
            procedure Finalizer_Scope_1040 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1040;
            procedure Finalizer_Scope_2874 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_2874;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6957 '<Let at nodes.lkt:12872:9>' Let_Result ada/nodes.lkt:12872
--# scope-start
--# expr-start 6950 '<FieldAccess for definition at nodes.lkt:12872:20>' Fld ada/nodes.lkt:12872
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Protected_Def (Node => Ent.Node.Single_Protected_Decl_F_Definition, Info => Ent.Info);
--# expr-done 6950
Local_Pdef := Fld; 
--# bind pdef Local_Pdef
--# expr-start 6953 '<ArrayLiteral at nodes.lkt:12874:9>' Array_Lit ada/nodes.lkt:12874
--# expr-start 6952 '<Cast to DeclarativePart at nodes.lkt:12874:10>' Cast_Result ada/nodes.lkt:12874
--# expr-start 6951 '<FieldAccess for public_part at nodes.lkt:12874:10>' Fld_1 ada/nodes.lkt:12874
      if Local_Pdef.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Public_Part (Node => Local_Pdef.Node.Protected_Def_F_Public_Part, Info => Local_Pdef.Info);
--# expr-done 6951
      Cast_Result := Create_Internal_Entity_Declarative_Part
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
--# expr-done 6952
Array_Lit := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Cast_Result)); 
--# expr-done 6953
--# expr-start 6955 '<Cast to DeclarativePart at nodes.lkt:12875:11>' Cast_Result_1 ada/nodes.lkt:12875
--# expr-start 6954 '<FieldAccess for private_part at nodes.lkt:12875:11>' Fld_2 ada/nodes.lkt:12875
      if Local_Pdef.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Private_Part (Node => Local_Pdef.Node.Protected_Def_F_Private_Part, Info => Local_Pdef.Info);
--# expr-done 6954
      Cast_Result_1 := Create_Internal_Entity_Declarative_Part
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
--# expr-done 6955
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Entity_Declarative_Part then
   --# scope-start
   --# bind v1 Var_Expr_0
--# expr-start 6956 '<ArrayLiteral at nodes.lkt:12875:60>' Array_Lit_1 ada/nodes.lkt:12875
Array_Lit_1 := Create_Internal_Entity_Declarative_Part_Array (Internal_Internal_Entity_Declarative_Part_Array'(1 => Var_Expr_0)); 
--# expr-done 6956
Scope_Result := Array_Lit_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2874;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Declarative_Part_Array_Type;
end if;
      Inc_Ref (Result_Var);
Concat_Result := Concat (Array_Lit, Result_Var); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 6957
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1040;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1040;
                     Finalizer_Scope_2874;
            raise;
      end;
   return Property_Result;
end Single_Protected_Decl_P_Declarative_Parts;
--# end
--# property-start SingleProtectedDecl._env_mappings_206 ada/nodes.lkt:12879
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_206
  (Node : Bare_Single_Protected_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
     Ent : Internal_Entity_Single_Protected_Decl :=
       Internal_Entity_Single_Protected_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1870 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Single_Protected_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1870 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1870;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6960 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6958 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6958
--# expr-start 6959 '<FieldAccess for name_symbol at nodes.lkt:12879:23>' Fld ada/nodes.lkt:12879
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 6959
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6960
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1870;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1870;
            raise;
      end;
   return Property_Result;
end Env_Mappings_206;
--# end
--# property-start SingleProtectedDecl._env_trans_parent_207 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_207
  (Node : Bare_Single_Protected_Decl
  )
   return Boolean
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_207;
--# end
--# property-start SingleProtectedDecl._env_names_208 ada/nodes.lkt:12880
pragma Warnings (Off, "is not referenced");
 function Env_Names_208
  (Node : Bare_Single_Protected_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Single_Protected_Decl  := Bare_Single_Protected_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1872 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1872 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1872;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6961 '<FieldAccess for env_names at nodes.lkt:12880:23>' Fld ada/nodes.lkt:12880
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleProtectedDecl.env_names
Fld := Libadalang.Implementation.Single_Protected_Decl_P_Env_Names (Node => Self);
--# end
--# expr-done 6961
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1872;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1872;
            raise;
      end;
   return Property_Result;
end Env_Names_208;
--# end
   --
   --  Primitives for Bare_Single_Task_Decl
   --
      procedure Single_Task_Decl_Pre_Env_Actions
        (Self            : Bare_Single_Task_Decl;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_209 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:12907:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_210 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_211 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Single_Task_Decl
        (Self : Bare_Single_Task_Decl
         ; Single_Task_Decl_F_Task_Type : Bare_Single_Task_Type_Decl
        ) is
      begin
            Self.Single_Task_Decl_F_Task_Type := Single_Task_Decl_F_Task_Type;
      end Initialize_Fields_For_Single_Task_Decl;
   function Single_Task_Decl_F_Task_Type
     (Node : Bare_Single_Task_Decl) return Bare_Single_Task_Type_Decl
   is
   begin
         return Node.Single_Task_Decl_F_Task_Type;
   end;
--# property-start SingleTaskDecl.defining_names ada/nodes.lkt:12892
pragma Warnings (Off, "is not referenced");
 function Single_Task_Decl_P_Defining_Names
  (Node : Bare_Single_Task_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Single_Task_Decl  := Bare_Single_Task_Decl (Node);
     Ent : Internal_Entity_Single_Task_Decl :=
       Internal_Entity_Single_Task_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1041 with Inline_Always;
      Fld : Internal_Entity_Single_Task_Type_Decl;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1041 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1041;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6963 '<FieldAccess for defining_names at nodes.lkt:12893:9>' Fld_1 ada/nodes.lkt:12893
--# expr-start 6962 '<FieldAccess for task_type at nodes.lkt:12893:9>' Fld ada/nodes.lkt:12893
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Single_Task_Type_Decl (Node => Ent.Node.Single_Task_Decl_F_Task_Type, Info => Ent.Info);
--# expr-done 6962
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 6963
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1041;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1041;
            raise;
      end;
   return Property_Result;
end Single_Task_Decl_P_Defining_Names;
--# end
--# property-start SingleTaskDecl.expr_type ada/nodes.lkt:12896
pragma Warnings (Off, "is not referenced");
 function Single_Task_Decl_P_Expr_Type
  (Node : Bare_Single_Task_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Single_Task_Decl  := Bare_Single_Task_Decl (Node);
     Ent : Internal_Entity_Single_Task_Decl :=
       Internal_Entity_Single_Task_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Single_Task_Type_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 6964 '<FieldAccess for task_type at nodes.lkt:12896:45>' Fld ada/nodes.lkt:12896
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Single_Task_Type_Decl (Node => Ent.Node.Single_Task_Decl_F_Task_Type, Info => Ent.Info);
--# expr-done 6964
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Single_Task_Decl_P_Expr_Type;
--# end
--# property-start SingleTaskDecl.defining_env ada/nodes.lkt:12901
pragma Warnings (Off, "is not referenced");
 function Single_Task_Decl_P_Defining_Env
  (Node : Bare_Single_Task_Decl
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
         := False
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Single_Task_Decl  := Bare_Single_Task_Decl (Node);
     Ent : Internal_Entity_Single_Task_Decl :=
       Internal_Entity_Single_Task_Decl'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1043 with Inline_Always;
      Fld : Internal_Entity_Single_Task_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1043 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1043;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6966 '<FieldAccess for defining_env at nodes.lkt:12901:38>' Fld_1 ada/nodes.lkt:12901
--# expr-start 6965 '<FieldAccess for task_type at nodes.lkt:12901:38>' Fld ada/nodes.lkt:12901
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Single_Task_Type_Decl (Node => Ent.Node.Single_Task_Decl_F_Task_Type, Info => Ent.Info);
--# expr-done 6965
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 6966
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1043;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1043;
            raise;
      end;
   return Property_Result;
end Single_Task_Decl_P_Defining_Env;
--# end
--# property-start SingleTaskDecl.env_names ada/nodes.lkt:12903
pragma Warnings (Off, "is not referenced");
 function Single_Task_Decl_P_Env_Names
  (Node : Bare_Single_Task_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Single_Task_Decl  := Bare_Single_Task_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1044 with Inline_Always;
            procedure Finalizer_Scope_2875 with Inline_Always;
      Var_Expr_0 : String_Type;
Fld : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1044 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1044;
            procedure Finalizer_Scope_2875 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2875;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 6967 '<FieldAccess for top_level_env_name at nodes.lkt:12904:9>' Fld ada/nodes.lkt:12904
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Self);
--# end
--# expr-done 6967
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= Empty_String then
   --# scope-start
   --# bind fqn Var_Expr_0
--# expr-start 6969 '<ArrayLiteral at nodes.lkt:12904:47>' Array_Lit ada/nodes.lkt:12904
--# expr-start 6968 '<to_symbol at nodes.lkt:12904:48>' Sym ada/nodes.lkt:12904
Sym := String_To_Symbol (Self, Self.Unit.Context, Var_Expr_0); 
--# expr-done 6968
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 6969
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2875;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1044;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1044;
                     Finalizer_Scope_2875;
            raise;
      end;
   return Property_Result;
end Single_Task_Decl_P_Env_Names;
--# end
--# property-start SingleTaskDecl._env_mappings_209 ada/nodes.lkt:12907
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_209
  (Node : Bare_Single_Task_Decl
  )
   return Internal_Env_Assoc
is
   Self : Bare_Single_Task_Decl  := Bare_Single_Task_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1873 with Inline_Always;
      Fld : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Single_Task_Decl;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1873 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1873;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6972 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 6970 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 6970
--# expr-start 6971 '<FieldAccess for name_symbol at nodes.lkt:12907:23>' Fld ada/nodes.lkt:12907
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Self);
--# end
--# expr-done 6971
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 6972
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1873;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1873;
            raise;
      end;
   return Property_Result;
end Env_Mappings_209;
--# end
--# property-start SingleTaskDecl._env_trans_parent_210 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_210
  (Node : Bare_Single_Task_Decl
  )
   return Boolean
is
   Self : Bare_Single_Task_Decl  := Bare_Single_Task_Decl (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_210;
--# end
--# property-start SingleTaskDecl._env_names_211 ada/nodes.lkt:12908
pragma Warnings (Off, "is not referenced");
 function Env_Names_211
  (Node : Bare_Single_Task_Decl
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Single_Task_Decl  := Bare_Single_Task_Decl (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1875 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1875 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1875;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6973 '<FieldAccess for env_names at nodes.lkt:12908:23>' Fld ada/nodes.lkt:12908
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTaskDecl.env_names
Fld := Libadalang.Implementation.Single_Task_Decl_P_Env_Names (Node => Self);
--# end
--# expr-done 6973
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1875;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1875;
            raise;
      end;
   return Property_Result;
end Env_Names_211;
--# end
   --
   --  Primitives for Bare_Synthetic_Object_Decl
   --
      procedure Initialize_Fields_For_Synthetic_Object_Decl
        (Self : Bare_Synthetic_Object_Decl
        ) is
      begin
      Self.Synthetic_Object_Decl_Name := No_Bare_Ada_Node;
      Self.Synthetic_Object_Decl_Type_Expr := No_Bare_Ada_Node;
      end Initialize_Fields_For_Synthetic_Object_Decl;
--# property-start SyntheticObjectDecl.type_expression ada/nodes.lkt:12933
pragma Warnings (Off, "is not referenced");
 function Synthetic_Object_Decl_P_Type_Expression
  (Node : Bare_Synthetic_Object_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Expr
is
   Self : Bare_Synthetic_Object_Decl  := Bare_Synthetic_Object_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Type_Expr;
      Fld : Bare_Type_Expr;
As_Entity : Internal_Entity_Type_Expr;
Is_Null : Boolean;
If_Result : Internal_Entity_Type_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6975 '<as_entity at nodes.lkt:12933:47>' If_Result ada/nodes.lkt:12933
--# expr-start 6974 '<FieldAccess for type_expr at nodes.lkt:12933:47>' Fld ada/nodes.lkt:12933
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Synthetic_Object_Decl_Type_Expr;
--# expr-done 6974
Is_Null := Fld = null; 
if Is_Null then
   If_Result := No_Entity_Type_Expr;
else
As_Entity := (Info => E_Info, Node => Fld); 
   If_Result := As_Entity;
end if;
--# expr-done 6975
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Object_Decl_P_Type_Expression;
--# end
--# property-start SyntheticObjectDecl.defining_names ada/nodes.lkt:12935
pragma Warnings (Off, "is not referenced");
 function Synthetic_Object_Decl_P_Defining_Names
  (Node : Bare_Synthetic_Object_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Synthetic_Object_Decl  := Bare_Synthetic_Object_Decl (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1046 with Inline_Always;
      Fld : Bare_Defining_Name;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1046 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1046;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 6978 '<ArrayLiteral at nodes.lkt:12935:57>' Array_Lit ada/nodes.lkt:12935
--# expr-start 6977 '<as_entity at nodes.lkt:12935:58>' If_Result ada/nodes.lkt:12935
--# expr-start 6976 '<FieldAccess for name at nodes.lkt:12935:58>' Fld ada/nodes.lkt:12935
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Synthetic_Object_Decl_Name;
--# expr-done 6976
Is_Null := Fld = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
As_Entity := (Info => E_Info, Node => Fld); 
   If_Result := As_Entity;
end if;
--# expr-done 6977
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => If_Result)); 
--# expr-done 6978
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1046;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1046;
            raise;
      end;
   return Property_Result;
end Synthetic_Object_Decl_P_Defining_Names;
--# end
--# property-start SyntheticObjectDecl.is_referred_by ada/nodes.lkt:12952
pragma Warnings (Off, "is not referenced");
 function Synthetic_Object_Decl_P_Is_Referred_By
  (Node : Bare_Synthetic_Object_Decl
      ; Origin : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Synthetic_Object_Decl  := Bare_Synthetic_Object_Decl (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_1047 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Is_Null : Boolean;
Fld : Bare_Type_Expr;
Cast_Result : Bare_Synthetic_Type_Expr;
Fld_1 : Bare_Base_Type_Decl;
Fld_2 : Lexical_Env := Empty_Env;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Boolean;
If_Result : Boolean;
            procedure Finalizer_Scope_1047 is
            begin
                     Dec_Ref (Node_Parents);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_1047;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 6989 '<BooleanBinaryOp And at nodes.lkt:12953:9>' If_Result ada/nodes.lkt:12953
--# expr-start 6982 '<IsNull at nodes.lkt:12953:9>' Is_Null ada/nodes.lkt:12953
--# expr-start 6981 '<Find at nodes.lkt:12953:9>' Find_Result ada/nodes.lkt:12953
   --# expr-start 6979 '<FieldAccess for parents at nodes.lkt:12953:9>' Node_Parents ada/nodes.lkt:12953
      if Origin = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Origin, True); 
--# expr-done 6979
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 6980 '<IsA AccessDef at nodes.lkt:12953:38>' Is_A ada/nodes.lkt:12953
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Access_Def; 
--# expr-done 6980
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 6981
Is_Null := Find_Result = null; 
--# expr-done 6982
if Is_Null then
   --# expr-start 6988 '<FieldAccess for is_children_env at nodes.lkt:12954:13>' Fld_4 ada/nodes.lkt:12954
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 6986 '<FieldAccess for children_env at nodes.lkt:12955:13>' Fld_2 ada/nodes.lkt:12955
--# expr-start 6985 '<FieldAccess for target_type at nodes.lkt:12955:13>' Fld_1 ada/nodes.lkt:12955
--# expr-start 6984 '<Cast to SyntheticTypeExpr at nodes.lkt:12955:13>' Cast_Result ada/nodes.lkt:12955
--# expr-start 6983 '<FieldAccess for type_expr at nodes.lkt:12955:13>' Fld ada/nodes.lkt:12955
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Synthetic_Object_Decl_Type_Expr;
--# expr-done 6983
   if Fld = null
      or else Fld.Kind in Ada_Synthetic_Type_Expr_Range
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 6984
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Cast_Result.Synthetic_Type_Expr_F_Target_Type;
--# expr-done 6985
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Fld_1);
--# expr-done 6986
--# expr-start 6987 '<FieldAccess for children_env at nodes.lkt:12956:13>' Fld_3 ada/nodes.lkt:12956
      if Origin = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Origin);
--# expr-done 6987
--# property-call-start AdaNode.is_children_env
Fld_4 := Libadalang.Implementation.Ada_Node_P_Is_Children_Env (Node => Self, Parent => Fld_2, Current_Env => Fld_3);
--# end
--# expr-done 6988
   If_Result := Fld_4;
else
   If_Result := False;
end if;
--# expr-done 6989
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_1047;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1047;
            raise;
      end;
   return Property_Result;
end Synthetic_Object_Decl_P_Is_Referred_By;
--# end
   --
   --  Primitives for Bare_Case_Stmt_Alternative
   --
      procedure Initialize_Fields_For_Case_Stmt_Alternative
        (Self : Bare_Case_Stmt_Alternative
         ; Case_Stmt_Alternative_F_Choices : Bare_Alternatives_List
         ; Case_Stmt_Alternative_F_Stmts : Bare_Stmt_List
        ) is
      begin
            Self.Case_Stmt_Alternative_F_Choices := Case_Stmt_Alternative_F_Choices;
            Self.Case_Stmt_Alternative_F_Stmts := Case_Stmt_Alternative_F_Stmts;
      end Initialize_Fields_For_Case_Stmt_Alternative;
   function Case_Stmt_Alternative_F_Choices
     (Node : Bare_Case_Stmt_Alternative) return Bare_Alternatives_List
   is
   begin
         return Node.Case_Stmt_Alternative_F_Choices;
   end;
   function Case_Stmt_Alternative_F_Stmts
     (Node : Bare_Case_Stmt_Alternative) return Bare_Stmt_List
   is
   begin
         return Node.Case_Stmt_Alternative_F_Stmts;
   end;
--# property-start CaseStmtAlternative.xref_entry_point ada/nodes.lkt:12967
pragma Warnings (Off, "is not referenced");
 function Case_Stmt_Alternative_P_Xref_Entry_Point
  (Node : Bare_Case_Stmt_Alternative
  )
   return Boolean
is
   Self : Bare_Case_Stmt_Alternative  := Bare_Case_Stmt_Alternative (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Case_Stmt_Alternative_P_Xref_Entry_Point;
--# end
--# property-start CaseStmtAlternative.xref_equation ada/nodes.lkt:12970
pragma Warnings (Off, "is not referenced");
 function Case_Stmt_Alternative_P_Xref_Equation
  (Node : Bare_Case_Stmt_Alternative
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Case_Stmt_Alternative  := Bare_Case_Stmt_Alternative (Node);
     Ent : Internal_Entity_Case_Stmt_Alternative :=
       Internal_Entity_Case_Stmt_Alternative'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1049 with Inline_Always;
            procedure Finalizer_Scope_2877 with Inline_Always;
            procedure Finalizer_Scope_2878 with Inline_Always;
            procedure Finalizer_Scope_2879 with Inline_Always;
            procedure Finalizer_Scope_2880 with Inline_Always;
      Local_Case_Stmt : Internal_Entity_Case_Stmt;
Local_Selected_Type : Internal_Entity_Base_Type_Decl;
Match_0 : Internal_Entity_Expr;
Match_1 : Internal_Entity_Subtype_Indication;
Match_2 : Internal_Entity_Others_Designator;
Match_3 : Internal_Entity;
Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Case_Stmt;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Alternatives_List;
Fld_5 : Bare_Alternatives_List;
Fld_6 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_7 : Logic_Equation;
Fld_8 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_9 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_10 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_A : Boolean;
Cast_Expr_2 : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Name;
Fld_11 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
If_Result_1 : Logic_Equation;
Fld_12 : Logic_Equation;
True_Rel : Logic_Equation;
Match_Prefix : Internal_Entity;
Cast_Result_4 : Internal_Entity_Expr;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_5 : Internal_Entity_Subtype_Indication;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_6 : Internal_Entity_Others_Designator;
Let_Result_2 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Cast_Result_7 : Internal_Entity;
Let_Result_3 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
Match_Result : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Let_Result_4 : Logic_Equation;
Let_Result_5 : Logic_Equation;
            procedure Finalizer_Scope_1049 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
            end Finalizer_Scope_1049;
            procedure Finalizer_Scope_2877 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_2877;
            procedure Finalizer_Scope_2878 is
            begin
                     Dec_Ref (Fld_7);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_10);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_2878;
            procedure Finalizer_Scope_2879 is
            begin
                     Dec_Ref (Fld_12);
            end Finalizer_Scope_2879;
            procedure Finalizer_Scope_2880 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_2880;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7016 '<Let at nodes.lkt:12971:9>' Let_Result_5 ada/nodes.lkt:12971
--# scope-start
--# expr-start 6992 '<Cast to CaseStmt at nodes.lkt:12971:25>' Cast_Result ada/nodes.lkt:12971
--# expr-start 6991 '<parent at nodes.lkt:12971:25>' Fld_1 ada/nodes.lkt:12971
--# expr-start 6990 '<parent at nodes.lkt:12971:25>' Fld ada/nodes.lkt:12971
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 6990
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 6991
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Case_Stmt_Range
   then
      Cast_Result := Create_Internal_Entity_Case_Stmt
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 6992
Local_Case_Stmt := Cast_Result; 
--# bind case_stmt Local_Case_Stmt
--# expr-start 7015 '<Let at nodes.lkt:12973:9>' Let_Result_4 ada/nodes.lkt:12973
--# scope-start
--# expr-start 6994 '<FieldAccess for expression_type at nodes.lkt:12973:29>' Fld_3 ada/nodes.lkt:12973
--# expr-start 6993 '<FieldAccess for expr at nodes.lkt:12973:29>' Fld_2 ada/nodes.lkt:12973
      if Local_Case_Stmt.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Local_Case_Stmt.Node.Case_Stmt_F_Expr, Info => Local_Case_Stmt.Info);
--# expr-done 6993
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_3 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 6994
Local_Selected_Type := Fld_3; 
--# bind selected_type Local_Selected_Type
--# expr-start 7014 '<LogicAll at nodes.lkt:12975:9>' Logic_Boolean_Op ada/nodes.lkt:12975
--# expr-start 7013 '<Map at nodes.lkt:12975:9>' Map_Result ada/nodes.lkt:12975
   --# expr-start 6995 '<FieldAccess for choices at nodes.lkt:12975:9>' Fld_4 ada/nodes.lkt:12975
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Alternatives_List (Node => Ent.Node.Case_Stmt_Alternative_F_Choices, Info => Ent.Info);
--# expr-done 6995
Fld_5 := Fld_4.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_5 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld_5;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity;
else
Fld_6 := Fld_4.Info;
As_Entity := (Info => Fld_6, Node => Bare_Item_0); 
   If_Result_2 := As_Entity;
end if;
                  Item_0 := If_Result_2; 
   --# scope-start
               --# bind c Item_0
      --# expr-start 7012 '<Match at nodes.lkt:12977:13>' Match_Result ada/nodes.lkt:12977
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Abstract_State_Decl_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_4; 
--# bind e Match_0
--# expr-start 7010 '<If at nodes.lkt:12980:21>' If_Result_1 ada/nodes.lkt:12980
--# expr-start 7001 '<BooleanBinaryOp And at nodes.lkt:12981:25>' If_Result ada/nodes.lkt:12981
--# expr-start 6996 '<IsA Name at nodes.lkt:12981:25>' Is_A ada/nodes.lkt:12981
Is_A := Match_0.Node /= null 
and then Match_0.Node.Kind in Ada_Name; 
--# expr-done 6996
if Is_A then
   --# expr-start 7000 '<Not at nodes.lkt:12982:29>' Not_Val ada/nodes.lkt:12982
--# expr-start 6999 '<IsNull at nodes.lkt:12982:33>' Is_Null ada/nodes.lkt:12982
--# expr-start 6998 '<FieldAccess for name_designated_type at nodes.lkt:12982:33>' Fld_11 ada/nodes.lkt:12982
--# expr-start 6997 '<Cast to Name at nodes.lkt:12982:33>' Cast_Result_3 ada/nodes.lkt:12982
Cast_Expr_2 := Match_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Name
   then
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_3 := No_Entity_Name;
   end if;
--# expr-done 6997
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_11 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Cast_Result_3.Node, E_Info => Cast_Result_3.Info);
--# end
--# expr-done 6998
Is_Null := Fld_11.Node = null; 
--# expr-done 6999
Not_Val := not (Is_Null); 
--# expr-done 7000
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 7001
if If_Result then
   --# expr-start 7003 '<FieldAccess for xref_type_equation at nodes.lkt:12983:26>' Fld_7 ada/nodes.lkt:12983
--# expr-start 7002 '<Cast to Name at nodes.lkt:12983:26>' Cast_Result_1 ada/nodes.lkt:12983
Cast_Expr := Match_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Name;
   end if;
--# expr-done 7002
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_7 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Cast_Result_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 7003
   If_Result_1 := Fld_7;
else
   --# expr-start 7009 '<LogicBinaryOp And at nodes.lkt:12985:25>' And_Pred_1 ada/nodes.lkt:12985
--# expr-start 7007 '<LogicBinaryOp And at nodes.lkt:12986:29>' And_Pred ada/nodes.lkt:12986
--# expr-start 7005 '<Bind at nodes.lkt:12986:29>' Bind_Result ada/nodes.lkt:12986
--# expr-start 7004 '<FieldAccess for expected_type_var at nodes.lkt:12986:29>' Fld_8 ada/nodes.lkt:12986
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Match_0.Node);
--# expr-done 7004
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
Cast_Expr_1 := Local_Selected_Type; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result := Solver.Create_Assign (Fld_8, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12986:29") else null)); 
--# expr-done 7005
--# expr-start 7006 '<FieldAccess for sub_equation at nodes.lkt:12987:34>' Fld_9 ada/nodes.lkt:12987
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_9 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_0.Info);
--# end
--# expr-done 7006
And_Pred := Create_And (Bind_Result, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12986:29") else null)); 
--# expr-done 7007
--# expr-start 7008 '<FieldAccess for matches_expected_type at nodes.lkt:12989:30>' Fld_10 ada/nodes.lkt:12989
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_10 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Match_0.Node, Origin => Origin);
--# end
--# expr-done 7008
And_Pred_1 := Create_And (And_Pred, Fld_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12985:25") else null)); 
--# expr-done 7009
   If_Result_1 := And_Pred_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 7010
Let_Result := If_Result_1; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2878;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_5; 
--# bind t Match_1
--# expr-start 7011 '<FieldAccess for xref_equation at nodes.lkt:12992:46>' Fld_12 ada/nodes.lkt:12992
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_12 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Match_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_1.Info);
--# end
--# expr-done 7011
Let_Result_1 := Fld_12; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2879;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Others_Designator =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Others_Designator
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_6; 
--# bind _ Match_2
True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12993:45") else null)); 
Let_Result_2 := True_Rel; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2880;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Elsif_Stmt_Part | Ada_For_Loop_Iter_Filter .. Ada_Null_Component_Decl | Ada_Overriding_Not_Overriding .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_7; 
--# bind _ Match_3
Let_Result_3 := raise Property_Error with "Should not happen"; Inc_Ref (Let_Result_3);
--# end
Scope_Result_3 := Let_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
end case;
--# expr-done 7012
         declare
            Item_To_Append : constant Logic_Equation := Match_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2877;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7013
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:12975:9") else null)); 
--# expr-done 7014
Let_Result_4 := Logic_Boolean_Op; Inc_Ref (Let_Result_4);
--# end
--# expr-done 7015
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 7016
         Property_Result := Let_Result_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1049;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1049;
                     Finalizer_Scope_2877;
                     Finalizer_Scope_2878;
                     Finalizer_Scope_2879;
                     Finalizer_Scope_2880;
            raise;
      end;
   return Property_Result;
end Case_Stmt_Alternative_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Compilation_Unit
   --
      procedure Initialize_Fields_For_Compilation_Unit
        (Self : Bare_Compilation_Unit
         ; Compilation_Unit_F_Prelude : Bare_Ada_Node_List
         ; Compilation_Unit_F_Body : Bare_Ada_Node
         ; Compilation_Unit_F_Pragmas : Bare_Pragma_Node_List
        ) is
      begin
            Self.Compilation_Unit_F_Prelude := Compilation_Unit_F_Prelude;
            Self.Compilation_Unit_F_Body := Compilation_Unit_F_Body;
            Self.Compilation_Unit_F_Pragmas := Compilation_Unit_F_Pragmas;
      Self.Compilation_Unit_No_Env := Empty_Env;
      end Initialize_Fields_For_Compilation_Unit;
   function Compilation_Unit_F_Prelude
     (Node : Bare_Compilation_Unit) return Bare_Ada_Node_List
   is
   begin
         return Node.Compilation_Unit_F_Prelude;
   end;
   function Compilation_Unit_F_Body
     (Node : Bare_Compilation_Unit) return Bare_Ada_Node
   is
   begin
         return Node.Compilation_Unit_F_Body;
   end;
   function Compilation_Unit_F_Pragmas
     (Node : Bare_Compilation_Unit) return Bare_Pragma_Node_List
   is
   begin
         return Node.Compilation_Unit_F_Pragmas;
   end;
--# property-start CompilationUnit.syntactic_fully_qualified_name ada/nodes.lkt:13022
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Syntactic_Fully_Qualified_Name
  (Node : Bare_Compilation_Unit
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1051 with Inline_Always;
            procedure Finalizer_Scope_2882 with Inline_Always;
            procedure Finalizer_Scope_2883 with Inline_Always;
            procedure Finalizer_Scope_2884 with Inline_Always;
      Match_0 : Internal_Entity_Library_Item;
Match_1 : Internal_Entity_Subunit;
Match_2 : Internal_Entity;
Var_Expr_187 : Internal_Entity_Defining_Name;
As_Entity : Internal_Entity_Compilation_Unit;
Is_Null : Boolean;
If_Result : Internal_Entity_Compilation_Unit;
Fld : Internal_Entity;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Defining_Name;
Fld_3 : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
Fld_4 : Internal_Entity_Name;
Fld_5 : Symbol_Type_Array_Access;
Fld_6 : Internal_Entity_Body_Node;
Fld_7 : Internal_Entity_Defining_Name;
Fld_8 : Symbol_Type_Array_Access;
Concat_Result : Symbol_Type_Array_Access;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Library_Item;
Let_Result : Symbol_Type_Array_Access;
Scope_Result_1 : Symbol_Type_Array_Access;
Cast_Result_1 : Internal_Entity_Subunit;
Let_Result_1 : Symbol_Type_Array_Access;
Scope_Result_2 : Symbol_Type_Array_Access;
Cast_Result_2 : Internal_Entity;
Let_Result_2 : Symbol_Type_Array_Access;
Scope_Result_3 : Symbol_Type_Array_Access;
Match_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1051 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_1051;
            procedure Finalizer_Scope_2882 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2882;
            procedure Finalizer_Scope_2883 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2883;
            procedure Finalizer_Scope_2884 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_2884;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7027 '<Match at nodes.lkt:13022:59>' Match_Result ada/nodes.lkt:13022
--# expr-start 7018 '<FieldAccess for body at nodes.lkt:13023:9>' Fld ada/nodes.lkt:13023
--# expr-start 7017 '<as_bare_entity at nodes.lkt:13023:9>' If_Result ada/nodes.lkt:13023
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Compilation_Unit;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 7017
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => If_Result.Node.Compilation_Unit_F_Body, Info => If_Result.Info);
--# expr-done 7018
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Library_Item =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Library_Item
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind li Match_0
--# expr-start 7020 '<FieldAccess for defining_name at nodes.lkt:13025:33>' Fld_2 ada/nodes.lkt:13025
--# expr-start 7019 '<FieldAccess for item at nodes.lkt:13025:33>' Fld_1 ada/nodes.lkt:13025
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Basic_Decl (Node => Match_0.Node.Library_Item_F_Item, Info => Match_0.Info);
--# expr-done 7019
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 7020
Var_Expr_187 := Fld_2;
if Var_Expr_187 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 7021 '<FieldAccess for as_symbol_array at nodes.lkt:13025:33>' Fld_3 ada/nodes.lkt:13025
      if Var_Expr_187.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Var_Expr_187.Node);
--# end
--# expr-done 7021
Scope_Result := Fld_3;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2883;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
Let_Result := Result_Var; Inc_Ref (Let_Result);
--# end
Scope_Result_1 := Let_Result;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2882;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Subunit =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Subunit
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind su Match_1
--# expr-start 7023 '<FieldAccess for as_symbol_array at nodes.lkt:13027:13>' Fld_5 ada/nodes.lkt:13027
--# expr-start 7022 '<FieldAccess for name at nodes.lkt:13027:13>' Fld_4 ada/nodes.lkt:13027
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Match_1.Node.Subunit_F_Name, Info => Match_1.Info);
--# expr-done 7022
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_5 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Fld_4.Node);
--# end
--# expr-done 7023
--# expr-start 7026 '<FieldAccess for as_symbol_array at nodes.lkt:13028:15>' Fld_8 ada/nodes.lkt:13028
--# expr-start 7025 '<FieldAccess for defining_name at nodes.lkt:13028:15>' Fld_7 ada/nodes.lkt:13028
--# expr-start 7024 '<FieldAccess for body at nodes.lkt:13028:15>' Fld_6 ada/nodes.lkt:13028
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Body_Node (Node => Match_1.Node.Subunit_F_Body, Info => Match_1.Info);
--# expr-done 7024
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 7025
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_8 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Fld_7.Node);
--# end
--# expr-done 7026
Concat_Result := Concat (Fld_5, Fld_8); 
Let_Result_1 := Concat_Result; Inc_Ref (Let_Result_1);
--# end
Scope_Result_2 := Let_Result_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2884;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Iter_Type_Of | Ada_Limited_Absent .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := raise Property_Error with "Unexpected CompilationUnit.f_body attribute"; Inc_Ref (Let_Result_2);
--# end
Scope_Result_3 := Let_Result_2;
   Inc_Ref (Scope_Result_3);
   --# end
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
end case;
--# expr-done 7027
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1051;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1051;
                     Finalizer_Scope_2882;
                     Finalizer_Scope_2883;
                     Finalizer_Scope_2884;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Syntactic_Fully_Qualified_Name;
--# end
--# property-start CompilationUnit.unit_kind ada/nodes.lkt:13037
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Unit_Kind
  (Node : Bare_Compilation_Unit
  )
   return Analysis_Unit_Kind
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Analysis_Unit_Kind;
      Match_0 : Bare_Library_Item;
Match_0_1 : Bare_Body_Node;
Match_1 : Bare_Basic_Decl;
Match_1_1 : Bare_Subunit;
Match_2 : Bare_Ada_Node;
Fld : Bare_Ada_Node;
Fld_1 : Bare_Basic_Decl;
Match_Prefix : Bare_Basic_Decl;
Cast_Result : Bare_Body_Node;
Let_Result : Analysis_Unit_Kind;
Scope_Result : Analysis_Unit_Kind;
Cast_Result_1 : Bare_Basic_Decl;
Let_Result_1 : Analysis_Unit_Kind;
Scope_Result_1 : Analysis_Unit_Kind;
Match_Result : Analysis_Unit_Kind;
Match_Prefix_1 : Bare_Ada_Node;
Cast_Result_2 : Bare_Library_Item;
Let_Result_2 : Analysis_Unit_Kind;
Scope_Result_2 : Analysis_Unit_Kind;
Cast_Result_3 : Bare_Subunit;
Let_Result_3 : Analysis_Unit_Kind;
Scope_Result_3 : Analysis_Unit_Kind;
Cast_Result_4 : Bare_Ada_Node;
Let_Result_4 : Analysis_Unit_Kind;
Scope_Result_4 : Analysis_Unit_Kind;
Match_Result_1 : Analysis_Unit_Kind;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7031 '<Match at nodes.lkt:13037:41>' Match_Result_1 ada/nodes.lkt:13037
--# expr-start 7028 '<FieldAccess for body at nodes.lkt:13037:47>' Fld ada/nodes.lkt:13037
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Compilation_Unit_F_Body;
--# expr-done 7028
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Fld; 
case Ada_Ada_Node (Match_Prefix_1.Kind) is
         when Ada_Library_Item =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix_1;
Match_0 := Cast_Result_2; 
--# bind li Match_0
--# expr-start 7030 '<Match at nodes.lkt:13039:13>' Match_Result ada/nodes.lkt:13039
--# expr-start 7029 '<FieldAccess for item at nodes.lkt:13039:19>' Fld_1 ada/nodes.lkt:13039
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Match_0.Library_Item_F_Item;
--# expr-done 7029
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_1; 
case Ada_Basic_Decl (Match_Prefix.Kind) is
         when Ada_Accept_Stmt_Body .. Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0_1 := Cast_Result; 
--# bind _ Match_0_1
Let_Result := Unit_Body; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl .. Ada_Synthetic_Subp_Decl | Ada_Entry_Index_Spec .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind _ Match_1
Let_Result_1 := Unit_Specification; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 7030
Let_Result_2 := Match_Result; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result_1 := Scope_Result_2; 
         when Ada_Subunit =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix_1;
Match_1_1 := Cast_Result_3; 
--# bind _ Match_1_1
Let_Result_3 := Unit_Body; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result_1 := Scope_Result_3; 
         when Ada_Abort_Absent .. Ada_Iter_Type_Of | Ada_Limited_Absent .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix_1;
Match_2 := Cast_Result_4; 
--# bind _ Match_2
Let_Result_4 := raise Property_Error with "Unexpected CompilationUnit.f_body attribute"; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result_1 := Scope_Result_4; 
end case;
--# expr-done 7031
         Property_Result := Match_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Unit_Kind;
--# end
--# property-start CompilationUnit.referenced_units_in ada/nodes.lkt:13052
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Referenced_Units_In
  (Node : Bare_Compilation_Unit
      ; Name : Internal_Entity_Name
  )
   return Internal_Entity_Compilation_Unit_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind name Name
   Property_Result : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1053 with Inline_Always;
            procedure Finalizer_Scope_2892 with Inline_Always;
            procedure Finalizer_Scope_2893 with Inline_Always;
      Local_Self_Refd : Bare_Compilation_Unit;
Var_Expr_0 : Internal_Entity_Dotted_Name;
Var_Expr_1 : Internal_Entity_Compilation_Unit;
Var_Expr_188 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Bare_Compilation_Unit;
Scope_Result : Bare_Compilation_Unit;
Result_Var : Bare_Compilation_Unit;
Cast_Expr : Internal_Entity_Name;
Cast_Result : Internal_Entity_Dotted_Name;
Fld_2 : Internal_Entity_Name;
Fld_3 : Internal_Entity_Compilation_Unit_Array_Access;
Scope_Result_1 : Internal_Entity_Compilation_Unit_Array_Access;
Result_Var_1 : Internal_Entity_Compilation_Unit_Array_Access;
As_Entity : Internal_Entity_Compilation_Unit;
Is_Null : Boolean;
If_Result : Internal_Entity_Compilation_Unit;
Array_Lit : Internal_Entity_Compilation_Unit_Array_Access;
Scope_Result_2 : Internal_Entity_Compilation_Unit_Array_Access;
Result_Var_2 : Internal_Entity_Compilation_Unit_Array_Access;
Concat_Result : Internal_Entity_Compilation_Unit_Array_Access;
Let_Result : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1053 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1053;
            procedure Finalizer_Scope_2892 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2892;
            procedure Finalizer_Scope_2893 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2893;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7039 '<Let at nodes.lkt:13055:9>' Let_Result ada/nodes.lkt:13055
--# scope-start
--# expr-start 7032 '<FieldAccess for referenced_decl at nodes.lkt:13055:25>' Fld ada/nodes.lkt:13055
      if Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Name.Node, Imprecise_Fallback => False, E_Info => Name.Info);
--# end
--# expr-done 7032
Var_Expr_188 := Fld;
if Var_Expr_188 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 7033 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:13055:25>' Fld_1 ada/nodes.lkt:13055
      if Var_Expr_188.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld_1 := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Var_Expr_188.Node);
--# end
--# expr-done 7033
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
Local_Self_Refd := Result_Var; 
--# bind self_refd Local_Self_Refd
--# expr-start 7034 '<Cast to DottedName at nodes.lkt:13057:9>' Cast_Result ada/nodes.lkt:13057
Cast_Expr := Name; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Create_Internal_Entity_Dotted_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Dotted_Name;
   end if;
--# expr-done 7034
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Dotted_Name then
   --# scope-start
   --# bind dn Var_Expr_0
--# expr-start 7036 '<FieldAccess for referenced_units_in at nodes.lkt:13058:21>' Fld_3 ada/nodes.lkt:13058
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7035 '<FieldAccess for prefix at nodes.lkt:13058:46>' Fld_2 ada/nodes.lkt:13058
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Dotted_Name_F_Prefix, Info => Var_Expr_0.Info);
--# expr-done 7035
--# property-call-start CompilationUnit.referenced_units_in
Fld_3 := Libadalang.Implementation.Compilation_Unit_P_Referenced_Units_In (Node => Self, Name => Fld_2);
--# end
--# expr-done 7036
Scope_Result_1 := Fld_3;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2892;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Compilation_Unit_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
--# expr-start 7037 '<as_bare_entity at nodes.lkt:13061:11>' If_Result ada/nodes.lkt:13061
Is_Null := Local_Self_Refd = null; 
if Is_Null then
   If_Result := No_Entity_Compilation_Unit;
else
As_Entity := (Info => No_Entity_Info, Node => Local_Self_Refd); 
   If_Result := As_Entity;
end if;
--# expr-done 7037
Var_Expr_1 := If_Result;
if Var_Expr_1 /= No_Entity_Compilation_Unit then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 7038 '<ArrayLiteral at nodes.lkt:13061:47>' Array_Lit ada/nodes.lkt:13061
Array_Lit := Create_Internal_Entity_Compilation_Unit_Array (Internal_Internal_Entity_Compilation_Unit_Array'(1 => Var_Expr_1)); 
--# expr-done 7038
Scope_Result_2 := Array_Lit;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2893;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Internal_Entity_Compilation_Unit_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
Concat_Result := Concat (Result_Var_1, Result_Var_2); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 7039
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1053;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1053;
                     Finalizer_Scope_2892;
                     Finalizer_Scope_2893;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Referenced_Units_In;
--# end
--# property-start CompilationUnit.withed_units ada/nodes.lkt:13071
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Withed_Units
  (Node : Bare_Compilation_Unit
      ; Include_Privates : Boolean
         := True
  )
   return Internal_Entity_Compilation_Unit_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind include_privates Include_Privates
   Property_Result : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1054 with Inline_Always;
            procedure Finalizer_Scope_2894 with Inline_Always;
      Fld : Bare_Name_Array_Access;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld_1 : Internal_Entity_Compilation_Unit_Array_Access;
Map_Result : Internal_Entity_Compilation_Unit_Array_Access;
Unique_Array : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1054 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Unique_Array);
            end Finalizer_Scope_1054;
            procedure Finalizer_Scope_2894 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2894;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Compilation_Unit_Compilation_Unit_P_Withed_Units,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Compilation_Unit,
                                As_Bare_Compilation_Unit => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Include_Privates);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Compilation_Unit_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7044 '<unique at nodes.lkt:13074:9>' Unique_Array ada/nodes.lkt:13074
--# expr-start 7043 '<Mapcat at nodes.lkt:13074:9>' Map_Result ada/nodes.lkt:13074
   --# expr-start 7040 '<FieldAccess for top_level_with_package_clauses at nodes.lkt:13074:9>' Fld ada/nodes.lkt:13074
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.top_level_with_package_clauses
Fld := Libadalang.Implementation.Ada_Node_P_Top_Level_With_Package_Clauses (Node => Self, Include_Privates => Include_Privates);
--# end
--# expr-done 7040
      declare
         Map_Result_Vec : Internal_Entity_Compilation_Unit_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Name_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 7042 '<FieldAccess for referenced_units_in at nodes.lkt:13078:20>' Fld_1 ada/nodes.lkt:13078
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7041 '<as_bare_entity at nodes.lkt:13078:45>' If_Result ada/nodes.lkt:13078
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
As_Entity := (Info => No_Entity_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 7041
--# property-call-start CompilationUnit.referenced_units_in
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Referenced_Units_In (Node => Self, Name => If_Result);
--# end
--# expr-done 7042
         for Item_To_Append of
               Fld_1.Items
         loop
            Internal_Entity_Compilation_Unit_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2894;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Compilation_Unit_Array
           (Items_Count => Natural (Internal_Entity_Compilation_Unit_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Compilation_Unit_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Compilation_Unit_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Compilation_Unit_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7043
Unique_Array := Make_Unique (Map_Result); 
--# expr-done 7044
         Property_Result := Unique_Array;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1054;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1054;
                     Finalizer_Scope_2894;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Compilation_Unit_Array_Access,
                        As_Internal_Entity_Compilation_Unit_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Compilation_Unit_P_Withed_Units;
--# end
--# property-start CompilationUnit.imported_units ada/nodes.lkt:13088
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Imported_Units
  (Node : Bare_Compilation_Unit
      ; Include_Privates : Boolean
         := True
  )
   return Internal_Entity_Compilation_Unit_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind include_privates Include_Privates
   Property_Result : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1055 with Inline_Always;
            procedure Finalizer_Scope_2895 with Inline_Always;
            procedure Finalizer_Scope_2896 with Inline_Always;
            procedure Finalizer_Scope_2897 with Inline_Always;
            procedure Finalizer_Scope_2898 with Inline_Always;
            procedure Finalizer_Scope_2899 with Inline_Always;
            procedure Finalizer_Scope_2900 with Inline_Always;
      Var_Expr_0 : Bare_Base_Subp_Body;
Var_Expr_1 : Internal_Entity_Basic_Decl;
Var_Expr_2 : Bare_Ada_Node;
Var_Expr : Internal_Entity_Compilation_Unit_Array_Access;
Var_Expr_189 : Bare_Basic_Decl;
Var_Expr_190 : Lexical_Env := Empty_Env;
Fld : Internal_Entity_Compilation_Unit_Array_Access;
Fld_1 : Bare_Basic_Decl;
Cast_Result : Bare_Base_Subp_Body;
As_Entity : Internal_Entity_Base_Subp_Body;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Subp_Body;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Bare_Compilation_Unit;
As_Entity_1 : Internal_Entity_Compilation_Unit;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Compilation_Unit;
Array_Lit : Internal_Entity_Compilation_Unit_Array_Access;
Scope_Result : Internal_Entity_Compilation_Unit_Array_Access;
Result_Var : Internal_Entity_Compilation_Unit_Array_Access;
Scope_Result_1 : Internal_Entity_Compilation_Unit_Array_Access;
Result_Var_1 : Internal_Entity_Compilation_Unit_Array_Access;
Scope_Result_2 : Internal_Entity_Compilation_Unit_Array_Access;
Fld_4 : Bare_Basic_Decl;
Fld_5 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Fld_6 : Bare_Compilation_Unit;
As_Entity_2 : Internal_Entity_Compilation_Unit;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Compilation_Unit;
Array_Lit_1 : Internal_Entity_Compilation_Unit_Array_Access;
Scope_Result_3 : Internal_Entity_Compilation_Unit_Array_Access;
Result_Var_2 : Internal_Entity_Compilation_Unit_Array_Access;
Scope_Result_4 : Internal_Entity_Compilation_Unit_Array_Access;
Result_Var_3 : Internal_Entity_Compilation_Unit_Array_Access;
Scope_Result_5 : Internal_Entity_Compilation_Unit_Array_Access;
Result_Var_4 : Internal_Entity_Compilation_Unit_Array_Access;
Result_Var_5 : Internal_Entity_Compilation_Unit_Array_Access;
Concat_Result : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1055 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (Result_Var_5);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_1055;
            procedure Finalizer_Scope_2895 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2895;
            procedure Finalizer_Scope_2896 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2896;
            procedure Finalizer_Scope_2897 is
            begin
                     Dec_Ref (Var_Expr);
            end Finalizer_Scope_2897;
            procedure Finalizer_Scope_2898 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var_3);
            end Finalizer_Scope_2898;
            procedure Finalizer_Scope_2899 is
            begin
                     Dec_Ref (Var_Expr_190);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_2);
            end Finalizer_Scope_2899;
            procedure Finalizer_Scope_2900 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_2900;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Compilation_Unit_Compilation_Unit_P_Imported_Units,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Compilation_Unit,
                                As_Bare_Compilation_Unit => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Include_Privates);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Compilation_Unit_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7045 '<FieldAccess for withed_units at nodes.lkt:13091:9>' Fld ada/nodes.lkt:13091
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.withed_units
Fld := Libadalang.Implementation.Compilation_Unit_P_Withed_Units (Node => Self, Include_Privates => Include_Privates);
--# end
--# expr-done 7045
--# expr-start 7047 '<Cast to BaseSubpBody at nodes.lkt:13097:13>' Cast_Result ada/nodes.lkt:13097
--# expr-start 7046 '<FieldAccess for decl at nodes.lkt:13097:13>' Fld_1 ada/nodes.lkt:13097
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Self);
--# end
--# expr-done 7046
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Base_Subp_Body
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 7047
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind subp Var_Expr_0
--# expr-start 7049 '<FieldAccess for subp_previous_part at nodes.lkt:13102:17>' Fld_2 ada/nodes.lkt:13102
--# expr-start 7048 '<as_bare_entity at nodes.lkt:13102:17>' If_Result ada/nodes.lkt:13102
Is_Null := Var_Expr_0 = null; 
if Is_Null then
   If_Result := No_Entity_Base_Subp_Body;
else
As_Entity := (Info => No_Entity_Info, Node => Var_Expr_0); 
   If_Result := As_Entity;
end if;
--# expr-done 7048
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.subp_previous_part
Fld_2 := Libadalang.Implementation.Body_Node_P_Subp_Previous_Part (Node => If_Result.Node, Imprecise_Fallback => False, E_Info => If_Result.Info);
--# end
--# expr-done 7049
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind pp Var_Expr_1
--# expr-start 7052 '<ArrayLiteral at nodes.lkt:13103:29>' Array_Lit ada/nodes.lkt:13103
--# expr-start 7051 '<as_bare_entity at nodes.lkt:13103:30>' If_Result_1 ada/nodes.lkt:13103
--# expr-start 7050 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:13103:30>' Fld_3 ada/nodes.lkt:13103
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld_3 := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Var_Expr_1.Node);
--# end
--# expr-done 7050
Is_Null_1 := Fld_3 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Compilation_Unit;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Fld_3); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 7051
Array_Lit := Create_Internal_Entity_Compilation_Unit_Array (Internal_Internal_Entity_Compilation_Unit_Array'(1 => If_Result_1)); 
--# expr-done 7052
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2896;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Compilation_Unit_Array_Type;
end if;
      Inc_Ref (Result_Var);
Scope_Result_1 := Result_Var;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2895;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Compilation_Unit_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Var_Expr := Result_Var_1;
      Inc_Ref (Var_Expr);
if Var_Expr /= No_Internal_Entity_Compilation_Unit_Array_Type then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_2 := Var_Expr;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_2897;
   Result_Var_5 := Scope_Result_2;
else
--# expr-start 7053 '<FieldAccess for decl at nodes.lkt:13106:17>' Fld_4 ada/nodes.lkt:13106
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_4 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Self);
--# end
--# expr-done 7053
Var_Expr_189 := Fld_4;
if Var_Expr_189 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 7054 '<FieldAccess for node_env at nodes.lkt:13106:17>' Fld_5 ada/nodes.lkt:13106
      if Var_Expr_189 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Node_Env (Node => Var_Expr_189);
--# expr-done 7054
Var_Expr_190 := Fld_5;
      Inc_Ref (Var_Expr_190);
if Var_Expr_190 /= Empty_Env then
   --# scope-start
--# expr-start 7055 '<env_node at nodes.lkt:13106:17>' Env_Node ada/nodes.lkt:13106
Env_Node := AST_Envs.Env_Node (Var_Expr_190); 
--# expr-done 7055
Var_Expr_2 := Env_Node;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind n Var_Expr_2
--# expr-start 7058 '<ArrayLiteral at nodes.lkt:13107:24>' Array_Lit_1 ada/nodes.lkt:13107
--# expr-start 7057 '<as_bare_entity at nodes.lkt:13107:25>' If_Result_2 ada/nodes.lkt:13107
--# expr-start 7056 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:13107:25>' Fld_6 ada/nodes.lkt:13107
      if Var_Expr_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld_6 := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Var_Expr_2);
--# end
--# expr-done 7056
Is_Null_2 := Fld_6 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Compilation_Unit;
else
As_Entity_2 := (Info => No_Entity_Info, Node => Fld_6); 
   If_Result_2 := As_Entity_2;
end if;
--# expr-done 7057
Array_Lit_1 := Create_Internal_Entity_Compilation_Unit_Array (Internal_Internal_Entity_Compilation_Unit_Array'(1 => If_Result_2)); 
--# expr-done 7058
Scope_Result_3 := Array_Lit_1;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_2900;
   Result_Var_2 := Scope_Result_3;
else
   Result_Var_2 := No_Internal_Entity_Compilation_Unit_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
Scope_Result_4 := Result_Var_2;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_2899;
   Result_Var_3 := Scope_Result_4;
else
   Result_Var_3 := No_Internal_Entity_Compilation_Unit_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
Scope_Result_5 := Result_Var_3;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_2898;
   Result_Var_4 := Scope_Result_5;
else
   Result_Var_4 := No_Internal_Entity_Compilation_Unit_Array_Type;
end if;
      Inc_Ref (Result_Var_4);
   Result_Var_5 := Result_Var_4;
end if;
      Inc_Ref (Result_Var_5);
Concat_Result := Concat (Fld, Result_Var_5); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1055;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1055;
                     Finalizer_Scope_2895;
                     Finalizer_Scope_2896;
                     Finalizer_Scope_2897;
                     Finalizer_Scope_2898;
                     Finalizer_Scope_2899;
                     Finalizer_Scope_2900;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Compilation_Unit_Array_Access,
                        As_Internal_Entity_Compilation_Unit_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Compilation_Unit_P_Imported_Units;
--# end
--# property-start CompilationUnit.privately_imported_units ada/nodes.lkt:13119
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Privately_Imported_Units
  (Node : Bare_Compilation_Unit
  )
   return Internal_Unit_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Internal_Unit_Array_Access;
            procedure Finalizer_Scope_1056 with Inline_Always;
      Local_All_Imports : Internal_Entity_Compilation_Unit_Array_Access;
Local_Public_Imports : Internal_Entity_Compilation_Unit_Array_Access;
Var_Expr_191 : Bare_With_Clause;
Fld : Internal_Entity_Compilation_Unit_Array_Access;
Fld_1 : Internal_Entity_Compilation_Unit_Array_Access;
Fld_2 : Internal_Unit;
Cast_Expr : Internal_Entity_Compilation_Unit;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Compilation_Unit;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Unit_Array_Access;
Let_Result : Internal_Unit_Array_Access;
Let_Result_1 : Internal_Unit_Array_Access;
Fld_3 : Bare_Ada_Node_List;
Item_0 : Bare_Ada_Node;
Cast_Expr_2 : Bare_Ada_Node;
Cast_Result_2 : Bare_With_Clause;
Fld_4 : Bare_Private_Node;
Fld_5 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Quantifier_Result_1 : Boolean;
If_Result : Internal_Unit_Array_Access;
            procedure Finalizer_Scope_1056 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_All_Imports);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Public_Imports);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_1056;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Compilation_Unit_Compilation_Unit_P_Privately_Imported_Units,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Compilation_Unit,
                                As_Bare_Compilation_Unit => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Unit_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7073 '<If at nodes.lkt:13122:9>' If_Result ada/nodes.lkt:13122
--# expr-start 7063 '<AnyQuantifier at nodes.lkt:13123:13>' Quantifier_Result_1 ada/nodes.lkt:13123
   --# expr-start 7059 '<FieldAccess for prelude at nodes.lkt:13123:13>' Fld_3 ada/nodes.lkt:13123
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Compilation_Unit_F_Prelude;
--# expr-done 7059
      Quantifier_Result_1 := False;
      if Fld_3 = null then
      null;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_3;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind clause Item_0
--# expr-start 7060 '<Cast to WithClause at nodes.lkt:13124:29>' Cast_Result_2 ada/nodes.lkt:13124
Cast_Expr_2 := Item_0; 
   if Cast_Expr_2 = null
      or else Cast_Expr_2.Kind in Ada_With_Clause_Range
   then
      Cast_Result_2 := Cast_Expr_2;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 7060
Var_Expr_191 := Cast_Result_2;
if Var_Expr_191 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 7062 '<FieldAccess for as_bool at nodes.lkt:13124:29>' Fld_5 ada/nodes.lkt:13124
--# expr-start 7061 '<FieldAccess for has_private at nodes.lkt:13124:29>' Fld_4 ada/nodes.lkt:13124
      if Var_Expr_191 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Var_Expr_191.With_Clause_F_Has_Private;
--# expr-done 7061
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Private.as_bool'
Fld_5 := Libadalang.Implementation.Dispatcher_Private_Node_P_As_Bool (Node => Fld_4);
--# end
--# expr-done 7062
Scope_Result := Fld_5;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      Quantifier_Result_1 := Result_Var;
   --# end
               exit when Quantifier_Result_1;
         end loop;
      end;
      end if;
--# expr-done 7063
if Quantifier_Result_1 then
   --# expr-start 7072 '<Let at nodes.lkt:13127:13>' Let_Result_1 ada/nodes.lkt:13127
--# scope-start
--# expr-start 7064 '<FieldAccess for imported_units at nodes.lkt:13127:31>' Fld ada/nodes.lkt:13127
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.imported_units
Fld := Libadalang.Implementation.Compilation_Unit_P_Imported_Units (Node => Self, Include_Privates => True);
--# end
--# expr-done 7064
Local_All_Imports := Fld; Inc_Ref (Local_All_Imports);
--# bind all_imports Local_All_Imports
--# expr-start 7071 '<Let at nodes.lkt:13128:13>' Let_Result ada/nodes.lkt:13128
--# scope-start
--# expr-start 7065 '<FieldAccess for imported_units at nodes.lkt:13128:34>' Fld_1 ada/nodes.lkt:13128
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.imported_units
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Imported_Units (Node => Self, Include_Privates => False);
--# end
--# expr-done 7065
Local_Public_Imports := Fld_1; Inc_Ref (Local_Public_Imports);
--# bind public_imports Local_Public_Imports
--# expr-start 7070 '<Map at nodes.lkt:13130:13>' Map_Result ada/nodes.lkt:13130
      declare
         Map_Result_Vec : Internal_Unit_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Compilation_Unit_Array_Access := Local_All_Imports;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind cu Item_1
         --# expr-start 7068 '<Not at nodes.lkt:13132:25>' Not_Val ada/nodes.lkt:13132
--# expr-start 7067 '<Contains at nodes.lkt:13132:29>' Quantifier_Result ada/nodes.lkt:13132
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Compilation_Unit_Array_Access := Local_Public_Imports;
      begin
         for Item_12 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_12
      --# expr-start 7066 '<Eq at ???>' Is_Equiv None
Cast_Expr := Item_12; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Item_1; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 7066
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 7067
Not_Val := not (Quantifier_Result); 
--# expr-done 7068
         if Not_Val then
      --# expr-start 7069 '<FieldAccess for unit at nodes.lkt:13131:25>' Fld_2 ada/nodes.lkt:13131
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Unit (Node => Item_1.Node);
--# expr-done 7069
         declare
            Item_To_Append : constant Internal_Unit := Fld_2;
         begin
            Internal_Unit_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Unit_Array
           (Items_Count => Natural (Internal_Unit_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Unit_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Unit_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Unit_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7070
Let_Result := Map_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 7071
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 7072
   If_Result := Let_Result_1;
else
   If_Result := No_Internal_Unit_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 7073
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1056;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1056;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Unit_Array_Access,
                        As_Internal_Unit_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Compilation_Unit_P_Privately_Imported_Units;
--# end
--# property-start CompilationUnit.unit_dependencies_helper ada/nodes.lkt:13142
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Unit_Dependencies_Helper
  (Node : Bare_Compilation_Unit
      ; Visited : Internal_Entity_Compilation_Unit_Array_Access
      ; To_Visit : Internal_Entity_Compilation_Unit_Array_Access
  )
   return Internal_Entity_Compilation_Unit_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind visited Visited
   --# bind to_visit To_Visit
   Property_Result : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1057 with Inline_Always;
            procedure Finalizer_Scope_2905 with Inline_Always;
      Local_Now_Visited : Internal_Entity_Compilation_Unit_Array_Access;
Local_New_Imports : Internal_Entity_Compilation_Unit_Array_Access;
Local_To_Visit_Next : Internal_Entity_Compilation_Unit_Array_Access;
Concat_Result : Internal_Entity_Compilation_Unit_Array_Access;
Fld : Internal_Entity_Compilation_Unit_Array_Access;
Map_Result : Internal_Entity_Compilation_Unit_Array_Access;
Unique_Array : Internal_Entity_Compilation_Unit_Array_Access;
Cast_Expr : Internal_Entity_Compilation_Unit;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Compilation_Unit;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
Not_Val : Boolean;
Map_Result_1 : Internal_Entity_Compilation_Unit_Array_Access;
Fld_1 : Internal_Entity_Compilation_Unit_Array_Access;
Len : Integer;
Comp_Result : Boolean;
If_Result : Internal_Entity_Compilation_Unit_Array_Access;
Let_Result : Internal_Entity_Compilation_Unit_Array_Access;
Let_Result_1 : Internal_Entity_Compilation_Unit_Array_Access;
Let_Result_2 : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1057 is
            begin
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Local_Now_Visited);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Local_New_Imports);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_To_Visit_Next);
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1057;
            procedure Finalizer_Scope_2905 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_2905;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7086 '<Let at nodes.lkt:13146:9>' Let_Result_2 ada/nodes.lkt:13146
--# scope-start
Concat_Result := Concat (Visited, To_Visit); 
Local_Now_Visited := Concat_Result; Inc_Ref (Local_Now_Visited);
--# bind now_visited Local_Now_Visited
--# expr-start 7085 '<Let at nodes.lkt:13147:9>' Let_Result_1 ada/nodes.lkt:13147
--# scope-start
--# expr-start 7076 '<unique at nodes.lkt:13147:27>' Unique_Array ada/nodes.lkt:13147
--# expr-start 7075 '<Mapcat at nodes.lkt:13147:27>' Map_Result ada/nodes.lkt:13147
      declare
         Map_Result_Vec : Internal_Entity_Compilation_Unit_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Compilation_Unit_Array_Access := To_Visit;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind c Item_0
      --# expr-start 7074 '<FieldAccess for imported_units at nodes.lkt:13147:50>' Fld ada/nodes.lkt:13147
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.imported_units
Fld := Libadalang.Implementation.Compilation_Unit_P_Imported_Units (Node => Item_0.Node);
--# end
--# expr-done 7074
         for Item_To_Append of
               Fld.Items
         loop
            Internal_Entity_Compilation_Unit_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2905;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Compilation_Unit_Array
           (Items_Count => Natural (Internal_Entity_Compilation_Unit_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Compilation_Unit_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Compilation_Unit_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Compilation_Unit_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7075
Unique_Array := Make_Unique (Map_Result); 
--# expr-done 7076
Local_New_Imports := Unique_Array; Inc_Ref (Local_New_Imports);
--# bind new_imports Local_New_Imports
--# expr-start 7084 '<Let at nodes.lkt:13148:9>' Let_Result ada/nodes.lkt:13148
--# scope-start
--# expr-start 7080 '<Map at nodes.lkt:13149:13>' Map_Result_1 ada/nodes.lkt:13149
      declare
         Map_Result_1_Vec : Internal_Entity_Compilation_Unit_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Compilation_Unit_Array_Access := Local_New_Imports;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind c Item_1
         --# expr-start 7079 '<Not at nodes.lkt:13149:39>' Not_Val ada/nodes.lkt:13149
--# expr-start 7078 '<Contains at nodes.lkt:13149:43>' Quantifier_Result ada/nodes.lkt:13149
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Compilation_Unit_Array_Access := Local_Now_Visited;
      begin
         for Item_13 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_13
      --# expr-start 7077 '<Eq at ???>' Is_Equiv None
Cast_Expr := Item_13; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Item_1; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 7077
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 7078
Not_Val := not (Quantifier_Result); 
--# expr-done 7079
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity_Compilation_Unit := Item_1;
         begin
            Internal_Entity_Compilation_Unit_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Compilation_Unit_Array
           (Items_Count => Natural (Internal_Entity_Compilation_Unit_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Compilation_Unit_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Compilation_Unit_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Compilation_Unit_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 7080
Local_To_Visit_Next := Map_Result_1; Inc_Ref (Local_To_Visit_Next);
--# bind to_visit_next Local_To_Visit_Next
--# expr-start 7083 '<If at nodes.lkt:13151:9>' If_Result ada/nodes.lkt:13151
--# expr-start 7081 '<length at nodes.lkt:13151:12>' Len ada/nodes.lkt:13151
Len := Length (Local_To_Visit_Next); 
--# expr-done 7081
Comp_Result := Len > 0; 
if Comp_Result then
   --# expr-start 7082 '<FieldAccess for unit_dependencies_helper at nodes.lkt:13152:14>' Fld_1 ada/nodes.lkt:13152
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.unit_dependencies_helper
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Unit_Dependencies_Helper (Node => Self, Visited => Local_Now_Visited, To_Visit => Local_To_Visit_Next);
--# end
--# expr-done 7082
   If_Result := Fld_1;
else
   If_Result := Local_Now_Visited;
end if;
      Inc_Ref (If_Result);
--# expr-done 7083
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 7084
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 7085
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 7086
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1057;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1057;
                     Finalizer_Scope_2905;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Unit_Dependencies_Helper;
--# end
--# property-start CompilationUnit.unit_dependencies ada/nodes.lkt:13162
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Unit_Dependencies
  (Node : Bare_Compilation_Unit
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Compilation_Unit_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
     Ent : Internal_Entity_Compilation_Unit :=
       Internal_Entity_Compilation_Unit'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1058 with Inline_Always;
      Array_Lit : Internal_Entity_Compilation_Unit_Array_Access;
Fld : Internal_Entity_Compilation_Unit_Array_Access;
Unique_Array : Internal_Entity_Compilation_Unit_Array_Access;
Fld_1 : Bare_Compilation_Unit;
Cast_Result : Bare_Compilation_Unit;
Is_Equal : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Compilation_Unit_Array_Access;
            procedure Finalizer_Scope_1058 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1058;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Compilation_Unit_Compilation_Unit_P_Unit_Dependencies,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Compilation_Unit,
                                As_Bare_Compilation_Unit => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Compilation_Unit_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7093 '<Map at nodes.lkt:13163:9>' Map_Result ada/nodes.lkt:13163
   --# expr-start 7089 '<unique at nodes.lkt:13163:9>' Unique_Array ada/nodes.lkt:13163
--# expr-start 7088 '<FieldAccess for unit_dependencies_helper at nodes.lkt:13163:9>' Fld ada/nodes.lkt:13163
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7087 '<ArrayLiteral at nodes.lkt:13165:13>' Array_Lit ada/nodes.lkt:13165
Array_Lit := Create_Internal_Entity_Compilation_Unit_Array (Internal_Internal_Entity_Compilation_Unit_Array'(1 => Ent)); 
--# expr-done 7087
--# property-call-start CompilationUnit.unit_dependencies_helper
Fld := Libadalang.Implementation.Compilation_Unit_P_Unit_Dependencies_Helper (Node => Self, Visited => No_Internal_Entity_Compilation_Unit_Array_Type, To_Visit => Array_Lit);
--# end
--# expr-done 7088
Unique_Array := Make_Unique (Fld); 
--# expr-done 7089
      declare
         Map_Result_Vec : Internal_Entity_Compilation_Unit_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Compilation_Unit_Array_Access := Unique_Array;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind u Item_0
         --# expr-start 7092 '<Not at nodes.lkt:13170:20>' Not_Val ada/nodes.lkt:13170
--# expr-start 7091 '<Eq at nodes.lkt:13170:20>' Is_Equal ada/nodes.lkt:13170
--# expr-start 7090 '<FieldAccess for node at nodes.lkt:13170:20>' Fld_1 ada/nodes.lkt:13170
Fld_1 := Item_0.Node;
--# expr-done 7090
      Cast_Result := Fld_1;
Is_Equal := Cast_Result = Self; 
--# expr-done 7091
Not_Val := not (Is_Equal); 
--# expr-done 7092
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity_Compilation_Unit := Item_0;
         begin
            Internal_Entity_Compilation_Unit_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Compilation_Unit_Array
           (Items_Count => Natural (Internal_Entity_Compilation_Unit_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Compilation_Unit_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Compilation_Unit_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Compilation_Unit_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7093
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1058;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1058;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Compilation_Unit_Array_Access,
                        As_Internal_Entity_Compilation_Unit_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Compilation_Unit_P_Unit_Dependencies;
--# end
--# property-start CompilationUnit.decl ada/nodes.lkt:13175
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Decl
  (Node : Bare_Compilation_Unit
  )
   return Bare_Basic_Decl
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Decl;
      Match_0 : Bare_Library_Item;
Match_1 : Bare_Subunit;
Match_2 : Bare_Ada_Node;
Fld : Bare_Ada_Node;
Fld_1 : Bare_Basic_Decl;
Fld_2 : Bare_Body_Node;
Match_Prefix : Bare_Ada_Node;
Cast_Result : Bare_Library_Item;
Let_Result : Bare_Basic_Decl;
Scope_Result : Bare_Basic_Decl;
Cast_Result_1 : Bare_Subunit;
Cast_Result_2 : Bare_Basic_Decl;
Let_Result_1 : Bare_Basic_Decl;
Scope_Result_1 : Bare_Basic_Decl;
Cast_Result_3 : Bare_Ada_Node;
Let_Result_2 : Bare_Basic_Decl;
Scope_Result_2 : Bare_Basic_Decl;
Match_Result : Bare_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7097 '<Match at nodes.lkt:13175:29>' Match_Result ada/nodes.lkt:13175
--# expr-start 7094 '<FieldAccess for body at nodes.lkt:13175:35>' Fld ada/nodes.lkt:13175
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Compilation_Unit_F_Body;
--# expr-done 7094
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Library_Item =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind li Match_0
--# expr-start 7095 '<FieldAccess for item at nodes.lkt:13176:33>' Fld_1 ada/nodes.lkt:13176
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Match_0.Library_Item_F_Item;
--# expr-done 7095
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Subunit =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind su Match_1
--# expr-start 7096 '<FieldAccess for body at nodes.lkt:13177:29>' Fld_2 ada/nodes.lkt:13177
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Match_1.Subunit_F_Body;
--# expr-done 7096
      Cast_Result_2 := Fld_2;
Let_Result_1 := Cast_Result_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Iter_Type_Of | Ada_Limited_Absent .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := No_Bare_Ada_Node; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 7097
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Decl;
--# end
--# property-start CompilationUnit.is_preelaborable_impl ada/nodes.lkt:13187
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Is_Preelaborable_Impl
  (Node : Bare_Compilation_Unit
      ; From_Body : Boolean
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
     Ent : Internal_Entity_Compilation_Unit :=
       Internal_Entity_Compilation_Unit'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind from_body From_Body
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Match_0 : Internal_Entity_Subunit;
Match_1 : Internal_Entity_Library_Item;
Match_0_1 : Internal_Entity_Subp_Decl;
Match_1_1 : Internal_Entity_Generic_Subp_Decl;
Match_2 : Internal_Entity_Subp_Body;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Match_3 : Internal_Entity_Package_Decl;
Match_4 : Internal_Entity_Generic_Package_Decl;
Match_5 : Internal_Entity_Package_Body;
Match_6 : Internal_Entity_Basic_Decl;
Match_2_1 : Internal_Entity;
Fld : Internal_Entity;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity;
Fld_3 : Internal_Entity;
Cast_Result : Internal_Entity_Compilation_Unit;
Fld_4 : Boolean;
Fld_5 : Internal_Entity_Basic_Decl;
Fld_6 : Boolean;
Fld_7 : Internal_Entity_Basic_Decl;
Fld_8 : Boolean;
Fld_9 : Boolean;
Fld_10 : Internal_Entity_Basic_Decl;
Fld_11 : Internal_Entity;
Fld_12 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Compilation_Unit;
Fld_13 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
Fld_14 : Boolean;
Fld_15 : Internal_Entity_Generic_Package_Internal;
Fld_16 : Boolean;
Fld_17 : Internal_Entity_Basic_Decl;
Fld_18 : Internal_Unit;
Fld_19 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Compilation_Unit;
Fld_20 : Boolean;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Subp_Decl;
Let_Result : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_4 : Internal_Entity_Generic_Subp_Decl;
Let_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Cast_Result_5 : Internal_Entity_Subp_Body;
Let_Result_2 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_6 : Internal_Entity_Package_Decl;
Let_Result_3 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_7 : Internal_Entity_Generic_Package_Decl;
Let_Result_4 : Boolean;
Scope_Result_5 : Boolean;
Cast_Result_8 : Internal_Entity_Package_Body;
Let_Result_5 : Boolean;
Scope_Result_6 : Boolean;
Cast_Result_9 : Internal_Entity_Basic_Decl;
Let_Result_6 : Boolean;
Scope_Result_7 : Boolean;
Match_Result : Boolean;
Match_Prefix_1 : Internal_Entity;
Cast_Result_10 : Internal_Entity_Subunit;
Let_Result_7 : Boolean;
Scope_Result_8 : Boolean;
Cast_Result_11 : Internal_Entity_Library_Item;
Let_Result_8 : Boolean;
Scope_Result_9 : Boolean;
Cast_Result_12 : Internal_Entity;
Let_Result_9 : Boolean;
Scope_Result_10 : Boolean;
Match_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7125 '<Match at nodes.lkt:13187:56>' Match_Result_1 ada/nodes.lkt:13187
--# expr-start 7098 '<FieldAccess for body at nodes.lkt:13187:62>' Fld ada/nodes.lkt:13187
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Ent.Node.Compilation_Unit_F_Body, Info => Ent.Info);
--# expr-done 7098
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Fld; 
case Ada_Ada_Node (Match_Prefix_1.Node.Kind) is
         when Ada_Subunit =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Create_Internal_Entity_Subunit
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_0 := Cast_Result_10; 
--# bind su Match_0
--# expr-start 7103 '<FieldAccess for is_preelaborable_impl at nodes.lkt:13191:13>' Fld_4 ada/nodes.lkt:13191
--# expr-start 7102 '<Cast to CompilationUnit at nodes.lkt:13191:13>' Cast_Result ada/nodes.lkt:13191
--# expr-start 7101 '<parent at nodes.lkt:13191:13>' Fld_3 ada/nodes.lkt:13191
--# expr-start 7100 '<parent at nodes.lkt:13191:13>' Fld_2 ada/nodes.lkt:13191
--# expr-start 7099 '<FieldAccess for body_root at nodes.lkt:13191:13>' Fld_1 ada/nodes.lkt:13191
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.body_root
Fld_1 := Libadalang.Implementation.Subunit_P_Body_Root (Node => Match_0.Node);
--# end
--# expr-done 7099
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# expr-done 7100
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# expr-done 7101
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Create_Internal_Entity_Compilation_Unit
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 7102
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.is_preelaborable_impl
Fld_4 := Libadalang.Implementation.Compilation_Unit_P_Is_Preelaborable_Impl (Node => Cast_Result.Node, From_Body => True, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result.Info);
--# end
--# expr-done 7103
Let_Result_7 := Fld_4; 
--# end
Scope_Result_8 := Let_Result_7;
   --# end
            Match_Result_1 := Scope_Result_8; 
         when Ada_Library_Item =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Create_Internal_Entity_Library_Item
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_1 := Cast_Result_11; 
--# bind li Match_1
--# expr-start 7124 '<Match at nodes.lkt:13197:13>' Match_Result ada/nodes.lkt:13197
--# expr-start 7104 '<FieldAccess for item at nodes.lkt:13197:19>' Fld_5 ada/nodes.lkt:13197
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Basic_Decl (Node => Match_1.Node.Library_Item_F_Item, Info => Match_1.Info);
--# expr-done 7104
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_5; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0_1 := Cast_Result_3; 
--# bind subp_decl Match_0_1
--# expr-start 7105 '<FieldAccess for does_aspects_make_preelaborable at nodes.lkt:13199:21>' Fld_6 ada/nodes.lkt:13199
      if Match_0_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.does_aspects_make_preelaborable
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Does_Aspects_Make_Preelaborable (Node => Match_0_1.Node, From_Body => From_Body, E_Info => Match_0_1.Info);
--# end
--# expr-done 7105
Let_Result := Fld_6; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Generic_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Generic_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1_1 := Cast_Result_4; 
--# bind gen_subp_decl Match_1_1
--# expr-start 7107 '<FieldAccess for does_aspects_make_preelaborable at nodes.lkt:13201:21>' Fld_8 ada/nodes.lkt:13201
--# expr-start 7106 '<FieldAccess for decl at nodes.lkt:13201:21>' Fld_7 ada/nodes.lkt:13201
      if Match_1_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericDecl.decl'
Fld_7 := Libadalang.Implementation.Dispatcher_Generic_Decl_P_Decl (Node => Match_1_1.Node, E_Info => Match_1_1.Info);
--# end
--# expr-done 7106
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.does_aspects_make_preelaborable
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Does_Aspects_Make_Preelaborable (Node => Fld_7.Node, From_Body => From_Body, E_Info => Fld_7.Info);
--# end
--# expr-done 7107
Let_Result_1 := Fld_8; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Subp_Body =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Subp_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_5; 
--# bind subp_body Match_2
--# expr-start 7114 '<BooleanBinaryOp Or at nodes.lkt:13207:21>' If_Result ada/nodes.lkt:13207
--# expr-start 7108 '<FieldAccess for does_aspects_make_preelaborable at nodes.lkt:13207:21>' Fld_9 ada/nodes.lkt:13207
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.does_aspects_make_preelaborable
Fld_9 := Libadalang.Implementation.Basic_Decl_P_Does_Aspects_Make_Preelaborable (Node => Match_2.Node, From_Body => False, E_Info => Match_2.Info);
--# end
--# expr-done 7108
if Fld_9 then
   If_Result := True;
else
--# expr-start 7109 '<FieldAccess for decl_part at nodes.lkt:13211:24>' Fld_10 ada/nodes.lkt:13211
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_10 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Match_2.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_2.Info);
--# end
--# expr-done 7109
Var_Expr_0 := Fld_10;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind dp Var_Expr_0
--# expr-start 7113 '<FieldAccess for is_preelaborable_impl at nodes.lkt:13213:25>' Fld_13 ada/nodes.lkt:13213
--# expr-start 7112 '<Cast to CompilationUnit at nodes.lkt:13213:25>' Cast_Result_1 ada/nodes.lkt:13213
--# expr-start 7111 '<parent at nodes.lkt:13213:25>' Fld_12 ada/nodes.lkt:13213
--# expr-start 7110 '<parent at nodes.lkt:13213:25>' Fld_11 ada/nodes.lkt:13213
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Parent (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 7110
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Parent (Node => Fld_11.Node, E_Info => Fld_11.Info);
--# expr-done 7111
   if Fld_12.Node = null
      or else Fld_12.Node.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Compilation_Unit
        (Node => Fld_12.Node,
         Info => Fld_12.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 7112
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.is_preelaborable_impl
Fld_13 := Libadalang.Implementation.Compilation_Unit_P_Is_Preelaborable_Impl (Node => Cast_Result_1.Node, From_Body => True, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 7113
Scope_Result := Fld_13;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 7114
Let_Result_2 := If_Result; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Package_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_6; 
--# bind pkg_decl Match_3
--# expr-start 7115 '<FieldAccess for does_aspects_make_preelaborable at nodes.lkt:13220:21>' Fld_14 ada/nodes.lkt:13220
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.does_aspects_make_preelaborable
Fld_14 := Libadalang.Implementation.Basic_Decl_P_Does_Aspects_Make_Preelaborable (Node => Match_3.Node, From_Body => From_Body, E_Info => Match_3.Info);
--# end
--# expr-done 7115
Let_Result_3 := Fld_14; 
--# end
Scope_Result_4 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Generic_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Generic_Package_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_7; 
--# bind gen_pkg_decl Match_4
--# expr-start 7117 '<FieldAccess for does_aspects_make_preelaborable at nodes.lkt:13222:21>' Fld_16 ada/nodes.lkt:13222
--# expr-start 7116 '<FieldAccess for package_decl at nodes.lkt:13222:21>' Fld_15 ada/nodes.lkt:13222
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Generic_Package_Internal (Node => Match_4.Node.Generic_Package_Decl_F_Package_Decl, Info => Match_4.Info);
--# expr-done 7116
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.does_aspects_make_preelaborable
Fld_16 := Libadalang.Implementation.Basic_Decl_P_Does_Aspects_Make_Preelaborable (Node => Fld_15.Node, From_Body => From_Body, E_Info => Fld_15.Info);
--# end
--# expr-done 7117
Let_Result_4 := Fld_16; 
--# end
Scope_Result_5 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Package_Body =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Create_Internal_Entity_Package_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_8; 
--# bind pkg_body Match_5
--# expr-start 7123 '<FieldAccess for is_preelaborable_impl at nodes.lkt:13228:21>' Fld_20 ada/nodes.lkt:13228
--# expr-start 7122 '<Cast to CompilationUnit at nodes.lkt:13228:21>' Cast_Result_2 ada/nodes.lkt:13228
--# expr-start 7121 '<as_bare_entity at nodes.lkt:13228:21>' If_Result_1 ada/nodes.lkt:13228
--# expr-start 7120 '<FieldAccess for root at nodes.lkt:13228:21>' Fld_19 ada/nodes.lkt:13228
--# expr-start 7119 '<FieldAccess for unit at nodes.lkt:13228:21>' Fld_18 ada/nodes.lkt:13228
--# expr-start 7118 '<FieldAccess for decl_part at nodes.lkt:13228:21>' Fld_17 ada/nodes.lkt:13228
      if Match_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_17 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Match_5.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_5.Info);
--# end
--# expr-done 7118
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Libadalang.Implementation.Unit (Node => Fld_17.Node);
--# expr-done 7119
      if Fld_18 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Fld_18.Ast_Root;
--# expr-done 7120
Is_Null := Fld_19 = null; 
if Is_Null then
   If_Result_1 := No_Entity;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_19); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 7121
   if If_Result_1.Node = null
      or else If_Result_1.Node.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Compilation_Unit
        (Node => If_Result_1.Node,
         Info => If_Result_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 7122
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.is_preelaborable_impl
Fld_20 := Libadalang.Implementation.Compilation_Unit_P_Is_Preelaborable_Impl (Node => Cast_Result_2.Node, From_Body => True, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 7123
Let_Result_5 := Fld_20; 
--# end
Scope_Result_6 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Abstract_State_Decl .. Ada_Generic_Package_Internal | Ada_Discrete_Base_Subtype_Decl .. Ada_Concrete_Formal_Subp_Decl | Ada_Entry_Decl .. Ada_Null_Subp_Decl | Ada_Subp_Renaming_Decl .. Ada_Entry_Body | Ada_Protected_Body .. Ada_For_Loop_Var_Decl | Ada_Generic_Package_Instantiation .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_6 := Cast_Result_9; 
--# bind _ Match_6
Let_Result_6 := False; 
--# end
Scope_Result_7 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_7; 
end case;
--# expr-done 7124
Let_Result_8 := Match_Result; 
--# end
Scope_Result_9 := Let_Result_8;
   --# end
            Match_Result_1 := Scope_Result_9; 
         when Ada_Abort_Absent .. Ada_Iter_Type_Of | Ada_Limited_Absent .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_12 := Create_Internal_Entity
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_2_1 := Cast_Result_12; 
--# bind _ Match_2_1
Let_Result_9 := False; 
--# end
Scope_Result_10 := Let_Result_9;
   --# end
            Match_Result_1 := Scope_Result_10; 
end case;
--# expr-done 7125
         Property_Result := Match_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Is_Preelaborable_Impl;
--# end
--# property-start CompilationUnit.is_preelaborable ada/nodes.lkt:13243
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Is_Preelaborable
  (Node : Bare_Compilation_Unit
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
     Ent : Internal_Entity_Compilation_Unit :=
       Internal_Entity_Compilation_Unit'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7126 '<FieldAccess for is_preelaborable_impl at nodes.lkt:13243:36>' Fld ada/nodes.lkt:13243
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.is_preelaborable_impl
Fld := Libadalang.Implementation.Compilation_Unit_P_Is_Preelaborable_Impl (Node => Ent.Node, From_Body => False, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 7126
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Is_Preelaborable;
--# end
--# property-start CompilationUnit.self_restrictions ada/nodes.lkt:13248
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Self_Restrictions
  (Node : Bare_Compilation_Unit
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1062 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Pragma_Node;
Var_Expr_192 : Internal_Entity_Base_Assoc;
As_Entity : Internal_Entity_Compilation_Unit;
Is_Null : Boolean;
If_Result : Internal_Entity_Compilation_Unit;
Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Pragma_Node;
Fld_3 : Internal_Entity_Base_Assoc_List;
Fld_4 : Bare_Base_Assoc_List;
Fld_5 : Internal_Entity_Info;
Get_Result : Bare_Base_Assoc;
As_Entity_1 : Internal_Entity_Base_Assoc;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Assoc;
Fld_6 : Internal_Entity_Expr;
Scope_Result : Internal_Entity_Expr;
Result_Var : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Base_Id;
Fld_7 : Symbol_Type;
As_Entity_2 : Internal_Entity;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity;
Cast_Expr_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Pragma_Node;
Fld_8 : Internal_Entity_Identifier;
Fld_9 : Symbol_Type;
Sym : Symbol_Type;
Is_Equal : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Map_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1062 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1062;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7139 '<Map at nodes.lkt:13249:9>' Map_Result ada/nodes.lkt:13249
   --# expr-start 7128 '<FieldAccess for prelude at nodes.lkt:13249:9>' Fld ada/nodes.lkt:13249
--# expr-start 7127 '<as_bare_entity at nodes.lkt:13249:9>' If_Result ada/nodes.lkt:13249
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Compilation_Unit;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 7127
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => If_Result.Node.Compilation_Unit_F_Prelude, Info => If_Result.Info);
--# expr-done 7128
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Symbol_Type_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Symbol_Type_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_2 := Bare_Item_0 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity_2 := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result_2 := As_Entity_2;
end if;
                  Item_0 := If_Result_2; 
   --# scope-start
               --# bind n Item_0
--# expr-start 7129 '<Cast to Pragma at nodes.lkt:13253:13>' Cast_Result_2 ada/nodes.lkt:13253
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Pragma_Node
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_2 := No_Entity_Pragma_Node;
   end if;
--# expr-done 7129
Var_Expr_1 := Cast_Result_2;
if Var_Expr_1 /= No_Entity_Pragma_Node then
   --# scope-start
   --# bind p Var_Expr_1
--# expr-start 7133 '<Eq at nodes.lkt:13253:36>' Is_Equal ada/nodes.lkt:13253
--# expr-start 7131 '<FieldAccess for name_symbol at nodes.lkt:13253:36>' Fld_9 ada/nodes.lkt:13253
--# expr-start 7130 '<FieldAccess for id at nodes.lkt:13253:36>' Fld_8 ada/nodes.lkt:13253
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Identifier (Node => Var_Expr_1.Node.Pragma_Node_F_Id, Info => Var_Expr_1.Info);
--# expr-done 7130
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_9 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_8.Node);
--# end
--# expr-done 7131
--# expr-start 7132 '<Symbol Restrictions at nodes.lkt:13253:58>' Sym ada/nodes.lkt:13253
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Restrictions); 
--# expr-done 7132
Is_Equal := Fld_9 = Sym; 
--# expr-done 7133
Scope_Result_1 := Is_Equal;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
         if Result_Var_1 then
      --# expr-start 7138 '<FieldAccess for name_symbol at nodes.lkt:13251:13>' Fld_7 ada/nodes.lkt:13251
--# expr-start 7137 '<Cast to BaseId at nodes.lkt:13251:13>' Cast_Result_1 ada/nodes.lkt:13251
--# expr-start 7135 '<FieldAccess for args at nodes.lkt:13251:13>' Fld_3 ada/nodes.lkt:13251
--# expr-start 7134 '<Cast to Pragma at nodes.lkt:13251:13>' Cast_Result ada/nodes.lkt:13251
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result := Create_Internal_Entity_Pragma_Node
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Pragma_Node;
   end if;
--# expr-done 7134
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Base_Assoc_List (Node => Cast_Result.Node.Pragma_Node_F_Args, Info => Cast_Result.Info);
--# expr-done 7135
Fld_4 := Fld_3.Node;
Get_Result := Get (Self, Fld_4, 0, True); 
Is_Null_1 := Get_Result = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Base_Assoc;
else
Fld_5 := Fld_3.Info;
As_Entity_1 := (Info => Fld_5, Node => Get_Result); 
   If_Result_1 := As_Entity_1;
end if;
Var_Expr_192 := If_Result_1;
if Var_Expr_192 /= No_Entity_Base_Assoc then
   --# scope-start
--# expr-start 7136 '<FieldAccess for assoc_expr at nodes.lkt:13251:13>' Fld_6 ada/nodes.lkt:13251
      if Var_Expr_192.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Var_Expr_192.Node, E_Info => Var_Expr_192.Info);
--# end
--# expr-done 7136
Scope_Result := Fld_6;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Expr;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Id
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Id
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result_1 := No_Entity_Base_Id;
   end if;
--# expr-done 7137
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_7 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Cast_Result_1.Node);
--# end
--# expr-done 7138
         declare
            Item_To_Append : constant Symbol_Type := Fld_7;
         begin
            Symbol_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Symbol_Type_Array
           (Items_Count => Natural (Symbol_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Symbol_Type_Vectors.Get
              (Map_Result_Vec,
               I + Symbol_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Symbol_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7139
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1062;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1062;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Self_Restrictions;
--# end
--# property-start CompilationUnit.other_part ada/nodes.lkt:13259
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Other_Part
  (Node : Bare_Compilation_Unit
  )
   return Internal_Entity_Compilation_Unit
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Compilation_Unit;
            procedure Finalizer_Scope_1063 with Inline_Always;
      Local_Other_Kind : Analysis_Unit_Kind;
Var_Expr_193 : Bare_Compilation_Unit;
Fld : Analysis_Unit_Kind;
Is_Equal : Boolean;
If_Result : Analysis_Unit_Kind;
Fld_1 : Symbol_Type_Array_Access;
Fld_2 : Bare_Compilation_Unit;
As_Entity : Internal_Entity_Compilation_Unit;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Compilation_Unit;
Scope_Result : Internal_Entity_Compilation_Unit;
Result_Var : Internal_Entity_Compilation_Unit;
Let_Result : Internal_Entity_Compilation_Unit;
            procedure Finalizer_Scope_1063 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1063;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7146 '<Let at nodes.lkt:13260:9>' Let_Result ada/nodes.lkt:13260
--# scope-start
--# expr-start 7142 '<If at nodes.lkt:13261:13>' If_Result ada/nodes.lkt:13261
--# expr-start 7141 '<Eq at nodes.lkt:13261:16>' Is_Equal ada/nodes.lkt:13261
--# expr-start 7140 '<FieldAccess for unit_kind at nodes.lkt:13261:16>' Fld ada/nodes.lkt:13261
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.unit_kind
Fld := Libadalang.Implementation.Compilation_Unit_P_Unit_Kind (Node => Self);
--# end
--# expr-done 7140
Is_Equal := Fld = Unit_Specification; 
--# expr-done 7141
if Is_Equal then
   If_Result := Unit_Body;
else
   If_Result := Unit_Specification;
end if;
--# expr-done 7142
Local_Other_Kind := If_Result; 
--# bind other_kind Local_Other_Kind
--# expr-start 7144 '<FieldAccess for designated_compilation_unit at nodes.lkt:13265:9>' Fld_2 ada/nodes.lkt:13265
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7143 '<FieldAccess for syntactic_fully_qualified_name at nodes.lkt:13266:13>' Fld_1 ada/nodes.lkt:13266
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.syntactic_fully_qualified_name
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Syntactic_Fully_Qualified_Name (Node => Self);
--# end
--# expr-done 7143
--# property-call-start AdaNode.designated_compilation_unit
Fld_2 := Libadalang.Implementation.Ada_Node_P_Designated_Compilation_Unit (Node => Self, Name => Fld_1, Kind => Local_Other_Kind, Not_Found_Is_Error => False);
--# end
--# expr-done 7144
Var_Expr_193 := Fld_2;
if Var_Expr_193 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 7145 '<as_bare_entity at nodes.lkt:13265:9>' If_Result_1 ada/nodes.lkt:13265
Is_Null := Var_Expr_193 = null; 
if Is_Null then
   If_Result_1 := No_Entity_Compilation_Unit;
else
As_Entity := (Info => No_Entity_Info, Node => Var_Expr_193); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 7145
Scope_Result := If_Result_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Compilation_Unit;
end if;
Let_Result := Result_Var; 
--# end
--# expr-done 7146
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_1063;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1063;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Other_Part;
--# end
--# property-start CompilationUnit.has_restriction ada/nodes.lkt:13280
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Has_Restriction
  (Node : Bare_Compilation_Unit
      ; Name : Symbol_Type
  )
   return Boolean
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind name Name
   Property_Result : Boolean;
            procedure Finalizer_Scope_2927 with Inline_Always;
            procedure Finalizer_Scope_2929 with Inline_Always;
      Match_0 : Bare_Library_Item;
Local_Spec : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Match_1 : Bare_Subunit;
Match_2 : Bare_Ada_Node;
Var_Expr_194 : Internal_Entity_Compilation_Unit;
Var_Expr_195 : Internal_Entity_Compilation_Unit;
Fld : Bare_Ada_Node;
Fld_1 : Symbol_Type_Array_Access;
Is_Equal : Boolean;
Quantifier_Result : Boolean;
Fld_2 : Internal_Entity_Compilation_Unit;
Fld_3 : Symbol_Type_Array_Access;
Is_Equal_1 : Boolean;
Quantifier_Result_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
Fld_4 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Body_Node;
Fld_5 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
If_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Result_Var_1 : Internal_Entity_Basic_Decl;
Is_Null_1 : Boolean;
Not_Val : Boolean;
Fld_6 : Internal_Entity_Defining_Name;
Sym : Symbol_Type;
Fld_7 : Boolean;
If_Result_3 : Boolean;
Let_Result : Boolean;
If_Result_4 : Boolean;
Fld_8 : Internal_Entity_Compilation_Unit;
Fld_9 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Match_Prefix : Bare_Ada_Node;
Cast_Result_1 : Bare_Library_Item;
Let_Result_1 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_2 : Bare_Subunit;
Let_Result_2 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_3 : Bare_Ada_Node;
Let_Result_3 : Boolean;
Scope_Result_5 : Boolean;
Match_Result : Boolean;
Sym_1 : Symbol_Type;
Is_Equal_2 : Boolean;
If_Result_5 : Boolean;
            procedure Finalizer_Scope_2927 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_2927;
            procedure Finalizer_Scope_2929 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_2929;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7175 '<If at nodes.lkt:13281:9>' If_Result_5 ada/nodes.lkt:13281
--# expr-start 7148 '<Eq at nodes.lkt:13281:12>' Is_Equal_2 ada/nodes.lkt:13281
--# expr-start 7147 '<Symbol No_Elaboration_Code at nodes.lkt:13281:20>' Sym_1 ada/nodes.lkt:13281
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_No_Elaboration_Code); 
--# expr-done 7147
Is_Equal_2 := Name = Sym_1; 
--# expr-done 7148
if Is_Equal_2 then
   --# expr-start 7174 '<Match at nodes.lkt:13283:13>' Match_Result ada/nodes.lkt:13283
--# expr-start 7149 '<FieldAccess for body at nodes.lkt:13283:19>' Fld ada/nodes.lkt:13283
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Compilation_Unit_F_Body;
--# expr-done 7149
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Library_Item =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_0 := Cast_Result_1; 
--# bind li Match_0
--# expr-start 7171 '<BooleanBinaryOp Or at nodes.lkt:13287:21>' If_Result_4 ada/nodes.lkt:13287
--# expr-start 7157 '<BooleanBinaryOp Or at nodes.lkt:13287:21>' If_Result ada/nodes.lkt:13287
--# expr-start 7152 '<Contains at nodes.lkt:13287:21>' Quantifier_Result ada/nodes.lkt:13287
   --# expr-start 7150 '<FieldAccess for self_restrictions at nodes.lkt:13287:21>' Fld_1 ada/nodes.lkt:13287
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.self_restrictions
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Self_Restrictions (Node => Self);
--# end
--# expr-done 7150
      Quantifier_Result := False;
      declare
         Collection : constant Symbol_Type_Array_Access := Fld_1;
      begin
         for Item_14 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_14
      --# expr-start 7151 '<Eq at ???>' Is_Equal None
Is_Equal := Item_14 = Name; 
--# expr-done 7151
      Quantifier_Result := Is_Equal;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 7152
if Quantifier_Result then
   If_Result := True;
else
--# expr-start 7153 '<FieldAccess for other_part at nodes.lkt:13288:24>' Fld_2 ada/nodes.lkt:13288
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.other_part
Fld_2 := Libadalang.Implementation.Compilation_Unit_P_Other_Part (Node => Self);
--# end
--# expr-done 7153
Var_Expr_194 := Fld_2;
if Var_Expr_194 /= No_Entity_Compilation_Unit then
   --# scope-start
--# expr-start 7156 '<Contains at nodes.lkt:13288:24>' Quantifier_Result_1 ada/nodes.lkt:13288
   --# expr-start 7154 '<FieldAccess for self_restrictions at nodes.lkt:13288:24>' Fld_3 ada/nodes.lkt:13288
      if Var_Expr_194.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.self_restrictions
Fld_3 := Libadalang.Implementation.Compilation_Unit_P_Self_Restrictions (Node => Var_Expr_194.Node);
--# end
--# expr-done 7154
      Quantifier_Result_1 := False;
      declare
         Collection : constant Symbol_Type_Array_Access := Fld_3;
      begin
         for Item_15 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_15
      --# expr-start 7155 '<Eq at ???>' Is_Equal_1 None
Is_Equal_1 := Item_15 = Name; 
--# expr-done 7155
      Quantifier_Result_1 := Is_Equal_1;
   --# end
               exit when Quantifier_Result_1;
         end loop;
      end;
--# expr-done 7156
Scope_Result := Quantifier_Result_1;
   --# end
      Finalizer_Scope_2929;
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 7157
if If_Result then
   If_Result_4 := True;
else
   --# expr-start 7170 '<Let at nodes.lkt:13293:25>' Let_Result ada/nodes.lkt:13293
--# scope-start
--# expr-start 7159 '<as_bare_entity at nodes.lkt:13294:29>' If_Result_1 ada/nodes.lkt:13294
--# expr-start 7158 '<FieldAccess for item at nodes.lkt:13294:29>' Fld_4 ada/nodes.lkt:13294
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Match_0.Library_Item_F_Item;
--# expr-done 7158
Is_Null := Fld_4 = null; 
if Is_Null then
   If_Result_1 := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_4); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 7159
Var_Expr_0 := If_Result_1;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind i Var_Expr_0
--# expr-start 7163 '<If at nodes.lkt:13296:33>' If_Result_2 ada/nodes.lkt:13296
--# expr-start 7160 '<IsA Body at nodes.lkt:13296:36>' Is_A ada/nodes.lkt:13296
Is_A := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Body_Node; 
--# expr-done 7160
if Is_A then
   --# expr-start 7162 '<FieldAccess for decl_part at nodes.lkt:13296:51>' Fld_5 ada/nodes.lkt:13296
--# expr-start 7161 '<Cast to Body at nodes.lkt:13296:51>' Cast_Result ada/nodes.lkt:13296
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Body_Node
   then
      Cast_Result := Create_Internal_Entity_Body_Node
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Body_Node;
   end if;
--# expr-done 7161
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_5 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Cast_Result.Node, Imprecise_Fallback => False, E_Info => Cast_Result.Info);
--# end
--# expr-done 7162
   If_Result_2 := Fld_5;
else
   If_Result_2 := Var_Expr_0;
end if;
--# expr-done 7163
Scope_Result_1 := If_Result_2;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Basic_Decl;
end if;
Local_Spec := Result_Var_1; 
--# bind spec Local_Spec
--# expr-start 7169 '<BooleanBinaryOp And at nodes.lkt:13299:25>' If_Result_3 ada/nodes.lkt:13299
--# expr-start 7165 '<Not at nodes.lkt:13299:25>' Not_Val ada/nodes.lkt:13299
--# expr-start 7164 '<IsNull at nodes.lkt:13299:29>' Is_Null_1 ada/nodes.lkt:13299
Is_Null_1 := Local_Spec.Node = null; 
--# expr-done 7164
Not_Val := not (Is_Null_1); 
--# expr-done 7165
if Not_Val then
   --# expr-start 7168 '<FieldAccess for has_aspect at nodes.lkt:13300:29>' Fld_7 ada/nodes.lkt:13300
--# expr-start 7166 '<FieldAccess for defining_name at nodes.lkt:13300:29>' Fld_6 ada/nodes.lkt:13300
      if Local_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Local_Spec.Node, E_Info => Local_Spec.Info);
--# end
--# expr-done 7166
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7167 '<Symbol No_Elaboration_Code_All at nodes.lkt:13301:29>' Sym ada/nodes.lkt:13301
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_No_Elaboration_Code_All); 
--# expr-done 7167
--# property-call-start DefiningName.has_aspect
Fld_7 := Libadalang.Implementation.Defining_Name_P_Has_Aspect (Node => Fld_6.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Fld_6.Info);
--# end
--# expr-done 7168
   If_Result_3 := Fld_7;
else
   If_Result_3 := False;
end if;
--# expr-done 7169
Let_Result := If_Result_3; 
--# end
--# expr-done 7170
   If_Result_4 := Let_Result;
end if;
--# expr-done 7171
Let_Result_1 := If_Result_4; 
--# end
Scope_Result_3 := Let_Result_1;
   --# end
      Finalizer_Scope_2927;
            Match_Result := Scope_Result_3; 
         when Ada_Subunit =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_1 := Cast_Result_2; 
--# bind su Match_1
--# expr-start 7172 '<FieldAccess for root_unit at nodes.lkt:13306:37>' Fld_8 ada/nodes.lkt:13306
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.root_unit
Fld_8 := Libadalang.Implementation.Subunit_P_Root_Unit (Node => Match_1);
--# end
--# expr-done 7172
Var_Expr_195 := Fld_8;
if Var_Expr_195 /= No_Entity_Compilation_Unit then
   --# scope-start
--# expr-start 7173 '<FieldAccess for has_restriction at nodes.lkt:13306:37>' Fld_9 ada/nodes.lkt:13306
      if Var_Expr_195.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.has_restriction
Fld_9 := Libadalang.Implementation.Compilation_Unit_P_Has_Restriction (Node => Var_Expr_195.Node, Name => Name);
--# end
--# expr-done 7173
Scope_Result_2 := Fld_9;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
Let_Result_2 := Result_Var_2; 
--# end
Scope_Result_4 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Abort_Absent .. Ada_Iter_Type_Of | Ada_Limited_Absent .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_3 := raise Property_Error with "Unexpected CompilationUnit.f_body attribute"; 
--# end
Scope_Result_5 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 7174
   If_Result_5 := Match_Result;
else
   If_Result_5 := raise Property_Error with "Unsupported restriction";
end if;
--# expr-done 7175
         Property_Result := If_Result_5;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2927;
                     Finalizer_Scope_2929;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Has_Restriction;
--# end
--# property-start CompilationUnit.is_text_io_child ada/nodes.lkt:13316
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Is_Text_Io_Child
  (Node : Bare_Compilation_Unit
  )
   return Boolean
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Boolean;
            procedure Finalizer_Scope_1065 with Inline_Always;
      Local_Name_Parts : Symbol_Type_Array_Access;
Fld : Symbol_Type_Array_Access;
Len : Integer;
Is_Equal : Boolean;
Get_Result : Symbol_Type;
Sym : Symbol_Type;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Get_Result_1 : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Is_Equal_2 : Boolean;
Is_Equal_3 : Boolean;
If_Result_1 : Boolean;
Is_Equal_4 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Let_Result : Boolean;
            procedure Finalizer_Scope_1065 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Name_Parts);
            end Finalizer_Scope_1065;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7188 '<Let at nodes.lkt:13317:9>' Let_Result ada/nodes.lkt:13317
--# scope-start
--# expr-start 7176 '<FieldAccess for syntactic_fully_qualified_name at nodes.lkt:13317:26>' Fld ada/nodes.lkt:13317
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.syntactic_fully_qualified_name
Fld := Libadalang.Implementation.Compilation_Unit_P_Syntactic_Fully_Qualified_Name (Node => Self);
--# end
--# expr-done 7176
Local_Name_Parts := Fld; Inc_Ref (Local_Name_Parts);
--# bind name_parts Local_Name_Parts
--# expr-start 7187 '<BooleanBinaryOp And at nodes.lkt:13319:9>' If_Result_3 ada/nodes.lkt:13319
--# expr-start 7182 '<BooleanBinaryOp And at nodes.lkt:13319:9>' If_Result ada/nodes.lkt:13319
--# expr-start 7178 '<Eq at nodes.lkt:13319:9>' Is_Equal ada/nodes.lkt:13319
--# expr-start 7177 '<length at nodes.lkt:13319:9>' Len ada/nodes.lkt:13319
Len := Length (Local_Name_Parts); 
--# expr-done 7177
Is_Equal := Len = 3; 
--# expr-done 7178
if Is_Equal then
   --# expr-start 7181 '<Eq at nodes.lkt:13319:38>' Is_Equal_1 ada/nodes.lkt:13319
--# expr-start 7179 '<at at nodes.lkt:13319:38>' Get_Result ada/nodes.lkt:13319
Get_Result := Get (Self, Local_Name_Parts, 0, True); 
--# expr-done 7179
--# expr-start 7180 '<Symbol ada at nodes.lkt:13319:56>' Sym ada/nodes.lkt:13319
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada_320); 
--# expr-done 7180
Is_Equal_1 := Get_Result = Sym; 
--# expr-done 7181
   If_Result := Is_Equal_1;
else
   If_Result := False;
end if;
--# expr-done 7182
if If_Result then
   --# expr-start 7183 '<at at nodes.lkt:13320:13>' Get_Result_1 ada/nodes.lkt:13320
Get_Result_1 := Get (Self, Local_Name_Parts, 1, True); 
--# expr-done 7183
--# expr-start 7184 '<Symbol text_io at nodes.lkt:13320:31>' Sym_1 ada/nodes.lkt:13320
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Text_Io); 
--# expr-done 7184
Is_Equal_4 := Get_Result_1 = Sym_1; 
if Is_Equal_4 then
   If_Result_2 := True;
else
--# expr-start 7185 '<Symbol wide_text_io at nodes.lkt:13321:15>' Sym_2 ada/nodes.lkt:13321
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Text_Io); 
--# expr-done 7185
Is_Equal_3 := Get_Result_1 = Sym_2; 
if Is_Equal_3 then
   If_Result_1 := True;
else
--# expr-start 7186 '<Symbol wide_wide_text_io at nodes.lkt:13322:15>' Sym_3 ada/nodes.lkt:13322
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Text_Io); 
--# expr-done 7186
Is_Equal_2 := Get_Result_1 = Sym_3; 
   If_Result_1 := Is_Equal_2;
end if;
   If_Result_2 := If_Result_1;
end if;
   If_Result_3 := If_Result_2;
else
   If_Result_3 := False;
end if;
--# expr-done 7187
Let_Result := If_Result_3; 
--# end
--# expr-done 7188
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_1065;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1065;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Is_Text_Io_Child;
--# end
--# property-start CompilationUnit.local_config_pragmas ada/nodes.lkt:13332
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Local_Config_Pragmas
  (Node : Bare_Compilation_Unit
  )
   return Bare_Pragma_Node_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Bare_Pragma_Node_Array_Access;
            procedure Finalizer_Scope_1067 with Inline_Always;
      Fld : Bare_Ada_Node_List;
Item_0 : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Pragma_Node;
Is_A : Boolean;
Map_Result : Bare_Pragma_Node_Array_Access;
            procedure Finalizer_Scope_1067 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1067;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7192 '<Map at nodes.lkt:13333:9>' Map_Result ada/nodes.lkt:13333
   --# expr-start 7189 '<FieldAccess for prelude at nodes.lkt:13333:9>' Fld ada/nodes.lkt:13333
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Compilation_Unit_F_Prelude;
--# expr-done 7189
      declare
         Map_Result_Vec : Bare_Pragma_Node_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Bare_Pragma_Node_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind n Item_0
         --# expr-start 7190 '<IsA Pragma at nodes.lkt:13333:60>' Is_A ada/nodes.lkt:13333
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Pragma_Node_Range; 
--# expr-done 7190
         if Is_A then
      --# expr-start 7191 '<Cast to Pragma at nodes.lkt:13333:39>' Cast_Result ada/nodes.lkt:13333
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 7191
         declare
            Item_To_Append : constant Bare_Pragma_Node := Cast_Result;
         begin
            Bare_Pragma_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Pragma_Node_Array
           (Items_Count => Natural (Bare_Pragma_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Pragma_Node_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Pragma_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Pragma_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7192
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1067;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1067;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Local_Config_Pragmas;
--# end
--# property-start CompilationUnit.sources_config_pragmas ada/nodes.lkt:13337
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Sources_Config_Pragmas
  (Node : Bare_Compilation_Unit
      ; Include_Other_Part : Boolean
         := True
  )
   return Bare_Pragma_Node_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind include_other_part Include_Other_Part
   Property_Result : Bare_Pragma_Node_Array_Access;
            procedure Finalizer_Scope_1068 with Inline_Always;
            procedure Finalizer_Scope_2936 with Inline_Always;
            procedure Finalizer_Scope_2937 with Inline_Always;
      Local_Current_Unit : Bare_Pragma_Node_Array_Access;
Local_Related_Units : Bare_Pragma_Node_Array_Access;
Var_Expr_196 : Internal_Entity_Compilation_Unit;
Var_Expr_197 : Internal_Entity_Compilation_Unit;
Fld : Bare_Pragma_Node_Array_Access;
Fld_1 : Internal_Entity_Compilation_Unit;
Fld_2 : Bare_Pragma_Node_Array_Access;
Scope_Result : Bare_Pragma_Node_Array_Access;
Result_Var : Bare_Pragma_Node_Array_Access;
Fld_3 : Bare_Ada_Node;
Cast_Result : Bare_Subunit;
Fld_4 : Internal_Entity_Compilation_Unit;
Fld_5 : Bare_Pragma_Node_Array_Access;
Scope_Result_1 : Bare_Pragma_Node_Array_Access;
Result_Var_1 : Bare_Pragma_Node_Array_Access;
Fld_6 : Bare_Ada_Node;
Is_A : Boolean;
If_Result : Bare_Pragma_Node_Array_Access;
Fld_7 : Bare_Ada_Node;
Is_A_1 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Bare_Pragma_Node_Array_Access;
Concat_Result : Bare_Pragma_Node_Array_Access;
Let_Result : Bare_Pragma_Node_Array_Access;
Let_Result_1 : Bare_Pragma_Node_Array_Access;
            procedure Finalizer_Scope_1068 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Current_Unit);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Local_Related_Units);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1068;
            procedure Finalizer_Scope_2936 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2936;
            procedure Finalizer_Scope_2937 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2937;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7208 '<Let at nodes.lkt:13341:9>' Let_Result_1 ada/nodes.lkt:13341
--# scope-start
--# expr-start 7193 '<FieldAccess for local_config_pragmas at nodes.lkt:13341:28>' Fld ada/nodes.lkt:13341
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.local_config_pragmas
Fld := Libadalang.Implementation.Compilation_Unit_P_Local_Config_Pragmas (Node => Self);
--# end
--# expr-done 7193
Local_Current_Unit := Fld; Inc_Ref (Local_Current_Unit);
--# bind current_unit Local_Current_Unit
--# expr-start 7207 '<Let at nodes.lkt:13343:9>' Let_Result ada/nodes.lkt:13343
--# scope-start
--# expr-start 7206 '<If at nodes.lkt:13345:13>' If_Result_2 ada/nodes.lkt:13345
--# expr-start 7196 '<BooleanBinaryOp And at nodes.lkt:13345:16>' If_Result_1 ada/nodes.lkt:13345
if Include_Other_Part then
   --# expr-start 7195 '<IsA LibraryItem at nodes.lkt:13345:39>' Is_A_1 ada/nodes.lkt:13345
--# expr-start 7194 '<FieldAccess for body at nodes.lkt:13345:39>' Fld_7 ada/nodes.lkt:13345
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Self.Compilation_Unit_F_Body;
--# expr-done 7194
Is_A_1 := Fld_7 /= null 
and then Fld_7.Kind in Ada_Library_Item_Range; 
--# expr-done 7195
   If_Result_1 := Is_A_1;
else
   If_Result_1 := False;
end if;
--# expr-done 7196
if If_Result_1 then
--# expr-start 7197 '<FieldAccess for other_part at nodes.lkt:13346:18>' Fld_1 ada/nodes.lkt:13346
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.other_part
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Other_Part (Node => Self);
--# end
--# expr-done 7197
Var_Expr_196 := Fld_1;
if Var_Expr_196 /= No_Entity_Compilation_Unit then
   --# scope-start
--# expr-start 7198 '<FieldAccess for local_config_pragmas at nodes.lkt:13346:18>' Fld_2 ada/nodes.lkt:13346
      if Var_Expr_196.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.local_config_pragmas
Fld_2 := Libadalang.Implementation.Compilation_Unit_P_Local_Config_Pragmas (Node => Var_Expr_196.Node);
--# end
--# expr-done 7198
Scope_Result := Fld_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2936;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Pragma_Node_Array_Type;
end if;
      Inc_Ref (Result_Var);
   If_Result_2 := Result_Var;
else
   --# expr-start 7205 '<If at nodes.lkt:13345:13>' If_Result ada/nodes.lkt:13345
--# expr-start 7200 '<IsA Subunit at nodes.lkt:13350:18>' Is_A ada/nodes.lkt:13350
--# expr-start 7199 '<FieldAccess for body at nodes.lkt:13350:18>' Fld_6 ada/nodes.lkt:13350
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Compilation_Unit_F_Body;
--# expr-done 7199
Is_A := Fld_6 /= null 
and then Fld_6.Kind in Ada_Subunit_Range; 
--# expr-done 7200
if Is_A then
--# expr-start 7203 '<FieldAccess for root_unit at nodes.lkt:13352:17>' Fld_4 ada/nodes.lkt:13352
--# expr-start 7202 '<Cast to Subunit at nodes.lkt:13352:17>' Cast_Result ada/nodes.lkt:13352
--# expr-start 7201 '<FieldAccess for body at nodes.lkt:13352:17>' Fld_3 ada/nodes.lkt:13352
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Compilation_Unit_F_Body;
--# expr-done 7201
   if Fld_3 = null
      or else Fld_3.Kind in Ada_Subunit_Range
   then
      Cast_Result := Fld_3;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 7202
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.root_unit
Fld_4 := Libadalang.Implementation.Subunit_P_Root_Unit (Node => Cast_Result);
--# end
--# expr-done 7203
Var_Expr_197 := Fld_4;
if Var_Expr_197 /= No_Entity_Compilation_Unit then
   --# scope-start
--# expr-start 7204 '<FieldAccess for sources_config_pragmas at nodes.lkt:13352:17>' Fld_5 ada/nodes.lkt:13352
      if Var_Expr_197.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.sources_config_pragmas
Fld_5 := Libadalang.Implementation.Compilation_Unit_P_Sources_Config_Pragmas (Node => Var_Expr_197.Node, Include_Other_Part => Include_Other_Part);
--# end
--# expr-done 7204
Scope_Result_1 := Fld_5;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2937;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Bare_Pragma_Node_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
   If_Result := Result_Var_1;
else
   If_Result := No_Bare_Pragma_Node_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 7205
   If_Result_2 := If_Result;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 7206
Local_Related_Units := If_Result_2; Inc_Ref (Local_Related_Units);
--# bind related_units Local_Related_Units
Concat_Result := Concat (Local_Current_Unit, Local_Related_Units); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 7207
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 7208
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1068;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1068;
                     Finalizer_Scope_2936;
                     Finalizer_Scope_2937;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Sources_Config_Pragmas;
--# end
--# property-start CompilationUnit.all_config_pragmas ada/nodes.lkt:13363
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_All_Config_Pragmas
  (Node : Bare_Compilation_Unit
  )
   return Internal_Entity_Pragma_Node_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Pragma_Node_Array_Access;
            procedure Finalizer_Scope_1069 with Inline_Always;
      Fld : Bare_Pragma_Node_Array_Access;
Fld_1 : Bare_Pragma_Node_Array_Access;
Concat_Result : Bare_Pragma_Node_Array_Access;
As_Entity : Internal_Entity_Pragma_Node;
Is_Null : Boolean;
If_Result : Internal_Entity_Pragma_Node;
Map_Result : Internal_Entity_Pragma_Node_Array_Access;
            procedure Finalizer_Scope_1069 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1069;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7212 '<Map at nodes.lkt:13364:9>' Map_Result ada/nodes.lkt:13364
   --# expr-start 7209 '<FieldAccess for sources_config_pragmas at nodes.lkt:13364:10>' Fld ada/nodes.lkt:13364
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.sources_config_pragmas
Fld := Libadalang.Implementation.Compilation_Unit_P_Sources_Config_Pragmas (Node => Self);
--# end
--# expr-done 7209
--# expr-start 7210 '<FieldAccess for external_config_pragmas at nodes.lkt:13364:42>' Fld_1 ada/nodes.lkt:13364
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Compilation_Unit_P_External_Config_Pragmas (Node => Self);
--# expr-done 7210
Concat_Result := Concat (Fld, Fld_1); 
      declare
         Map_Result_Vec : Internal_Entity_Pragma_Node_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Pragma_Node_Array_Access := Concat_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
      --# expr-start 7211 '<as_bare_entity at nodes.lkt:13365:20>' If_Result ada/nodes.lkt:13365
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Pragma_Node;
else
As_Entity := (Info => No_Entity_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 7211
         declare
            Item_To_Append : constant Internal_Entity_Pragma_Node := If_Result;
         begin
            Internal_Entity_Pragma_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Pragma_Node_Array
           (Items_Count => Natural (Internal_Entity_Pragma_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Pragma_Node_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Pragma_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Pragma_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7212
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1069;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1069;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_All_Config_Pragmas;
--# end
--# property-start CompilationUnit.spark_config_pragma ada/nodes.lkt:13370
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Spark_Config_Pragma
  (Node : Bare_Compilation_Unit
  )
   return Internal_Entity_Pragma_Node
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Pragma_Node;
            procedure Finalizer_Scope_1070 with Inline_Always;
      Neg : Integer;
Fld : Bare_Pragma_Node_Array_Access;
Fld_1 : Bare_Pragma_Node_Array_Access;
Concat_Result : Bare_Pragma_Node_Array_Access;
As_Entity : Internal_Entity_Pragma_Node;
Is_Null : Boolean;
If_Result : Internal_Entity_Pragma_Node;
Fld_2 : Bare_Identifier;
Sym : Symbol_Type;
Fld_3 : Boolean;
Map_Result : Internal_Entity_Pragma_Node_Array_Access;
Get_Result : Internal_Entity_Pragma_Node;
            procedure Finalizer_Scope_1070 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1070;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7220 '<at at nodes.lkt:13371:9>' Get_Result ada/nodes.lkt:13371
--# expr-start 7219 '<Map at nodes.lkt:13371:9>' Map_Result ada/nodes.lkt:13371
   --# expr-start 7213 '<FieldAccess for external_config_pragmas at nodes.lkt:13372:13>' Fld ada/nodes.lkt:13372
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Compilation_Unit_P_External_Config_Pragmas (Node => Self);
--# expr-done 7213
--# expr-start 7214 '<FieldAccess for sources_config_pragmas at nodes.lkt:13373:15>' Fld_1 ada/nodes.lkt:13373
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.sources_config_pragmas
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Sources_Config_Pragmas (Node => Self, Include_Other_Part => False);
--# end
--# expr-done 7214
Concat_Result := Concat (Fld, Fld_1); 
      declare
         Map_Result_Vec : Internal_Entity_Pragma_Node_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Pragma_Node_Array_Access := Concat_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
         --# expr-start 7217 '<FieldAccess for name_is at nodes.lkt:13377:20>' Fld_3 ada/nodes.lkt:13377
--# expr-start 7215 '<FieldAccess for id at nodes.lkt:13377:20>' Fld_2 ada/nodes.lkt:13377
      if Item_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Item_0.Pragma_Node_F_Id;
--# expr-done 7215
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7216 '<Symbol SPARK_Mode at nodes.lkt:13377:33>' Sym ada/nodes.lkt:13377
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 7216
--# property-call-start Name.name_is
Fld_3 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_2, Sym => Sym);
--# end
--# expr-done 7217
         if Fld_3 then
      --# expr-start 7218 '<as_bare_entity at nodes.lkt:13376:20>' If_Result ada/nodes.lkt:13376
Is_Null := Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Pragma_Node;
else
As_Entity := (Info => No_Entity_Info, Node => Item_0); 
   If_Result := As_Entity;
end if;
--# expr-done 7218
         declare
            Item_To_Append : constant Internal_Entity_Pragma_Node := If_Result;
         begin
            Internal_Entity_Pragma_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Pragma_Node_Array
           (Items_Count => Natural (Internal_Entity_Pragma_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Pragma_Node_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Pragma_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Pragma_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7219
Neg := -1; 
Get_Result := Get (Self, Map_Result, Neg, True); 
--# expr-done 7220
         Property_Result := Get_Result;
   --# end
      Finalizer_Scope_1070;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1070;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Spark_Config_Pragma;
--# end
--# property-start CompilationUnit.config_pragmas ada/nodes.lkt:13385
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Config_Pragmas
  (Node : Bare_Compilation_Unit
      ; Name : Symbol_Type
  )
   return Internal_Entity_Pragma_Node_Array_Access
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind name Name
   Property_Result : Internal_Entity_Pragma_Node_Array_Access;
            procedure Finalizer_Scope_1071 with Inline_Always;
      Fld : Internal_Entity_Pragma_Node_Array_Access;
Fld_1 : Internal_Entity_Identifier;
Fld_2 : Symbol_Type;
Is_Equal : Boolean;
Map_Result : Internal_Entity_Pragma_Node_Array_Access;
            procedure Finalizer_Scope_1071 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1071;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7225 '<Map at nodes.lkt:13386:9>' Map_Result ada/nodes.lkt:13386
   --# expr-start 7221 '<FieldAccess for all_config_pragmas at nodes.lkt:13386:9>' Fld ada/nodes.lkt:13386
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.all_config_pragmas
Fld := Libadalang.Implementation.Compilation_Unit_P_All_Config_Pragmas (Node => Self);
--# end
--# expr-done 7221
      declare
         Map_Result_Vec : Internal_Entity_Pragma_Node_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Pragma_Node_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
         --# expr-start 7224 '<Eq at nodes.lkt:13386:49>' Is_Equal ada/nodes.lkt:13386
--# expr-start 7223 '<FieldAccess for name_symbol at nodes.lkt:13386:49>' Fld_2 ada/nodes.lkt:13386
--# expr-start 7222 '<FieldAccess for id at nodes.lkt:13386:49>' Fld_1 ada/nodes.lkt:13386
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Identifier (Node => Item_0.Node.Pragma_Node_F_Id, Info => Item_0.Info);
--# expr-done 7222
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_1.Node);
--# end
--# expr-done 7223
Is_Equal := Fld_2 = Name; 
--# expr-done 7224
         if Is_Equal then
         declare
            Item_To_Append : constant Internal_Entity_Pragma_Node := Item_0;
         begin
            Internal_Entity_Pragma_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Pragma_Node_Array
           (Items_Count => Natural (Internal_Entity_Pragma_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Pragma_Node_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Pragma_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Pragma_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7225
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1071;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1071;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Config_Pragmas;
--# end
--# property-start CompilationUnit.stub_for ada/nodes.lkt:13430
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Stub_For
  (Node : Bare_Compilation_Unit
      ; Su : Bare_Subunit
  )
   return Bare_Body_Stub
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind su Su
   Property_Result : Bare_Body_Stub;
      Fld : Bare_Body_Stub;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Compilation_Unit_Compilation_Unit_P_Stub_For,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Compilation_Unit,
                                As_Bare_Compilation_Unit => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Subunit,
                                      As_Bare_Subunit => Su);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Bare_Body_Stub;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7226 '<FieldAccess for stub_for_impl at nodes.lkt:13430:43>' Fld ada/nodes.lkt:13430
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Compilation_Unit_P_Stub_For_Impl (Node => Self, Su => Su);
--# expr-done 7226
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Bare_Body_Stub,
                        As_Bare_Body_Stub => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Compilation_Unit_P_Stub_For;
--# end
--# property-start CompilationUnit.has_private_view ada/nodes.lkt:13438
pragma Warnings (Off, "is not referenced");
 function Compilation_Unit_P_Has_Private_View
  (Node : Bare_Compilation_Unit
      ; Origin : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Compilation_Unit  := Bare_Compilation_Unit (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
            procedure Finalizer_Scope_1074 with Inline_Always;
      Local_Decl : Bare_Basic_Decl;
Var_Expr_198 : Bare_Library_Item;
Fld : Bare_Basic_Decl;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Library_Item;
Fld_2 : Bare_Private_Node;
Fld_3 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Is_A : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
Fld_4 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Fld_5 : Boolean;
If_Result_1 : Boolean;
Let_Result : Boolean;
            procedure Finalizer_Scope_1074 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_1074;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7239 '<Let at nodes.lkt:13439:9>' Let_Result ada/nodes.lkt:13439
--# scope-start
--# expr-start 7227 '<FieldAccess for decl at nodes.lkt:13439:20>' Fld ada/nodes.lkt:13439
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Self);
--# end
--# expr-done 7227
Local_Decl := Fld; 
--# bind decl Local_Decl
--# expr-start 7238 '<BooleanBinaryOp Or at nodes.lkt:13441:9>' If_Result_1 ada/nodes.lkt:13441
--# expr-start 7234 '<BooleanBinaryOp Or at nodes.lkt:13441:9>' If_Result ada/nodes.lkt:13441
--# expr-start 7229 '<Cast to LibraryItem at nodes.lkt:13443:13>' Cast_Result ada/nodes.lkt:13443
--# expr-start 7228 '<FieldAccess for body at nodes.lkt:13443:13>' Fld_1 ada/nodes.lkt:13443
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Compilation_Unit_F_Body;
--# expr-done 7228
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Library_Item_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 7229
Var_Expr_198 := Cast_Result;
if Var_Expr_198 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 7231 '<FieldAccess for as_bool at nodes.lkt:13443:13>' Fld_3 ada/nodes.lkt:13443
--# expr-start 7230 '<FieldAccess for has_private at nodes.lkt:13443:13>' Fld_2 ada/nodes.lkt:13443
      if Var_Expr_198 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_198.Library_Item_F_Has_Private;
--# expr-done 7230
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Private.as_bool'
Fld_3 := Libadalang.Implementation.Dispatcher_Private_Node_P_As_Bool (Node => Fld_2);
--# end
--# expr-done 7231
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   If_Result := True;
else
   --# expr-start 7233 '<Not at nodes.lkt:13449:13>' Not_Val ada/nodes.lkt:13449
--# expr-start 7232 '<IsA BasePackageDecl, GenericPackageDecl at nodes.lkt:13449:17>' Is_A ada/nodes.lkt:13449
Is_A := Local_Decl /= null 
and then Local_Decl.Kind in Ada_Base_Package_Decl | Ada_Generic_Package_Decl_Range; 
--# expr-done 7232
Not_Val := not (Is_A); 
--# expr-done 7233
   If_Result := Not_Val;
end if;
--# expr-done 7234
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 7237 '<FieldAccess for has_private_part_parent at nodes.lkt:13454:13>' Fld_5 ada/nodes.lkt:13454
      if Origin = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7236 '<env_node at nodes.lkt:13454:44>' Env_Node ada/nodes.lkt:13454
--# expr-start 7235 '<FieldAccess for children_env at nodes.lkt:13454:44>' Fld_4 ada/nodes.lkt:13454
      if Local_Decl = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Children_Env (Node => Local_Decl);
--# expr-done 7235
Env_Node := AST_Envs.Env_Node (Fld_4); 
--# expr-done 7236
--# property-call-start AdaNode.has_private_part_parent
Fld_5 := Libadalang.Implementation.Ada_Node_P_Has_Private_Part_Parent (Node => Origin, Barrier => Env_Node);
--# end
--# expr-done 7237
   If_Result_1 := Fld_5;
end if;
--# expr-done 7238
Let_Result := If_Result_1; 
--# end
--# expr-done 7239
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_1074;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1074;
            raise;
      end;
   return Property_Result;
end Compilation_Unit_P_Has_Private_View;
--# end
   --
   --  Primitives for Bare_Component_Clause
   --
      procedure Initialize_Fields_For_Component_Clause
        (Self : Bare_Component_Clause
         ; Component_Clause_F_Id : Bare_Identifier
         ; Component_Clause_F_Position : Bare_Expr
         ; Component_Clause_F_Range : Bare_Range_Spec
        ) is
      begin
            Self.Component_Clause_F_Id := Component_Clause_F_Id;
            Self.Component_Clause_F_Position := Component_Clause_F_Position;
            Self.Component_Clause_F_Range := Component_Clause_F_Range;
      end Initialize_Fields_For_Component_Clause;
   function Component_Clause_F_Id
     (Node : Bare_Component_Clause) return Bare_Identifier
   is
   begin
         return Node.Component_Clause_F_Id;
   end;
   function Component_Clause_F_Position
     (Node : Bare_Component_Clause) return Bare_Expr
   is
   begin
         return Node.Component_Clause_F_Position;
   end;
   function Component_Clause_F_Range
     (Node : Bare_Component_Clause) return Bare_Range_Spec
   is
   begin
         return Node.Component_Clause_F_Range;
   end;
--# property-start ComponentClause.xref_entry_point ada/nodes.lkt:13468
pragma Warnings (Off, "is not referenced");
 function Component_Clause_P_Xref_Entry_Point
  (Node : Bare_Component_Clause
  )
   return Boolean
is
   Self : Bare_Component_Clause  := Bare_Component_Clause (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Component_Clause_P_Xref_Entry_Point;
--# end
--# property-start ComponentClause.xref_equation ada/nodes.lkt:13471
pragma Warnings (Off, "is not referenced");
 function Component_Clause_P_Xref_Equation
  (Node : Bare_Component_Clause
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Component_Clause  := Bare_Component_Clause (Node);
     Ent : Internal_Entity_Component_Clause :=
       Internal_Entity_Component_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1076 with Inline_Always;
      Local_Rep_Clause : Internal_Entity_Record_Rep_Clause;
Local_Record_Env : Lexical_Env := Empty_Env;
Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Record_Rep_Clause;
Fld_2 : Internal_Entity_Name;
Fld_3 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_4 : Internal_Entity_Identifier;
Fld_5 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Fld_6 : Internal_Entity_Expr;
Fld_7 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_8 : Internal_Entity_Range_Spec;
Fld_9 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_1076 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Local_Record_Env);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1076;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7255 '<Let at nodes.lkt:13474:9>' Let_Result_1 ada/nodes.lkt:13474
--# scope-start
--# expr-start 7242 '<Cast to RecordRepClause at nodes.lkt:13474:26>' Cast_Result ada/nodes.lkt:13474
--# expr-start 7241 '<parent at nodes.lkt:13474:26>' Fld_1 ada/nodes.lkt:13474
--# expr-start 7240 '<parent at nodes.lkt:13474:26>' Fld ada/nodes.lkt:13474
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 7240
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 7241
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Record_Rep_Clause_Range
   then
      Cast_Result := Create_Internal_Entity_Record_Rep_Clause
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 7242
Local_Rep_Clause := Cast_Result; 
--# bind rep_clause Local_Rep_Clause
--# expr-start 7254 '<Let at nodes.lkt:13477:9>' Let_Result ada/nodes.lkt:13477
--# scope-start
--# expr-start 7244 '<FieldAccess for designated_env_no_overloading at nodes.lkt:13477:26>' Fld_3 ada/nodes.lkt:13477
--# expr-start 7243 '<FieldAccess for name at nodes.lkt:13477:26>' Fld_2 ada/nodes.lkt:13477
      if Local_Rep_Clause.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Local_Rep_Clause.Node.Record_Rep_Clause_F_Name, Info => Local_Rep_Clause.Info);
--# expr-done 7243
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env_no_overloading'
Fld_3 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env_No_Overloading (Node => Fld_2.Node, Env => Env, Origin => Origin, No_Visibility => False, E_Info => Fld_2.Info);
--# end
--# expr-done 7244
Local_Record_Env := Fld_3; Inc_Ref (Local_Record_Env);
--# bind record_env Local_Record_Env
--# expr-start 7253 '<LogicBinaryOp And at nodes.lkt:13479:9>' And_Pred_1 ada/nodes.lkt:13479
--# expr-start 7250 '<LogicBinaryOp And at nodes.lkt:13479:9>' And_Pred ada/nodes.lkt:13479
--# expr-start 7247 '<bind at nodes.lkt:13482:17>' Dyn_Var_Bind_Result ada/nodes.lkt:13482
Bound_Env := Local_Record_Env; Inc_Ref (Bound_Env);
--# expr-start 7246 '<FieldAccess for xref_equation at nodes.lkt:13484:17>' Fld_5 ada/nodes.lkt:13484
--# expr-start 7245 '<FieldAccess for id at nodes.lkt:13484:17>' Fld_4 ada/nodes.lkt:13484
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Identifier (Node => Ent.Node.Component_Clause_F_Id, Info => Ent.Info);
--# expr-done 7245
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_5 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld_4.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_4.Info);
--# end
--# expr-done 7246
Dyn_Var_Bind_Result := Fld_5; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7247
--# expr-start 7249 '<FieldAccess for sub_equation at nodes.lkt:13487:14>' Fld_7 ada/nodes.lkt:13487
--# expr-start 7248 '<FieldAccess for position at nodes.lkt:13487:14>' Fld_6 ada/nodes.lkt:13487
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Ent.Node.Component_Clause_F_Position, Info => Ent.Info);
--# expr-done 7248
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_6.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_6.Info);
--# end
--# expr-done 7249
And_Pred := Create_And (Dyn_Var_Bind_Result, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13479:9") else null)); 
--# expr-done 7250
--# expr-start 7252 '<FieldAccess for sub_equation at nodes.lkt:13488:14>' Fld_9 ada/nodes.lkt:13488
--# expr-start 7251 '<FieldAccess for range at nodes.lkt:13488:14>' Fld_8 ada/nodes.lkt:13488
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Component_Clause_F_Range, Info => Ent.Info);
--# expr-done 7251
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_9 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_8.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_8.Info);
--# end
--# expr-done 7252
And_Pred_1 := Create_And (And_Pred, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13479:9") else null)); 
--# expr-done 7253
Let_Result := And_Pred_1; Inc_Ref (Let_Result);
--# end
--# expr-done 7254
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 7255
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1076;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1076;
            raise;
      end;
   return Property_Result;
end Component_Clause_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Component_Def
   --
      procedure Initialize_Fields_For_Component_Def
        (Self : Bare_Component_Def
         ; Component_Def_F_Has_Aliased : Bare_Aliased_Node
         ; Component_Def_F_Has_Constant : Bare_Constant_Node
         ; Component_Def_F_Type_Expr : Bare_Type_Expr
        ) is
      begin
            Self.Component_Def_F_Has_Aliased := Component_Def_F_Has_Aliased;
            Self.Component_Def_F_Has_Constant := Component_Def_F_Has_Constant;
            Self.Component_Def_F_Type_Expr := Component_Def_F_Type_Expr;
      end Initialize_Fields_For_Component_Def;
   function Component_Def_F_Has_Aliased
     (Node : Bare_Component_Def) return Bare_Aliased_Node
   is
   begin
         return Node.Component_Def_F_Has_Aliased;
   end;
   function Component_Def_F_Has_Constant
     (Node : Bare_Component_Def) return Bare_Constant_Node
   is
   begin
         return Node.Component_Def_F_Has_Constant;
   end;
   function Component_Def_F_Type_Expr
     (Node : Bare_Component_Def) return Bare_Type_Expr
   is
   begin
         return Node.Component_Def_F_Type_Expr;
   end;
--# property-start ComponentDef.xref_equation ada/nodes.lkt:13502
pragma Warnings (Off, "is not referenced");
 function Component_Def_P_Xref_Equation
  (Node : Bare_Component_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Component_Def  := Bare_Component_Def (Node);
     Ent : Internal_Entity_Component_Def :=
       Internal_Entity_Component_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1077 with Inline_Always;
      Fld : Internal_Entity_Type_Expr;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1077 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1077;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7257 '<FieldAccess for sub_equation at nodes.lkt:13502:37>' Fld_1 ada/nodes.lkt:13502
--# expr-start 7256 '<FieldAccess for type_expr at nodes.lkt:13502:37>' Fld ada/nodes.lkt:13502
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Type_Expr (Node => Ent.Node.Component_Def_F_Type_Expr, Info => Ent.Info);
--# expr-done 7256
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 7257
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1077;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1077;
            raise;
      end;
   return Property_Result;
end Component_Def_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Constant_Node
   --
--# property-start '[dispatcher]Constant.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Constant_Node_P_As_Bool
  (Node : Bare_Constant_Node
  )
   return Boolean
is
   Self : Bare_Constant_Node  := Bare_Constant_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Constant_Node (Self.Kind) is
               when Ada_Constant_Absent =>
                  --# property-call-start Constant.Absent.as_bool
                  Property_Result := Constant_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Constant_Present =>
                  --# property-call-start Constant.Present.as_bool
                  Property_Result := Constant_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Constant_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Constant_Absent
   --
--# property-start Constant.Absent.as_bool ada/nodes.lkt:13507
pragma Warnings (Off, "is not referenced");
 function Constant_Absent_P_As_Bool
  (Node : Bare_Constant_Absent
  )
   return Boolean
is
   Self : Bare_Constant_Absent  := Bare_Constant_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Constant_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Constant_Present
   --
--# property-start Constant.Present.as_bool ada/nodes.lkt:13507
pragma Warnings (Off, "is not referenced");
 function Constant_Present_P_As_Bool
  (Node : Bare_Constant_Present
  )
   return Boolean
is
   Self : Bare_Constant_Present  := Bare_Constant_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Constant_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Constraint
   --
--# property-start Constraint.subtype ada/nodes.lkt:13513
pragma Warnings (Off, "is not referenced");
 function Constraint_P_Subtype
  (Node : Bare_Constraint
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Constraint  := Bare_Constraint (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Subtype_Indication;
As_Entity : Internal_Entity_Subtype_Indication;
Is_Null : Boolean;
If_Result : Internal_Entity_Subtype_Indication;
Fld_2 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7263 '<bind at nodes.lkt:13514:9>' Dyn_Var_Bind_Result ada/nodes.lkt:13514
--# expr-start 7258 '<FieldAccess for origin_node at nodes.lkt:13514:23>' Fld ada/nodes.lkt:13514
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 7258
Bound_Origin := Fld; 
--# expr-start 7262 '<FieldAccess for designated_type at nodes.lkt:13516:9>' Fld_2 ada/nodes.lkt:13516
--# expr-start 7261 '<as_entity at nodes.lkt:13516:9>' If_Result ada/nodes.lkt:13516
--# expr-start 7260 '<Cast to SubtypeIndication at nodes.lkt:13516:9>' Cast_Result ada/nodes.lkt:13516
--# expr-start 7259 '<parent at nodes.lkt:13516:9>' Fld_1 ada/nodes.lkt:13516
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Parent; 
--# expr-done 7259
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Subtype_Indication_Range
   then
      Cast_Result := Fld_1;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 7260
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Subtype_Indication;
else
As_Entity := (Info => E_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 7261
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => If_Result.Node, Origin => Bound_Origin, E_Info => If_Result.Info);
--# end
--# expr-done 7262
Dyn_Var_Bind_Result := Fld_2; 
--# expr-done 7263
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Constraint_P_Subtype;
--# end
--# property-start Constraint.is_static ada/nodes.lkt:13520
pragma Warnings (Off, "is not referenced");
 function Constraint_P_Is_Static
  (Node : Bare_Constraint
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Constraint  := Bare_Constraint (Node);
     Ent : Internal_Entity_Constraint :=
       Internal_Entity_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Match_0 : Internal_Entity_Range_Constraint;
Match_1 : Internal_Entity_Composite_Constraint;
Match_0_1 : Internal_Entity_Subtype_Indication;
Match_1_1 : Internal_Entity_Expr;
Match_2 : Internal_Entity;
Match_2_1 : Internal_Entity_Digits_Constraint;
Var_Expr_2 : Internal_Entity_Range_Spec;
Match_3 : Internal_Entity_Delta_Constraint;
Var_Expr_3 : Internal_Entity_Range_Spec;
Fld : Internal_Entity_Range_Spec;
Fld_1 : Internal_Entity_Expr;
Fld_2 : Boolean;
Fld_3 : Internal_Entity_Assoc_List;
Fld_4 : Bare_Assoc_List;
Fld_5 : Internal_Entity_Info;
Item_1 : Internal_Entity_Basic_Assoc;
Bare_Item_1 : Bare_Basic_Assoc;
Cast_Expr : Internal_Entity_Basic_Assoc;
Cast_Result : Internal_Entity_Composite_Constraint_Assoc;
Fld_6 : Internal_Entity;
Fld_7 : Boolean;
Fld_8 : Boolean;
Match_Prefix : Internal_Entity;
Cast_Result_1 : Internal_Entity_Subtype_Indication;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_2 : Internal_Entity_Expr;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_3 : Internal_Entity;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Match_Result : Boolean;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Quantifier_Result : Boolean;
Fld_9 : Internal_Entity_Assoc_List;
Fld_10 : Bare_Assoc_List;
Fld_11 : Internal_Entity_Info;
Item_0 : Internal_Entity_Basic_Assoc;
Bare_Item_0 : Bare_Basic_Assoc;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Boolean;
As_Entity_1 : Internal_Entity_Basic_Assoc;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Assoc;
Quantifier_Result_1 : Boolean;
Fld_14 : Boolean;
If_Result_2 : Boolean;
Fld_15 : Internal_Entity_Range_Spec;
Fld_16 : Internal_Entity_Expr;
Fld_17 : Boolean;
Scope_Result_3 : Boolean;
Result_Var : Boolean;
Fld_18 : Internal_Entity_Range_Spec;
Fld_19 : Internal_Entity_Expr;
Fld_20 : Boolean;
Scope_Result_4 : Boolean;
Result_Var_1 : Boolean;
Match_Prefix_1 : Internal_Entity_Constraint;
Cast_Result_4 : Internal_Entity_Range_Constraint;
Let_Result_3 : Boolean;
Scope_Result_5 : Boolean;
Cast_Result_5 : Internal_Entity_Composite_Constraint;
Let_Result_4 : Boolean;
Scope_Result_6 : Boolean;
Cast_Result_6 : Internal_Entity_Digits_Constraint;
Let_Result_5 : Boolean;
Scope_Result_7 : Boolean;
Cast_Result_7 : Internal_Entity_Delta_Constraint;
Let_Result_6 : Boolean;
Scope_Result_8 : Boolean;
Match_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7286 '<Match at nodes.lkt:13520:29>' Match_Result_1 ada/nodes.lkt:13520
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Ent; 
case Ada_Constraint (Match_Prefix_1.Node.Kind) is
         when Ada_Range_Constraint =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Range_Constraint
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_0 := Cast_Result_4; 
--# bind rc Match_0
--# expr-start 7266 '<FieldAccess for is_static_expr at nodes.lkt:13521:37>' Fld_2 ada/nodes.lkt:13521
--# expr-start 7265 '<FieldAccess for range at nodes.lkt:13521:37>' Fld_1 ada/nodes.lkt:13521
--# expr-start 7264 '<FieldAccess for range at nodes.lkt:13521:37>' Fld ada/nodes.lkt:13521
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Range_Spec (Node => Match_0.Node.Range_Constraint_F_Range, Info => Match_0.Info);
--# expr-done 7264
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Expr (Node => Fld.Node.Range_Spec_F_Range, Info => Fld.Info);
--# expr-done 7265
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_2 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_1.Info);
--# end
--# expr-done 7266
Let_Result_3 := Fld_2; 
--# end
Scope_Result_5 := Let_Result_3;
   --# end
            Match_Result_1 := Scope_Result_5; 
         when Ada_Composite_Constraint =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Composite_Constraint
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_1 := Cast_Result_5; 
--# bind cc Match_1
--# expr-start 7279 '<If at nodes.lkt:13523:13>' If_Result_2 ada/nodes.lkt:13523
--# expr-start 7267 '<FieldAccess for is_index_constraint at nodes.lkt:13523:16>' Fld_14 ada/nodes.lkt:13523
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompositeConstraint.is_index_constraint
Fld_14 := Libadalang.Implementation.Composite_Constraint_P_Is_Index_Constraint (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 7267
if Fld_14 then
   --# expr-start 7274 '<AllQuantifier at nodes.lkt:13525:17>' Quantifier_Result ada/nodes.lkt:13525
   --# expr-start 7268 '<FieldAccess for constraints at nodes.lkt:13525:17>' Fld_3 ada/nodes.lkt:13525
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Assoc_List (Node => Match_1.Node.Composite_Constraint_F_Constraints, Info => Match_1.Info);
--# expr-done 7268
Fld_4 := Fld_3.Node;
      Quantifier_Result := True;
      if Fld_4 = null then
      null;
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_4;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_5 := Fld_3.Info;
As_Entity := (Info => Fld_5, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind c Item_1
      --# expr-start 7273 '<Match at nodes.lkt:13527:21>' Match_Result ada/nodes.lkt:13527
--# expr-start 7270 '<FieldAccess for constraint_expr at nodes.lkt:13527:27>' Fld_6 ada/nodes.lkt:13527
--# expr-start 7269 '<Cast to CompositeConstraintAssoc at nodes.lkt:13527:27>' Cast_Result ada/nodes.lkt:13527
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Composite_Constraint_Assoc_Range
   then
      Cast_Result := Create_Internal_Entity_Composite_Constraint_Assoc
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Composite_Constraint_Assoc;
   end if;
--# expr-done 7269
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity (Node => Cast_Result.Node.Composite_Constraint_Assoc_F_Constraint_Expr, Info => Cast_Result.Info);
--# expr-done 7270
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_6; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0_1 := Cast_Result_1; 
--# bind st Match_0_1
--# expr-start 7271 '<FieldAccess for is_static_subtype at nodes.lkt:13528:55>' Fld_7 ada/nodes.lkt:13528
      if Match_0_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubtypeIndication.is_static_subtype
Fld_7 := Libadalang.Implementation.Subtype_Indication_P_Is_Static_Subtype (Node => Match_0_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_0_1.Info);
--# end
--# expr-done 7271
Let_Result := Fld_7; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1_1 := Cast_Result_2; 
--# bind e Match_1_1
--# expr-start 7272 '<FieldAccess for is_static_expr at nodes.lkt:13529:41>' Fld_8 ada/nodes.lkt:13529
      if Match_1_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_8 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Match_1_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_1_1.Info);
--# end
--# expr-done 7272
Let_Result_1 := Fld_8; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Elsif_Stmt_Part | Ada_For_Loop_Iter_Filter .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := False; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 7273
      Quantifier_Result := Match_Result;
   --# end
               exit when not Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 7274
   If_Result_2 := Quantifier_Result;
else
   --# expr-start 7278 '<AllQuantifier at nodes.lkt:13533:18>' Quantifier_Result_1 ada/nodes.lkt:13533
   --# expr-start 7275 '<FieldAccess for constraints at nodes.lkt:13533:18>' Fld_9 ada/nodes.lkt:13533
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Assoc_List (Node => Match_1.Node.Composite_Constraint_F_Constraints, Info => Match_1.Info);
--# expr-done 7275
Fld_10 := Fld_9.Node;
      Quantifier_Result_1 := True;
      if Fld_10 = null then
      null;
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_10;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Basic_Assoc;
else
Fld_11 := Fld_9.Info;
As_Entity_1 := (Info => Fld_11, Node => Bare_Item_0); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind c Item_0
      --# expr-start 7277 '<FieldAccess for is_static_expr at nodes.lkt:13533:44>' Fld_13 ada/nodes.lkt:13533
--# expr-start 7276 '<FieldAccess for expr at nodes.lkt:13533:44>' Fld_12 ada/nodes.lkt:13533
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 7276
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_13 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_12.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_12.Info);
--# end
--# expr-done 7277
      Quantifier_Result_1 := Fld_13;
   --# end
               exit when not Quantifier_Result_1;
         end loop;
      end;
      end if;
--# expr-done 7278
   If_Result_2 := Quantifier_Result_1;
end if;
--# expr-done 7279
Let_Result_4 := If_Result_2; 
--# end
Scope_Result_6 := Let_Result_4;
   --# end
            Match_Result_1 := Scope_Result_6; 
         when Ada_Digits_Constraint =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Digits_Constraint
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_2_1 := Cast_Result_6; 
--# bind dc Match_2_1
--# expr-start 7280 '<FieldAccess for range at nodes.lkt:13535:13>' Fld_15 ada/nodes.lkt:13535
      if Match_2_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Range_Spec (Node => Match_2_1.Node.Digits_Constraint_F_Range, Info => Match_2_1.Info);
--# expr-done 7280
Var_Expr_2 := Fld_15;
if Var_Expr_2 /= No_Entity_Range_Spec then
   --# scope-start
   --# bind range Var_Expr_2
--# expr-start 7282 '<FieldAccess for is_static_expr at nodes.lkt:13536:28>' Fld_17 ada/nodes.lkt:13536
--# expr-start 7281 '<FieldAccess for range at nodes.lkt:13536:28>' Fld_16 ada/nodes.lkt:13536
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Create_Internal_Entity_Expr (Node => Var_Expr_2.Node.Range_Spec_F_Range, Info => Var_Expr_2.Info);
--# expr-done 7281
      if Fld_16.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_17 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_16.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_16.Info);
--# end
--# expr-done 7282
Scope_Result_3 := Fld_17;
   --# end
   Result_Var := Scope_Result_3;
else
   Result_Var := True;
end if;
Let_Result_5 := Result_Var; 
--# end
Scope_Result_7 := Let_Result_5;
   --# end
            Match_Result_1 := Scope_Result_7; 
         when Ada_Delta_Constraint =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Delta_Constraint
        (Node => Match_Prefix_1.Node,
         Info => Match_Prefix_1.Info);
Match_3 := Cast_Result_7; 
--# bind dc Match_3
--# expr-start 7283 '<FieldAccess for range at nodes.lkt:13540:13>' Fld_18 ada/nodes.lkt:13540
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Create_Internal_Entity_Range_Spec (Node => Match_3.Node.Delta_Constraint_F_Range, Info => Match_3.Info);
--# expr-done 7283
Var_Expr_3 := Fld_18;
if Var_Expr_3 /= No_Entity_Range_Spec then
   --# scope-start
   --# bind range Var_Expr_3
--# expr-start 7285 '<FieldAccess for is_static_expr at nodes.lkt:13541:28>' Fld_20 ada/nodes.lkt:13541
--# expr-start 7284 '<FieldAccess for range at nodes.lkt:13541:28>' Fld_19 ada/nodes.lkt:13541
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Expr (Node => Var_Expr_3.Node.Range_Spec_F_Range, Info => Var_Expr_3.Info);
--# expr-done 7284
      if Fld_19.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_20 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_19.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_19.Info);
--# end
--# expr-done 7285
Scope_Result_4 := Fld_20;
   --# end
   Result_Var_1 := Scope_Result_4;
else
   Result_Var_1 := True;
end if;
Let_Result_6 := Result_Var_1; 
--# end
Scope_Result_8 := Let_Result_6;
   --# end
            Match_Result_1 := Scope_Result_8; 
end case;
--# expr-done 7286
         Property_Result := Match_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Constraint_P_Is_Static;
--# end
   --
   --  Primitives for Bare_Composite_Constraint
   --
      procedure Initialize_Fields_For_Composite_Constraint
        (Self : Bare_Composite_Constraint
         ; Composite_Constraint_F_Constraints : Bare_Assoc_List
        ) is
      begin
            Self.Composite_Constraint_F_Constraints := Composite_Constraint_F_Constraints;
      end Initialize_Fields_For_Composite_Constraint;
   function Composite_Constraint_F_Constraints
     (Node : Bare_Composite_Constraint) return Bare_Assoc_List
   is
   begin
         return Node.Composite_Constraint_F_Constraints;
   end;
--# property-start CompositeConstraint.is_index_constraint ada/nodes.lkt:13557
pragma Warnings (Off, "is not referenced");
 function Composite_Constraint_P_Is_Index_Constraint
  (Node : Bare_Composite_Constraint
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Composite_Constraint  := Bare_Composite_Constraint (Node);
     Ent : Internal_Entity_Composite_Constraint :=
       Internal_Entity_Composite_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Boolean;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7295 '<BooleanBinaryOp Or at nodes.lkt:13558:9>' If_Result_1 ada/nodes.lkt:13558
--# expr-start 7288 '<FieldAccess for is_array_type at nodes.lkt:13558:9>' Fld_1 ada/nodes.lkt:13558
--# expr-start 7287 '<FieldAccess for subtype at nodes.lkt:13558:9>' Fld ada/nodes.lkt:13558
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.subtype
Fld := Libadalang.Implementation.Constraint_P_Subtype (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7287
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_array_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Is_Array_Type (Node => Fld.Node, Origin => No_Bare_Ada_Node, E_Info => Fld.Info);
--# end
--# expr-done 7288
if Fld_1 then
   If_Result_1 := True;
else
   --# expr-start 7294 '<BooleanBinaryOp And at nodes.lkt:13560:13>' If_Result ada/nodes.lkt:13560
--# expr-start 7290 '<FieldAccess for is_access_type at nodes.lkt:13560:13>' Fld_3 ada/nodes.lkt:13560
--# expr-start 7289 '<FieldAccess for subtype at nodes.lkt:13560:13>' Fld_2 ada/nodes.lkt:13560
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.subtype
Fld_2 := Libadalang.Implementation.Constraint_P_Subtype (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7289
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_access_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Access_Type (Node => Fld_2.Node, Origin => No_Bare_Ada_Node, E_Info => Fld_2.Info);
--# end
--# expr-done 7290
if Fld_3 then
   --# expr-start 7293 '<FieldAccess for is_array_type at nodes.lkt:13561:17>' Fld_6 ada/nodes.lkt:13561
--# expr-start 7292 '<FieldAccess for accessed_type at nodes.lkt:13561:17>' Fld_5 ada/nodes.lkt:13561
--# expr-start 7291 '<FieldAccess for subtype at nodes.lkt:13561:17>' Fld_4 ada/nodes.lkt:13561
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.subtype
Fld_4 := Libadalang.Implementation.Constraint_P_Subtype (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7291
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Fld_4.Node, Origin => No_Bare_Ada_Node, E_Info => Fld_4.Info);
--# end
--# expr-done 7292
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_array_type
Fld_6 := Libadalang.Implementation.Base_Type_Decl_P_Is_Array_Type (Node => Fld_5.Node, Origin => No_Bare_Ada_Node, E_Info => Fld_5.Info);
--# end
--# expr-done 7293
   If_Result := Fld_6;
else
   If_Result := False;
end if;
--# expr-done 7294
   If_Result_1 := If_Result;
end if;
--# expr-done 7295
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Composite_Constraint_P_Is_Index_Constraint;
--# end
--# property-start CompositeConstraint.complete_item_weight ada/nodes.lkt:13565
pragma Warnings (Off, "is not referenced");
 function Composite_Constraint_P_Complete_Item_Weight
  (Node : Bare_Composite_Constraint
      ; Item : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Composite_Constraint  := Bare_Composite_Constraint (Node);
     Ent : Internal_Entity_Composite_Constraint :=
       Internal_Entity_Composite_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind item Item
   --# bind origin Origin
   Property_Result : Integer;
            procedure Finalizer_Scope_1084 with Inline_Always;
      Var_Expr_199 : Internal_Entity_Enum_Literal_Decl;
Fld : Integer;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_3 : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Enum_Literal_Decl;
Fld_4 : Internal_Entity_Type_Decl;
Scope_Result : Internal_Entity_Type_Decl;
Result_Var : Internal_Entity_Type_Decl;
Cast_Result_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
If_Result : Integer;
            procedure Finalizer_Scope_1084 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1084;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7304 '<If at nodes.lkt:13568:9>' If_Result ada/nodes.lkt:13568
--# expr-start 7302 '<AnyQuantifier at nodes.lkt:13569:13>' Quantifier_Result ada/nodes.lkt:13569
   --# expr-start 7297 '<FieldAccess for discriminants_list at nodes.lkt:13569:13>' Fld_2 ada/nodes.lkt:13569
--# expr-start 7296 '<FieldAccess for subtype at nodes.lkt:13569:13>' Fld_1 ada/nodes.lkt:13569
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.subtype
Fld_1 := Libadalang.Implementation.Constraint_P_Subtype (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7296
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Fld_1.Node, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 7297
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Base_Formal_Param_Decl_Array_Access := Fld_2;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind td Item_0
      --# expr-start 7301 '<Eq at nodes.lkt:13571:17>' Is_Equiv ada/nodes.lkt:13571
--# expr-start 7298 '<FieldAccess for formal_type at nodes.lkt:13571:17>' Fld_3 ada/nodes.lkt:13571
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Item_0.Node, Origin => Origin, E_Info => Item_0.Info);
--# end
--# expr-done 7298
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
--# expr-start 7299 '<Cast to EnumLiteralDecl at nodes.lkt:13571:37>' Cast_Result ada/nodes.lkt:13571
Cast_Expr := Item; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Enum_Literal_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Enum_Literal_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Enum_Literal_Decl;
   end if;
--# expr-done 7299
Var_Expr_199 := Cast_Result;
if Var_Expr_199 /= No_Entity_Enum_Literal_Decl then
   --# scope-start
--# expr-start 7300 '<FieldAccess for enum_type at nodes.lkt:13571:37>' Fld_4 ada/nodes.lkt:13571
      if Var_Expr_199.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]EnumLiteralDecl.enum_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Enum_Literal_Decl_P_Enum_Type (Node => Var_Expr_199.Node, E_Info => Var_Expr_199.Info);
--# end
--# expr-done 7300
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Type_Decl;
end if;
      Cast_Result_2 := Create_Internal_Entity
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 7301
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 7302
if Quantifier_Result then
   If_Result := 100;
else
   --# expr-start 7303 '<Super at nodes.lkt:13574:14>' Fld ada/nodes.lkt:13574
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.complete_item_weight
Fld := Libadalang.Implementation.Ada_Node_P_Complete_Item_Weight (Node => Ent.Node, Item => Item, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 7303
   If_Result := Fld;
end if;
--# expr-done 7304
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_1084;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1084;
            raise;
      end;
   return Property_Result;
end Composite_Constraint_P_Complete_Item_Weight;
--# end
--# property-start CompositeConstraint.is_discriminant_constraint ada/nodes.lkt:13578
pragma Warnings (Off, "is not referenced");
 function Composite_Constraint_P_Is_Discriminant_Constraint
  (Node : Bare_Composite_Constraint
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Composite_Constraint  := Bare_Composite_Constraint (Node);
     Ent : Internal_Entity_Composite_Constraint :=
       Internal_Entity_Composite_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7306 '<Not at nodes.lkt:13578:46>' Not_Val ada/nodes.lkt:13578
--# expr-start 7305 '<FieldAccess for is_index_constraint at nodes.lkt:13578:50>' Fld ada/nodes.lkt:13578
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompositeConstraint.is_index_constraint
Fld := Libadalang.Implementation.Composite_Constraint_P_Is_Index_Constraint (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7305
Not_Val := not (Fld); 
--# expr-done 7306
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Composite_Constraint_P_Is_Discriminant_Constraint;
--# end
--# property-start CompositeConstraint.xref_equation ada/nodes.lkt:13581
pragma Warnings (Off, "is not referenced");
 function Composite_Constraint_P_Xref_Equation
  (Node : Bare_Composite_Constraint
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Composite_Constraint  := Bare_Composite_Constraint (Node);
     Ent : Internal_Entity_Composite_Constraint :=
       Internal_Entity_Composite_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1086 with Inline_Always;
            procedure Finalizer_Scope_2955 with Inline_Always;
            procedure Finalizer_Scope_2956 with Inline_Always;
            procedure Finalizer_Scope_2957 with Inline_Always;
            procedure Finalizer_Scope_2958 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Bare_Base_Id;
Local_Ex : Internal_Entity;
Var_Expr_4 : Internal_Entity_Expr;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Assoc_List;
Fld_2 : Bare_Assoc_List;
Fld_3 : Internal_Entity_Info;
Item_2 : Internal_Entity_Basic_Assoc;
Bare_Item_2 : Bare_Basic_Assoc;
Index_3 : Integer;
Cast_Expr : Internal_Entity_Basic_Assoc;
Cast_Result : Internal_Entity_Composite_Constraint_Assoc;
Fld_4 : Internal_Entity;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Expr;
Fld_5 : Logic_Var;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Fld_8 : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Fld_9 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_10 : Internal_Entity_Assoc_List;
Fld_11 : Internal_Param_Match_Array_Access;
Fld_12 : Internal_Single_Actual;
Fld_13 : Internal_Entity_Basic_Assoc;
Fld_14 : Internal_Entity_Expr;
Fld_15 : Logic_Var;
Fld_16 : Internal_Entity_Defining_Name;
Fld_17 : Internal_Entity_Base_Formal_Param_Decl;
Fld_18 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_19 : Internal_Single_Actual;
Fld_20 : Internal_Entity_Basic_Assoc;
Fld_21 : Internal_Entity_Expr;
Fld_22 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_23 : Internal_Single_Actual;
Fld_24 : Internal_Entity_Basic_Assoc;
Fld_25 : Internal_Entity_Expr;
Fld_26 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_27 : Internal_Single_Actual;
Fld_28 : Bare_Base_Id;
Fld_29 : Logic_Var;
Fld_30 : Internal_Entity_Defining_Name;
Fld_31 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_4 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
Fld_32 : Boolean;
If_Result_1 : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_1086 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1086;
            procedure Finalizer_Scope_2955 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_8);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_2955;
            procedure Finalizer_Scope_2956 is
            begin
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_2956;
            procedure Finalizer_Scope_2957 is
            begin
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_22);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_26);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_2957;
            procedure Finalizer_Scope_2958 is
            begin
                     Dec_Ref (Bind_Result_2);
            end Finalizer_Scope_2958;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7353 '<Let at nodes.lkt:13582:9>' Let_Result_1 ada/nodes.lkt:13582
--# scope-start
--# expr-start 7307 '<FieldAccess for subtype at nodes.lkt:13582:19>' Fld ada/nodes.lkt:13582
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.subtype
Fld := Libadalang.Implementation.Constraint_P_Subtype (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7307
Local_Typ := Fld; 
--# bind typ Local_Typ
--# expr-start 7352 '<If at nodes.lkt:13584:9>' If_Result_1 ada/nodes.lkt:13584
--# expr-start 7308 '<FieldAccess for is_index_constraint at nodes.lkt:13584:12>' Fld_32 ada/nodes.lkt:13584
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompositeConstraint.is_index_constraint
Fld_32 := Libadalang.Implementation.Composite_Constraint_P_Is_Index_Constraint (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7308
if Fld_32 then
   --# expr-start 7321 '<LogicAll at nodes.lkt:13586:13>' Logic_Boolean_Op ada/nodes.lkt:13586
--# expr-start 7320 '<Map at nodes.lkt:13586:13>' Map_Result ada/nodes.lkt:13586
   --# expr-start 7309 '<FieldAccess for constraints at nodes.lkt:13586:13>' Fld_1 ada/nodes.lkt:13586
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Composite_Constraint_F_Constraints, Info => Ent.Info);
--# expr-done 7309
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
         Index_3 := 0;
      declare
         Collection : constant Bare_Assoc_List := Fld_2;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_2 := Untyped_Item_2; 
Is_Null := Bare_Item_2 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_2); 
   If_Result := As_Entity;
end if;
                  Item_2 := If_Result; 
   --# scope-start
               --# bind c Item_2
               --# bind i Index_3
      --# expr-start 7319 '<Let at nodes.lkt:13588:21>' Let_Result ada/nodes.lkt:13588
--# scope-start
--# expr-start 7311 '<FieldAccess for constraint_expr at nodes.lkt:13588:30>' Fld_4 ada/nodes.lkt:13588
--# expr-start 7310 '<Cast to CompositeConstraintAssoc at nodes.lkt:13588:30>' Cast_Result ada/nodes.lkt:13588
Cast_Expr := Item_2; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Composite_Constraint_Assoc_Range
   then
      Cast_Result := Create_Internal_Entity_Composite_Constraint_Assoc
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Composite_Constraint_Assoc;
   end if;
--# expr-done 7310
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity (Node => Cast_Result.Node.Composite_Constraint_Assoc_F_Constraint_Expr, Info => Cast_Result.Info);
--# expr-done 7311
Local_Ex := Fld_4; 
--# bind ex Local_Ex
--# expr-start 7318 '<LogicBinaryOp And at nodes.lkt:13608:21>' And_Pred ada/nodes.lkt:13608
--# expr-start 7312 '<Cast to Expr at nodes.lkt:13608:21>' Cast_Result_1 ada/nodes.lkt:13608
Cast_Expr_1 := Local_Ex; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Expr
   then
      Cast_Result_1 := Create_Internal_Entity_Expr
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Expr;
   end if;
--# expr-done 7312
Var_Expr_4 := Cast_Result_1;
if Var_Expr_4 /= No_Entity_Expr then
   --# scope-start
   --# bind e Var_Expr_4
--# expr-start 7316 '<Bind at nodes.lkt:13610:25>' Bind_Result ada/nodes.lkt:13610
--# expr-start 7313 '<FieldAccess for expected_type_var at nodes.lkt:13610:25>' Fld_5 ada/nodes.lkt:13610
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_4.Node);
--# expr-done 7313
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 7315 '<FieldAccess for base_subtype at nodes.lkt:13611:28>' Fld_7 ada/nodes.lkt:13611
--# expr-start 7314 '<FieldAccess for index_type at nodes.lkt:13611:28>' Fld_6 ada/nodes.lkt:13611
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.index_type
Fld_6 := Libadalang.Implementation.Base_Type_Decl_P_Index_Type (Node => Local_Typ.Node, Dim => Index_3, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 7314
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Fld_6.Node, Origin => Origin, E_Info => Fld_6.Info);
--# end
--# expr-done 7315
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13610:25") else null)); 
--# expr-done 7316
Scope_Result := Bind_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2956;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13612:37") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
--# expr-start 7317 '<FieldAccess for sub_equation at nodes.lkt:13614:26>' Fld_8 ada/nodes.lkt:13614
      if Local_Ex.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Ex.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Ex.Info);
--# end
--# expr-done 7317
And_Pred := Create_And (Result_Var, Fld_8, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13608:21") else null)); 
--# expr-done 7318
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 7319
         declare
            Item_To_Append : constant Logic_Equation := Let_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2955;
               Index_3 := Index_3 + 1;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7320
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13586:13") else null)); 
--# expr-done 7321
   If_Result_1 := Logic_Boolean_Op;
else
   --# expr-start 7351 '<LogicAll at nodes.lkt:13619:13>' Logic_Boolean_Op_1 ada/nodes.lkt:13619
--# expr-start 7350 '<Map at nodes.lkt:13619:13>' Map_Result_1 ada/nodes.lkt:13619
   --# expr-start 7324 '<FieldAccess for match_formals at nodes.lkt:13619:13>' Fld_11 ada/nodes.lkt:13619
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7322 '<FieldAccess for discriminants_list at nodes.lkt:13620:17>' Fld_9 ada/nodes.lkt:13620
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_9 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Local_Typ.Node, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 7322
--# expr-start 7323 '<FieldAccess for constraints at nodes.lkt:13621:17>' Fld_10 ada/nodes.lkt:13621
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Composite_Constraint_F_Constraints, Info => Ent.Info);
--# expr-done 7323
--# property-call-start AdaNode.match_formals
Fld_11 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Self, Formal_Params => Fld_9, Params => Fld_10, Is_Dottable_Subp => False);
--# end
--# expr-done 7324
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_11;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_0
      --# expr-start 7349 '<LogicBinaryOp And at nodes.lkt:13626:17>' And_Pred_3 ada/nodes.lkt:13626
--# expr-start 7342 '<LogicBinaryOp And at nodes.lkt:13627:21>' And_Pred_2 ada/nodes.lkt:13627
--# expr-start 7337 '<LogicBinaryOp And at nodes.lkt:13628:25>' And_Pred_1 ada/nodes.lkt:13628
--# expr-start 7332 '<Bind at nodes.lkt:13628:25>' Bind_Result_1 ada/nodes.lkt:13628
--# expr-start 7328 '<FieldAccess for expected_type_var at nodes.lkt:13628:25>' Fld_15 ada/nodes.lkt:13628
--# expr-start 7327 '<FieldAccess for expr at nodes.lkt:13628:25>' Fld_14 ada/nodes.lkt:13628
--# expr-start 7326 '<FieldAccess for assoc at nodes.lkt:13628:25>' Fld_13 ada/nodes.lkt:13628
--# expr-start 7325 '<FieldAccess for actual at nodes.lkt:13628:25>' Fld_12 ada/nodes.lkt:13628
Fld_12 := Item_0.Actual;
--# expr-done 7325
Fld_13 := Fld_12.Assoc;
--# expr-done 7326
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_14 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_13.Node, E_Info => Fld_13.Info);
--# end
--# expr-done 7327
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_14.Node);
--# expr-done 7328
Fld_15.Value := No_Entity;
Entity_Vars.Reset (Fld_15);
--# expr-start 7331 '<FieldAccess for formal_type at nodes.lkt:13629:28>' Fld_18 ada/nodes.lkt:13629
--# expr-start 7330 '<FieldAccess for formal_decl at nodes.lkt:13629:28>' Fld_17 ada/nodes.lkt:13629
--# expr-start 7329 '<FieldAccess for formal at nodes.lkt:13629:28>' Fld_16 ada/nodes.lkt:13629
Fld_16 := Item_0.Formal;
--# expr-done 7329
      if Fld_16.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_17 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_16.Node, E_Info => Fld_16.Info);
--# end
--# expr-done 7330
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_18 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_17.Node, Origin => Origin, E_Info => Fld_17.Info);
--# end
--# expr-done 7331
      Cast_Result_3 := Create_Internal_Entity
        (Node => Fld_18.Node,
         Info => Fld_18.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_15, Cast_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13628:25") else null)); 
--# expr-done 7332
--# expr-start 7336 '<FieldAccess for sub_equation at nodes.lkt:13630:30>' Fld_22 ada/nodes.lkt:13630
--# expr-start 7335 '<FieldAccess for expr at nodes.lkt:13630:30>' Fld_21 ada/nodes.lkt:13630
--# expr-start 7334 '<FieldAccess for assoc at nodes.lkt:13630:30>' Fld_20 ada/nodes.lkt:13630
--# expr-start 7333 '<FieldAccess for actual at nodes.lkt:13630:30>' Fld_19 ada/nodes.lkt:13630
Fld_19 := Item_0.Actual;
--# expr-done 7333
Fld_20 := Fld_19.Assoc;
--# expr-done 7334
      if Fld_20.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_21 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_20.Node, E_Info => Fld_20.Info);
--# end
--# expr-done 7335
      if Fld_21.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_22 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_21.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_21.Info);
--# end
--# expr-done 7336
And_Pred_1 := Create_And (Bind_Result_1, Fld_22, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13628:25") else null)); 
--# expr-done 7337
--# expr-start 7341 '<FieldAccess for matches_expected_formal_type at nodes.lkt:13632:26>' Fld_26 ada/nodes.lkt:13632
--# expr-start 7340 '<FieldAccess for expr at nodes.lkt:13632:26>' Fld_25 ada/nodes.lkt:13632
--# expr-start 7339 '<FieldAccess for assoc at nodes.lkt:13632:26>' Fld_24 ada/nodes.lkt:13632
--# expr-start 7338 '<FieldAccess for actual at nodes.lkt:13632:26>' Fld_23 ada/nodes.lkt:13632
Fld_23 := Item_0.Actual;
--# expr-done 7338
Fld_24 := Fld_23.Assoc;
--# expr-done 7339
      if Fld_24.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_25 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_24.Node, E_Info => Fld_24.Info);
--# end
--# expr-done 7340
      if Fld_25.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_26 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_25.Node, Origin => Origin);
--# end
--# expr-done 7341
And_Pred_2 := Create_And (And_Pred_1, Fld_26, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13627:21") else null)); 
--# expr-done 7342
--# expr-start 7344 '<FieldAccess for name at nodes.lkt:13634:22>' Fld_28 ada/nodes.lkt:13634
--# expr-start 7343 '<FieldAccess for actual at nodes.lkt:13634:22>' Fld_27 ada/nodes.lkt:13634
Fld_27 := Item_0.Actual;
--# expr-done 7343
Fld_28 := Fld_27.Name;
--# expr-done 7344
Var_Expr_1 := Fld_28;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind name Var_Expr_1
--# expr-start 7348 '<Bind at nodes.lkt:13635:31>' Bind_Result_2 ada/nodes.lkt:13635
--# expr-start 7345 '<FieldAccess for ref_var at nodes.lkt:13635:31>' Fld_29 ada/nodes.lkt:13635
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_29 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Var_Expr_1);
--# end
--# expr-done 7345
Fld_29.Value := No_Entity;
Entity_Vars.Reset (Fld_29);
--# expr-start 7347 '<FieldAccess for formal_decl at nodes.lkt:13635:49>' Fld_31 ada/nodes.lkt:13635
--# expr-start 7346 '<FieldAccess for formal at nodes.lkt:13635:49>' Fld_30 ada/nodes.lkt:13635
Fld_30 := Item_0.Formal;
--# expr-done 7346
      if Fld_30.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_31 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_30.Node, E_Info => Fld_30.Info);
--# end
--# expr-done 7347
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_31.Node,
         Info => Fld_31.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_29, Cast_Result_4, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13635:31") else null)); 
--# expr-done 7348
Scope_Result_1 := Bind_Result_2;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2958;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13636:33") else null)); 
   Result_Var_1 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
And_Pred_3 := Create_And (And_Pred_2, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13626:17") else null)); 
--# expr-done 7349
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_2957;
         end loop;
      end;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 7350
Logic_Boolean_Op_1 := Solver.Create_All (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13619:13") else null)); 
--# expr-done 7351
   If_Result_1 := Logic_Boolean_Op_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 7352
Let_Result_1 := If_Result_1; Inc_Ref (Let_Result_1);
--# end
--# expr-done 7353
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1086;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1086;
                     Finalizer_Scope_2955;
                     Finalizer_Scope_2956;
                     Finalizer_Scope_2957;
                     Finalizer_Scope_2958;
            raise;
      end;
   return Property_Result;
end Composite_Constraint_P_Xref_Equation;
--# end
--# property-start CompositeConstraint.discriminant_params ada/nodes.lkt:13645
pragma Warnings (Off, "is not referenced");
 function Composite_Constraint_P_Discriminant_Params
  (Node : Bare_Composite_Constraint
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Actual_Array_Access
is
   Self : Bare_Composite_Constraint  := Bare_Composite_Constraint (Node);
     Ent : Internal_Entity_Composite_Constraint :=
       Internal_Entity_Composite_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_1087 with Inline_Always;
            procedure Finalizer_Scope_2959 with Inline_Always;
            procedure Finalizer_Scope_2961 with Inline_Always;
      Local_Discrs : Internal_Param_Actual_Array_Access;
Local_Ds : Internal_Entity_Discriminant_Spec;
Var_Expr_2 : Internal_Entity_Assoc_List;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Cast_Expr : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result : Internal_Entity_Discriminant_Spec;
Fld_2 : Internal_Entity_Defining_Name_List;
Fld_3 : Bare_Defining_Name_List;
Fld_4 : Internal_Entity_Info;
Item_1 : Internal_Entity_Defining_Name;
Bare_Item_1 : Bare_Defining_Name;
Fld_5 : Internal_Entity_Expr;
New_Struct : Internal_Param_Actual;
As_Entity : Internal_Entity_Defining_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Param_Actual_Array_Access;
Let_Result : Internal_Param_Actual_Array_Access;
Map_Result_1 : Internal_Param_Actual_Array_Access;
Fld_6 : Internal_Entity_Assoc_List;
Index_4 : Integer;
Fld_7 : Internal_Entity_Defining_Name;
Fld_8 : Internal_Entity_Defining_Name;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Internal_Entity_Expr;
New_Struct_1 : Internal_Param_Actual;
Map_Result_2 : Internal_Param_Actual_Array_Access;
Scope_Result : Internal_Param_Actual_Array_Access;
Result_Var : Internal_Param_Actual_Array_Access;
Let_Result_1 : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_1087 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_Discrs);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1087;
            procedure Finalizer_Scope_2959 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_2959;
            procedure Finalizer_Scope_2961 is
            begin
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_2961;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7370 '<Let at nodes.lkt:13647:9>' Let_Result_1 ada/nodes.lkt:13647
--# scope-start
--# expr-start 7362 '<Mapcat at nodes.lkt:13648:13>' Map_Result_1 ada/nodes.lkt:13648
   --# expr-start 7355 '<FieldAccess for discriminants_list at nodes.lkt:13648:13>' Fld_1 ada/nodes.lkt:13648
--# expr-start 7354 '<FieldAccess for subtype at nodes.lkt:13648:13>' Fld ada/nodes.lkt:13648
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.subtype
Fld := Libadalang.Implementation.Constraint_P_Subtype (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7354
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Fld.Node, Origin => No_Bare_Ada_Node, E_Info => Fld.Info);
--# end
--# expr-done 7355
      declare
         Map_Result_1_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Formal_Param_Decl_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind d Item_0
      --# expr-start 7361 '<Let at nodes.lkt:13650:21>' Let_Result ada/nodes.lkt:13650
--# scope-start
--# expr-start 7356 '<Cast to DiscriminantSpec at nodes.lkt:13650:30>' Cast_Result ada/nodes.lkt:13650
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Discriminant_Spec_Range
   then
      Cast_Result := Create_Internal_Entity_Discriminant_Spec
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Discriminant_Spec;
   end if;
--# expr-done 7356
Local_Ds := Cast_Result; 
--# bind ds Local_Ds
--# expr-start 7360 '<Map at nodes.lkt:13652:21>' Map_Result ada/nodes.lkt:13652
   --# expr-start 7357 '<FieldAccess for ids at nodes.lkt:13652:21>' Fld_2 ada/nodes.lkt:13652
      if Local_Ds.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Defining_Name_List (Node => Local_Ds.Node.Discriminant_Spec_F_Ids, Info => Local_Ds.Info);
--# expr-done 7357
Fld_3 := Fld_2.Node;
      declare
         Map_Result_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      if Fld_3 = null then
      Map_Result := Create_Internal_Param_Actual_Array (0);
      else
      declare
         Collection : constant Bare_Defining_Name_List := Fld_3;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Defining_Name;
else
Fld_4 := Fld_2.Info;
As_Entity := (Info => Fld_4, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind i Item_1
      --# expr-start 7359 '<New ParamActual at nodes.lkt:13653:32>' New_Struct ada/nodes.lkt:13653
--# expr-start 7358 '<FieldAccess for default_expr at nodes.lkt:13653:60>' Fld_5 ada/nodes.lkt:13653
      if Local_Ds.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Local_Ds.Node.Discriminant_Spec_F_Default_Expr, Info => Local_Ds.Info);
--# expr-done 7358
New_Struct := (Actual => Fld_5, Param => Item_1); 
--# expr-done 7359
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7360
Let_Result := Map_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 7361
         for Item_To_Append of
               Let_Result.Items
         loop
            Internal_Param_Actual_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_2959;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 7362
Local_Discrs := Map_Result_1; Inc_Ref (Local_Discrs);
--# bind discrs Local_Discrs
--# expr-start 7363 '<FieldAccess for constraints at nodes.lkt:13659:9>' Fld_6 ada/nodes.lkt:13659
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Composite_Constraint_F_Constraints, Info => Ent.Info);
--# expr-done 7363
Var_Expr_2 := Fld_6;
if Var_Expr_2 /= No_Entity_Assoc_List then
   --# scope-start
   --# bind c Var_Expr_2
--# expr-start 7369 '<Map at nodes.lkt:13661:13>' Map_Result_2 ada/nodes.lkt:13661
      declare
         Map_Result_2_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
         Index_4 := 0;
      declare
         Collection : constant Internal_Param_Actual_Array_Access := Local_Discrs;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind dp Item_3
               --# bind i Index_4
      --# expr-start 7368 '<New ParamActual at nodes.lkt:13663:17>' New_Struct_1 ada/nodes.lkt:13663
--# expr-start 7366 '<FieldAccess for actual_for_param_at at nodes.lkt:13665:28>' Fld_10 ada/nodes.lkt:13665
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7364 '<FieldAccess for param at nodes.lkt:13665:50>' Fld_8 ada/nodes.lkt:13665
Fld_8 := Item_3.Param;
--# expr-done 7364
--# expr-start 7365 '<FieldAccess for actual at nodes.lkt:13665:63>' Fld_9 ada/nodes.lkt:13665
Fld_9 := Item_3.Actual;
--# expr-done 7365
--# property-call-start AssocList.actual_for_param_at
Fld_10 := Libadalang.Implementation.Assoc_List_P_Actual_For_Param_At (Node => Var_Expr_2.Node, Param => Fld_8, Pos => Index_4, Default_Expr => Fld_9, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 7366
--# expr-start 7367 '<FieldAccess for param at nodes.lkt:13664:27>' Fld_7 ada/nodes.lkt:13664
Fld_7 := Item_3.Param;
--# expr-done 7367
New_Struct_1 := (Actual => Fld_10, Param => Fld_7); 
--# expr-done 7368
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct_1;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
               Index_4 := Index_4 + 1;
         end loop;
      end;
         Map_Result_2 := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 7369
Scope_Result := Map_Result_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2961;
   Result_Var := Scope_Result;
else
   Result_Var := Local_Discrs;
end if;
      Inc_Ref (Result_Var);
Let_Result_1 := Result_Var; Inc_Ref (Let_Result_1);
--# end
--# expr-done 7370
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1087;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1087;
                     Finalizer_Scope_2959;
                     Finalizer_Scope_2961;
            raise;
      end;
   return Property_Result;
end Composite_Constraint_P_Discriminant_Params;
--# end
   --
   --  Primitives for Bare_Delta_Constraint
   --
      procedure Initialize_Fields_For_Delta_Constraint
        (Self : Bare_Delta_Constraint
         ; Delta_Constraint_F_Delta : Bare_Expr
         ; Delta_Constraint_F_Range : Bare_Range_Spec
        ) is
      begin
            Self.Delta_Constraint_F_Delta := Delta_Constraint_F_Delta;
            Self.Delta_Constraint_F_Range := Delta_Constraint_F_Range;
      end Initialize_Fields_For_Delta_Constraint;
   function Delta_Constraint_F_Delta
     (Node : Bare_Delta_Constraint) return Bare_Expr
   is
   begin
         return Node.Delta_Constraint_F_Delta;
   end;
   function Delta_Constraint_F_Range
     (Node : Bare_Delta_Constraint) return Bare_Range_Spec
   is
   begin
         return Node.Delta_Constraint_F_Range;
   end;
--# property-start DeltaConstraint.xref_equation ada/nodes.lkt:13683
pragma Warnings (Off, "is not referenced");
 function Delta_Constraint_P_Xref_Equation
  (Node : Bare_Delta_Constraint
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Delta_Constraint  := Bare_Delta_Constraint (Node);
     Ent : Internal_Entity_Delta_Constraint :=
       Internal_Entity_Delta_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1088 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Var;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_7 : Internal_Entity_Range_Spec;
Fld_8 : Logic_Equation;
Fld_9 : Bare_Range_Spec;
Is_Null : Boolean;
If_Result : Logic_Equation;
And_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_1088 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_8);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_1088;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7385 '<LogicBinaryOp And at nodes.lkt:13684:9>' And_Pred_2 ada/nodes.lkt:13684
--# expr-start 7379 '<LogicBinaryOp And at nodes.lkt:13684:9>' And_Pred_1 ada/nodes.lkt:13684
--# expr-start 7376 '<LogicBinaryOp And at nodes.lkt:13684:9>' And_Pred ada/nodes.lkt:13684
--# expr-start 7373 '<FieldAccess for universal_real_bind at nodes.lkt:13687:13>' Fld_2 ada/nodes.lkt:13687
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7372 '<FieldAccess for expected_type_var at nodes.lkt:13687:38>' Fld_1 ada/nodes.lkt:13687
--# expr-start 7371 '<FieldAccess for delta at nodes.lkt:13687:38>' Fld ada/nodes.lkt:13687
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Delta_Constraint_F_Delta, Info => Ent.Info);
--# expr-done 7371
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld.Node);
--# expr-done 7372
--# property-call-start AdaNode.universal_real_bind
Fld_2 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Bind (Node => Ent.Node, Type_Var => Fld_1, Origin => Origin);
--# end
--# expr-done 7373
--# expr-start 7375 '<FieldAccess for sub_equation at nodes.lkt:13689:14>' Fld_4 ada/nodes.lkt:13689
--# expr-start 7374 '<FieldAccess for delta at nodes.lkt:13689:14>' Fld_3 ada/nodes.lkt:13689
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Delta_Constraint_F_Delta, Info => Ent.Info);
--# expr-done 7374
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 7375
And_Pred := Create_And (Fld_2, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13684:9") else null)); 
--# expr-done 7376
--# expr-start 7378 '<FieldAccess for matches_expected_type at nodes.lkt:13690:14>' Fld_6 ada/nodes.lkt:13690
--# expr-start 7377 '<FieldAccess for delta at nodes.lkt:13690:14>' Fld_5 ada/nodes.lkt:13690
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Delta_Constraint_F_Delta, Info => Ent.Info);
--# expr-done 7377
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 7378
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13684:9") else null)); 
--# expr-done 7379
--# expr-start 7384 '<If at nodes.lkt:13691:15>' If_Result ada/nodes.lkt:13691
--# expr-start 7381 '<IsNull at nodes.lkt:13691:18>' Is_Null ada/nodes.lkt:13691
--# expr-start 7380 '<FieldAccess for range at nodes.lkt:13691:18>' Fld_9 ada/nodes.lkt:13691
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.Delta_Constraint_F_Range;
--# expr-done 7380
Is_Null := Fld_9 = null; 
--# expr-done 7381
if Is_Null then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13691:42") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 7383 '<FieldAccess for sub_equation at nodes.lkt:13691:53>' Fld_8 ada/nodes.lkt:13691
--# expr-start 7382 '<FieldAccess for range at nodes.lkt:13691:53>' Fld_7 ada/nodes.lkt:13691
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Delta_Constraint_F_Range, Info => Ent.Info);
--# expr-done 7382
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_7.Info);
--# end
--# expr-done 7383
   If_Result := Fld_8;
end if;
      Inc_Ref (If_Result);
--# expr-done 7384
And_Pred_2 := Create_And (And_Pred_1, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13684:9") else null)); 
--# expr-done 7385
         Property_Result := And_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1088;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1088;
            raise;
      end;
   return Property_Result;
end Delta_Constraint_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Digits_Constraint
   --
      procedure Initialize_Fields_For_Digits_Constraint
        (Self : Bare_Digits_Constraint
         ; Digits_Constraint_F_Digits : Bare_Expr
         ; Digits_Constraint_F_Range : Bare_Range_Spec
        ) is
      begin
            Self.Digits_Constraint_F_Digits := Digits_Constraint_F_Digits;
            Self.Digits_Constraint_F_Range := Digits_Constraint_F_Range;
      end Initialize_Fields_For_Digits_Constraint;
   function Digits_Constraint_F_Digits
     (Node : Bare_Digits_Constraint) return Bare_Expr
   is
   begin
         return Node.Digits_Constraint_F_Digits;
   end;
   function Digits_Constraint_F_Range
     (Node : Bare_Digits_Constraint) return Bare_Range_Spec
   is
   begin
         return Node.Digits_Constraint_F_Range;
   end;
--# property-start DigitsConstraint.xref_equation ada/nodes.lkt:13704
pragma Warnings (Off, "is not referenced");
 function Digits_Constraint_P_Xref_Equation
  (Node : Bare_Digits_Constraint
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Digits_Constraint  := Bare_Digits_Constraint (Node);
     Ent : Internal_Entity_Digits_Constraint :=
       Internal_Entity_Digits_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1089 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Var;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_7 : Internal_Entity_Range_Spec;
Fld_8 : Logic_Equation;
Fld_9 : Bare_Range_Spec;
Is_Null : Boolean;
If_Result : Logic_Equation;
And_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_1089 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_8);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_1089;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7400 '<LogicBinaryOp And at nodes.lkt:13705:9>' And_Pred_2 ada/nodes.lkt:13705
--# expr-start 7394 '<LogicBinaryOp And at nodes.lkt:13705:9>' And_Pred_1 ada/nodes.lkt:13705
--# expr-start 7391 '<LogicBinaryOp And at nodes.lkt:13705:9>' And_Pred ada/nodes.lkt:13705
--# expr-start 7388 '<FieldAccess for universal_int_bind at nodes.lkt:13708:13>' Fld_2 ada/nodes.lkt:13708
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7387 '<FieldAccess for expected_type_var at nodes.lkt:13708:37>' Fld_1 ada/nodes.lkt:13708
--# expr-start 7386 '<FieldAccess for digits at nodes.lkt:13708:37>' Fld ada/nodes.lkt:13708
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Digits_Constraint_F_Digits, Info => Ent.Info);
--# expr-done 7386
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld.Node);
--# expr-done 7387
--# property-call-start AdaNode.universal_int_bind
Fld_2 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Ent.Node, Type_Var => Fld_1, Origin => Origin);
--# end
--# expr-done 7388
--# expr-start 7390 '<FieldAccess for sub_equation at nodes.lkt:13710:14>' Fld_4 ada/nodes.lkt:13710
--# expr-start 7389 '<FieldAccess for digits at nodes.lkt:13710:14>' Fld_3 ada/nodes.lkt:13710
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Digits_Constraint_F_Digits, Info => Ent.Info);
--# expr-done 7389
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 7390
And_Pred := Create_And (Fld_2, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13705:9") else null)); 
--# expr-done 7391
--# expr-start 7393 '<FieldAccess for matches_expected_type at nodes.lkt:13711:14>' Fld_6 ada/nodes.lkt:13711
--# expr-start 7392 '<FieldAccess for digits at nodes.lkt:13711:14>' Fld_5 ada/nodes.lkt:13711
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Digits_Constraint_F_Digits, Info => Ent.Info);
--# expr-done 7392
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 7393
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13705:9") else null)); 
--# expr-done 7394
--# expr-start 7399 '<If at nodes.lkt:13712:15>' If_Result ada/nodes.lkt:13712
--# expr-start 7396 '<IsNull at nodes.lkt:13712:18>' Is_Null ada/nodes.lkt:13712
--# expr-start 7395 '<FieldAccess for range at nodes.lkt:13712:18>' Fld_9 ada/nodes.lkt:13712
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.Digits_Constraint_F_Range;
--# expr-done 7395
Is_Null := Fld_9 = null; 
--# expr-done 7396
if Is_Null then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13712:42") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 7398 '<FieldAccess for sub_equation at nodes.lkt:13712:53>' Fld_8 ada/nodes.lkt:13712
--# expr-start 7397 '<FieldAccess for range at nodes.lkt:13712:53>' Fld_7 ada/nodes.lkt:13712
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Digits_Constraint_F_Range, Info => Ent.Info);
--# expr-done 7397
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_7.Info);
--# end
--# expr-done 7398
   If_Result := Fld_8;
end if;
      Inc_Ref (If_Result);
--# expr-done 7399
And_Pred_2 := Create_And (And_Pred_1, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13705:9") else null)); 
--# expr-done 7400
         Property_Result := And_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1089;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1089;
            raise;
      end;
   return Property_Result;
end Digits_Constraint_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Range_Constraint
   --
      procedure Initialize_Fields_For_Range_Constraint
        (Self : Bare_Range_Constraint
         ; Range_Constraint_F_Range : Bare_Range_Spec
        ) is
      begin
            Self.Range_Constraint_F_Range := Range_Constraint_F_Range;
      end Initialize_Fields_For_Range_Constraint;
   function Range_Constraint_F_Range
     (Node : Bare_Range_Constraint) return Bare_Range_Spec
   is
   begin
         return Node.Range_Constraint_F_Range;
   end;
--# property-start RangeConstraint.xref_equation ada/nodes.lkt:13721
pragma Warnings (Off, "is not referenced");
 function Range_Constraint_P_Xref_Equation
  (Node : Bare_Range_Constraint
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Range_Constraint  := Bare_Range_Constraint (Node);
     Ent : Internal_Entity_Range_Constraint :=
       Internal_Entity_Range_Constraint'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1090 with Inline_Always;
      Fld : Bare_Range_Spec;
Fld_1 : Bare_Expr;
Fld_2 : Logic_Var;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Internal_Entity_Range_Spec;
Fld_6 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_7 : Internal_Entity_Range_Spec;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1090 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1090;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7413 '<LogicBinaryOp And at nodes.lkt:13722:9>' And_Pred_1 ada/nodes.lkt:13722
--# expr-start 7409 '<LogicBinaryOp And at nodes.lkt:13722:9>' And_Pred ada/nodes.lkt:13722
--# expr-start 7406 '<Bind at nodes.lkt:13722:9>' Bind_Result ada/nodes.lkt:13722
--# expr-start 7403 '<FieldAccess for expected_type_var at nodes.lkt:13722:9>' Fld_2 ada/nodes.lkt:13722
--# expr-start 7402 '<FieldAccess for range at nodes.lkt:13722:9>' Fld_1 ada/nodes.lkt:13722
--# expr-start 7401 '<FieldAccess for range at nodes.lkt:13722:9>' Fld ada/nodes.lkt:13722
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Range_Constraint_F_Range;
--# expr-done 7401
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Range_Spec_F_Range;
--# expr-done 7402
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_1);
--# expr-done 7403
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 7405 '<FieldAccess for base_subtype at nodes.lkt:13722:49>' Fld_4 ada/nodes.lkt:13722
--# expr-start 7404 '<FieldAccess for subtype at nodes.lkt:13722:49>' Fld_3 ada/nodes.lkt:13722
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.subtype
Fld_3 := Libadalang.Implementation.Constraint_P_Subtype (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7404
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Fld_3.Node, Origin => Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 7405
      Cast_Result := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Bind_Result := Solver.Create_Assign (Fld_2, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13722:9") else null)); 
--# expr-done 7406
--# expr-start 7408 '<FieldAccess for sub_equation at nodes.lkt:13723:14>' Fld_6 ada/nodes.lkt:13723
--# expr-start 7407 '<FieldAccess for range at nodes.lkt:13723:14>' Fld_5 ada/nodes.lkt:13723
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Range_Constraint_F_Range, Info => Ent.Info);
--# expr-done 7407
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_6 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_5.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_5.Info);
--# end
--# expr-done 7408
And_Pred := Create_And (Bind_Result, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13722:9") else null)); 
--# expr-done 7409
--# expr-start 7412 '<FieldAccess for matches_expected_type at nodes.lkt:13724:14>' Fld_9 ada/nodes.lkt:13724
--# expr-start 7411 '<FieldAccess for range at nodes.lkt:13724:14>' Fld_8 ada/nodes.lkt:13724
--# expr-start 7410 '<FieldAccess for range at nodes.lkt:13724:14>' Fld_7 ada/nodes.lkt:13724
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Range_Constraint_F_Range, Info => Ent.Info);
--# expr-done 7410
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Expr (Node => Fld_7.Node.Range_Spec_F_Range, Info => Fld_7.Info);
--# expr-done 7411
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_9 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_8.Node, Origin => Origin);
--# end
--# expr-done 7412
And_Pred_1 := Create_And (And_Pred, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13722:9") else null)); 
--# expr-done 7413
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1090;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1090;
            raise;
      end;
   return Property_Result;
end Range_Constraint_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Declarative_Part
   --
      procedure Initialize_Fields_For_Declarative_Part
        (Self : Bare_Declarative_Part
         ; Declarative_Part_F_Decls : Bare_Ada_Node_List
        ) is
      begin
            Self.Declarative_Part_F_Decls := Declarative_Part_F_Decls;
      end Initialize_Fields_For_Declarative_Part;
   function Declarative_Part_F_Decls
     (Node : Bare_Declarative_Part) return Bare_Ada_Node_List
   is
   begin
         return Node.Declarative_Part_F_Decls;
   end;
--# property-start DeclarativePart.use_clauses_envs ada/nodes.lkt:13735
pragma Warnings (Off, "is not referenced");
 function Declarative_Part_P_Use_Clauses_Envs
  (Node : Bare_Declarative_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Declarative_Part  := Bare_Declarative_Part (Node);
     Ent : Internal_Entity_Declarative_Part :=
       Internal_Entity_Declarative_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1091 with Inline_Always;
            procedure Finalizer_Scope_2963 with Inline_Always;
      Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Use_Clause;
Fld_2 : Lexical_Env := Empty_Env;
Is_A : Boolean;
Map_Result : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1091 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_1091;
            procedure Finalizer_Scope_2963 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_2963;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7420 '<env_group at nodes.lkt:13736:9>' Group_Env ada/nodes.lkt:13736
--# expr-start 7419 '<Map at nodes.lkt:13736:9>' Map_Result ada/nodes.lkt:13736
   --# expr-start 7415 '<children at nodes.lkt:13736:9>' Fld_1 ada/nodes.lkt:13736
--# expr-start 7414 '<FieldAccess for decls at nodes.lkt:13736:9>' Fld ada/nodes.lkt:13736
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Ent.Node.Declarative_Part_F_Decls, Info => Ent.Info);
--# expr-done 7414
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 7415
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind u Item_0
         --# expr-start 7416 '<IsA UseClause at nodes.lkt:13738:20>' Is_A ada/nodes.lkt:13738
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Use_Clause; 
--# expr-done 7416
         if Is_A then
      --# expr-start 7418 '<FieldAccess for used_envs at nodes.lkt:13737:20>' Fld_2 ada/nodes.lkt:13737
--# expr-start 7417 '<Cast to UseClause at nodes.lkt:13737:20>' Cast_Result ada/nodes.lkt:13737
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Use_Clause
   then
      Cast_Result := Create_Internal_Entity_Use_Clause
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Use_Clause;
   end if;
--# expr-done 7417
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UseClause.used_envs
Fld_2 := Libadalang.Implementation.Use_Clause_P_Used_Envs (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 7418
         declare
            Item_To_Append : constant Lexical_Env := Fld_2;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
      Finalizer_Scope_2963;
         end loop;
      end;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7419
Group_Env := Group (Map_Result, No_Metadata); 
--# expr-done 7420
         Property_Result := Group_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1091;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1091;
                     Finalizer_Scope_2963;
            raise;
      end;
   return Property_Result;
end Declarative_Part_P_Use_Clauses_Envs;
--# end
--# property-start DeclarativePart.spark_mode_pragma ada/nodes.lkt:13744
pragma Warnings (Off, "is not referenced");
 function Declarative_Part_P_Spark_Mode_Pragma
  (Node : Bare_Declarative_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Pragma_Node
is
   Self : Bare_Declarative_Part  := Bare_Declarative_Part (Node);
     Ent : Internal_Entity_Declarative_Part :=
       Internal_Entity_Declarative_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Pragma_Node;
            procedure Finalizer_Scope_1092 with Inline_Always;
      Fld : Internal_Entity_Ada_Node_List;
Fld_1 : Bare_Ada_Node_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Is_A : Boolean;
Map_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Pragma_Node;
Fld_3 : Internal_Entity_Identifier;
Sym : Symbol_Type;
Fld_4 : Boolean;
Find_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity_Pragma_Node;
            procedure Finalizer_Scope_1092 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1092;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7429 '<Cast to Pragma at nodes.lkt:13747:9>' Cast_Result_1 ada/nodes.lkt:13747
--# expr-start 7428 '<Find at nodes.lkt:13747:9>' Find_Result ada/nodes.lkt:13747
   --# expr-start 7423 '<Map at nodes.lkt:13747:9>' Map_Result ada/nodes.lkt:13747
   --# expr-start 7421 '<FieldAccess for decls at nodes.lkt:13747:9>' Fld ada/nodes.lkt:13747
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Ada_Node_List (Node => Ent.Node.Declarative_Part_F_Decls, Info => Ent.Info);
--# expr-done 7421
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
            Take_While_Ok : Boolean := False;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind decl Item_0
         --# expr-start 7422 '<IsA Pragma at nodes.lkt:13747:41>' Is_A ada/nodes.lkt:13747
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Pragma_Node_Range; 
--# expr-done 7422
         Take_While_Ok := Is_A;
         if Take_While_Ok then
         declare
            Item_To_Append : constant Internal_Entity := Item_0;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
               exit when not Take_While_Ok;
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7423
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind decl Item_1
      --# expr-start 7427 '<FieldAccess for name_is at nodes.lkt:13748:23>' Fld_4 ada/nodes.lkt:13748
--# expr-start 7425 '<FieldAccess for id at nodes.lkt:13748:23>' Fld_3 ada/nodes.lkt:13748
--# expr-start 7424 '<Cast to Pragma at nodes.lkt:13748:23>' Cast_Result ada/nodes.lkt:13748
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result := Create_Internal_Entity_Pragma_Node
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Pragma_Node;
   end if;
--# expr-done 7424
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Identifier (Node => Cast_Result.Node.Pragma_Node_F_Id, Info => Cast_Result.Info);
--# expr-done 7425
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7426 '<Symbol SPARK_Mode at nodes.lkt:13748:50>' Sym ada/nodes.lkt:13748
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 7426
--# property-call-start Name.name_is
Fld_4 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_3.Node, Sym => Sym);
--# end
--# expr-done 7427
      if Fld_4 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Fld_4;
         end loop;
      end;
--# expr-done 7428
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Pragma_Node
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_1 := No_Entity_Pragma_Node;
   end if;
--# expr-done 7429
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1092;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1092;
            raise;
      end;
   return Property_Result;
end Declarative_Part_P_Spark_Mode_Pragma;
--# end
--# property-start DeclarativePart.spark_mode_aspect ada/nodes.lkt:13753
pragma Warnings (Off, "is not referenced");
 function Declarative_Part_P_Spark_Mode_Aspect
  (Node : Bare_Declarative_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Declarative_Part  := Bare_Declarative_Part (Node);
     Ent : Internal_Entity_Declarative_Part :=
       Internal_Entity_Declarative_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Aspect;
      Var_Expr_0 : Internal_Entity_Pragma_Node;
Var_Expr_1 : Internal_Entity_Basic_Decl;
Var_Expr : Internal_Aspect;
Fld : Internal_Entity_Pragma_Node;
Fld_1 : Internal_Aspect;
Scope_Result : Internal_Aspect;
Fld_2 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Sym : Symbol_Type;
Fld_3 : Internal_Aspect;
Scope_Result_1 : Internal_Aspect;
Fld_4 : Internal_Aspect;
Result_Var : Internal_Aspect;
Scope_Result_2 : Internal_Aspect;
Fld_5 : Internal_Aspect;
Result_Var_1 : Internal_Aspect;
Result_Var_2 : Internal_Aspect;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 7430 '<FieldAccess for spark_mode_pragma at nodes.lkt:13755:9>' Fld ada/nodes.lkt:13755
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DeclarativePart.spark_mode_pragma
Fld := Libadalang.Implementation.Declarative_Part_P_Spark_Mode_Pragma (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7430
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Pragma_Node then
   --# scope-start
   --# bind pragma Var_Expr_0
--# expr-start 7431 '<FieldAccess for as_aspect at nodes.lkt:13757:25>' Fld_1 ada/nodes.lkt:13757
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.as_aspect
Fld_1 := Libadalang.Implementation.Pragma_Node_P_As_Aspect (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7431
Scope_Result := Fld_1;
   --# end
   Result_Var_2 := Scope_Result;
else
--# expr-start 7433 '<Cast to BasicDecl at nodes.lkt:13760:25>' Cast_Result ada/nodes.lkt:13760
--# expr-start 7432 '<parent at nodes.lkt:13760:25>' Fld_2 ada/nodes.lkt:13760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 7432
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 7433
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind bd Var_Expr_1
--# expr-start 7435 '<FieldAccess for get_aspect at nodes.lkt:13762:17>' Fld_3 ada/nodes.lkt:13762
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7434 '<Symbol SPARK_Mode at nodes.lkt:13762:31>' Sym ada/nodes.lkt:13762
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 7434
--# property-call-start BasicDecl.get_aspect
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect (Node => Var_Expr_1.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 7435
Var_Expr := Fld_3;
if Var_Expr /= No_Aspect then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var := Scope_Result_1;
else
   --# expr-start 7436 '<Super at nodes.lkt:13765:21>' Fld_4 ada/nodes.lkt:13765
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.spark_mode_aspect
Fld_4 := Libadalang.Implementation.Ada_Node_P_Spark_Mode_Aspect (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7436
   Result_Var := Fld_4;
end if;
Scope_Result_2 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_2;
else
   --# expr-start 7437 '<Super at nodes.lkt:13766:29>' Fld_5 ada/nodes.lkt:13766
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.spark_mode_aspect
Fld_5 := Libadalang.Implementation.Ada_Node_P_Spark_Mode_Aspect (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7437
   Result_Var_1 := Fld_5;
end if;
   Result_Var_2 := Result_Var_1;
end if;
         Property_Result := Result_Var_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Declarative_Part_P_Spark_Mode_Aspect;
--# end
   --
   --  Primitives for Bare_Private_Part
   --
      procedure Private_Part_Pre_Env_Actions
        (Self            : Bare_Private_Part;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_212 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:13802:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_213 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            Libadalang.Implementation.Env_Names_214 (Node => 
Self);
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Private_Part
        (Self : Bare_Private_Part
         ; Declarative_Part_F_Decls : Bare_Ada_Node_List
        ) is
      begin
            Initialize_Fields_For_Declarative_Part
              (Self, Declarative_Part_F_Decls);
      end Initialize_Fields_For_Private_Part;
--# property-start PrivatePart.env_names ada/nodes.lkt:13776
pragma Warnings (Off, "is not referenced");
 function Private_Part_P_Env_Names
  (Node : Bare_Private_Part
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Private_Part  := Bare_Private_Part (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1094 with Inline_Always;
            procedure Finalizer_Scope_2969 with Inline_Always;
            procedure Finalizer_Scope_2970 with Inline_Always;
      Var_Expr_0 : Bare_Base_Package_Decl;
Var_Expr_1 : String_Type;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Base_Package_Decl;
Fld_1 : String_Type;
Str : String_Type;
Concat_Result : String_Type;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Scope_Result : Symbol_Type_Array_Access;
Result_Var : Symbol_Type_Array_Access;
Scope_Result_1 : Symbol_Type_Array_Access;
Result_Var_1 : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1094 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_1094;
            procedure Finalizer_Scope_2969 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_2969;
            procedure Finalizer_Scope_2970 is
            begin
                     Dec_Ref (Var_Expr_1);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_2970;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 7439 '<Cast to BasePackageDecl at nodes.lkt:13777:9>' Cast_Result ada/nodes.lkt:13777
--# expr-start 7438 '<parent at nodes.lkt:13777:9>' Fld ada/nodes.lkt:13777
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 7438
   if Fld = null
      or else Fld.Kind in Ada_Base_Package_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 7439
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind pkg Var_Expr_0
--# expr-start 7440 '<FieldAccess for top_level_env_name at nodes.lkt:13779:13>' Fld_1 ada/nodes.lkt:13779
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.top_level_env_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Top_Level_Env_Name (Node => Var_Expr_0);
--# end
--# expr-done 7440
Var_Expr_1 := Fld_1;
      Inc_Ref (Var_Expr_1);
if Var_Expr_1 /= Empty_String then
   --# scope-start
   --# bind name Var_Expr_1
--# expr-start 7443 '<ArrayLiteral at nodes.lkt:13780:27>' Array_Lit ada/nodes.lkt:13780
--# expr-start 7442 '<to_symbol at nodes.lkt:13780:28>' Sym ada/nodes.lkt:13780
--# expr-start 7441 '<String at nodes.lkt:13780:36>' Str ada/nodes.lkt:13780
Str := Create_String (".__privatepart"); 
--# expr-done 7441
Concat_Result := Concat_String (Var_Expr_1, Str); 
Sym := String_To_Symbol (Self, Self.Unit.Context, Concat_Result); 
--# expr-done 7442
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 7443
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2970;
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
Scope_Result_1 := Result_Var;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_2969;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Symbol_Type_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
         Property_Result := Result_Var_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1094;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1094;
                     Finalizer_Scope_2969;
                     Finalizer_Scope_2970;
            raise;
      end;
   return Property_Result;
end Private_Part_P_Env_Names;
--# end
--# property-start PrivatePart.immediate_declarative_region ada/nodes.lkt:13784
pragma Warnings (Off, "is not referenced");
 function Private_Part_P_Immediate_Declarative_Region
  (Node : Bare_Private_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Private_Part  := Bare_Private_Part (Node);
     Ent : Internal_Entity_Private_Part :=
       Internal_Entity_Private_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1095 with Inline_Always;
      Fld : Internal_Entity;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1095 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1095;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7445 '<FieldAccess for immediate_declarative_region at nodes.lkt:13785:9>' Fld_1 ada/nodes.lkt:13785
--# expr-start 7444 '<FieldAccess for semantic_parent at nodes.lkt:13785:9>' Fld ada/nodes.lkt:13785
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7444
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.immediate_declarative_region'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Immediate_Declarative_Region (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 7445
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1095;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1095;
            raise;
      end;
   return Property_Result;
end Private_Part_P_Immediate_Declarative_Region;
--# end
--# property-start PrivatePart.spark_mode_aspect ada/nodes.lkt:13788
pragma Warnings (Off, "is not referenced");
 function Private_Part_P_Spark_Mode_Aspect
  (Node : Bare_Private_Part
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Private_Part  := Bare_Private_Part (Node);
     Ent : Internal_Entity_Private_Part :=
       Internal_Entity_Private_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Aspect;
      Var_Expr_0 : Internal_Entity_Pragma_Node;
Var_Expr_200 : Internal_Entity_Package_Decl;
Fld : Internal_Entity_Pragma_Node;
Fld_1 : Internal_Aspect;
Scope_Result : Internal_Aspect;
Fld_2 : Internal_Entity;
Cast_Result : Internal_Entity_Package_Decl;
Fld_3 : Internal_Entity_Public_Part;
Fld_4 : Internal_Aspect;
Scope_Result_1 : Internal_Aspect;
Result_Var : Internal_Aspect;
Result_Var_1 : Internal_Aspect;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 7446 '<FieldAccess for spark_mode_pragma at nodes.lkt:13790:9>' Fld ada/nodes.lkt:13790
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DeclarativePart.spark_mode_pragma
Fld := Libadalang.Implementation.Declarative_Part_P_Spark_Mode_Pragma (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7446
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Pragma_Node then
   --# scope-start
   --# bind pragma Var_Expr_0
--# expr-start 7447 '<FieldAccess for as_aspect at nodes.lkt:13791:25>' Fld_1 ada/nodes.lkt:13791
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.as_aspect
Fld_1 := Libadalang.Implementation.Pragma_Node_P_As_Aspect (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7447
Scope_Result := Fld_1;
   --# end
   Result_Var_1 := Scope_Result;
else
--# expr-start 7449 '<Cast to PackageDecl at nodes.lkt:13794:25>' Cast_Result ada/nodes.lkt:13794
--# expr-start 7448 '<parent at nodes.lkt:13794:25>' Fld_2 ada/nodes.lkt:13794
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 7448
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Package_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Package_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Package_Decl;
   end if;
--# expr-done 7449
Var_Expr_200 := Cast_Result;
if Var_Expr_200 /= No_Entity_Package_Decl then
   --# scope-start
--# expr-start 7451 '<FieldAccess for spark_mode_aspect at nodes.lkt:13794:25>' Fld_4 ada/nodes.lkt:13794
--# expr-start 7450 '<FieldAccess for public_part at nodes.lkt:13794:25>' Fld_3 ada/nodes.lkt:13794
      if Var_Expr_200.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Public_Part (Node => Var_Expr_200.Node.Base_Package_Decl_F_Public_Part, Info => Var_Expr_200.Info);
--# expr-done 7450
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.spark_mode_aspect'
Fld_4 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Spark_Mode_Aspect (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 7451
Scope_Result_1 := Fld_4;
   --# end
   Result_Var := Scope_Result_1;
else
   Result_Var := No_Aspect;
end if;
   Result_Var_1 := Result_Var;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Private_Part_P_Spark_Mode_Aspect;
--# end
--# property-start PrivatePart._env_mappings_212 ada/nodes.lkt:13802
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_212
  (Node : Bare_Private_Part
  )
   return Internal_Env_Assoc
is
   Self : Bare_Private_Part  := Bare_Private_Part (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1876 with Inline_Always;
      Sym : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Expr : Bare_Private_Part;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1876 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1876;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7454 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 7452 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 7452
--# expr-start 7453 '<Symbol __privatepart at nodes.lkt:13802:23>' Sym ada/nodes.lkt:13802
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Privatepart); 
--# expr-done 7453
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Sym, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 7454
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1876;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1876;
            raise;
      end;
   return Property_Result;
end Env_Mappings_212;
--# end
--# property-start PrivatePart._env_trans_parent_213 ada/nodes.lkt:13803
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_213
  (Node : Bare_Private_Part
  )
   return Boolean
is
   Self : Bare_Private_Part  := Bare_Private_Part (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_213;
--# end
--# property-start PrivatePart._env_names_214 ada/nodes.lkt:13803
pragma Warnings (Off, "is not referenced");
 function Env_Names_214
  (Node : Bare_Private_Part
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Private_Part  := Bare_Private_Part (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1878 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1878 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1878;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7455 '<FieldAccess for env_names at nodes.lkt:13803:47>' Fld ada/nodes.lkt:13803
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start PrivatePart.env_names
Fld := Libadalang.Implementation.Private_Part_P_Env_Names (Node => Self);
--# end
--# expr-done 7455
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1878;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1878;
            raise;
      end;
   return Property_Result;
end Env_Names_214;
--# end
   --
   --  Primitives for Bare_Public_Part
   --
      procedure Initialize_Fields_For_Public_Part
        (Self : Bare_Public_Part
         ; Declarative_Part_F_Decls : Bare_Ada_Node_List
        ) is
      begin
            Initialize_Fields_For_Declarative_Part
              (Self, Declarative_Part_F_Decls);
      end Initialize_Fields_For_Public_Part;
   --
   --  Primitives for Bare_Elsif_Expr_Part
   --
      procedure Initialize_Fields_For_Elsif_Expr_Part
        (Self : Bare_Elsif_Expr_Part
         ; Elsif_Expr_Part_F_Cond_Expr : Bare_Expr
         ; Elsif_Expr_Part_F_Then_Expr : Bare_Expr
        ) is
      begin
            Self.Elsif_Expr_Part_F_Cond_Expr := Elsif_Expr_Part_F_Cond_Expr;
            Self.Elsif_Expr_Part_F_Then_Expr := Elsif_Expr_Part_F_Then_Expr;
      end Initialize_Fields_For_Elsif_Expr_Part;
   function Elsif_Expr_Part_F_Cond_Expr
     (Node : Bare_Elsif_Expr_Part) return Bare_Expr
   is
   begin
         return Node.Elsif_Expr_Part_F_Cond_Expr;
   end;
   function Elsif_Expr_Part_F_Then_Expr
     (Node : Bare_Elsif_Expr_Part) return Bare_Expr
   is
   begin
         return Node.Elsif_Expr_Part_F_Then_Expr;
   end;
   --
   --  Primitives for Bare_Elsif_Stmt_Part
   --
      procedure Initialize_Fields_For_Elsif_Stmt_Part
        (Self : Bare_Elsif_Stmt_Part
         ; Elsif_Stmt_Part_F_Cond_Expr : Bare_Expr
         ; Elsif_Stmt_Part_F_Stmts : Bare_Stmt_List
        ) is
      begin
            Self.Elsif_Stmt_Part_F_Cond_Expr := Elsif_Stmt_Part_F_Cond_Expr;
            Self.Elsif_Stmt_Part_F_Stmts := Elsif_Stmt_Part_F_Stmts;
      end Initialize_Fields_For_Elsif_Stmt_Part;
   function Elsif_Stmt_Part_F_Cond_Expr
     (Node : Bare_Elsif_Stmt_Part) return Bare_Expr
   is
   begin
         return Node.Elsif_Stmt_Part_F_Cond_Expr;
   end;
   function Elsif_Stmt_Part_F_Stmts
     (Node : Bare_Elsif_Stmt_Part) return Bare_Stmt_List
   is
   begin
         return Node.Elsif_Stmt_Part_F_Stmts;
   end;
--# property-start ElsifStmtPart.xref_entry_point ada/nodes.lkt:13826
pragma Warnings (Off, "is not referenced");
 function Elsif_Stmt_Part_P_Xref_Entry_Point
  (Node : Bare_Elsif_Stmt_Part
  )
   return Boolean
is
   Self : Bare_Elsif_Stmt_Part  := Bare_Elsif_Stmt_Part (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Elsif_Stmt_Part_P_Xref_Entry_Point;
--# end
--# property-start ElsifStmtPart.xref_equation ada/nodes.lkt:13829
pragma Warnings (Off, "is not referenced");
 function Elsif_Stmt_Part_P_Xref_Equation
  (Node : Bare_Elsif_Stmt_Part
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Elsif_Stmt_Part  := Bare_Elsif_Stmt_Part (Node);
     Ent : Internal_Entity_Elsif_Stmt_Part :=
       Internal_Entity_Elsif_Stmt_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1098 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1098 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1098;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7460 '<LogicBinaryOp And at nodes.lkt:13830:9>' And_Pred ada/nodes.lkt:13830
--# expr-start 7457 '<FieldAccess for sub_equation at nodes.lkt:13830:9>' Fld_1 ada/nodes.lkt:13830
--# expr-start 7456 '<FieldAccess for cond_expr at nodes.lkt:13830:9>' Fld ada/nodes.lkt:13830
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Elsif_Stmt_Part_F_Cond_Expr, Info => Ent.Info);
--# expr-done 7456
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 7457
--# expr-start 7459 '<FieldAccess for expect_bool_derived_type at nodes.lkt:13831:14>' Fld_3 ada/nodes.lkt:13831
--# expr-start 7458 '<FieldAccess for cond_expr at nodes.lkt:13831:14>' Fld_2 ada/nodes.lkt:13831
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Elsif_Stmt_Part_F_Cond_Expr;
--# expr-done 7458
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_3 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Fld_2, Origin => Origin);
--# end
--# expr-done 7459
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13830:9") else null)); 
--# expr-done 7460
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1098;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1098;
            raise;
      end;
   return Property_Result;
end Elsif_Stmt_Part_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Expr
   --
      procedure Initialize_Fields_For_Expr
        (Self : Bare_Expr
        ) is
      begin
      Self.Expr_Logic_Vars := System.Null_Address;
      end Initialize_Fields_For_Expr;
--# property-start Expr.type_val ada/nodes.lkt:13846
pragma Warnings (Off, "is not referenced");
 function Expr_P_Type_Val
  (Node : Bare_Expr
  )
   return Internal_Entity
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   Property_Result : Internal_Entity;
      Fld : Logic_Var;
Is_Logic_Var_Defined : Boolean;
Eq_Solution : Internal_Entity;
If_Result : Internal_Entity;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7462 '<get_value at nodes.lkt:13846:39>' If_Result ada/nodes.lkt:13846
--# expr-start 7461 '<FieldAccess for type_var at nodes.lkt:13846:39>' Fld ada/nodes.lkt:13846
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7461
Is_Logic_Var_Defined := Entity_Vars.Is_Defined (Fld); 
if Is_Logic_Var_Defined then
Eq_Solution := Entity_Vars.Get_Value (Fld); 
   If_Result := Eq_Solution;
else
   If_Result := No_Entity;
end if;
--# expr-done 7462
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Type_Val;
--# end
--# property-start Expr.expression_type ada/nodes.lkt:13851
pragma Warnings (Off, "is not referenced");
 function Expr_P_Expression_Type
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity;
Fld : Logic_Var;
Fld_1 : Internal_Logic_Val_Result;
Fld_2 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7466 '<Cast to BaseTypeDecl at nodes.lkt:13852:9>' Cast_Result_1 ada/nodes.lkt:13852
--# expr-start 7465 '<FieldAccess for value at nodes.lkt:13852:9>' Fld_2 ada/nodes.lkt:13852
--# expr-start 7464 '<FieldAccess for logic_val at nodes.lkt:13852:9>' Fld_1 ada/nodes.lkt:13852
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 7463 '<FieldAccess for type_var at nodes.lkt:13852:30>' Fld ada/nodes.lkt:13852
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7463
--# property-call-start AdaNode.logic_val
Fld_1 := Libadalang.Implementation.Ada_Node_P_Logic_Val (Node => Self, From_Node => Cast_Result, Lvar => Fld);
--# end
--# expr-done 7464
Fld_2 := Fld_1.Value;
--# expr-done 7465
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 7466
         Property_Result := Cast_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Expression_Type;
--# end
--# property-start Expr.expected_expression_type ada/nodes.lkt:13857
pragma Warnings (Off, "is not referenced");
 function Expr_P_Expected_Expression_Type
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity;
Fld : Logic_Var;
Fld_1 : Internal_Logic_Val_Result;
Fld_2 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7470 '<Cast to BaseTypeDecl at nodes.lkt:13858:9>' Cast_Result_1 ada/nodes.lkt:13858
--# expr-start 7469 '<FieldAccess for value at nodes.lkt:13858:9>' Fld_2 ada/nodes.lkt:13858
--# expr-start 7468 '<FieldAccess for logic_val at nodes.lkt:13858:9>' Fld_1 ada/nodes.lkt:13858
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 7467 '<FieldAccess for expected_type_var at nodes.lkt:13858:30>' Fld ada/nodes.lkt:13858
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7467
--# property-call-start AdaNode.logic_val
Fld_1 := Libadalang.Implementation.Ada_Node_P_Logic_Val (Node => Self, From_Node => Cast_Result, Lvar => Fld);
--# end
--# expr-done 7468
Fld_2 := Fld_1.Value;
--# expr-done 7469
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 7470
         Property_Result := Cast_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Expected_Expression_Type;
--# end
--# property-start Expr.matches_expected_type ada/nodes.lkt:13861
pragma Warnings (Off, "is not referenced");
 function Expr_P_Matches_Expected_Type
  (Node : Bare_Expr
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_168 with Inline_Always;
      Cast_Expr : Bare_Expr;
Cast_Result : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld : Logic_Var;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_168 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_168;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7474 '<bind at nodes.lkt:13862:9>' Dyn_Var_Bind_Result ada/nodes.lkt:13862
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Error_Location := Cast_Result; 
--# expr-start 7473 '<Predicate on BaseTypeDecl.matching_type at nodes.lkt:13863:9>' Pred ada/nodes.lkt:13863
--# expr-start 7471 '<FieldAccess for type_var at nodes.lkt:13863:37>' Fld ada/nodes.lkt:13863
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7471
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 7472 '<FieldAccess for expected_type_var at nodes.lkt:13863:54>' Fld_1 ada/nodes.lkt:13863
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7472
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_N_Predicate ((Fld, Fld_1), Create_Base_Type_Decl_P_Matching_Type_0_Predicate (Origin, Bound_Error_Location)); 
--# expr-done 7473
Dyn_Var_Bind_Result := Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7474
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_168;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_168;
            raise;
      end;
   return Property_Result;
end Expr_P_Matches_Expected_Type;
--# end
--# property-start Expr.matches_expected_assign_type ada/nodes.lkt:13867
pragma Warnings (Off, "is not referenced");
 function Expr_P_Matches_Expected_Assign_Type
  (Node : Bare_Expr
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_169 with Inline_Always;
      Cast_Expr : Bare_Expr;
Cast_Result : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld : Logic_Var;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_169 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_169;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7478 '<bind at nodes.lkt:13868:9>' Dyn_Var_Bind_Result ada/nodes.lkt:13868
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Error_Location := Cast_Result; 
--# expr-start 7477 '<Predicate on BaseTypeDecl.matching_assign_type at nodes.lkt:13869:9>' Pred ada/nodes.lkt:13869
--# expr-start 7475 '<FieldAccess for type_var at nodes.lkt:13869:44>' Fld ada/nodes.lkt:13869
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7475
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 7476 '<FieldAccess for expected_type_var at nodes.lkt:13870:9>' Fld_1 ada/nodes.lkt:13870
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7476
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_N_Predicate ((Fld, Fld_1), Create_Base_Type_Decl_P_Matching_Assign_Type_0_Predicate (Origin, Bound_Error_Location)); 
--# expr-done 7477
Dyn_Var_Bind_Result := Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7478
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_169;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_169;
            raise;
      end;
   return Property_Result;
end Expr_P_Matches_Expected_Assign_Type;
--# end
--# property-start Expr.matches_expected_formal_type ada/nodes.lkt:13874
pragma Warnings (Off, "is not referenced");
 function Expr_P_Matches_Expected_Formal_Type
  (Node : Bare_Expr
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_170 with Inline_Always;
      Cast_Expr : Bare_Expr;
Cast_Result : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld : Logic_Var;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_170 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_170;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7482 '<bind at nodes.lkt:13875:9>' Dyn_Var_Bind_Result ada/nodes.lkt:13875
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Error_Location := Cast_Result; 
--# expr-start 7481 '<Predicate on BaseTypeDecl.matching_formal_type at nodes.lkt:13876:9>' Pred ada/nodes.lkt:13876
--# expr-start 7479 '<FieldAccess for type_var at nodes.lkt:13876:44>' Fld ada/nodes.lkt:13876
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7479
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 7480 '<FieldAccess for expected_type_var at nodes.lkt:13877:9>' Fld_1 ada/nodes.lkt:13877
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7480
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_N_Predicate ((Fld, Fld_1), Create_Base_Type_Decl_P_Matching_Formal_Type_0_Predicate (Origin, Bound_Error_Location)); 
--# expr-done 7481
Dyn_Var_Bind_Result := Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7482
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_170;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_170;
            raise;
      end;
   return Property_Result;
end Expr_P_Matches_Expected_Formal_Type;
--# end
--# property-start Expr.matches_expected_membership_type ada/nodes.lkt:13881
pragma Warnings (Off, "is not referenced");
 function Expr_P_Matches_Expected_Membership_Type
  (Node : Bare_Expr
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_171 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
            procedure Finalizer_Scope_171 is
            begin
                     Dec_Ref (Pred);
            end Finalizer_Scope_171;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7485 '<Predicate on BaseTypeDecl.matching_membership_type at nodes.lkt:13882:9>' Pred ada/nodes.lkt:13882
--# expr-start 7483 '<FieldAccess for type_var at nodes.lkt:13882:48>' Fld ada/nodes.lkt:13882
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7483
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 7484 '<FieldAccess for expected_type_var at nodes.lkt:13883:9>' Fld_1 ada/nodes.lkt:13883
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7484
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_N_Predicate ((Fld, Fld_1), Create_Base_Type_Decl_P_Matching_Membership_Type_0_Predicate (Origin)); 
--# expr-done 7485
         Property_Result := Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_171;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_171;
            raise;
      end;
   return Property_Result;
end Expr_P_Matches_Expected_Membership_Type;
--# end
--# property-start Expr.matches_expected_prefix_type ada/nodes.lkt:13886
pragma Warnings (Off, "is not referenced");
 function Expr_P_Matches_Expected_Prefix_Type
  (Node : Bare_Expr
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_172 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
            procedure Finalizer_Scope_172 is
            begin
                     Dec_Ref (Pred);
            end Finalizer_Scope_172;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7488 '<Predicate on BaseTypeDecl.matching_prefix_type at nodes.lkt:13887:9>' Pred ada/nodes.lkt:13887
--# expr-start 7486 '<FieldAccess for type_var at nodes.lkt:13887:44>' Fld ada/nodes.lkt:13887
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7486
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 7487 '<FieldAccess for expected_type_var at nodes.lkt:13888:9>' Fld_1 ada/nodes.lkt:13888
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7487
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_N_Predicate ((Fld, Fld_1), Create_Base_Type_Decl_P_Matching_Prefix_Type_0_Predicate (Origin)); 
--# expr-done 7488
         Property_Result := Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_172;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_172;
            raise;
      end;
   return Property_Result;
end Expr_P_Matches_Expected_Prefix_Type;
--# end
--# property-start Expr.expect_bool_derived_type ada/nodes.lkt:13894
pragma Warnings (Off, "is not referenced");
 function Expr_P_Expect_Bool_Derived_Type
  (Node : Bare_Expr
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_173 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Logic_Var;
Bind_Result_1 : Logic_Equation;
Or_Pred : Logic_Equation;
Cast_Expr : Bare_Expr;
Cast_Result_1 : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld_4 : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_173 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_173;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7499 '<LogicBinaryOp And at nodes.lkt:13895:9>' And_Pred ada/nodes.lkt:13895
--# expr-start 7495 '<LogicBinaryOp Or at nodes.lkt:13896:13>' Or_Pred ada/nodes.lkt:13896
--# expr-start 7491 '<Bind at nodes.lkt:13896:13>' Bind_Result ada/nodes.lkt:13896
--# expr-start 7489 '<FieldAccess for expected_type_var at nodes.lkt:13896:13>' Fld ada/nodes.lkt:13896
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7489
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 7490 '<FieldAccess for bool_type at nodes.lkt:13896:41>' Fld_1 ada/nodes.lkt:13896
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 7490
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13896:13") else null)); 
--# expr-done 7491
--# expr-start 7494 '<NPropagate at nodes.lkt:13897:17>' Bind_Result_1 ada/nodes.lkt:13897
--# expr-start 7492 '<FieldAccess for type_var at nodes.lkt:13898:51>' Fld_3 ada/nodes.lkt:13898
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7492
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 7493 '<FieldAccess for expected_type_var at nodes.lkt:13897:17>' Fld_2 ada/nodes.lkt:13897
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7493
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result_1 := Solver.Create_Propagate (Fld_3, Fld_2, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13897:17") else null)); 
--# expr-done 7494
Or_Pred := Create_Or (Bind_Result, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13896:13") else null)); 
--# expr-done 7495
--# expr-start 7498 '<bind at nodes.lkt:13901:13>' Dyn_Var_Bind_Result ada/nodes.lkt:13901
Cast_Expr := Self; 
      Cast_Result_1 := Cast_Expr;
Bound_Error_Location := Cast_Result_1; 
--# expr-start 7497 '<Predicate on BaseTypeDecl.derives_from_std_bool_type at nodes.lkt:13902:13>' Pred ada/nodes.lkt:13902
--# expr-start 7496 '<FieldAccess for type_var at nodes.lkt:13902:54>' Fld_4 ada/nodes.lkt:13902
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7496
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Pred := Solver.Create_Predicate (Fld_4, Create_Base_Type_Decl_P_Derives_From_Std_Bool_Type_0_Predicate (Origin, Bound_Error_Location)); 
--# expr-done 7497
Dyn_Var_Bind_Result := Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7498
And_Pred := Create_And (Or_Pred, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13895:9") else null)); 
--# expr-done 7499
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_173;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_173;
            raise;
      end;
   return Property_Result;
end Expr_P_Expect_Bool_Derived_Type;
--# end
--# property-start Expr.annotate_argument_equation ada/nodes.lkt:13915
pragma Warnings (Off, "is not referenced");
 function Expr_P_Annotate_Argument_Equation
  (Node : Bare_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_174 with Inline_Always;
            procedure Finalizer_Scope_2973 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Fld : Logic_Equation;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Array_Lit : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_4 : Logic_Var;
Domain_Equation : Logic_Equation;
And_Pred : Logic_Equation;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_5 : Logic_Equation;
Scope_Result : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Or_Pred : Logic_Equation;
            procedure Finalizer_Scope_174 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Domain_Equation);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Or_Pred);
            end Finalizer_Scope_174;
            procedure Finalizer_Scope_2973 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_2973;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7510 '<LogicBinaryOp Or at nodes.lkt:13916:9>' Or_Pred ada/nodes.lkt:13916
--# expr-start 7507 '<LogicBinaryOp And at nodes.lkt:13917:13>' And_Pred ada/nodes.lkt:13917
--# expr-start 7500 '<FieldAccess for sub_equation at nodes.lkt:13917:13>' Fld ada/nodes.lkt:13917
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 7500
--# expr-start 7506 '<domain at nodes.lkt:13918:18>' Domain_Equation ada/nodes.lkt:13918
--# expr-start 7504 '<ArrayLiteral at nodes.lkt:13920:17>' Array_Lit ada/nodes.lkt:13920
--# expr-start 7501 '<FieldAccess for std_string_type at nodes.lkt:13922:21>' Fld_1 ada/nodes.lkt:13922
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 7501
--# expr-start 7502 '<FieldAccess for std_wide_string_type at nodes.lkt:13923:21>' Fld_2 ada/nodes.lkt:13923
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_wide_string_type
Fld_2 := Libadalang.Implementation.Ada_Node_P_Std_Wide_String_Type (Node => Self);
--# end
--# expr-done 7502
--# expr-start 7503 '<FieldAccess for std_wide_wide_string_type at nodes.lkt:13924:21>' Fld_3 ada/nodes.lkt:13924
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_wide_wide_string_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Std_Wide_Wide_String_Type (Node => Self);
--# end
--# expr-done 7503
Array_Lit := Create_Internal_Entity_Base_Type_Decl_Array (Internal_Internal_Entity_Base_Type_Decl_Array'(1 => No_Entity_Base_Type_Decl, 2 => Fld_1, 3 => Fld_2, 4 => Fld_3)); 
--# expr-done 7504
--# expr-start 7505 '<FieldAccess for expected_type_var at nodes.lkt:13919:17>' Fld_4 ada/nodes.lkt:13919
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7505
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
declare
   Dom : Internal_Entity_Base_Type_Decl_Array_Access := Array_Lit;
   A   : Entity_Vars.Value_Array (1 .. Length (Dom));
begin
   for J in 0 .. Length (Dom) - 1 loop
      declare
         Item : constant Internal_Entity_Base_Type_Decl := Get (Self, Dom, J);
      begin
         A (J + 1) := (Node => Item.Node, Info => Item.Info);
      end;
   end loop;
   Domain_Equation := Solver.Create_Domain
     (Fld_4, A, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13918:18") else null));
end;
--# expr-done 7506
And_Pred := Create_And (Fld, Domain_Equation, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13917:13") else null)); 
--# expr-done 7507
--# expr-start 7508 '<Cast to Name at nodes.lkt:13928:13>' Cast_Result ada/nodes.lkt:13928
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 7508
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind name Var_Expr_0
--# expr-start 7509 '<FieldAccess for xref_no_overloading at nodes.lkt:13929:23>' Fld_5 ada/nodes.lkt:13929
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_5 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7509
Scope_Result := Fld_5;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_2973;
   Result_Var := Scope_Result;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13930:25") else null)); 
   Result_Var := False_Rel;
end if;
      Inc_Ref (Result_Var);
Or_Pred := Create_Or (And_Pred, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:13916:9") else null)); 
--# expr-done 7510
         Property_Result := Or_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_174;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_174;
                     Finalizer_Scope_2973;
            raise;
      end;
   return Property_Result;
end Expr_P_Annotate_Argument_Equation;
--# end
--# property-start Expr.is_dynamically_tagged ada/nodes.lkt:13937
pragma Warnings (Off, "is not referenced");
 function Expr_P_Is_Dynamically_Tagged
  (Node : Bare_Expr
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
            procedure Finalizer_Scope_2978 with Inline_Always;
      Match_0 : Internal_Entity_Qual_Expr;
Match_1 : Internal_Entity_Name;
Var_Expr_0 : Internal_Entity_Base_Subp_Spec;
Match_2 : Internal_Entity_Cond_Expr;
Match_3 : Internal_Entity_Decl_Expr;
Match_4 : Internal_Entity_Paren_Expr;
Match_5 : Internal_Entity_Expr;
Var_Expr_201 : Internal_Entity_Base_Type_Decl;
Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
Fld_6 : Internal_Entity_Expr;
Fld_7 : Boolean;
Fld_8 : Boolean;
Fld_9 : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result : Internal_Entity_Base_Subp_Spec;
Fld_10 : Boolean;
Fld_11 : Boolean;
If_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_2 : Boolean;
Fld_12 : Internal_Entity_Expr_Array_Access;
Fld_13 : Boolean;
Quantifier_Result : Boolean;
Fld_14 : Internal_Entity_Expr;
Fld_15 : Boolean;
Fld_16 : Internal_Entity_Expr;
Fld_17 : Boolean;
Match_Prefix : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Qual_Expr;
Let_Result : Boolean;
Scope_Result_2 : Boolean;
Cast_Result_2 : Internal_Entity_Name;
Let_Result_1 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_3 : Internal_Entity_Cond_Expr;
Let_Result_2 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_4 : Internal_Entity_Decl_Expr;
Let_Result_3 : Boolean;
Scope_Result_5 : Boolean;
Cast_Result_5 : Internal_Entity_Paren_Expr;
Let_Result_4 : Boolean;
Scope_Result_6 : Boolean;
Cast_Result_6 : Internal_Entity_Expr;
Let_Result_5 : Boolean;
Scope_Result_7 : Boolean;
Match_Result : Boolean;
If_Result_3 : Boolean;
Dyn_Var_Bind_Result : Boolean;
            procedure Finalizer_Scope_2978 is
            begin
                     Dec_Ref (Fld_12);
            end Finalizer_Scope_2978;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7536 '<bind at nodes.lkt:13939:9>' Dyn_Var_Bind_Result ada/nodes.lkt:13939
--# expr-start 7511 '<FieldAccess for origin_node at nodes.lkt:13939:23>' Fld ada/nodes.lkt:13939
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 7511
Bound_Origin := Fld; 
--# expr-start 7535 '<BooleanBinaryOp Or at nodes.lkt:13941:9>' If_Result_3 ada/nodes.lkt:13941
--# expr-start 7517 '<BooleanBinaryOp Or at nodes.lkt:13941:9>' If_Result ada/nodes.lkt:13941
--# expr-start 7513 '<FieldAccess for is_classwide at nodes.lkt:13941:9>' Fld_2 ada/nodes.lkt:13941
--# expr-start 7512 '<FieldAccess for expression_type at nodes.lkt:13941:9>' Fld_1 ada/nodes.lkt:13941
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_1 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7512
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 7513
if Fld_2 then
   If_Result := True;
else
--# expr-start 7515 '<FieldAccess for accessed_type at nodes.lkt:13942:12>' Fld_4 ada/nodes.lkt:13942
--# expr-start 7514 '<FieldAccess for expression_type at nodes.lkt:13942:12>' Fld_3 ada/nodes.lkt:13942
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_3 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7514
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Fld_3.Node, Origin => Bound_Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 7515
Var_Expr_201 := Fld_4;
if Var_Expr_201 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 7516 '<FieldAccess for is_classwide at nodes.lkt:13942:12>' Fld_5 ada/nodes.lkt:13942
      if Var_Expr_201.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Var_Expr_201.Node, E_Info => Var_Expr_201.Info);
--# end
--# expr-done 7516
Scope_Result := Fld_5;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 7517
if If_Result then
   If_Result_3 := True;
else
   --# expr-start 7534 '<Match at nodes.lkt:13943:12>' Match_Result ada/nodes.lkt:13943
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Expr (Match_Prefix.Node.Kind) is
         when Ada_Qual_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Qual_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind qual_expr Match_0
--# expr-start 7519 '<FieldAccess for is_dynamically_tagged at nodes.lkt:13945:17>' Fld_7 ada/nodes.lkt:13945
--# expr-start 7518 '<FieldAccess for suffix at nodes.lkt:13945:17>' Fld_6 ada/nodes.lkt:13945
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Match_0.Node.Qual_Expr_F_Suffix, Info => Match_0.Info);
--# expr-done 7518
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_dynamically_tagged
Fld_7 := Libadalang.Implementation.Expr_P_Is_Dynamically_Tagged (Node => Fld_6.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_6.Info);
--# end
--# expr-done 7519
Let_Result := Fld_7; 
--# end
Scope_Result_2 := Let_Result;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Explicit_Deref | Ada_Reduce_Attribute_Ref .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind n Match_1
--# expr-start 7526 '<BooleanBinaryOp And at nodes.lkt:13951:17>' If_Result_2 ada/nodes.lkt:13951
--# expr-start 7520 '<FieldAccess for is_direct_call at nodes.lkt:13951:17>' Fld_8 ada/nodes.lkt:13951
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_direct_call
Fld_8 := Libadalang.Implementation.Name_P_Is_Direct_Call (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 7520
if Fld_8 then
--# expr-start 7522 '<Cast to BaseSubpSpec at nodes.lkt:13952:21>' Cast_Result ada/nodes.lkt:13952
--# expr-start 7521 '<FieldAccess for called_subp_spec at nodes.lkt:13952:21>' Fld_9 ada/nodes.lkt:13952
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.called_subp_spec
Fld_9 := Libadalang.Implementation.Name_P_Called_Subp_Spec (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 7521
   if Fld_9.Node = null
      or else Fld_9.Node.Kind in Ada_Base_Subp_Spec
   then
      Cast_Result := Create_Internal_Entity_Base_Subp_Spec
        (Node => Fld_9.Node,
         Info => Fld_9.Info);
   else
         Cast_Result := No_Entity_Base_Subp_Spec;
   end if;
--# expr-done 7522
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 7525 '<BooleanBinaryOp And at nodes.lkt:13954:21>' If_Result_1 ada/nodes.lkt:13954
--# expr-start 7523 '<FieldAccess for has_controlling_result at nodes.lkt:13954:21>' Fld_10 ada/nodes.lkt:13954
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.has_controlling_result
Fld_10 := Libadalang.Implementation.Base_Subp_Spec_P_Has_Controlling_Result (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7523
if Fld_10 then
   --# expr-start 7524 '<FieldAccess for has_dynamic_controlling_operand at nodes.lkt:13955:25>' Fld_11 ada/nodes.lkt:13955
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.has_dynamic_controlling_operand
Fld_11 := Libadalang.Implementation.Expr_P_Has_Dynamic_Controlling_Operand (Node => Match_1.Node, Spec => Var_Expr_0, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_1.Info);
--# end
--# expr-done 7524
   If_Result_1 := Fld_11;
else
   If_Result_1 := False;
end if;
--# expr-done 7525
Scope_Result_1 := If_Result_1;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_2 := Result_Var_1;
else
   If_Result_2 := False;
end if;
--# expr-done 7526
Let_Result_1 := If_Result_2; 
--# end
Scope_Result_3 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Case_Expr .. Ada_If_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Cond_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind cond_expr Match_2
--# expr-start 7529 '<AllQuantifier at nodes.lkt:13958:17>' Quantifier_Result ada/nodes.lkt:13958
   --# expr-start 7527 '<FieldAccess for dependent_exprs at nodes.lkt:13958:17>' Fld_12 ada/nodes.lkt:13958
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]CondExpr.dependent_exprs'
Fld_12 := Libadalang.Implementation.Dispatcher_Cond_Expr_P_Dependent_Exprs (Node => Match_2.Node, E_Info => Match_2.Info);
--# end
--# expr-done 7527
      Quantifier_Result := True;
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Fld_12;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
      --# expr-start 7528 '<FieldAccess for is_dynamically_tagged at nodes.lkt:13959:28>' Fld_13 ada/nodes.lkt:13959
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_dynamically_tagged
Fld_13 := Libadalang.Implementation.Expr_P_Is_Dynamically_Tagged (Node => Item_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Item_1.Info);
--# end
--# expr-done 7528
      Quantifier_Result := Fld_13;
   --# end
               exit when not Quantifier_Result;
         end loop;
      end;
--# expr-done 7529
Let_Result_2 := Quantifier_Result; 
--# end
Scope_Result_4 := Let_Result_2;
   --# end
      Finalizer_Scope_2978;
            Match_Result := Scope_Result_4; 
         when Ada_Decl_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Decl_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_4; 
--# bind decl_expr Match_3
--# expr-start 7531 '<FieldAccess for is_dynamically_tagged at nodes.lkt:13961:41>' Fld_15 ada/nodes.lkt:13961
--# expr-start 7530 '<FieldAccess for expr at nodes.lkt:13961:41>' Fld_14 ada/nodes.lkt:13961
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Expr (Node => Match_3.Node.Decl_Expr_F_Expr, Info => Match_3.Info);
--# expr-done 7530
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_dynamically_tagged
Fld_15 := Libadalang.Implementation.Expr_P_Is_Dynamically_Tagged (Node => Fld_14.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_14.Info);
--# end
--# expr-done 7531
Let_Result_3 := Fld_15; 
--# end
Scope_Result_5 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Paren_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Paren_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_5; 
--# bind paren_expr Match_4
--# expr-start 7533 '<FieldAccess for is_dynamically_tagged at nodes.lkt:13963:17>' Fld_17 ada/nodes.lkt:13963
--# expr-start 7532 '<FieldAccess for expr at nodes.lkt:13963:17>' Fld_16 ada/nodes.lkt:13963
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Create_Internal_Entity_Expr (Node => Match_4.Node.Paren_Expr_F_Expr, Info => Match_4.Info);
--# expr-done 7532
      if Fld_16.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_dynamically_tagged
Fld_17 := Libadalang.Implementation.Expr_P_Is_Dynamically_Tagged (Node => Fld_16.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_16.Info);
--# end
--# expr-done 7533
Let_Result_4 := Fld_17; 
--# end
Scope_Result_6 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Abstract_State_Decl_Expr .. Ada_Concat_Operand | Ada_Contract_Cases | Ada_Format_String_Literal .. Ada_Membership_Expr | Ada_Quantified_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_6; 
--# bind _ Match_5
Let_Result_5 := False; 
--# end
Scope_Result_7 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_7; 
end case;
--# expr-done 7534
   If_Result_3 := Match_Result;
end if;
--# expr-done 7535
Dyn_Var_Bind_Result := If_Result_3; 
--# expr-done 7536
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2978;
            raise;
      end;
   return Property_Result;
end Expr_P_Is_Dynamically_Tagged;
--# end
--# property-start Expr.has_dynamic_controlling_operand ada/nodes.lkt:13971
pragma Warnings (Off, "is not referenced");
 function Expr_P_Has_Dynamic_Controlling_Operand
  (Node : Bare_Expr
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind spec Spec
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
            procedure Finalizer_Scope_176 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Expected_Type_For_Expr_Array_Access;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Boolean;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Boolean;
If_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Quantifier_Result : Boolean;
            procedure Finalizer_Scope_176 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_176;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7545 '<AnyQuantifier at nodes.lkt:13978:9>' Quantifier_Result ada/nodes.lkt:13978
   --# expr-start 7537 '<FieldAccess for potential_actuals_for_dispatch at nodes.lkt:13978:9>' Fld ada/nodes.lkt:13978
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.potential_actuals_for_dispatch'
Fld := Libadalang.Implementation.Dispatcher_Expr_P_Potential_Actuals_For_Dispatch (Node => Ent.Node, Spec => Spec, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 7537
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Expected_Type_For_Expr_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind c Item_0
--# expr-start 7539 '<FieldAccess for get_candidate_type_for_primitive at nodes.lkt:13980:13>' Fld_2 ada/nodes.lkt:13980
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7538 '<FieldAccess for expected_type at nodes.lkt:13980:51>' Fld_1 ada/nodes.lkt:13980
Fld_1 := Item_0.Expected_Type;
--# expr-done 7538
--# property-call-start BaseSubpSpec.get_candidate_type_for_primitive
Fld_2 := Libadalang.Implementation.Base_Subp_Spec_P_Get_Candidate_Type_For_Primitive (Node => Spec.Node, Type_Expr => Fld_1, E_Info => Spec.Info);
--# end
--# expr-done 7539
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_1
--# expr-start 7544 '<BooleanBinaryOp And at nodes.lkt:13982:17>' If_Result ada/nodes.lkt:13982
--# expr-start 7541 '<FieldAccess for is_tagged_type at nodes.lkt:13987:21>' Fld_4 ada/nodes.lkt:13987
--# expr-start 7540 '<FieldAccess for full_view at nodes.lkt:13987:21>' Fld_3 ada/nodes.lkt:13987
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.full_view
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Full_View (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 7540
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_tagged_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Tagged_Type (Node => Fld_3.Node, Origin => No_Bare_Ada_Node, E_Info => Fld_3.Info);
--# end
--# expr-done 7541
if Fld_4 then
   --# expr-start 7543 '<FieldAccess for is_dynamically_tagged at nodes.lkt:13989:21>' Fld_6 ada/nodes.lkt:13989
--# expr-start 7542 '<FieldAccess for expr at nodes.lkt:13989:21>' Fld_5 ada/nodes.lkt:13989
Fld_5 := Item_0.Expr;
--# expr-done 7542
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_dynamically_tagged
Fld_6 := Libadalang.Implementation.Expr_P_Is_Dynamically_Tagged (Node => Fld_5.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_5.Info);
--# end
--# expr-done 7543
   If_Result := Fld_6;
else
   If_Result := False;
end if;
--# expr-done 7544
Scope_Result := If_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      Quantifier_Result := Result_Var;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 7545
         Property_Result := Quantifier_Result;
   --# end
      Finalizer_Scope_176;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_176;
            raise;
      end;
   return Property_Result;
end Expr_P_Has_Dynamic_Controlling_Operand;
--# end
--# property-start Expr.parent_candidate_dispatching_call ada/nodes.lkt:13996
pragma Warnings (Off, "is not referenced");
 function Expr_P_Parent_Candidate_Dispatching_Call
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
            procedure Finalizer_Scope_2989 with Inline_Always;
      Match_0 : Internal_Entity_Call_Expr;
Match_1 : Internal_Entity_Dotted_Name;
Match_2 : Internal_Entity_Un_Op;
Match_3 : Internal_Entity_Bin_Op;
Match_4 : Internal_Entity_Cond_Expr;
Match_5 : Internal_Entity_Paren_Expr;
Match_6 : Internal_Entity_Qual_Expr;
Match_7 : Internal_Entity_Decl_Expr;
Match_8 : Internal_Entity_Param_Assoc;
Match_9 : Internal_Entity;
Fld : Internal_Entity;
Fld_1 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Call_Expr;
Cast_Result : Internal_Entity_Expr;
Fld_2 : Internal_Entity_Name;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Expr;
Fld_3 : Internal_Entity_Expr;
Cast_Expr_2 : Internal_Entity_Dotted_Name;
Cast_Result_3 : Internal_Entity_Expr;
Fld_4 : Internal_Entity_Base_Id;
Cast_Expr_3 : Internal_Entity_Expr;
Cast_Result_4 : Internal_Entity;
Cast_Result_5 : Internal_Entity;
Is_Equiv_1 : Boolean;
If_Result_1 : Internal_Entity_Expr;
Fld_5 : Internal_Entity_Expr;
Cast_Expr_4 : Internal_Entity_Un_Op;
Cast_Result_6 : Internal_Entity_Expr;
Fld_6 : Internal_Entity_Op;
Cast_Expr_5 : Internal_Entity_Expr;
Cast_Result_7 : Internal_Entity;
Cast_Result_8 : Internal_Entity;
Is_Equiv_2 : Boolean;
If_Result_2 : Internal_Entity_Expr;
Fld_7 : Internal_Entity_Expr;
Cast_Expr_6 : Internal_Entity_Bin_Op;
Cast_Result_9 : Internal_Entity_Expr;
Fld_8 : Internal_Entity_Op;
Cast_Expr_7 : Internal_Entity_Expr;
Cast_Result_10 : Internal_Entity;
Cast_Result_11 : Internal_Entity;
Is_Equiv_3 : Boolean;
If_Result_3 : Internal_Entity_Expr;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Internal_Entity_Expr_Array_Access;
Cast_Expr_8 : Internal_Entity_Expr;
Cast_Result_12 : Internal_Entity;
Cast_Expr_9 : Internal_Entity_Expr;
Cast_Result_13 : Internal_Entity;
Is_Equiv_4 : Boolean;
Quantifier_Result : Boolean;
If_Result_4 : Internal_Entity_Expr;
Fld_11 : Internal_Entity_Expr;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Internal_Entity_Expr;
Fld_14 : Internal_Entity;
Fld_15 : Internal_Entity;
Cast_Result_14 : Internal_Entity_Call_Expr;
Match_Prefix : Internal_Entity;
Cast_Result_15 : Internal_Entity_Call_Expr;
Let_Result : Internal_Entity_Expr;
Scope_Result : Internal_Entity_Expr;
Cast_Result_16 : Internal_Entity_Dotted_Name;
Let_Result_1 : Internal_Entity_Expr;
Scope_Result_1 : Internal_Entity_Expr;
Cast_Result_17 : Internal_Entity_Un_Op;
Let_Result_2 : Internal_Entity_Expr;
Scope_Result_2 : Internal_Entity_Expr;
Cast_Result_18 : Internal_Entity_Bin_Op;
Let_Result_3 : Internal_Entity_Expr;
Scope_Result_3 : Internal_Entity_Expr;
Cast_Result_19 : Internal_Entity_Cond_Expr;
Let_Result_4 : Internal_Entity_Expr;
Scope_Result_4 : Internal_Entity_Expr;
Cast_Result_20 : Internal_Entity_Paren_Expr;
Let_Result_5 : Internal_Entity_Expr;
Scope_Result_5 : Internal_Entity_Expr;
Cast_Result_21 : Internal_Entity_Qual_Expr;
Let_Result_6 : Internal_Entity_Expr;
Scope_Result_6 : Internal_Entity_Expr;
Cast_Result_22 : Internal_Entity_Decl_Expr;
Let_Result_7 : Internal_Entity_Expr;
Scope_Result_7 : Internal_Entity_Expr;
Cast_Result_23 : Internal_Entity_Param_Assoc;
Cast_Result_24 : Internal_Entity_Expr;
Let_Result_8 : Internal_Entity_Expr;
Scope_Result_8 : Internal_Entity_Expr;
Cast_Result_25 : Internal_Entity;
Let_Result_9 : Internal_Entity_Expr;
Scope_Result_9 : Internal_Entity_Expr;
Match_Result : Internal_Entity_Expr;
            procedure Finalizer_Scope_2989 is
            begin
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_2989;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7574 '<Match at nodes.lkt:13996:61>' Match_Result ada/nodes.lkt:13996
--# expr-start 7546 '<parent at nodes.lkt:13996:67>' Fld ada/nodes.lkt:13996
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 7546
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_15 := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_15; 
--# bind ce Match_0
--# expr-start 7550 '<If at nodes.lkt:13998:13>' If_Result ada/nodes.lkt:13998
--# expr-start 7548 '<Eq at nodes.lkt:13998:16>' Is_Equiv ada/nodes.lkt:13998
Cast_Expr_1 := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# expr-start 7547 '<FieldAccess for name at nodes.lkt:13998:24>' Fld_2 ada/nodes.lkt:13998
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Match_0.Node.Call_Expr_F_Name, Info => Match_0.Info);
--# expr-done 7547
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 7548
if Is_Equiv then
   --# expr-start 7549 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:13998:37>' Fld_1 ada/nodes.lkt:13998
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_1 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 7549
   If_Result := Fld_1;
else
Cast_Expr := Match_0; 
      Cast_Result := Create_Internal_Entity_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   If_Result := Cast_Result;
end if;
--# expr-done 7550
Let_Result := If_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_16 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_16; 
--# bind dn Match_1
--# expr-start 7554 '<If at nodes.lkt:14001:13>' If_Result_1 ada/nodes.lkt:14001
--# expr-start 7552 '<Eq at nodes.lkt:14001:16>' Is_Equiv_1 ada/nodes.lkt:14001
Cast_Expr_3 := Ent; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
--# expr-start 7551 '<FieldAccess for suffix at nodes.lkt:14001:24>' Fld_4 ada/nodes.lkt:14001
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Base_Id (Node => Match_1.Node.Dotted_Name_F_Suffix, Info => Match_1.Info);
--# expr-done 7551
      Cast_Result_5 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Is_Equiv_1 := Equivalent (Cast_Result_4, Cast_Result_5); 
--# expr-done 7552
if Is_Equiv_1 then
   --# expr-start 7553 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:14001:39>' Fld_3 ada/nodes.lkt:14001
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_3 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 7553
   If_Result_1 := Fld_3;
else
Cast_Expr_2 := Match_1; 
      Cast_Result_3 := Create_Internal_Entity_Expr
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   If_Result_1 := Cast_Result_3;
end if;
--# expr-done 7554
Let_Result_1 := If_Result_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_17 := Create_Internal_Entity_Un_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_17; 
--# bind uo Match_2
--# expr-start 7558 '<If at nodes.lkt:14004:13>' If_Result_2 ada/nodes.lkt:14004
--# expr-start 7556 '<Eq at nodes.lkt:14004:16>' Is_Equiv_2 ada/nodes.lkt:14004
Cast_Expr_5 := Ent; 
      Cast_Result_7 := Create_Internal_Entity
        (Node => Cast_Expr_5.Node,
         Info => Cast_Expr_5.Info);
--# expr-start 7555 '<FieldAccess for op at nodes.lkt:14004:24>' Fld_6 ada/nodes.lkt:14004
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Op (Node => Match_2.Node.Un_Op_F_Op, Info => Match_2.Info);
--# expr-done 7555
      Cast_Result_8 := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
Is_Equiv_2 := Equivalent (Cast_Result_7, Cast_Result_8); 
--# expr-done 7556
if Is_Equiv_2 then
   --# expr-start 7557 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:14004:35>' Fld_5 ada/nodes.lkt:14004
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_5 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Match_2.Node, E_Info => Match_2.Info);
--# end
--# expr-done 7557
   If_Result_2 := Fld_5;
else
Cast_Expr_4 := Match_2; 
      Cast_Result_6 := Create_Internal_Entity_Expr
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
   If_Result_2 := Cast_Result_6;
end if;
--# expr-done 7558
Let_Result_2 := If_Result_2; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Bin_Op .. Ada_Relation_Op =>
   --# scope-start
--# scope-start
      Cast_Result_18 := Create_Internal_Entity_Bin_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_18; 
--# bind bo Match_3
--# expr-start 7562 '<If at nodes.lkt:14007:13>' If_Result_3 ada/nodes.lkt:14007
--# expr-start 7560 '<Eq at nodes.lkt:14007:16>' Is_Equiv_3 ada/nodes.lkt:14007
Cast_Expr_7 := Ent; 
      Cast_Result_10 := Create_Internal_Entity
        (Node => Cast_Expr_7.Node,
         Info => Cast_Expr_7.Info);
--# expr-start 7559 '<FieldAccess for op at nodes.lkt:14007:24>' Fld_8 ada/nodes.lkt:14007
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Op (Node => Match_3.Node.Bin_Op_F_Op, Info => Match_3.Info);
--# expr-done 7559
      Cast_Result_11 := Create_Internal_Entity
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
Is_Equiv_3 := Equivalent (Cast_Result_10, Cast_Result_11); 
--# expr-done 7560
if Is_Equiv_3 then
   --# expr-start 7561 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:14007:35>' Fld_7 ada/nodes.lkt:14007
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_7 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Match_3.Node, E_Info => Match_3.Info);
--# end
--# expr-done 7561
   If_Result_3 := Fld_7;
else
Cast_Expr_6 := Match_3; 
      Cast_Result_9 := Create_Internal_Entity_Expr
        (Node => Cast_Expr_6.Node,
         Info => Cast_Expr_6.Info);
   If_Result_3 := Cast_Result_9;
end if;
--# expr-done 7562
Let_Result_3 := If_Result_3; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Case_Expr .. Ada_If_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_19 := Create_Internal_Entity_Cond_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_19; 
--# bind ce Match_4
--# expr-start 7567 '<If at nodes.lkt:14010:13>' If_Result_4 ada/nodes.lkt:14010
--# expr-start 7565 '<Contains at nodes.lkt:14010:16>' Quantifier_Result ada/nodes.lkt:14010
   --# expr-start 7563 '<FieldAccess for dependent_exprs at nodes.lkt:14010:16>' Fld_10 ada/nodes.lkt:14010
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]CondExpr.dependent_exprs'
Fld_10 := Libadalang.Implementation.Dispatcher_Cond_Expr_P_Dependent_Exprs (Node => Match_4.Node, E_Info => Match_4.Info);
--# end
--# expr-done 7563
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Fld_10;
      begin
         for Item_16 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_16
      --# expr-start 7564 '<Eq at ???>' Is_Equiv_4 None
Cast_Expr_8 := Item_16; 
      Cast_Result_12 := Create_Internal_Entity
        (Node => Cast_Expr_8.Node,
         Info => Cast_Expr_8.Info);
Cast_Expr_9 := Ent; 
      Cast_Result_13 := Create_Internal_Entity
        (Node => Cast_Expr_9.Node,
         Info => Cast_Expr_9.Info);
Is_Equiv_4 := Equivalent (Cast_Result_12, Cast_Result_13); 
--# expr-done 7564
      Quantifier_Result := Is_Equiv_4;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 7565
if Quantifier_Result then
   --# expr-start 7566 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:14011:18>' Fld_9 ada/nodes.lkt:14011
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_9 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Match_4.Node, E_Info => Match_4.Info);
--# end
--# expr-done 7566
   If_Result_4 := Fld_9;
else
   If_Result_4 := No_Entity_Expr;
end if;
--# expr-done 7567
Let_Result_4 := If_Result_4; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
      Finalizer_Scope_2989;
            Match_Result := Scope_Result_4; 
         when Ada_Paren_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_20 := Create_Internal_Entity_Paren_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_20; 
--# bind pe Match_5
--# expr-start 7568 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:14013:31>' Fld_11 ada/nodes.lkt:14013
      if Match_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_11 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Match_5.Node, E_Info => Match_5.Info);
--# end
--# expr-done 7568
Let_Result_5 := Fld_11; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Qual_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_21 := Create_Internal_Entity_Qual_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_6 := Cast_Result_21; 
--# bind qe Match_6
--# expr-start 7569 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:14014:30>' Fld_12 ada/nodes.lkt:14014
      if Match_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_12 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Match_6.Node, E_Info => Match_6.Info);
--# end
--# expr-done 7569
Let_Result_6 := Fld_12; 
--# end
Scope_Result_6 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Decl_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_22 := Create_Internal_Entity_Decl_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_7 := Cast_Result_22; 
--# bind de Match_7
--# expr-start 7570 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:14015:30>' Fld_13 ada/nodes.lkt:14015
      if Match_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_13 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Match_7.Node, E_Info => Match_7.Info);
--# end
--# expr-done 7570
Let_Result_7 := Fld_13; 
--# end
Scope_Result_7 := Let_Result_7;
   --# end
            Match_Result := Scope_Result_7; 
         when Ada_Param_Assoc =>
   --# scope-start
--# scope-start
      Cast_Result_23 := Create_Internal_Entity_Param_Assoc
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_8 := Cast_Result_23; 
--# bind pa Match_8
--# expr-start 7573 '<Cast to CallExpr at nodes.lkt:14016:32>' Cast_Result_14 ada/nodes.lkt:14016
--# expr-start 7572 '<parent at nodes.lkt:14016:32>' Fld_15 ada/nodes.lkt:14016
--# expr-start 7571 '<parent at nodes.lkt:14016:32>' Fld_14 ada/nodes.lkt:14016
      if Match_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Libadalang.Implementation.Parent (Node => Match_8.Node, E_Info => Match_8.Info);
--# expr-done 7571
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Parent (Node => Fld_14.Node, E_Info => Fld_14.Info);
--# expr-done 7572
   if Fld_15.Node = null
      or else Fld_15.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_14 := Create_Internal_Entity_Call_Expr
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
   else
         Cast_Result_14 := No_Entity_Call_Expr;
   end if;
--# expr-done 7573
      Cast_Result_24 := Create_Internal_Entity_Expr
        (Node => Cast_Result_14.Node,
         Info => Cast_Result_14.Info);
Let_Result_8 := Cast_Result_24; 
--# end
Scope_Result_8 := Let_Result_8;
   --# end
            Match_Result := Scope_Result_8; 
         when Ada_Abort_Absent .. Ada_Iterated_Assoc | Ada_Abstract_State_Decl .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Concat_Operand | Ada_Contract_Cases | Ada_Format_String_Literal .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Explicit_Deref | Ada_Reduce_Attribute_Ref .. Ada_Update_Attribute_Ref | Ada_Quantified_Expr .. Ada_Raise_Expr | Ada_For_Loop_Iter_Filter .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_25 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_9 := Cast_Result_25; 
--# bind _ Match_9
Let_Result_9 := No_Entity_Expr; 
--# end
Scope_Result_9 := Let_Result_9;
   --# end
            Match_Result := Scope_Result_9; 
end case;
--# expr-done 7574
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_2989;
            raise;
      end;
   return Property_Result;
end Expr_P_Parent_Candidate_Dispatching_Call;
--# end
--# property-start Expr.has_dynamic_context ada/nodes.lkt:14025
pragma Warnings (Off, "is not referenced");
 function Expr_P_Has_Dynamic_Context
  (Node : Bare_Expr
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Assign_Stmt;
Var_Expr_202 : Internal_Entity_Expr;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Assign_Stmt;
Fld_1 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity;
Cast_Expr : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Boolean;
If_Result : Boolean;
Scope_Result : Boolean;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Boolean;
Scope_Result_1 : Boolean;
Result_Var : Boolean;
Result_Var_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 7576 '<Cast to AssignStmt at nodes.lkt:14026:9>' Cast_Result ada/nodes.lkt:14026
--# expr-start 7575 '<parent at nodes.lkt:14026:9>' Fld ada/nodes.lkt:14026
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 7575
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Assign_Stmt_Range
   then
      Cast_Result := Create_Internal_Entity_Assign_Stmt
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Assign_Stmt;
   end if;
--# expr-done 7576
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Assign_Stmt then
   --# scope-start
   --# bind a Var_Expr_0
--# expr-start 7581 '<BooleanBinaryOp And at nodes.lkt:14028:13>' If_Result ada/nodes.lkt:14028
--# expr-start 7578 '<Eq at nodes.lkt:14032:17>' Is_Equiv ada/nodes.lkt:14032
--# expr-start 7577 '<FieldAccess for expr at nodes.lkt:14032:17>' Fld_1 ada/nodes.lkt:14032
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Expr (Node => Var_Expr_0.Node.Assign_Stmt_F_Expr, Info => Var_Expr_0.Info);
--# expr-done 7577
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Cast_Expr := Ent; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 7578
if Is_Equiv then
   --# expr-start 7580 '<FieldAccess for is_classwide at nodes.lkt:14034:17>' Fld_3 ada/nodes.lkt:14034
--# expr-start 7579 '<FieldAccess for expected_expression_type at nodes.lkt:14034:17>' Fld_2 ada/nodes.lkt:14034
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expected_expression_type
Fld_2 := Libadalang.Implementation.Expr_P_Expected_Expression_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7579
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_classwide'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Classwide (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 7580
   If_Result := Fld_3;
else
   If_Result := False;
end if;
--# expr-done 7581
Scope_Result := If_Result;
   --# end
   Result_Var_1 := Scope_Result;
else
--# expr-start 7582 '<FieldAccess for parent_candidate_dispatching_call at nodes.lkt:14039:25>' Fld_4 ada/nodes.lkt:14039
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.parent_candidate_dispatching_call
Fld_4 := Libadalang.Implementation.Expr_P_Parent_Candidate_Dispatching_Call (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7582
Var_Expr_202 := Fld_4;
if Var_Expr_202 /= No_Entity_Expr then
   --# scope-start
--# expr-start 7583 '<FieldAccess for is_dispatching_call at nodes.lkt:14039:25>' Fld_5 ada/nodes.lkt:14039
      if Var_Expr_202.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.is_dispatching_call'
Fld_5 := Libadalang.Implementation.Dispatcher_Expr_P_Is_Dispatching_Call (Node => Var_Expr_202.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_202.Info);
--# end
--# expr-done 7583
Scope_Result_1 := Fld_5;
   --# end
   Result_Var := Scope_Result_1;
else
   Result_Var := False;
end if;
   Result_Var_1 := Result_Var;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Has_Dynamic_Context;
--# end
--# property-start Expr.is_dispatching_call_impl ada/nodes.lkt:14047
pragma Warnings (Off, "is not referenced");
 function Expr_P_Is_Dispatching_Call_Impl
  (Node : Bare_Expr
      ; Decl : Internal_Entity_Basic_Decl
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind decl Decl
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Local_Spec : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Base_Subp_Spec;
Is_A : Boolean;
Fld_2 : Boolean;
If_Result : Boolean;
Fld_3 : Boolean;
Fld_4 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7593 '<Let at nodes.lkt:14048:9>' Let_Result ada/nodes.lkt:14048
--# scope-start
--# expr-start 7585 '<FieldAccess for subp_spec_or_null at nodes.lkt:14049:13>' Fld_1 ada/nodes.lkt:14049
--# expr-start 7584 '<FieldAccess for canonical_part at nodes.lkt:14049:13>' Fld ada/nodes.lkt:14049
      if Decl.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_part
Fld := Libadalang.Implementation.Basic_Decl_P_Canonical_Part (Node => Decl.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Decl.Info);
--# end
--# expr-done 7584
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Fld.Node, Follow_Generic => True, E_Info => Fld.Info);
--# end
--# expr-done 7585
Local_Spec := Fld_1; 
--# bind spec Local_Spec
--# expr-start 7592 '<BooleanBinaryOp Or at nodes.lkt:14051:9>' If_Result_2 ada/nodes.lkt:14051
--# expr-start 7588 '<BooleanBinaryOp Or at nodes.lkt:14051:9>' If_Result ada/nodes.lkt:14051
--# expr-start 7586 '<IsA AbstractFormalSubpDecl at nodes.lkt:14054:13>' Is_A ada/nodes.lkt:14054
Is_A := Decl.Node /= null 
and then Decl.Node.Kind in Ada_Abstract_Formal_Subp_Decl_Range; 
--# expr-done 7586
if Is_A then
   If_Result := True;
else
   --# expr-start 7587 '<FieldAccess for has_dynamic_controlling_operand at nodes.lkt:14059:13>' Fld_2 ada/nodes.lkt:14059
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.has_dynamic_controlling_operand
Fld_2 := Libadalang.Implementation.Expr_P_Has_Dynamic_Controlling_Operand (Node => Ent.Node, Spec => Local_Spec, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 7587
   If_Result := Fld_2;
end if;
--# expr-done 7588
if If_Result then
   If_Result_2 := True;
else
   --# expr-start 7591 '<BooleanBinaryOp And at nodes.lkt:14066:13>' If_Result_1 ada/nodes.lkt:14066
--# expr-start 7589 '<FieldAccess for has_controlling_result at nodes.lkt:14066:13>' Fld_3 ada/nodes.lkt:14066
      if Local_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.has_controlling_result
Fld_3 := Libadalang.Implementation.Base_Subp_Spec_P_Has_Controlling_Result (Node => Local_Spec.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Local_Spec.Info);
--# end
--# expr-done 7589
if Fld_3 then
   --# expr-start 7590 '<FieldAccess for has_dynamic_context at nodes.lkt:14066:47>' Fld_4 ada/nodes.lkt:14066
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.has_dynamic_context
Fld_4 := Libadalang.Implementation.Expr_P_Has_Dynamic_Context (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 7590
   If_Result_1 := Fld_4;
else
   If_Result_1 := False;
end if;
--# expr-done 7591
   If_Result_2 := If_Result_1;
end if;
--# expr-done 7592
Let_Result := If_Result_2; 
--# end
--# expr-done 7593
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Is_Dispatching_Call_Impl;
--# end
--# property-start Expr.is_static_expr ada/nodes.lkt:14074
pragma Warnings (Off, "is not referenced");
 function Expr_P_Is_Static_Expr
  (Node : Bare_Expr
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Match_0 : Internal_Entity_Num_Literal;
Match_1 : Internal_Entity_String_Literal;
Match_2 : Internal_Entity_Attribute_Ref;
Var_Expr_0 : Internal_Entity_Assoc_List;
Match_3 : Internal_Entity_Call_Expr;
Match_4 : Internal_Entity_Qual_Expr;
Match_5 : Internal_Entity_Name;
Match_6 : Internal_Entity_Membership_Expr;
Match_7 : Internal_Entity_Bin_Op;
Var_Expr_4 : Internal_Entity_Basic_Decl;
Match_8 : Internal_Entity_Concat_Operand;
Var_Expr_5 : Internal_Entity_Basic_Decl;
Match_9 : Internal_Entity_Concat_Op;
Match_10 : Internal_Entity_Un_Op;
Var_Expr_7 : Internal_Entity_Basic_Decl;
Match_11 : Internal_Entity_If_Expr;
Match_12 : Internal_Entity_Paren_Expr;
Match_13 : Internal_Entity_Expr;
Var_Expr_203 : Internal_Entity_Base_Type_Decl;
Var_Expr_204 : Internal_Entity_Base_Type_Decl;
Var_Expr_205 : Internal_Entity_Base_Type_Decl;
Var_Expr_206 : Internal_Entity_Basic_Decl;
Var_Expr_207 : Internal_Entity_Base_Type_Decl;
Var_Expr_208 : Internal_Entity_Basic_Decl;
Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Name;
Fld_2 : Boolean;
Fld_3 : Internal_Entity_Name;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Not_Val : Boolean;
Fld_7 : Internal_Entity_Identifier;
Fld_8 : Symbol_Type;
Sym : Symbol_Type;
Is_Equal : Boolean;
If_Result : Boolean;
Fld_9 : Internal_Entity_Name;
Fld_10 : Internal_Entity_Base_Type_Decl;
Fld_11 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Fld_12 : Internal_Entity_Identifier;
Fld_13 : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Is_Equal_1 : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
Is_Equal_4 : Boolean;
If_Result_3 : Boolean;
Is_Equal_5 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : Boolean;
If_Result_6 : Boolean;
Fld_14 : Internal_Entity_Name;
Fld_15 : Internal_Entity_Basic_Decl;
Fld_16 : Boolean;
Scope_Result_3 : Boolean;
Result_Var_3 : Boolean;
Fld_17 : Internal_Entity_Identifier;
Fld_18 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Is_Equal_6 : Boolean;
Is_Equal_7 : Boolean;
If_Result_7 : Boolean;
Is_Equal_8 : Boolean;
If_Result_8 : Boolean;
Is_Equal_9 : Boolean;
If_Result_9 : Boolean;
If_Result_10 : Boolean;
If_Result_11 : Boolean;
If_Result_12 : Boolean;
Fld_19 : Internal_Entity_Assoc_List;
Saved : Internal_Entity_Assoc_List;
Fld_20 : Bare_Assoc_List;
Fld_21 : Internal_Entity_Info;
Item_1 : Internal_Entity_Basic_Assoc;
Bare_Item_1 : Bare_Basic_Assoc;
Fld_22 : Internal_Entity_Expr;
Fld_23 : Boolean;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result_13 : Internal_Entity_Basic_Assoc;
Quantifier_Result : Boolean;
Scope_Result_4 : Boolean;
Result_Var_4 : Boolean;
If_Result_14 : Boolean;
Fld_24 : Internal_Entity_Name;
Fld_25 : Boolean;
Fld_26 : Internal_Entity_Assoc_List;
Fld_27 : Bare_Assoc_List;
Fld_28 : Internal_Entity_Info;
Item_2 : Internal_Entity_Basic_Assoc;
Bare_Item_2 : Bare_Basic_Assoc;
Fld_29 : Internal_Entity_Expr;
Fld_30 : Boolean;
As_Entity_1 : Internal_Entity_Basic_Assoc;
Is_Null_1 : Boolean;
If_Result_15 : Internal_Entity_Basic_Assoc;
Quantifier_Result_1 : Boolean;
If_Result_16 : Boolean;
Fld_31 : Internal_Entity_Name;
Fld_32 : Internal_Entity_Base_Type_Decl;
Fld_33 : Boolean;
Scope_Result_5 : Boolean;
Result_Var_5 : Boolean;
Fld_34 : Internal_Entity_Expr;
Fld_35 : Boolean;
If_Result_17 : Boolean;
Fld_36 : Internal_Entity_Basic_Decl;
Fld_37 : Boolean;
Scope_Result_6 : Boolean;
Result_Var_6 : Boolean;
Fld_38 : Internal_Entity_Expr;
Fld_39 : Boolean;
Fld_40 : Internal_Entity_Expr_Alternatives_List;
Fld_41 : Bare_Expr_Alternatives_List;
Fld_42 : Internal_Entity_Info;
Item_3 : Internal_Entity_Expr;
Bare_Item_3 : Bare_Expr;
Fld_43 : Boolean;
As_Entity_2 : Internal_Entity_Expr;
Is_Null_2 : Boolean;
If_Result_18 : Internal_Entity_Expr;
Quantifier_Result_2 : Boolean;
If_Result_19 : Boolean;
Fld_44 : Internal_Entity_Expr;
Fld_45 : Boolean;
Fld_46 : Internal_Entity_Expr;
Fld_47 : Boolean;
If_Result_20 : Boolean;
Fld_48 : Internal_Entity_Op;
Fld_49 : Internal_Entity_Basic_Decl;
Fld_50 : Boolean;
Scope_Result_7 : Boolean;
Result_Var_7 : Boolean;
If_Result_21 : Boolean;
Fld_51 : Internal_Entity_Expr;
Fld_52 : Boolean;
Fld_53 : Internal_Entity_Op_Concat;
Fld_54 : Internal_Entity_Basic_Decl;
Fld_55 : Boolean;
Scope_Result_8 : Boolean;
Result_Var_8 : Boolean;
If_Result_22 : Boolean;
Fld_56 : Internal_Entity_Expr;
Fld_57 : Boolean;
Fld_58 : Internal_Entity_Concat_Operand_List;
Fld_59 : Bare_Concat_Operand_List;
Fld_60 : Internal_Entity_Info;
Item_6 : Internal_Entity_Concat_Operand;
Bare_Item_6 : Bare_Concat_Operand;
Fld_61 : Boolean;
As_Entity_3 : Internal_Entity_Concat_Operand;
Is_Null_3 : Boolean;
If_Result_23 : Internal_Entity_Concat_Operand;
Quantifier_Result_3 : Boolean;
If_Result_24 : Boolean;
Fld_62 : Internal_Entity_Expr;
Fld_63 : Boolean;
Fld_64 : Internal_Entity_Op;
Fld_65 : Internal_Entity_Basic_Decl;
Fld_66 : Boolean;
Scope_Result_9 : Boolean;
Result_Var_9 : Boolean;
If_Result_25 : Boolean;
Fld_67 : Internal_Entity_Expr;
Fld_68 : Boolean;
Fld_69 : Internal_Entity_Expr;
Fld_70 : Boolean;
If_Result_26 : Boolean;
Fld_71 : Internal_Entity_Elsif_Expr_Part_List;
Fld_72 : Bare_Elsif_Expr_Part_List;
Fld_73 : Internal_Entity_Info;
Item_8 : Internal_Entity_Elsif_Expr_Part;
Bare_Item_8 : Bare_Elsif_Expr_Part;
Fld_74 : Internal_Entity_Expr;
Fld_75 : Boolean;
Fld_76 : Internal_Entity_Expr;
Fld_77 : Boolean;
If_Result_27 : Boolean;
As_Entity_4 : Internal_Entity_Elsif_Expr_Part;
Is_Null_4 : Boolean;
If_Result_28 : Internal_Entity_Elsif_Expr_Part;
Quantifier_Result_4 : Boolean;
If_Result_29 : Boolean;
Fld_78 : Internal_Entity_Expr;
Fld_79 : Boolean;
If_Result_30 : Boolean;
Fld_80 : Internal_Entity_Expr;
Fld_81 : Boolean;
Match_Prefix : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Num_Literal;
Let_Result : Boolean;
Scope_Result_10 : Boolean;
Cast_Result_1 : Internal_Entity_String_Literal;
Let_Result_1 : Boolean;
Scope_Result_11 : Boolean;
Cast_Result_2 : Internal_Entity_Attribute_Ref;
Let_Result_2 : Boolean;
Scope_Result_12 : Boolean;
Cast_Result_3 : Internal_Entity_Call_Expr;
Let_Result_3 : Boolean;
Scope_Result_13 : Boolean;
Cast_Result_4 : Internal_Entity_Qual_Expr;
Let_Result_4 : Boolean;
Scope_Result_14 : Boolean;
Cast_Result_5 : Internal_Entity_Name;
Let_Result_5 : Boolean;
Scope_Result_15 : Boolean;
Cast_Result_6 : Internal_Entity_Membership_Expr;
Let_Result_6 : Boolean;
Scope_Result_16 : Boolean;
Cast_Result_7 : Internal_Entity_Bin_Op;
Let_Result_7 : Boolean;
Scope_Result_17 : Boolean;
Cast_Result_8 : Internal_Entity_Concat_Operand;
Let_Result_8 : Boolean;
Scope_Result_18 : Boolean;
Cast_Result_9 : Internal_Entity_Concat_Op;
Let_Result_9 : Boolean;
Scope_Result_19 : Boolean;
Cast_Result_10 : Internal_Entity_Un_Op;
Let_Result_10 : Boolean;
Scope_Result_20 : Boolean;
Cast_Result_11 : Internal_Entity_If_Expr;
Let_Result_11 : Boolean;
Scope_Result_21 : Boolean;
Cast_Result_12 : Internal_Entity_Paren_Expr;
Let_Result_12 : Boolean;
Scope_Result_22 : Boolean;
Cast_Result_13 : Internal_Entity_Expr;
Let_Result_13 : Boolean;
Scope_Result_23 : Boolean;
Match_Result : Boolean;
Dyn_Var_Bind_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7703 '<bind at nodes.lkt:14075:9>' Dyn_Var_Bind_Result ada/nodes.lkt:14075
--# expr-start 7594 '<FieldAccess for origin_node at nodes.lkt:14075:23>' Fld ada/nodes.lkt:14075
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 7594
Bound_Origin := Fld; 
--# expr-start 7702 '<Match at nodes.lkt:14077:9>' Match_Result ada/nodes.lkt:14077
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Expr (Match_Prefix.Node.Kind) is
         when Ada_Int_Literal .. Ada_Real_Literal =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Num_Literal
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind _ Match_0
Let_Result := True; 
--# end
Scope_Result_10 := Let_Result;
   --# end
            Match_Result := Scope_Result_10; 
         when Ada_String_Literal =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_String_Literal
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind _ Match_1
Let_Result_1 := True; 
--# end
Scope_Result_11 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_11; 
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Attribute_Ref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind ar Match_2
--# expr-start 7635 '<BooleanBinaryOp And at nodes.lkt:14081:17>' If_Result_14 ada/nodes.lkt:14081
--# expr-start 7630 '<BooleanBinaryOp And at nodes.lkt:14082:21>' If_Result_12 ada/nodes.lkt:14082
--# expr-start 7596 '<FieldAccess for is_static_expr at nodes.lkt:14082:21>' Fld_2 ada/nodes.lkt:14082
--# expr-start 7595 '<FieldAccess for prefix at nodes.lkt:14082:21>' Fld_1 ada/nodes.lkt:14082
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Match_2.Node.Attribute_Ref_F_Prefix, Info => Match_2.Info);
--# expr-done 7595
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_2 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_1.Info);
--# end
--# expr-done 7596
if Fld_2 then
   --# expr-start 7629 '<BooleanBinaryOp Or at nodes.lkt:14084:25>' If_Result_11 ada/nodes.lkt:14084
--# expr-start 7618 '<BooleanBinaryOp Or at nodes.lkt:14084:25>' If_Result_6 ada/nodes.lkt:14084
--# expr-start 7606 '<BooleanBinaryOp And at nodes.lkt:14085:29>' If_Result ada/nodes.lkt:14085
--# expr-start 7601 '<Not at nodes.lkt:14085:29>' Not_Val ada/nodes.lkt:14085
--# expr-start 7598 '<FieldAccess for name_designated_type at nodes.lkt:14085:33>' Fld_4 ada/nodes.lkt:14085
--# expr-start 7597 '<FieldAccess for prefix at nodes.lkt:14085:33>' Fld_3 ada/nodes.lkt:14085
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Match_2.Node.Attribute_Ref_F_Prefix, Info => Match_2.Info);
--# expr-done 7597
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_4 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 7598
Var_Expr_203 := Fld_4;
if Var_Expr_203 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 7599 '<FieldAccess for root_type at nodes.lkt:14085:33>' Fld_5 ada/nodes.lkt:14085
      if Var_Expr_203.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.root_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Root_Type (Node => Var_Expr_203.Node, Origin => Bound_Origin, E_Info => Var_Expr_203.Info);
--# end
--# expr-done 7599
Var_Expr_204 := Fld_5;
if Var_Expr_204 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 7600 '<FieldAccess for is_formal at nodes.lkt:14085:33>' Fld_6 ada/nodes.lkt:14085
      if Var_Expr_204.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_formal
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Is_Formal (Node => Var_Expr_204.Node);
--# end
--# expr-done 7600
Scope_Result := Fld_6;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Not_Val := not (Result_Var_1); 
--# expr-done 7601
if Not_Val then
   --# expr-start 7605 '<Eq at nodes.lkt:14087:33>' Is_Equal ada/nodes.lkt:14087
--# expr-start 7603 '<FieldAccess for name_symbol at nodes.lkt:14087:33>' Fld_8 ada/nodes.lkt:14087
--# expr-start 7602 '<FieldAccess for attribute at nodes.lkt:14087:33>' Fld_7 ada/nodes.lkt:14087
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Identifier (Node => Match_2.Node.Attribute_Ref_F_Attribute, Info => Match_2.Info);
--# expr-done 7602
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_8 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_7.Node);
--# end
--# expr-done 7603
--# expr-start 7604 '<Symbol Base at nodes.lkt:14087:63>' Sym ada/nodes.lkt:14087
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Base); 
--# expr-done 7604
Is_Equal := Fld_8 = Sym; 
--# expr-done 7605
   If_Result := Is_Equal;
else
   If_Result := False;
end if;
--# expr-done 7606
if If_Result then
   If_Result_6 := True;
else
   --# expr-start 7617 '<BooleanBinaryOp And at nodes.lkt:14090:29>' If_Result_5 ada/nodes.lkt:14090
--# expr-start 7608 '<FieldAccess for name_designated_type at nodes.lkt:14090:29>' Fld_10 ada/nodes.lkt:14090
--# expr-start 7607 '<FieldAccess for prefix at nodes.lkt:14090:29>' Fld_9 ada/nodes.lkt:14090
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Name (Node => Match_2.Node.Attribute_Ref_F_Prefix, Info => Match_2.Info);
--# expr-done 7607
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_10 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_9.Node, E_Info => Fld_9.Info);
--# end
--# expr-done 7608
Var_Expr_205 := Fld_10;
if Var_Expr_205 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 7609 '<FieldAccess for is_static_decl at nodes.lkt:14090:29>' Fld_11 ada/nodes.lkt:14090
      if Var_Expr_205.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_static_decl'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Static_Decl (Node => Var_Expr_205.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_205.Info);
--# end
--# expr-done 7609
Scope_Result_2 := Fld_11;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
if Result_Var_2 then
   --# expr-start 7611 '<FieldAccess for name_symbol at nodes.lkt:14091:33>' Fld_13 ada/nodes.lkt:14091
--# expr-start 7610 '<FieldAccess for attribute at nodes.lkt:14091:33>' Fld_12 ada/nodes.lkt:14091
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Identifier (Node => Match_2.Node.Attribute_Ref_F_Attribute, Info => Match_2.Info);
--# expr-done 7610
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_13 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_12.Node);
--# end
--# expr-done 7611
--# expr-start 7612 '<Symbol First at nodes.lkt:14091:63>' Sym_1 ada/nodes.lkt:14091
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_First); 
--# expr-done 7612
Is_Equal_5 := Fld_13 = Sym_1; 
if Is_Equal_5 then
   If_Result_4 := True;
else
--# expr-start 7613 '<Symbol Last at nodes.lkt:14092:35>' Sym_2 ada/nodes.lkt:14092
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Last); 
--# expr-done 7613
Is_Equal_4 := Fld_13 = Sym_2; 
if Is_Equal_4 then
   If_Result_3 := True;
else
--# expr-start 7614 '<Symbol Range at nodes.lkt:14093:35>' Sym_3 ada/nodes.lkt:14093
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Range); 
--# expr-done 7614
Is_Equal_3 := Fld_13 = Sym_3; 
if Is_Equal_3 then
   If_Result_2 := True;
else
--# expr-start 7615 '<Symbol Val at nodes.lkt:14094:35>' Sym_4 ada/nodes.lkt:14094
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Val); 
--# expr-done 7615
Is_Equal_2 := Fld_13 = Sym_4; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 7616 '<Symbol Pos at nodes.lkt:14095:35>' Sym_5 ada/nodes.lkt:14095
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pos); 
--# expr-done 7616
Is_Equal_1 := Fld_13 = Sym_5; 
   If_Result_1 := Is_Equal_1;
end if;
   If_Result_2 := If_Result_1;
end if;
   If_Result_3 := If_Result_2;
end if;
   If_Result_4 := If_Result_3;
end if;
   If_Result_5 := If_Result_4;
else
   If_Result_5 := False;
end if;
--# expr-done 7617
   If_Result_6 := If_Result_5;
end if;
--# expr-done 7618
if If_Result_6 then
   If_Result_11 := True;
else
   --# expr-start 7628 '<BooleanBinaryOp And at nodes.lkt:14098:29>' If_Result_10 ada/nodes.lkt:14098
--# expr-start 7620 '<FieldAccess for referenced_decl at nodes.lkt:14098:29>' Fld_15 ada/nodes.lkt:14098
--# expr-start 7619 '<FieldAccess for prefix at nodes.lkt:14098:29>' Fld_14 ada/nodes.lkt:14098
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Name (Node => Match_2.Node.Attribute_Ref_F_Prefix, Info => Match_2.Info);
--# expr-done 7619
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_15 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld_14.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_14.Info);
--# end
--# expr-done 7620
Var_Expr_206 := Fld_15;
if Var_Expr_206 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 7621 '<FieldAccess for is_array at nodes.lkt:14098:29>' Fld_16 ada/nodes.lkt:14098
      if Var_Expr_206.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_array
Fld_16 := Libadalang.Implementation.Basic_Decl_P_Is_Array (Node => Var_Expr_206.Node, Origin => Bound_Origin, E_Info => Var_Expr_206.Info);
--# end
--# expr-done 7621
Scope_Result_3 := Fld_16;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := False;
end if;
if Result_Var_3 then
   --# expr-start 7623 '<FieldAccess for name_symbol at nodes.lkt:14099:33>' Fld_18 ada/nodes.lkt:14099
--# expr-start 7622 '<FieldAccess for attribute at nodes.lkt:14099:33>' Fld_17 ada/nodes.lkt:14099
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Identifier (Node => Match_2.Node.Attribute_Ref_F_Attribute, Info => Match_2.Info);
--# expr-done 7622
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_18 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_17.Node);
--# end
--# expr-done 7623
--# expr-start 7624 '<Symbol First at nodes.lkt:14099:63>' Sym_6 ada/nodes.lkt:14099
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_First); 
--# expr-done 7624
Is_Equal_9 := Fld_18 = Sym_6; 
if Is_Equal_9 then
   If_Result_9 := True;
else
--# expr-start 7625 '<Symbol Last at nodes.lkt:14100:35>' Sym_7 ada/nodes.lkt:14100
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Last); 
--# expr-done 7625
Is_Equal_8 := Fld_18 = Sym_7; 
if Is_Equal_8 then
   If_Result_8 := True;
else
--# expr-start 7626 '<Symbol Length at nodes.lkt:14101:35>' Sym_8 ada/nodes.lkt:14101
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Length); 
--# expr-done 7626
Is_Equal_7 := Fld_18 = Sym_8; 
if Is_Equal_7 then
   If_Result_7 := True;
else
--# expr-start 7627 '<Symbol Range at nodes.lkt:14102:35>' Sym_9 ada/nodes.lkt:14102
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Range); 
--# expr-done 7627
Is_Equal_6 := Fld_18 = Sym_9; 
   If_Result_7 := Is_Equal_6;
end if;
   If_Result_8 := If_Result_7;
end if;
   If_Result_9 := If_Result_8;
end if;
   If_Result_10 := If_Result_9;
else
   If_Result_10 := False;
end if;
--# expr-done 7628
   If_Result_11 := If_Result_10;
end if;
--# expr-done 7629
   If_Result_12 := If_Result_11;
else
   If_Result_12 := False;
end if;
--# expr-done 7630
if If_Result_12 then
--# expr-start 7631 '<FieldAccess for args at nodes.lkt:14106:21>' Fld_19 ada/nodes.lkt:14106
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Assoc_List (Node => Match_2.Node.Attribute_Ref_F_Args, Info => Match_2.Info);
--# expr-done 7631
Var_Expr_0 := Fld_19;
if Var_Expr_0 /= No_Entity_Assoc_List then
   --# scope-start
   --# bind args Var_Expr_0
--# expr-start 7634 '<AllQuantifier at nodes.lkt:14107:31>' Quantifier_Result ada/nodes.lkt:14107
Saved := Var_Expr_0; 
Fld_20 := Saved.Node;
      Quantifier_Result := True;
      if Fld_20 = null then
      null;
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_20;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result_13 := No_Entity_Basic_Assoc;
else
Fld_21 := Saved.Info;
As_Entity := (Info => Fld_21, Node => Bare_Item_1); 
   If_Result_13 := As_Entity;
end if;
                  Item_1 := If_Result_13; 
   --# scope-start
               --# bind arg Item_1
      --# expr-start 7633 '<FieldAccess for is_static_expr at nodes.lkt:14107:49>' Fld_23 ada/nodes.lkt:14107
--# expr-start 7632 '<FieldAccess for expr at nodes.lkt:14107:49>' Fld_22 ada/nodes.lkt:14107
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_22 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 7632
      if Fld_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_23 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_22.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_22.Info);
--# end
--# expr-done 7633
      Quantifier_Result := Fld_23;
   --# end
               exit when not Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 7634
Scope_Result_4 := Quantifier_Result;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := True;
end if;
   If_Result_14 := Result_Var_4;
else
   If_Result_14 := False;
end if;
--# expr-done 7635
Let_Result_2 := If_Result_14; 
--# end
Scope_Result_12 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_12; 
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_3; 
--# bind ce Match_3
--# expr-start 7642 '<BooleanBinaryOp And at nodes.lkt:14114:17>' If_Result_16 ada/nodes.lkt:14114
--# expr-start 7637 '<FieldAccess for is_static_expr at nodes.lkt:14114:17>' Fld_25 ada/nodes.lkt:14114
--# expr-start 7636 '<FieldAccess for name at nodes.lkt:14114:17>' Fld_24 ada/nodes.lkt:14114
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Create_Internal_Entity_Name (Node => Match_3.Node.Call_Expr_F_Name, Info => Match_3.Info);
--# expr-done 7636
      if Fld_24.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_25 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_24.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_24.Info);
--# end
--# expr-done 7637
if Fld_25 then
   --# expr-start 7641 '<AllQuantifier at nodes.lkt:14115:21>' Quantifier_Result_1 ada/nodes.lkt:14115
   --# expr-start 7638 '<FieldAccess for params at nodes.lkt:14115:21>' Fld_26 ada/nodes.lkt:14115
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_26 := Libadalang.Implementation.Call_Expr_P_Params (Node => Match_3.Node, E_Info => Match_3.Info);
--# end
--# expr-done 7638
Fld_27 := Fld_26.Node;
      Quantifier_Result_1 := True;
      if Fld_27 = null then
      null;
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_27;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_2 := Untyped_Item_2; 
Is_Null_1 := Bare_Item_2 = null; 
if Is_Null_1 then
   If_Result_15 := No_Entity_Basic_Assoc;
else
Fld_28 := Fld_26.Info;
As_Entity_1 := (Info => Fld_28, Node => Bare_Item_2); 
   If_Result_15 := As_Entity_1;
end if;
                  Item_2 := If_Result_15; 
   --# scope-start
               --# bind pa Item_2
      --# expr-start 7640 '<FieldAccess for is_static_expr at nodes.lkt:14115:45>' Fld_30 ada/nodes.lkt:14115
--# expr-start 7639 '<FieldAccess for expr at nodes.lkt:14115:45>' Fld_29 ada/nodes.lkt:14115
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_29 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_2.Node, E_Info => Item_2.Info);
--# end
--# expr-done 7639
      if Fld_29.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_30 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_29.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_29.Info);
--# end
--# expr-done 7640
      Quantifier_Result_1 := Fld_30;
   --# end
               exit when not Quantifier_Result_1;
         end loop;
      end;
      end if;
--# expr-done 7641
   If_Result_16 := Quantifier_Result_1;
else
   If_Result_16 := False;
end if;
--# expr-done 7642
Let_Result_3 := If_Result_16; 
--# end
Scope_Result_13 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_13; 
         when Ada_Qual_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Qual_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_4; 
--# bind qe Match_4
--# expr-start 7648 '<BooleanBinaryOp And at nodes.lkt:14117:17>' If_Result_17 ada/nodes.lkt:14117
--# expr-start 7644 '<FieldAccess for name_designated_type at nodes.lkt:14117:17>' Fld_32 ada/nodes.lkt:14117
--# expr-start 7643 '<FieldAccess for prefix at nodes.lkt:14117:17>' Fld_31 ada/nodes.lkt:14117
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Create_Internal_Entity_Name (Node => Match_4.Node.Qual_Expr_F_Prefix, Info => Match_4.Info);
--# expr-done 7643
      if Fld_31.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_32 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_31.Node, E_Info => Fld_31.Info);
--# end
--# expr-done 7644
Var_Expr_207 := Fld_32;
if Var_Expr_207 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 7645 '<FieldAccess for is_static_decl at nodes.lkt:14117:17>' Fld_33 ada/nodes.lkt:14117
      if Var_Expr_207.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_static_decl'
Fld_33 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Static_Decl (Node => Var_Expr_207.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_207.Info);
--# end
--# expr-done 7645
Scope_Result_5 := Fld_33;
   --# end
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := False;
end if;
if Result_Var_5 then
   --# expr-start 7647 '<FieldAccess for is_static_expr at nodes.lkt:14118:21>' Fld_35 ada/nodes.lkt:14118
--# expr-start 7646 '<FieldAccess for suffix at nodes.lkt:14118:21>' Fld_34 ada/nodes.lkt:14118
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_34 := Create_Internal_Entity_Expr (Node => Match_4.Node.Qual_Expr_F_Suffix, Info => Match_4.Info);
--# expr-done 7646
      if Fld_34.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_35 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_34.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_34.Info);
--# end
--# expr-done 7647
   If_Result_17 := Fld_35;
else
   If_Result_17 := False;
end if;
--# expr-done 7648
Let_Result_4 := If_Result_17; 
--# end
Scope_Result_14 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_14; 
         when Ada_Array_Subcomponent_Choice_Name | Ada_Defining_Name .. Ada_Explicit_Deref | Ada_Reduce_Attribute_Ref .. Ada_Op_Xor | Ada_Null_Literal | Ada_Synthetic_Identifier .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_5; 
--# bind n Match_5
--# expr-start 7649 '<FieldAccess for referenced_decl at nodes.lkt:14119:29>' Fld_36 ada/nodes.lkt:14119
      if Match_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_36 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Match_5.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_5.Info);
--# end
--# expr-done 7649
Var_Expr_208 := Fld_36;
if Var_Expr_208 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 7650 '<FieldAccess for is_static_decl at nodes.lkt:14119:29>' Fld_37 ada/nodes.lkt:14119
      if Var_Expr_208.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_static_decl'
Fld_37 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Static_Decl (Node => Var_Expr_208.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_208.Info);
--# end
--# expr-done 7650
Scope_Result_6 := Fld_37;
   --# end
   Result_Var_6 := Scope_Result_6;
else
   Result_Var_6 := False;
end if;
Let_Result_5 := Result_Var_6; 
--# end
Scope_Result_15 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_15; 
         when Ada_Membership_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Membership_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_6 := Cast_Result_6; 
--# bind me Match_6
--# expr-start 7656 '<BooleanBinaryOp And at nodes.lkt:14121:17>' If_Result_19 ada/nodes.lkt:14121
--# expr-start 7652 '<FieldAccess for is_static_expr at nodes.lkt:14121:17>' Fld_39 ada/nodes.lkt:14121
--# expr-start 7651 '<FieldAccess for expr at nodes.lkt:14121:17>' Fld_38 ada/nodes.lkt:14121
      if Match_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_38 := Create_Internal_Entity_Expr (Node => Match_6.Node.Membership_Expr_F_Expr, Info => Match_6.Info);
--# expr-done 7651
      if Fld_38.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_39 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_38.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_38.Info);
--# end
--# expr-done 7652
if Fld_39 then
   --# expr-start 7655 '<AllQuantifier at nodes.lkt:14122:21>' Quantifier_Result_2 ada/nodes.lkt:14122
   --# expr-start 7653 '<FieldAccess for membership_exprs at nodes.lkt:14122:21>' Fld_40 ada/nodes.lkt:14122
      if Match_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_40 := Create_Internal_Entity_Expr_Alternatives_List (Node => Match_6.Node.Membership_Expr_F_Membership_Exprs, Info => Match_6.Info);
--# expr-done 7653
Fld_41 := Fld_40.Node;
      Quantifier_Result_2 := True;
      if Fld_41 = null then
      null;
      else
      declare
         Collection : constant Bare_Expr_Alternatives_List := Fld_41;
      begin
         for Untyped_Item_3 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_3 := Untyped_Item_3; 
Is_Null_2 := Bare_Item_3 = null; 
if Is_Null_2 then
   If_Result_18 := No_Entity_Expr;
else
Fld_42 := Fld_40.Info;
As_Entity_2 := (Info => Fld_42, Node => Bare_Item_3); 
   If_Result_18 := As_Entity_2;
end if;
                  Item_3 := If_Result_18; 
   --# scope-start
               --# bind e Item_3
      --# expr-start 7654 '<FieldAccess for is_static_expr at nodes.lkt:14122:52>' Fld_43 ada/nodes.lkt:14122
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_43 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Item_3.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Item_3.Info);
--# end
--# expr-done 7654
      Quantifier_Result_2 := Fld_43;
   --# end
               exit when not Quantifier_Result_2;
         end loop;
      end;
      end if;
--# expr-done 7655
   If_Result_19 := Quantifier_Result_2;
else
   If_Result_19 := False;
end if;
--# expr-done 7656
Let_Result_6 := If_Result_19; 
--# end
Scope_Result_16 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_16; 
         when Ada_Bin_Op .. Ada_Relation_Op =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Bin_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_7 := Cast_Result_7; 
--# bind bo Match_7
--# expr-start 7665 '<BooleanBinaryOp And at nodes.lkt:14124:17>' If_Result_21 ada/nodes.lkt:14124
--# expr-start 7661 '<BooleanBinaryOp And at nodes.lkt:14124:18>' If_Result_20 ada/nodes.lkt:14124
--# expr-start 7658 '<FieldAccess for is_static_expr at nodes.lkt:14124:18>' Fld_45 ada/nodes.lkt:14124
--# expr-start 7657 '<FieldAccess for left at nodes.lkt:14124:18>' Fld_44 ada/nodes.lkt:14124
      if Match_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_44 := Create_Internal_Entity_Expr (Node => Match_7.Node.Bin_Op_F_Left, Info => Match_7.Info);
--# expr-done 7657
      if Fld_44.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_45 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_44.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_44.Info);
--# end
--# expr-done 7658
if Fld_45 then
   --# expr-start 7660 '<FieldAccess for is_static_expr at nodes.lkt:14124:47>' Fld_47 ada/nodes.lkt:14124
--# expr-start 7659 '<FieldAccess for right at nodes.lkt:14124:47>' Fld_46 ada/nodes.lkt:14124
      if Match_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_46 := Create_Internal_Entity_Expr (Node => Match_7.Node.Bin_Op_F_Right, Info => Match_7.Info);
--# expr-done 7659
      if Fld_46.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_47 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_46.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_46.Info);
--# end
--# expr-done 7660
   If_Result_20 := Fld_47;
else
   If_Result_20 := False;
end if;
--# expr-done 7661
if If_Result_20 then
--# expr-start 7663 '<FieldAccess for referenced_decl at nodes.lkt:14125:21>' Fld_49 ada/nodes.lkt:14125
--# expr-start 7662 '<FieldAccess for op at nodes.lkt:14125:21>' Fld_48 ada/nodes.lkt:14125
      if Match_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_48 := Create_Internal_Entity_Op (Node => Match_7.Node.Bin_Op_F_Op, Info => Match_7.Info);
--# expr-done 7662
      if Fld_48.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_49 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld_48.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_48.Info);
--# end
--# expr-done 7663
Var_Expr_4 := Fld_49;
if Var_Expr_4 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind decl Var_Expr_4
--# expr-start 7664 '<FieldAccess for is_static_decl at nodes.lkt:14126:31>' Fld_50 ada/nodes.lkt:14126
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_static_decl'
Fld_50 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Static_Decl (Node => Var_Expr_4.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 7664
Scope_Result_7 := Fld_50;
   --# end
   Result_Var_7 := Scope_Result_7;
else
   Result_Var_7 := True;
end if;
   If_Result_21 := Result_Var_7;
else
   If_Result_21 := False;
end if;
--# expr-done 7665
Let_Result_7 := If_Result_21; 
--# end
Scope_Result_17 := Let_Result_7;
   --# end
            Match_Result := Scope_Result_17; 
         when Ada_Concat_Operand =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Create_Internal_Entity_Concat_Operand
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_8 := Cast_Result_8; 
--# bind co Match_8
--# expr-start 7671 '<BooleanBinaryOp And at nodes.lkt:14130:17>' If_Result_22 ada/nodes.lkt:14130
--# expr-start 7667 '<FieldAccess for is_static_expr at nodes.lkt:14130:17>' Fld_52 ada/nodes.lkt:14130
--# expr-start 7666 '<FieldAccess for operand at nodes.lkt:14130:17>' Fld_51 ada/nodes.lkt:14130
      if Match_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_51 := Create_Internal_Entity_Expr (Node => Match_8.Node.Concat_Operand_F_Operand, Info => Match_8.Info);
--# expr-done 7666
      if Fld_51.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_52 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_51.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_51.Info);
--# end
--# expr-done 7667
if Fld_52 then
--# expr-start 7669 '<FieldAccess for referenced_decl at nodes.lkt:14131:21>' Fld_54 ada/nodes.lkt:14131
--# expr-start 7668 '<FieldAccess for operator at nodes.lkt:14131:21>' Fld_53 ada/nodes.lkt:14131
      if Match_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_53 := Create_Internal_Entity_Op_Concat (Node => Match_8.Node.Concat_Operand_F_Operator, Info => Match_8.Info);
--# expr-done 7668
      if Fld_53.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_54 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld_53.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_53.Info);
--# end
--# expr-done 7669
Var_Expr_5 := Fld_54;
if Var_Expr_5 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind decl Var_Expr_5
--# expr-start 7670 '<FieldAccess for is_static_decl at nodes.lkt:14132:31>' Fld_55 ada/nodes.lkt:14132
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_static_decl'
Fld_55 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Static_Decl (Node => Var_Expr_5.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 7670
Scope_Result_8 := Fld_55;
   --# end
   Result_Var_8 := Scope_Result_8;
else
   Result_Var_8 := True;
end if;
   If_Result_22 := Result_Var_8;
else
   If_Result_22 := False;
end if;
--# expr-done 7671
Let_Result_8 := If_Result_22; 
--# end
Scope_Result_18 := Let_Result_8;
   --# end
            Match_Result := Scope_Result_18; 
         when Ada_Concat_Op =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Concat_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_9 := Cast_Result_9; 
--# bind co Match_9
--# expr-start 7677 '<BooleanBinaryOp And at nodes.lkt:14136:17>' If_Result_24 ada/nodes.lkt:14136
--# expr-start 7673 '<FieldAccess for is_static_expr at nodes.lkt:14136:17>' Fld_57 ada/nodes.lkt:14136
--# expr-start 7672 '<FieldAccess for first_operand at nodes.lkt:14136:17>' Fld_56 ada/nodes.lkt:14136
      if Match_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_56 := Create_Internal_Entity_Expr (Node => Match_9.Node.Concat_Op_F_First_Operand, Info => Match_9.Info);
--# expr-done 7672
      if Fld_56.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_57 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_56.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_56.Info);
--# end
--# expr-done 7673
if Fld_57 then
   --# expr-start 7676 '<AllQuantifier at nodes.lkt:14137:21>' Quantifier_Result_3 ada/nodes.lkt:14137
   --# expr-start 7674 '<FieldAccess for other_operands at nodes.lkt:14137:21>' Fld_58 ada/nodes.lkt:14137
      if Match_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_58 := Create_Internal_Entity_Concat_Operand_List (Node => Match_9.Node.Concat_Op_F_Other_Operands, Info => Match_9.Info);
--# expr-done 7674
Fld_59 := Fld_58.Node;
      Quantifier_Result_3 := True;
      if Fld_59 = null then
      null;
      else
      declare
         Collection : constant Bare_Concat_Operand_List := Fld_59;
      begin
         for Untyped_Item_6 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_6 := Untyped_Item_6; 
Is_Null_3 := Bare_Item_6 = null; 
if Is_Null_3 then
   If_Result_23 := No_Entity_Concat_Operand;
else
Fld_60 := Fld_58.Info;
As_Entity_3 := (Info => Fld_60, Node => Bare_Item_6); 
   If_Result_23 := As_Entity_3;
end if;
                  Item_6 := If_Result_23; 
   --# scope-start
               --# bind o Item_6
      --# expr-start 7675 '<FieldAccess for is_static_expr at nodes.lkt:14137:50>' Fld_61 ada/nodes.lkt:14137
      if Item_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_61 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Item_6.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Item_6.Info);
--# end
--# expr-done 7675
      Quantifier_Result_3 := Fld_61;
   --# end
               exit when not Quantifier_Result_3;
         end loop;
      end;
      end if;
--# expr-done 7676
   If_Result_24 := Quantifier_Result_3;
else
   If_Result_24 := False;
end if;
--# expr-done 7677
Let_Result_9 := If_Result_24; 
--# end
Scope_Result_19 := Let_Result_9;
   --# end
            Match_Result := Scope_Result_19; 
         when Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Create_Internal_Entity_Un_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_10 := Cast_Result_10; 
--# bind uo Match_10
--# expr-start 7683 '<BooleanBinaryOp And at nodes.lkt:14139:17>' If_Result_25 ada/nodes.lkt:14139
--# expr-start 7679 '<FieldAccess for is_static_expr at nodes.lkt:14139:17>' Fld_63 ada/nodes.lkt:14139
--# expr-start 7678 '<FieldAccess for expr at nodes.lkt:14139:17>' Fld_62 ada/nodes.lkt:14139
      if Match_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_62 := Create_Internal_Entity_Expr (Node => Match_10.Node.Un_Op_F_Expr, Info => Match_10.Info);
--# expr-done 7678
      if Fld_62.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_63 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_62.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_62.Info);
--# end
--# expr-done 7679
if Fld_63 then
--# expr-start 7681 '<FieldAccess for referenced_decl at nodes.lkt:14140:21>' Fld_65 ada/nodes.lkt:14140
--# expr-start 7680 '<FieldAccess for op at nodes.lkt:14140:21>' Fld_64 ada/nodes.lkt:14140
      if Match_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_64 := Create_Internal_Entity_Op (Node => Match_10.Node.Un_Op_F_Op, Info => Match_10.Info);
--# expr-done 7680
      if Fld_64.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_65 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld_64.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_64.Info);
--# end
--# expr-done 7681
Var_Expr_7 := Fld_65;
if Var_Expr_7 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind decl Var_Expr_7
--# expr-start 7682 '<FieldAccess for is_static_decl at nodes.lkt:14141:31>' Fld_66 ada/nodes.lkt:14141
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_static_decl'
Fld_66 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Static_Decl (Node => Var_Expr_7.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_7.Info);
--# end
--# expr-done 7682
Scope_Result_9 := Fld_66;
   --# end
   Result_Var_9 := Scope_Result_9;
else
   Result_Var_9 := True;
end if;
   If_Result_25 := Result_Var_9;
else
   If_Result_25 := False;
end if;
--# expr-done 7683
Let_Result_10 := If_Result_25; 
--# end
Scope_Result_20 := Let_Result_10;
   --# end
            Match_Result := Scope_Result_20; 
         when Ada_If_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Create_Internal_Entity_If_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_11 := Cast_Result_11; 
--# bind i Match_11
--# expr-start 7699 '<BooleanBinaryOp And at nodes.lkt:14145:17>' If_Result_30 ada/nodes.lkt:14145
--# expr-start 7696 '<BooleanBinaryOp And at nodes.lkt:14146:21>' If_Result_29 ada/nodes.lkt:14146
--# expr-start 7688 '<BooleanBinaryOp And at nodes.lkt:14147:25>' If_Result_26 ada/nodes.lkt:14147
--# expr-start 7685 '<FieldAccess for is_static_expr at nodes.lkt:14147:25>' Fld_68 ada/nodes.lkt:14147
--# expr-start 7684 '<FieldAccess for cond_expr at nodes.lkt:14147:25>' Fld_67 ada/nodes.lkt:14147
      if Match_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_67 := Create_Internal_Entity_Expr (Node => Match_11.Node.If_Expr_F_Cond_Expr, Info => Match_11.Info);
--# expr-done 7684
      if Fld_67.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_68 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_67.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_67.Info);
--# end
--# expr-done 7685
if Fld_68 then
   --# expr-start 7687 '<FieldAccess for is_static_expr at nodes.lkt:14148:29>' Fld_70 ada/nodes.lkt:14148
--# expr-start 7686 '<FieldAccess for then_expr at nodes.lkt:14148:29>' Fld_69 ada/nodes.lkt:14148
      if Match_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_69 := Create_Internal_Entity_Expr (Node => Match_11.Node.If_Expr_F_Then_Expr, Info => Match_11.Info);
--# expr-done 7686
      if Fld_69.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_70 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_69.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_69.Info);
--# end
--# expr-done 7687
   If_Result_26 := Fld_70;
else
   If_Result_26 := False;
end if;
--# expr-done 7688
if If_Result_26 then
   --# expr-start 7695 '<AllQuantifier at nodes.lkt:14150:25>' Quantifier_Result_4 ada/nodes.lkt:14150
   --# expr-start 7689 '<FieldAccess for alternatives at nodes.lkt:14150:25>' Fld_71 ada/nodes.lkt:14150
      if Match_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_71 := Create_Internal_Entity_Elsif_Expr_Part_List (Node => Match_11.Node.If_Expr_F_Alternatives, Info => Match_11.Info);
--# expr-done 7689
Fld_72 := Fld_71.Node;
      Quantifier_Result_4 := True;
      if Fld_72 = null then
      null;
      else
      declare
         Collection : constant Bare_Elsif_Expr_Part_List := Fld_72;
      begin
         for Untyped_Item_8 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_8 := Untyped_Item_8; 
Is_Null_4 := Bare_Item_8 = null; 
if Is_Null_4 then
   If_Result_28 := No_Entity_Elsif_Expr_Part;
else
Fld_73 := Fld_71.Info;
As_Entity_4 := (Info => Fld_73, Node => Bare_Item_8); 
   If_Result_28 := As_Entity_4;
end if;
                  Item_8 := If_Result_28; 
   --# scope-start
               --# bind a Item_8
      --# expr-start 7694 '<BooleanBinaryOp And at nodes.lkt:14152:25>' If_Result_27 ada/nodes.lkt:14152
--# expr-start 7691 '<FieldAccess for is_static_expr at nodes.lkt:14152:25>' Fld_75 ada/nodes.lkt:14152
--# expr-start 7690 '<FieldAccess for cond_expr at nodes.lkt:14152:25>' Fld_74 ada/nodes.lkt:14152
      if Item_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_74 := Create_Internal_Entity_Expr (Node => Item_8.Node.Elsif_Expr_Part_F_Cond_Expr, Info => Item_8.Info);
--# expr-done 7690
      if Fld_74.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_75 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_74.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_74.Info);
--# end
--# expr-done 7691
if Fld_75 then
   --# expr-start 7693 '<FieldAccess for is_static_expr at nodes.lkt:14153:29>' Fld_77 ada/nodes.lkt:14153
--# expr-start 7692 '<FieldAccess for then_expr at nodes.lkt:14153:29>' Fld_76 ada/nodes.lkt:14153
      if Item_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_76 := Create_Internal_Entity_Expr (Node => Item_8.Node.Elsif_Expr_Part_F_Then_Expr, Info => Item_8.Info);
--# expr-done 7692
      if Fld_76.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_77 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_76.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_76.Info);
--# end
--# expr-done 7693
   If_Result_27 := Fld_77;
else
   If_Result_27 := False;
end if;
--# expr-done 7694
      Quantifier_Result_4 := If_Result_27;
   --# end
               exit when not Quantifier_Result_4;
         end loop;
      end;
      end if;
--# expr-done 7695
   If_Result_29 := Quantifier_Result_4;
else
   If_Result_29 := False;
end if;
--# expr-done 7696
if If_Result_29 then
   --# expr-start 7698 '<FieldAccess for is_static_expr at nodes.lkt:14156:21>' Fld_79 ada/nodes.lkt:14156
--# expr-start 7697 '<FieldAccess for else_expr at nodes.lkt:14156:21>' Fld_78 ada/nodes.lkt:14156
      if Match_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_78 := Create_Internal_Entity_Expr (Node => Match_11.Node.If_Expr_F_Else_Expr, Info => Match_11.Info);
--# expr-done 7697
      if Fld_78.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_79 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_78.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_78.Info);
--# end
--# expr-done 7698
   If_Result_30 := Fld_79;
else
   If_Result_30 := False;
end if;
--# expr-done 7699
Let_Result_11 := If_Result_30; 
--# end
Scope_Result_21 := Let_Result_11;
   --# end
            Match_Result := Scope_Result_21; 
         when Ada_Paren_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_12 := Create_Internal_Entity_Paren_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_12 := Cast_Result_12; 
--# bind pe Match_12
--# expr-start 7701 '<FieldAccess for is_static_expr at nodes.lkt:14157:35>' Fld_81 ada/nodes.lkt:14157
--# expr-start 7700 '<FieldAccess for expr at nodes.lkt:14157:35>' Fld_80 ada/nodes.lkt:14157
      if Match_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_80 := Create_Internal_Entity_Expr (Node => Match_12.Node.Paren_Expr_F_Expr, Info => Match_12.Info);
--# expr-done 7700
      if Fld_80.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_81 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_80.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_80.Info);
--# end
--# expr-done 7701
Let_Result_12 := Fld_81; 
--# end
Scope_Result_22 := Let_Result_12;
   --# end
            Match_Result := Scope_Result_22; 
         when Ada_Abstract_State_Decl_Expr .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Case_Expr_Alternative | Ada_Case_Expr | Ada_Contract_Cases .. Ada_Format_String_Literal | Ada_Quantified_Expr .. Ada_Raise_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_13 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_13 := Cast_Result_13; 
--# bind _ Match_13
Let_Result_13 := False; 
--# end
Scope_Result_23 := Let_Result_13;
   --# end
            Match_Result := Scope_Result_23; 
end case;
--# expr-done 7702
Dyn_Var_Bind_Result := Match_Result; 
--# expr-done 7703
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Is_Static_Expr;
--# end
--# property-start Expr.eval_as_int ada/nodes.lkt:14176
pragma Warnings (Off, "is not referenced");
 function Expr_P_Eval_As_Int
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Big_Integer_Type
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Big_Integer_Type;
            procedure Finalizer_Scope_181 with Inline_Always;
      Fld : Big_Integer_Type;
            procedure Finalizer_Scope_181 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_181;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7704 '<FieldAccess for eval_as_int_in_env at nodes.lkt:14177:9>' Fld ada/nodes.lkt:14177
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Eval_As_Int_In_Env (Node => Ent.Node, Env => No_Internal_Substitution_Array_Type, E_Info => Ent.Info);
--# expr-done 7704
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_181;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_181;
            raise;
      end;
   return Property_Result;
end Expr_P_Eval_As_Int;
--# end
--# property-start Expr.eval_as_string ada/nodes.lkt:14211
pragma Warnings (Off, "is not referenced");
 function Expr_P_Eval_As_String
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_183 with Inline_Always;
      Fld : String_Type;
            procedure Finalizer_Scope_183 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_183;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7705 '<FieldAccess for eval_as_string_in_env at nodes.lkt:14212:9>' Fld ada/nodes.lkt:14212
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Eval_As_String_In_Env (Node => Ent.Node, Env => No_Internal_Substitution_Array_Type, E_Info => Ent.Info);
--# expr-done 7705
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_183;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_183;
            raise;
      end;
   return Property_Result;
end Expr_P_Eval_As_String;
--# end
--# property-start Expr.discrete_range ada/nodes.lkt:14233
pragma Warnings (Off, "is not referenced");
 function Expr_P_Discrete_Range
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Discrete_Range;
      Match_0 : Internal_Entity_Attribute_Ref;
Match_1 : Internal_Entity_Name;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Match_2 : Internal_Entity_Bin_Op;
Match_3 : Internal_Entity_Expr;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Discrete_Range;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Discrete_Range;
Scope_Result : Internal_Discrete_Range;
Result_Var : Internal_Discrete_Range;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Internal_Entity_Expr;
New_Struct : Internal_Discrete_Range;
Match_Prefix : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Attribute_Ref;
Let_Result : Internal_Discrete_Range;
Scope_Result_1 : Internal_Discrete_Range;
Cast_Result_1 : Internal_Entity_Name;
Let_Result_1 : Internal_Discrete_Range;
Scope_Result_2 : Internal_Discrete_Range;
Cast_Result_2 : Internal_Entity_Bin_Op;
Let_Result_2 : Internal_Discrete_Range;
Scope_Result_3 : Internal_Discrete_Range;
Cast_Result_3 : Internal_Entity_Expr;
Let_Result_3 : Internal_Discrete_Range;
Scope_Result_4 : Internal_Discrete_Range;
Match_Result : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7713 '<Match at nodes.lkt:14233:43>' Match_Result ada/nodes.lkt:14233
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Expr (Match_Prefix.Node.Kind) is
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Attribute_Ref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind ar Match_0
--# expr-start 7707 '<FieldAccess for discrete_range at nodes.lkt:14235:34>' Fld_1 ada/nodes.lkt:14235
--# expr-start 7706 '<FieldAccess for prefix at nodes.lkt:14235:34>' Fld ada/nodes.lkt:14235
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Match_0.Node.Attribute_Ref_F_Prefix, Info => Match_0.Info);
--# expr-done 7706
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.discrete_range
Fld_1 := Libadalang.Implementation.Expr_P_Discrete_Range (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 7707
Let_Result := Fld_1; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind n Match_1
--# expr-start 7708 '<FieldAccess for name_designated_type at nodes.lkt:14237:13>' Fld_2 ada/nodes.lkt:14237
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_2 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 7708
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind dt Var_Expr_0
--# expr-start 7709 '<FieldAccess for discrete_range at nodes.lkt:14237:49>' Fld_3 ada/nodes.lkt:14237
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discrete_range'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discrete_Range (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7709
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Discrete_Range;
end if;
Let_Result_1 := Result_Var; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Bin_Op .. Ada_Relation_Op =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Bin_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind bo Match_2
--# expr-start 7712 '<New DiscreteRange at nodes.lkt:14238:27>' New_Struct ada/nodes.lkt:14238
--# expr-start 7710 '<FieldAccess for right at nodes.lkt:14238:71>' Fld_5 ada/nodes.lkt:14238
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Match_2.Node.Bin_Op_F_Right, Info => Match_2.Info);
--# expr-done 7710
--# expr-start 7711 '<FieldAccess for left at nodes.lkt:14238:51>' Fld_4 ada/nodes.lkt:14238
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Match_2.Node.Bin_Op_F_Left, Info => Match_2.Info);
--# expr-done 7711
New_Struct := (High_Bound => Fld_5, Low_Bound => Fld_4); 
--# expr-done 7712
Let_Result_2 := New_Struct; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Abstract_State_Decl_Expr .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_3; 
--# bind _ Match_3
Let_Result_3 := No_Discrete_Range; 
--# end
Scope_Result_4 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_4; 
end case;
--# expr-done 7713
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Discrete_Range;
--# end
--# property-start Expr.env_elements ada/nodes.lkt:14243
pragma Warnings (Off, "is not referenced");
 function Expr_P_Env_Elements
  (Node : Bare_Expr
      ; Env : Lexical_Env
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind no_visibility No_Visibility
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_186 with Inline_Always;
      Fld : Internal_Entity_Array_Access;
Fld_1 : Boolean;
Map_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_186 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_186;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7716 '<Map at nodes.lkt:14244:9>' Map_Result ada/nodes.lkt:14244
   --# expr-start 7714 '<FieldAccess for env_elements_impl at nodes.lkt:14244:9>' Fld ada/nodes.lkt:14244
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.env_elements_impl'
Fld := Libadalang.Implementation.Dispatcher_Expr_P_Env_Elements_Impl (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 7714
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
         --# expr-start 7715 '<FieldAccess for has_visibility at nodes.lkt:14244:48>' Fld_1 ada/nodes.lkt:14244
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_1 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 7715
         if Fld_1 then
         declare
            Item_To_Append : constant Internal_Entity := Item_0;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7716
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_186;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_186;
            raise;
      end;
   return Property_Result;
end Expr_P_Env_Elements;
--# end
--# property-start Expr.matching_nodes ada/nodes.lkt:14249
pragma Warnings (Off, "is not referenced");
 function Expr_P_Matching_Nodes
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_187 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_187 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_187;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7719 '<bind at nodes.lkt:14250:9>' Dyn_Var_Bind_Result ada/nodes.lkt:14250
--# expr-start 7717 '<FieldAccess for node_env at nodes.lkt:14250:20>' Fld ada/nodes.lkt:14250
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Self);
--# expr-done 7717
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 7718 '<FieldAccess for env_elements at nodes.lkt:14252:9>' Fld_1 ada/nodes.lkt:14252
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.env_elements
Fld_1 := Libadalang.Implementation.Expr_P_Env_Elements (Node => Ent.Node, Env => Bound_Env, No_Visibility => False, E_Info => Ent.Info);
--# end
--# expr-done 7718
Dyn_Var_Bind_Result := Fld_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7719
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_187;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_187;
            raise;
      end;
   return Property_Result;
end Expr_P_Matching_Nodes;
--# end
--# property-start '[dispatcher]Expr.has_context_free_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Expr_P_Has_Context_Free_Type
  (Node : Bare_Expr
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Expr (Self.Kind) is
               when Ada_Abstract_State_Decl_Expr | Ada_Box_Expr .. Ada_Case_Expr_Alternative | Ada_Contract_Cases | Ada_Format_String_Literal .. Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Reduce_Attribute_Ref | Ada_Identifier .. Ada_Op_Xor | Ada_Int_Literal .. Ada_Update_Attribute_Ref | Ada_Quantified_Expr =>
                  --# property-call-start Expr.has_context_free_type
                  Property_Result := Expr_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Allocator =>
                  --# property-call-start Allocator.has_context_free_type
                  Property_Result := Allocator_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Aggregate .. Ada_Null_Record_Aggregate =>
                  --# property-call-start BaseAggregate.has_context_free_type
                  Property_Result := Base_Aggregate_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Bin_Op =>
                  --# property-call-start BinOp.has_context_free_type
                  Property_Result := Bin_Op_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Relation_Op =>
                  --# property-call-start RelationOp.has_context_free_type
                  Property_Result := Relation_Op_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Concat_Op =>
                  --# property-call-start ConcatOp.has_context_free_type
                  Property_Result := Concat_Op_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Concat_Operand =>
                  --# property-call-start ConcatOperand.has_context_free_type
                  Property_Result := Concat_Operand_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Case_Expr =>
                  --# property-call-start CaseExpr.has_context_free_type
                  Property_Result := Case_Expr_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_If_Expr =>
                  --# property-call-start IfExpr.has_context_free_type
                  Property_Result := If_Expr_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Decl_Expr =>
                  --# property-call-start DeclExpr.has_context_free_type
                  Property_Result := Decl_Expr_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Attribute_Ref =>
                  --# property-call-start AttributeRef.has_context_free_type
                  Property_Result := Attribute_Ref_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.has_context_free_type
                  Property_Result := Dotted_Name_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Char_Literal =>
                  --# property-call-start CharLiteral.has_context_free_type
                  Property_Result := Char_Literal_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_String_Literal =>
                  --# property-call-start StringLiteral.has_context_free_type
                  Property_Result := String_Literal_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Null_Literal =>
                  --# property-call-start NullLiteral.has_context_free_type
                  Property_Result := Null_Literal_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Paren_Expr =>
                  --# property-call-start ParenExpr.has_context_free_type
                  Property_Result := Paren_Expr_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Raise_Expr =>
                  --# property-call-start RaiseExpr.has_context_free_type
                  Property_Result := Raise_Expr_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
               when Ada_Un_Op =>
                  --# property-call-start UnOp.has_context_free_type
                  Property_Result := Un_Op_P_Has_Context_Free_Type
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Expr_P_Has_Context_Free_Type;
--# end
--# property-start '[dispatcher]Expr.potential_actuals_for_dispatch' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Expr_P_Potential_Actuals_For_Dispatch
  (Node : Bare_Expr
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Expected_Type_For_Expr_Array_Access
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind spec Spec
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Expected_Type_For_Expr_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Expr (Self.Kind) is
               when Ada_Abstract_State_Decl_Expr .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Raise_Expr =>
                  --# property-call-start Expr.potential_actuals_for_dispatch
                  Property_Result := Expr_P_Potential_Actuals_For_Dispatch
                    (Self
                        , Spec
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Bin_Op .. Ada_Relation_Op =>
                  --# property-call-start BinOp.potential_actuals_for_dispatch
                  Property_Result := Bin_Op_P_Potential_Actuals_For_Dispatch
                    (Self
                        , Spec
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.potential_actuals_for_dispatch
                  Property_Result := Name_P_Potential_Actuals_For_Dispatch
                    (Self
                        , Spec
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Un_Op =>
                  --# property-call-start UnOp.potential_actuals_for_dispatch
                  Property_Result := Un_Op_P_Potential_Actuals_For_Dispatch
                    (Self
                        , Spec
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Expr_P_Potential_Actuals_For_Dispatch;
--# end
--# property-start '[dispatcher]Expr.is_dispatching_call' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Expr_P_Is_Dispatching_Call
  (Node : Bare_Expr
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Expr (Self.Kind) is
               when Ada_Abstract_State_Decl_Expr .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Raise_Expr =>
                  --# property-call-start Expr.is_dispatching_call
                  Property_Result := Expr_P_Is_Dispatching_Call
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Bin_Op .. Ada_Relation_Op =>
                  --# property-call-start BinOp.is_dispatching_call
                  Property_Result := Bin_Op_P_Is_Dispatching_Call
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Identifier | Ada_String_Literal .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.is_dispatching_call
                  Property_Result := Name_P_Is_Dispatching_Call
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Op_Abs .. Ada_Op_Xor =>
                  --# property-call-start Op.is_dispatching_call
                  Property_Result := Op_P_Is_Dispatching_Call
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Un_Op =>
                  --# property-call-start UnOp.is_dispatching_call
                  Property_Result := Un_Op_P_Is_Dispatching_Call
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Expr_P_Is_Dispatching_Call;
--# end
--# property-start '[dispatcher]Expr.first_corresponding_decl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Expr_P_First_Corresponding_Decl
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Expr (Self.Kind) is
               when Ada_Abstract_State_Decl_Expr .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Un_Op =>
                  --# property-call-start Expr.first_corresponding_decl
                  Property_Result := Expr_P_First_Corresponding_Decl
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.first_corresponding_decl
                  Property_Result := Name_P_First_Corresponding_Decl
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Expr_P_First_Corresponding_Decl;
--# end
--# property-start '[dispatcher]Expr.designated_env_no_overloading' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Expr_P_Designated_Env_No_Overloading
  (Node : Bare_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Expr (Self.Kind) is
               when Ada_Abstract_State_Decl_Expr .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Un_Op =>
                  --# property-call-start Expr.designated_env_no_overloading
                  Property_Result := Expr_P_Designated_Env_No_Overloading
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.designated_env_no_overloading
                  Property_Result := Call_Expr_P_Designated_Env_No_Overloading
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.designated_env_no_overloading
                  Property_Result := Dotted_Name_P_Designated_Env_No_Overloading
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Char_Literal .. Ada_String_Literal =>
                  --# property-call-start BaseId.designated_env_no_overloading
                  Property_Result := Base_Id_P_Designated_Env_No_Overloading
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Expr_P_Designated_Env_No_Overloading;
--# end
--# property-start '[dispatcher]Expr.designated_env' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Expr_P_Designated_Env
  (Node : Bare_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Expr (Self.Kind) is
               when Ada_Abstract_State_Decl_Expr .. Ada_Membership_Expr | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name | Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Synthetic_Identifier | Ada_Update_Attribute_Ref .. Ada_Un_Op =>
                  --# property-call-start Expr.designated_env
                  Property_Result := Expr_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Array_Subcomponent_Choice_Name =>
                  --# property-call-start ArraySubcomponentChoiceName.designated_env
                  Property_Result := Array_Subcomponent_Choice_Name_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Attribute_Ref =>
                  --# property-call-start AttributeRef.designated_env
                  Property_Result := Attribute_Ref_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.designated_env
                  Property_Result := Call_Expr_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.designated_env
                  Property_Result := Dotted_Name_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Explicit_Deref =>
                  --# property-call-start ExplicitDeref.designated_env
                  Property_Result := Explicit_Deref_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Qual_Expr =>
                  --# property-call-start QualExpr.designated_env
                  Property_Result := Qual_Expr_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Char_Literal .. Ada_String_Literal =>
                  --# property-call-start BaseId.designated_env
                  Property_Result := Base_Id_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
               when Ada_Target_Name =>
                  --# property-call-start TargetName.designated_env
                  Property_Result := Target_Name_P_Designated_Env
                    (Self
                        , Env
                        , Origin
                        , No_Visibility
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Expr_P_Designated_Env;
--# end
--# property-start '[dispatcher]Expr.env_elements_impl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Expr_P_Env_Elements_Impl
  (Node : Bare_Expr
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Expr (Self.Kind) is
               when Ada_Abstract_State_Decl_Expr .. Ada_Attribute_Ref | Ada_Discrete_Subtype_Name | Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Un_Op =>
                  --# property-call-start Expr.env_elements_impl
                  Property_Result := Expr_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.env_elements_impl
                  Property_Result := Call_Expr_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
               when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
                  --# property-call-start DefiningName.env_elements_impl
                  Property_Result := Defining_Name_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.env_elements_impl
                  Property_Result := Dotted_Name_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
               when Ada_End_Name =>
                  --# property-call-start EndName.env_elements_impl
                  Property_Result := End_Name_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
               when Ada_Explicit_Deref =>
                  --# property-call-start ExplicitDeref.env_elements_impl
                  Property_Result := Explicit_Deref_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
               when Ada_Qual_Expr =>
                  --# property-call-start QualExpr.env_elements_impl
                  Property_Result := Qual_Expr_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
               when Ada_Char_Literal .. Ada_Op_Xor =>
                  --# property-call-start BaseId.env_elements_impl
                  Property_Result := Base_Id_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
               when Ada_String_Literal =>
                  --# property-call-start StringLiteral.env_elements_impl
                  Property_Result := String_Literal_P_Env_Elements_Impl
                    (Self
                        , Env
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Expr_P_Env_Elements_Impl;
--# end
--# property-start Expr.has_context_free_type ada/nodes.lkt:14264
pragma Warnings (Off, "is not referenced");
 function Expr_P_Has_Context_Free_Type
  (Node : Bare_Expr
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Has_Context_Free_Type;
--# end
--# property-start Expr.potential_actuals_for_dispatch ada/nodes.lkt:14275
pragma Warnings (Off, "is not referenced");
 function Expr_P_Potential_Actuals_For_Dispatch
  (Node : Bare_Expr
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Expected_Type_For_Expr_Array_Access
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind spec Spec
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Expected_Type_For_Expr_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Expr.potential_actuals_for_dispatch not implemented";
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Potential_Actuals_For_Dispatch;
--# end
--# property-start Expr.is_dispatching_call ada/nodes.lkt:14301
pragma Warnings (Off, "is not referenced");
 function Expr_P_Is_Dispatching_Call
  (Node : Bare_Expr
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Precondition_Failure with "Invalid node type: expected Name, UnOp or BinOp";
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Is_Dispatching_Call;
--# end
--# property-start Expr.first_corresponding_decl ada/nodes.lkt:14309
pragma Warnings (Off, "is not referenced");
 function Expr_P_First_Corresponding_Decl
  (Node : Bare_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Basic_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_First_Corresponding_Decl;
--# end
--# property-start Expr.designated_env_no_overloading ada/nodes.lkt:14316
pragma Warnings (Off, "is not referenced");
 function Expr_P_Designated_Env_No_Overloading
  (Node : Bare_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Expr  := Bare_Expr (Node);
     Ent : Internal_Entity_Expr :=
       Internal_Entity_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_192 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_192 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_192;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7720 '<FieldAccess for designated_env at nodes.lkt:14316:55>' Fld ada/nodes.lkt:14316
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Ent.Node, Env => Env, Origin => Origin, No_Visibility => No_Visibility, E_Info => Ent.Info);
--# end
--# expr-done 7720
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_192;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_192;
            raise;
      end;
   return Property_Result;
end Expr_P_Designated_Env_No_Overloading;
--# end
--# property-start Expr.designated_env ada/nodes.lkt:14325
pragma Warnings (Off, "is not referenced");
 function Expr_P_Designated_Env
  (Node : Bare_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Expr.designated_env not implemented";
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Designated_Env;
--# end
--# property-start Expr.env_elements_impl ada/nodes.lkt:14333
pragma Warnings (Off, "is not referenced");
 function Expr_P_Env_Elements_Impl
  (Node : Bare_Expr
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Expr  := Bare_Expr (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Expr.env_elements_impl not implemented";
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Expr_P_Env_Elements_Impl;
--# end
   --
   --  Primitives for Bare_Abstract_State_Decl_Expr
   --
      procedure Initialize_Fields_For_Abstract_State_Decl_Expr
        (Self : Bare_Abstract_State_Decl_Expr
         ; Abstract_State_Decl_Expr_F_State_Decl : Bare_Ada_Node
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Abstract_State_Decl_Expr_F_State_Decl := Abstract_State_Decl_Expr_F_State_Decl;
      end Initialize_Fields_For_Abstract_State_Decl_Expr;
   function Abstract_State_Decl_Expr_F_State_Decl
     (Node : Bare_Abstract_State_Decl_Expr) return Bare_Ada_Node
   is
   begin
         return Node.Abstract_State_Decl_Expr_F_State_Decl;
   end;
--# property-start AbstractStateDeclExpr.xref_equation ada/nodes.lkt:14347
pragma Warnings (Off, "is not referenced");
 function Abstract_State_Decl_Expr_P_Xref_Equation
  (Node : Bare_Abstract_State_Decl_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Abstract_State_Decl_Expr  := Bare_Abstract_State_Decl_Expr (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1099 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1099 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1099;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14347:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1099;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1099;
            raise;
      end;
   return Property_Result;
end Abstract_State_Decl_Expr_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Allocator
   --
      procedure Initialize_Fields_For_Allocator
        (Self : Bare_Allocator
         ; Allocator_F_Subpool : Bare_Name
         ; Allocator_F_Type_Or_Expr : Bare_Ada_Node
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Allocator_F_Subpool := Allocator_F_Subpool;
            Self.Allocator_F_Type_Or_Expr := Allocator_F_Type_Or_Expr;
      end Initialize_Fields_For_Allocator;
   function Allocator_F_Subpool
     (Node : Bare_Allocator) return Bare_Name
   is
   begin
         return Node.Allocator_F_Subpool;
   end;
   function Allocator_F_Type_Or_Expr
     (Node : Bare_Allocator) return Bare_Ada_Node
   is
   begin
         return Node.Allocator_F_Type_Or_Expr;
   end;
--# property-start Allocator.has_context_free_type ada/nodes.lkt:14358
pragma Warnings (Off, "is not referenced");
 function Allocator_P_Has_Context_Free_Type
  (Node : Bare_Allocator
  )
   return Boolean
is
   Self : Bare_Allocator  := Bare_Allocator (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Allocator_P_Has_Context_Free_Type;
--# end
--# property-start Allocator.get_allocated_type ada/nodes.lkt:14362
pragma Warnings (Off, "is not referenced");
 function Allocator_P_Get_Allocated_Type
  (Node : Bare_Allocator
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Allocator  := Bare_Allocator (Node);
     Ent : Internal_Entity_Allocator :=
       Internal_Entity_Allocator'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Match_0 : Internal_Entity_Subtype_Indication;
Match_1 : Internal_Entity_Qual_Expr;
Match_2 : Internal_Entity;
Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Name;
Fld_4 : Internal_Entity_Base_Type_Decl;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Subtype_Indication;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Qual_Expr;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7727 '<bind at nodes.lkt:14363:9>' Dyn_Var_Bind_Result ada/nodes.lkt:14363
--# expr-start 7721 '<FieldAccess for origin_node at nodes.lkt:14363:23>' Fld ada/nodes.lkt:14363
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 7721
Bound_Origin := Fld; 
--# expr-start 7726 '<Match at nodes.lkt:14365:9>' Match_Result ada/nodes.lkt:14365
--# expr-start 7722 '<FieldAccess for type_or_expr at nodes.lkt:14365:15>' Fld_1 ada/nodes.lkt:14365
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity (Node => Ent.Node.Allocator_F_Type_Or_Expr, Info => Ent.Info);
--# expr-done 7722
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind t Match_0
--# expr-start 7723 '<FieldAccess for designated_type at nodes.lkt:14366:50>' Fld_2 ada/nodes.lkt:14366
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Match_0.Node, Origin => Bound_Origin, E_Info => Match_0.Info);
--# end
--# expr-done 7723
Let_Result := Fld_2; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Qual_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Qual_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind q Match_1
--# expr-start 7725 '<FieldAccess for name_designated_type at nodes.lkt:14367:41>' Fld_4 ada/nodes.lkt:14367
--# expr-start 7724 '<FieldAccess for prefix at nodes.lkt:14367:41>' Fld_3 ada/nodes.lkt:14367
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Match_1.Node.Qual_Expr_F_Prefix, Info => Match_1.Info);
--# expr-done 7724
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_4 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 7725
Let_Result_1 := Fld_4; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Explicit_Deref | Ada_Reduce_Attribute_Ref .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Base_Type_Decl; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 7726
Dyn_Var_Bind_Result := Match_Result; 
--# expr-done 7727
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Allocator_P_Get_Allocated_Type;
--# end
--# property-start Allocator.xref_equation ada/nodes.lkt:14373
pragma Warnings (Off, "is not referenced");
 function Allocator_P_Xref_Equation
  (Node : Bare_Allocator
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Allocator  := Bare_Allocator (Node);
     Ent : Internal_Entity_Allocator :=
       Internal_Entity_Allocator'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1102 with Inline_Always;
      Fld : Internal_Entity;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Logic_Var;
Fld_5 : Internal_Entity_Base_Type_Decl;
Pred : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1102 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1102;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7737 '<LogicBinaryOp And at nodes.lkt:14374:9>' And_Pred_1 ada/nodes.lkt:14374
--# expr-start 7733 '<LogicBinaryOp And at nodes.lkt:14375:13>' And_Pred ada/nodes.lkt:14375
--# expr-start 7729 '<FieldAccess for sub_equation at nodes.lkt:14375:13>' Fld_1 ada/nodes.lkt:14375
--# expr-start 7728 '<FieldAccess for type_or_expr at nodes.lkt:14375:13>' Fld ada/nodes.lkt:14375
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Ent.Node.Allocator_F_Type_Or_Expr, Info => Ent.Info);
--# expr-done 7728
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 7729
--# expr-start 7732 '<Bind at nodes.lkt:14376:18>' Bind_Result ada/nodes.lkt:14376
--# expr-start 7730 '<FieldAccess for expected_type_var at nodes.lkt:14376:18>' Fld_2 ada/nodes.lkt:14376
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7730
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 7731 '<FieldAccess for type_var at nodes.lkt:14376:47>' Fld_3 ada/nodes.lkt:14376
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7731
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Bind_Result := Solver.Create_Unify (Fld_2, Fld_3, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14376:18") else null)); 
--# expr-done 7732
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14375:13") else null)); 
--# expr-done 7733
--# expr-start 7736 '<Predicate on BaseTypeDecl.matching_allocator_type at nodes.lkt:14378:14>' Pred ada/nodes.lkt:14378
--# expr-start 7734 '<FieldAccess for type_var at nodes.lkt:14378:52>' Fld_4 ada/nodes.lkt:14378
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7734
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 7735 '<FieldAccess for get_allocated_type at nodes.lkt:14379:9>' Fld_5 ada/nodes.lkt:14379
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Allocator.get_allocated_type
Fld_5 := Libadalang.Implementation.Allocator_P_Get_Allocated_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7735
Pred := Solver.Create_Predicate (Fld_4, Create_Base_Type_Decl_P_Matching_Allocator_Type_0_Predicate (Fld_5, Origin)); 
--# expr-done 7736
And_Pred_1 := Create_And (And_Pred, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14374:9") else null)); 
--# expr-done 7737
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1102;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1102;
            raise;
      end;
   return Property_Result;
end Allocator_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Base_Aggregate
   --
      procedure Initialize_Fields_For_Base_Aggregate
        (Self : Bare_Base_Aggregate
         ; Base_Aggregate_F_Ancestor_Expr : Bare_Expr
         ; Base_Aggregate_F_Assocs : Bare_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Base_Aggregate_F_Ancestor_Expr := Base_Aggregate_F_Ancestor_Expr;
            Self.Base_Aggregate_F_Assocs := Base_Aggregate_F_Assocs;
      end Initialize_Fields_For_Base_Aggregate;
   function Base_Aggregate_F_Ancestor_Expr
     (Node : Bare_Base_Aggregate) return Bare_Expr
   is
   begin
         return Node.Base_Aggregate_F_Ancestor_Expr;
   end;
   function Base_Aggregate_F_Assocs
     (Node : Bare_Base_Aggregate) return Bare_Assoc_List
   is
   begin
         return Node.Base_Aggregate_F_Assocs;
   end;
--# property-start BaseAggregate.has_context_free_type ada/nodes.lkt:14391
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Has_Context_Free_Type
  (Node : Bare_Base_Aggregate
  )
   return Boolean
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Aggregate_P_Has_Context_Free_Type;
--# end
--# property-start BaseAggregate.xref_equation ada/nodes.lkt:14394
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Xref_Equation
  (Node : Bare_Base_Aggregate
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1104 with Inline_Always;
            procedure Finalizer_Scope_3036 with Inline_Always;
            procedure Finalizer_Scope_3037 with Inline_Always;
      Local_Type_Constraint : Logic_Equation;
Var_Expr_0 : Internal_Entity_Expr;
True_Rel : Logic_Equation;
Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Sym : Symbol_Type;
Fld_4 : Boolean;
Sym_1 : Symbol_Type;
Fld_5 : Boolean;
If_Result : Boolean;
Sym_2 : Symbol_Type;
Fld_6 : Boolean;
If_Result_1 : Boolean;
Sym_3 : Symbol_Type;
Fld_7 : Boolean;
If_Result_2 : Boolean;
Sym_4 : Symbol_Type;
Fld_8 : Boolean;
If_Result_3 : Boolean;
Sym_5 : Symbol_Type;
Fld_9 : Boolean;
If_Result_4 : Boolean;
Sym_6 : Symbol_Type;
Fld_10 : Boolean;
If_Result_5 : Boolean;
Sym_7 : Symbol_Type;
Fld_11 : Boolean;
If_Result_6 : Boolean;
Fld_12 : Boolean;
If_Result_7 : Boolean;
If_Result_8 : Logic_Equation;
Fld_13 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_14 : Logic_Equation;
Fld_15 : Logic_Equation;
Fld_16 : Logic_Equation;
Fld_17 : Bare_Expr;
Cast_Result_1 : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld_18 : Logic_Var;
Pred_1 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_A : Boolean;
If_Result_9 : Logic_Equation;
Is_A_1 : Boolean;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_19 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result_10 : Boolean;
If_Result_11 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_20 : Internal_Entity_Assoc_List;
Fld_21 : Bare_Assoc_List;
Fld_22 : Internal_Entity_Info;
Item_1 : Internal_Entity_Basic_Assoc;
Bare_Item_1 : Bare_Basic_Assoc;
Fld_23 : Logic_Equation;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null_1 : Boolean;
If_Result_12 : Internal_Entity_Basic_Assoc;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_3 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1104 is
            begin
                     Dec_Ref (True_Rel);
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (If_Result_8);
                     Dec_Ref (Local_Type_Constraint);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1104;
            procedure Finalizer_Scope_3036 is
            begin
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Pred_1);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result_9);
                     Dec_Ref (If_Result_11);
            end Finalizer_Scope_3036;
            procedure Finalizer_Scope_3037 is
            begin
                     Dec_Ref (Fld_23);
            end Finalizer_Scope_3037;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7797 '<Let at nodes.lkt:14400:9>' Let_Result ada/nodes.lkt:14400
--# scope-start
--# expr-start 7771 '<If at nodes.lkt:14401:13>' If_Result_8 ada/nodes.lkt:14401
--# expr-start 7762 '<BooleanBinaryOp Or at nodes.lkt:14405:17>' If_Result_7 ada/nodes.lkt:14405
--# expr-start 7760 '<BooleanBinaryOp Or at nodes.lkt:14405:17>' If_Result_6 ada/nodes.lkt:14405
--# expr-start 7757 '<BooleanBinaryOp Or at nodes.lkt:14405:17>' If_Result_5 ada/nodes.lkt:14405
--# expr-start 7754 '<BooleanBinaryOp Or at nodes.lkt:14405:17>' If_Result_4 ada/nodes.lkt:14405
--# expr-start 7751 '<BooleanBinaryOp Or at nodes.lkt:14405:17>' If_Result_3 ada/nodes.lkt:14405
--# expr-start 7748 '<BooleanBinaryOp Or at nodes.lkt:14405:17>' If_Result_2 ada/nodes.lkt:14405
--# expr-start 7745 '<BooleanBinaryOp Or at nodes.lkt:14405:17>' If_Result_1 ada/nodes.lkt:14405
--# expr-start 7742 '<BooleanBinaryOp Or at nodes.lkt:14405:17>' If_Result ada/nodes.lkt:14405
--# expr-start 7739 '<FieldAccess for in_aspect at nodes.lkt:14405:17>' Fld_4 ada/nodes.lkt:14405
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7738 '<Symbol Global at nodes.lkt:14406:28>' Sym ada/nodes.lkt:14406
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Global); 
--# expr-done 7738
--# property-call-start AdaNode.in_aspect
Fld_4 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym);
--# end
--# expr-done 7739
if Fld_4 then
   If_Result := True;
else
   --# expr-start 7741 '<FieldAccess for in_aspect at nodes.lkt:14407:20>' Fld_5 ada/nodes.lkt:14407
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7740 '<Symbol Refined_Global at nodes.lkt:14407:35>' Sym_1 ada/nodes.lkt:14407
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Global); 
--# expr-done 7740
--# property-call-start AdaNode.in_aspect
Fld_5 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym_1);
--# end
--# expr-done 7741
   If_Result := Fld_5;
end if;
--# expr-done 7742
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 7744 '<FieldAccess for in_aspect at nodes.lkt:14408:20>' Fld_6 ada/nodes.lkt:14408
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7743 '<Symbol Depends at nodes.lkt:14408:35>' Sym_2 ada/nodes.lkt:14408
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Depends); 
--# expr-done 7743
--# property-call-start AdaNode.in_aspect
Fld_6 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym_2);
--# end
--# expr-done 7744
   If_Result_1 := Fld_6;
end if;
--# expr-done 7745
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 7747 '<FieldAccess for in_aspect at nodes.lkt:14409:20>' Fld_7 ada/nodes.lkt:14409
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7746 '<Symbol Refined_Depends at nodes.lkt:14409:35>' Sym_3 ada/nodes.lkt:14409
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Depends); 
--# expr-done 7746
--# property-call-start AdaNode.in_aspect
Fld_7 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym_3);
--# end
--# expr-done 7747
   If_Result_2 := Fld_7;
end if;
--# expr-done 7748
if If_Result_2 then
   If_Result_3 := True;
else
   --# expr-start 7750 '<FieldAccess for in_aspect at nodes.lkt:14410:20>' Fld_8 ada/nodes.lkt:14410
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7749 '<Symbol Test_Case at nodes.lkt:14410:35>' Sym_4 ada/nodes.lkt:14410
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Test_Case); 
--# expr-done 7749
--# property-call-start AdaNode.in_aspect
Fld_8 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym_4);
--# end
--# expr-done 7750
   If_Result_3 := Fld_8;
end if;
--# expr-done 7751
if If_Result_3 then
   If_Result_4 := True;
else
   --# expr-start 7753 '<FieldAccess for in_aspect at nodes.lkt:14411:20>' Fld_9 ada/nodes.lkt:14411
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7752 '<Symbol Refined_State at nodes.lkt:14411:35>' Sym_5 ada/nodes.lkt:14411
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_State); 
--# expr-done 7752
--# property-call-start AdaNode.in_aspect
Fld_9 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym_5);
--# end
--# expr-done 7753
   If_Result_4 := Fld_9;
end if;
--# expr-done 7754
if If_Result_4 then
   If_Result_5 := True;
else
   --# expr-start 7756 '<FieldAccess for in_aspect at nodes.lkt:14412:20>' Fld_10 ada/nodes.lkt:14412
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7755 '<Symbol Aggregate at nodes.lkt:14412:35>' Sym_6 ada/nodes.lkt:14412
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aggregate); 
--# expr-done 7755
--# property-call-start AdaNode.in_aspect
Fld_10 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym_6);
--# end
--# expr-done 7756
   If_Result_5 := Fld_10;
end if;
--# expr-done 7757
if If_Result_5 then
   If_Result_6 := True;
else
   --# expr-start 7759 '<FieldAccess for in_aspect at nodes.lkt:14413:20>' Fld_11 ada/nodes.lkt:14413
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7758 '<Symbol Subprogram_Variant at nodes.lkt:14413:35>' Sym_7 ada/nodes.lkt:14413
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Subprogram_Variant); 
--# expr-done 7758
--# property-call-start AdaNode.in_aspect
Fld_11 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym_7);
--# end
--# expr-done 7759
   If_Result_6 := Fld_11;
end if;
--# expr-done 7760
if If_Result_6 then
   If_Result_7 := True;
else
   --# expr-start 7761 '<FieldAccess for is_contract_cases_base_aggregate at nodes.lkt:14418:20>' Fld_12 ada/nodes.lkt:14418
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.is_contract_cases_base_aggregate
Fld_12 := Libadalang.Implementation.Base_Aggregate_P_Is_Contract_Cases_Base_Aggregate (Node => Self);
--# end
--# expr-done 7761
   If_Result_7 := Fld_12;
end if;
--# expr-done 7762
if If_Result_7 then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14419:18") else null)); 
   If_Result_8 := True_Rel;
else
   --# expr-start 7770 '<bind at nodes.lkt:14421:17>' Dyn_Var_Bind_Result ada/nodes.lkt:14421
--# expr-start 7763 '<FieldAccess for origin_node at nodes.lkt:14421:31>' Fld ada/nodes.lkt:14421
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 7763
Bound_Origin := Fld; 
--# expr-start 7769 '<LogicBinaryOp And at nodes.lkt:14423:17>' And_Pred ada/nodes.lkt:14423
--# expr-start 7765 '<Predicate on BaseTypeDecl.is_array_or_rec at nodes.lkt:14423:17>' Pred ada/nodes.lkt:14423
--# expr-start 7764 '<FieldAccess for expected_type_var at nodes.lkt:14423:47>' Fld_1 ada/nodes.lkt:14423
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7764
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_Predicate (Fld_1, Create_Base_Type_Decl_P_Is_Array_Or_Rec_0_Predicate (Bound_Origin)); 
--# expr-done 7765
--# expr-start 7768 '<Bind at nodes.lkt:14424:22>' Bind_Result ada/nodes.lkt:14424
--# expr-start 7766 '<FieldAccess for expected_type_var at nodes.lkt:14424:22>' Fld_2 ada/nodes.lkt:14424
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7766
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 7767 '<FieldAccess for type_var at nodes.lkt:14424:51>' Fld_3 ada/nodes.lkt:14424
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7767
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Bind_Result := Solver.Create_Unify (Fld_2, Fld_3, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14424:22") else null)); 
--# expr-done 7768
And_Pred := Create_And (Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14423:17") else null)); 
--# expr-done 7769
Dyn_Var_Bind_Result := And_Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7770
   If_Result_8 := Dyn_Var_Bind_Result;
end if;
      Inc_Ref (If_Result_8);
--# expr-done 7771
Local_Type_Constraint := If_Result_8; Inc_Ref (Local_Type_Constraint);
--# bind type_constraint Local_Type_Constraint
--# expr-start 7796 '<LogicBinaryOp And at nodes.lkt:14427:9>' And_Pred_3 ada/nodes.lkt:14427
--# expr-start 7791 '<LogicBinaryOp And at nodes.lkt:14428:13>' And_Pred_2 ada/nodes.lkt:14428
--# expr-start 7772 '<FieldAccess for ancestor_expr at nodes.lkt:14429:18>' Fld_13 ada/nodes.lkt:14429
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Expr (Node => Ent.Node.Base_Aggregate_F_Ancestor_Expr, Info => Ent.Info);
--# expr-done 7772
Var_Expr_0 := Fld_13;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind ae Var_Expr_0
--# expr-start 7790 '<If at nodes.lkt:14434:17>' If_Result_11 ada/nodes.lkt:14434
--# expr-start 7778 '<BooleanBinaryOp And at nodes.lkt:14435:21>' If_Result_10 ada/nodes.lkt:14435
--# expr-start 7773 '<IsA Name at nodes.lkt:14435:21>' Is_A_1 ada/nodes.lkt:14435
Is_A_1 := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Name; 
--# expr-done 7773
if Is_A_1 then
   --# expr-start 7777 '<Not at nodes.lkt:14436:25>' Not_Val ada/nodes.lkt:14436
--# expr-start 7776 '<IsNull at nodes.lkt:14436:29>' Is_Null ada/nodes.lkt:14436
--# expr-start 7775 '<FieldAccess for name_designated_type at nodes.lkt:14436:29>' Fld_19 ada/nodes.lkt:14436
--# expr-start 7774 '<Cast to Name at nodes.lkt:14436:29>' Cast_Result_2 ada/nodes.lkt:14436
Cast_Expr_1 := Var_Expr_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 7774
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_19 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Cast_Result_2.Node, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 7775
Is_Null := Fld_19.Node = null; 
--# expr-done 7776
Not_Val := not (Is_Null); 
--# expr-done 7777
   If_Result_10 := Not_Val;
else
   If_Result_10 := False;
end if;
--# expr-done 7778
if If_Result_10 then
   --# expr-start 7780 '<FieldAccess for xref_type_equation at nodes.lkt:14437:22>' Fld_14 ada/nodes.lkt:14437
--# expr-start 7779 '<Cast to Name at nodes.lkt:14437:22>' Cast_Result ada/nodes.lkt:14437
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 7779
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_14 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Cast_Result.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result.Info);
--# end
--# expr-done 7780
   If_Result_11 := Fld_14;
else
   --# expr-start 7789 '<If at nodes.lkt:14434:17>' If_Result_9 ada/nodes.lkt:14434
--# expr-start 7781 '<IsA DeltaAggregate at nodes.lkt:14438:22>' Is_A ada/nodes.lkt:14438
Is_A := Self /= null 
and then Self.Kind in Ada_Delta_Aggregate_Range; 
--# expr-done 7781
if Is_A then
   --# expr-start 7782 '<FieldAccess for sub_equation at nodes.lkt:14438:50>' Fld_15 ada/nodes.lkt:14438
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_15 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7782
   If_Result_9 := Fld_15;
else
   --# expr-start 7788 '<LogicBinaryOp And at nodes.lkt:14445:21>' And_Pred_1 ada/nodes.lkt:14445
--# expr-start 7783 '<FieldAccess for sub_equation at nodes.lkt:14445:21>' Fld_16 ada/nodes.lkt:14445
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_16 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7783
--# expr-start 7787 '<bind at nodes.lkt:14447:25>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:14447
--# expr-start 7784 '<FieldAccess for node at nodes.lkt:14447:47>' Fld_17 ada/nodes.lkt:14447
Fld_17 := Var_Expr_0.Node;
--# expr-done 7784
      Cast_Result_1 := Fld_17;
Bound_Error_Location := Cast_Result_1; 
--# expr-start 7786 '<Predicate on BaseTypeDecl.is_tagged_type_with_deref at nodes.lkt:14448:25>' Pred_1 ada/nodes.lkt:14448
--# expr-start 7785 '<FieldAccess for type_var at nodes.lkt:14448:65>' Fld_18 ada/nodes.lkt:14448
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Var_Expr_0.Node);
--# expr-done 7785
Fld_18.Value := No_Entity;
Entity_Vars.Reset (Fld_18);
Pred_1 := Solver.Create_Predicate (Fld_18, Create_Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate (Origin, Bound_Error_Location)); 
--# expr-done 7786
Dyn_Var_Bind_Result_1 := Pred_1; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 7787
And_Pred_1 := Create_And (Fld_16, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14445:21") else null)); 
--# expr-done 7788
   If_Result_9 := And_Pred_1;
end if;
      Inc_Ref (If_Result_9);
--# expr-done 7789
   If_Result_11 := If_Result_9;
end if;
      Inc_Ref (If_Result_11);
--# expr-done 7790
Scope_Result := If_Result_11;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3036;
   Result_Var := Scope_Result;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14450:29") else null)); 
   Result_Var := True_Rel_1;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (Local_Type_Constraint, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14428:13") else null)); 
--# expr-done 7791
--# expr-start 7795 '<LogicAll at nodes.lkt:14453:14>' Logic_Boolean_Op ada/nodes.lkt:14453
--# expr-start 7794 '<Map at nodes.lkt:14453:14>' Map_Result ada/nodes.lkt:14453
   --# expr-start 7792 '<FieldAccess for assocs at nodes.lkt:14453:14>' Fld_20 ada/nodes.lkt:14453
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Base_Aggregate_F_Assocs, Info => Ent.Info);
--# expr-done 7792
Fld_21 := Fld_20.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_21 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_21;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_1 := Bare_Item_1 = null; 
if Is_Null_1 then
   If_Result_12 := No_Entity_Basic_Assoc;
else
Fld_22 := Fld_20.Info;
As_Entity := (Info => Fld_22, Node => Bare_Item_1); 
   If_Result_12 := As_Entity;
end if;
                  Item_1 := If_Result_12; 
   --# scope-start
               --# bind assoc Item_1
      --# expr-start 7793 '<FieldAccess for sub_equation at nodes.lkt:14453:47>' Fld_23 ada/nodes.lkt:14453
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_23 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Item_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_1.Info);
--# end
--# expr-done 7793
         declare
            Item_To_Append : constant Logic_Equation := Fld_23;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3037;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 7794
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14453:14") else null)); 
--# expr-done 7795
And_Pred_3 := Create_And (And_Pred_2, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14427:9") else null)); 
--# expr-done 7796
Let_Result := And_Pred_3; Inc_Ref (Let_Result);
--# end
--# expr-done 7797
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1104;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1104;
                     Finalizer_Scope_3036;
                     Finalizer_Scope_3037;
            raise;
      end;
   return Property_Result;
end Base_Aggregate_P_Xref_Equation;
--# end
--# property-start BaseAggregate.is_contract_cases_base_aggregate ada/nodes.lkt:14458
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Is_Contract_Cases_Base_Aggregate
  (Node : Bare_Base_Aggregate
  )
   return Boolean
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
      --# bind self Self
   Property_Result : Boolean;
      Var_Expr_0 : Bare_Aspect_Assoc;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Aspect_Assoc;
Fld_1 : Bare_Name;
Sym : Symbol_Type;
Fld_2 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 7799 '<Cast to AspectAssoc at nodes.lkt:14459:9>' Cast_Result ada/nodes.lkt:14459
--# expr-start 7798 '<parent at nodes.lkt:14459:9>' Fld ada/nodes.lkt:14459
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 7798
   if Fld = null
      or else Fld.Kind in Ada_Aspect_Assoc_Range
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 7799
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind aspect Var_Expr_0
--# expr-start 7802 '<FieldAccess for name_is at nodes.lkt:14460:25>' Fld_2 ada/nodes.lkt:14460
--# expr-start 7800 '<FieldAccess for id at nodes.lkt:14460:25>' Fld_1 ada/nodes.lkt:14460
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Var_Expr_0.Aspect_Assoc_F_Id;
--# expr-done 7800
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7801 '<Symbol Contract_Cases at nodes.lkt:14460:43>' Sym ada/nodes.lkt:14460
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Contract_Cases); 
--# expr-done 7801
--# property-call-start Name.name_is
Fld_2 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_1, Sym => Sym);
--# end
--# expr-done 7802
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Aggregate_P_Is_Contract_Cases_Base_Aggregate;
--# end
--# property-start BaseAggregate.multidim_root_aggregate ada/nodes.lkt:14468
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Multidim_Root_Aggregate
  (Node : Bare_Base_Aggregate
      ; R : Integer
         := 0
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Multidim_Aggregate_Info
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind r R
   --# bind origin Origin
   Property_Result : Internal_Multidim_Aggregate_Info;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_209 : Internal_Entity_Aggregate;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
New_Struct : Internal_Multidim_Aggregate_Info;
Fld_1 : Integer;
Comp_Result : Boolean;
If_Result : Internal_Multidim_Aggregate_Info;
Scope_Result : Internal_Multidim_Aggregate_Info;
Fld_2 : Internal_Entity;
Fld_3 : Internal_Entity;
Fld_4 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Aggregate;
Arith_Result : Integer;
Fld_5 : Internal_Multidim_Aggregate_Info;
Scope_Result_1 : Internal_Multidim_Aggregate_Info;
Result_Var : Internal_Multidim_Aggregate_Info;
Result_Var_1 : Internal_Multidim_Aggregate_Info;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Aggregate_Base_Aggregate_P_Multidim_Root_Aggregate,
            Items    => new Mmz_Key_Array (1 ..  4))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Aggregate,
                                As_Bare_Base_Aggregate => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Integer,
                                      As_Integer => R);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (4) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Multidim_Aggregate_Info;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
--# expr-start 7804 '<Cast to BaseTypeDecl at nodes.lkt:14471:9>' Cast_Result ada/nodes.lkt:14471
--# expr-start 7803 '<FieldAccess for type_val at nodes.lkt:14471:9>' Fld ada/nodes.lkt:14471
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld := Libadalang.Implementation.Expr_P_Type_Val (Node => Ent.Node);
--# end
--# expr-done 7803
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 7804
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind tv Var_Expr_0
--# expr-start 7807 '<If at nodes.lkt:14475:13>' If_Result ada/nodes.lkt:14475
--# expr-start 7805 '<FieldAccess for array_ndims at nodes.lkt:14475:16>' Fld_1 ada/nodes.lkt:14475
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.array_ndims'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Array_Ndims (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7805
Comp_Result := Fld_1 > 1; 
if Comp_Result then
   --# expr-start 7806 '<New MultidimAggregateInfo at nodes.lkt:14476:18>' New_Struct ada/nodes.lkt:14476
New_Struct := (Agg => Ent, Rank => R, Typ => Var_Expr_0); 
--# expr-done 7806
   If_Result := New_Struct;
else
   If_Result := No_Multidim_Aggregate_Info;
end if;
--# expr-done 7807
Scope_Result := If_Result;
   --# end
   Result_Var_1 := Scope_Result;
else
--# expr-start 7811 '<Cast to Aggregate at nodes.lkt:14484:25>' Cast_Result_1 ada/nodes.lkt:14484
--# expr-start 7810 '<parent at nodes.lkt:14484:25>' Fld_4 ada/nodes.lkt:14484
--# expr-start 7809 '<parent at nodes.lkt:14484:25>' Fld_3 ada/nodes.lkt:14484
--# expr-start 7808 '<parent at nodes.lkt:14484:25>' Fld_2 ada/nodes.lkt:14484
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 7808
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# expr-done 7809
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Parent (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# expr-done 7810
   if Fld_4.Node = null
      or else Fld_4.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Aggregate
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   else
         Cast_Result_1 := No_Entity_Aggregate;
   end if;
--# expr-done 7811
Var_Expr_209 := Cast_Result_1;
if Var_Expr_209 /= No_Entity_Aggregate then
   --# scope-start
--# expr-start 7813 '<FieldAccess for multidim_root_aggregate at nodes.lkt:14484:25>' Fld_5 ada/nodes.lkt:14484
      if Var_Expr_209.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7812 '<Arithmetic + at nodes.lkt:14489:39>' Arith_Result ada/nodes.lkt:14489
Arith_Result := (R + 1); 
--# expr-done 7812
--# property-call-start BaseAggregate.multidim_root_aggregate
Fld_5 := Libadalang.Implementation.Base_Aggregate_P_Multidim_Root_Aggregate (Node => Var_Expr_209.Node, R => Arith_Result, Origin => Origin, E_Info => Var_Expr_209.Info);
--# end
--# expr-done 7813
Scope_Result_1 := Fld_5;
   --# end
   Result_Var := Scope_Result_1;
else
   Result_Var := No_Multidim_Aggregate_Info;
end if;
   Result_Var_1 := Result_Var;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Multidim_Aggregate_Info,
                        As_Internal_Multidim_Aggregate_Info => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Base_Aggregate_P_Multidim_Root_Aggregate;
--# end
--# property-start BaseAggregate.all_discriminants ada/nodes.lkt:14508
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_All_Discriminants
  (Node : Bare_Base_Aggregate
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_1107 with Inline_Always;
      Local_Td : Internal_Entity_Base_Type_Decl;
Local_Stop_Recurse_At : Internal_Entity_Base_Type_Decl;
Local_Record_Decl : Internal_Entity_Type_Decl;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Record_Def;
Fld_3 : Internal_Entity_Component_List;
Fld_4 : Internal_Entity_Type_Decl;
Fld_5 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_1107 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1107;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Aggregate_Base_Aggregate_P_All_Discriminants,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Aggregate,
                                As_Bare_Base_Aggregate => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Formal_Param_Decl_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7823 '<Let at nodes.lkt:14509:9>' Let_Result_2 ada/nodes.lkt:14509
--# scope-start
--# expr-start 7815 '<Cast to BaseTypeDecl at nodes.lkt:14509:18>' Cast_Result ada/nodes.lkt:14509
--# expr-start 7814 '<FieldAccess for type_val at nodes.lkt:14509:18>' Fld ada/nodes.lkt:14509
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld := Libadalang.Implementation.Expr_P_Type_Val (Node => Self);
--# end
--# expr-done 7814
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 7815
Local_Td := Cast_Result; 
--# bind td Local_Td
--# expr-start 7822 '<Let at nodes.lkt:14510:9>' Let_Result_1 ada/nodes.lkt:14510
--# scope-start
--# expr-start 7816 '<FieldAccess for ancestor_expr_type at nodes.lkt:14510:31>' Fld_1 ada/nodes.lkt:14510
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.ancestor_expr_type
Fld_1 := Libadalang.Implementation.Base_Aggregate_P_Ancestor_Expr_Type (Node => Ent.Node, Resolve_Type => False, E_Info => Ent.Info);
--# end
--# expr-done 7816
Local_Stop_Recurse_At := Fld_1; 
--# bind stop_recurse_at Local_Stop_Recurse_At
--# expr-start 7821 '<Let at nodes.lkt:14511:9>' Let_Result ada/nodes.lkt:14511
--# scope-start
--# expr-start 7819 '<FieldAccess for type_decl at nodes.lkt:14511:27>' Fld_4 ada/nodes.lkt:14511
--# expr-start 7818 '<FieldAccess for comps at nodes.lkt:14511:27>' Fld_3 ada/nodes.lkt:14511
--# expr-start 7817 '<FieldAccess for record_def at nodes.lkt:14511:27>' Fld_2 ada/nodes.lkt:14511
      if Local_Td.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Local_Td.Node, Origin => Origin, E_Info => Local_Td.Info);
--# end
--# expr-done 7817
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseRecordDef.comps
Fld_3 := Libadalang.Implementation.Base_Record_Def_P_Comps (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 7818
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.type_decl
Fld_4 := Libadalang.Implementation.Component_List_P_Type_Decl (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 7819
Local_Record_Decl := Fld_4; 
--# bind record_decl Local_Record_Decl
--# expr-start 7820 '<FieldAccess for discriminants_list at nodes.lkt:14513:9>' Fld_5 ada/nodes.lkt:14513
      if Local_Record_Decl.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Local_Record_Decl.Node, Stop_Recurse_At => Local_Stop_Recurse_At, Origin => Origin, E_Info => Local_Record_Decl.Info);
--# end
--# expr-done 7820
Let_Result := Fld_5; Inc_Ref (Let_Result);
--# end
--# expr-done 7821
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 7822
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 7823
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1107;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1107;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Formal_Param_Decl_Array_Access,
                        As_Internal_Entity_Base_Formal_Param_Decl_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Aggregate_P_All_Discriminants;
--# end
--# property-start BaseAggregate.all_components ada/nodes.lkt:14525
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_All_Components
  (Node : Bare_Base_Aggregate
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind env Env
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_1108 with Inline_Always;
      Local_Td : Internal_Entity_Base_Type_Decl;
Local_Stop_Recurse_At : Internal_Entity_Base_Type_Decl;
Local_Comp_List : Internal_Entity_Component_List;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Record_Def;
Fld_3 : Internal_Entity_Component_List;
Fld_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_5 : Internal_Entity_Assoc_List;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Is_A : Boolean;
If_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_2 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_1108 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_6);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1108;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Aggregate_Base_Aggregate_P_All_Components,
            Items    => new Mmz_Key_Array (1 ..  4))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Aggregate,
                                As_Bare_Base_Aggregate => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (3) := (Kind => Mmz_Lexical_Env,
                                      As_Lexical_Env => Env);
                  Inc_Ref (Mmz_K.Items (3).As_Lexical_Env);
               Mmz_K.Items (4) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Formal_Param_Decl_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7836 '<Let at nodes.lkt:14526:9>' Let_Result_2 ada/nodes.lkt:14526
--# scope-start
--# expr-start 7825 '<Cast to BaseTypeDecl at nodes.lkt:14526:18>' Cast_Result ada/nodes.lkt:14526
--# expr-start 7824 '<FieldAccess for type_val at nodes.lkt:14526:18>' Fld ada/nodes.lkt:14526
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld := Libadalang.Implementation.Expr_P_Type_Val (Node => Self);
--# end
--# expr-done 7824
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 7825
Local_Td := Cast_Result; 
--# bind td Local_Td
--# expr-start 7835 '<Let at nodes.lkt:14527:9>' Let_Result_1 ada/nodes.lkt:14527
--# scope-start
--# expr-start 7826 '<FieldAccess for ancestor_expr_type at nodes.lkt:14527:31>' Fld_1 ada/nodes.lkt:14527
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.ancestor_expr_type
Fld_1 := Libadalang.Implementation.Base_Aggregate_P_Ancestor_Expr_Type (Node => Ent.Node, Resolve_Type => False, E_Info => Ent.Info);
--# end
--# expr-done 7826
Local_Stop_Recurse_At := Fld_1; 
--# bind stop_recurse_at Local_Stop_Recurse_At
--# expr-start 7834 '<Let at nodes.lkt:14528:9>' Let_Result ada/nodes.lkt:14528
--# scope-start
--# expr-start 7828 '<FieldAccess for comps at nodes.lkt:14528:25>' Fld_3 ada/nodes.lkt:14528
--# expr-start 7827 '<FieldAccess for record_def at nodes.lkt:14528:25>' Fld_2 ada/nodes.lkt:14528
      if Local_Td.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.record_def'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Record_Def (Node => Local_Td.Node, Origin => Origin, E_Info => Local_Td.Info);
--# end
--# expr-done 7827
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseRecordDef.comps
Fld_3 := Libadalang.Implementation.Base_Record_Def_P_Comps (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 7828
Local_Comp_List := Fld_3; 
--# bind comp_list Local_Comp_List
--# expr-start 7833 '<If at nodes.lkt:14530:9>' If_Result ada/nodes.lkt:14530
--# expr-start 7829 '<IsA DeltaAggregate at nodes.lkt:14530:12>' Is_A ada/nodes.lkt:14530
Is_A := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Delta_Aggregate_Range; 
--# expr-done 7829
if Is_A then
   --# expr-start 7830 '<FieldAccess for abstract_formal_params_for_delta_assocs at nodes.lkt:14534:13>' Fld_4 ada/nodes.lkt:14534
      if Local_Comp_List.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.abstract_formal_params_for_delta_assocs
Fld_4 := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_For_Delta_Assocs (Node => Local_Comp_List.Node, E_Info => Local_Comp_List.Info);
--# end
--# expr-done 7830
   If_Result := Fld_4;
else
   --# expr-start 7832 '<FieldAccess for abstract_formal_params_for_assocs at nodes.lkt:14537:13>' Fld_6 ada/nodes.lkt:14537
      if Local_Comp_List.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7831 '<FieldAccess for assocs at nodes.lkt:14538:17>' Fld_5 ada/nodes.lkt:14538
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Base_Aggregate_F_Assocs, Info => Ent.Info);
--# expr-done 7831
--# property-call-start ComponentList.abstract_formal_params_for_assocs
Fld_6 := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_For_Assocs (Node => Local_Comp_List.Node, Assocs => Fld_5, Stop_Recurse_At => Local_Stop_Recurse_At, Env => Env, Origin => Origin, E_Info => Local_Comp_List.Info);
--# end
--# expr-done 7832
   If_Result := Fld_6;
end if;
      Inc_Ref (If_Result);
--# expr-done 7833
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 7834
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 7835
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 7836
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1108;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1108;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Formal_Param_Decl_Array_Access,
                        As_Internal_Entity_Base_Formal_Param_Decl_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Aggregate_P_All_Components;
--# end
--# property-start BaseAggregate.matched_discriminants ada/nodes.lkt:14554
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Matched_Discriminants
  (Node : Bare_Base_Aggregate
      ; Match_Others : Boolean
         := True
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Match_Array_Access
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind match_others Match_Others
   --# bind origin Origin
   Property_Result : Internal_Param_Match_Array_Access;
            procedure Finalizer_Scope_1109 with Inline_Always;
      Fld : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_1 : Internal_Entity_Assoc_List;
Fld_2 : Internal_Param_Match_Array_Access;
            procedure Finalizer_Scope_1109 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1109;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Aggregate_Base_Aggregate_P_Matched_Discriminants,
            Items    => new Mmz_Key_Array (1 ..  4))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Aggregate,
                                As_Bare_Base_Aggregate => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Boolean,
                                      As_Boolean => Match_Others);
               Mmz_K.Items (3) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (4) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Param_Match_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7839 '<FieldAccess for match_formals at nodes.lkt:14555:9>' Fld_2 ada/nodes.lkt:14555
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7837 '<FieldAccess for all_discriminants at nodes.lkt:14556:13>' Fld ada/nodes.lkt:14556
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.all_discriminants
Fld := Libadalang.Implementation.Base_Aggregate_P_All_Discriminants (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 7837
--# expr-start 7838 '<FieldAccess for assocs at nodes.lkt:14557:13>' Fld_1 ada/nodes.lkt:14557
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Base_Aggregate_F_Assocs, Info => Ent.Info);
--# expr-done 7838
--# property-call-start AdaNode.match_formals
Fld_2 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Self, Formal_Params => Fld, Params => Fld_1, Is_Dottable_Subp => False, Match_Others => Match_Others);
--# end
--# expr-done 7839
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1109;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1109;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Param_Match_Array_Access,
                        As_Internal_Param_Match_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Aggregate_P_Matched_Discriminants;
--# end
--# property-start BaseAggregate.matched_components ada/nodes.lkt:14570
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Matched_Components
  (Node : Bare_Base_Aggregate
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Match_Array_Access
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind env Env
   Property_Result : Internal_Param_Match_Array_Access;
            procedure Finalizer_Scope_1110 with Inline_Always;
      Fld : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_1 : Internal_Entity_Assoc_List;
Fld_2 : Internal_Param_Match_Array_Access;
            procedure Finalizer_Scope_1110 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1110;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Aggregate_Base_Aggregate_P_Matched_Components,
            Items    => new Mmz_Key_Array (1 ..  4))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Aggregate,
                                As_Bare_Base_Aggregate => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Bare_Ada_Node,
                                      As_Bare_Ada_Node => Origin);
               Mmz_K.Items (3) := (Kind => Mmz_Lexical_Env,
                                      As_Lexical_Env => Env);
                  Inc_Ref (Mmz_K.Items (3).As_Lexical_Env);
               Mmz_K.Items (4) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Param_Match_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 7842 '<FieldAccess for match_formals at nodes.lkt:14571:9>' Fld_2 ada/nodes.lkt:14571
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7840 '<FieldAccess for all_components at nodes.lkt:14571:28>' Fld ada/nodes.lkt:14571
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.all_components
Fld := Libadalang.Implementation.Base_Aggregate_P_All_Components (Node => Ent.Node, Origin => Origin, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 7840
--# expr-start 7841 '<FieldAccess for assocs at nodes.lkt:14571:51>' Fld_1 ada/nodes.lkt:14571
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Base_Aggregate_F_Assocs, Info => Ent.Info);
--# expr-done 7841
--# property-call-start AdaNode.match_formals
Fld_2 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Self, Formal_Params => Fld, Params => Fld_1, Is_Dottable_Subp => False);
--# end
--# expr-done 7842
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1110;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1110;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Param_Match_Array_Access,
                        As_Internal_Param_Match_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Aggregate_P_Matched_Components;
--# end
--# property-start BaseAggregate.first_unmatched_formal ada/nodes.lkt:14580
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_First_Unmatched_Formal
  (Node : Bare_Base_Aggregate
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind env Env
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_1111 with Inline_Always;
            procedure Finalizer_Scope_3043 with Inline_Always;
      Local_Matched_Discr : Internal_Param_Match_Array_Access;
Local_Unmatched_Discr : Internal_Entity_Defining_Name;
Fld : Internal_Param_Match_Array_Access;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
Fld_3 : Internal_Entity_Defining_Name;
Cast_Result : Internal_Entity;
Cast_Expr : Internal_Entity_Defining_Name;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
Not_Val : Boolean;
Find_Result : Internal_Entity_Defining_Name;
Fld_4 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_5 : Internal_Entity_Defining_Name_Array_Access;
Fld_6 : Internal_Param_Match_Array_Access;
Fld_7 : Internal_Entity_Defining_Name;
Cast_Result_2 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Defining_Name;
Cast_Result_3 : Internal_Entity;
Is_Equiv_1 : Boolean;
Quantifier_Result_1 : Boolean;
Not_Val_1 : Boolean;
Find_Result_1 : Internal_Entity_Defining_Name;
Is_Null : Boolean;
Not_Val_2 : Boolean;
If_Result : Internal_Entity_Defining_Name;
Let_Result : Internal_Entity_Defining_Name;
Let_Result_1 : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_1111 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Matched_Discr);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_1111;
            procedure Finalizer_Scope_3043 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_3043;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7863 '<Let at nodes.lkt:14581:9>' Let_Result_1 ada/nodes.lkt:14581
--# scope-start
--# expr-start 7843 '<FieldAccess for matched_discriminants at nodes.lkt:14581:29>' Fld ada/nodes.lkt:14581
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.matched_discriminants
Fld := Libadalang.Implementation.Base_Aggregate_P_Matched_Discriminants (Node => Ent.Node, Match_Others => False, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 7843
Local_Matched_Discr := Fld; Inc_Ref (Local_Matched_Discr);
--# bind matched_discr Local_Matched_Discr
--# expr-start 7862 '<Let at nodes.lkt:14583:9>' Let_Result ada/nodes.lkt:14583
--# scope-start
--# expr-start 7850 '<Find at nodes.lkt:14584:13>' Find_Result ada/nodes.lkt:14584
   --# expr-start 7845 '<FieldAccess for unpack_formals at nodes.lkt:14584:13>' Fld_2 ada/nodes.lkt:14584
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7844 '<FieldAccess for all_discriminants at nodes.lkt:14584:33>' Fld_1 ada/nodes.lkt:14584
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.all_discriminants
Fld_1 := Libadalang.Implementation.Base_Aggregate_P_All_Discriminants (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 7844
--# property-call-start AdaNode.unpack_formals
Fld_2 := Libadalang.Implementation.Ada_Node_P_Unpack_Formals (Node => Self, Formal_Params => Fld_1);
--# end
--# expr-done 7845
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_2;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind f Item_0
      --# expr-start 7849 '<Not at nodes.lkt:14585:24>' Not_Val ada/nodes.lkt:14585
--# expr-start 7848 '<AnyQuantifier at nodes.lkt:14585:28>' Quantifier_Result ada/nodes.lkt:14585
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Local_Matched_Discr;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_1
      --# expr-start 7847 '<Eq at nodes.lkt:14585:53>' Is_Equiv ada/nodes.lkt:14585
--# expr-start 7846 '<FieldAccess for formal at nodes.lkt:14585:53>' Fld_3 ada/nodes.lkt:14585
Fld_3 := Item_1.Formal;
--# expr-done 7846
      Cast_Result := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Cast_Expr := Item_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 7847
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 7848
Not_Val := not (Quantifier_Result); 
--# expr-done 7849
      if Not_Val then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Not_Val;
         end loop;
      end;
--# expr-done 7850
Local_Unmatched_Discr := Find_Result; 
--# bind unmatched_discr Local_Unmatched_Discr
--# expr-start 7861 '<If at nodes.lkt:14588:9>' If_Result ada/nodes.lkt:14588
--# expr-start 7852 '<Not at nodes.lkt:14588:12>' Not_Val_2 ada/nodes.lkt:14588
--# expr-start 7851 '<IsNull at nodes.lkt:14588:16>' Is_Null ada/nodes.lkt:14588
Is_Null := Local_Unmatched_Discr.Node = null; 
--# expr-done 7851
Not_Val_2 := not (Is_Null); 
--# expr-done 7852
if Not_Val_2 then
   If_Result := Local_Unmatched_Discr;
else
   --# expr-start 7860 '<Find at nodes.lkt:14596:13>' Find_Result_1 ada/nodes.lkt:14596
   --# expr-start 7854 '<FieldAccess for unpack_formals at nodes.lkt:14596:13>' Fld_5 ada/nodes.lkt:14596
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7853 '<FieldAccess for all_components at nodes.lkt:14596:33>' Fld_4 ada/nodes.lkt:14596
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.all_components
Fld_4 := Libadalang.Implementation.Base_Aggregate_P_All_Components (Node => Ent.Node, Origin => Origin, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 7853
--# property-call-start AdaNode.unpack_formals
Fld_5 := Libadalang.Implementation.Ada_Node_P_Unpack_Formals (Node => Self, Formal_Params => Fld_4);
--# end
--# expr-done 7854
      Find_Result_1 := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_5;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind f Item_2
      --# expr-start 7859 '<Not at nodes.lkt:14597:24>' Not_Val_1 ada/nodes.lkt:14597
--# expr-start 7858 '<AnyQuantifier at nodes.lkt:14597:28>' Quantifier_Result_1 ada/nodes.lkt:14597
   --# expr-start 7855 '<FieldAccess for matched_components at nodes.lkt:14597:28>' Fld_6 ada/nodes.lkt:14597
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.matched_components
Fld_6 := Libadalang.Implementation.Base_Aggregate_P_Matched_Components (Node => Ent.Node, Origin => Origin, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 7855
      Quantifier_Result_1 := False;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_6;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_3
      --# expr-start 7857 '<Eq at nodes.lkt:14597:65>' Is_Equiv_1 ada/nodes.lkt:14597
--# expr-start 7856 '<FieldAccess for formal at nodes.lkt:14597:65>' Fld_7 ada/nodes.lkt:14597
Fld_7 := Item_3.Formal;
--# expr-done 7856
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
Cast_Expr_1 := Item_2; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv_1 := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 7857
      Quantifier_Result_1 := Is_Equiv_1;
   --# end
               exit when Quantifier_Result_1;
         end loop;
      end;
--# expr-done 7858
Not_Val_1 := not (Quantifier_Result_1); 
--# expr-done 7859
      if Not_Val_1 then
         Find_Result_1 := Item_2; 
      end if;
   --# end
      Finalizer_Scope_3043;
               exit when Not_Val_1;
         end loop;
      end;
--# expr-done 7860
   If_Result := Find_Result_1;
end if;
--# expr-done 7861
Let_Result := If_Result; 
--# end
--# expr-done 7862
Let_Result_1 := Let_Result; 
--# end
--# expr-done 7863
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_1111;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1111;
                     Finalizer_Scope_3043;
            raise;
      end;
   return Property_Result;
end Base_Aggregate_P_First_Unmatched_Formal;
--# end
--# property-start BaseAggregate.aggregate_params ada/nodes.lkt:14605
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Aggregate_Params
  (Node : Bare_Base_Aggregate
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Actual_Array_Access
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_1112 with Inline_Always;
      Fld : Internal_Entity_Assoc_List;
Fld_1 : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_1112 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1112;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7865 '<FieldAccess for zip_with_params at nodes.lkt:14605:50>' Fld_1 ada/nodes.lkt:14605
--# expr-start 7864 '<FieldAccess for assocs at nodes.lkt:14605:50>' Fld ada/nodes.lkt:14605
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Base_Aggregate_F_Assocs, Info => Ent.Info);
--# expr-done 7864
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.zip_with_params
Fld_1 := Libadalang.Implementation.Assoc_List_P_Zip_With_Params (Node => Fld.Node, Imprecise_Fallback => False, E_Info => Fld.Info);
--# end
--# expr-done 7865
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1112;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1112;
            raise;
      end;
   return Property_Result;
end Base_Aggregate_P_Aggregate_Params;
--# end
--# property-start BaseAggregate.is_subaggregate ada/nodes.lkt:14610
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Is_Subaggregate
  (Node : Bare_Base_Aggregate
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Ignored : Boolean;
Fld : Boolean;
Cast_Expr : Bare_Base_Aggregate;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Multidim_Aggregate_Info;
Fld_2 : Integer;
Comp_Result : Boolean;
Dyn_Var_Bind_Result : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 7870 '<Let at nodes.lkt:14613:9>' Let_Result ada/nodes.lkt:14613
--# scope-start
--# expr-start 7866 '<FieldAccess for resolve_names_from_closest_entry_point at nodes.lkt:14613:17>' Fld ada/nodes.lkt:14613
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_from_closest_entry_point
Fld := Libadalang.Implementation.Ada_Node_P_Resolve_Names_From_Closest_Entry_Point (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 7866
Ignored := Fld; 
--# bind _ Ignored
--# expr-start 7869 '<bind at nodes.lkt:14616:13>' Dyn_Var_Bind_Result ada/nodes.lkt:14616
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 7868 '<FieldAccess for rank at nodes.lkt:14618:13>' Fld_2 ada/nodes.lkt:14618
--# expr-start 7867 '<FieldAccess for multidim_root_aggregate at nodes.lkt:14618:13>' Fld_1 ada/nodes.lkt:14618
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseAggregate.multidim_root_aggregate
Fld_1 := Libadalang.Implementation.Base_Aggregate_P_Multidim_Root_Aggregate (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 7867
Fld_2 := Fld_1.Rank;
--# expr-done 7868
Comp_Result := Fld_2 > 0; 
Dyn_Var_Bind_Result := Comp_Result; 
--# expr-done 7869
Let_Result := Dyn_Var_Bind_Result; 
--# end
--# expr-done 7870
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Aggregate_P_Is_Subaggregate;
--# end
--# property-start BaseAggregate.ancestor_expr_type ada/nodes.lkt:14629
pragma Warnings (Off, "is not referenced");
 function Base_Aggregate_P_Ancestor_Expr_Type
  (Node : Bare_Base_Aggregate
      ; Resolve_Type : Boolean
         := True
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Aggregate  := Bare_Base_Aggregate (Node);
     Ent : Internal_Entity_Base_Aggregate :=
       Internal_Entity_Base_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind resolve_type Resolve_Type
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Expr;
Var_Expr_1 : Internal_Entity_Name;
Var_Expr : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
If_Result : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 7871 '<FieldAccess for ancestor_expr at nodes.lkt:14630:9>' Fld ada/nodes.lkt:14630
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Base_Aggregate_F_Ancestor_Expr, Info => Ent.Info);
--# expr-done 7871
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind ae Var_Expr_0
--# expr-start 7872 '<Cast to Name at nodes.lkt:14632:13>' Cast_Result ada/nodes.lkt:14632
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 7872
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Name then
   --# scope-start
   --# bind n Var_Expr_1
--# expr-start 7873 '<FieldAccess for name_designated_type at nodes.lkt:14632:35>' Fld_1 ada/nodes.lkt:14632
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 7873
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 7877 '<If at nodes.lkt:14634:17>' If_Result ada/nodes.lkt:14634
if Resolve_Type then
   --# expr-start 7874 '<FieldAccess for expression_type at nodes.lkt:14634:38>' Fld_2 ada/nodes.lkt:14634
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_2 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 7874
   If_Result := Fld_2;
else
   --# expr-start 7876 '<Cast to BaseTypeDecl at nodes.lkt:14635:22>' Cast_Result_1 ada/nodes.lkt:14635
--# expr-start 7875 '<FieldAccess for type_val at nodes.lkt:14635:22>' Fld_3 ada/nodes.lkt:14635
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_3 := Libadalang.Implementation.Expr_P_Type_Val (Node => Var_Expr_0.Node);
--# end
--# expr-done 7875
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result_1 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 7876
   If_Result := Cast_Result_1;
end if;
--# expr-done 7877
   Result_Var_1 := If_Result;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Aggregate_P_Ancestor_Expr_Type;
--# end
   --
   --  Primitives for Bare_Aggregate
   --
      procedure Initialize_Fields_For_Aggregate
        (Self : Bare_Aggregate
         ; Base_Aggregate_F_Ancestor_Expr : Bare_Expr
         ; Base_Aggregate_F_Assocs : Bare_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Base_Aggregate
              (Self, Base_Aggregate_F_Ancestor_Expr, Base_Aggregate_F_Assocs);
      end Initialize_Fields_For_Aggregate;
--# property-start Aggregate.add_named_param_at ada/nodes.lkt:14644
pragma Warnings (Off, "is not referenced");
 function Aggregate_P_Add_Named_Param_At
  (Node : Bare_Aggregate
      ; Index : Integer
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Aggregate  := Bare_Aggregate (Node);
     Ent : Internal_Entity_Aggregate :=
       Internal_Entity_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind index Index
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1115 with Inline_Always;
            procedure Finalizer_Scope_3048 with Inline_Always;
            procedure Finalizer_Scope_3049 with Inline_Always;
      Local_Add_Named : Internal_Entity_Basic_Assoc;
Local_Add_Named_Params : Internal_Entity_Param_Spec_Array_Access;
Var_Expr_1 : Internal_Entity_Basic_Assoc;
Var_Expr_2 : Internal_Entity_Basic_Assoc;
Fld : Internal_Entity_Assoc_List;
Fld_1 : Bare_Assoc_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Basic_Assoc;
Bare_Item_0 : Bare_Basic_Assoc;
Cast_Expr : Internal_Entity_Basic_Assoc;
Cast_Result : Internal_Entity_Aggregate_Assoc;
Fld_3 : Bare_Ada_Node_Array_Access;
Get_Result : Bare_Ada_Node;
Cast_Result_1 : Bare_Name;
Sym : Symbol_Type;
Fld_4 : Boolean;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Find_Result : Internal_Entity_Basic_Assoc;
Fld_5 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_6 : Internal_Entity_Basic_Decl;
Fld_7 : Internal_Entity_Base_Subp_Spec;
Fld_8 : Internal_Entity_Param_Spec_Array_Access;
Scope_Result : Internal_Entity_Param_Spec_Array_Access;
Result_Var : Internal_Entity_Param_Spec_Array_Access;
Get_Result_1 : Internal_Entity_Param_Spec;
Fld_9 : Internal_Entity_Type_Expr;
Fld_10 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1115 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Add_Named_Params);
            end Finalizer_Scope_1115;
            procedure Finalizer_Scope_3048 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3048;
            procedure Finalizer_Scope_3049 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_3049;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7895 '<Let at nodes.lkt:14651:9>' Let_Result_1 ada/nodes.lkt:14651
--# scope-start
--# expr-start 7885 '<Find at nodes.lkt:14652:13>' Find_Result ada/nodes.lkt:14652
   --# expr-start 7878 '<FieldAccess for assocs at nodes.lkt:14652:13>' Fld ada/nodes.lkt:14652
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Base_Aggregate_F_Assocs, Info => Ent.Info);
--# expr-done 7878
Fld_1 := Fld.Node;
      Find_Result := No_Entity_Basic_Assoc;
      if Fld_1 = null then
      Find_Result := No_Entity_Basic_Assoc;
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind assoc Item_0
      --# expr-start 7884 '<FieldAccess for name_is at nodes.lkt:14654:17>' Fld_4 ada/nodes.lkt:14654
--# expr-start 7882 '<Cast to Name at nodes.lkt:14654:17>' Cast_Result_1 ada/nodes.lkt:14654
--# expr-start 7881 '<at at nodes.lkt:14654:17>' Get_Result ada/nodes.lkt:14654
--# expr-start 7880 '<FieldAccess for names at nodes.lkt:14654:17>' Fld_3 ada/nodes.lkt:14654
--# expr-start 7879 '<Cast to AggregateAssoc at nodes.lkt:14654:17>' Cast_Result ada/nodes.lkt:14654
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Aggregate_Assoc_Range
   then
      Cast_Result := Create_Internal_Entity_Aggregate_Assoc
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Aggregate_Assoc;
   end if;
--# expr-done 7879
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Cast_Result.Node);
--# end
--# expr-done 7880
Get_Result := Get (Self, Fld_3, 0, True); 
--# expr-done 7881
   if Get_Result = null
      or else Get_Result.Kind in Ada_Name
   then
      Cast_Result_1 := Get_Result;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 7882
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7883 '<Symbol Add_Named at nodes.lkt:14655:21>' Sym ada/nodes.lkt:14655
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Add_Named); 
--# expr-done 7883
--# property-call-start Name.name_is
Fld_4 := Libadalang.Implementation.Name_P_Name_Is (Node => Cast_Result_1, Sym => Sym);
--# end
--# expr-done 7884
      if Fld_4 then
         Find_Result := Item_0; 
      end if;
   --# end
      Finalizer_Scope_3048;
               exit when Fld_4;
         end loop;
      end;
      end if;
--# expr-done 7885
Local_Add_Named := Find_Result; 
--# bind add_named Local_Add_Named
--# expr-start 7894 '<Let at nodes.lkt:14658:9>' Let_Result ada/nodes.lkt:14658
--# scope-start
Var_Expr_1 := Local_Add_Named;
if Var_Expr_1 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind an Var_Expr_1
--# expr-start 7890 '<FieldAccess for params at nodes.lkt:14661:17>' Fld_8 ada/nodes.lkt:14661
--# expr-start 7889 '<FieldAccess for subp_spec_or_null at nodes.lkt:14661:17>' Fld_7 ada/nodes.lkt:14661
--# expr-start 7888 '<FieldAccess for referenced_decl at nodes.lkt:14661:17>' Fld_6 ada/nodes.lkt:14661
--# expr-start 7887 '<Cast to Name at nodes.lkt:14661:17>' Cast_Result_2 ada/nodes.lkt:14661
--# expr-start 7886 '<FieldAccess for expr at nodes.lkt:14661:17>' Fld_5 ada/nodes.lkt:14661
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 7886
   if Fld_5.Node = null
      or else Fld_5.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 7887
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_6 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Cast_Result_2.Node, Imprecise_Fallback => False, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 7888
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 7889
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.params'
Fld_8 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Params (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 7890
Scope_Result := Fld_8;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3049;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Param_Spec_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Add_Named_Params := Result_Var; Inc_Ref (Local_Add_Named_Params);
--# bind add_named_params Local_Add_Named_Params
Var_Expr_2 := Local_Add_Named;
if Var_Expr_2 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind _ Var_Expr_2
--# expr-start 7893 '<FieldAccess for designated_type_decl at nodes.lkt:14667:13>' Fld_10 ada/nodes.lkt:14667
--# expr-start 7892 '<FieldAccess for type_expression at nodes.lkt:14667:13>' Fld_9 ada/nodes.lkt:14667
--# expr-start 7891 '<at at nodes.lkt:14667:13>' Get_Result_1 ada/nodes.lkt:14667
Get_Result_1 := Get (Self, Local_Add_Named_Params, Index, True); 
--# expr-done 7891
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 7892
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld_10 := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Fld_9.Node, E_Info => Fld_9.Info);
--# end
--# expr-done 7893
Scope_Result_1 := Fld_10;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Let_Result := Result_Var_1; 
--# end
--# expr-done 7894
Let_Result_1 := Let_Result; 
--# end
--# expr-done 7895
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_1115;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1115;
                     Finalizer_Scope_3048;
                     Finalizer_Scope_3049;
            raise;
      end;
   return Property_Result;
end Aggregate_P_Add_Named_Param_At;
--# end
--# property-start Aggregate.element_type ada/nodes.lkt:14673
pragma Warnings (Off, "is not referenced");
 function Aggregate_P_Element_Type
  (Node : Bare_Aggregate
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Aggregate  := Bare_Aggregate (Node);
     Ent : Internal_Entity_Aggregate :=
       Internal_Entity_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_3051 with Inline_Always;
            procedure Finalizer_Scope_3052 with Inline_Always;
      Local_Add_Unnamed : Internal_Entity_Basic_Assoc;
Local_Unnamed_Element_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Basic_Assoc;
Local_Named_Element_Type : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Assoc_List;
Fld_1 : Bare_Assoc_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Basic_Assoc;
Bare_Item_0 : Bare_Basic_Assoc;
Cast_Expr : Internal_Entity_Basic_Assoc;
Cast_Result : Internal_Entity_Aggregate_Assoc;
Fld_3 : Bare_Ada_Node_Array_Access;
Get_Result : Bare_Ada_Node;
Cast_Result_1 : Bare_Name;
Sym : Symbol_Type;
Fld_4 : Boolean;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Find_Result : Internal_Entity_Basic_Assoc;
Fld_5 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_6 : Internal_Entity_Basic_Decl;
Fld_7 : Internal_Entity_Base_Subp_Spec;
Fld_8 : Internal_Entity_Param_Spec_Array_Access;
Get_Result_1 : Internal_Entity_Param_Spec;
Fld_9 : Internal_Entity_Type_Expr;
Fld_10 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Fld_11 : Internal_Entity_Base_Type_Decl;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_3051 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3051;
            procedure Finalizer_Scope_3052 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_3052;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7917 '<Let at nodes.lkt:14679:9>' Let_Result_2 ada/nodes.lkt:14679
--# scope-start
--# expr-start 7903 '<Find at nodes.lkt:14680:13>' Find_Result ada/nodes.lkt:14680
   --# expr-start 7896 '<FieldAccess for assocs at nodes.lkt:14680:13>' Fld ada/nodes.lkt:14680
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Base_Aggregate_F_Assocs, Info => Ent.Info);
--# expr-done 7896
Fld_1 := Fld.Node;
      Find_Result := No_Entity_Basic_Assoc;
      if Fld_1 = null then
      Find_Result := No_Entity_Basic_Assoc;
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind assoc Item_0
      --# expr-start 7902 '<FieldAccess for name_is at nodes.lkt:14682:17>' Fld_4 ada/nodes.lkt:14682
--# expr-start 7900 '<Cast to Name at nodes.lkt:14682:17>' Cast_Result_1 ada/nodes.lkt:14682
--# expr-start 7899 '<at at nodes.lkt:14682:17>' Get_Result ada/nodes.lkt:14682
--# expr-start 7898 '<FieldAccess for names at nodes.lkt:14682:17>' Fld_3 ada/nodes.lkt:14682
--# expr-start 7897 '<Cast to AggregateAssoc at nodes.lkt:14682:17>' Cast_Result ada/nodes.lkt:14682
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Aggregate_Assoc_Range
   then
      Cast_Result := Create_Internal_Entity_Aggregate_Assoc
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Aggregate_Assoc;
   end if;
--# expr-done 7897
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.names'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Names (Node => Cast_Result.Node);
--# end
--# expr-done 7898
Get_Result := Get (Self, Fld_3, 0, True); 
--# expr-done 7899
   if Get_Result = null
      or else Get_Result.Kind in Ada_Name
   then
      Cast_Result_1 := Get_Result;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 7900
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7901 '<Symbol Add_Unnamed at nodes.lkt:14683:21>' Sym ada/nodes.lkt:14683
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Add_Unnamed); 
--# expr-done 7901
--# property-call-start Name.name_is
Fld_4 := Libadalang.Implementation.Name_P_Name_Is (Node => Cast_Result_1, Sym => Sym);
--# end
--# expr-done 7902
      if Fld_4 then
         Find_Result := Item_0; 
      end if;
   --# end
      Finalizer_Scope_3051;
               exit when Fld_4;
         end loop;
      end;
      end if;
--# expr-done 7903
Local_Add_Unnamed := Find_Result; 
--# bind add_unnamed Local_Add_Unnamed
--# expr-start 7916 '<Let at nodes.lkt:14686:9>' Let_Result_1 ada/nodes.lkt:14686
--# scope-start
Var_Expr_1 := Local_Add_Unnamed;
if Var_Expr_1 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind au Var_Expr_1
--# expr-start 7911 '<FieldAccess for designated_type_decl at nodes.lkt:14689:17>' Fld_10 ada/nodes.lkt:14689
--# expr-start 7910 '<FieldAccess for type_expression at nodes.lkt:14689:17>' Fld_9 ada/nodes.lkt:14689
--# expr-start 7909 '<at at nodes.lkt:14689:17>' Get_Result_1 ada/nodes.lkt:14689
--# expr-start 7908 '<FieldAccess for params at nodes.lkt:14689:17>' Fld_8 ada/nodes.lkt:14689
--# expr-start 7907 '<FieldAccess for subp_spec_or_null at nodes.lkt:14689:17>' Fld_7 ada/nodes.lkt:14689
--# expr-start 7906 '<FieldAccess for referenced_decl at nodes.lkt:14689:17>' Fld_6 ada/nodes.lkt:14689
--# expr-start 7905 '<Cast to Name at nodes.lkt:14689:17>' Cast_Result_2 ada/nodes.lkt:14689
--# expr-start 7904 '<FieldAccess for expr at nodes.lkt:14689:17>' Fld_5 ada/nodes.lkt:14689
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 7904
   if Fld_5.Node = null
      or else Fld_5.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 7905
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_6 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Cast_Result_2.Node, Imprecise_Fallback => False, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 7906
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 7907
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.params'
Fld_8 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Params (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 7908
Get_Result_1 := Get (Self, Fld_8, 1, True); 
--# expr-done 7909
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 7910
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld_10 := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Fld_9.Node, E_Info => Fld_9.Info);
--# end
--# expr-done 7911
Scope_Result := Fld_10;
   --# end
      Finalizer_Scope_3052;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Local_Unnamed_Element_Type := Result_Var; 
--# bind unnamed_element_type Local_Unnamed_Element_Type
--# expr-start 7915 '<Let at nodes.lkt:14697:9>' Let_Result ada/nodes.lkt:14697
--# scope-start
--# expr-start 7912 '<FieldAccess for add_named_param_at at nodes.lkt:14697:34>' Fld_11 ada/nodes.lkt:14697
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Aggregate.add_named_param_at
Fld_11 := Libadalang.Implementation.Aggregate_P_Add_Named_Param_At (Node => Ent.Node, Index => 2, E_Info => Ent.Info);
--# end
--# expr-done 7912
Local_Named_Element_Type := Fld_11; 
--# bind named_element_type Local_Named_Element_Type
--# expr-start 7914 '<If at nodes.lkt:14699:9>' If_Result_1 ada/nodes.lkt:14699
--# expr-start 7913 '<IsNull at nodes.lkt:14699:12>' Is_Null_1 ada/nodes.lkt:14699
Is_Null_1 := Local_Add_Unnamed.Node = null; 
--# expr-done 7913
if Is_Null_1 then
   If_Result_1 := Local_Named_Element_Type;
else
   If_Result_1 := Local_Unnamed_Element_Type;
end if;
--# expr-done 7914
Let_Result := If_Result_1; 
--# end
--# expr-done 7915
Let_Result_1 := Let_Result; 
--# end
--# expr-done 7916
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 7917
         Property_Result := Let_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3051;
                     Finalizer_Scope_3052;
            raise;
      end;
   return Property_Result;
end Aggregate_P_Element_Type;
--# end
--# property-start Aggregate.key_type ada/nodes.lkt:14705
pragma Warnings (Off, "is not referenced");
 function Aggregate_P_Key_Type
  (Node : Bare_Aggregate
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Aggregate  := Bare_Aggregate (Node);
     Ent : Internal_Entity_Aggregate :=
       Internal_Entity_Aggregate'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Local_Key_Type : Internal_Entity_Base_Type_Decl;
Var_Expr : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7920 '<Let at nodes.lkt:14707:9>' Let_Result ada/nodes.lkt:14707
--# scope-start
--# expr-start 7918 '<FieldAccess for add_named_param_at at nodes.lkt:14707:24>' Fld ada/nodes.lkt:14707
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Aggregate.add_named_param_at
Fld := Libadalang.Implementation.Aggregate_P_Add_Named_Param_At (Node => Ent.Node, Index => 1, E_Info => Ent.Info);
--# end
--# expr-done 7918
Local_Key_Type := Fld; 
--# bind key_type Local_Key_Type
Var_Expr := Local_Key_Type;
if Var_Expr /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 7919 '<FieldAccess for universal_int_type at nodes.lkt:14712:13>' Fld_1 ada/nodes.lkt:14712
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Ent.Node);
--# end
--# expr-done 7919
   Result_Var := Fld_1;
end if;
Let_Result := Result_Var; 
--# end
--# expr-done 7920
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Aggregate_P_Key_Type;
--# end
   --
   --  Primitives for Bare_Bracket_Aggregate
   --
      procedure Initialize_Fields_For_Bracket_Aggregate
        (Self : Bare_Bracket_Aggregate
         ; Base_Aggregate_F_Ancestor_Expr : Bare_Expr
         ; Base_Aggregate_F_Assocs : Bare_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Aggregate
              (Self, Base_Aggregate_F_Ancestor_Expr, Base_Aggregate_F_Assocs);
      end Initialize_Fields_For_Bracket_Aggregate;
   --
   --  Primitives for Bare_Delta_Aggregate
   --
      procedure Initialize_Fields_For_Delta_Aggregate
        (Self : Bare_Delta_Aggregate
         ; Base_Aggregate_F_Ancestor_Expr : Bare_Expr
         ; Base_Aggregate_F_Assocs : Bare_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Base_Aggregate
              (Self, Base_Aggregate_F_Ancestor_Expr, Base_Aggregate_F_Assocs);
      end Initialize_Fields_For_Delta_Aggregate;
   --
   --  Primitives for Bare_Bracket_Delta_Aggregate
   --
      procedure Initialize_Fields_For_Bracket_Delta_Aggregate
        (Self : Bare_Bracket_Delta_Aggregate
         ; Base_Aggregate_F_Ancestor_Expr : Bare_Expr
         ; Base_Aggregate_F_Assocs : Bare_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Delta_Aggregate
              (Self, Base_Aggregate_F_Ancestor_Expr, Base_Aggregate_F_Assocs);
      end Initialize_Fields_For_Bracket_Delta_Aggregate;
   --
   --  Primitives for Bare_Null_Record_Aggregate
   --
      procedure Initialize_Fields_For_Null_Record_Aggregate
        (Self : Bare_Null_Record_Aggregate
         ; Base_Aggregate_F_Ancestor_Expr : Bare_Expr
         ; Base_Aggregate_F_Assocs : Bare_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Base_Aggregate
              (Self, Base_Aggregate_F_Ancestor_Expr, Base_Aggregate_F_Assocs);
      end Initialize_Fields_For_Null_Record_Aggregate;
   --
   --  Primitives for Bare_Bin_Op
   --
      procedure Initialize_Fields_For_Bin_Op
        (Self : Bare_Bin_Op
         ; Bin_Op_F_Left : Bare_Expr
         ; Bin_Op_F_Op : Bare_Op
         ; Bin_Op_F_Right : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Bin_Op_F_Left := Bin_Op_F_Left;
            Self.Bin_Op_F_Op := Bin_Op_F_Op;
            Self.Bin_Op_F_Right := Bin_Op_F_Right;
      end Initialize_Fields_For_Bin_Op;
   function Bin_Op_F_Left
     (Node : Bare_Bin_Op) return Bare_Expr
   is
   begin
         return Node.Bin_Op_F_Left;
   end;
   function Bin_Op_F_Op
     (Node : Bare_Bin_Op) return Bare_Op
   is
   begin
         return Node.Bin_Op_F_Op;
   end;
   function Bin_Op_F_Right
     (Node : Bare_Bin_Op) return Bare_Expr
   is
   begin
         return Node.Bin_Op_F_Right;
   end;
--# property-start BinOp.has_context_free_type ada/nodes.lkt:14744
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Has_Context_Free_Type
  (Node : Bare_Bin_Op
  )
   return Boolean
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Op;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 7922 '<IsA Op.AndThen, Op.OrElse at nodes.lkt:14744:41>' Is_A ada/nodes.lkt:14744
--# expr-start 7921 '<FieldAccess for op at nodes.lkt:14744:41>' Fld ada/nodes.lkt:14744
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Bin_Op_F_Op;
--# expr-done 7921
Is_A := Fld /= null 
and then Fld.Kind in Ada_Op_And_Then_Range | Ada_Op_Or_Else_Range; 
--# expr-done 7922
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Has_Context_Free_Type;
--# end
--# property-start BinOp.xref_equation ada/nodes.lkt:14747
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Xref_Equation
  (Node : Bare_Bin_Op
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1119 with Inline_Always;
      Fld : Internal_Entity_Op;
Cast_Result : Internal_Entity;
New_Struct : Internal_Logic_Context;
Bound_Logic_Context : Internal_Logic_Context;
Fld_1 : Internal_Entity_Expr;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Logic_Equation;
Fld_6 : Logic_Equation;
Fld_7 : Logic_Equation;
Fld_8 : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_9 : Logic_Equation;
Or_Pred_1 : Logic_Equation;
Fld_10 : Bare_Op;
Is_A : Boolean;
If_Result : Logic_Equation;
Fld_11 : Bare_Op;
Is_A_1 : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_1119 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Or_Pred_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_1119;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7944 '<bind at nodes.lkt:14748:9>' Dyn_Var_Bind_Result ada/nodes.lkt:14748
--# expr-start 7924 '<New LogicContext at nodes.lkt:14749:13>' New_Struct ada/nodes.lkt:14749
--# expr-start 7923 '<FieldAccess for op at nodes.lkt:14749:35>' Fld ada/nodes.lkt:14749
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Op (Node => Ent.Node.Bin_Op_F_Op, Info => Ent.Info);
--# expr-done 7923
      Cast_Result := Create_Internal_Entity
        (Node => Fld.Node,
         Info => Fld.Info);
New_Struct := (Decl_Node => No_Entity, Ref_Node => Cast_Result); 
--# expr-done 7924
Bound_Logic_Context := New_Struct; 
--# expr-start 7943 '<LogicBinaryOp And at nodes.lkt:14751:9>' And_Pred_1 ada/nodes.lkt:14751
--# expr-start 7929 '<LogicBinaryOp And at nodes.lkt:14751:10>' And_Pred ada/nodes.lkt:14751
--# expr-start 7926 '<FieldAccess for sub_equation at nodes.lkt:14751:10>' Fld_2 ada/nodes.lkt:14751
--# expr-start 7925 '<FieldAccess for left at nodes.lkt:14751:10>' Fld_1 ada/nodes.lkt:14751
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Expr (Node => Ent.Node.Bin_Op_F_Left, Info => Ent.Info);
--# expr-done 7925
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_2 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_1.Info);
--# end
--# expr-done 7926
--# expr-start 7928 '<FieldAccess for sub_equation at nodes.lkt:14751:40>' Fld_4 ada/nodes.lkt:14751
--# expr-start 7927 '<FieldAccess for right at nodes.lkt:14751:40>' Fld_3 ada/nodes.lkt:14751
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Bin_Op_F_Right, Info => Ent.Info);
--# expr-done 7927
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 7928
And_Pred := Create_And (Fld_2, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14751:10") else null)); 
--# expr-done 7929
--# expr-start 7942 '<If at nodes.lkt:14753:13>' If_Result_1 ada/nodes.lkt:14753
--# expr-start 7931 '<IsA Op.DoubleDot at nodes.lkt:14753:16>' Is_A_1 ada/nodes.lkt:14753
--# expr-start 7930 '<FieldAccess for op at nodes.lkt:14753:16>' Fld_11 ada/nodes.lkt:14753
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Bin_Op_F_Op;
--# expr-done 7930
Is_A_1 := Fld_11 /= null 
and then Fld_11.Kind in Ada_Op_Double_Dot_Range; 
--# expr-done 7931
if Is_A_1 then
   --# expr-start 7932 '<FieldAccess for double_dot_equation at nodes.lkt:14753:45>' Fld_5 ada/nodes.lkt:14753
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BinOp.double_dot_equation
Fld_5 := Libadalang.Implementation.Bin_Op_P_Double_Dot_Equation (Node => Ent.Node, Origin => Origin, Env => Env, Logic_Context => Bound_Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 7932
   If_Result_1 := Fld_5;
else
   --# expr-start 7941 '<If at nodes.lkt:14753:13>' If_Result ada/nodes.lkt:14753
--# expr-start 7934 '<IsA Op.AndThen, Op.OrElse at nodes.lkt:14754:18>' Is_A ada/nodes.lkt:14754
--# expr-start 7933 '<FieldAccess for op at nodes.lkt:14754:18>' Fld_10 ada/nodes.lkt:14754
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Self.Bin_Op_F_Op;
--# expr-done 7933
Is_A := Fld_10 /= null 
and then Fld_10.Kind in Ada_Op_And_Then_Range | Ada_Op_Or_Else_Range; 
--# expr-done 7934
if Is_A then
   --# expr-start 7935 '<FieldAccess for test_eq at nodes.lkt:14754:57>' Fld_6 ada/nodes.lkt:14754
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BinOp.test_eq
Fld_6 := Libadalang.Implementation.Bin_Op_P_Test_Eq (Node => Self, Origin => Origin);
--# end
--# expr-done 7935
   If_Result := Fld_6;
else
   --# expr-start 7940 '<LogicBinaryOp Or at nodes.lkt:14756:17>' Or_Pred_1 ada/nodes.lkt:14756
--# expr-start 7938 '<LogicBinaryOp Or at nodes.lkt:14756:18>' Or_Pred ada/nodes.lkt:14756
--# expr-start 7936 '<FieldAccess for overload_equation at nodes.lkt:14756:18>' Fld_7 ada/nodes.lkt:14756
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BinOp.overload_equation
Fld_7 := Libadalang.Implementation.Bin_Op_P_Overload_Equation (Node => Ent.Node, Origin => Origin, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 7936
--# expr-start 7937 '<FieldAccess for no_overload_equation at nodes.lkt:14756:47>' Fld_8 ada/nodes.lkt:14756
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BinOp.no_overload_equation'
Fld_8 := Libadalang.Implementation.Dispatcher_Bin_Op_P_No_Overload_Equation (Node => Ent.Node, Origin => Origin, Logic_Context => Bound_Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 7937
Or_Pred := Create_Or (Fld_7, Fld_8, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14756:18") else null)); 
--# expr-done 7938
--# expr-start 7939 '<FieldAccess for universal_fixed_predefined_operators_equation at nodes.lkt:14757:21>' Fld_9 ada/nodes.lkt:14757
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BinOp.universal_fixed_predefined_operators_equation
Fld_9 := Libadalang.Implementation.Bin_Op_P_Universal_Fixed_Predefined_Operators_Equation (Node => Ent.Node, Origin => Origin);
--# end
--# expr-done 7939
Or_Pred_1 := Create_Or (Or_Pred, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14756:17") else null)); 
--# expr-done 7940
   If_Result := Or_Pred_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 7941
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 7942
And_Pred_1 := Create_And (And_Pred, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14751:9") else null)); 
--# expr-done 7943
Dyn_Var_Bind_Result := And_Pred_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7944
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1119;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1119;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Xref_Equation;
--# end
--# property-start BinOp.double_dot_equation ada/nodes.lkt:14762
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Double_Dot_Equation
  (Node : Bare_Bin_Op
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind env Env
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1120 with Inline_Always;
      True_Rel : Logic_Equation;
Bound_Logic_Context : Internal_Logic_Context;
Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Or_Pred : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_2 : Logic_Var;
Fld_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
Or_Pred_1 : Logic_Equation;
Fld_4 : Logic_Var;
Pred : Logic_Equation;
Bound_Logic_Context_2 : Internal_Logic_Context;
Fld_5 : Logic_Var;
Fld_6 : Logic_Var;
Logic_Ctx_2 : Internal_Logic_Context_Access;
Bind_Result_2 : Logic_Equation;
Dyn_Var_Bind_Result_2 : Logic_Equation;
And_Pred : Logic_Equation;
Bound_Logic_Context_3 : Internal_Logic_Context;
Fld_7 : Logic_Var;
Fld_8 : Bare_Expr;
Fld_9 : Logic_Var;
Logic_Ctx_3 : Internal_Logic_Context_Access;
Bind_Result_3 : Logic_Equation;
Dyn_Var_Bind_Result_3 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Bound_Logic_Context_4 : Internal_Logic_Context;
Fld_10 : Logic_Var;
Fld_11 : Bare_Expr;
Fld_12 : Logic_Var;
Logic_Ctx_4 : Internal_Logic_Context_Access;
Bind_Result_4 : Logic_Equation;
Dyn_Var_Bind_Result_4 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_13 : Bare_Expr;
Fld_14 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_15 : Bare_Expr;
Fld_16 : Logic_Equation;
And_Pred_4 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Fld_17 : Logic_Var;
Fld_18 : Logic_Equation;
Fld_19 : Logic_Equation;
And_Pred_6 : Logic_Equation;
            procedure Finalizer_Scope_1120 is
            begin
                     Dec_Ref (True_Rel);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (Or_Pred_1);
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Dyn_Var_Bind_Result_2);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (Dyn_Var_Bind_Result_3);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (Dyn_Var_Bind_Result_4);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_14);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_16);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Fld_18);
                     Dec_Ref (Fld_19);
                     Dec_Ref (And_Pred_6);
            end Finalizer_Scope_1120;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 7984 '<LogicBinaryOp And at nodes.lkt:14763:9>' And_Pred_6 ada/nodes.lkt:14763
--# expr-start 7980 '<LogicBinaryOp And at nodes.lkt:14764:13>' And_Pred_5 ada/nodes.lkt:14764
--# expr-start 7954 '<LogicBinaryOp Or at nodes.lkt:14765:17>' Or_Pred_1 ada/nodes.lkt:14765
--# expr-start 7949 '<LogicBinaryOp Or at nodes.lkt:14765:17>' Or_Pred ada/nodes.lkt:14765
True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14765:17") else null)); 
--# expr-start 7948 '<bind at nodes.lkt:14767:21>' Dyn_Var_Bind_Result ada/nodes.lkt:14767
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 7947 '<Bind at nodes.lkt:14768:21>' Bind_Result ada/nodes.lkt:14768
--# expr-start 7945 '<FieldAccess for expected_type_var at nodes.lkt:14768:21>' Fld ada/nodes.lkt:14768
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7945
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 7946 '<FieldAccess for root_int_type at nodes.lkt:14768:49>' Fld_1 ada/nodes.lkt:14768
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_int_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Root_Int_Type (Node => Self);
--# end
--# expr-done 7946
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14768:21") else null)); 
--# expr-done 7947
Dyn_Var_Bind_Result := Bind_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 7948
Or_Pred := Create_Or (True_Rel, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14765:17") else null)); 
--# expr-done 7949
--# expr-start 7953 '<bind at nodes.lkt:14771:21>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:14771
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 7952 '<Bind at nodes.lkt:14772:21>' Bind_Result_1 ada/nodes.lkt:14772
--# expr-start 7950 '<FieldAccess for expected_type_var at nodes.lkt:14772:21>' Fld_2 ada/nodes.lkt:14772
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7950
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 7951 '<FieldAccess for int_type at nodes.lkt:14772:49>' Fld_3 ada/nodes.lkt:14772
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 7951
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Logic_Ctx_1 := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result_1 := Solver.Create_Assign (Fld_2, Cast_Result_1, Solver_Ifc.No_Converter, Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14772:21") else null)); 
--# expr-done 7952
Dyn_Var_Bind_Result_1 := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 7953
Or_Pred_1 := Create_Or (Or_Pred, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14765:17") else null)); 
--# expr-done 7954
--# expr-start 7979 '<LogicBinaryOp And at nodes.lkt:14776:17>' And_Pred_4 ada/nodes.lkt:14776
--# expr-start 7976 '<LogicBinaryOp And at nodes.lkt:14776:17>' And_Pred_3 ada/nodes.lkt:14776
--# expr-start 7973 '<LogicBinaryOp And at nodes.lkt:14776:17>' And_Pred_2 ada/nodes.lkt:14776
--# expr-start 7967 '<LogicBinaryOp And at nodes.lkt:14776:17>' And_Pred_1 ada/nodes.lkt:14776
--# expr-start 7961 '<LogicBinaryOp And at nodes.lkt:14776:17>' And_Pred ada/nodes.lkt:14776
--# expr-start 7956 '<Predicate on AdaNode.is_not_null at nodes.lkt:14776:17>' Pred ada/nodes.lkt:14776
--# expr-start 7955 '<FieldAccess for expected_type_var at nodes.lkt:14776:38>' Fld_4 ada/nodes.lkt:14776
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7955
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Pred := Solver.Create_Predicate (Fld_4, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 7956
--# expr-start 7960 '<bind at nodes.lkt:14778:21>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:14778
Bound_Logic_Context_2 := No_Logic_Context; 
--# expr-start 7959 '<Bind at nodes.lkt:14779:21>' Bind_Result_2 ada/nodes.lkt:14779
--# expr-start 7957 '<FieldAccess for expected_type_var at nodes.lkt:14779:21>' Fld_5 ada/nodes.lkt:14779
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 7957
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 7958 '<FieldAccess for type_var at nodes.lkt:14779:50>' Fld_6 ada/nodes.lkt:14779
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7958
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
Logic_Ctx_2 := Allocate_Logic_Context (Bound_Logic_Context_2); 
Bind_Result_2 := Solver.Create_Unify (Fld_5, Fld_6, Logic_Ctx_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14779:21") else null)); 
--# expr-done 7959
Dyn_Var_Bind_Result_2 := Bind_Result_2; Inc_Ref (Dyn_Var_Bind_Result_2);
--# expr-done 7960
And_Pred := Create_And (Pred, Dyn_Var_Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14776:17") else null)); 
--# expr-done 7961
--# expr-start 7966 '<bind at nodes.lkt:14782:21>' Dyn_Var_Bind_Result_3 ada/nodes.lkt:14782
Bound_Logic_Context_3 := No_Logic_Context; 
--# expr-start 7965 '<Bind at nodes.lkt:14783:21>' Bind_Result_3 ada/nodes.lkt:14783
--# expr-start 7962 '<FieldAccess for type_var at nodes.lkt:14783:21>' Fld_7 ada/nodes.lkt:14783
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7962
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
--# expr-start 7964 '<FieldAccess for expected_type_var at nodes.lkt:14783:41>' Fld_9 ada/nodes.lkt:14783
--# expr-start 7963 '<FieldAccess for left at nodes.lkt:14783:41>' Fld_8 ada/nodes.lkt:14783
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.Bin_Op_F_Left;
--# expr-done 7963
      if Fld_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_8);
--# expr-done 7964
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
Logic_Ctx_3 := Allocate_Logic_Context (Bound_Logic_Context_3); 
Bind_Result_3 := Solver.Create_Unify (Fld_7, Fld_9, Logic_Ctx_3, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14783:21") else null)); 
--# expr-done 7965
Dyn_Var_Bind_Result_3 := Bind_Result_3; Inc_Ref (Dyn_Var_Bind_Result_3);
--# expr-done 7966
And_Pred_1 := Create_And (And_Pred, Dyn_Var_Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14776:17") else null)); 
--# expr-done 7967
--# expr-start 7972 '<bind at nodes.lkt:14786:21>' Dyn_Var_Bind_Result_4 ada/nodes.lkt:14786
Bound_Logic_Context_4 := No_Logic_Context; 
--# expr-start 7971 '<Bind at nodes.lkt:14787:21>' Bind_Result_4 ada/nodes.lkt:14787
--# expr-start 7968 '<FieldAccess for type_var at nodes.lkt:14787:21>' Fld_10 ada/nodes.lkt:14787
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7968
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
--# expr-start 7970 '<FieldAccess for expected_type_var at nodes.lkt:14787:41>' Fld_12 ada/nodes.lkt:14787
--# expr-start 7969 '<FieldAccess for right at nodes.lkt:14787:41>' Fld_11 ada/nodes.lkt:14787
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Bin_Op_F_Right;
--# expr-done 7969
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_11);
--# expr-done 7970
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
Logic_Ctx_4 := Allocate_Logic_Context (Bound_Logic_Context_4); 
Bind_Result_4 := Solver.Create_Unify (Fld_10, Fld_12, Logic_Ctx_4, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14787:21") else null)); 
--# expr-done 7971
Dyn_Var_Bind_Result_4 := Bind_Result_4; Inc_Ref (Dyn_Var_Bind_Result_4);
--# expr-done 7972
And_Pred_2 := Create_And (And_Pred_1, Dyn_Var_Bind_Result_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14776:17") else null)); 
--# expr-done 7973
--# expr-start 7975 '<FieldAccess for matches_expected_formal_type at nodes.lkt:14789:22>' Fld_14 ada/nodes.lkt:14789
--# expr-start 7974 '<FieldAccess for left at nodes.lkt:14789:22>' Fld_13 ada/nodes.lkt:14789
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Self.Bin_Op_F_Left;
--# expr-done 7974
      if Fld_13 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_14 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_13, Origin => Origin);
--# end
--# expr-done 7975
And_Pred_3 := Create_And (And_Pred_2, Fld_14, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14776:17") else null)); 
--# expr-done 7976
--# expr-start 7978 '<FieldAccess for matches_expected_formal_type at nodes.lkt:14790:22>' Fld_16 ada/nodes.lkt:14790
--# expr-start 7977 '<FieldAccess for right at nodes.lkt:14790:22>' Fld_15 ada/nodes.lkt:14790
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Self.Bin_Op_F_Right;
--# expr-done 7977
      if Fld_15 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_16 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_15, Origin => Origin);
--# end
--# expr-done 7978
And_Pred_4 := Create_And (And_Pred_3, Fld_16, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14776:17") else null)); 
--# expr-done 7979
And_Pred_5 := Create_And (Or_Pred_1, And_Pred_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14764:13") else null)); 
--# expr-done 7980
--# expr-start 7983 '<FieldAccess for use_expected_type_or at nodes.lkt:14793:14>' Fld_19 ada/nodes.lkt:14793
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7982 '<FieldAccess for infer_from_either_operands at nodes.lkt:14801:13>' Fld_18 ada/nodes.lkt:14801
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 7981 '<FieldAccess for type_var at nodes.lkt:14801:45>' Fld_17 ada/nodes.lkt:14801
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 7981
--# property-call-start BinOp.infer_from_either_operands
Fld_18 := Libadalang.Implementation.Bin_Op_P_Infer_From_Either_Operands (Node => Ent.Node, Dest_Var => Fld_17, Origin => Origin, Logic_Context => Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 7982
--# property-call-start BinOp.use_expected_type_or
Fld_19 := Libadalang.Implementation.Bin_Op_P_Use_Expected_Type_Or (Node => Self, Eq => Fld_18);
--# end
--# expr-done 7983
And_Pred_6 := Create_And (And_Pred_5, Fld_19, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14763:9") else null)); 
--# expr-done 7984
         Property_Result := And_Pred_6;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1120;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1120;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Double_Dot_Equation;
--# end
--# property-start BinOp.test_eq ada/nodes.lkt:14805
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Test_Eq
  (Node : Bare_Bin_Op
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1121 with Inline_Always;
      Fld : Bare_Expr;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_3 : Bare_Expr;
Fld_4 : Logic_Var;
Fld_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Bare_Expr;
Fld_7 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_8 : Bare_Expr;
Fld_9 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_10 : Logic_Var;
Fld_11 : Bare_Expr;
Fld_12 : Logic_Var;
Bind_Result_2 : Logic_Equation;
And_Pred_3 : Logic_Equation;
            procedure Finalizer_Scope_1121 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_1121;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8004 '<LogicBinaryOp And at nodes.lkt:14806:9>' And_Pred_3 ada/nodes.lkt:14806
--# expr-start 7999 '<LogicBinaryOp And at nodes.lkt:14806:9>' And_Pred_2 ada/nodes.lkt:14806
--# expr-start 7996 '<LogicBinaryOp And at nodes.lkt:14806:9>' And_Pred_1 ada/nodes.lkt:14806
--# expr-start 7993 '<LogicBinaryOp And at nodes.lkt:14806:9>' And_Pred ada/nodes.lkt:14806
--# expr-start 7988 '<Bind at nodes.lkt:14806:9>' Bind_Result ada/nodes.lkt:14806
--# expr-start 7986 '<FieldAccess for expected_type_var at nodes.lkt:14806:9>' Fld_1 ada/nodes.lkt:14806
--# expr-start 7985 '<FieldAccess for left at nodes.lkt:14806:9>' Fld ada/nodes.lkt:14806
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Bin_Op_F_Left;
--# expr-done 7985
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld);
--# expr-done 7986
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 7987 '<FieldAccess for bool_type at nodes.lkt:14806:42>' Fld_2 ada/nodes.lkt:14806
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_2 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 7987
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14806:9") else null)); 
--# expr-done 7988
--# expr-start 7992 '<Bind at nodes.lkt:14807:14>' Bind_Result_1 ada/nodes.lkt:14807
--# expr-start 7990 '<FieldAccess for expected_type_var at nodes.lkt:14807:14>' Fld_4 ada/nodes.lkt:14807
--# expr-start 7989 '<FieldAccess for right at nodes.lkt:14807:14>' Fld_3 ada/nodes.lkt:14807
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Bin_Op_F_Right;
--# expr-done 7989
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_3);
--# expr-done 7990
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 7991 '<FieldAccess for bool_type at nodes.lkt:14807:48>' Fld_5 ada/nodes.lkt:14807
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_5 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 7991
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_4, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14807:14") else null)); 
--# expr-done 7992
And_Pred := Create_And (Bind_Result, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14806:9") else null)); 
--# expr-done 7993
--# expr-start 7995 '<FieldAccess for expect_bool_derived_type at nodes.lkt:14808:14>' Fld_7 ada/nodes.lkt:14808
--# expr-start 7994 '<FieldAccess for left at nodes.lkt:14808:14>' Fld_6 ada/nodes.lkt:14808
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Bin_Op_F_Left;
--# expr-done 7994
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_7 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Fld_6, Origin => Origin);
--# end
--# expr-done 7995
And_Pred_1 := Create_And (And_Pred, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14806:9") else null)); 
--# expr-done 7996
--# expr-start 7998 '<FieldAccess for expect_bool_derived_type at nodes.lkt:14809:14>' Fld_9 ada/nodes.lkt:14809
--# expr-start 7997 '<FieldAccess for right at nodes.lkt:14809:14>' Fld_8 ada/nodes.lkt:14809
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.Bin_Op_F_Right;
--# expr-done 7997
      if Fld_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_9 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Fld_8, Origin => Origin);
--# end
--# expr-done 7998
And_Pred_2 := Create_And (And_Pred_1, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14806:9") else null)); 
--# expr-done 7999
--# expr-start 8003 '<Bind at nodes.lkt:14810:14>' Bind_Result_2 ada/nodes.lkt:14810
--# expr-start 8000 '<FieldAccess for type_var at nodes.lkt:14810:14>' Fld_10 ada/nodes.lkt:14810
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8000
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
--# expr-start 8002 '<FieldAccess for type_var at nodes.lkt:14810:34>' Fld_12 ada/nodes.lkt:14810
--# expr-start 8001 '<FieldAccess for left at nodes.lkt:14810:34>' Fld_11 ada/nodes.lkt:14810
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Bin_Op_F_Left;
--# expr-done 8001
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_11);
--# expr-done 8002
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
Bind_Result_2 := Solver.Create_Unify (Fld_10, Fld_12, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14810:14") else null)); 
--# expr-done 8003
And_Pred_3 := Create_And (And_Pred_2, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14806:9") else null)); 
--# expr-done 8004
         Property_Result := And_Pred_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1121;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1121;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Test_Eq;
--# end
--# property-start BinOp.arguments_eq ada/nodes.lkt:14813
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Arguments_Eq
  (Node : Bare_Bin_Op
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind spec Spec
   --# bind origin Origin
   --# bind env Env
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1122 with Inline_Always;
      Local_Ps : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Equation;
Get_Result_1 : Internal_Entity_Defining_Name;
Fld_4 : Internal_Entity_Base_Formal_Param_Decl;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_7 : Logic_Var;
Fld_8 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
False_Rel : Logic_Equation;
Len : Integer;
Is_Equal : Boolean;
If_Result : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1122 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Ps);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1122;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8022 '<Let at nodes.lkt:14814:9>' Let_Result ada/nodes.lkt:14814
--# scope-start
--# expr-start 8005 '<FieldAccess for unpacked_formal_params at nodes.lkt:14814:18>' Fld ada/nodes.lkt:14814
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Spec.Node, E_Info => Spec.Info);
--# end
--# expr-done 8005
Local_Ps := Fld; Inc_Ref (Local_Ps);
--# bind ps Local_Ps
--# expr-start 8021 '<If at nodes.lkt:14816:9>' If_Result ada/nodes.lkt:14816
--# expr-start 8007 '<Eq at nodes.lkt:14816:12>' Is_Equal ada/nodes.lkt:14816
--# expr-start 8006 '<length at nodes.lkt:14816:12>' Len ada/nodes.lkt:14816
Len := Length (Local_Ps); 
--# expr-done 8006
Is_Equal := Len = 2; 
--# expr-done 8007
if Is_Equal then
   --# expr-start 8020 '<LogicBinaryOp And at nodes.lkt:14820:13>' And_Pred_1 ada/nodes.lkt:14820
--# expr-start 8016 '<LogicBinaryOp And at nodes.lkt:14821:17>' And_Pred ada/nodes.lkt:14821
--# expr-start 8011 '<FieldAccess for call_argument_equation at nodes.lkt:14821:17>' Fld_3 ada/nodes.lkt:14821
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8009 '<FieldAccess for formal_decl at nodes.lkt:14821:45>' Fld_1 ada/nodes.lkt:14821
--# expr-start 8008 '<at at nodes.lkt:14821:45>' Get_Result ada/nodes.lkt:14821
Get_Result := Get (Self, Local_Ps, 0, True); 
--# expr-done 8008
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 8009
--# expr-start 8010 '<FieldAccess for left at nodes.lkt:14821:67>' Fld_2 ada/nodes.lkt:14821
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Bin_Op_F_Left, Info => Ent.Info);
--# expr-done 8010
--# property-call-start BaseFormalParamHolder.call_argument_equation
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Call_Argument_Equation (Node => Spec.Node, Param => Fld_1, Arg => Fld_2, Origin => Origin, Logic_Context => Logic_Context, E_Info => Spec.Info);
--# end
--# expr-done 8011
--# expr-start 8015 '<FieldAccess for call_argument_equation at nodes.lkt:14825:21>' Fld_6 ada/nodes.lkt:14825
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8013 '<FieldAccess for formal_decl at nodes.lkt:14826:25>' Fld_4 ada/nodes.lkt:14826
--# expr-start 8012 '<at at nodes.lkt:14826:25>' Get_Result_1 ada/nodes.lkt:14826
Get_Result_1 := Get (Self, Local_Ps, 1, True); 
--# expr-done 8012
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_4 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 8013
--# expr-start 8014 '<FieldAccess for right at nodes.lkt:14827:25>' Fld_5 ada/nodes.lkt:14827
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Bin_Op_F_Right, Info => Ent.Info);
--# expr-done 8014
--# property-call-start BaseFormalParamHolder.call_argument_equation
Fld_6 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Call_Argument_Equation (Node => Spec.Node, Param => Fld_4, Arg => Fld_5, Origin => Origin, Logic_Context => Logic_Context, E_Info => Spec.Info);
--# end
--# expr-done 8015
And_Pred := Create_And (Fld_3, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14821:17") else null)); 
--# expr-done 8016
--# expr-start 8019 '<Bind at nodes.lkt:14833:17>' Bind_Result ada/nodes.lkt:14833
--# expr-start 8017 '<FieldAccess for type_var at nodes.lkt:14833:17>' Fld_7 ada/nodes.lkt:14833
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8017
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
--# expr-start 8018 '<FieldAccess for return_type at nodes.lkt:14833:36>' Fld_8 ada/nodes.lkt:14833
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_8 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Spec.Node, Origin => Origin, E_Info => Spec.Info);
--# end
--# expr-done 8018
      Cast_Result := Create_Internal_Entity
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
Logic_Ctx := Allocate_Logic_Context (Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld_7, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14833:17") else null)); 
--# expr-done 8019
And_Pred_1 := Create_And (And_Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14820:13") else null)); 
--# expr-done 8020
   If_Result := And_Pred_1;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14836:14") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 8021
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 8022
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1122;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1122;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Arguments_Eq;
--# end
--# property-start BinOp.entity_eq ada/nodes.lkt:14840
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Entity_Eq
  (Node : Bare_Bin_Op
      ; Subp : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind subp Subp
   --# bind origin Origin
   --# bind env Env
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1123 with Inline_Always;
      Local_Spec : Internal_Entity_Base_Subp_Spec;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Logic_Equation;
Bound_Logic_Context : Internal_Logic_Context;
Fld_2 : Bare_Op;
Fld_3 : Logic_Var;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_4 : Bare_Op;
Fld_5 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Subp_Spec;
Cast_Result_1 : Internal_Entity;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1123 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1123;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8035 '<Let at nodes.lkt:14841:9>' Let_Result ada/nodes.lkt:14841
--# scope-start
--# expr-start 8023 '<FieldAccess for subp_spec_or_null at nodes.lkt:14841:20>' Fld ada/nodes.lkt:14841
      if Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Subp.Node, E_Info => Subp.Info);
--# end
--# expr-done 8023
Local_Spec := Fld; 
--# bind spec Local_Spec
--# expr-start 8034 '<LogicBinaryOp And at nodes.lkt:14843:9>' And_Pred_1 ada/nodes.lkt:14843
--# expr-start 8029 '<LogicBinaryOp And at nodes.lkt:14843:9>' And_Pred ada/nodes.lkt:14843
--# expr-start 8024 '<FieldAccess for arguments_eq at nodes.lkt:14843:9>' Fld_1 ada/nodes.lkt:14843
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BinOp.arguments_eq
Fld_1 := Libadalang.Implementation.Bin_Op_P_Arguments_Eq (Node => Ent.Node, Spec => Local_Spec, Origin => Origin, Env => Env, Logic_Context => Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 8024
--# expr-start 8028 '<bind at nodes.lkt:14847:17>' Dyn_Var_Bind_Result ada/nodes.lkt:14847
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 8027 '<Bind at nodes.lkt:14848:17>' Bind_Result ada/nodes.lkt:14848
--# expr-start 8026 '<FieldAccess for ref_var at nodes.lkt:14848:17>' Fld_3 ada/nodes.lkt:14848
--# expr-start 8025 '<FieldAccess for op at nodes.lkt:14848:17>' Fld_2 ada/nodes.lkt:14848
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Bin_Op_F_Op;
--# expr-done 8025
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_2);
--# end
--# expr-done 8026
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Cast_Expr := Subp; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld_3, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14848:17") else null)); 
--# expr-done 8027
Dyn_Var_Bind_Result := Bind_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8028
And_Pred := Create_And (Fld_1, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14843:9") else null)); 
--# expr-done 8029
--# expr-start 8033 '<bind at nodes.lkt:14852:13>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:14852
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 8032 '<Bind at nodes.lkt:14853:13>' Bind_Result_1 ada/nodes.lkt:14853
--# expr-start 8031 '<FieldAccess for subp_spec_var at nodes.lkt:14853:13>' Fld_5 ada/nodes.lkt:14853
--# expr-start 8030 '<FieldAccess for op at nodes.lkt:14853:13>' Fld_4 ada/nodes.lkt:14853
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Bin_Op_F_Op;
--# expr-done 8030
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld_5 := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Fld_4);
--# end
--# expr-done 8031
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr_1 := Local_Spec; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Logic_Ctx_1 := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result_1 := Solver.Create_Assign (Fld_5, Cast_Result_1, Solver_Ifc.No_Converter, Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14853:13") else null)); 
--# expr-done 8032
Dyn_Var_Bind_Result_1 := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 8033
And_Pred_1 := Create_And (And_Pred, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14843:9") else null)); 
--# expr-done 8034
Let_Result := And_Pred_1; Inc_Ref (Let_Result);
--# end
--# expr-done 8035
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1123;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1123;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Entity_Eq;
--# end
--# property-start BinOp.overload_equation ada/nodes.lkt:14858
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Overload_Equation
  (Node : Bare_Bin_Op
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind env Env
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1124 with Inline_Always;
            procedure Finalizer_Scope_3054 with Inline_Always;
      Fld : Internal_Entity_Op;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
Fld_2 : Internal_Entity_Op;
Cast_Result : Internal_Entity;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
New_Struct : Internal_Logic_Context;
Bound_Logic_Context : Internal_Logic_Context;
Fld_3 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1124 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1124;
            procedure Finalizer_Scope_3054 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_3054;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8043 '<LogicAny at nodes.lkt:14859:9>' Logic_Boolean_Op ada/nodes.lkt:14859
--# expr-start 8042 '<Map at nodes.lkt:14859:9>' Map_Result ada/nodes.lkt:14859
   --# expr-start 8037 '<FieldAccess for subprograms at nodes.lkt:14859:9>' Fld_1 ada/nodes.lkt:14859
--# expr-start 8036 '<FieldAccess for op at nodes.lkt:14859:9>' Fld ada/nodes.lkt:14859
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Op (Node => Ent.Node.Bin_Op_F_Op, Info => Ent.Info);
--# expr-done 8036
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Op.subprograms
Fld_1 := Libadalang.Implementation.Op_P_Subprograms (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 8037
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind subp Item_0
      --# expr-start 8041 '<bind at nodes.lkt:14861:17>' Dyn_Var_Bind_Result ada/nodes.lkt:14861
--# expr-start 8039 '<New LogicContext at nodes.lkt:14862:21>' New_Struct ada/nodes.lkt:14862
Cast_Expr := Item_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 8038 '<FieldAccess for op at nodes.lkt:14862:43>' Fld_2 ada/nodes.lkt:14862
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Op (Node => Ent.Node.Bin_Op_F_Op, Info => Ent.Info);
--# expr-done 8038
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
New_Struct := (Decl_Node => Cast_Result_1, Ref_Node => Cast_Result); 
--# expr-done 8039
Bound_Logic_Context := New_Struct; 
--# expr-start 8040 '<FieldAccess for entity_eq at nodes.lkt:14864:17>' Fld_3 ada/nodes.lkt:14864
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BinOp.entity_eq
Fld_3 := Libadalang.Implementation.Bin_Op_P_Entity_Eq (Node => Ent.Node, Subp => Item_0, Origin => Origin, Env => Env, Logic_Context => Bound_Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 8040
Dyn_Var_Bind_Result := Fld_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8041
         declare
            Item_To_Append : constant Logic_Equation := Dyn_Var_Bind_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3054;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8042
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14859:9") else null)); 
--# expr-done 8043
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1124;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1124;
                     Finalizer_Scope_3054;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Overload_Equation;
--# end
--# property-start BinOp.universal_fixed_predefined_operators_equation ada/nodes.lkt:14871
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Universal_Fixed_Predefined_Operators_Equation
  (Node : Bare_Bin_Op
      ; Origin : Bare_Ada_Node
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1125 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Bare_Expr;
Fld_6 : Logic_Var;
Fld_7 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_8 : Bare_Expr;
Fld_9 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_10 : Bare_Expr;
Fld_11 : Logic_Equation;
And_Pred_3 : Logic_Equation;
False_Rel : Logic_Equation;
Fld_12 : Bare_Op;
Is_A : Boolean;
If_Result : Logic_Equation;
            procedure Finalizer_Scope_1125 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_11);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_1125;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8065 '<If at nodes.lkt:14872:9>' If_Result ada/nodes.lkt:14872
--# expr-start 8045 '<IsA Op.Mult, Op.Div at nodes.lkt:14872:12>' Is_A ada/nodes.lkt:14872
--# expr-start 8044 '<FieldAccess for op at nodes.lkt:14872:12>' Fld_12 ada/nodes.lkt:14872
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Self.Bin_Op_F_Op;
--# expr-done 8044
Is_A := Fld_12 /= null 
and then Fld_12.Kind in Ada_Op_Mult_Range | Ada_Op_Div_Range; 
--# expr-done 8045
if Is_A then
   --# expr-start 8064 '<LogicBinaryOp And at nodes.lkt:14874:13>' And_Pred_3 ada/nodes.lkt:14874
--# expr-start 8061 '<LogicBinaryOp And at nodes.lkt:14875:17>' And_Pred_2 ada/nodes.lkt:14875
--# expr-start 8058 '<LogicBinaryOp And at nodes.lkt:14876:21>' And_Pred_1 ada/nodes.lkt:14876
--# expr-start 8053 '<LogicBinaryOp And at nodes.lkt:14877:25>' And_Pred ada/nodes.lkt:14877
--# expr-start 8048 '<Bind at nodes.lkt:14877:25>' Bind_Result ada/nodes.lkt:14877
--# expr-start 8046 '<FieldAccess for type_var at nodes.lkt:14877:25>' Fld ada/nodes.lkt:14877
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8046
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 8047 '<FieldAccess for universal_fixed_type at nodes.lkt:14877:44>' Fld_1 ada/nodes.lkt:14877
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_fixed_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Universal_Fixed_Type (Node => Self);
--# end
--# expr-done 8047
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14877:25") else null)); 
--# expr-done 8048
--# expr-start 8052 '<Bind at nodes.lkt:14878:30>' Bind_Result_1 ada/nodes.lkt:14878
--# expr-start 8050 '<FieldAccess for expected_type_var at nodes.lkt:14878:30>' Fld_3 ada/nodes.lkt:14878
--# expr-start 8049 '<FieldAccess for left at nodes.lkt:14878:30>' Fld_2 ada/nodes.lkt:14878
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Bin_Op_F_Left;
--# expr-done 8049
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2);
--# expr-done 8050
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 8051 '<FieldAccess for universal_fixed_type at nodes.lkt:14879:28>' Fld_4 ada/nodes.lkt:14879
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_fixed_type
Fld_4 := Libadalang.Implementation.Ada_Node_P_Universal_Fixed_Type (Node => Self);
--# end
--# expr-done 8051
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_3, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14878:30") else null)); 
--# expr-done 8052
And_Pred := Create_And (Bind_Result, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14877:25") else null)); 
--# expr-done 8053
--# expr-start 8057 '<Bind at nodes.lkt:14881:26>' Bind_Result_2 ada/nodes.lkt:14881
--# expr-start 8055 '<FieldAccess for expected_type_var at nodes.lkt:14881:26>' Fld_6 ada/nodes.lkt:14881
--# expr-start 8054 '<FieldAccess for right at nodes.lkt:14881:26>' Fld_5 ada/nodes.lkt:14881
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Bin_Op_F_Right;
--# expr-done 8054
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_5);
--# expr-done 8055
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
--# expr-start 8056 '<FieldAccess for universal_fixed_type at nodes.lkt:14882:24>' Fld_7 ada/nodes.lkt:14882
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_fixed_type
Fld_7 := Libadalang.Implementation.Ada_Node_P_Universal_Fixed_Type (Node => Self);
--# end
--# expr-done 8056
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_6, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14881:26") else null)); 
--# expr-done 8057
And_Pred_1 := Create_And (And_Pred, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14876:21") else null)); 
--# expr-done 8058
--# expr-start 8060 '<FieldAccess for matches_expected_formal_type at nodes.lkt:14884:22>' Fld_9 ada/nodes.lkt:14884
--# expr-start 8059 '<FieldAccess for left at nodes.lkt:14884:22>' Fld_8 ada/nodes.lkt:14884
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.Bin_Op_F_Left;
--# expr-done 8059
      if Fld_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_9 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_8, Origin => Origin);
--# end
--# expr-done 8060
And_Pred_2 := Create_And (And_Pred_1, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14875:17") else null)); 
--# expr-done 8061
--# expr-start 8063 '<FieldAccess for matches_expected_formal_type at nodes.lkt:14886:18>' Fld_11 ada/nodes.lkt:14886
--# expr-start 8062 '<FieldAccess for right at nodes.lkt:14886:18>' Fld_10 ada/nodes.lkt:14886
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Self.Bin_Op_F_Right;
--# expr-done 8062
      if Fld_10 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_11 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_10, Origin => Origin);
--# end
--# expr-done 8063
And_Pred_3 := Create_And (And_Pred_2, Fld_11, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14874:13") else null)); 
--# expr-done 8064
   If_Result := And_Pred_3;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14887:14") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 8065
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1125;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1125;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Universal_Fixed_Predefined_Operators_Equation;
--# end
--# property-start BinOp.use_expected_type_or ada/nodes.lkt:14893
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Use_Expected_Type_Or
  (Node : Bare_Bin_Op
      ; Eq : Logic_Equation
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
      --# bind self Self
   --# bind eq Eq
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1126 with Inline_Always;
      Fld : Logic_Var;
Pred : Logic_Equation;
Or_Pred : Logic_Equation;
            procedure Finalizer_Scope_1126 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Or_Pred);
            end Finalizer_Scope_1126;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8068 '<LogicBinaryOp Or at nodes.lkt:14894:9>' Or_Pred ada/nodes.lkt:14894
--# expr-start 8067 '<Predicate on AdaNode.is_not_null at nodes.lkt:14894:9>' Pred ada/nodes.lkt:14894
--# expr-start 8066 '<FieldAccess for expected_type_var at nodes.lkt:14894:30>' Fld ada/nodes.lkt:14894
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8066
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
Pred := Solver.Create_Predicate (Fld, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 8067
Or_Pred := Create_Or (Pred, Eq, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14894:9") else null)); 
--# expr-done 8068
         Property_Result := Or_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1126;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1126;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Use_Expected_Type_Or;
--# end
--# property-start BinOp.infer_from_left_operand ada/nodes.lkt:14901
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Infer_From_Left_Operand
  (Node : Bare_Bin_Op
      ; Dest_Var : Logic_Var
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
      --# bind self Self
   --# bind dest_var Dest_Var
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1127 with Inline_Always;
      Fld : Bare_Expr;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1127 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1127;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8075 '<LogicBinaryOp And at nodes.lkt:14902:9>' And_Pred ada/nodes.lkt:14902
--# expr-start 8071 '<Predicate on BaseTypeDecl.is_not_universal_type at nodes.lkt:14902:9>' Pred ada/nodes.lkt:14902
--# expr-start 8070 '<FieldAccess for type_var at nodes.lkt:14902:45>' Fld_1 ada/nodes.lkt:14902
--# expr-start 8069 '<FieldAccess for left at nodes.lkt:14902:45>' Fld ada/nodes.lkt:14902
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Bin_Op_F_Left;
--# expr-done 8069
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld);
--# expr-done 8070
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_Predicate (Fld_1, Create_Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate); 
--# expr-done 8071
--# expr-start 8074 '<NPropagate at nodes.lkt:14903:14>' Bind_Result ada/nodes.lkt:14903
--# expr-start 8073 '<FieldAccess for type_var at nodes.lkt:14904:47>' Fld_3 ada/nodes.lkt:14904
--# expr-start 8072 '<FieldAccess for left at nodes.lkt:14904:47>' Fld_2 ada/nodes.lkt:14904
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Bin_Op_F_Left;
--# expr-done 8072
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_2);
--# expr-done 8073
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Dest_Var.Value := No_Entity;
Entity_Vars.Reset (Dest_Var);
Logic_Ctx := Allocate_Logic_Context (Logic_Context); 
Bind_Result := Solver.Create_Propagate (Fld_3, Dest_Var, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14903:14") else null)); 
--# expr-done 8074
And_Pred := Create_And (Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14902:9") else null)); 
--# expr-done 8075
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1127;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1127;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Infer_From_Left_Operand;
--# end
--# property-start BinOp.infer_from_right_operand ada/nodes.lkt:14911
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Infer_From_Right_Operand
  (Node : Bare_Bin_Op
      ; Dest_Var : Logic_Var
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
      --# bind self Self
   --# bind dest_var Dest_Var
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1128 with Inline_Always;
      Fld : Bare_Expr;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1128 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1128;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8082 '<LogicBinaryOp And at nodes.lkt:14912:9>' And_Pred ada/nodes.lkt:14912
--# expr-start 8078 '<Predicate on BaseTypeDecl.is_not_universal_type at nodes.lkt:14912:9>' Pred ada/nodes.lkt:14912
--# expr-start 8077 '<FieldAccess for type_var at nodes.lkt:14912:45>' Fld_1 ada/nodes.lkt:14912
--# expr-start 8076 '<FieldAccess for right at nodes.lkt:14912:45>' Fld ada/nodes.lkt:14912
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Bin_Op_F_Right;
--# expr-done 8076
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld);
--# expr-done 8077
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_Predicate (Fld_1, Create_Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate); 
--# expr-done 8078
--# expr-start 8081 '<NPropagate at nodes.lkt:14913:14>' Bind_Result ada/nodes.lkt:14913
--# expr-start 8080 '<FieldAccess for type_var at nodes.lkt:14914:47>' Fld_3 ada/nodes.lkt:14914
--# expr-start 8079 '<FieldAccess for right at nodes.lkt:14914:47>' Fld_2 ada/nodes.lkt:14914
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Bin_Op_F_Right;
--# expr-done 8079
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_2);
--# expr-done 8080
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Dest_Var.Value := No_Entity;
Entity_Vars.Reset (Dest_Var);
Logic_Ctx := Allocate_Logic_Context (Logic_Context); 
Bind_Result := Solver.Create_Propagate (Fld_3, Dest_Var, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14913:14") else null)); 
--# expr-done 8081
And_Pred := Create_And (Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14912:9") else null)); 
--# expr-done 8082
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1128;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1128;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Infer_From_Right_Operand;
--# end
--# property-start BinOp.infer_from_either_operands ada/nodes.lkt:14921
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Infer_From_Either_Operands
  (Node : Bare_Bin_Op
      ; Dest_Var : Logic_Var
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind dest_var Dest_Var
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1129 with Inline_Always;
      Local_Infer_Left : Logic_Equation;
Local_Infer_Right : Logic_Equation;
Fld : Logic_Equation;
Fld_1 : Logic_Equation;
Or_Pred : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_1129 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Infer_Left);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Infer_Right);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1129;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8087 '<Let at nodes.lkt:14922:9>' Let_Result_1 ada/nodes.lkt:14922
--# scope-start
--# expr-start 8083 '<FieldAccess for infer_from_left_operand at nodes.lkt:14922:26>' Fld ada/nodes.lkt:14922
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BinOp.infer_from_left_operand
Fld := Libadalang.Implementation.Bin_Op_P_Infer_From_Left_Operand (Node => Ent.Node, Dest_Var => Dest_Var, Origin => Origin, Logic_Context => Logic_Context);
--# end
--# expr-done 8083
Local_Infer_Left := Fld; Inc_Ref (Local_Infer_Left);
--# bind infer_left Local_Infer_Left
--# expr-start 8086 '<Let at nodes.lkt:14923:9>' Let_Result ada/nodes.lkt:14923
--# scope-start
--# expr-start 8084 '<FieldAccess for infer_from_right_operand at nodes.lkt:14923:27>' Fld_1 ada/nodes.lkt:14923
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BinOp.infer_from_right_operand
Fld_1 := Libadalang.Implementation.Bin_Op_P_Infer_From_Right_Operand (Node => Ent.Node, Dest_Var => Dest_Var, Origin => Origin, Logic_Context => Logic_Context);
--# end
--# expr-done 8084
Local_Infer_Right := Fld_1; Inc_Ref (Local_Infer_Right);
--# bind infer_right Local_Infer_Right
--# expr-start 8085 '<LogicBinaryOp Or at nodes.lkt:14925:9>' Or_Pred ada/nodes.lkt:14925
Or_Pred := Create_Or (Local_Infer_Left, Local_Infer_Right, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14925:9") else null)); 
--# expr-done 8085
Let_Result := Or_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 8086
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 8087
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1129;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1129;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Infer_From_Either_Operands;
--# end
--# property-start BinOp.potential_actuals_for_dispatch ada/nodes.lkt:14929
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Potential_Actuals_For_Dispatch
  (Node : Bare_Bin_Op
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Expected_Type_For_Expr_Array_Access
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind spec Spec
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Expected_Type_For_Expr_Array_Access;
            procedure Finalizer_Scope_1130 with Inline_Always;
      Local_Params : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl;
Fld_2 : Internal_Entity_Type_Expr;
Fld_3 : Internal_Entity_Expr;
New_Struct : Internal_Expected_Type_For_Expr;
Get_Result_1 : Internal_Entity_Defining_Name;
Fld_4 : Internal_Entity_Base_Formal_Param_Decl;
Fld_5 : Internal_Entity_Type_Expr;
Fld_6 : Internal_Entity_Expr;
New_Struct_1 : Internal_Expected_Type_For_Expr;
Array_Lit : Internal_Expected_Type_For_Expr_Array_Access;
Let_Result : Internal_Expected_Type_For_Expr_Array_Access;
            procedure Finalizer_Scope_1130 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Params);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1130;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8100 '<Let at nodes.lkt:14932:9>' Let_Result ada/nodes.lkt:14932
--# scope-start
--# expr-start 8088 '<FieldAccess for unpacked_formal_params at nodes.lkt:14932:22>' Fld ada/nodes.lkt:14932
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Spec.Node, E_Info => Spec.Info);
--# end
--# expr-done 8088
Local_Params := Fld; Inc_Ref (Local_Params);
--# bind params Local_Params
--# expr-start 8099 '<ArrayLiteral at nodes.lkt:14934:9>' Array_Lit ada/nodes.lkt:14934
--# expr-start 8093 '<New ExpectedTypeForExpr at nodes.lkt:14935:13>' New_Struct ada/nodes.lkt:14935
--# expr-start 8091 '<FieldAccess for type_expression at nodes.lkt:14936:31>' Fld_2 ada/nodes.lkt:14936
--# expr-start 8090 '<FieldAccess for formal_decl at nodes.lkt:14936:31>' Fld_1 ada/nodes.lkt:14936
--# expr-start 8089 '<at at nodes.lkt:14936:31>' Get_Result ada/nodes.lkt:14936
Get_Result := Get (Self, Local_Params, 0, True); 
--# expr-done 8089
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 8090
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 8091
--# expr-start 8092 '<FieldAccess for left at nodes.lkt:14937:22>' Fld_3 ada/nodes.lkt:14937
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Bin_Op_F_Left, Info => Ent.Info);
--# expr-done 8092
New_Struct := (Expected_Type => Fld_2, Expr => Fld_3); 
--# expr-done 8093
--# expr-start 8098 '<New ExpectedTypeForExpr at nodes.lkt:14939:13>' New_Struct_1 ada/nodes.lkt:14939
--# expr-start 8096 '<FieldAccess for type_expression at nodes.lkt:14940:31>' Fld_5 ada/nodes.lkt:14940
--# expr-start 8095 '<FieldAccess for formal_decl at nodes.lkt:14940:31>' Fld_4 ada/nodes.lkt:14940
--# expr-start 8094 '<at at nodes.lkt:14940:31>' Get_Result_1 ada/nodes.lkt:14940
Get_Result_1 := Get (Self, Local_Params, 1, True); 
--# expr-done 8094
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_4 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 8095
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 8096
--# expr-start 8097 '<FieldAccess for right at nodes.lkt:14941:22>' Fld_6 ada/nodes.lkt:14941
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Ent.Node.Bin_Op_F_Right, Info => Ent.Info);
--# expr-done 8097
New_Struct_1 := (Expected_Type => Fld_5, Expr => Fld_6); 
--# expr-done 8098
Array_Lit := Create_Internal_Expected_Type_For_Expr_Array (Internal_Internal_Expected_Type_For_Expr_Array'(1 => New_Struct, 2 => New_Struct_1)); 
--# expr-done 8099
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
--# expr-done 8100
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1130;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1130;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Potential_Actuals_For_Dispatch;
--# end
--# property-start BinOp.is_dispatching_call ada/nodes.lkt:14947
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_Is_Dispatching_Call
  (Node : Bare_Bin_Op
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Op;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8102 '<FieldAccess for is_dispatching_call at nodes.lkt:14947:39>' Fld_1 ada/nodes.lkt:14947
--# expr-start 8101 '<FieldAccess for op at nodes.lkt:14947:39>' Fld ada/nodes.lkt:14947
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Op (Node => Ent.Node.Bin_Op_F_Op, Info => Ent.Info);
--# expr-done 8101
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.is_dispatching_call'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Is_Dispatching_Call (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 8102
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Bin_Op_P_Is_Dispatching_Call;
--# end
--# property-start '[dispatcher]BinOp.no_overload_equation' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Bin_Op_P_No_Overload_Equation
  (Node : Bare_Bin_Op
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Bin_Op_Range (Self.Kind) is
               when Ada_Bin_Op =>
                  --# property-call-start BinOp.no_overload_equation
                  Property_Result := Bin_Op_P_No_Overload_Equation
                    (Self
                        , Origin
                        , Logic_Context
                        , E_Info
                    );
                  --# end
               when Ada_Relation_Op =>
                  --# property-call-start RelationOp.no_overload_equation
                  Property_Result := Relation_Op_P_No_Overload_Equation
                    (Self
                        , Origin
                        , Logic_Context
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Bin_Op_P_No_Overload_Equation;
--# end
--# property-start BinOp.no_overload_equation ada/nodes.lkt:14952
pragma Warnings (Off, "is not referenced");
 function Bin_Op_P_No_Overload_Equation
  (Node : Bare_Bin_Op
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Bin_Op  := Bare_Bin_Op (Node);
     Ent : Internal_Entity_Bin_Op :=
       Internal_Entity_Bin_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1132 with Inline_Always;
      Bound_Logic_Context : Internal_Logic_Context;
Fld : Logic_Var;
Fld_1 : Bare_Expr;
Fld_2 : Logic_Var;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_3 : Logic_Var;
Fld_4 : Bare_Expr;
Fld_5 : Logic_Var;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Var;
Fld_7 : Logic_Equation;
Fld_8 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Bound_Logic_Context_2 : Internal_Logic_Context;
Fld_9 : Bare_Expr;
Fld_10 : Logic_Var;
Fld_11 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx_2 : Internal_Logic_Context_Access;
Bind_Result_2 : Logic_Equation;
Dyn_Var_Bind_Result_2 : Logic_Equation;
Bound_Logic_Context_3 : Internal_Logic_Context;
Fld_12 : Bare_Expr;
Fld_13 : Logic_Var;
Fld_14 : Logic_Var;
Logic_Ctx_3 : Internal_Logic_Context_Access;
Bind_Result_3 : Logic_Equation;
Dyn_Var_Bind_Result_3 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_15 : Logic_Var;
Fld_16 : Logic_Equation;
Fld_17 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Or_Pred : Logic_Equation;
Bound_Logic_Context_4 : Internal_Logic_Context;
Fld_18 : Bare_Expr;
Fld_19 : Logic_Var;
Fld_20 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Logic_Ctx_4 : Internal_Logic_Context_Access;
Bind_Result_4 : Logic_Equation;
Dyn_Var_Bind_Result_4 : Logic_Equation;
Bound_Logic_Context_5 : Internal_Logic_Context;
Fld_21 : Bare_Expr;
Fld_22 : Logic_Var;
Fld_23 : Logic_Var;
Logic_Ctx_5 : Internal_Logic_Context_Access;
Bind_Result_5 : Logic_Equation;
Dyn_Var_Bind_Result_5 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_24 : Logic_Var;
Fld_25 : Logic_Equation;
Fld_26 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Or_Pred_1 : Logic_Equation;
Bound_Logic_Context_6 : Internal_Logic_Context;
Fld_27 : Bare_Expr;
Fld_28 : Logic_Var;
Fld_29 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Logic_Ctx_6 : Internal_Logic_Context_Access;
Bind_Result_6 : Logic_Equation;
Dyn_Var_Bind_Result_6 : Logic_Equation;
Bound_Logic_Context_7 : Internal_Logic_Context;
Fld_30 : Bare_Expr;
Fld_31 : Logic_Var;
Fld_32 : Logic_Var;
Logic_Ctx_7 : Internal_Logic_Context_Access;
Bind_Result_7 : Logic_Equation;
Dyn_Var_Bind_Result_7 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_33 : Logic_Var;
Fld_34 : Logic_Equation;
Fld_35 : Logic_Equation;
And_Pred_7 : Logic_Equation;
Bound_Logic_Context_8 : Internal_Logic_Context;
Fld_36 : Logic_Var;
Fld_37 : Bare_Expr;
Fld_38 : Logic_Var;
Logic_Ctx_8 : Internal_Logic_Context_Access;
Bind_Result_8 : Logic_Equation;
Dyn_Var_Bind_Result_8 : Logic_Equation;
Bound_Logic_Context_9 : Internal_Logic_Context;
Fld_39 : Logic_Var;
Fld_40 : Bare_Expr;
Fld_41 : Logic_Var;
Logic_Ctx_9 : Internal_Logic_Context_Access;
Bind_Result_9 : Logic_Equation;
Dyn_Var_Bind_Result_9 : Logic_Equation;
And_Pred_8 : Logic_Equation;
Fld_42 : Logic_Var;
Fld_43 : Logic_Equation;
Fld_44 : Logic_Equation;
And_Pred_9 : Logic_Equation;
Fld_45 : Bare_Op;
Is_A : Boolean;
If_Result : Logic_Equation;
Fld_46 : Bare_Op;
Is_A_1 : Boolean;
If_Result_1 : Logic_Equation;
Fld_47 : Logic_Var;
Pred : Logic_Equation;
Fld_48 : Logic_Var;
Fld_49 : Logic_Var;
Logic_Ctx_10 : Internal_Logic_Context_Access;
Bind_Result_10 : Logic_Equation;
And_Pred_10 : Logic_Equation;
Bound_Logic_Context_10 : Internal_Logic_Context;
Fld_50 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Logic_Ctx_11 : Internal_Logic_Context_Access;
Bind_Result_11 : Logic_Equation;
Dyn_Var_Bind_Result_10 : Logic_Equation;
Or_Pred_2 : Logic_Equation;
And_Pred_11 : Logic_Equation;
Fld_51 : Bare_Expr;
Fld_52 : Logic_Equation;
Fld_53 : Bare_Expr;
Fld_54 : Logic_Equation;
And_Pred_12 : Logic_Equation;
And_Pred_13 : Logic_Equation;
            procedure Finalizer_Scope_1132 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Dyn_Var_Bind_Result_2);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (Dyn_Var_Bind_Result_3);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (Dyn_Var_Bind_Result_4);
                     Dec_Ref (Bind_Result_5);
                     Dec_Ref (Dyn_Var_Bind_Result_5);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_25);
                     Dec_Ref (Fld_26);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Or_Pred_1);
                     Dec_Ref (Bind_Result_6);
                     Dec_Ref (Dyn_Var_Bind_Result_6);
                     Dec_Ref (Bind_Result_7);
                     Dec_Ref (Dyn_Var_Bind_Result_7);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Fld_34);
                     Dec_Ref (Fld_35);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (Bind_Result_8);
                     Dec_Ref (Dyn_Var_Bind_Result_8);
                     Dec_Ref (Bind_Result_9);
                     Dec_Ref (Dyn_Var_Bind_Result_9);
                     Dec_Ref (And_Pred_8);
                     Dec_Ref (Fld_43);
                     Dec_Ref (Fld_44);
                     Dec_Ref (And_Pred_9);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result_10);
                     Dec_Ref (And_Pred_10);
                     Dec_Ref (Bind_Result_11);
                     Dec_Ref (Dyn_Var_Bind_Result_10);
                     Dec_Ref (Or_Pred_2);
                     Dec_Ref (And_Pred_11);
                     Dec_Ref (Fld_52);
                     Dec_Ref (Fld_54);
                     Dec_Ref (And_Pred_12);
                     Dec_Ref (And_Pred_13);
            end Finalizer_Scope_1132;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8202 '<LogicBinaryOp And at nodes.lkt:14953:9>' And_Pred_13 ada/nodes.lkt:14953
--# expr-start 8196 '<LogicBinaryOp And at nodes.lkt:14954:13>' And_Pred_11 ada/nodes.lkt:14954
--# expr-start 8185 '<If at nodes.lkt:14956:17>' If_Result_1 ada/nodes.lkt:14956
--# expr-start 8104 '<IsA Op.Mult, Op.Div at nodes.lkt:14956:20>' Is_A_1 ada/nodes.lkt:14956
--# expr-start 8103 '<FieldAccess for op at nodes.lkt:14956:20>' Fld_46 ada/nodes.lkt:14956
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_46 := Self.Bin_Op_F_Op;
--# expr-done 8103
Is_A_1 := Fld_46 /= null 
and then Fld_46.Kind in Ada_Op_Mult_Range | Ada_Op_Div_Range; 
--# expr-done 8104
if Is_A_1 then
   --# expr-start 8151 '<LogicBinaryOp Or at nodes.lkt:14958:21>' Or_Pred_1 ada/nodes.lkt:14958
--# expr-start 8135 '<LogicBinaryOp Or at nodes.lkt:14958:21>' Or_Pred ada/nodes.lkt:14958
--# expr-start 8119 '<LogicBinaryOp And at nodes.lkt:14960:25>' And_Pred_1 ada/nodes.lkt:14960
--# expr-start 8115 '<LogicBinaryOp And at nodes.lkt:14961:29>' And_Pred ada/nodes.lkt:14961
--# expr-start 8109 '<bind at nodes.lkt:14962:33>' Dyn_Var_Bind_Result ada/nodes.lkt:14962
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 8108 '<Bind at nodes.lkt:14963:33>' Bind_Result ada/nodes.lkt:14963
--# expr-start 8105 '<FieldAccess for type_var at nodes.lkt:14963:33>' Fld ada/nodes.lkt:14963
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8105
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 8107 '<FieldAccess for expected_type_var at nodes.lkt:14964:37>' Fld_2 ada/nodes.lkt:14964
--# expr-start 8106 '<FieldAccess for left at nodes.lkt:14964:37>' Fld_1 ada/nodes.lkt:14964
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Bin_Op_F_Left;
--# expr-done 8106
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_1);
--# expr-done 8107
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result := Solver.Create_Unify (Fld, Fld_2, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14963:33") else null)); 
--# expr-done 8108
Dyn_Var_Bind_Result := Bind_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8109
--# expr-start 8114 '<bind at nodes.lkt:14967:33>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:14967
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 8113 '<Bind at nodes.lkt:14968:33>' Bind_Result_1 ada/nodes.lkt:14968
--# expr-start 8110 '<FieldAccess for type_var at nodes.lkt:14968:33>' Fld_3 ada/nodes.lkt:14968
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8110
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 8112 '<FieldAccess for expected_type_var at nodes.lkt:14969:37>' Fld_5 ada/nodes.lkt:14969
--# expr-start 8111 '<FieldAccess for right at nodes.lkt:14969:37>' Fld_4 ada/nodes.lkt:14969
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Bin_Op_F_Right;
--# expr-done 8111
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_4);
--# expr-done 8112
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Logic_Ctx_1 := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result_1 := Solver.Create_Unify (Fld_3, Fld_5, Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14968:33") else null)); 
--# expr-done 8113
Dyn_Var_Bind_Result_1 := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 8114
And_Pred := Create_And (Dyn_Var_Bind_Result, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14961:29") else null)); 
--# expr-done 8115
--# expr-start 8118 '<FieldAccess for use_expected_type_or at nodes.lkt:14972:30>' Fld_8 ada/nodes.lkt:14972
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8117 '<FieldAccess for infer_from_either_operands at nodes.lkt:14973:29>' Fld_7 ada/nodes.lkt:14973
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8116 '<FieldAccess for type_var at nodes.lkt:14973:61>' Fld_6 ada/nodes.lkt:14973
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8116
--# property-call-start BinOp.infer_from_either_operands
Fld_7 := Libadalang.Implementation.Bin_Op_P_Infer_From_Either_Operands (Node => Ent.Node, Dest_Var => Fld_6, Origin => Origin, Logic_Context => Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 8117
--# property-call-start BinOp.use_expected_type_or
Fld_8 := Libadalang.Implementation.Bin_Op_P_Use_Expected_Type_Or (Node => Self, Eq => Fld_7);
--# end
--# expr-done 8118
And_Pred_1 := Create_And (And_Pred, Fld_8, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14960:25") else null)); 
--# expr-done 8119
--# expr-start 8134 '<LogicBinaryOp And at nodes.lkt:14978:25>' And_Pred_3 ada/nodes.lkt:14978
--# expr-start 8130 '<LogicBinaryOp And at nodes.lkt:14979:29>' And_Pred_2 ada/nodes.lkt:14979
--# expr-start 8124 '<bind at nodes.lkt:14980:33>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:14980
Bound_Logic_Context_2 := No_Logic_Context; 
--# expr-start 8123 '<Bind at nodes.lkt:14981:33>' Bind_Result_2 ada/nodes.lkt:14981
--# expr-start 8121 '<FieldAccess for expected_type_var at nodes.lkt:14981:33>' Fld_10 ada/nodes.lkt:14981
--# expr-start 8120 '<FieldAccess for left at nodes.lkt:14981:33>' Fld_9 ada/nodes.lkt:14981
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.Bin_Op_F_Left;
--# expr-done 8120
      if Fld_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_9);
--# expr-done 8121
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
--# expr-start 8122 '<FieldAccess for int_type at nodes.lkt:14982:36>' Fld_11 ada/nodes.lkt:14982
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_11 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 8122
      Cast_Result := Create_Internal_Entity
        (Node => Fld_11.Node,
         Info => Fld_11.Info);
Logic_Ctx_2 := Allocate_Logic_Context (Bound_Logic_Context_2); 
Bind_Result_2 := Solver.Create_Assign (Fld_10, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14981:33") else null)); 
--# expr-done 8123
Dyn_Var_Bind_Result_2 := Bind_Result_2; Inc_Ref (Dyn_Var_Bind_Result_2);
--# expr-done 8124
--# expr-start 8129 '<bind at nodes.lkt:14985:33>' Dyn_Var_Bind_Result_3 ada/nodes.lkt:14985
Bound_Logic_Context_3 := No_Logic_Context; 
--# expr-start 8128 '<Bind at nodes.lkt:14986:33>' Bind_Result_3 ada/nodes.lkt:14986
--# expr-start 8126 '<FieldAccess for expected_type_var at nodes.lkt:14986:33>' Fld_13 ada/nodes.lkt:14986
--# expr-start 8125 '<FieldAccess for right at nodes.lkt:14986:33>' Fld_12 ada/nodes.lkt:14986
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Self.Bin_Op_F_Right;
--# expr-done 8125
      if Fld_12 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_12);
--# expr-done 8126
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
--# expr-start 8127 '<FieldAccess for type_var at nodes.lkt:14987:37>' Fld_14 ada/nodes.lkt:14987
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8127
Fld_14.Value := No_Entity;
Entity_Vars.Reset (Fld_14);
Logic_Ctx_3 := Allocate_Logic_Context (Bound_Logic_Context_3); 
Bind_Result_3 := Solver.Create_Unify (Fld_13, Fld_14, Logic_Ctx_3, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14986:33") else null)); 
--# expr-done 8128
Dyn_Var_Bind_Result_3 := Bind_Result_3; Inc_Ref (Dyn_Var_Bind_Result_3);
--# expr-done 8129
And_Pred_2 := Create_And (Dyn_Var_Bind_Result_2, Dyn_Var_Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14979:29") else null)); 
--# expr-done 8130
--# expr-start 8133 '<FieldAccess for use_expected_type_or at nodes.lkt:14990:30>' Fld_17 ada/nodes.lkt:14990
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8132 '<FieldAccess for infer_from_right_operand at nodes.lkt:14991:29>' Fld_16 ada/nodes.lkt:14991
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8131 '<FieldAccess for type_var at nodes.lkt:14991:59>' Fld_15 ada/nodes.lkt:14991
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8131
--# property-call-start BinOp.infer_from_right_operand
Fld_16 := Libadalang.Implementation.Bin_Op_P_Infer_From_Right_Operand (Node => Ent.Node, Dest_Var => Fld_15, Origin => Origin, Logic_Context => Logic_Context);
--# end
--# expr-done 8132
--# property-call-start BinOp.use_expected_type_or
Fld_17 := Libadalang.Implementation.Bin_Op_P_Use_Expected_Type_Or (Node => Self, Eq => Fld_16);
--# end
--# expr-done 8133
And_Pred_3 := Create_And (And_Pred_2, Fld_17, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14978:25") else null)); 
--# expr-done 8134
Or_Pred := Create_Or (And_Pred_1, And_Pred_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14958:21") else null)); 
--# expr-done 8135
--# expr-start 8150 '<LogicBinaryOp And at nodes.lkt:14996:25>' And_Pred_5 ada/nodes.lkt:14996
--# expr-start 8146 '<LogicBinaryOp And at nodes.lkt:14997:29>' And_Pred_4 ada/nodes.lkt:14997
--# expr-start 8140 '<bind at nodes.lkt:14998:33>' Dyn_Var_Bind_Result_4 ada/nodes.lkt:14998
Bound_Logic_Context_4 := No_Logic_Context; 
--# expr-start 8139 '<Bind at nodes.lkt:14999:33>' Bind_Result_4 ada/nodes.lkt:14999
--# expr-start 8137 '<FieldAccess for expected_type_var at nodes.lkt:14999:33>' Fld_19 ada/nodes.lkt:14999
--# expr-start 8136 '<FieldAccess for right at nodes.lkt:14999:33>' Fld_18 ada/nodes.lkt:14999
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Self.Bin_Op_F_Right;
--# expr-done 8136
      if Fld_18 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_18);
--# expr-done 8137
Fld_19.Value := No_Entity;
Entity_Vars.Reset (Fld_19);
--# expr-start 8138 '<FieldAccess for int_type at nodes.lkt:15000:36>' Fld_20 ada/nodes.lkt:15000
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_20 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 8138
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_20.Node,
         Info => Fld_20.Info);
Logic_Ctx_4 := Allocate_Logic_Context (Bound_Logic_Context_4); 
Bind_Result_4 := Solver.Create_Assign (Fld_19, Cast_Result_1, Solver_Ifc.No_Converter, Logic_Ctx_4, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14999:33") else null)); 
--# expr-done 8139
Dyn_Var_Bind_Result_4 := Bind_Result_4; Inc_Ref (Dyn_Var_Bind_Result_4);
--# expr-done 8140
--# expr-start 8145 '<bind at nodes.lkt:15003:33>' Dyn_Var_Bind_Result_5 ada/nodes.lkt:15003
Bound_Logic_Context_5 := No_Logic_Context; 
--# expr-start 8144 '<Bind at nodes.lkt:15004:33>' Bind_Result_5 ada/nodes.lkt:15004
--# expr-start 8142 '<FieldAccess for expected_type_var at nodes.lkt:15004:33>' Fld_22 ada/nodes.lkt:15004
--# expr-start 8141 '<FieldAccess for left at nodes.lkt:15004:33>' Fld_21 ada/nodes.lkt:15004
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Self.Bin_Op_F_Left;
--# expr-done 8141
      if Fld_21 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_21);
--# expr-done 8142
Fld_22.Value := No_Entity;
Entity_Vars.Reset (Fld_22);
--# expr-start 8143 '<FieldAccess for type_var at nodes.lkt:15005:37>' Fld_23 ada/nodes.lkt:15005
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8143
Fld_23.Value := No_Entity;
Entity_Vars.Reset (Fld_23);
Logic_Ctx_5 := Allocate_Logic_Context (Bound_Logic_Context_5); 
Bind_Result_5 := Solver.Create_Unify (Fld_22, Fld_23, Logic_Ctx_5, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15004:33") else null)); 
--# expr-done 8144
Dyn_Var_Bind_Result_5 := Bind_Result_5; Inc_Ref (Dyn_Var_Bind_Result_5);
--# expr-done 8145
And_Pred_4 := Create_And (Dyn_Var_Bind_Result_4, Dyn_Var_Bind_Result_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14997:29") else null)); 
--# expr-done 8146
--# expr-start 8149 '<FieldAccess for use_expected_type_or at nodes.lkt:15008:30>' Fld_26 ada/nodes.lkt:15008
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8148 '<FieldAccess for infer_from_left_operand at nodes.lkt:15009:29>' Fld_25 ada/nodes.lkt:15009
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8147 '<FieldAccess for type_var at nodes.lkt:15009:58>' Fld_24 ada/nodes.lkt:15009
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8147
--# property-call-start BinOp.infer_from_left_operand
Fld_25 := Libadalang.Implementation.Bin_Op_P_Infer_From_Left_Operand (Node => Ent.Node, Dest_Var => Fld_24, Origin => Origin, Logic_Context => Logic_Context);
--# end
--# expr-done 8148
--# property-call-start BinOp.use_expected_type_or
Fld_26 := Libadalang.Implementation.Bin_Op_P_Use_Expected_Type_Or (Node => Self, Eq => Fld_25);
--# end
--# expr-done 8149
And_Pred_5 := Create_And (And_Pred_4, Fld_26, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14996:25") else null)); 
--# expr-done 8150
Or_Pred_1 := Create_Or (Or_Pred, And_Pred_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14958:21") else null)); 
--# expr-done 8151
   If_Result_1 := Or_Pred_1;
else
   --# expr-start 8184 '<If at nodes.lkt:14956:17>' If_Result ada/nodes.lkt:14956
--# expr-start 8153 '<IsA Op.Pow at nodes.lkt:15015:22>' Is_A ada/nodes.lkt:15015
--# expr-start 8152 '<FieldAccess for op at nodes.lkt:15015:22>' Fld_45 ada/nodes.lkt:15015
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_45 := Self.Bin_Op_F_Op;
--# expr-done 8152
Is_A := Fld_45 /= null 
and then Fld_45.Kind in Ada_Op_Pow_Range; 
--# expr-done 8153
if Is_A then
   --# expr-start 8168 '<LogicBinaryOp And at nodes.lkt:15017:21>' And_Pred_7 ada/nodes.lkt:15017
--# expr-start 8164 '<LogicBinaryOp And at nodes.lkt:15018:25>' And_Pred_6 ada/nodes.lkt:15018
--# expr-start 8158 '<bind at nodes.lkt:15019:29>' Dyn_Var_Bind_Result_6 ada/nodes.lkt:15019
Bound_Logic_Context_6 := No_Logic_Context; 
--# expr-start 8157 '<Bind at nodes.lkt:15020:29>' Bind_Result_6 ada/nodes.lkt:15020
--# expr-start 8155 '<FieldAccess for expected_type_var at nodes.lkt:15020:29>' Fld_28 ada/nodes.lkt:15020
--# expr-start 8154 '<FieldAccess for right at nodes.lkt:15020:29>' Fld_27 ada/nodes.lkt:15020
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Self.Bin_Op_F_Right;
--# expr-done 8154
      if Fld_27 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_27);
--# expr-done 8155
Fld_28.Value := No_Entity;
Entity_Vars.Reset (Fld_28);
--# expr-start 8156 '<FieldAccess for int_type at nodes.lkt:15020:63>' Fld_29 ada/nodes.lkt:15020
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_29 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 8156
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_29.Node,
         Info => Fld_29.Info);
Logic_Ctx_6 := Allocate_Logic_Context (Bound_Logic_Context_6); 
Bind_Result_6 := Solver.Create_Assign (Fld_28, Cast_Result_2, Solver_Ifc.No_Converter, Logic_Ctx_6, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15020:29") else null)); 
--# expr-done 8157
Dyn_Var_Bind_Result_6 := Bind_Result_6; Inc_Ref (Dyn_Var_Bind_Result_6);
--# expr-done 8158
--# expr-start 8163 '<bind at nodes.lkt:15023:29>' Dyn_Var_Bind_Result_7 ada/nodes.lkt:15023
Bound_Logic_Context_7 := No_Logic_Context; 
--# expr-start 8162 '<Bind at nodes.lkt:15024:29>' Bind_Result_7 ada/nodes.lkt:15024
--# expr-start 8160 '<FieldAccess for expected_type_var at nodes.lkt:15024:29>' Fld_31 ada/nodes.lkt:15024
--# expr-start 8159 '<FieldAccess for left at nodes.lkt:15024:29>' Fld_30 ada/nodes.lkt:15024
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Self.Bin_Op_F_Left;
--# expr-done 8159
      if Fld_30 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_30);
--# expr-done 8160
Fld_31.Value := No_Entity;
Entity_Vars.Reset (Fld_31);
--# expr-start 8161 '<FieldAccess for type_var at nodes.lkt:15024:63>' Fld_32 ada/nodes.lkt:15024
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8161
Fld_32.Value := No_Entity;
Entity_Vars.Reset (Fld_32);
Logic_Ctx_7 := Allocate_Logic_Context (Bound_Logic_Context_7); 
Bind_Result_7 := Solver.Create_Unify (Fld_31, Fld_32, Logic_Ctx_7, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15024:29") else null)); 
--# expr-done 8162
Dyn_Var_Bind_Result_7 := Bind_Result_7; Inc_Ref (Dyn_Var_Bind_Result_7);
--# expr-done 8163
And_Pred_6 := Create_And (Dyn_Var_Bind_Result_6, Dyn_Var_Bind_Result_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15018:25") else null)); 
--# expr-done 8164
--# expr-start 8167 '<FieldAccess for use_expected_type_or at nodes.lkt:15027:26>' Fld_35 ada/nodes.lkt:15027
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8166 '<FieldAccess for infer_from_left_operand at nodes.lkt:15028:25>' Fld_34 ada/nodes.lkt:15028
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8165 '<FieldAccess for type_var at nodes.lkt:15028:54>' Fld_33 ada/nodes.lkt:15028
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8165
--# property-call-start BinOp.infer_from_left_operand
Fld_34 := Libadalang.Implementation.Bin_Op_P_Infer_From_Left_Operand (Node => Ent.Node, Dest_Var => Fld_33, Origin => Origin, Logic_Context => Logic_Context);
--# end
--# expr-done 8166
--# property-call-start BinOp.use_expected_type_or
Fld_35 := Libadalang.Implementation.Bin_Op_P_Use_Expected_Type_Or (Node => Self, Eq => Fld_34);
--# end
--# expr-done 8167
And_Pred_7 := Create_And (And_Pred_6, Fld_35, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15017:21") else null)); 
--# expr-done 8168
   If_Result := And_Pred_7;
else
   --# expr-start 8183 '<LogicBinaryOp And at nodes.lkt:15033:21>' And_Pred_9 ada/nodes.lkt:15033
--# expr-start 8179 '<LogicBinaryOp And at nodes.lkt:15034:25>' And_Pred_8 ada/nodes.lkt:15034
--# expr-start 8173 '<bind at nodes.lkt:15035:29>' Dyn_Var_Bind_Result_8 ada/nodes.lkt:15035
Bound_Logic_Context_8 := No_Logic_Context; 
--# expr-start 8172 '<Bind at nodes.lkt:15036:29>' Bind_Result_8 ada/nodes.lkt:15036
--# expr-start 8169 '<FieldAccess for type_var at nodes.lkt:15036:29>' Fld_36 ada/nodes.lkt:15036
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_36 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8169
Fld_36.Value := No_Entity;
Entity_Vars.Reset (Fld_36);
--# expr-start 8171 '<FieldAccess for expected_type_var at nodes.lkt:15036:49>' Fld_38 ada/nodes.lkt:15036
--# expr-start 8170 '<FieldAccess for left at nodes.lkt:15036:49>' Fld_37 ada/nodes.lkt:15036
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_37 := Self.Bin_Op_F_Left;
--# expr-done 8170
      if Fld_37 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_38 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_37);
--# expr-done 8171
Fld_38.Value := No_Entity;
Entity_Vars.Reset (Fld_38);
Logic_Ctx_8 := Allocate_Logic_Context (Bound_Logic_Context_8); 
Bind_Result_8 := Solver.Create_Unify (Fld_36, Fld_38, Logic_Ctx_8, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15036:29") else null)); 
--# expr-done 8172
Dyn_Var_Bind_Result_8 := Bind_Result_8; Inc_Ref (Dyn_Var_Bind_Result_8);
--# expr-done 8173
--# expr-start 8178 '<bind at nodes.lkt:15039:29>' Dyn_Var_Bind_Result_9 ada/nodes.lkt:15039
Bound_Logic_Context_9 := No_Logic_Context; 
--# expr-start 8177 '<Bind at nodes.lkt:15040:29>' Bind_Result_9 ada/nodes.lkt:15040
--# expr-start 8174 '<FieldAccess for type_var at nodes.lkt:15040:29>' Fld_39 ada/nodes.lkt:15040
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_39 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8174
Fld_39.Value := No_Entity;
Entity_Vars.Reset (Fld_39);
--# expr-start 8176 '<FieldAccess for expected_type_var at nodes.lkt:15040:49>' Fld_41 ada/nodes.lkt:15040
--# expr-start 8175 '<FieldAccess for right at nodes.lkt:15040:49>' Fld_40 ada/nodes.lkt:15040
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_40 := Self.Bin_Op_F_Right;
--# expr-done 8175
      if Fld_40 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_41 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_40);
--# expr-done 8176
Fld_41.Value := No_Entity;
Entity_Vars.Reset (Fld_41);
Logic_Ctx_9 := Allocate_Logic_Context (Bound_Logic_Context_9); 
Bind_Result_9 := Solver.Create_Unify (Fld_39, Fld_41, Logic_Ctx_9, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15040:29") else null)); 
--# expr-done 8177
Dyn_Var_Bind_Result_9 := Bind_Result_9; Inc_Ref (Dyn_Var_Bind_Result_9);
--# expr-done 8178
And_Pred_8 := Create_And (Dyn_Var_Bind_Result_8, Dyn_Var_Bind_Result_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15034:25") else null)); 
--# expr-done 8179
--# expr-start 8182 '<FieldAccess for use_expected_type_or at nodes.lkt:15043:26>' Fld_44 ada/nodes.lkt:15043
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8181 '<FieldAccess for infer_from_either_operands at nodes.lkt:15044:25>' Fld_43 ada/nodes.lkt:15044
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8180 '<FieldAccess for type_var at nodes.lkt:15044:57>' Fld_42 ada/nodes.lkt:15044
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_42 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8180
--# property-call-start BinOp.infer_from_either_operands
Fld_43 := Libadalang.Implementation.Bin_Op_P_Infer_From_Either_Operands (Node => Ent.Node, Dest_Var => Fld_42, Origin => Origin, Logic_Context => Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 8181
--# property-call-start BinOp.use_expected_type_or
Fld_44 := Libadalang.Implementation.Bin_Op_P_Use_Expected_Type_Or (Node => Self, Eq => Fld_43);
--# end
--# expr-done 8182
And_Pred_9 := Create_And (And_Pred_8, Fld_44, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15033:21") else null)); 
--# expr-done 8183
   If_Result := And_Pred_9;
end if;
      Inc_Ref (If_Result);
--# expr-done 8184
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 8185
--# expr-start 8195 '<LogicBinaryOp Or at nodes.lkt:15048:17>' Or_Pred_2 ada/nodes.lkt:15048
--# expr-start 8191 '<LogicBinaryOp And at nodes.lkt:15058:21>' And_Pred_10 ada/nodes.lkt:15058
--# expr-start 8187 '<Predicate on AdaNode.is_not_null at nodes.lkt:15058:21>' Pred ada/nodes.lkt:15058
--# expr-start 8186 '<FieldAccess for expected_type_var at nodes.lkt:15058:42>' Fld_47 ada/nodes.lkt:15058
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_47 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8186
Fld_47.Value := No_Entity;
Entity_Vars.Reset (Fld_47);
Pred := Solver.Create_Predicate (Fld_47, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 8187
--# expr-start 8190 '<NPropagate at nodes.lkt:15059:26>' Bind_Result_10 ada/nodes.lkt:15059
--# expr-start 8188 '<FieldAccess for expected_type_var at nodes.lkt:15061:25>' Fld_49 ada/nodes.lkt:15061
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_49 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8188
Fld_49.Value := No_Entity;
Entity_Vars.Reset (Fld_49);
--# expr-start 8189 '<FieldAccess for type_var at nodes.lkt:15059:26>' Fld_48 ada/nodes.lkt:15059
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_48 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8189
Fld_48.Value := No_Entity;
Entity_Vars.Reset (Fld_48);
Logic_Ctx_10 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_10 := Solver.Create_Propagate (Fld_49, Fld_48, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_10, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15059:26") else null)); 
--# expr-done 8190
And_Pred_10 := Create_And (Pred, Bind_Result_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15058:21") else null)); 
--# expr-done 8191
--# expr-start 8194 '<bind at nodes.lkt:15071:25>' Dyn_Var_Bind_Result_10 ada/nodes.lkt:15071
Bound_Logic_Context_10 := No_Logic_Context; 
--# expr-start 8193 '<Bind at nodes.lkt:15072:25>' Bind_Result_11 ada/nodes.lkt:15072
--# expr-start 8192 '<FieldAccess for expected_type_var at nodes.lkt:15072:25>' Fld_50 ada/nodes.lkt:15072
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_50 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8192
Fld_50.Value := No_Entity;
Entity_Vars.Reset (Fld_50);
Cast_Expr := No_Entity_Base_Type_Decl; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Logic_Ctx_11 := Allocate_Logic_Context (Bound_Logic_Context_10); 
Bind_Result_11 := Solver.Create_Assign (Fld_50, Cast_Result_3, Solver_Ifc.No_Converter, Logic_Ctx_11, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15072:25") else null)); 
--# expr-done 8193
Dyn_Var_Bind_Result_10 := Bind_Result_11; Inc_Ref (Dyn_Var_Bind_Result_10);
--# expr-done 8194
Or_Pred_2 := Create_Or (And_Pred_10, Dyn_Var_Bind_Result_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15048:17") else null)); 
--# expr-done 8195
And_Pred_11 := Create_And (If_Result_1, Or_Pred_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14954:13") else null)); 
--# expr-done 8196
--# expr-start 8201 '<LogicBinaryOp And at nodes.lkt:15078:13>' And_Pred_12 ada/nodes.lkt:15078
--# expr-start 8198 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15078:13>' Fld_52 ada/nodes.lkt:15078
--# expr-start 8197 '<FieldAccess for left at nodes.lkt:15078:13>' Fld_51 ada/nodes.lkt:15078
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_51 := Self.Bin_Op_F_Left;
--# expr-done 8197
      if Fld_51 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_52 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_51, Origin => Origin);
--# end
--# expr-done 8198
--# expr-start 8200 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15079:18>' Fld_54 ada/nodes.lkt:15079
--# expr-start 8199 '<FieldAccess for right at nodes.lkt:15079:18>' Fld_53 ada/nodes.lkt:15079
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_53 := Self.Bin_Op_F_Right;
--# expr-done 8199
      if Fld_53 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_54 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_53, Origin => Origin);
--# end
--# expr-done 8200
And_Pred_12 := Create_And (Fld_52, Fld_54, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15078:13") else null)); 
--# expr-done 8201
And_Pred_13 := Create_And (And_Pred_11, And_Pred_12, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:14953:9") else null)); 
--# expr-done 8202
         Property_Result := And_Pred_13;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1132;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1132;
            raise;
      end;
   return Property_Result;
end Bin_Op_P_No_Overload_Equation;
--# end
   --
   --  Primitives for Bare_Relation_Op
   --
      procedure Initialize_Fields_For_Relation_Op
        (Self : Bare_Relation_Op
         ; Bin_Op_F_Left : Bare_Expr
         ; Bin_Op_F_Op : Bare_Op
         ; Bin_Op_F_Right : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Bin_Op
              (Self, Bin_Op_F_Left, Bin_Op_F_Op, Bin_Op_F_Right);
      end Initialize_Fields_For_Relation_Op;
--# property-start RelationOp.has_context_free_type ada/nodes.lkt:15086
pragma Warnings (Off, "is not referenced");
 function Relation_Op_P_Has_Context_Free_Type
  (Node : Bare_Relation_Op
  )
   return Boolean
is
   Self : Bare_Relation_Op  := Bare_Relation_Op (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Relation_Op_P_Has_Context_Free_Type;
--# end
--# property-start RelationOp.no_overload_equation ada/nodes.lkt:15089
pragma Warnings (Off, "is not referenced");
 function Relation_Op_P_No_Overload_Equation
  (Node : Bare_Relation_Op
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Relation_Op  := Bare_Relation_Op (Node);
     Ent : Internal_Entity_Relation_Op :=
       Internal_Entity_Relation_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1134 with Inline_Always;
      Bound_Logic_Context : Internal_Logic_Context;
Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Fld_4 : Bare_Expr;
Fld_5 : Logic_Var;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Bare_Expr;
Fld_7 : Logic_Var;
Fld_8 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_9 : Bare_Expr;
Fld_10 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_11 : Bare_Expr;
Fld_12 : Logic_Equation;
And_Pred_3 : Logic_Equation;
            procedure Finalizer_Scope_1134 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_8);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_10);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_12);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_1134;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8223 '<LogicBinaryOp And at nodes.lkt:15090:9>' And_Pred_3 ada/nodes.lkt:15090
--# expr-start 8220 '<LogicBinaryOp And at nodes.lkt:15091:13>' And_Pred_2 ada/nodes.lkt:15091
--# expr-start 8217 '<LogicBinaryOp And at nodes.lkt:15092:17>' And_Pred_1 ada/nodes.lkt:15092
--# expr-start 8213 '<LogicBinaryOp And at nodes.lkt:15093:21>' And_Pred ada/nodes.lkt:15093
--# expr-start 8206 '<bind at nodes.lkt:15094:25>' Dyn_Var_Bind_Result ada/nodes.lkt:15094
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 8205 '<Bind at nodes.lkt:15095:25>' Bind_Result ada/nodes.lkt:15095
--# expr-start 8203 '<FieldAccess for type_var at nodes.lkt:15095:25>' Fld ada/nodes.lkt:15095
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8203
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 8204 '<FieldAccess for bool_type at nodes.lkt:15095:44>' Fld_1 ada/nodes.lkt:15095
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 8204
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15095:25") else null)); 
--# expr-done 8205
Dyn_Var_Bind_Result := Bind_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8206
--# expr-start 8212 '<bind at nodes.lkt:15098:25>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:15098
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 8211 '<Bind at nodes.lkt:15099:25>' Bind_Result_1 ada/nodes.lkt:15099
--# expr-start 8208 '<FieldAccess for expected_type_var at nodes.lkt:15099:25>' Fld_3 ada/nodes.lkt:15099
--# expr-start 8207 '<FieldAccess for left at nodes.lkt:15099:25>' Fld_2 ada/nodes.lkt:15099
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Bin_Op_F_Left;
--# expr-done 8207
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2);
--# expr-done 8208
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 8210 '<FieldAccess for expected_type_var at nodes.lkt:15100:29>' Fld_5 ada/nodes.lkt:15100
--# expr-start 8209 '<FieldAccess for right at nodes.lkt:15100:29>' Fld_4 ada/nodes.lkt:15100
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Bin_Op_F_Right;
--# expr-done 8209
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_4);
--# expr-done 8210
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Logic_Ctx_1 := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result_1 := Solver.Create_Unify (Fld_3, Fld_5, Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15099:25") else null)); 
--# expr-done 8211
Dyn_Var_Bind_Result_1 := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 8212
And_Pred := Create_And (Dyn_Var_Bind_Result, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15093:21") else null)); 
--# expr-done 8213
--# expr-start 8216 '<FieldAccess for infer_from_either_operands at nodes.lkt:15103:22>' Fld_8 ada/nodes.lkt:15103
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8215 '<FieldAccess for expected_type_var at nodes.lkt:15104:21>' Fld_7 ada/nodes.lkt:15104
--# expr-start 8214 '<FieldAccess for left at nodes.lkt:15104:21>' Fld_6 ada/nodes.lkt:15104
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Bin_Op_F_Left;
--# expr-done 8214
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_6);
--# expr-done 8215
--# property-call-start BinOp.infer_from_either_operands
Fld_8 := Libadalang.Implementation.Bin_Op_P_Infer_From_Either_Operands (Node => Ent.Node, Dest_Var => Fld_7, Origin => Origin, Logic_Context => Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 8216
And_Pred_1 := Create_And (And_Pred, Fld_8, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15092:17") else null)); 
--# expr-done 8217
--# expr-start 8219 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15107:18>' Fld_10 ada/nodes.lkt:15107
--# expr-start 8218 '<FieldAccess for left at nodes.lkt:15107:18>' Fld_9 ada/nodes.lkt:15107
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.Bin_Op_F_Left;
--# expr-done 8218
      if Fld_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_10 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_9, Origin => Origin);
--# end
--# expr-done 8219
And_Pred_2 := Create_And (And_Pred_1, Fld_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15091:13") else null)); 
--# expr-done 8220
--# expr-start 8222 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15109:14>' Fld_12 ada/nodes.lkt:15109
--# expr-start 8221 '<FieldAccess for right at nodes.lkt:15109:14>' Fld_11 ada/nodes.lkt:15109
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Bin_Op_F_Right;
--# expr-done 8221
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_12 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_11, Origin => Origin);
--# end
--# expr-done 8222
And_Pred_3 := Create_And (And_Pred_2, Fld_12, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15090:9") else null)); 
--# expr-done 8223
         Property_Result := And_Pred_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1134;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1134;
            raise;
      end;
   return Property_Result;
end Relation_Op_P_No_Overload_Equation;
--# end
   --
   --  Primitives for Bare_Box_Expr
   --
      procedure Initialize_Fields_For_Box_Expr
        (Self : Bare_Box_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
      end Initialize_Fields_For_Box_Expr;
--# property-start BoxExpr.xref_equation ada/nodes.lkt:15118
pragma Warnings (Off, "is not referenced");
 function Box_Expr_P_Xref_Equation
  (Node : Bare_Box_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Box_Expr  := Bare_Box_Expr (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1135 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Logic_Var;
Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_1135 is
            begin
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_1135;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8226 '<Bind at nodes.lkt:15119:9>' Bind_Result ada/nodes.lkt:15119
--# expr-start 8224 '<FieldAccess for type_var at nodes.lkt:15119:9>' Fld ada/nodes.lkt:15119
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8224
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 8225 '<FieldAccess for expected_type_var at nodes.lkt:15119:29>' Fld_1 ada/nodes.lkt:15119
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8225
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Bind_Result := Solver.Create_Unify (Fld, Fld_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15119:9") else null)); 
--# expr-done 8226
         Property_Result := Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1135;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1135;
            raise;
      end;
   return Property_Result;
end Box_Expr_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Case_Expr_Alternative
   --
      procedure Initialize_Fields_For_Case_Expr_Alternative
        (Self : Bare_Case_Expr_Alternative
         ; Case_Expr_Alternative_F_Choices : Bare_Alternatives_List
         ; Case_Expr_Alternative_F_Expr : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Case_Expr_Alternative_F_Choices := Case_Expr_Alternative_F_Choices;
            Self.Case_Expr_Alternative_F_Expr := Case_Expr_Alternative_F_Expr;
      end Initialize_Fields_For_Case_Expr_Alternative;
   function Case_Expr_Alternative_F_Choices
     (Node : Bare_Case_Expr_Alternative) return Bare_Alternatives_List
   is
   begin
         return Node.Case_Expr_Alternative_F_Choices;
   end;
   function Case_Expr_Alternative_F_Expr
     (Node : Bare_Case_Expr_Alternative) return Bare_Expr
   is
   begin
         return Node.Case_Expr_Alternative_F_Expr;
   end;
   --
   --  Primitives for Bare_Concat_Op
   --
      procedure Initialize_Fields_For_Concat_Op
        (Self : Bare_Concat_Op
         ; Concat_Op_F_First_Operand : Bare_Expr
         ; Concat_Op_F_Other_Operands : Bare_Concat_Operand_List
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Concat_Op_F_First_Operand := Concat_Op_F_First_Operand;
            Self.Concat_Op_F_Other_Operands := Concat_Op_F_Other_Operands;
      end Initialize_Fields_For_Concat_Op;
   function Concat_Op_F_First_Operand
     (Node : Bare_Concat_Op) return Bare_Expr
   is
   begin
         return Node.Concat_Op_F_First_Operand;
   end;
   function Concat_Op_F_Other_Operands
     (Node : Bare_Concat_Op) return Bare_Concat_Operand_List
   is
   begin
         return Node.Concat_Op_F_Other_Operands;
   end;
--# property-start ConcatOp.operands ada/nodes.lkt:15166
pragma Warnings (Off, "is not referenced");
 function Concat_Op_P_Operands
  (Node : Bare_Concat_Op
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr_Array_Access
is
   Self : Bare_Concat_Op  := Bare_Concat_Op (Node);
     Ent : Internal_Entity_Concat_Op :=
       Internal_Entity_Concat_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_1136 with Inline_Always;
      Fld : Internal_Entity_Expr;
Array_Lit : Internal_Entity_Expr_Array_Access;
Fld_1 : Internal_Entity_Concat_Operand_List;
Fld_2 : Bare_Concat_Operand_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Concat_Operand;
Bare_Item_0 : Bare_Concat_Operand;
Fld_4 : Internal_Entity_Expr;
As_Entity : Internal_Entity_Concat_Operand;
Is_Null : Boolean;
If_Result : Internal_Entity_Concat_Operand;
Map_Result : Internal_Entity_Expr_Array_Access;
Concat_Result : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_1136 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_1136;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8228 '<ArrayLiteral at nodes.lkt:15167:9>' Array_Lit ada/nodes.lkt:15167
--# expr-start 8227 '<FieldAccess for first_operand at nodes.lkt:15167:10>' Fld ada/nodes.lkt:15167
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Concat_Op_F_First_Operand, Info => Ent.Info);
--# expr-done 8227
Array_Lit := Create_Internal_Entity_Expr_Array (Internal_Internal_Entity_Expr_Array'(1 => Fld)); 
--# expr-done 8228
--# expr-start 8231 '<Map at nodes.lkt:15167:32>' Map_Result ada/nodes.lkt:15167
   --# expr-start 8229 '<FieldAccess for other_operands at nodes.lkt:15167:32>' Fld_1 ada/nodes.lkt:15167
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Concat_Operand_List (Node => Ent.Node.Concat_Op_F_Other_Operands, Info => Ent.Info);
--# expr-done 8229
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Internal_Entity_Expr_Array (0);
      else
      declare
         Collection : constant Bare_Concat_Operand_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Concat_Operand;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind oo Item_0
      --# expr-start 8230 '<FieldAccess for operand at nodes.lkt:15167:64>' Fld_4 ada/nodes.lkt:15167
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Item_0.Node.Concat_Operand_F_Operand, Info => Item_0.Info);
--# expr-done 8230
         declare
            Item_To_Append : constant Internal_Entity_Expr := Fld_4;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8231
Concat_Result := Concat (Array_Lit, Map_Result); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1136;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1136;
            raise;
      end;
   return Property_Result;
end Concat_Op_P_Operands;
--# end
--# property-start ConcatOp.has_context_free_type ada/nodes.lkt:15169
pragma Warnings (Off, "is not referenced");
 function Concat_Op_P_Has_Context_Free_Type
  (Node : Bare_Concat_Op
  )
   return Boolean
is
   Self : Bare_Concat_Op  := Bare_Concat_Op (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Concat_Op_P_Has_Context_Free_Type;
--# end
--# property-start ConcatOp.xref_equation ada/nodes.lkt:15172
pragma Warnings (Off, "is not referenced");
 function Concat_Op_P_Xref_Equation
  (Node : Bare_Concat_Op
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Concat_Op  := Bare_Concat_Op (Node);
     Ent : Internal_Entity_Concat_Op :=
       Internal_Entity_Concat_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1138 with Inline_Always;
            procedure Finalizer_Scope_3056 with Inline_Always;
            procedure Finalizer_Scope_3057 with Inline_Always;
            procedure Finalizer_Scope_3058 with Inline_Always;
      Local_Operand_Count : Integer;
Local_Last_Operand : Bare_Concat_Operand;
Local_Concat_Subprograms : Internal_Entity_Basic_Decl_Array_Access;
Local_Pos : Integer;
Local_Left : Internal_Entity_Expr;
Local_Concat_Operand : Internal_Entity_Concat_Operand;
Local_Right : Internal_Entity_Expr;
Local_Spec : Internal_Entity_Base_Subp_Spec;
Fld : Bare_Concat_Operand_List;
Len : Integer;
Arith_Result : Integer;
Fld_1 : Bare_Concat_Operand_List;
Get_Result : Bare_Concat_Operand;
Fld_2 : Internal_Entity_Concat_Operand_List;
Fld_3 : Bare_Concat_Operand_List;
Fld_4 : Internal_Entity_Info;
Get_Result_1 : Bare_Concat_Operand;
As_Entity : Internal_Entity_Concat_Operand;
Is_Null : Boolean;
If_Result : Internal_Entity_Concat_Operand;
Fld_5 : Internal_Entity_Op_Concat;
Fld_6 : Internal_Entity_Basic_Decl_Array_Access;
Fld_7 : Internal_Entity_Expr;
Fld_8 : Logic_Equation;
Fld_9 : Internal_Entity_Concat_Operand_List;
Fld_10 : Bare_Concat_Operand_List;
Fld_11 : Internal_Entity_Info;
Item_0 : Internal_Entity_Concat_Operand;
Bare_Item_0 : Bare_Concat_Operand;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Logic_Equation;
As_Entity_1 : Internal_Entity_Concat_Operand;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Concat_Operand;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred : Logic_Equation;
Fld_14 : Internal_Entity_Concat_Operand_List;
Fld_15 : Bare_Concat_Operand_List;
Fld_16 : Internal_Entity_Info;
Item_1 : Internal_Entity_Concat_Operand;
Bare_Item_1 : Bare_Concat_Operand;
Index_2 : Integer;
Arith_Result_1 : Integer;
Arith_Result_2 : Integer;
Arith_Result_3 : Integer;
Fld_17 : Internal_Entity_Concat_Operand_List;
Fld_18 : Bare_Concat_Operand_List;
Fld_19 : Internal_Entity_Info;
Get_Result_2 : Bare_Concat_Operand;
As_Entity_2 : Internal_Entity_Concat_Operand;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Concat_Operand;
Fld_20 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Concat_Operand;
Cast_Result : Internal_Entity_Expr;
Comp_Result : Boolean;
If_Result_3 : Internal_Entity_Expr;
Fld_21 : Internal_Entity_Concat_Operand_List;
Fld_22 : Bare_Concat_Operand_List;
Fld_23 : Internal_Entity_Info;
Get_Result_3 : Bare_Concat_Operand;
As_Entity_3 : Internal_Entity_Concat_Operand;
Is_Null_3 : Boolean;
If_Result_4 : Internal_Entity_Concat_Operand;
Fld_24 : Internal_Entity_Concat_Operand_List;
Fld_25 : Bare_Concat_Operand_List;
Fld_26 : Internal_Entity_Info;
Get_Result_4 : Bare_Concat_Operand;
As_Entity_4 : Internal_Entity_Concat_Operand;
Is_Null_4 : Boolean;
If_Result_5 : Internal_Entity_Concat_Operand;
Fld_27 : Internal_Entity_Expr;
Fld_28 : Logic_Equation;
Fld_29 : Internal_Entity_Base_Subp_Spec;
Fld_30 : Internal_Entity_Op_Concat;
Cast_Result_1 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity;
New_Struct : Internal_Logic_Context;
Bound_Logic_Context : Internal_Logic_Context;
Fld_31 : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_32 : Internal_Entity_Op_Concat;
Fld_33 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
Bound_Logic_Context_2 : Internal_Logic_Context;
Fld_34 : Internal_Entity_Op_Concat;
Fld_35 : Logic_Var;
Cast_Expr_3 : Internal_Entity_Base_Subp_Spec;
Cast_Result_4 : Internal_Entity;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Dyn_Var_Bind_Result_2 : Logic_Equation;
Let_Result : Logic_Equation;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
Or_Pred : Logic_Equation;
Let_Result_1 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
Let_Result_4 : Logic_Equation;
As_Entity_5 : Internal_Entity_Concat_Operand;
Is_Null_5 : Boolean;
If_Result_6 : Internal_Entity_Concat_Operand;
Map_Result_2 : Logic_Equation_Array_Access;
Logic_Boolean_Op_2 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_36 : Logic_Var;
Fld_37 : Logic_Var;
Bind_Result_2 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_38 : Logic_Var;
Fld_39 : Logic_Var;
Bind_Result_3 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Let_Result_5 : Logic_Equation;
Let_Result_6 : Logic_Equation;
Let_Result_7 : Logic_Equation;
            procedure Finalizer_Scope_1138 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Local_Concat_Subprograms);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Logic_Boolean_Op_2);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Let_Result_7);
            end Finalizer_Scope_1138;
            procedure Finalizer_Scope_3056 is
            begin
                     Dec_Ref (Fld_13);
            end Finalizer_Scope_3056;
            procedure Finalizer_Scope_3057 is
            begin
                     Dec_Ref (Fld_28);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_3057;
            procedure Finalizer_Scope_3058 is
            begin
                     Dec_Ref (Fld_31);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Dyn_Var_Bind_Result_2);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_3058;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8295 '<Let at nodes.lkt:15173:9>' Let_Result_7 ada/nodes.lkt:15173
--# scope-start
--# expr-start 8233 '<length at nodes.lkt:15173:29>' Len ada/nodes.lkt:15173
--# expr-start 8232 '<FieldAccess for other_operands at nodes.lkt:15173:29>' Fld ada/nodes.lkt:15173
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Concat_Op_F_Other_Operands;
--# expr-done 8232
Len := Length (Fld); 
--# expr-done 8233
Local_Operand_Count := Len; 
--# bind operand_count Local_Operand_Count
--# expr-start 8294 '<Let at nodes.lkt:15174:9>' Let_Result_6 ada/nodes.lkt:15174
--# scope-start
--# expr-start 8236 '<at at nodes.lkt:15174:28>' Get_Result ada/nodes.lkt:15174
--# expr-start 8234 '<FieldAccess for other_operands at nodes.lkt:15174:28>' Fld_1 ada/nodes.lkt:15174
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Concat_Op_F_Other_Operands;
--# expr-done 8234
--# expr-start 8235 '<Arithmetic - at nodes.lkt:15174:49>' Arith_Result ada/nodes.lkt:15174
Arith_Result := (Local_Operand_Count - 1); 
--# expr-done 8235
Get_Result := Get (Self, Fld_1, Arith_Result, True); 
--# expr-done 8236
Local_Last_Operand := Get_Result; 
--# bind last_operand Local_Last_Operand
--# expr-start 8293 '<Let at nodes.lkt:15175:9>' Let_Result_5 ada/nodes.lkt:15175
--# scope-start
--# expr-start 8239 '<FieldAccess for subprograms at nodes.lkt:15176:13>' Fld_6 ada/nodes.lkt:15176
--# expr-start 8238 '<FieldAccess for operator at nodes.lkt:15176:13>' Fld_5 ada/nodes.lkt:15176
--# expr-start 8237 '<FieldAccess for other_operands at nodes.lkt:15176:13>' Fld_2 ada/nodes.lkt:15176
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Concat_Operand_List (Node => Ent.Node.Concat_Op_F_Other_Operands, Info => Ent.Info);
--# expr-done 8237
Fld_3 := Fld_2.Node;
Get_Result_1 := Get (Self, Fld_3, 0, True); 
Is_Null := Get_Result_1 = null; 
if Is_Null then
   If_Result := No_Entity_Concat_Operand;
else
Fld_4 := Fld_2.Info;
As_Entity := (Info => Fld_4, Node => Get_Result_1); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Op_Concat (Node => If_Result.Node.Concat_Operand_F_Operator, Info => If_Result.Info);
--# expr-done 8238
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Op.subprograms
Fld_6 := Libadalang.Implementation.Op_P_Subprograms (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 8239
Local_Concat_Subprograms := Fld_6; Inc_Ref (Local_Concat_Subprograms);
--# bind concat_subprograms Local_Concat_Subprograms
--# expr-start 8292 '<LogicBinaryOp And at nodes.lkt:15179:9>' And_Pred_5 ada/nodes.lkt:15179
--# expr-start 8288 '<LogicBinaryOp And at nodes.lkt:15180:13>' And_Pred_4 ada/nodes.lkt:15180
--# expr-start 8284 '<LogicBinaryOp And at nodes.lkt:15181:17>' And_Pred_3 ada/nodes.lkt:15181
--# expr-start 8247 '<LogicBinaryOp And at nodes.lkt:15182:21>' And_Pred ada/nodes.lkt:15182
--# expr-start 8241 '<FieldAccess for sub_equation at nodes.lkt:15182:21>' Fld_8 ada/nodes.lkt:15182
--# expr-start 8240 '<FieldAccess for first_operand at nodes.lkt:15182:21>' Fld_7 ada/nodes.lkt:15182
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Expr (Node => Ent.Node.Concat_Op_F_First_Operand, Info => Ent.Info);
--# expr-done 8240
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_7.Info);
--# end
--# expr-done 8241
--# expr-start 8246 '<LogicAll at nodes.lkt:15183:26>' Logic_Boolean_Op ada/nodes.lkt:15183
--# expr-start 8245 '<Map at nodes.lkt:15183:26>' Map_Result ada/nodes.lkt:15183
   --# expr-start 8242 '<FieldAccess for other_operands at nodes.lkt:15183:26>' Fld_9 ada/nodes.lkt:15183
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Concat_Operand_List (Node => Ent.Node.Concat_Op_F_Other_Operands, Info => Ent.Info);
--# expr-done 8242
Fld_10 := Fld_9.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_10 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Concat_Operand_List := Fld_10;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Concat_Operand;
else
Fld_11 := Fld_9.Info;
As_Entity_1 := (Info => Fld_11, Node => Bare_Item_0); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind concat_operand Item_0
      --# expr-start 8244 '<FieldAccess for sub_equation at nodes.lkt:15185:25>' Fld_13 ada/nodes.lkt:15185
--# expr-start 8243 '<FieldAccess for operand at nodes.lkt:15185:25>' Fld_12 ada/nodes.lkt:15185
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Expr (Node => Item_0.Node.Concat_Operand_F_Operand, Info => Item_0.Info);
--# expr-done 8243
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_13 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_12.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_12.Info);
--# end
--# expr-done 8244
         declare
            Item_To_Append : constant Logic_Equation := Fld_13;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3056;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8245
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15183:26") else null)); 
--# expr-done 8246
And_Pred := Create_And (Fld_8, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15182:21") else null)); 
--# expr-done 8247
--# expr-start 8283 '<LogicAll at nodes.lkt:15197:21>' Logic_Boolean_Op_2 ada/nodes.lkt:15197
--# expr-start 8282 '<Map at nodes.lkt:15197:21>' Map_Result_2 ada/nodes.lkt:15197
   --# expr-start 8248 '<FieldAccess for other_operands at nodes.lkt:15197:21>' Fld_14 ada/nodes.lkt:15197
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Concat_Operand_List (Node => Ent.Node.Concat_Op_F_Other_Operands, Info => Ent.Info);
--# expr-done 8248
Fld_15 := Fld_14.Node;
      declare
         Map_Result_2_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_15 = null then
      Map_Result_2 := Create_Logic_Equation_Array (0);
      else
         Index_2 := 0;
      declare
         Collection : constant Bare_Concat_Operand_List := Fld_15;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_5 := Bare_Item_1 = null; 
if Is_Null_5 then
   If_Result_6 := No_Entity_Concat_Operand;
else
Fld_16 := Fld_14.Info;
As_Entity_5 := (Info => Fld_16, Node => Bare_Item_1); 
   If_Result_6 := As_Entity_5;
end if;
                  Item_1 := If_Result_6; 
   --# scope-start
               --# bind _ Item_1
               --# bind index Index_2
      --# expr-start 8281 '<Let at nodes.lkt:15199:29>' Let_Result_4 ada/nodes.lkt:15199
--# scope-start
--# expr-start 8250 '<Arithmetic - at nodes.lkt:15199:39>' Arith_Result_2 ada/nodes.lkt:15199
--# expr-start 8249 '<Arithmetic - at nodes.lkt:15199:39>' Arith_Result_1 ada/nodes.lkt:15199
Arith_Result_1 := (Local_Operand_Count - Index_2); 
--# expr-done 8249
Arith_Result_2 := (Arith_Result_1 - 1); 
--# expr-done 8250
Local_Pos := Arith_Result_2; 
--# bind pos Local_Pos
--# expr-start 8280 '<Let at nodes.lkt:15202:33>' Let_Result_3 ada/nodes.lkt:15202
--# scope-start
--# expr-start 8254 '<If at nodes.lkt:15203:37>' If_Result_3 ada/nodes.lkt:15203
Comp_Result := Local_Pos > 0; 
if Comp_Result then
--# expr-start 8251 '<FieldAccess for other_operands at nodes.lkt:15204:42>' Fld_17 ada/nodes.lkt:15204
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Concat_Operand_List (Node => Ent.Node.Concat_Op_F_Other_Operands, Info => Ent.Info);
--# expr-done 8251
Fld_18 := Fld_17.Node;
--# expr-start 8252 '<Arithmetic - at nodes.lkt:15204:63>' Arith_Result_3 ada/nodes.lkt:15204
Arith_Result_3 := (Local_Pos - 1); 
--# expr-done 8252
Get_Result_2 := Get (Self, Fld_18, Arith_Result_3, True); 
Is_Null_2 := Get_Result_2 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Concat_Operand;
else
Fld_19 := Fld_17.Info;
As_Entity_2 := (Info => Fld_19, Node => Get_Result_2); 
   If_Result_2 := As_Entity_2;
end if;
Cast_Expr := If_Result_2; 
      Cast_Result := Create_Internal_Entity_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   If_Result_3 := Cast_Result;
else
   --# expr-start 8253 '<FieldAccess for first_operand at nodes.lkt:15205:42>' Fld_20 ada/nodes.lkt:15205
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Create_Internal_Entity_Expr (Node => Ent.Node.Concat_Op_F_First_Operand, Info => Ent.Info);
--# expr-done 8253
   If_Result_3 := Fld_20;
end if;
--# expr-done 8254
Local_Left := If_Result_3; 
--# bind left Local_Left
--# expr-start 8279 '<Let at nodes.lkt:15206:33>' Let_Result_2 ada/nodes.lkt:15206
--# scope-start
--# expr-start 8255 '<FieldAccess for other_operands at nodes.lkt:15206:54>' Fld_21 ada/nodes.lkt:15206
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Create_Internal_Entity_Concat_Operand_List (Node => Ent.Node.Concat_Op_F_Other_Operands, Info => Ent.Info);
--# expr-done 8255
Fld_22 := Fld_21.Node;
Get_Result_3 := Get (Self, Fld_22, Local_Pos, True); 
Is_Null_3 := Get_Result_3 = null; 
if Is_Null_3 then
   If_Result_4 := No_Entity_Concat_Operand;
else
Fld_23 := Fld_21.Info;
As_Entity_3 := (Info => Fld_23, Node => Get_Result_3); 
   If_Result_4 := As_Entity_3;
end if;
Local_Concat_Operand := If_Result_4; 
--# bind concat_operand Local_Concat_Operand
--# expr-start 8278 '<Let at nodes.lkt:15207:33>' Let_Result_1 ada/nodes.lkt:15207
--# scope-start
--# expr-start 8257 '<FieldAccess for operand at nodes.lkt:15207:45>' Fld_27 ada/nodes.lkt:15207
--# expr-start 8256 '<FieldAccess for other_operands at nodes.lkt:15207:45>' Fld_24 ada/nodes.lkt:15207
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Create_Internal_Entity_Concat_Operand_List (Node => Ent.Node.Concat_Op_F_Other_Operands, Info => Ent.Info);
--# expr-done 8256
Fld_25 := Fld_24.Node;
Get_Result_4 := Get (Self, Fld_25, Local_Pos, True); 
Is_Null_4 := Get_Result_4 = null; 
if Is_Null_4 then
   If_Result_5 := No_Entity_Concat_Operand;
else
Fld_26 := Fld_24.Info;
As_Entity_4 := (Info => Fld_26, Node => Get_Result_4); 
   If_Result_5 := As_Entity_4;
end if;
      if If_Result_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Create_Internal_Entity_Expr (Node => If_Result_5.Node.Concat_Operand_F_Operand, Info => If_Result_5.Info);
--# expr-done 8257
Local_Right := Fld_27; 
--# bind right Local_Right
--# expr-start 8277 '<LogicBinaryOp Or at nodes.lkt:15209:33>' Or_Pred ada/nodes.lkt:15209
--# expr-start 8258 '<FieldAccess for operator_no_subprogram_equation at nodes.lkt:15215:37>' Fld_28 ada/nodes.lkt:15215
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ConcatOp.operator_no_subprogram_equation
Fld_28 := Libadalang.Implementation.Concat_Op_P_Operator_No_Subprogram_Equation (Node => Ent.Node, Left => Local_Left, Op => Local_Concat_Operand, Right => Local_Right, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 8258
--# expr-start 8276 '<LogicAny at nodes.lkt:15227:37>' Logic_Boolean_Op_1 ada/nodes.lkt:15227
--# expr-start 8275 '<Map at nodes.lkt:15227:37>' Map_Result_1 ada/nodes.lkt:15227
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Concat_Subprograms;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind subp Item_3
      --# expr-start 8274 '<Let at nodes.lkt:15229:45>' Let_Result ada/nodes.lkt:15229
--# scope-start
--# expr-start 8259 '<FieldAccess for subp_spec_or_null at nodes.lkt:15230:49>' Fld_29 ada/nodes.lkt:15230
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_29 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Item_3.Node, E_Info => Item_3.Info);
--# end
--# expr-done 8259
Local_Spec := Fld_29; 
--# bind spec Local_Spec
--# expr-start 8273 '<bind at nodes.lkt:15233:49>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:15233
--# expr-start 8261 '<New LogicContext at nodes.lkt:15234:53>' New_Struct ada/nodes.lkt:15234
Cast_Expr_1 := Item_3; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# expr-start 8260 '<FieldAccess for operator at nodes.lkt:15235:66>' Fld_30 ada/nodes.lkt:15235
      if Local_Concat_Operand.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Create_Internal_Entity_Op_Concat (Node => Local_Concat_Operand.Node.Concat_Operand_F_Operator, Info => Local_Concat_Operand.Info);
--# expr-done 8260
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_30.Node,
         Info => Fld_30.Info);
New_Struct := (Decl_Node => Cast_Result_2, Ref_Node => Cast_Result_1); 
--# expr-done 8261
Bound_Logic_Context := New_Struct; 
--# expr-start 8272 '<LogicBinaryOp And at nodes.lkt:15240:49>' And_Pred_2 ada/nodes.lkt:15240
--# expr-start 8267 '<LogicBinaryOp And at nodes.lkt:15240:49>' And_Pred_1 ada/nodes.lkt:15240
--# expr-start 8262 '<FieldAccess for arguments_eq at nodes.lkt:15240:49>' Fld_31 ada/nodes.lkt:15240
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ConcatOp.arguments_eq
Fld_31 := Libadalang.Implementation.Concat_Op_P_Arguments_Eq (Node => Ent.Node, Spec => Local_Spec, Left => Local_Left, Op => Local_Concat_Operand, Right => Local_Right, Origin => Origin, Env => Env, Logic_Context => Bound_Logic_Context);
--# end
--# expr-done 8262
--# expr-start 8266 '<bind at nodes.lkt:15247:53>' Dyn_Var_Bind_Result ada/nodes.lkt:15247
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 8265 '<Bind at nodes.lkt:15249:53>' Bind_Result ada/nodes.lkt:15249
--# expr-start 8264 '<FieldAccess for ref_var at nodes.lkt:15249:53>' Fld_33 ada/nodes.lkt:15249
--# expr-start 8263 '<FieldAccess for operator at nodes.lkt:15249:53>' Fld_32 ada/nodes.lkt:15249
      if Local_Concat_Operand.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Create_Internal_Entity_Op_Concat (Node => Local_Concat_Operand.Node.Concat_Operand_F_Operator, Info => Local_Concat_Operand.Info);
--# expr-done 8263
      if Fld_32.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_33 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_32.Node);
--# end
--# expr-done 8264
Fld_33.Value := No_Entity;
Entity_Vars.Reset (Fld_33);
Cast_Expr_2 := Item_3; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result := Solver.Create_Assign (Fld_33, Cast_Result_3, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15249:53") else null)); 
--# expr-done 8265
Dyn_Var_Bind_Result := Bind_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8266
And_Pred_1 := Create_And (Fld_31, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15240:49") else null)); 
--# expr-done 8267
--# expr-start 8271 '<bind at nodes.lkt:15255:53>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:15255
Bound_Logic_Context_2 := No_Logic_Context; 
--# expr-start 8270 '<Bind at nodes.lkt:15257:53>' Bind_Result_1 ada/nodes.lkt:15257
--# expr-start 8269 '<FieldAccess for subp_spec_var at nodes.lkt:15257:53>' Fld_35 ada/nodes.lkt:15257
--# expr-start 8268 '<FieldAccess for operator at nodes.lkt:15257:53>' Fld_34 ada/nodes.lkt:15257
      if Local_Concat_Operand.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_34 := Create_Internal_Entity_Op_Concat (Node => Local_Concat_Operand.Node.Concat_Operand_F_Operator, Info => Local_Concat_Operand.Info);
--# expr-done 8268
      if Fld_34.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld_35 := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Fld_34.Node);
--# end
--# expr-done 8269
Fld_35.Value := No_Entity;
Entity_Vars.Reset (Fld_35);
Cast_Expr_3 := Local_Spec; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
Logic_Ctx_1 := Allocate_Logic_Context (Bound_Logic_Context_2); 
Bind_Result_1 := Solver.Create_Assign (Fld_35, Cast_Result_4, Solver_Ifc.No_Converter, Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15257:53") else null)); 
--# expr-done 8270
Dyn_Var_Bind_Result_1 := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 8271
And_Pred_2 := Create_And (And_Pred_1, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15240:49") else null)); 
--# expr-done 8272
Dyn_Var_Bind_Result_2 := And_Pred_2; Inc_Ref (Dyn_Var_Bind_Result_2);
--# expr-done 8273
Let_Result := Dyn_Var_Bind_Result_2; Inc_Ref (Let_Result);
--# end
--# expr-done 8274
         declare
            Item_To_Append : constant Logic_Equation := Let_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3058;
         end loop;
      end;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 8275
Logic_Boolean_Op_1 := Solver.Create_Any (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15227:37") else null)); 
--# expr-done 8276
Or_Pred := Create_Or (Fld_28, Logic_Boolean_Op_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15209:33") else null)); 
--# expr-done 8277
Let_Result_1 := Or_Pred; Inc_Ref (Let_Result_1);
--# end
--# expr-done 8278
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 8279
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 8280
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 8281
         declare
            Item_To_Append : constant Logic_Equation := Let_Result_4;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3057;
               Index_2 := Index_2 + 1;
         end loop;
      end;
      end if;
         Map_Result_2 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_2_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 8282
Logic_Boolean_Op_2 := Solver.Create_All (Relation_Array (Map_Result_2.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15197:21") else null)); 
--# expr-done 8283
And_Pred_3 := Create_And (And_Pred, Logic_Boolean_Op_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15181:17") else null)); 
--# expr-done 8284
--# expr-start 8287 '<Bind at nodes.lkt:15273:17>' Bind_Result_2 ada/nodes.lkt:15273
--# expr-start 8285 '<FieldAccess for type_var at nodes.lkt:15273:17>' Fld_36 ada/nodes.lkt:15273
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_36 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8285
Fld_36.Value := No_Entity;
Entity_Vars.Reset (Fld_36);
--# expr-start 8286 '<FieldAccess for type_var at nodes.lkt:15273:37>' Fld_37 ada/nodes.lkt:15273
      if Local_Last_Operand = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_37 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Local_Last_Operand);
--# expr-done 8286
Fld_37.Value := No_Entity;
Entity_Vars.Reset (Fld_37);
Bind_Result_2 := Solver.Create_Unify (Fld_36, Fld_37, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15273:17") else null)); 
--# expr-done 8287
And_Pred_4 := Create_And (And_Pred_3, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15180:13") else null)); 
--# expr-done 8288
--# expr-start 8291 '<Bind at nodes.lkt:15276:14>' Bind_Result_3 ada/nodes.lkt:15276
--# expr-start 8289 '<FieldAccess for expected_type_var at nodes.lkt:15276:14>' Fld_38 ada/nodes.lkt:15276
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_38 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8289
Fld_38.Value := No_Entity;
Entity_Vars.Reset (Fld_38);
--# expr-start 8290 '<FieldAccess for expected_type_var at nodes.lkt:15276:43>' Fld_39 ada/nodes.lkt:15276
      if Local_Last_Operand = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_39 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Local_Last_Operand);
--# expr-done 8290
Fld_39.Value := No_Entity;
Entity_Vars.Reset (Fld_39);
Bind_Result_3 := Solver.Create_Unify (Fld_38, Fld_39, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15276:14") else null)); 
--# expr-done 8291
And_Pred_5 := Create_And (And_Pred_4, Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15179:9") else null)); 
--# expr-done 8292
Let_Result_5 := And_Pred_5; Inc_Ref (Let_Result_5);
--# end
--# expr-done 8293
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 8294
Let_Result_7 := Let_Result_6; Inc_Ref (Let_Result_7);
--# end
--# expr-done 8295
         Property_Result := Let_Result_7;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1138;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1138;
                     Finalizer_Scope_3056;
                     Finalizer_Scope_3057;
                     Finalizer_Scope_3058;
            raise;
      end;
   return Property_Result;
end Concat_Op_P_Xref_Equation;
--# end
--# property-start ConcatOp.arguments_eq ada/nodes.lkt:15280
pragma Warnings (Off, "is not referenced");
 function Concat_Op_P_Arguments_Eq
  (Node : Bare_Concat_Op
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Left : Internal_Entity_Expr
      ; Op : Internal_Entity_Concat_Operand
      ; Right : Internal_Entity_Expr
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Logic_Context : Internal_Logic_Context
  )
   return Logic_Equation
is
   Self : Bare_Concat_Op  := Bare_Concat_Op (Node);
      --# bind self Self
   --# bind spec Spec
   --# bind left Left
   --# bind op Op
   --# bind right Right
   --# bind origin Origin
   --# bind env Env
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1139 with Inline_Always;
      Local_Ps : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Base_Formal_Param_Decl;
Fld_2 : Logic_Equation;
Get_Result_1 : Internal_Entity_Defining_Name;
Fld_3 : Internal_Entity_Base_Formal_Param_Decl;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Bound_Logic_Context : Internal_Logic_Context;
Fld_5 : Logic_Var;
Fld_6 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
False_Rel : Logic_Equation;
Len : Integer;
Is_Equal : Boolean;
If_Result : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1139 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Ps);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1139;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8312 '<Let at nodes.lkt:15286:9>' Let_Result ada/nodes.lkt:15286
--# scope-start
--# expr-start 8296 '<FieldAccess for unpacked_formal_params at nodes.lkt:15286:18>' Fld ada/nodes.lkt:15286
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Spec.Node, E_Info => Spec.Info);
--# end
--# expr-done 8296
Local_Ps := Fld; Inc_Ref (Local_Ps);
--# bind ps Local_Ps
--# expr-start 8311 '<If at nodes.lkt:15288:9>' If_Result ada/nodes.lkt:15288
--# expr-start 8298 '<Eq at nodes.lkt:15288:12>' Is_Equal ada/nodes.lkt:15288
--# expr-start 8297 '<length at nodes.lkt:15288:12>' Len ada/nodes.lkt:15288
Len := Length (Local_Ps); 
--# expr-done 8297
Is_Equal := Len = 2; 
--# expr-done 8298
if Is_Equal then
   --# expr-start 8310 '<LogicBinaryOp And at nodes.lkt:15291:13>' And_Pred_1 ada/nodes.lkt:15291
--# expr-start 8305 '<LogicBinaryOp And at nodes.lkt:15292:17>' And_Pred ada/nodes.lkt:15292
--# expr-start 8301 '<FieldAccess for call_argument_equation at nodes.lkt:15292:17>' Fld_2 ada/nodes.lkt:15292
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8300 '<FieldAccess for formal_decl at nodes.lkt:15292:45>' Fld_1 ada/nodes.lkt:15292
--# expr-start 8299 '<at at nodes.lkt:15292:45>' Get_Result ada/nodes.lkt:15292
Get_Result := Get (Self, Local_Ps, 0, True); 
--# expr-done 8299
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 8300
--# property-call-start BaseFormalParamHolder.call_argument_equation
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Call_Argument_Equation (Node => Spec.Node, Param => Fld_1, Arg => Left, Origin => Origin, Logic_Context => Logic_Context, E_Info => Spec.Info);
--# end
--# expr-done 8301
--# expr-start 8304 '<FieldAccess for call_argument_equation at nodes.lkt:15295:21>' Fld_4 ada/nodes.lkt:15295
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8303 '<FieldAccess for formal_decl at nodes.lkt:15295:49>' Fld_3 ada/nodes.lkt:15295
--# expr-start 8302 '<at at nodes.lkt:15295:49>' Get_Result_1 ada/nodes.lkt:15295
Get_Result_1 := Get (Self, Local_Ps, 1, True); 
--# expr-done 8302
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_3 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 8303
--# property-call-start BaseFormalParamHolder.call_argument_equation
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Call_Argument_Equation (Node => Spec.Node, Param => Fld_3, Arg => Right, Origin => Origin, Logic_Context => Logic_Context, E_Info => Spec.Info);
--# end
--# expr-done 8304
And_Pred := Create_And (Fld_2, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15292:17") else null)); 
--# expr-done 8305
--# expr-start 8309 '<bind at nodes.lkt:15301:21>' Dyn_Var_Bind_Result ada/nodes.lkt:15301
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 8308 '<Bind at nodes.lkt:15302:21>' Bind_Result ada/nodes.lkt:15302
--# expr-start 8306 '<FieldAccess for type_var at nodes.lkt:15302:21>' Fld_5 ada/nodes.lkt:15302
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8306
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 8307 '<FieldAccess for return_type at nodes.lkt:15302:38>' Fld_6 ada/nodes.lkt:15302
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_6 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Spec.Node, Origin => Origin, E_Info => Spec.Info);
--# end
--# expr-done 8307
      Cast_Result := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15302:21") else null)); 
--# expr-done 8308
Dyn_Var_Bind_Result := Bind_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8309
And_Pred_1 := Create_And (And_Pred, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15291:13") else null)); 
--# expr-done 8310
   If_Result := And_Pred_1;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15306:14") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 8311
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 8312
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1139;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1139;
            raise;
      end;
   return Property_Result;
end Concat_Op_P_Arguments_Eq;
--# end
--# property-start ConcatOp.operator_no_subprogram_equation ada/nodes.lkt:15312
pragma Warnings (Off, "is not referenced");
 function Concat_Op_P_Operator_No_Subprogram_Equation
  (Node : Bare_Concat_Op
      ; Left : Internal_Entity_Expr
      ; Op : Internal_Entity_Concat_Operand
      ; Right : Internal_Entity_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Concat_Op  := Bare_Concat_Op (Node);
     Ent : Internal_Entity_Concat_Op :=
       Internal_Entity_Concat_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind left Left
   --# bind op Op
   --# bind right Right
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1140 with Inline_Always;
      Fld : Internal_Entity_Op_Concat;
Cast_Result : Internal_Entity;
New_Struct : Internal_Logic_Context;
Bound_Logic_Context : Internal_Logic_Context;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
Fld_2 : Logic_Var;
Pred_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_3 : Logic_Var;
Pred_2 : Logic_Equation;
Fld_4 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_5 : Logic_Var;
Node_For_Entity : Bare_Base_Type_Decl;
As_Entity : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Fld_6 : Logic_Var;
Fld_7 : Logic_Var;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Bound_Logic_Context_2 : Internal_Logic_Context;
Fld_8 : Logic_Var;
Fld_9 : Logic_Var;
Logic_Ctx_2 : Internal_Logic_Context_Access;
Bind_Result_2 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Bound_Logic_Context_3 : Internal_Logic_Context;
Fld_10 : Logic_Var;
Fld_11 : Logic_Var;
Logic_Ctx_3 : Internal_Logic_Context_Access;
Bind_Result_3 : Logic_Equation;
Dyn_Var_Bind_Result_2 : Logic_Equation;
Fld_12 : Logic_Var;
Fld_13 : Logic_Var;
Fld_14 : Logic_Equation;
Or_Pred : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_15 : Logic_Var;
Fld_16 : Logic_Var;
Logic_Ctx_4 : Internal_Logic_Context_Access;
Bind_Result_4 : Logic_Equation;
Bound_Logic_Context_4 : Internal_Logic_Context;
Fld_17 : Logic_Var;
Fld_18 : Logic_Var;
Logic_Ctx_5 : Internal_Logic_Context_Access;
Bind_Result_5 : Logic_Equation;
Dyn_Var_Bind_Result_3 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Bound_Logic_Context_5 : Internal_Logic_Context;
Fld_19 : Logic_Var;
Fld_20 : Logic_Var;
Logic_Ctx_6 : Internal_Logic_Context_Access;
Bind_Result_6 : Logic_Equation;
Dyn_Var_Bind_Result_4 : Logic_Equation;
Fld_21 : Logic_Var;
Fld_22 : Logic_Var;
Fld_23 : Logic_Equation;
Or_Pred_1 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Or_Pred_2 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Or_Pred_3 : Logic_Equation;
And_Pred_7 : Logic_Equation;
Dyn_Var_Bind_Result_5 : Logic_Equation;
            procedure Finalizer_Scope_1140 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Pred_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Pred_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (Dyn_Var_Bind_Result_2);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (Bind_Result_5);
                     Dec_Ref (Dyn_Var_Bind_Result_3);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Bind_Result_6);
                     Dec_Ref (Dyn_Var_Bind_Result_4);
                     Dec_Ref (Fld_23);
                     Dec_Ref (Or_Pred_1);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Or_Pred_2);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Or_Pred_3);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (Dyn_Var_Bind_Result_5);
            end Finalizer_Scope_1140;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8366 '<bind at nodes.lkt:15317:9>' Dyn_Var_Bind_Result_5 ada/nodes.lkt:15317
--# expr-start 8314 '<New LogicContext at nodes.lkt:15318:13>' New_Struct ada/nodes.lkt:15318
--# expr-start 8313 '<FieldAccess for operator at nodes.lkt:15319:26>' Fld ada/nodes.lkt:15319
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Op_Concat (Node => Op.Node.Concat_Operand_F_Operator, Info => Op.Info);
--# expr-done 8313
      Cast_Result := Create_Internal_Entity
        (Node => Fld.Node,
         Info => Fld.Info);
New_Struct := (Decl_Node => No_Entity, Ref_Node => Cast_Result); 
--# expr-done 8314
Bound_Logic_Context := New_Struct; 
--# expr-start 8365 '<LogicBinaryOp And at nodes.lkt:15323:9>' And_Pred_7 ada/nodes.lkt:15323
--# expr-start 8319 '<LogicBinaryOp And at nodes.lkt:15324:13>' And_Pred ada/nodes.lkt:15324
--# expr-start 8316 '<Predicate on BaseTypeDecl.is_array_def_with_deref_or_null at nodes.lkt:15324:13>' Pred ada/nodes.lkt:15324
--# expr-start 8315 '<FieldAccess for expected_type_var at nodes.lkt:15324:59>' Fld_1 ada/nodes.lkt:15324
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Op.Node);
--# expr-done 8315
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_Predicate (Fld_1, Create_Base_Type_Decl_P_Is_Array_Def_With_Deref_Or_Null_0_Predicate (Origin)); 
--# expr-done 8316
--# expr-start 8318 '<Predicate on BaseTypeDecl.is_array_def_with_deref at nodes.lkt:15326:18>' Pred_1 ada/nodes.lkt:15326
--# expr-start 8317 '<FieldAccess for type_var at nodes.lkt:15326:56>' Fld_2 ada/nodes.lkt:15326
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8317
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Pred_1 := Solver.Create_Predicate (Fld_2, Create_Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate (Origin)); 
--# expr-done 8318
And_Pred := Create_And (Pred, Pred_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15324:13") else null)); 
--# expr-done 8319
--# expr-start 8364 '<LogicBinaryOp Or at nodes.lkt:15329:13>' Or_Pred_3 ada/nodes.lkt:15329
--# expr-start 8323 '<LogicBinaryOp And at nodes.lkt:15332:17>' And_Pred_1 ada/nodes.lkt:15332
--# expr-start 8321 '<Predicate on AdaNode.is_not_null at nodes.lkt:15332:17>' Pred_2 ada/nodes.lkt:15332
--# expr-start 8320 '<FieldAccess for expected_type_var at nodes.lkt:15332:38>' Fld_3 ada/nodes.lkt:15332
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Op.Node);
--# expr-done 8320
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Pred_2 := Solver.Create_Predicate (Fld_3, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 8321
--# expr-start 8322 '<FieldAccess for array_concat_expected_type_equation at nodes.lkt:15333:22>' Fld_4 ada/nodes.lkt:15333
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ConcatOp.array_concat_expected_type_equation
Fld_4 := Libadalang.Implementation.Concat_Op_P_Array_Concat_Expected_Type_Equation (Node => Ent.Node, Left => Left, Op => Op, Right => Right, Origin => Origin, Logic_Context => Bound_Logic_Context);
--# end
--# expr-done 8322
And_Pred_1 := Create_And (Pred_2, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15332:17") else null)); 
--# expr-done 8323
--# expr-start 8363 '<LogicBinaryOp And at nodes.lkt:15343:17>' And_Pred_6 ada/nodes.lkt:15343
--# expr-start 8327 '<bind at nodes.lkt:15344:21>' Dyn_Var_Bind_Result ada/nodes.lkt:15344
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 8326 '<Bind at nodes.lkt:15345:21>' Bind_Result ada/nodes.lkt:15345
--# expr-start 8324 '<FieldAccess for expected_type_var at nodes.lkt:15345:21>' Fld_5 ada/nodes.lkt:15345
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Op.Node);
--# expr-done 8324
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 8325 '<No BaseTypeDecl at nodes.lkt:15345:47>' Node_For_Entity ada/nodes.lkt:15345
Node_For_Entity := No_Bare_Ada_Node;
--# expr-done 8325
Is_Null := Node_For_Entity = null; 
if Is_Null then
   If_Result := No_Entity_Base_Type_Decl;
else
As_Entity := (Info => E_Info, Node => Node_For_Entity); 
   If_Result := As_Entity;
end if;
      Cast_Result_1 := Create_Internal_Entity
        (Node => If_Result.Node,
         Info => If_Result.Info);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result_1, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15345:21") else null)); 
--# expr-done 8326
Dyn_Var_Bind_Result := Bind_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8327
--# expr-start 8362 '<LogicBinaryOp Or at nodes.lkt:15348:21>' Or_Pred_2 ada/nodes.lkt:15348
--# expr-start 8344 '<LogicBinaryOp And at nodes.lkt:15350:25>' And_Pred_3 ada/nodes.lkt:15350
--# expr-start 8335 '<LogicBinaryOp And at nodes.lkt:15351:29>' And_Pred_2 ada/nodes.lkt:15351
--# expr-start 8330 '<NPropagate at nodes.lkt:15351:29>' Bind_Result_1 ada/nodes.lkt:15351
--# expr-start 8328 '<FieldAccess for type_var at nodes.lkt:15353:33>' Fld_7 ada/nodes.lkt:15353
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Left.Node);
--# expr-done 8328
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
--# expr-start 8329 '<FieldAccess for type_var at nodes.lkt:15351:29>' Fld_6 ada/nodes.lkt:15351
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8329
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
Logic_Ctx_1 := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result_1 := Solver.Create_Propagate (Fld_7, Fld_6, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15351:29") else null)); 
--# expr-done 8330
--# expr-start 8334 '<bind at nodes.lkt:15356:33>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:15356
Bound_Logic_Context_2 := No_Logic_Context; 
--# expr-start 8333 '<Bind at nodes.lkt:15357:33>' Bind_Result_2 ada/nodes.lkt:15357
--# expr-start 8331 '<FieldAccess for type_var at nodes.lkt:15357:33>' Fld_8 ada/nodes.lkt:15357
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8331
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
--# expr-start 8332 '<FieldAccess for expected_type_var at nodes.lkt:15357:51>' Fld_9 ada/nodes.lkt:15357
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8332
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
Logic_Ctx_2 := Allocate_Logic_Context (Bound_Logic_Context_2); 
Bind_Result_2 := Solver.Create_Unify (Fld_8, Fld_9, Logic_Ctx_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15357:33") else null)); 
--# expr-done 8333
Dyn_Var_Bind_Result_1 := Bind_Result_2; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 8334
And_Pred_2 := Create_And (Bind_Result_1, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15351:29") else null)); 
--# expr-done 8335
--# expr-start 8343 '<LogicBinaryOp Or at nodes.lkt:15361:29>' Or_Pred ada/nodes.lkt:15361
--# expr-start 8339 '<bind at nodes.lkt:15362:33>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:15362
Bound_Logic_Context_3 := No_Logic_Context; 
--# expr-start 8338 '<Bind at nodes.lkt:15363:33>' Bind_Result_3 ada/nodes.lkt:15363
--# expr-start 8336 '<FieldAccess for type_var at nodes.lkt:15363:33>' Fld_10 ada/nodes.lkt:15363
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8336
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
--# expr-start 8337 '<FieldAccess for expected_type_var at nodes.lkt:15363:51>' Fld_11 ada/nodes.lkt:15363
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8337
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
Logic_Ctx_3 := Allocate_Logic_Context (Bound_Logic_Context_3); 
Bind_Result_3 := Solver.Create_Unify (Fld_10, Fld_11, Logic_Ctx_3, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15363:33") else null)); 
--# expr-done 8338
Dyn_Var_Bind_Result_2 := Bind_Result_3; Inc_Ref (Dyn_Var_Bind_Result_2);
--# expr-done 8339
--# expr-start 8342 '<FieldAccess for comp_bind at nodes.lkt:15365:33>' Fld_14 ada/nodes.lkt:15365
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8340 '<FieldAccess for type_var at nodes.lkt:15366:33>' Fld_12 ada/nodes.lkt:15366
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8340
--# expr-start 8341 '<FieldAccess for expected_type_var at nodes.lkt:15367:33>' Fld_13 ada/nodes.lkt:15367
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8341
--# property-call-start AdaNode.comp_bind
Fld_14 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_12, Right => Fld_13, Origin => Origin);
--# end
--# expr-done 8342
Or_Pred := Create_Or (Dyn_Var_Bind_Result_2, Fld_14, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15361:29") else null)); 
--# expr-done 8343
And_Pred_3 := Create_And (And_Pred_2, Or_Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15350:25") else null)); 
--# expr-done 8344
--# expr-start 8361 '<LogicBinaryOp And at nodes.lkt:15373:25>' And_Pred_5 ada/nodes.lkt:15373
--# expr-start 8352 '<LogicBinaryOp And at nodes.lkt:15374:29>' And_Pred_4 ada/nodes.lkt:15374
--# expr-start 8347 '<NPropagate at nodes.lkt:15374:29>' Bind_Result_4 ada/nodes.lkt:15374
--# expr-start 8345 '<FieldAccess for type_var at nodes.lkt:15376:33>' Fld_16 ada/nodes.lkt:15376
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Right.Node);
--# expr-done 8345
Fld_16.Value := No_Entity;
Entity_Vars.Reset (Fld_16);
--# expr-start 8346 '<FieldAccess for type_var at nodes.lkt:15374:29>' Fld_15 ada/nodes.lkt:15374
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8346
Fld_15.Value := No_Entity;
Entity_Vars.Reset (Fld_15);
Logic_Ctx_4 := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result_4 := Solver.Create_Propagate (Fld_16, Fld_15, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_4, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15374:29") else null)); 
--# expr-done 8347
--# expr-start 8351 '<bind at nodes.lkt:15379:33>' Dyn_Var_Bind_Result_3 ada/nodes.lkt:15379
Bound_Logic_Context_4 := No_Logic_Context; 
--# expr-start 8350 '<Bind at nodes.lkt:15380:33>' Bind_Result_5 ada/nodes.lkt:15380
--# expr-start 8348 '<FieldAccess for type_var at nodes.lkt:15380:33>' Fld_17 ada/nodes.lkt:15380
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8348
Fld_17.Value := No_Entity;
Entity_Vars.Reset (Fld_17);
--# expr-start 8349 '<FieldAccess for expected_type_var at nodes.lkt:15380:51>' Fld_18 ada/nodes.lkt:15380
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8349
Fld_18.Value := No_Entity;
Entity_Vars.Reset (Fld_18);
Logic_Ctx_5 := Allocate_Logic_Context (Bound_Logic_Context_4); 
Bind_Result_5 := Solver.Create_Unify (Fld_17, Fld_18, Logic_Ctx_5, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15380:33") else null)); 
--# expr-done 8350
Dyn_Var_Bind_Result_3 := Bind_Result_5; Inc_Ref (Dyn_Var_Bind_Result_3);
--# expr-done 8351
And_Pred_4 := Create_And (Bind_Result_4, Dyn_Var_Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15374:29") else null)); 
--# expr-done 8352
--# expr-start 8360 '<LogicBinaryOp Or at nodes.lkt:15384:29>' Or_Pred_1 ada/nodes.lkt:15384
--# expr-start 8356 '<bind at nodes.lkt:15385:33>' Dyn_Var_Bind_Result_4 ada/nodes.lkt:15385
Bound_Logic_Context_5 := No_Logic_Context; 
--# expr-start 8355 '<Bind at nodes.lkt:15386:33>' Bind_Result_6 ada/nodes.lkt:15386
--# expr-start 8353 '<FieldAccess for type_var at nodes.lkt:15386:33>' Fld_19 ada/nodes.lkt:15386
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8353
Fld_19.Value := No_Entity;
Entity_Vars.Reset (Fld_19);
--# expr-start 8354 '<FieldAccess for expected_type_var at nodes.lkt:15386:51>' Fld_20 ada/nodes.lkt:15386
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8354
Fld_20.Value := No_Entity;
Entity_Vars.Reset (Fld_20);
Logic_Ctx_6 := Allocate_Logic_Context (Bound_Logic_Context_5); 
Bind_Result_6 := Solver.Create_Unify (Fld_19, Fld_20, Logic_Ctx_6, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15386:33") else null)); 
--# expr-done 8355
Dyn_Var_Bind_Result_4 := Bind_Result_6; Inc_Ref (Dyn_Var_Bind_Result_4);
--# expr-done 8356
--# expr-start 8359 '<FieldAccess for comp_bind at nodes.lkt:15388:33>' Fld_23 ada/nodes.lkt:15388
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8357 '<FieldAccess for type_var at nodes.lkt:15389:33>' Fld_21 ada/nodes.lkt:15389
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8357
--# expr-start 8358 '<FieldAccess for expected_type_var at nodes.lkt:15390:33>' Fld_22 ada/nodes.lkt:15390
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8358
--# property-call-start AdaNode.comp_bind
Fld_23 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_21, Right => Fld_22, Origin => Origin);
--# end
--# expr-done 8359
Or_Pred_1 := Create_Or (Dyn_Var_Bind_Result_4, Fld_23, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15384:29") else null)); 
--# expr-done 8360
And_Pred_5 := Create_And (And_Pred_4, Or_Pred_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15373:25") else null)); 
--# expr-done 8361
Or_Pred_2 := Create_Or (And_Pred_3, And_Pred_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15348:21") else null)); 
--# expr-done 8362
And_Pred_6 := Create_And (Dyn_Var_Bind_Result, Or_Pred_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15343:17") else null)); 
--# expr-done 8363
Or_Pred_3 := Create_Or (And_Pred_1, And_Pred_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15329:13") else null)); 
--# expr-done 8364
And_Pred_7 := Create_And (And_Pred, Or_Pred_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15323:9") else null)); 
--# expr-done 8365
Dyn_Var_Bind_Result_5 := And_Pred_7; Inc_Ref (Dyn_Var_Bind_Result_5);
--# expr-done 8366
         Property_Result := Dyn_Var_Bind_Result_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1140;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1140;
            raise;
      end;
   return Property_Result;
end Concat_Op_P_Operator_No_Subprogram_Equation;
--# end
--# property-start ConcatOp.array_concat_expected_type_equation ada/nodes.lkt:15404
pragma Warnings (Off, "is not referenced");
 function Concat_Op_P_Array_Concat_Expected_Type_Equation
  (Node : Bare_Concat_Op
      ; Left : Internal_Entity_Expr
      ; Op : Internal_Entity_Concat_Operand
      ; Right : Internal_Entity_Expr
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
  )
   return Logic_Equation
is
   Self : Bare_Concat_Op  := Bare_Concat_Op (Node);
      --# bind self Self
   --# bind left Left
   --# bind op Op
   --# bind right Right
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1141 with Inline_Always;
      Local_Left_Ctx_Free : Boolean;
Local_Right_Ctx_Free : Boolean;
Fld : Boolean;
Fld_1 : Boolean;
Fld_2 : Logic_Var;
Fld_3 : Logic_Var;
Fld_4 : Logic_Var;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Fld_5 : Logic_Var;
Fld_6 : Logic_Var;
Fld_7 : Logic_Var;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_8 : Logic_Var;
Fld_9 : Logic_Var;
Fld_10 : Logic_Var;
Logic_Ctx_2 : Internal_Logic_Context_Access;
Bind_Result_2 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_11 : Logic_Var;
Fld_12 : Logic_Var;
Logic_Ctx_3 : Internal_Logic_Context_Access;
Bind_Result_3 : Logic_Equation;
Fld_13 : Logic_Var;
Fld_14 : Logic_Var;
Fld_15 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_16 : Logic_Var;
Fld_17 : Logic_Var;
Fld_18 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_19 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_20 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_21 : Logic_Var;
Fld_22 : Logic_Var;
Logic_Ctx_4 : Internal_Logic_Context_Access;
Bind_Result_4 : Logic_Equation;
Bound_Logic_Context : Internal_Logic_Context;
Fld_23 : Logic_Var;
Fld_24 : Logic_Var;
Logic_Ctx_5 : Internal_Logic_Context_Access;
Bind_Result_5 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_25 : Logic_Var;
Fld_26 : Logic_Var;
Logic_Ctx_6 : Internal_Logic_Context_Access;
Bind_Result_6 : Logic_Equation;
Fld_27 : Logic_Var;
Fld_28 : Logic_Var;
Fld_29 : Logic_Equation;
And_Pred_7 : Logic_Equation;
Fld_30 : Logic_Equation;
And_Pred_8 : Logic_Equation;
Or_Pred_1 : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_31 : Logic_Var;
Fld_32 : Logic_Var;
Logic_Ctx_7 : Internal_Logic_Context_Access;
Bind_Result_7 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
Fld_33 : Logic_Var;
Fld_34 : Logic_Var;
Fld_35 : Logic_Equation;
Or_Pred_2 : Logic_Equation;
And_Pred_9 : Logic_Equation;
Fld_36 : Logic_Equation;
And_Pred_10 : Logic_Equation;
Fld_37 : Logic_Var;
Fld_38 : Logic_Var;
Logic_Ctx_8 : Internal_Logic_Context_Access;
Bind_Result_8 : Logic_Equation;
Bound_Logic_Context_2 : Internal_Logic_Context;
Fld_39 : Logic_Var;
Fld_40 : Logic_Var;
Logic_Ctx_9 : Internal_Logic_Context_Access;
Bind_Result_9 : Logic_Equation;
Dyn_Var_Bind_Result_2 : Logic_Equation;
And_Pred_11 : Logic_Equation;
Fld_41 : Logic_Var;
Fld_42 : Logic_Var;
Logic_Ctx_10 : Internal_Logic_Context_Access;
Bind_Result_10 : Logic_Equation;
Fld_43 : Logic_Var;
Fld_44 : Logic_Var;
Fld_45 : Logic_Equation;
And_Pred_12 : Logic_Equation;
Fld_46 : Logic_Equation;
And_Pred_13 : Logic_Equation;
Or_Pred_3 : Logic_Equation;
Bound_Logic_Context_3 : Internal_Logic_Context;
Fld_47 : Logic_Var;
Fld_48 : Logic_Var;
Logic_Ctx_11 : Internal_Logic_Context_Access;
Bind_Result_11 : Logic_Equation;
Dyn_Var_Bind_Result_3 : Logic_Equation;
Fld_49 : Logic_Var;
Fld_50 : Logic_Var;
Fld_51 : Logic_Equation;
Or_Pred_4 : Logic_Equation;
And_Pred_14 : Logic_Equation;
Fld_52 : Logic_Equation;
And_Pred_15 : Logic_Equation;
Fld_53 : Logic_Var;
Fld_54 : Logic_Var;
Logic_Ctx_12 : Internal_Logic_Context_Access;
Bind_Result_12 : Logic_Equation;
Bound_Logic_Context_4 : Internal_Logic_Context;
Fld_55 : Logic_Var;
Fld_56 : Logic_Var;
Logic_Ctx_13 : Internal_Logic_Context_Access;
Bind_Result_13 : Logic_Equation;
Dyn_Var_Bind_Result_4 : Logic_Equation;
Fld_57 : Logic_Var;
Fld_58 : Logic_Var;
Fld_59 : Logic_Equation;
Or_Pred_5 : Logic_Equation;
And_Pred_16 : Logic_Equation;
Bound_Logic_Context_5 : Internal_Logic_Context;
Fld_60 : Logic_Var;
Fld_61 : Logic_Var;
Logic_Ctx_14 : Internal_Logic_Context_Access;
Bind_Result_14 : Logic_Equation;
Dyn_Var_Bind_Result_5 : Logic_Equation;
Fld_62 : Logic_Var;
Fld_63 : Logic_Var;
Fld_64 : Logic_Equation;
Or_Pred_6 : Logic_Equation;
And_Pred_17 : Logic_Equation;
Fld_65 : Logic_Equation;
And_Pred_18 : Logic_Equation;
Fld_66 : Logic_Equation;
And_Pred_19 : Logic_Equation;
If_Result : Logic_Equation;
If_Result_1 : Logic_Equation;
If_Result_2 : Boolean;
If_Result_3 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_1141 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (Fld_15);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_18);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_19);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_20);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (Bind_Result_5);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Bind_Result_6);
                     Dec_Ref (Fld_29);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (Fld_30);
                     Dec_Ref (And_Pred_8);
                     Dec_Ref (Or_Pred_1);
                     Dec_Ref (Bind_Result_7);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (Fld_35);
                     Dec_Ref (Or_Pred_2);
                     Dec_Ref (And_Pred_9);
                     Dec_Ref (Fld_36);
                     Dec_Ref (And_Pred_10);
                     Dec_Ref (Bind_Result_8);
                     Dec_Ref (Bind_Result_9);
                     Dec_Ref (Dyn_Var_Bind_Result_2);
                     Dec_Ref (And_Pred_11);
                     Dec_Ref (Bind_Result_10);
                     Dec_Ref (Fld_45);
                     Dec_Ref (And_Pred_12);
                     Dec_Ref (Fld_46);
                     Dec_Ref (And_Pred_13);
                     Dec_Ref (Or_Pred_3);
                     Dec_Ref (Bind_Result_11);
                     Dec_Ref (Dyn_Var_Bind_Result_3);
                     Dec_Ref (Fld_51);
                     Dec_Ref (Or_Pred_4);
                     Dec_Ref (And_Pred_14);
                     Dec_Ref (Fld_52);
                     Dec_Ref (And_Pred_15);
                     Dec_Ref (Bind_Result_12);
                     Dec_Ref (Bind_Result_13);
                     Dec_Ref (Dyn_Var_Bind_Result_4);
                     Dec_Ref (Fld_59);
                     Dec_Ref (Or_Pred_5);
                     Dec_Ref (And_Pred_16);
                     Dec_Ref (Bind_Result_14);
                     Dec_Ref (Dyn_Var_Bind_Result_5);
                     Dec_Ref (Fld_64);
                     Dec_Ref (Or_Pred_6);
                     Dec_Ref (And_Pred_17);
                     Dec_Ref (Fld_65);
                     Dec_Ref (And_Pred_18);
                     Dec_Ref (Fld_66);
                     Dec_Ref (And_Pred_19);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1141;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8487 '<Let at nodes.lkt:15409:9>' Let_Result_1 ada/nodes.lkt:15409
--# scope-start
--# expr-start 8367 '<FieldAccess for has_context_free_type at nodes.lkt:15409:29>' Fld ada/nodes.lkt:15409
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.has_context_free_type'
Fld := Libadalang.Implementation.Dispatcher_Expr_P_Has_Context_Free_Type (Node => Left.Node);
--# end
--# expr-done 8367
Local_Left_Ctx_Free := Fld; 
--# bind left_ctx_free Local_Left_Ctx_Free
--# expr-start 8486 '<Let at nodes.lkt:15410:9>' Let_Result ada/nodes.lkt:15410
--# scope-start
--# expr-start 8368 '<FieldAccess for has_context_free_type at nodes.lkt:15410:30>' Fld_1 ada/nodes.lkt:15410
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.has_context_free_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Has_Context_Free_Type (Node => Right.Node);
--# end
--# expr-done 8368
Local_Right_Ctx_Free := Fld_1; 
--# bind right_ctx_free Local_Right_Ctx_Free
--# expr-start 8485 '<If at nodes.lkt:15415:9>' If_Result_3 ada/nodes.lkt:15415
--# expr-start 8369 '<BooleanBinaryOp And at nodes.lkt:15415:12>' If_Result_2 ada/nodes.lkt:15415
if Local_Left_Ctx_Free then
   If_Result_2 := Local_Right_Ctx_Free;
else
   If_Result_2 := False;
end if;
--# expr-done 8369
if If_Result_2 then
   --# expr-start 8399 '<LogicBinaryOp Or at nodes.lkt:15417:13>' Or_Pred ada/nodes.lkt:15417
--# expr-start 8383 '<LogicBinaryOp And at nodes.lkt:15424:17>' And_Pred_1 ada/nodes.lkt:15424
--# expr-start 8378 '<LogicBinaryOp And at nodes.lkt:15425:21>' And_Pred ada/nodes.lkt:15425
--# expr-start 8373 '<NPropagate at nodes.lkt:15425:21>' Bind_Result ada/nodes.lkt:15425
--# expr-start 8370 '<FieldAccess for type_var at nodes.lkt:15425:21>' Fld_2 ada/nodes.lkt:15425
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8370
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 8371 '<FieldAccess for type_var at nodes.lkt:15427:25>' Fld_3 ada/nodes.lkt:15427
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Left.Node);
--# expr-done 8371
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 8372 '<FieldAccess for type_var at nodes.lkt:15428:25>' Fld_4 ada/nodes.lkt:15428
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Right.Node);
--# expr-done 8372
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Logic_Ctx := Allocate_Logic_Context (Logic_Context); 
Bind_Result := Solver.Create_N_Propagate (Fld_2, Logic_Functor_869'(N => 2, Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), (1 => Fld_3, 2 => Fld_4), Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15425:21") else null)); 
--# expr-done 8373
--# expr-start 8377 '<NPropagate at nodes.lkt:15430:26>' Bind_Result_1 ada/nodes.lkt:15430
--# expr-start 8374 '<FieldAccess for expected_type_var at nodes.lkt:15430:26>' Fld_5 ada/nodes.lkt:15430
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8374
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 8375 '<FieldAccess for type_var at nodes.lkt:15432:25>' Fld_6 ada/nodes.lkt:15432
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8375
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
--# expr-start 8376 '<FieldAccess for type_var at nodes.lkt:15433:25>' Fld_7 ada/nodes.lkt:15433
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Left.Node);
--# expr-done 8376
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
Logic_Ctx_1 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_1 := Solver.Create_N_Propagate (Fld_5, Logic_Functor_870'(N => 2, Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), (1 => Fld_6, 2 => Fld_7), Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15430:26") else null)); 
--# expr-done 8377
And_Pred := Create_And (Bind_Result, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15425:21") else null)); 
--# expr-done 8378
--# expr-start 8382 '<NPropagate at nodes.lkt:15436:22>' Bind_Result_2 ada/nodes.lkt:15436
--# expr-start 8379 '<FieldAccess for expected_type_var at nodes.lkt:15436:22>' Fld_8 ada/nodes.lkt:15436
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8379
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
--# expr-start 8380 '<FieldAccess for type_var at nodes.lkt:15438:21>' Fld_9 ada/nodes.lkt:15438
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8380
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
--# expr-start 8381 '<FieldAccess for type_var at nodes.lkt:15439:21>' Fld_10 ada/nodes.lkt:15439
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Right.Node);
--# expr-done 8381
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
Logic_Ctx_2 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_2 := Solver.Create_N_Propagate (Fld_8, Logic_Functor_870'(N => 2, Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), (1 => Fld_9, 2 => Fld_10), Logic_Ctx_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15436:22") else null)); 
--# expr-done 8382
And_Pred_1 := Create_And (And_Pred, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15424:17") else null)); 
--# expr-done 8383
--# expr-start 8398 '<LogicBinaryOp And at nodes.lkt:15447:17>' And_Pred_5 ada/nodes.lkt:15447
--# expr-start 8396 '<LogicBinaryOp And at nodes.lkt:15448:21>' And_Pred_4 ada/nodes.lkt:15448
--# expr-start 8394 '<LogicBinaryOp And at nodes.lkt:15449:25>' And_Pred_3 ada/nodes.lkt:15449
--# expr-start 8390 '<LogicBinaryOp And at nodes.lkt:15450:29>' And_Pred_2 ada/nodes.lkt:15450
--# expr-start 8386 '<NPropagate at nodes.lkt:15450:29>' Bind_Result_3 ada/nodes.lkt:15450
--# expr-start 8384 '<FieldAccess for expected_type_var at nodes.lkt:15452:33>' Fld_12 ada/nodes.lkt:15452
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Op.Node);
--# expr-done 8384
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
--# expr-start 8385 '<FieldAccess for type_var at nodes.lkt:15450:29>' Fld_11 ada/nodes.lkt:15450
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8385
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
Logic_Ctx_3 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_3 := Solver.Create_Propagate (Fld_12, Fld_11, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_3, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15450:29") else null)); 
--# expr-done 8386
--# expr-start 8389 '<FieldAccess for comp_bind at nodes.lkt:15454:34>' Fld_15 ada/nodes.lkt:15454
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8387 '<FieldAccess for type_var at nodes.lkt:15455:33>' Fld_13 ada/nodes.lkt:15455
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8387
--# expr-start 8388 '<FieldAccess for expected_type_var at nodes.lkt:15456:33>' Fld_14 ada/nodes.lkt:15456
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8388
--# property-call-start AdaNode.comp_bind
Fld_15 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_13, Right => Fld_14, Origin => Origin);
--# end
--# expr-done 8389
And_Pred_2 := Create_And (Bind_Result_3, Fld_15, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15450:29") else null)); 
--# expr-done 8390
--# expr-start 8393 '<FieldAccess for comp_bind at nodes.lkt:15459:30>' Fld_18 ada/nodes.lkt:15459
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8391 '<FieldAccess for type_var at nodes.lkt:15460:29>' Fld_16 ada/nodes.lkt:15460
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8391
--# expr-start 8392 '<FieldAccess for expected_type_var at nodes.lkt:15461:29>' Fld_17 ada/nodes.lkt:15461
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8392
--# property-call-start AdaNode.comp_bind
Fld_18 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_16, Right => Fld_17, Origin => Origin);
--# end
--# expr-done 8393
And_Pred_3 := Create_And (And_Pred_2, Fld_18, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15449:25") else null)); 
--# expr-done 8394
--# expr-start 8395 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15464:26>' Fld_19 ada/nodes.lkt:15464
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_19 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Left.Node, Origin => Origin);
--# end
--# expr-done 8395
And_Pred_4 := Create_And (And_Pred_3, Fld_19, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15448:21") else null)); 
--# expr-done 8396
--# expr-start 8397 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15466:22>' Fld_20 ada/nodes.lkt:15466
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_20 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Right.Node, Origin => Origin);
--# end
--# expr-done 8397
And_Pred_5 := Create_And (And_Pred_4, Fld_20, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15447:17") else null)); 
--# expr-done 8398
Or_Pred := Create_Or (And_Pred_1, And_Pred_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15417:13") else null)); 
--# expr-done 8399
   If_Result_3 := Or_Pred;
else
   --# expr-start 8484 '<If at nodes.lkt:15415:9>' If_Result_1 ada/nodes.lkt:15415
if Local_Left_Ctx_Free then
   --# expr-start 8428 '<LogicBinaryOp And at nodes.lkt:15470:13>' And_Pred_10 ada/nodes.lkt:15470
--# expr-start 8426 '<LogicBinaryOp And at nodes.lkt:15471:17>' And_Pred_9 ada/nodes.lkt:15471
--# expr-start 8417 '<LogicBinaryOp Or at nodes.lkt:15472:21>' Or_Pred_1 ada/nodes.lkt:15472
--# expr-start 8407 '<LogicBinaryOp And at nodes.lkt:15476:25>' And_Pred_6 ada/nodes.lkt:15476
--# expr-start 8402 '<NPropagate at nodes.lkt:15476:25>' Bind_Result_4 ada/nodes.lkt:15476
--# expr-start 8400 '<FieldAccess for type_var at nodes.lkt:15477:63>' Fld_22 ada/nodes.lkt:15477
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Left.Node);
--# expr-done 8400
Fld_22.Value := No_Entity;
Entity_Vars.Reset (Fld_22);
--# expr-start 8401 '<FieldAccess for type_var at nodes.lkt:15476:25>' Fld_21 ada/nodes.lkt:15476
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8401
Fld_21.Value := No_Entity;
Entity_Vars.Reset (Fld_21);
Logic_Ctx_4 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_4 := Solver.Create_Propagate (Fld_22, Fld_21, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_4, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15476:25") else null)); 
--# expr-done 8402
--# expr-start 8406 '<bind at nodes.lkt:15479:29>' Dyn_Var_Bind_Result ada/nodes.lkt:15479
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 8405 '<Bind at nodes.lkt:15480:29>' Bind_Result_5 ada/nodes.lkt:15480
--# expr-start 8403 '<FieldAccess for type_var at nodes.lkt:15480:29>' Fld_23 ada/nodes.lkt:15480
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8403
Fld_23.Value := No_Entity;
Entity_Vars.Reset (Fld_23);
--# expr-start 8404 '<FieldAccess for expected_type_var at nodes.lkt:15480:47>' Fld_24 ada/nodes.lkt:15480
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8404
Fld_24.Value := No_Entity;
Entity_Vars.Reset (Fld_24);
Logic_Ctx_5 := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result_5 := Solver.Create_Unify (Fld_23, Fld_24, Logic_Ctx_5, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15480:29") else null)); 
--# expr-done 8405
Dyn_Var_Bind_Result := Bind_Result_5; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8406
And_Pred_6 := Create_And (Bind_Result_4, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15476:25") else null)); 
--# expr-done 8407
--# expr-start 8416 '<LogicBinaryOp And at nodes.lkt:15488:25>' And_Pred_8 ada/nodes.lkt:15488
--# expr-start 8414 '<LogicBinaryOp And at nodes.lkt:15489:29>' And_Pred_7 ada/nodes.lkt:15489
--# expr-start 8410 '<NPropagate at nodes.lkt:15489:29>' Bind_Result_6 ada/nodes.lkt:15489
--# expr-start 8408 '<FieldAccess for expected_type_var at nodes.lkt:15491:33>' Fld_26 ada/nodes.lkt:15491
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Op.Node);
--# expr-done 8408
Fld_26.Value := No_Entity;
Entity_Vars.Reset (Fld_26);
--# expr-start 8409 '<FieldAccess for type_var at nodes.lkt:15489:29>' Fld_25 ada/nodes.lkt:15489
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8409
Fld_25.Value := No_Entity;
Entity_Vars.Reset (Fld_25);
Logic_Ctx_6 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_6 := Solver.Create_Propagate (Fld_26, Fld_25, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_6, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15489:29") else null)); 
--# expr-done 8410
--# expr-start 8413 '<FieldAccess for comp_bind at nodes.lkt:15493:34>' Fld_29 ada/nodes.lkt:15493
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8411 '<FieldAccess for type_var at nodes.lkt:15494:33>' Fld_27 ada/nodes.lkt:15494
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8411
--# expr-start 8412 '<FieldAccess for expected_type_var at nodes.lkt:15495:33>' Fld_28 ada/nodes.lkt:15495
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8412
--# property-call-start AdaNode.comp_bind
Fld_29 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_27, Right => Fld_28, Origin => Origin);
--# end
--# expr-done 8413
And_Pred_7 := Create_And (Bind_Result_6, Fld_29, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15489:29") else null)); 
--# expr-done 8414
--# expr-start 8415 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15498:30>' Fld_30 ada/nodes.lkt:15498
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_30 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Left.Node, Origin => Origin);
--# end
--# expr-done 8415
And_Pred_8 := Create_And (And_Pred_7, Fld_30, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15488:25") else null)); 
--# expr-done 8416
Or_Pred_1 := Create_Or (And_Pred_6, And_Pred_8, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15472:21") else null)); 
--# expr-done 8417
--# expr-start 8425 '<LogicBinaryOp Or at nodes.lkt:15504:21>' Or_Pred_2 ada/nodes.lkt:15504
--# expr-start 8421 '<bind at nodes.lkt:15505:25>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:15505
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 8420 '<Bind at nodes.lkt:15506:25>' Bind_Result_7 ada/nodes.lkt:15506
--# expr-start 8418 '<FieldAccess for type_var at nodes.lkt:15506:25>' Fld_31 ada/nodes.lkt:15506
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8418
Fld_31.Value := No_Entity;
Entity_Vars.Reset (Fld_31);
--# expr-start 8419 '<FieldAccess for expected_type_var at nodes.lkt:15506:43>' Fld_32 ada/nodes.lkt:15506
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8419
Fld_32.Value := No_Entity;
Entity_Vars.Reset (Fld_32);
Logic_Ctx_7 := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result_7 := Solver.Create_Unify (Fld_31, Fld_32, Logic_Ctx_7, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15506:25") else null)); 
--# expr-done 8420
Dyn_Var_Bind_Result_1 := Bind_Result_7; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 8421
--# expr-start 8424 '<FieldAccess for comp_bind at nodes.lkt:15508:25>' Fld_35 ada/nodes.lkt:15508
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8422 '<FieldAccess for type_var at nodes.lkt:15509:25>' Fld_33 ada/nodes.lkt:15509
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8422
--# expr-start 8423 '<FieldAccess for expected_type_var at nodes.lkt:15510:25>' Fld_34 ada/nodes.lkt:15510
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_34 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8423
--# property-call-start AdaNode.comp_bind
Fld_35 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_33, Right => Fld_34, Origin => Origin);
--# end
--# expr-done 8424
Or_Pred_2 := Create_Or (Dyn_Var_Bind_Result_1, Fld_35, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15504:21") else null)); 
--# expr-done 8425
And_Pred_9 := Create_And (Or_Pred_1, Or_Pred_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15471:17") else null)); 
--# expr-done 8426
--# expr-start 8427 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15514:18>' Fld_36 ada/nodes.lkt:15514
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_36 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Right.Node, Origin => Origin);
--# end
--# expr-done 8427
And_Pred_10 := Create_And (And_Pred_9, Fld_36, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15470:13") else null)); 
--# expr-done 8428
   If_Result_1 := And_Pred_10;
else
   --# expr-start 8483 '<If at nodes.lkt:15415:9>' If_Result ada/nodes.lkt:15415
if Local_Right_Ctx_Free then
   --# expr-start 8457 '<LogicBinaryOp And at nodes.lkt:15517:13>' And_Pred_15 ada/nodes.lkt:15517
--# expr-start 8455 '<LogicBinaryOp And at nodes.lkt:15518:17>' And_Pred_14 ada/nodes.lkt:15518
--# expr-start 8446 '<LogicBinaryOp Or at nodes.lkt:15519:21>' Or_Pred_3 ada/nodes.lkt:15519
--# expr-start 8436 '<LogicBinaryOp And at nodes.lkt:15523:25>' And_Pred_11 ada/nodes.lkt:15523
--# expr-start 8431 '<NPropagate at nodes.lkt:15523:25>' Bind_Result_8 ada/nodes.lkt:15523
--# expr-start 8429 '<FieldAccess for type_var at nodes.lkt:15524:63>' Fld_38 ada/nodes.lkt:15524
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_38 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Right.Node);
--# expr-done 8429
Fld_38.Value := No_Entity;
Entity_Vars.Reset (Fld_38);
--# expr-start 8430 '<FieldAccess for type_var at nodes.lkt:15523:25>' Fld_37 ada/nodes.lkt:15523
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_37 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8430
Fld_37.Value := No_Entity;
Entity_Vars.Reset (Fld_37);
Logic_Ctx_8 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_8 := Solver.Create_Propagate (Fld_38, Fld_37, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_8, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15523:25") else null)); 
--# expr-done 8431
--# expr-start 8435 '<bind at nodes.lkt:15526:29>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:15526
Bound_Logic_Context_2 := No_Logic_Context; 
--# expr-start 8434 '<Bind at nodes.lkt:15527:29>' Bind_Result_9 ada/nodes.lkt:15527
--# expr-start 8432 '<FieldAccess for type_var at nodes.lkt:15527:29>' Fld_39 ada/nodes.lkt:15527
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_39 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8432
Fld_39.Value := No_Entity;
Entity_Vars.Reset (Fld_39);
--# expr-start 8433 '<FieldAccess for expected_type_var at nodes.lkt:15527:47>' Fld_40 ada/nodes.lkt:15527
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_40 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8433
Fld_40.Value := No_Entity;
Entity_Vars.Reset (Fld_40);
Logic_Ctx_9 := Allocate_Logic_Context (Bound_Logic_Context_2); 
Bind_Result_9 := Solver.Create_Unify (Fld_39, Fld_40, Logic_Ctx_9, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15527:29") else null)); 
--# expr-done 8434
Dyn_Var_Bind_Result_2 := Bind_Result_9; Inc_Ref (Dyn_Var_Bind_Result_2);
--# expr-done 8435
And_Pred_11 := Create_And (Bind_Result_8, Dyn_Var_Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15523:25") else null)); 
--# expr-done 8436
--# expr-start 8445 '<LogicBinaryOp And at nodes.lkt:15535:25>' And_Pred_13 ada/nodes.lkt:15535
--# expr-start 8443 '<LogicBinaryOp And at nodes.lkt:15536:29>' And_Pred_12 ada/nodes.lkt:15536
--# expr-start 8439 '<NPropagate at nodes.lkt:15536:29>' Bind_Result_10 ada/nodes.lkt:15536
--# expr-start 8437 '<FieldAccess for expected_type_var at nodes.lkt:15538:33>' Fld_42 ada/nodes.lkt:15538
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_42 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Op.Node);
--# expr-done 8437
Fld_42.Value := No_Entity;
Entity_Vars.Reset (Fld_42);
--# expr-start 8438 '<FieldAccess for type_var at nodes.lkt:15536:29>' Fld_41 ada/nodes.lkt:15536
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_41 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8438
Fld_41.Value := No_Entity;
Entity_Vars.Reset (Fld_41);
Logic_Ctx_10 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_10 := Solver.Create_Propagate (Fld_42, Fld_41, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_10, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15536:29") else null)); 
--# expr-done 8439
--# expr-start 8442 '<FieldAccess for comp_bind at nodes.lkt:15540:34>' Fld_45 ada/nodes.lkt:15540
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8440 '<FieldAccess for type_var at nodes.lkt:15541:33>' Fld_43 ada/nodes.lkt:15541
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_43 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8440
--# expr-start 8441 '<FieldAccess for expected_type_var at nodes.lkt:15542:33>' Fld_44 ada/nodes.lkt:15542
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_44 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8441
--# property-call-start AdaNode.comp_bind
Fld_45 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_43, Right => Fld_44, Origin => Origin);
--# end
--# expr-done 8442
And_Pred_12 := Create_And (Bind_Result_10, Fld_45, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15536:29") else null)); 
--# expr-done 8443
--# expr-start 8444 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15545:30>' Fld_46 ada/nodes.lkt:15545
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_46 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Right.Node, Origin => Origin);
--# end
--# expr-done 8444
And_Pred_13 := Create_And (And_Pred_12, Fld_46, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15535:25") else null)); 
--# expr-done 8445
Or_Pred_3 := Create_Or (And_Pred_11, And_Pred_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15519:21") else null)); 
--# expr-done 8446
--# expr-start 8454 '<LogicBinaryOp Or at nodes.lkt:15551:21>' Or_Pred_4 ada/nodes.lkt:15551
--# expr-start 8450 '<bind at nodes.lkt:15552:25>' Dyn_Var_Bind_Result_3 ada/nodes.lkt:15552
Bound_Logic_Context_3 := No_Logic_Context; 
--# expr-start 8449 '<Bind at nodes.lkt:15553:25>' Bind_Result_11 ada/nodes.lkt:15553
--# expr-start 8447 '<FieldAccess for type_var at nodes.lkt:15553:25>' Fld_47 ada/nodes.lkt:15553
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_47 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8447
Fld_47.Value := No_Entity;
Entity_Vars.Reset (Fld_47);
--# expr-start 8448 '<FieldAccess for expected_type_var at nodes.lkt:15553:43>' Fld_48 ada/nodes.lkt:15553
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_48 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8448
Fld_48.Value := No_Entity;
Entity_Vars.Reset (Fld_48);
Logic_Ctx_11 := Allocate_Logic_Context (Bound_Logic_Context_3); 
Bind_Result_11 := Solver.Create_Unify (Fld_47, Fld_48, Logic_Ctx_11, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15553:25") else null)); 
--# expr-done 8449
Dyn_Var_Bind_Result_3 := Bind_Result_11; Inc_Ref (Dyn_Var_Bind_Result_3);
--# expr-done 8450
--# expr-start 8453 '<FieldAccess for comp_bind at nodes.lkt:15555:25>' Fld_51 ada/nodes.lkt:15555
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8451 '<FieldAccess for type_var at nodes.lkt:15555:40>' Fld_49 ada/nodes.lkt:15555
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_49 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8451
--# expr-start 8452 '<FieldAccess for expected_type_var at nodes.lkt:15555:55>' Fld_50 ada/nodes.lkt:15555
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_50 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8452
--# property-call-start AdaNode.comp_bind
Fld_51 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_49, Right => Fld_50, Origin => Origin);
--# end
--# expr-done 8453
Or_Pred_4 := Create_Or (Dyn_Var_Bind_Result_3, Fld_51, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15551:21") else null)); 
--# expr-done 8454
And_Pred_14 := Create_And (Or_Pred_3, Or_Pred_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15518:17") else null)); 
--# expr-done 8455
--# expr-start 8456 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15558:18>' Fld_52 ada/nodes.lkt:15558
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_52 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Left.Node, Origin => Origin);
--# end
--# expr-done 8456
And_Pred_15 := Create_And (And_Pred_14, Fld_52, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15517:13") else null)); 
--# expr-done 8457
   If_Result := And_Pred_15;
else
   --# expr-start 8482 '<LogicBinaryOp And at nodes.lkt:15563:13>' And_Pred_19 ada/nodes.lkt:15563
--# expr-start 8480 '<LogicBinaryOp And at nodes.lkt:15564:17>' And_Pred_18 ada/nodes.lkt:15564
--# expr-start 8478 '<LogicBinaryOp And at nodes.lkt:15565:21>' And_Pred_17 ada/nodes.lkt:15565
--# expr-start 8469 '<LogicBinaryOp And at nodes.lkt:15566:25>' And_Pred_16 ada/nodes.lkt:15566
--# expr-start 8460 '<NPropagate at nodes.lkt:15566:25>' Bind_Result_12 ada/nodes.lkt:15566
--# expr-start 8458 '<FieldAccess for expected_type_var at nodes.lkt:15568:29>' Fld_54 ada/nodes.lkt:15568
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_54 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Op.Node);
--# expr-done 8458
Fld_54.Value := No_Entity;
Entity_Vars.Reset (Fld_54);
--# expr-start 8459 '<FieldAccess for type_var at nodes.lkt:15566:25>' Fld_53 ada/nodes.lkt:15566
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_53 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8459
Fld_53.Value := No_Entity;
Entity_Vars.Reset (Fld_53);
Logic_Ctx_12 := Allocate_Logic_Context (Logic_Context); 
Bind_Result_12 := Solver.Create_Propagate (Fld_54, Fld_53, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Logic_Ctx_12, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15566:25") else null)); 
--# expr-done 8460
--# expr-start 8468 '<LogicBinaryOp Or at nodes.lkt:15571:29>' Or_Pred_5 ada/nodes.lkt:15571
--# expr-start 8464 '<bind at nodes.lkt:15572:33>' Dyn_Var_Bind_Result_4 ada/nodes.lkt:15572
Bound_Logic_Context_4 := No_Logic_Context; 
--# expr-start 8463 '<Bind at nodes.lkt:15573:33>' Bind_Result_13 ada/nodes.lkt:15573
--# expr-start 8461 '<FieldAccess for type_var at nodes.lkt:15573:33>' Fld_55 ada/nodes.lkt:15573
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_55 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8461
Fld_55.Value := No_Entity;
Entity_Vars.Reset (Fld_55);
--# expr-start 8462 '<FieldAccess for expected_type_var at nodes.lkt:15573:51>' Fld_56 ada/nodes.lkt:15573
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_56 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8462
Fld_56.Value := No_Entity;
Entity_Vars.Reset (Fld_56);
Logic_Ctx_13 := Allocate_Logic_Context (Bound_Logic_Context_4); 
Bind_Result_13 := Solver.Create_Unify (Fld_55, Fld_56, Logic_Ctx_13, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15573:33") else null)); 
--# expr-done 8463
Dyn_Var_Bind_Result_4 := Bind_Result_13; Inc_Ref (Dyn_Var_Bind_Result_4);
--# expr-done 8464
--# expr-start 8467 '<FieldAccess for comp_bind at nodes.lkt:15575:33>' Fld_59 ada/nodes.lkt:15575
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8465 '<FieldAccess for type_var at nodes.lkt:15576:33>' Fld_57 ada/nodes.lkt:15576
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_57 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8465
--# expr-start 8466 '<FieldAccess for expected_type_var at nodes.lkt:15577:33>' Fld_58 ada/nodes.lkt:15577
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_58 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Left.Node);
--# expr-done 8466
--# property-call-start AdaNode.comp_bind
Fld_59 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_57, Right => Fld_58, Origin => Origin);
--# end
--# expr-done 8467
Or_Pred_5 := Create_Or (Dyn_Var_Bind_Result_4, Fld_59, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15571:29") else null)); 
--# expr-done 8468
And_Pred_16 := Create_And (Bind_Result_12, Or_Pred_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15566:25") else null)); 
--# expr-done 8469
--# expr-start 8477 '<LogicBinaryOp Or at nodes.lkt:15582:25>' Or_Pred_6 ada/nodes.lkt:15582
--# expr-start 8473 '<bind at nodes.lkt:15583:29>' Dyn_Var_Bind_Result_5 ada/nodes.lkt:15583
Bound_Logic_Context_5 := No_Logic_Context; 
--# expr-start 8472 '<Bind at nodes.lkt:15584:29>' Bind_Result_14 ada/nodes.lkt:15584
--# expr-start 8470 '<FieldAccess for type_var at nodes.lkt:15584:29>' Fld_60 ada/nodes.lkt:15584
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_60 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8470
Fld_60.Value := No_Entity;
Entity_Vars.Reset (Fld_60);
--# expr-start 8471 '<FieldAccess for expected_type_var at nodes.lkt:15584:47>' Fld_61 ada/nodes.lkt:15584
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_61 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8471
Fld_61.Value := No_Entity;
Entity_Vars.Reset (Fld_61);
Logic_Ctx_14 := Allocate_Logic_Context (Bound_Logic_Context_5); 
Bind_Result_14 := Solver.Create_Unify (Fld_60, Fld_61, Logic_Ctx_14, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15584:29") else null)); 
--# expr-done 8472
Dyn_Var_Bind_Result_5 := Bind_Result_14; Inc_Ref (Dyn_Var_Bind_Result_5);
--# expr-done 8473
--# expr-start 8476 '<FieldAccess for comp_bind at nodes.lkt:15586:29>' Fld_64 ada/nodes.lkt:15586
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8474 '<FieldAccess for type_var at nodes.lkt:15587:29>' Fld_62 ada/nodes.lkt:15587
      if Op.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_62 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Op.Node);
--# expr-done 8474
--# expr-start 8475 '<FieldAccess for expected_type_var at nodes.lkt:15588:29>' Fld_63 ada/nodes.lkt:15588
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_63 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Right.Node);
--# expr-done 8475
--# property-call-start AdaNode.comp_bind
Fld_64 := Libadalang.Implementation.Ada_Node_P_Comp_Bind (Node => Self, Left => Fld_62, Right => Fld_63, Origin => Origin);
--# end
--# expr-done 8476
Or_Pred_6 := Create_Or (Dyn_Var_Bind_Result_5, Fld_64, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15582:25") else null)); 
--# expr-done 8477
And_Pred_17 := Create_And (And_Pred_16, Or_Pred_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15565:21") else null)); 
--# expr-done 8478
--# expr-start 8479 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15592:22>' Fld_65 ada/nodes.lkt:15592
      if Left.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_65 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Left.Node, Origin => Origin);
--# end
--# expr-done 8479
And_Pred_18 := Create_And (And_Pred_17, Fld_65, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15564:17") else null)); 
--# expr-done 8480
--# expr-start 8481 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15594:18>' Fld_66 ada/nodes.lkt:15594
      if Right.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_66 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Right.Node, Origin => Origin);
--# end
--# expr-done 8481
And_Pred_19 := Create_And (And_Pred_18, Fld_66, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15563:13") else null)); 
--# expr-done 8482
   If_Result := And_Pred_19;
end if;
      Inc_Ref (If_Result);
--# expr-done 8483
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 8484
   If_Result_3 := If_Result_1;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 8485
Let_Result := If_Result_3; Inc_Ref (Let_Result);
--# end
--# expr-done 8486
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 8487
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1141;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1141;
            raise;
      end;
   return Property_Result;
end Concat_Op_P_Array_Concat_Expected_Type_Equation;
--# end
   --
   --  Primitives for Bare_Concat_Operand
   --
      procedure Initialize_Fields_For_Concat_Operand
        (Self : Bare_Concat_Operand
         ; Concat_Operand_F_Operator : Bare_Op_Concat
         ; Concat_Operand_F_Operand : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Concat_Operand_F_Operator := Concat_Operand_F_Operator;
            Self.Concat_Operand_F_Operand := Concat_Operand_F_Operand;
      end Initialize_Fields_For_Concat_Operand;
   function Concat_Operand_F_Operator
     (Node : Bare_Concat_Operand) return Bare_Op_Concat
   is
   begin
         return Node.Concat_Operand_F_Operator;
   end;
   function Concat_Operand_F_Operand
     (Node : Bare_Concat_Operand) return Bare_Expr
   is
   begin
         return Node.Concat_Operand_F_Operand;
   end;
--# property-start ConcatOperand.has_context_free_type ada/nodes.lkt:15608
pragma Warnings (Off, "is not referenced");
 function Concat_Operand_P_Has_Context_Free_Type
  (Node : Bare_Concat_Operand
  )
   return Boolean
is
   Self : Bare_Concat_Operand  := Bare_Concat_Operand (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Concat_Operand_P_Has_Context_Free_Type;
--# end
   --
   --  Primitives for Bare_Cond_Expr
   --
      procedure Initialize_Fields_For_Cond_Expr
        (Self : Bare_Cond_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
      end Initialize_Fields_For_Cond_Expr;
--# property-start '[dispatcher]CondExpr.dependent_exprs' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Cond_Expr_P_Dependent_Exprs
  (Node : Bare_Cond_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr_Array_Access
is
   Self : Bare_Cond_Expr  := Bare_Cond_Expr (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Expr_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Cond_Expr (Self.Kind) is
               when Ada_Case_Expr =>
                  --# property-call-start CaseExpr.dependent_exprs
                  Property_Result := Case_Expr_P_Dependent_Exprs
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_If_Expr =>
                  --# property-call-start IfExpr.dependent_exprs
                  Property_Result := If_Expr_P_Dependent_Exprs
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Cond_Expr_P_Dependent_Exprs;
--# end
   --
   --  Primitives for Bare_Case_Expr
   --
      procedure Initialize_Fields_For_Case_Expr
        (Self : Bare_Case_Expr
         ; Case_Expr_F_Expr : Bare_Expr
         ; Case_Expr_F_Cases : Bare_Case_Expr_Alternative_List
        ) is
      begin
            Initialize_Fields_For_Cond_Expr
              (Self);
            Self.Case_Expr_F_Expr := Case_Expr_F_Expr;
            Self.Case_Expr_F_Cases := Case_Expr_F_Cases;
      end Initialize_Fields_For_Case_Expr;
   function Case_Expr_F_Expr
     (Node : Bare_Case_Expr) return Bare_Expr
   is
   begin
         return Node.Case_Expr_F_Expr;
   end;
   function Case_Expr_F_Cases
     (Node : Bare_Case_Expr) return Bare_Case_Expr_Alternative_List
   is
   begin
         return Node.Case_Expr_F_Cases;
   end;
--# property-start CaseExpr.has_context_free_type ada/nodes.lkt:15627
pragma Warnings (Off, "is not referenced");
 function Case_Expr_P_Has_Context_Free_Type
  (Node : Bare_Case_Expr
  )
   return Boolean
is
   Self : Bare_Case_Expr  := Bare_Case_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Case_Expr_P_Has_Context_Free_Type;
--# end
--# property-start CaseExpr.dependent_exprs ada/nodes.lkt:15629
pragma Warnings (Off, "is not referenced");
 function Case_Expr_P_Dependent_Exprs
  (Node : Bare_Case_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr_Array_Access
is
   Self : Bare_Case_Expr  := Bare_Case_Expr (Node);
     Ent : Internal_Entity_Case_Expr :=
       Internal_Entity_Case_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_1145 with Inline_Always;
      Fld : Internal_Entity_Case_Expr_Alternative_List;
Fld_1 : Bare_Case_Expr_Alternative_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Case_Expr_Alternative;
Bare_Item_0 : Bare_Case_Expr_Alternative;
Fld_3 : Internal_Entity_Expr;
As_Entity : Internal_Entity_Case_Expr_Alternative;
Is_Null : Boolean;
If_Result : Internal_Entity_Case_Expr_Alternative;
Map_Result : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_1145 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1145;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8490 '<Map at nodes.lkt:15629:50>' Map_Result ada/nodes.lkt:15629
   --# expr-start 8488 '<FieldAccess for cases at nodes.lkt:15629:50>' Fld ada/nodes.lkt:15629
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Case_Expr_Alternative_List (Node => Ent.Node.Case_Expr_F_Cases, Info => Ent.Info);
--# expr-done 8488
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Expr_Array (0);
      else
      declare
         Collection : constant Bare_Case_Expr_Alternative_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Case_Expr_Alternative;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind c Item_0
      --# expr-start 8489 '<FieldAccess for expr at nodes.lkt:15629:72>' Fld_3 ada/nodes.lkt:15629
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8489
         declare
            Item_To_Append : constant Internal_Entity_Expr := Fld_3;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8490
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1145;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1145;
            raise;
      end;
   return Property_Result;
end Case_Expr_P_Dependent_Exprs;
--# end
--# property-start CaseExpr.xref_equation ada/nodes.lkt:15632
pragma Warnings (Off, "is not referenced");
 function Case_Expr_P_Xref_Equation
  (Node : Bare_Case_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Case_Expr  := Bare_Case_Expr (Node);
     Ent : Internal_Entity_Case_Expr :=
       Internal_Entity_Case_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1146 with Inline_Always;
            procedure Finalizer_Scope_3060 with Inline_Always;
            procedure Finalizer_Scope_3061 with Inline_Always;
            procedure Finalizer_Scope_3062 with Inline_Always;
            procedure Finalizer_Scope_3063 with Inline_Always;
            procedure Finalizer_Scope_3064 with Inline_Always;
      Ignored : Boolean;
Match_0 : Internal_Entity_Expr;
Match_1 : Internal_Entity_Subtype_Indication;
Match_2 : Internal_Entity_Others_Designator;
Match_3 : Internal_Entity;
Fld : Internal_Entity_Expr;
Fld_1 : Bare_Expr;
Fld_2 : Logic_Var;
Pred : Logic_Equation;
Fld_3 : Boolean;
Fld_4 : Internal_Entity_Case_Expr_Alternative_List;
Fld_5 : Bare_Case_Expr_Alternative_List;
Fld_6 : Internal_Entity_Info;
Item_0 : Internal_Entity_Case_Expr_Alternative;
Bare_Item_0 : Bare_Case_Expr_Alternative;
Fld_7 : Internal_Entity_Alternatives_List;
Fld_8 : Bare_Alternatives_List;
Fld_9 : Internal_Entity_Info;
Item_1 : Internal_Entity;
Bare_Item_1 : Bare_Ada_Node;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_10 : Logic_Equation;
Fld_11 : Logic_Var;
Fld_12 : Bare_Expr;
Fld_13 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_14 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_15 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_A : Boolean;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_16 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
If_Result_1 : Logic_Equation;
Fld_17 : Logic_Equation;
True_Rel : Logic_Equation;
Match_Prefix : Internal_Entity;
Cast_Result_2 : Internal_Entity_Expr;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_3 : Internal_Entity_Subtype_Indication;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_4 : Internal_Entity_Others_Designator;
Let_Result_2 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Cast_Result_5 : Internal_Entity;
Let_Result_3 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
Match_Result : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Fld_18 : Logic_Var;
Fld_19 : Internal_Entity_Expr;
Fld_20 : Logic_Var;
Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_21 : Internal_Entity_Expr;
Fld_22 : Logic_Var;
Fld_23 : Logic_Var;
Bind_Result_2 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_24 : Internal_Entity_Expr;
Fld_25 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_26 : Internal_Entity_Expr;
Fld_27 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Fld_28 : Internal_Entity_Expr;
Fld_29 : Logic_Var;
Pred_1 : Logic_Equation;
Fld_30 : Internal_Entity_Expr;
Fld_31 : Logic_Var;
Fld_32 : Internal_Entity_Expr;
Fld_33 : Logic_Var;
Bind_Result_3 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_34 : Internal_Entity_Expr;
Fld_35 : Logic_Var;
Fld_36 : Logic_Var;
Bind_Result_4 : Logic_Equation;
And_Pred_7 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Or_Pred : Logic_Equation;
True_Rel_2 : Logic_Equation;
Fld_37 : Internal_Entity_Expr;
Fld_38 : Boolean;
If_Result_3 : Logic_Equation;
And_Pred_8 : Logic_Equation;
As_Entity_1 : Internal_Entity_Case_Expr_Alternative;
Is_Null_2 : Boolean;
If_Result_4 : Internal_Entity_Case_Expr_Alternative;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
Let_Result_4 : Logic_Equation;
            procedure Finalizer_Scope_1146 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_1146;
            procedure Finalizer_Scope_3060 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_25);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_27);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Pred_1);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (True_Rel_2);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (And_Pred_8);
            end Finalizer_Scope_3060;
            procedure Finalizer_Scope_3061 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_3061;
            procedure Finalizer_Scope_3062 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_14);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_15);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_3062;
            procedure Finalizer_Scope_3063 is
            begin
                     Dec_Ref (Fld_17);
            end Finalizer_Scope_3063;
            procedure Finalizer_Scope_3064 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_3064;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8556 '<Let at nodes.lkt:15635:9>' Let_Result_4 ada/nodes.lkt:15635
--# scope-start
--# expr-start 8495 '<FieldAccess for resolve_names_internal_with_eq at nodes.lkt:15636:13>' Fld_3 ada/nodes.lkt:15636
--# expr-start 8491 '<FieldAccess for expr at nodes.lkt:15636:13>' Fld ada/nodes.lkt:15636
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Case_Expr_F_Expr, Info => Ent.Info);
--# expr-done 8491
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8494 '<Predicate on BaseTypeDecl.is_discrete_type at nodes.lkt:15637:17>' Pred ada/nodes.lkt:15637
--# expr-start 8493 '<FieldAccess for type_var at nodes.lkt:15637:48>' Fld_2 ada/nodes.lkt:15637
--# expr-start 8492 '<FieldAccess for expr at nodes.lkt:15637:48>' Fld_1 ada/nodes.lkt:15637
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Case_Expr_F_Expr;
--# expr-done 8492
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_1);
--# expr-done 8493
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Pred := Solver.Create_Predicate (Fld_2, Create_Base_Type_Decl_P_Is_Discrete_Type_0_Predicate (Origin)); 
--# expr-done 8494
--# property-call-start AdaNode.resolve_names_internal_with_eq
Fld_3 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal_With_Eq (Node => Fld.Node, Additional_Equation => Pred, Env => Env, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 8495
Ignored := Fld_3; 
--# bind _ Ignored
--# expr-start 8555 '<LogicAll at nodes.lkt:15640:9>' Logic_Boolean_Op_1 ada/nodes.lkt:15640
--# expr-start 8554 '<Map at nodes.lkt:15640:9>' Map_Result_1 ada/nodes.lkt:15640
   --# expr-start 8496 '<FieldAccess for cases at nodes.lkt:15640:9>' Fld_4 ada/nodes.lkt:15640
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Case_Expr_Alternative_List (Node => Ent.Node.Case_Expr_F_Cases, Info => Ent.Info);
--# expr-done 8496
Fld_5 := Fld_4.Node;
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_5 = null then
      Map_Result_1 := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Case_Expr_Alternative_List := Fld_5;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_2 := Bare_Item_0 = null; 
if Is_Null_2 then
   If_Result_4 := No_Entity_Case_Expr_Alternative;
else
Fld_6 := Fld_4.Info;
As_Entity_1 := (Info => Fld_6, Node => Bare_Item_0); 
   If_Result_4 := As_Entity_1;
end if;
                  Item_0 := If_Result_4; 
   --# scope-start
               --# bind alt Item_0
      --# expr-start 8553 '<LogicBinaryOp And at nodes.lkt:15642:13>' And_Pred_8 ada/nodes.lkt:15642
--# expr-start 8534 '<LogicBinaryOp And at nodes.lkt:15643:17>' And_Pred_5 ada/nodes.lkt:15643
--# expr-start 8531 '<LogicBinaryOp And at nodes.lkt:15644:21>' And_Pred_4 ada/nodes.lkt:15644
--# expr-start 8528 '<LogicBinaryOp And at nodes.lkt:15645:25>' And_Pred_3 ada/nodes.lkt:15645
--# expr-start 8523 '<LogicBinaryOp And at nodes.lkt:15646:29>' And_Pred_2 ada/nodes.lkt:15646
--# expr-start 8518 '<LogicAll at nodes.lkt:15646:29>' Logic_Boolean_Op ada/nodes.lkt:15646
--# expr-start 8517 '<Map at nodes.lkt:15646:29>' Map_Result ada/nodes.lkt:15646
   --# expr-start 8497 '<FieldAccess for choices at nodes.lkt:15646:29>' Fld_7 ada/nodes.lkt:15646
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Alternatives_List (Node => Item_0.Node.Case_Expr_Alternative_F_Choices, Info => Item_0.Info);
--# expr-done 8497
Fld_8 := Fld_7.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_8 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld_8;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_1 := Bare_Item_1 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity;
else
Fld_9 := Fld_7.Info;
As_Entity := (Info => Fld_9, Node => Bare_Item_1); 
   If_Result_2 := As_Entity;
end if;
                  Item_1 := If_Result_2; 
   --# scope-start
               --# bind c Item_1
      --# expr-start 8516 '<Match at nodes.lkt:15648:33>' Match_Result ada/nodes.lkt:15648
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Abstract_State_Decl_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind e Match_0
--# expr-start 8514 '<If at nodes.lkt:15651:41>' If_Result_1 ada/nodes.lkt:15651
--# expr-start 8503 '<BooleanBinaryOp And at nodes.lkt:15652:45>' If_Result ada/nodes.lkt:15652
--# expr-start 8498 '<IsA Name at nodes.lkt:15652:45>' Is_A ada/nodes.lkt:15652
Is_A := Match_0.Node /= null 
and then Match_0.Node.Kind in Ada_Name; 
--# expr-done 8498
if Is_A then
   --# expr-start 8502 '<Not at nodes.lkt:15653:49>' Not_Val ada/nodes.lkt:15653
--# expr-start 8501 '<IsNull at nodes.lkt:15653:53>' Is_Null ada/nodes.lkt:15653
--# expr-start 8500 '<FieldAccess for name_designated_type at nodes.lkt:15653:53>' Fld_16 ada/nodes.lkt:15653
--# expr-start 8499 '<Cast to Name at nodes.lkt:15653:53>' Cast_Result_1 ada/nodes.lkt:15653
Cast_Expr_1 := Match_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Name;
   end if;
--# expr-done 8499
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_16 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 8500
Is_Null := Fld_16.Node = null; 
--# expr-done 8501
Not_Val := not (Is_Null); 
--# expr-done 8502
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 8503
if If_Result then
   --# expr-start 8505 '<FieldAccess for xref_type_equation at nodes.lkt:15657:46>' Fld_10 ada/nodes.lkt:15657
--# expr-start 8504 '<Cast to Name at nodes.lkt:15657:46>' Cast_Result ada/nodes.lkt:15657
Cast_Expr := Match_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 8504
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_10 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Cast_Result.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result.Info);
--# end
--# expr-done 8505
   If_Result_1 := Fld_10;
else
   --# expr-start 8513 '<LogicBinaryOp And at nodes.lkt:15659:45>' And_Pred_1 ada/nodes.lkt:15659
--# expr-start 8511 '<LogicBinaryOp And at nodes.lkt:15660:49>' And_Pred ada/nodes.lkt:15660
--# expr-start 8509 '<Bind at nodes.lkt:15660:49>' Bind_Result ada/nodes.lkt:15660
--# expr-start 8506 '<FieldAccess for expected_type_var at nodes.lkt:15660:49>' Fld_11 ada/nodes.lkt:15660
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Match_0.Node);
--# expr-done 8506
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
--# expr-start 8508 '<FieldAccess for type_val at nodes.lkt:15661:52>' Fld_13 ada/nodes.lkt:15661
--# expr-start 8507 '<FieldAccess for expr at nodes.lkt:15661:52>' Fld_12 ada/nodes.lkt:15661
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Self.Case_Expr_F_Expr;
--# expr-done 8507
      if Fld_12 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_13 := Libadalang.Implementation.Expr_P_Type_Val (Node => Fld_12);
--# end
--# expr-done 8508
Bind_Result := Solver.Create_Assign (Fld_11, Fld_13, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15660:49") else null)); 
--# expr-done 8509
--# expr-start 8510 '<FieldAccess for sub_equation at nodes.lkt:15662:54>' Fld_14 ada/nodes.lkt:15662
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_14 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_0.Info);
--# end
--# expr-done 8510
And_Pred := Create_And (Bind_Result, Fld_14, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15660:49") else null)); 
--# expr-done 8511
--# expr-start 8512 '<FieldAccess for matches_expected_type at nodes.lkt:15664:50>' Fld_15 ada/nodes.lkt:15664
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_15 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Match_0.Node, Origin => Origin);
--# end
--# expr-done 8512
And_Pred_1 := Create_And (And_Pred, Fld_15, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15659:45") else null)); 
--# expr-done 8513
   If_Result_1 := And_Pred_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 8514
Let_Result := If_Result_1; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3062;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind t Match_1
--# expr-start 8515 '<FieldAccess for xref_equation at nodes.lkt:15669:41>' Fld_17 ada/nodes.lkt:15669
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_17 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Match_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_1.Info);
--# end
--# expr-done 8515
Let_Result_1 := Fld_17; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3063;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Others_Designator =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Others_Designator
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind _ Match_2
True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15670:65") else null)); 
Let_Result_2 := True_Rel; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3064;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Elsif_Stmt_Part | Ada_For_Loop_Iter_Filter .. Ada_Null_Component_Decl | Ada_Overriding_Not_Overriding .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_5; 
--# bind _ Match_3
Let_Result_3 := raise Property_Error with "Should not happen"; Inc_Ref (Let_Result_3);
--# end
Scope_Result_3 := Let_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
end case;
--# expr-done 8516
         declare
            Item_To_Append : constant Logic_Equation := Match_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3061;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8517
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15646:29") else null)); 
--# expr-done 8518
--# expr-start 8522 '<Bind at nodes.lkt:15679:33>' Bind_Result_1 ada/nodes.lkt:15679
--# expr-start 8519 '<FieldAccess for type_var at nodes.lkt:15679:33>' Fld_18 ada/nodes.lkt:15679
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8519
Fld_18.Value := No_Entity;
Entity_Vars.Reset (Fld_18);
--# expr-start 8521 '<FieldAccess for expected_type_var at nodes.lkt:15680:37>' Fld_20 ada/nodes.lkt:15680
--# expr-start 8520 '<FieldAccess for expr at nodes.lkt:15680:37>' Fld_19 ada/nodes.lkt:15680
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8520
      if Fld_19.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_19.Node);
--# expr-done 8521
Fld_20.Value := No_Entity;
Entity_Vars.Reset (Fld_20);
Bind_Result_1 := Solver.Create_Unify (Fld_18, Fld_20, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15679:33") else null)); 
--# expr-done 8522
And_Pred_2 := Create_And (Logic_Boolean_Op, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15646:29") else null)); 
--# expr-done 8523
--# expr-start 8527 '<NPropagate at nodes.lkt:15683:30>' Bind_Result_2 ada/nodes.lkt:15683
--# expr-start 8524 '<FieldAccess for expected_type_var at nodes.lkt:15685:29>' Fld_23 ada/nodes.lkt:15685
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8524
Fld_23.Value := No_Entity;
Entity_Vars.Reset (Fld_23);
--# expr-start 8526 '<FieldAccess for expected_type_var at nodes.lkt:15683:30>' Fld_22 ada/nodes.lkt:15683
--# expr-start 8525 '<FieldAccess for expr at nodes.lkt:15683:30>' Fld_21 ada/nodes.lkt:15683
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8525
      if Fld_21.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_21.Node);
--# expr-done 8526
Fld_22.Value := No_Entity;
Entity_Vars.Reset (Fld_22);
Bind_Result_2 := Solver.Create_Propagate (Fld_23, Fld_22, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15683:30") else null)); 
--# expr-done 8527
And_Pred_3 := Create_And (And_Pred_2, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15645:25") else null)); 
--# expr-done 8528
--# expr-start 8530 '<FieldAccess for sub_equation at nodes.lkt:15688:26>' Fld_25 ada/nodes.lkt:15688
--# expr-start 8529 '<FieldAccess for expr at nodes.lkt:15688:26>' Fld_24 ada/nodes.lkt:15688
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8529
      if Fld_24.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_25 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_24.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_24.Info);
--# end
--# expr-done 8530
And_Pred_4 := Create_And (And_Pred_3, Fld_25, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15644:21") else null)); 
--# expr-done 8531
--# expr-start 8533 '<FieldAccess for matches_expected_type at nodes.lkt:15690:22>' Fld_27 ada/nodes.lkt:15690
--# expr-start 8532 '<FieldAccess for expr at nodes.lkt:15690:22>' Fld_26 ada/nodes.lkt:15690
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8532
      if Fld_26.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_27 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_26.Node, Origin => Origin);
--# end
--# expr-done 8533
And_Pred_5 := Create_And (And_Pred_4, Fld_27, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15643:17") else null)); 
--# expr-done 8534
--# expr-start 8552 '<If at nodes.lkt:15693:17>' If_Result_3 ada/nodes.lkt:15693
--# expr-start 8536 '<FieldAccess for has_context_free_type at nodes.lkt:15693:20>' Fld_38 ada/nodes.lkt:15693
--# expr-start 8535 '<FieldAccess for expr at nodes.lkt:15693:20>' Fld_37 ada/nodes.lkt:15693
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_37 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8535
      if Fld_37.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.has_context_free_type'
Fld_38 := Libadalang.Implementation.Dispatcher_Expr_P_Has_Context_Free_Type (Node => Fld_37.Node);
--# end
--# expr-done 8536
if Fld_38 then
   --# expr-start 8551 '<LogicBinaryOp Or at nodes.lkt:15695:21>' Or_Pred ada/nodes.lkt:15695
--# expr-start 8550 '<LogicBinaryOp And at nodes.lkt:15696:25>' And_Pred_7 ada/nodes.lkt:15696
--# expr-start 8545 '<LogicBinaryOp And at nodes.lkt:15697:29>' And_Pred_6 ada/nodes.lkt:15697
--# expr-start 8539 '<Predicate on BaseTypeDecl.is_not_universal_type at nodes.lkt:15697:29>' Pred_1 ada/nodes.lkt:15697
--# expr-start 8538 '<FieldAccess for type_var at nodes.lkt:15697:65>' Fld_29 ada/nodes.lkt:15697
--# expr-start 8537 '<FieldAccess for expr at nodes.lkt:15697:65>' Fld_28 ada/nodes.lkt:15697
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8537
      if Fld_28.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_29 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_28.Node);
--# expr-done 8538
Fld_29.Value := No_Entity;
Entity_Vars.Reset (Fld_29);
Pred_1 := Solver.Create_Predicate (Fld_29, Create_Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate); 
--# expr-done 8539
--# expr-start 8544 '<NPropagate at nodes.lkt:15700:34>' Bind_Result_3 ada/nodes.lkt:15700
--# expr-start 8541 '<FieldAccess for type_var at nodes.lkt:15701:59>' Fld_33 ada/nodes.lkt:15701
--# expr-start 8540 '<FieldAccess for expr at nodes.lkt:15701:59>' Fld_32 ada/nodes.lkt:15701
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8540
      if Fld_32.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_32.Node);
--# expr-done 8541
Fld_33.Value := No_Entity;
Entity_Vars.Reset (Fld_33);
--# expr-start 8543 '<FieldAccess for expected_type_var at nodes.lkt:15700:34>' Fld_31 ada/nodes.lkt:15700
--# expr-start 8542 '<FieldAccess for expr at nodes.lkt:15700:34>' Fld_30 ada/nodes.lkt:15700
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8542
      if Fld_30.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_30.Node);
--# expr-done 8543
Fld_31.Value := No_Entity;
Entity_Vars.Reset (Fld_31);
Bind_Result_3 := Solver.Create_Propagate (Fld_33, Fld_31, Logic_Functor_843'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15700:34") else null)); 
--# expr-done 8544
And_Pred_6 := Create_And (Pred_1, Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15697:29") else null)); 
--# expr-done 8545
--# expr-start 8549 '<Bind at nodes.lkt:15703:30>' Bind_Result_4 ada/nodes.lkt:15703
--# expr-start 8547 '<FieldAccess for expected_type_var at nodes.lkt:15703:30>' Fld_35 ada/nodes.lkt:15703
--# expr-start 8546 '<FieldAccess for expr at nodes.lkt:15703:30>' Fld_34 ada/nodes.lkt:15703
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_34 := Create_Internal_Entity_Expr (Node => Item_0.Node.Case_Expr_Alternative_F_Expr, Info => Item_0.Info);
--# expr-done 8546
      if Fld_34.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_35 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_34.Node);
--# expr-done 8547
Fld_35.Value := No_Entity;
Entity_Vars.Reset (Fld_35);
--# expr-start 8548 '<FieldAccess for expected_type_var at nodes.lkt:15704:29>' Fld_36 ada/nodes.lkt:15704
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_36 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8548
Fld_36.Value := No_Entity;
Entity_Vars.Reset (Fld_36);
Bind_Result_4 := Solver.Create_Unify (Fld_35, Fld_36, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15703:30") else null)); 
--# expr-done 8549
And_Pred_7 := Create_And (And_Pred_6, Bind_Result_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15696:25") else null)); 
--# expr-done 8550
True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15706:25") else null)); 
Or_Pred := Create_Or (And_Pred_7, True_Rel_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15695:21") else null)); 
--# expr-done 8551
   If_Result_3 := Or_Pred;
else
   True_Rel_2 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15707:22") else null)); 
   If_Result_3 := True_Rel_2;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 8552
And_Pred_8 := Create_And (And_Pred_5, If_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15642:13") else null)); 
--# expr-done 8553
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_8;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3060;
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 8554
Logic_Boolean_Op_1 := Solver.Create_All (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15640:9") else null)); 
--# expr-done 8555
Let_Result_4 := Logic_Boolean_Op_1; Inc_Ref (Let_Result_4);
--# end
--# expr-done 8556
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1146;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1146;
                     Finalizer_Scope_3060;
                     Finalizer_Scope_3061;
                     Finalizer_Scope_3062;
                     Finalizer_Scope_3063;
                     Finalizer_Scope_3064;
            raise;
      end;
   return Property_Result;
end Case_Expr_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_If_Expr
   --
      procedure Initialize_Fields_For_If_Expr
        (Self : Bare_If_Expr
         ; If_Expr_F_Cond_Expr : Bare_Expr
         ; If_Expr_F_Then_Expr : Bare_Expr
         ; If_Expr_F_Alternatives : Bare_Elsif_Expr_Part_List
         ; If_Expr_F_Else_Expr : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Cond_Expr
              (Self);
            Self.If_Expr_F_Cond_Expr := If_Expr_F_Cond_Expr;
            Self.If_Expr_F_Then_Expr := If_Expr_F_Then_Expr;
            Self.If_Expr_F_Alternatives := If_Expr_F_Alternatives;
            Self.If_Expr_F_Else_Expr := If_Expr_F_Else_Expr;
      end Initialize_Fields_For_If_Expr;
   function If_Expr_F_Cond_Expr
     (Node : Bare_If_Expr) return Bare_Expr
   is
   begin
         return Node.If_Expr_F_Cond_Expr;
   end;
   function If_Expr_F_Then_Expr
     (Node : Bare_If_Expr) return Bare_Expr
   is
   begin
         return Node.If_Expr_F_Then_Expr;
   end;
   function If_Expr_F_Alternatives
     (Node : Bare_If_Expr) return Bare_Elsif_Expr_Part_List
   is
   begin
         return Node.If_Expr_F_Alternatives;
   end;
   function If_Expr_F_Else_Expr
     (Node : Bare_If_Expr) return Bare_Expr
   is
   begin
         return Node.If_Expr_F_Else_Expr;
   end;
--# property-start IfExpr.has_context_free_type ada/nodes.lkt:15725
pragma Warnings (Off, "is not referenced");
 function If_Expr_P_Has_Context_Free_Type
  (Node : Bare_If_Expr
  )
   return Boolean
is
   Self : Bare_If_Expr  := Bare_If_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end If_Expr_P_Has_Context_Free_Type;
--# end
--# property-start IfExpr.dependent_exprs ada/nodes.lkt:15727
pragma Warnings (Off, "is not referenced");
 function If_Expr_P_Dependent_Exprs
  (Node : Bare_If_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr_Array_Access
is
   Self : Bare_If_Expr  := Bare_If_Expr (Node);
     Ent : Internal_Entity_If_Expr :=
       Internal_Entity_If_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_1148 with Inline_Always;
            procedure Finalizer_Scope_3067 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Expr;
Fld : Internal_Entity_Expr;
Array_Lit : Internal_Entity_Expr_Array_Access;
Fld_1 : Internal_Entity_Elsif_Expr_Part_List;
Fld_2 : Bare_Elsif_Expr_Part_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Elsif_Expr_Part;
Bare_Item_0 : Bare_Elsif_Expr_Part;
Fld_4 : Internal_Entity_Expr;
As_Entity : Internal_Entity_Elsif_Expr_Part;
Is_Null : Boolean;
If_Result : Internal_Entity_Elsif_Expr_Part;
Map_Result : Internal_Entity_Expr_Array_Access;
Concat_Result : Internal_Entity_Expr_Array_Access;
Fld_5 : Internal_Entity_Expr;
Array_Lit_1 : Internal_Entity_Expr_Array_Access;
Scope_Result : Internal_Entity_Expr_Array_Access;
Result_Var : Internal_Entity_Expr_Array_Access;
Concat_Result_1 : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_1148 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Concat_Result_1);
            end Finalizer_Scope_1148;
            procedure Finalizer_Scope_3067 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_3067;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8558 '<ArrayLiteral at nodes.lkt:15728:9>' Array_Lit ada/nodes.lkt:15728
--# expr-start 8557 '<FieldAccess for then_expr at nodes.lkt:15728:10>' Fld ada/nodes.lkt:15728
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Then_Expr, Info => Ent.Info);
--# expr-done 8557
Array_Lit := Create_Internal_Entity_Expr_Array (Internal_Internal_Entity_Expr_Array'(1 => Fld)); 
--# expr-done 8558
--# expr-start 8561 '<Map at nodes.lkt:15728:28>' Map_Result ada/nodes.lkt:15728
   --# expr-start 8559 '<FieldAccess for alternatives at nodes.lkt:15728:28>' Fld_1 ada/nodes.lkt:15728
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Elsif_Expr_Part_List (Node => Ent.Node.If_Expr_F_Alternatives, Info => Ent.Info);
--# expr-done 8559
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Internal_Entity_Expr_Array (0);
      else
      declare
         Collection : constant Bare_Elsif_Expr_Part_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Elsif_Expr_Part;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind a Item_0
      --# expr-start 8560 '<FieldAccess for then_expr at nodes.lkt:15728:57>' Fld_4 ada/nodes.lkt:15728
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Item_0.Node.Elsif_Expr_Part_F_Then_Expr, Info => Item_0.Info);
--# expr-done 8560
         declare
            Item_To_Append : constant Internal_Entity_Expr := Fld_4;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8561
Concat_Result := Concat (Array_Lit, Map_Result); 
--# expr-start 8562 '<FieldAccess for else_expr at nodes.lkt:15729:11>' Fld_5 ada/nodes.lkt:15729
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Else_Expr, Info => Ent.Info);
--# expr-done 8562
Var_Expr_1 := Fld_5;
if Var_Expr_1 /= No_Entity_Expr then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 8563 '<ArrayLiteral at nodes.lkt:15729:37>' Array_Lit_1 ada/nodes.lkt:15729
Array_Lit_1 := Create_Internal_Entity_Expr_Array (Internal_Internal_Entity_Expr_Array'(1 => Var_Expr_1)); 
--# expr-done 8563
Scope_Result := Array_Lit_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3067;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Expr_Array_Type;
end if;
      Inc_Ref (Result_Var);
Concat_Result_1 := Concat (Concat_Result, Result_Var); 
         Property_Result := Concat_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1148;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1148;
                     Finalizer_Scope_3067;
            raise;
      end;
   return Property_Result;
end If_Expr_P_Dependent_Exprs;
--# end
--# property-start IfExpr.xref_equation ada/nodes.lkt:15732
pragma Warnings (Off, "is not referenced");
 function If_Expr_P_Xref_Equation
  (Node : Bare_If_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_If_Expr  := Bare_If_Expr (Node);
     Ent : Internal_Entity_If_Expr :=
       Internal_Entity_If_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1149 with Inline_Always;
            procedure Finalizer_Scope_3068 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_6 : Internal_Entity_Elsif_Expr_Part_List;
Fld_7 : Bare_Elsif_Expr_Part_List;
Fld_8 : Internal_Entity_Info;
Item_0 : Internal_Entity_Elsif_Expr_Part;
Bare_Item_0 : Bare_Elsif_Expr_Part;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Logic_Equation;
Fld_11 : Internal_Entity_Expr;
Fld_12 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_13 : Internal_Entity_Expr;
Fld_14 : Logic_Equation;
And_Pred_3 : Logic_Equation;
As_Entity : Internal_Entity_Elsif_Expr_Part;
Is_Null : Boolean;
If_Result : Internal_Entity_Elsif_Expr_Part;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_15 : Internal_Entity_Expr;
Fld_16 : Logic_Equation;
Fld_17 : Internal_Entity_Expr;
Fld_18 : Logic_Equation;
Fld_19 : Bare_Expr;
Is_Null_1 : Boolean;
Not_Val : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Fld_20 : Logic_Var;
Pred : Logic_Equation;
Fld_21 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_22 : Logic_Var;
Node_For_Entity : Bare_Base_Type_Decl;
As_Entity_1 : Internal_Entity_Base_Type_Decl;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_23 : Logic_Equation;
And_Pred_7 : Logic_Equation;
Or_Pred : Logic_Equation;
And_Pred_8 : Logic_Equation;
            procedure Finalizer_Scope_1149 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_18);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Pred);
                     Dec_Ref (Fld_21);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_23);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (And_Pred_8);
            end Finalizer_Scope_1149;
            procedure Finalizer_Scope_3068 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_12);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_14);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_3068;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8603 '<LogicBinaryOp And at nodes.lkt:15733:9>' And_Pred_8 ada/nodes.lkt:15733
--# expr-start 8592 '<LogicBinaryOp And at nodes.lkt:15735:13>' And_Pred_5 ada/nodes.lkt:15735
--# expr-start 8583 '<LogicBinaryOp And at nodes.lkt:15736:17>' And_Pred_4 ada/nodes.lkt:15736
--# expr-start 8571 '<LogicBinaryOp And at nodes.lkt:15737:21>' And_Pred_1 ada/nodes.lkt:15737
--# expr-start 8568 '<LogicBinaryOp And at nodes.lkt:15738:25>' And_Pred ada/nodes.lkt:15738
--# expr-start 8565 '<FieldAccess for sub_equation at nodes.lkt:15738:25>' Fld_1 ada/nodes.lkt:15738
--# expr-start 8564 '<FieldAccess for cond_expr at nodes.lkt:15738:25>' Fld ada/nodes.lkt:15738
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Cond_Expr, Info => Ent.Info);
--# expr-done 8564
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 8565
--# expr-start 8567 '<FieldAccess for expect_bool_derived_type at nodes.lkt:15739:30>' Fld_3 ada/nodes.lkt:15739
--# expr-start 8566 '<FieldAccess for cond_expr at nodes.lkt:15739:30>' Fld_2 ada/nodes.lkt:15739
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Cond_Expr, Info => Ent.Info);
--# expr-done 8566
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_3 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Fld_2.Node, Origin => Origin);
--# end
--# expr-done 8567
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15738:25") else null)); 
--# expr-done 8568
--# expr-start 8570 '<FieldAccess for sub_equation at nodes.lkt:15743:25>' Fld_5 ada/nodes.lkt:15743
--# expr-start 8569 '<FieldAccess for then_expr at nodes.lkt:15743:25>' Fld_4 ada/nodes.lkt:15743
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Then_Expr, Info => Ent.Info);
--# expr-done 8569
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_4.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_4.Info);
--# end
--# expr-done 8570
And_Pred_1 := Create_And (And_Pred, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15737:21") else null)); 
--# expr-done 8571
--# expr-start 8582 '<LogicAll at nodes.lkt:15746:22>' Logic_Boolean_Op ada/nodes.lkt:15746
--# expr-start 8581 '<Map at nodes.lkt:15746:22>' Map_Result ada/nodes.lkt:15746
   --# expr-start 8572 '<FieldAccess for alternatives at nodes.lkt:15746:22>' Fld_6 ada/nodes.lkt:15746
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Elsif_Expr_Part_List (Node => Ent.Node.If_Expr_F_Alternatives, Info => Ent.Info);
--# expr-done 8572
Fld_7 := Fld_6.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_7 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Elsif_Expr_Part_List := Fld_7;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Elsif_Expr_Part;
else
Fld_8 := Fld_6.Info;
As_Entity := (Info => Fld_8, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind elsif Item_0
      --# expr-start 8580 '<LogicBinaryOp And at nodes.lkt:15748:21>' And_Pred_3 ada/nodes.lkt:15748
--# expr-start 8577 '<LogicBinaryOp And at nodes.lkt:15750:25>' And_Pred_2 ada/nodes.lkt:15750
--# expr-start 8574 '<FieldAccess for sub_equation at nodes.lkt:15750:25>' Fld_10 ada/nodes.lkt:15750
--# expr-start 8573 '<FieldAccess for cond_expr at nodes.lkt:15750:25>' Fld_9 ada/nodes.lkt:15750
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Expr (Node => Item_0.Node.Elsif_Expr_Part_F_Cond_Expr, Info => Item_0.Info);
--# expr-done 8573
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_10 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_9.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_9.Info);
--# end
--# expr-done 8574
--# expr-start 8576 '<FieldAccess for expect_bool_derived_type at nodes.lkt:15751:30>' Fld_12 ada/nodes.lkt:15751
--# expr-start 8575 '<FieldAccess for cond_expr at nodes.lkt:15751:30>' Fld_11 ada/nodes.lkt:15751
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Expr (Node => Item_0.Node.Elsif_Expr_Part_F_Cond_Expr, Info => Item_0.Info);
--# expr-done 8575
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_12 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Fld_11.Node, Origin => Origin);
--# end
--# expr-done 8576
And_Pred_2 := Create_And (Fld_10, Fld_12, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15750:25") else null)); 
--# expr-done 8577
--# expr-start 8579 '<FieldAccess for sub_equation at nodes.lkt:15753:26>' Fld_14 ada/nodes.lkt:15753
--# expr-start 8578 '<FieldAccess for then_expr at nodes.lkt:15753:26>' Fld_13 ada/nodes.lkt:15753
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Expr (Node => Item_0.Node.Elsif_Expr_Part_F_Then_Expr, Info => Item_0.Info);
--# expr-done 8578
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_14 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_13.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_13.Info);
--# end
--# expr-done 8579
And_Pred_3 := Create_And (And_Pred_2, Fld_14, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15748:21") else null)); 
--# expr-done 8580
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3068;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8581
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15746:22") else null)); 
--# expr-done 8582
And_Pred_4 := Create_And (And_Pred_1, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15736:17") else null)); 
--# expr-done 8583
--# expr-start 8591 '<If at nodes.lkt:15757:17>' If_Result_1 ada/nodes.lkt:15757
--# expr-start 8586 '<Not at nodes.lkt:15757:20>' Not_Val ada/nodes.lkt:15757
--# expr-start 8585 '<IsNull at nodes.lkt:15757:24>' Is_Null_1 ada/nodes.lkt:15757
--# expr-start 8584 '<FieldAccess for else_expr at nodes.lkt:15757:24>' Fld_19 ada/nodes.lkt:15757
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Self.If_Expr_F_Else_Expr;
--# expr-done 8584
Is_Null_1 := Fld_19 = null; 
--# expr-done 8585
Not_Val := not (Is_Null_1); 
--# expr-done 8586
if Not_Val then
   --# expr-start 8588 '<FieldAccess for sub_equation at nodes.lkt:15760:21>' Fld_16 ada/nodes.lkt:15760
--# expr-start 8587 '<FieldAccess for else_expr at nodes.lkt:15760:21>' Fld_15 ada/nodes.lkt:15760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Else_Expr, Info => Ent.Info);
--# expr-done 8587
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_16 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_15.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_15.Info);
--# end
--# expr-done 8588
   If_Result_1 := Fld_16;
else
   --# expr-start 8590 '<FieldAccess for expect_bool_derived_type at nodes.lkt:15764:21>' Fld_18 ada/nodes.lkt:15764
--# expr-start 8589 '<FieldAccess for then_expr at nodes.lkt:15764:21>' Fld_17 ada/nodes.lkt:15764
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Then_Expr, Info => Ent.Info);
--# expr-done 8589
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_18 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Fld_17.Node, Origin => Origin);
--# end
--# expr-done 8590
   If_Result_1 := Fld_18;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 8591
And_Pred_5 := Create_And (And_Pred_4, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15735:13") else null)); 
--# expr-done 8592
--# expr-start 8602 '<LogicBinaryOp Or at nodes.lkt:15769:13>' Or_Pred ada/nodes.lkt:15769
--# expr-start 8596 '<LogicBinaryOp And at nodes.lkt:15770:17>' And_Pred_6 ada/nodes.lkt:15770
--# expr-start 8594 '<Predicate on AdaNode.is_not_null at nodes.lkt:15770:17>' Pred ada/nodes.lkt:15770
--# expr-start 8593 '<FieldAccess for expected_type_var at nodes.lkt:15770:38>' Fld_20 ada/nodes.lkt:15770
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8593
Fld_20.Value := No_Entity;
Entity_Vars.Reset (Fld_20);
Pred := Solver.Create_Predicate (Fld_20, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 8594
--# expr-start 8595 '<FieldAccess for expected_type_equation at nodes.lkt:15771:22>' Fld_21 ada/nodes.lkt:15771
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start IfExpr.expected_type_equation
Fld_21 := Libadalang.Implementation.If_Expr_P_Expected_Type_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 8595
And_Pred_6 := Create_And (Pred, Fld_21, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15770:17") else null)); 
--# expr-done 8596
--# expr-start 8601 '<LogicBinaryOp And at nodes.lkt:15774:17>' And_Pred_7 ada/nodes.lkt:15774
--# expr-start 8599 '<Bind at nodes.lkt:15774:17>' Bind_Result ada/nodes.lkt:15774
--# expr-start 8597 '<FieldAccess for expected_type_var at nodes.lkt:15774:17>' Fld_22 ada/nodes.lkt:15774
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8597
Fld_22.Value := No_Entity;
Entity_Vars.Reset (Fld_22);
--# expr-start 8598 '<No BaseTypeDecl at nodes.lkt:15774:45>' Node_For_Entity ada/nodes.lkt:15774
Node_For_Entity := No_Bare_Ada_Node;
--# expr-done 8598
Is_Null_2 := Node_For_Entity = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Base_Type_Decl;
else
As_Entity_1 := (Info => E_Info, Node => Node_For_Entity); 
   If_Result_2 := As_Entity_1;
end if;
      Cast_Result := Create_Internal_Entity
        (Node => If_Result_2.Node,
         Info => If_Result_2.Info);
Bind_Result := Solver.Create_Assign (Fld_22, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15774:17") else null)); 
--# expr-done 8599
--# expr-start 8600 '<FieldAccess for no_expected_type_equation at nodes.lkt:15775:22>' Fld_23 ada/nodes.lkt:15775
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start IfExpr.no_expected_type_equation
Fld_23 := Libadalang.Implementation.If_Expr_P_No_Expected_Type_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 8600
And_Pred_7 := Create_And (Bind_Result, Fld_23, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15774:17") else null)); 
--# expr-done 8601
Or_Pred := Create_Or (And_Pred_6, And_Pred_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15769:13") else null)); 
--# expr-done 8602
And_Pred_8 := Create_And (And_Pred_5, Or_Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15733:9") else null)); 
--# expr-done 8603
         Property_Result := And_Pred_8;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1149;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1149;
                     Finalizer_Scope_3068;
            raise;
      end;
   return Property_Result;
end If_Expr_P_Xref_Equation;
--# end
--# property-start IfExpr.expected_type_equation ada/nodes.lkt:15783
pragma Warnings (Off, "is not referenced");
 function If_Expr_P_Expected_Type_Equation
  (Node : Bare_If_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_If_Expr  := Bare_If_Expr (Node);
     Ent : Internal_Entity_If_Expr :=
       Internal_Entity_If_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1150 with Inline_Always;
            procedure Finalizer_Scope_3069 with Inline_Always;
            procedure Finalizer_Scope_3071 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Bare_Expr;
Fld_2 : Logic_Var;
Bind_Result : Logic_Equation;
Fld_3 : Logic_Var;
Fld_4 : Bare_Expr;
Fld_5 : Logic_Var;
Bind_Result_1 : Logic_Equation;
Fld_6 : Bare_Expr;
Fld_7 : Logic_Var;
Fld_8 : Logic_Var;
Bind_Result_2 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_9 : Bare_Expr;
Fld_10 : Logic_Var;
Fld_11 : Logic_Var;
Bind_Result_3 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_14 : Internal_Entity_Expr;
Fld_15 : Logic_Equation;
And_Pred_3 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_16 : Bare_Expr;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_17 : Internal_Entity_Elsif_Expr_Part_List;
Fld_18 : Bare_Elsif_Expr_Part_List;
Fld_19 : Internal_Entity_Info;
Item_0 : Internal_Entity_Elsif_Expr_Part;
Bare_Item_0 : Bare_Elsif_Expr_Part;
Fld_20 : Logic_Var;
Fld_21 : Internal_Entity_Expr;
Fld_22 : Logic_Var;
Bind_Result_4 : Logic_Equation;
Fld_23 : Internal_Entity_Expr;
Fld_24 : Logic_Var;
Fld_25 : Logic_Var;
Bind_Result_5 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Fld_26 : Internal_Entity_Expr;
Fld_27 : Logic_Equation;
And_Pred_6 : Logic_Equation;
As_Entity : Internal_Entity_Elsif_Expr_Part;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Elsif_Expr_Part;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_7 : Logic_Equation;
Fld_28 : Internal_Entity_Expr_Array_Access;
Fld_29 : Boolean;
Map_Result_1 : Internal_Entity_Expr_Array_Access;
Fld_30 : Logic_Var;
Pred : Logic_Equation;
Fld_31 : Logic_Var;
Fld_32 : Logic_Var;
Bind_Result_6 : Logic_Equation;
And_Pred_8 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Or_Pred : Logic_Equation;
Map_Result_2 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
And_Pred_9 : Logic_Equation;
            procedure Finalizer_Scope_1150 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_13);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_15);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (Fld_28);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (And_Pred_9);
            end Finalizer_Scope_1150;
            procedure Finalizer_Scope_3069 is
            begin
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (Bind_Result_5);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Fld_27);
                     Dec_Ref (And_Pred_6);
            end Finalizer_Scope_3069;
            procedure Finalizer_Scope_3071 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result_6);
                     Dec_Ref (And_Pred_8);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Or_Pred);
            end Finalizer_Scope_3071;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8661 '<LogicBinaryOp And at nodes.lkt:15784:9>' And_Pred_9 ada/nodes.lkt:15784
--# expr-start 8648 '<LogicBinaryOp And at nodes.lkt:15785:13>' And_Pred_7 ada/nodes.lkt:15785
--# expr-start 8632 '<LogicBinaryOp And at nodes.lkt:15786:17>' And_Pred_4 ada/nodes.lkt:15786
--# expr-start 8607 '<Bind at nodes.lkt:15786:17>' Bind_Result ada/nodes.lkt:15786
--# expr-start 8604 '<FieldAccess for type_var at nodes.lkt:15786:17>' Fld ada/nodes.lkt:15786
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8604
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 8606 '<FieldAccess for expected_type_var at nodes.lkt:15786:37>' Fld_2 ada/nodes.lkt:15786
--# expr-start 8605 '<FieldAccess for then_expr at nodes.lkt:15786:37>' Fld_1 ada/nodes.lkt:15786
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.If_Expr_F_Then_Expr;
--# expr-done 8605
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_1);
--# expr-done 8606
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result := Solver.Create_Unify (Fld, Fld_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15786:17") else null)); 
--# expr-done 8607
--# expr-start 8631 '<If at nodes.lkt:15788:21>' If_Result ada/nodes.lkt:15788
--# expr-start 8610 '<Not at nodes.lkt:15788:24>' Not_Val ada/nodes.lkt:15788
--# expr-start 8609 '<IsNull at nodes.lkt:15788:28>' Is_Null ada/nodes.lkt:15788
--# expr-start 8608 '<FieldAccess for else_expr at nodes.lkt:15788:28>' Fld_16 ada/nodes.lkt:15788
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Self.If_Expr_F_Else_Expr;
--# expr-done 8608
Is_Null := Fld_16 = null; 
--# expr-done 8609
Not_Val := not (Is_Null); 
--# expr-done 8610
if Not_Val then
   --# expr-start 8630 '<LogicBinaryOp And at nodes.lkt:15790:25>' And_Pred_3 ada/nodes.lkt:15790
--# expr-start 8627 '<LogicBinaryOp And at nodes.lkt:15791:29>' And_Pred_2 ada/nodes.lkt:15791
--# expr-start 8624 '<LogicBinaryOp And at nodes.lkt:15792:33>' And_Pred_1 ada/nodes.lkt:15792
--# expr-start 8619 '<LogicBinaryOp And at nodes.lkt:15793:37>' And_Pred ada/nodes.lkt:15793
--# expr-start 8614 '<Bind at nodes.lkt:15793:37>' Bind_Result_1 ada/nodes.lkt:15793
--# expr-start 8611 '<FieldAccess for type_var at nodes.lkt:15793:37>' Fld_3 ada/nodes.lkt:15793
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8611
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 8613 '<FieldAccess for expected_type_var at nodes.lkt:15794:41>' Fld_5 ada/nodes.lkt:15794
--# expr-start 8612 '<FieldAccess for else_expr at nodes.lkt:15794:41>' Fld_4 ada/nodes.lkt:15794
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.If_Expr_F_Else_Expr;
--# expr-done 8612
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_4);
--# expr-done 8613
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Bind_Result_1 := Solver.Create_Unify (Fld_3, Fld_5, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15793:37") else null)); 
--# expr-done 8614
--# expr-start 8618 '<NPropagate at nodes.lkt:15795:42>' Bind_Result_2 ada/nodes.lkt:15795
--# expr-start 8615 '<FieldAccess for expected_type_var at nodes.lkt:15797:41>' Fld_8 ada/nodes.lkt:15797
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8615
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
--# expr-start 8617 '<FieldAccess for expected_type_var at nodes.lkt:15795:42>' Fld_7 ada/nodes.lkt:15795
--# expr-start 8616 '<FieldAccess for else_expr at nodes.lkt:15795:42>' Fld_6 ada/nodes.lkt:15795
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.If_Expr_F_Else_Expr;
--# expr-done 8616
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_6);
--# expr-done 8617
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
Bind_Result_2 := Solver.Create_Propagate (Fld_8, Fld_7, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15795:42") else null)); 
--# expr-done 8618
And_Pred := Create_And (Bind_Result_1, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15793:37") else null)); 
--# expr-done 8619
--# expr-start 8623 '<NPropagate at nodes.lkt:15800:38>' Bind_Result_3 ada/nodes.lkt:15800
--# expr-start 8620 '<FieldAccess for expected_type_var at nodes.lkt:15802:37>' Fld_11 ada/nodes.lkt:15802
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8620
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
--# expr-start 8622 '<FieldAccess for expected_type_var at nodes.lkt:15800:38>' Fld_10 ada/nodes.lkt:15800
--# expr-start 8621 '<FieldAccess for then_expr at nodes.lkt:15800:38>' Fld_9 ada/nodes.lkt:15800
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.If_Expr_F_Then_Expr;
--# expr-done 8621
      if Fld_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_9);
--# expr-done 8622
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
Bind_Result_3 := Solver.Create_Propagate (Fld_11, Fld_10, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15800:38") else null)); 
--# expr-done 8623
And_Pred_1 := Create_And (And_Pred, Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15792:33") else null)); 
--# expr-done 8624
--# expr-start 8626 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15805:34>' Fld_13 ada/nodes.lkt:15805
--# expr-start 8625 '<FieldAccess for else_expr at nodes.lkt:15805:34>' Fld_12 ada/nodes.lkt:15805
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Else_Expr, Info => Ent.Info);
--# expr-done 8625
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_13 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_12.Node, Origin => Origin);
--# end
--# expr-done 8626
And_Pred_2 := Create_And (And_Pred_1, Fld_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15791:29") else null)); 
--# expr-done 8627
--# expr-start 8629 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15807:30>' Fld_15 ada/nodes.lkt:15807
--# expr-start 8628 '<FieldAccess for then_expr at nodes.lkt:15807:30>' Fld_14 ada/nodes.lkt:15807
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Expr (Node => Ent.Node.If_Expr_F_Then_Expr, Info => Ent.Info);
--# expr-done 8628
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_15 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_14.Node, Origin => Origin);
--# end
--# expr-done 8629
And_Pred_3 := Create_And (And_Pred_2, Fld_15, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15790:25") else null)); 
--# expr-done 8630
   If_Result := And_Pred_3;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15808:26") else null)); 
   If_Result := True_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 8631
And_Pred_4 := Create_And (Bind_Result, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15786:17") else null)); 
--# expr-done 8632
--# expr-start 8647 '<LogicAll at nodes.lkt:15811:18>' Logic_Boolean_Op ada/nodes.lkt:15811
--# expr-start 8646 '<Map at nodes.lkt:15811:18>' Map_Result ada/nodes.lkt:15811
   --# expr-start 8633 '<FieldAccess for alternatives at nodes.lkt:15811:18>' Fld_17 ada/nodes.lkt:15811
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Elsif_Expr_Part_List (Node => Ent.Node.If_Expr_F_Alternatives, Info => Ent.Info);
--# expr-done 8633
Fld_18 := Fld_17.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_18 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Elsif_Expr_Part_List := Fld_18;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Elsif_Expr_Part;
else
Fld_19 := Fld_17.Info;
As_Entity := (Info => Fld_19, Node => Bare_Item_0); 
   If_Result_1 := As_Entity;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind elsif Item_0
      --# expr-start 8645 '<LogicBinaryOp And at nodes.lkt:15813:17>' And_Pred_6 ada/nodes.lkt:15813
--# expr-start 8642 '<LogicBinaryOp And at nodes.lkt:15814:21>' And_Pred_5 ada/nodes.lkt:15814
--# expr-start 8637 '<Bind at nodes.lkt:15814:21>' Bind_Result_4 ada/nodes.lkt:15814
--# expr-start 8634 '<FieldAccess for type_var at nodes.lkt:15814:21>' Fld_20 ada/nodes.lkt:15814
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8634
Fld_20.Value := No_Entity;
Entity_Vars.Reset (Fld_20);
--# expr-start 8636 '<FieldAccess for expected_type_var at nodes.lkt:15814:41>' Fld_22 ada/nodes.lkt:15814
--# expr-start 8635 '<FieldAccess for then_expr at nodes.lkt:15814:41>' Fld_21 ada/nodes.lkt:15814
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Create_Internal_Entity_Expr (Node => Item_0.Node.Elsif_Expr_Part_F_Then_Expr, Info => Item_0.Info);
--# expr-done 8635
      if Fld_21.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_21.Node);
--# expr-done 8636
Fld_22.Value := No_Entity;
Entity_Vars.Reset (Fld_22);
Bind_Result_4 := Solver.Create_Unify (Fld_20, Fld_22, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15814:21") else null)); 
--# expr-done 8637
--# expr-start 8641 '<NPropagate at nodes.lkt:15815:26>' Bind_Result_5 ada/nodes.lkt:15815
--# expr-start 8638 '<FieldAccess for expected_type_var at nodes.lkt:15817:25>' Fld_25 ada/nodes.lkt:15817
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8638
Fld_25.Value := No_Entity;
Entity_Vars.Reset (Fld_25);
--# expr-start 8640 '<FieldAccess for expected_type_var at nodes.lkt:15815:26>' Fld_24 ada/nodes.lkt:15815
--# expr-start 8639 '<FieldAccess for then_expr at nodes.lkt:15815:26>' Fld_23 ada/nodes.lkt:15815
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Create_Internal_Entity_Expr (Node => Item_0.Node.Elsif_Expr_Part_F_Then_Expr, Info => Item_0.Info);
--# expr-done 8639
      if Fld_23.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_23.Node);
--# expr-done 8640
Fld_24.Value := No_Entity;
Entity_Vars.Reset (Fld_24);
Bind_Result_5 := Solver.Create_Propagate (Fld_25, Fld_24, Logic_Functor_868'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15815:26") else null)); 
--# expr-done 8641
And_Pred_5 := Create_And (Bind_Result_4, Bind_Result_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15814:21") else null)); 
--# expr-done 8642
--# expr-start 8644 '<FieldAccess for matches_expected_formal_type at nodes.lkt:15820:22>' Fld_27 ada/nodes.lkt:15820
--# expr-start 8643 '<FieldAccess for then_expr at nodes.lkt:15820:22>' Fld_26 ada/nodes.lkt:15820
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Create_Internal_Entity_Expr (Node => Item_0.Node.Elsif_Expr_Part_F_Then_Expr, Info => Item_0.Info);
--# expr-done 8643
      if Fld_26.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_27 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_26.Node, Origin => Origin);
--# end
--# expr-done 8644
And_Pred_6 := Create_And (And_Pred_5, Fld_27, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15813:17") else null)); 
--# expr-done 8645
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_6;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3069;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8646
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15811:18") else null)); 
--# expr-done 8647
And_Pred_7 := Create_And (And_Pred_4, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15785:13") else null)); 
--# expr-done 8648
--# expr-start 8660 '<LogicAll at nodes.lkt:15823:14>' Logic_Boolean_Op_1 ada/nodes.lkt:15823
--# expr-start 8659 '<Map at nodes.lkt:15823:14>' Map_Result_2 ada/nodes.lkt:15823
   --# expr-start 8651 '<Map at nodes.lkt:15823:14>' Map_Result_1 ada/nodes.lkt:15823
   --# expr-start 8649 '<FieldAccess for dependent_exprs at nodes.lkt:15823:14>' Fld_28 ada/nodes.lkt:15823
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]CondExpr.dependent_exprs'
Fld_28 := Libadalang.Implementation.Dispatcher_Cond_Expr_P_Dependent_Exprs (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8649
      declare
         Map_Result_1_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Fld_28;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
         --# expr-start 8650 '<FieldAccess for has_context_free_type at nodes.lkt:15823:51>' Fld_29 ada/nodes.lkt:15823
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.has_context_free_type'
Fld_29 := Libadalang.Implementation.Dispatcher_Expr_P_Has_Context_Free_Type (Node => Item_1.Node);
--# end
--# expr-done 8650
         if Fld_29 then
         declare
            Item_To_Append : constant Internal_Entity_Expr := Item_1;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 8651
      declare
         Map_Result_2_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Map_Result_1;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_2
      --# expr-start 8658 '<LogicBinaryOp Or at nodes.lkt:15826:13>' Or_Pred ada/nodes.lkt:15826
--# expr-start 8657 '<LogicBinaryOp And at nodes.lkt:15827:17>' And_Pred_8 ada/nodes.lkt:15827
--# expr-start 8653 '<Predicate on BaseTypeDecl.is_not_universal_type at nodes.lkt:15827:17>' Pred ada/nodes.lkt:15827
--# expr-start 8652 '<FieldAccess for type_var at nodes.lkt:15827:53>' Fld_30 ada/nodes.lkt:15827
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Item_2.Node);
--# expr-done 8652
Fld_30.Value := No_Entity;
Entity_Vars.Reset (Fld_30);
Pred := Solver.Create_Predicate (Fld_30, Create_Base_Type_Decl_P_Is_Not_Universal_Type_0_Predicate); 
--# expr-done 8653
--# expr-start 8656 '<NPropagate at nodes.lkt:15828:22>' Bind_Result_6 ada/nodes.lkt:15828
--# expr-start 8654 '<FieldAccess for type_var at nodes.lkt:15829:47>' Fld_32 ada/nodes.lkt:15829
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Item_2.Node);
--# expr-done 8654
Fld_32.Value := No_Entity;
Entity_Vars.Reset (Fld_32);
--# expr-start 8655 '<FieldAccess for expected_type_var at nodes.lkt:15828:22>' Fld_31 ada/nodes.lkt:15828
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Item_2.Node);
--# expr-done 8655
Fld_31.Value := No_Entity;
Entity_Vars.Reset (Fld_31);
Bind_Result_6 := Solver.Create_Propagate (Fld_32, Fld_31, Logic_Functor_843'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15828:22") else null)); 
--# expr-done 8656
And_Pred_8 := Create_And (Pred, Bind_Result_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15827:17") else null)); 
--# expr-done 8657
True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15831:17") else null)); 
Or_Pred := Create_Or (And_Pred_8, True_Rel_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15826:13") else null)); 
--# expr-done 8658
         declare
            Item_To_Append : constant Logic_Equation := Or_Pred;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3071;
         end loop;
      end;
         Map_Result_2 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_2_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 8659
Logic_Boolean_Op_1 := Solver.Create_All (Relation_Array (Map_Result_2.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15823:14") else null)); 
--# expr-done 8660
And_Pred_9 := Create_And (And_Pred_7, Logic_Boolean_Op_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15784:9") else null)); 
--# expr-done 8661
         Property_Result := And_Pred_9;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1150;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1150;
                     Finalizer_Scope_3069;
                     Finalizer_Scope_3071;
            raise;
      end;
   return Property_Result;
end If_Expr_P_Expected_Type_Equation;
--# end
--# property-start IfExpr.no_expected_type_equation ada/nodes.lkt:15839
pragma Warnings (Off, "is not referenced");
 function If_Expr_P_No_Expected_Type_Equation
  (Node : Bare_If_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_If_Expr  := Bare_If_Expr (Node);
     Ent : Internal_Entity_If_Expr :=
       Internal_Entity_If_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1151 with Inline_Always;
            procedure Finalizer_Scope_3073 with Inline_Always;
      Fld : Internal_Entity_Expr_Array_Access;
Fld_1 : Boolean;
Map_Result : Internal_Entity_Expr_Array_Access;
Fld_2 : Logic_Var;
Pred : Logic_Equation;
Fld_3 : Logic_Var;
Pred_1 : Logic_Equation;
Fld_4 : Logic_Var;
Fld_5 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Or_Pred : Logic_Equation;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1151 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1151;
            procedure Finalizer_Scope_3073 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Pred_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Or_Pred);
            end Finalizer_Scope_3073;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8675 '<LogicAll at nodes.lkt:15840:9>' Logic_Boolean_Op ada/nodes.lkt:15840
--# expr-start 8674 '<Map at nodes.lkt:15840:9>' Map_Result_1 ada/nodes.lkt:15840
   --# expr-start 8664 '<Map at nodes.lkt:15840:9>' Map_Result ada/nodes.lkt:15840
   --# expr-start 8662 '<FieldAccess for dependent_exprs at nodes.lkt:15840:9>' Fld ada/nodes.lkt:15840
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]CondExpr.dependent_exprs'
Fld := Libadalang.Implementation.Dispatcher_Cond_Expr_P_Dependent_Exprs (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8662
      declare
         Map_Result_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
         --# expr-start 8663 '<FieldAccess for has_context_free_type at nodes.lkt:15840:46>' Fld_1 ada/nodes.lkt:15840
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.has_context_free_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Has_Context_Free_Type (Node => Item_0.Node);
--# end
--# expr-done 8663
         if Fld_1 then
         declare
            Item_To_Append : constant Internal_Entity_Expr := Item_0;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8664
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Map_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
      --# expr-start 8673 '<LogicBinaryOp Or at nodes.lkt:15843:13>' Or_Pred ada/nodes.lkt:15843
--# expr-start 8666 '<Predicate on BaseTypeDecl.is_universal_type at nodes.lkt:15843:13>' Pred ada/nodes.lkt:15843
--# expr-start 8665 '<FieldAccess for type_var at nodes.lkt:15843:45>' Fld_2 ada/nodes.lkt:15843
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Item_1.Node);
--# expr-done 8665
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Pred := Solver.Create_Predicate (Fld_2, Create_Base_Type_Decl_P_Is_Universal_Type_0_Predicate); 
--# expr-done 8666
--# expr-start 8672 '<LogicBinaryOp And at nodes.lkt:15845:17>' And_Pred ada/nodes.lkt:15845
--# expr-start 8668 '<Predicate on AdaNode.is_not_null at nodes.lkt:15845:17>' Pred_1 ada/nodes.lkt:15845
--# expr-start 8667 '<FieldAccess for type_var at nodes.lkt:15845:38>' Fld_3 ada/nodes.lkt:15845
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Item_1.Node);
--# expr-done 8667
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Pred_1 := Solver.Create_Predicate (Fld_3, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 8668
--# expr-start 8671 '<NPropagate at nodes.lkt:15846:22>' Bind_Result ada/nodes.lkt:15846
--# expr-start 8669 '<FieldAccess for type_var at nodes.lkt:15847:47>' Fld_5 ada/nodes.lkt:15847
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Item_1.Node);
--# expr-done 8669
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 8670 '<FieldAccess for type_var at nodes.lkt:15846:22>' Fld_4 ada/nodes.lkt:15846
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8670
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Bind_Result := Solver.Create_Propagate (Fld_5, Fld_4, Logic_Functor_843'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15846:22") else null)); 
--# expr-done 8671
And_Pred := Create_And (Pred_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15845:17") else null)); 
--# expr-done 8672
Or_Pred := Create_Or (Pred, And_Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15843:13") else null)); 
--# expr-done 8673
         declare
            Item_To_Append : constant Logic_Equation := Or_Pred;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3073;
         end loop;
      end;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 8674
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15840:9") else null)); 
--# expr-done 8675
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1151;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1151;
                     Finalizer_Scope_3073;
            raise;
      end;
   return Property_Result;
end If_Expr_P_No_Expected_Type_Equation;
--# end
   --
   --  Primitives for Bare_Contract_Cases
   --
      procedure Initialize_Fields_For_Contract_Cases
        (Self : Bare_Contract_Cases
         ; Contract_Cases_F_Contract_Cases : Bare_Contract_Case_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Contract_Cases_F_Contract_Cases := Contract_Cases_F_Contract_Cases;
      end Initialize_Fields_For_Contract_Cases;
   function Contract_Cases_F_Contract_Cases
     (Node : Bare_Contract_Cases) return Bare_Contract_Case_Assoc_List
   is
   begin
         return Node.Contract_Cases_F_Contract_Cases;
   end;
   --
   --  Primitives for Bare_Decl_Expr
   --
      procedure Decl_Expr_Pre_Env_Actions
        (Self            : Bare_Decl_Expr;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_215 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Decl_Expr
        (Self : Bare_Decl_Expr
         ; Decl_Expr_F_Decls : Bare_Ada_Node_List
         ; Decl_Expr_F_Expr : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Decl_Expr_F_Decls := Decl_Expr_F_Decls;
            Self.Decl_Expr_F_Expr := Decl_Expr_F_Expr;
      end Initialize_Fields_For_Decl_Expr;
   function Decl_Expr_F_Decls
     (Node : Bare_Decl_Expr) return Bare_Ada_Node_List
   is
   begin
         return Node.Decl_Expr_F_Decls;
   end;
   function Decl_Expr_F_Expr
     (Node : Bare_Decl_Expr) return Bare_Expr
   is
   begin
         return Node.Decl_Expr_F_Expr;
   end;
--# property-start DeclExpr.has_context_free_type ada/nodes.lkt:15869
pragma Warnings (Off, "is not referenced");
 function Decl_Expr_P_Has_Context_Free_Type
  (Node : Bare_Decl_Expr
  )
   return Boolean
is
   Self : Bare_Decl_Expr  := Bare_Decl_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Expr;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8677 '<FieldAccess for has_context_free_type at nodes.lkt:15869:41>' Fld_1 ada/nodes.lkt:15869
--# expr-start 8676 '<FieldAccess for expr at nodes.lkt:15869:41>' Fld ada/nodes.lkt:15869
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Decl_Expr_F_Expr;
--# expr-done 8676
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.has_context_free_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Has_Context_Free_Type (Node => Fld);
--# end
--# expr-done 8677
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Decl_Expr_P_Has_Context_Free_Type;
--# end
--# property-start DeclExpr.xref_equation ada/nodes.lkt:15872
pragma Warnings (Off, "is not referenced");
 function Decl_Expr_P_Xref_Equation
  (Node : Bare_Decl_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Decl_Expr  := Bare_Decl_Expr (Node);
     Ent : Internal_Entity_Decl_Expr :=
       Internal_Entity_Decl_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1153 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Expr;
Fld_2 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Fld_3 : Bare_Expr;
Fld_4 : Logic_Var;
Fld_5 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Bare_Expr;
Fld_7 : Logic_Var;
Fld_8 : Logic_Var;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1153 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1153;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8691 '<LogicBinaryOp And at nodes.lkt:15873:9>' And_Pred_1 ada/nodes.lkt:15873
--# expr-start 8686 '<LogicBinaryOp And at nodes.lkt:15873:9>' And_Pred ada/nodes.lkt:15873
--# expr-start 8681 '<bind at nodes.lkt:15874:13>' Dyn_Var_Bind_Result ada/nodes.lkt:15874
--# expr-start 8678 '<FieldAccess for children_env at nodes.lkt:15874:24>' Fld ada/nodes.lkt:15874
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 8678
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 8680 '<FieldAccess for sub_equation at nodes.lkt:15876:13>' Fld_2 ada/nodes.lkt:15876
--# expr-start 8679 '<FieldAccess for expr at nodes.lkt:15876:13>' Fld_1 ada/nodes.lkt:15876
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Expr (Node => Ent.Node.Decl_Expr_F_Expr, Info => Ent.Info);
--# expr-done 8679
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_2 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_1.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_1.Info);
--# end
--# expr-done 8680
Dyn_Var_Bind_Result := Fld_2; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8681
--# expr-start 8685 '<Bind at nodes.lkt:15878:14>' Bind_Result ada/nodes.lkt:15878
--# expr-start 8683 '<FieldAccess for expected_type_var at nodes.lkt:15878:14>' Fld_4 ada/nodes.lkt:15878
--# expr-start 8682 '<FieldAccess for expr at nodes.lkt:15878:14>' Fld_3 ada/nodes.lkt:15878
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Decl_Expr_F_Expr;
--# expr-done 8682
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_3);
--# expr-done 8683
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 8684 '<FieldAccess for expected_type_var at nodes.lkt:15878:48>' Fld_5 ada/nodes.lkt:15878
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8684
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Bind_Result := Solver.Create_Unify (Fld_4, Fld_5, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15878:14") else null)); 
--# expr-done 8685
And_Pred := Create_And (Dyn_Var_Bind_Result, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15873:9") else null)); 
--# expr-done 8686
--# expr-start 8690 '<Bind at nodes.lkt:15879:14>' Bind_Result_1 ada/nodes.lkt:15879
--# expr-start 8688 '<FieldAccess for type_var at nodes.lkt:15879:14>' Fld_7 ada/nodes.lkt:15879
--# expr-start 8687 '<FieldAccess for expr at nodes.lkt:15879:14>' Fld_6 ada/nodes.lkt:15879
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Decl_Expr_F_Expr;
--# expr-done 8687
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_6);
--# expr-done 8688
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
--# expr-start 8689 '<FieldAccess for type_var at nodes.lkt:15879:39>' Fld_8 ada/nodes.lkt:15879
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8689
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
Bind_Result_1 := Solver.Create_Unify (Fld_7, Fld_8, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15879:14") else null)); 
--# expr-done 8690
And_Pred_1 := Create_And (And_Pred, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15873:9") else null)); 
--# expr-done 8691
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1153;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1153;
            raise;
      end;
   return Property_Result;
end Decl_Expr_P_Xref_Equation;
--# end
--# property-start DeclExpr._env_trans_parent_215 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_215
  (Node : Bare_Decl_Expr
  )
   return Boolean
is
   Self : Bare_Decl_Expr  := Bare_Decl_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_215;
--# end
   --
   --  Primitives for Bare_Format_String_Literal
   --
      procedure Initialize_Fields_For_Format_String_Literal
        (Self : Bare_Format_String_Literal
         ; Format_String_Literal_F_Opening_Chunk : Bare_Format_String_Tok_Start
         ; Format_String_Literal_F_Mid_Exprs : Bare_Format_String_Chunk_List
         ; Format_String_Literal_F_Trailing_Expr : Bare_Format_String_Chunk
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Format_String_Literal_F_Opening_Chunk := Format_String_Literal_F_Opening_Chunk;
            Self.Format_String_Literal_F_Mid_Exprs := Format_String_Literal_F_Mid_Exprs;
            Self.Format_String_Literal_F_Trailing_Expr := Format_String_Literal_F_Trailing_Expr;
      end Initialize_Fields_For_Format_String_Literal;
   function Format_String_Literal_F_Opening_Chunk
     (Node : Bare_Format_String_Literal) return Bare_Format_String_Tok_Start
   is
   begin
         return Node.Format_String_Literal_F_Opening_Chunk;
   end;
   function Format_String_Literal_F_Mid_Exprs
     (Node : Bare_Format_String_Literal) return Bare_Format_String_Chunk_List
   is
   begin
         return Node.Format_String_Literal_F_Mid_Exprs;
   end;
   function Format_String_Literal_F_Trailing_Expr
     (Node : Bare_Format_String_Literal) return Bare_Format_String_Chunk
   is
   begin
         return Node.Format_String_Literal_F_Trailing_Expr;
   end;
--# property-start FormatStringLiteral.xref_equation ada/nodes.lkt:15902
pragma Warnings (Off, "is not referenced");
 function Format_String_Literal_P_Xref_Equation
  (Node : Bare_Format_String_Literal
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Format_String_Literal  := Bare_Format_String_Literal (Node);
     Ent : Internal_Entity_Format_String_Literal :=
       Internal_Entity_Format_String_Literal'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1154 with Inline_Always;
            procedure Finalizer_Scope_3074 with Inline_Always;
            procedure Finalizer_Scope_3075 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Format_String_Chunk;
Cast_Expr : Bare_Format_String_Literal;
Cast_Result : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Fld_1 : Logic_Var;
Fld_2 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_3 : Internal_Entity_Format_String_Chunk;
Fld_4 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_5 : Internal_Entity_Format_String_Chunk_List;
Fld_6 : Bare_Format_String_Chunk_List;
Fld_7 : Internal_Entity_Info;
Item_1 : Internal_Entity_Format_String_Chunk;
Bare_Item_1 : Bare_Format_String_Chunk;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Equation;
As_Entity : Internal_Entity_Format_String_Chunk;
Is_Null : Boolean;
If_Result : Internal_Entity_Format_String_Chunk;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_1154 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_1154;
            procedure Finalizer_Scope_3074 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3074;
            procedure Finalizer_Scope_3075 is
            begin
                     Dec_Ref (Fld_9);
            end Finalizer_Scope_3075;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8707 '<LogicBinaryOp And at nodes.lkt:15903:9>' And_Pred_2 ada/nodes.lkt:15903
--# expr-start 8701 '<LogicBinaryOp And at nodes.lkt:15904:13>' And_Pred_1 ada/nodes.lkt:15904
--# expr-start 8698 '<LogicBinaryOp And at nodes.lkt:15904:13>' And_Pred ada/nodes.lkt:15904
--# expr-start 8694 '<bind at nodes.lkt:15905:17>' Dyn_Var_Bind_Result ada/nodes.lkt:15905
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Error_Location := Cast_Result; 
--# expr-start 8693 '<Predicate on BaseTypeDecl.allows_string_literal at nodes.lkt:15906:17>' Pred ada/nodes.lkt:15906
--# expr-start 8692 '<FieldAccess for expected_type_var at nodes.lkt:15906:53>' Fld ada/nodes.lkt:15906
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8692
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
Pred := Solver.Create_Predicate (Fld, Create_Base_Type_Decl_P_Allows_String_Literal_0_Predicate (Origin, Bound_Error_Location)); 
--# expr-done 8693
Dyn_Var_Bind_Result := Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8694
--# expr-start 8697 '<Bind at nodes.lkt:15908:18>' Bind_Result ada/nodes.lkt:15908
--# expr-start 8695 '<FieldAccess for expected_type_var at nodes.lkt:15908:18>' Fld_1 ada/nodes.lkt:15908
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 8695
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 8696 '<FieldAccess for type_var at nodes.lkt:15908:47>' Fld_2 ada/nodes.lkt:15908
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8696
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result := Solver.Create_Unify (Fld_1, Fld_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15908:18") else null)); 
--# expr-done 8697
And_Pred := Create_And (Dyn_Var_Bind_Result, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15904:13") else null)); 
--# expr-done 8698
--# expr-start 8699 '<FieldAccess for trailing_expr at nodes.lkt:15909:18>' Fld_3 ada/nodes.lkt:15909
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Format_String_Chunk (Node => Ent.Node.Format_String_Literal_F_Trailing_Expr, Info => Ent.Info);
--# expr-done 8699
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Entity_Format_String_Chunk then
   --# scope-start
   --# bind te Var_Expr_0
--# expr-start 8700 '<FieldAccess for sub_equation at nodes.lkt:15910:25>' Fld_4 ada/nodes.lkt:15910
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8700
Scope_Result := Fld_4;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3074;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15911:29") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_1 := Create_And (And_Pred, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15904:13") else null)); 
--# expr-done 8701
--# expr-start 8706 '<LogicAll at nodes.lkt:15914:14>' Logic_Boolean_Op ada/nodes.lkt:15914
--# expr-start 8705 '<Map at nodes.lkt:15914:14>' Map_Result ada/nodes.lkt:15914
   --# expr-start 8702 '<FieldAccess for mid_exprs at nodes.lkt:15914:14>' Fld_5 ada/nodes.lkt:15914
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Format_String_Chunk_List (Node => Ent.Node.Format_String_Literal_F_Mid_Exprs, Info => Ent.Info);
--# expr-done 8702
Fld_6 := Fld_5.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_6 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Format_String_Chunk_List := Fld_6;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Format_String_Chunk;
else
Fld_7 := Fld_5.Info;
As_Entity := (Info => Fld_7, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind m Item_1
      --# expr-start 8704 '<FieldAccess for sub_equation at nodes.lkt:15914:46>' Fld_9 ada/nodes.lkt:15914
--# expr-start 8703 '<FieldAccess for expr at nodes.lkt:15914:46>' Fld_8 ada/nodes.lkt:15914
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Expr (Node => Item_1.Node.Format_String_Chunk_F_Expr, Info => Item_1.Info);
--# expr-done 8703
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_9 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_8.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_8.Info);
--# end
--# expr-done 8704
         declare
            Item_To_Append : constant Logic_Equation := Fld_9;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3075;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8705
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15914:14") else null)); 
--# expr-done 8706
And_Pred_2 := Create_And (And_Pred_1, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15903:9") else null)); 
--# expr-done 8707
         Property_Result := And_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1154;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1154;
                     Finalizer_Scope_3074;
                     Finalizer_Scope_3075;
            raise;
      end;
   return Property_Result;
end Format_String_Literal_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Membership_Expr
   --
      procedure Initialize_Fields_For_Membership_Expr
        (Self : Bare_Membership_Expr
         ; Membership_Expr_F_Expr : Bare_Expr
         ; Membership_Expr_F_Op : Bare_Op
         ; Membership_Expr_F_Membership_Exprs : Bare_Expr_Alternatives_List
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Membership_Expr_F_Expr := Membership_Expr_F_Expr;
            Self.Membership_Expr_F_Op := Membership_Expr_F_Op;
            Self.Membership_Expr_F_Membership_Exprs := Membership_Expr_F_Membership_Exprs;
      end Initialize_Fields_For_Membership_Expr;
   function Membership_Expr_F_Expr
     (Node : Bare_Membership_Expr) return Bare_Expr
   is
   begin
         return Node.Membership_Expr_F_Expr;
   end;
   function Membership_Expr_F_Op
     (Node : Bare_Membership_Expr) return Bare_Op
   is
   begin
         return Node.Membership_Expr_F_Op;
   end;
   function Membership_Expr_F_Membership_Exprs
     (Node : Bare_Membership_Expr) return Bare_Expr_Alternatives_List
   is
   begin
         return Node.Membership_Expr_F_Membership_Exprs;
   end;
--# property-start MembershipExpr.xref_equation ada/nodes.lkt:15930
pragma Warnings (Off, "is not referenced");
 function Membership_Expr_P_Xref_Equation
  (Node : Bare_Membership_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Membership_Expr  := Bare_Membership_Expr (Node);
     Ent : Internal_Entity_Membership_Expr :=
       Internal_Entity_Membership_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1155 with Inline_Always;
            procedure Finalizer_Scope_3076 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_210 : Internal_Entity_Name;
Fld : Logic_Var;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Internal_Entity_Expr_Alternatives_List;
Fld_5 : Bare_Expr_Alternatives_List;
Fld_6 : Internal_Entity_Info;
Item_0 : Internal_Entity_Expr;
Bare_Item_0 : Bare_Expr;
Cast_Expr : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_7 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Fld_8 : Logic_Equation;
Fld_9 : Bare_Expr;
Fld_10 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Cast_Expr_3 : Bare_Membership_Expr;
Cast_Result_4 : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld_11 : Bare_Expr;
Fld_12 : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_13 : Bare_Expr;
Fld_14 : Logic_Var;
Fld_15 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
Fld_16 : Bare_Expr;
Fld_17 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_18 : Boolean;
If_Result : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_19 : Logic_Var;
Fld_20 : Bare_Expr;
Fld_21 : Logic_Var;
Bind_Result_3 : Logic_Equation;
Fld_22 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_23 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result_1 : Logic_Equation;
Let_Result : Logic_Equation;
As_Entity : Internal_Entity_Expr;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity_Expr;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_6 : Logic_Equation;
            procedure Finalizer_Scope_1155 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_6);
            end Finalizer_Scope_1155;
            procedure Finalizer_Scope_3076 is
            begin
                     Dec_Ref (Fld_8);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Fld_17);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (Fld_22);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_23);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_3076;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8751 '<LogicBinaryOp And at nodes.lkt:15931:9>' And_Pred_6 ada/nodes.lkt:15931
--# expr-start 8713 '<LogicBinaryOp And at nodes.lkt:15931:10>' And_Pred ada/nodes.lkt:15931
--# expr-start 8710 '<Bind at nodes.lkt:15931:10>' Bind_Result ada/nodes.lkt:15931
--# expr-start 8708 '<FieldAccess for type_var at nodes.lkt:15931:10>' Fld ada/nodes.lkt:15931
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8708
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 8709 '<FieldAccess for bool_type at nodes.lkt:15931:29>' Fld_1 ada/nodes.lkt:15931
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 8709
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15931:10") else null)); 
--# expr-done 8710
--# expr-start 8712 '<FieldAccess for sub_equation at nodes.lkt:15931:51>' Fld_3 ada/nodes.lkt:15931
--# expr-start 8711 '<FieldAccess for expr at nodes.lkt:15931:51>' Fld_2 ada/nodes.lkt:15931
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Membership_Expr_F_Expr, Info => Ent.Info);
--# expr-done 8711
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 8712
And_Pred := Create_And (Bind_Result, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15931:10") else null)); 
--# expr-done 8713
--# expr-start 8750 '<LogicAll at nodes.lkt:15932:14>' Logic_Boolean_Op ada/nodes.lkt:15932
--# expr-start 8749 '<Map at nodes.lkt:15932:14>' Map_Result ada/nodes.lkt:15932
   --# expr-start 8714 '<FieldAccess for membership_exprs at nodes.lkt:15932:14>' Fld_4 ada/nodes.lkt:15932
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr_Alternatives_List (Node => Ent.Node.Membership_Expr_F_Membership_Exprs, Info => Ent.Info);
--# expr-done 8714
Fld_5 := Fld_4.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_5 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Expr_Alternatives_List := Fld_5;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity_Expr;
else
Fld_6 := Fld_4.Info;
As_Entity := (Info => Fld_6, Node => Bare_Item_0); 
   If_Result_2 := As_Entity;
end if;
                  Item_0 := If_Result_2; 
   --# scope-start
               --# bind m Item_0
      --# expr-start 8748 '<Let at nodes.lkt:15934:17>' Let_Result ada/nodes.lkt:15934
--# scope-start
--# expr-start 8715 '<Cast to Name at nodes.lkt:15934:27>' Cast_Result_1 ada/nodes.lkt:15934
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Name;
   end if;
--# expr-done 8715
Var_Expr_210 := Cast_Result_1;
if Var_Expr_210 /= No_Entity_Name then
   --# scope-start
--# expr-start 8716 '<FieldAccess for name_designated_type at nodes.lkt:15934:27>' Fld_7 ada/nodes.lkt:15934
      if Var_Expr_210.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_7 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Var_Expr_210.Node, E_Info => Var_Expr_210.Info);
--# end
--# expr-done 8716
Scope_Result := Fld_7;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
Local_Typ := Result_Var; 
--# bind typ Local_Typ
--# expr-start 8747 '<If at nodes.lkt:15936:17>' If_Result_1 ada/nodes.lkt:15936
--# expr-start 8718 '<Not at nodes.lkt:15936:20>' Not_Val ada/nodes.lkt:15936
--# expr-start 8717 '<IsNull at nodes.lkt:15936:24>' Is_Null ada/nodes.lkt:15936
Is_Null := Local_Typ.Node = null; 
--# expr-done 8717
Not_Val := not (Is_Null); 
--# expr-done 8718
if Not_Val then
   --# expr-start 8738 '<LogicBinaryOp And at nodes.lkt:15939:21>' And_Pred_3 ada/nodes.lkt:15939
--# expr-start 8720 '<FieldAccess for xref_type_equation at nodes.lkt:15939:21>' Fld_8 ada/nodes.lkt:15939
--# expr-start 8719 '<Cast to Name at nodes.lkt:15939:21>' Cast_Result_2 ada/nodes.lkt:15939
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 8719
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_8 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Cast_Result_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 8720
--# expr-start 8737 '<If at nodes.lkt:15949:25>' If_Result ada/nodes.lkt:15949
--# expr-start 8721 '<FieldAccess for is_tagged_type at nodes.lkt:15949:28>' Fld_18 ada/nodes.lkt:15949
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_tagged_type'
Fld_18 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Tagged_Type (Node => Local_Typ.Node, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 8721
if Fld_18 then
   --# expr-start 8729 '<LogicBinaryOp And at nodes.lkt:15951:29>' And_Pred_1 ada/nodes.lkt:15951
--# expr-start 8724 '<Bind at nodes.lkt:15951:29>' Bind_Result_1 ada/nodes.lkt:15951
--# expr-start 8723 '<FieldAccess for expected_type_var at nodes.lkt:15951:29>' Fld_10 ada/nodes.lkt:15951
--# expr-start 8722 '<FieldAccess for expr at nodes.lkt:15951:29>' Fld_9 ada/nodes.lkt:15951
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.Membership_Expr_F_Expr;
--# expr-done 8722
      if Fld_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_9);
--# expr-done 8723
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
Cast_Expr_2 := No_Entity_Base_Type_Decl; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_10, Cast_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15951:29") else null)); 
--# expr-done 8724
--# expr-start 8728 '<bind at nodes.lkt:15954:33>' Dyn_Var_Bind_Result ada/nodes.lkt:15954
Cast_Expr_3 := Self; 
      Cast_Result_4 := Cast_Expr_3;
Bound_Error_Location := Cast_Result_4; 
--# expr-start 8727 '<Predicate on BaseTypeDecl.is_tagged_type_with_deref at nodes.lkt:15955:33>' Pred ada/nodes.lkt:15955
--# expr-start 8726 '<FieldAccess for type_var at nodes.lkt:15955:73>' Fld_12 ada/nodes.lkt:15955
--# expr-start 8725 '<FieldAccess for expr at nodes.lkt:15955:73>' Fld_11 ada/nodes.lkt:15955
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Membership_Expr_F_Expr;
--# expr-done 8725
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_11);
--# expr-done 8726
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
Pred := Solver.Create_Predicate (Fld_12, Create_Base_Type_Decl_P_Is_Tagged_Type_With_Deref_0_Predicate (Origin, Bound_Error_Location)); 
--# expr-done 8727
Dyn_Var_Bind_Result := Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8728
And_Pred_1 := Create_And (Bind_Result_1, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15951:29") else null)); 
--# expr-done 8729
   If_Result := And_Pred_1;
else
   --# expr-start 8736 '<LogicBinaryOp And at nodes.lkt:15963:29>' And_Pred_2 ada/nodes.lkt:15963
--# expr-start 8733 '<Bind at nodes.lkt:15963:29>' Bind_Result_2 ada/nodes.lkt:15963
--# expr-start 8731 '<FieldAccess for expected_type_var at nodes.lkt:15963:29>' Fld_14 ada/nodes.lkt:15963
--# expr-start 8730 '<FieldAccess for expr at nodes.lkt:15963:29>' Fld_13 ada/nodes.lkt:15963
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Self.Membership_Expr_F_Expr;
--# expr-done 8730
      if Fld_13 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_13);
--# expr-done 8731
Fld_14.Value := No_Entity;
Entity_Vars.Reset (Fld_14);
--# expr-start 8732 '<FieldAccess for base_subtype at nodes.lkt:15963:62>' Fld_15 ada/nodes.lkt:15963
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.base_subtype
Fld_15 := Libadalang.Implementation.Base_Type_Decl_P_Base_Subtype (Node => Local_Typ.Node, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 8732
      Cast_Result_5 := Create_Internal_Entity
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_14, Cast_Result_5, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15963:29") else null)); 
--# expr-done 8733
--# expr-start 8735 '<FieldAccess for matches_expected_membership_type at nodes.lkt:15964:34>' Fld_17 ada/nodes.lkt:15964
--# expr-start 8734 '<FieldAccess for expr at nodes.lkt:15964:34>' Fld_16 ada/nodes.lkt:15964
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Self.Membership_Expr_F_Expr;
--# expr-done 8734
      if Fld_16 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_membership_type
Fld_17 := Libadalang.Implementation.Expr_P_Matches_Expected_Membership_Type (Node => Fld_16, Origin => Origin);
--# end
--# expr-done 8735
And_Pred_2 := Create_And (Bind_Result_2, Fld_17, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15963:29") else null)); 
--# expr-done 8736
   If_Result := And_Pred_2;
end if;
      Inc_Ref (If_Result);
--# expr-done 8737
And_Pred_3 := Create_And (Fld_8, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15939:21") else null)); 
--# expr-done 8738
   If_Result_1 := And_Pred_3;
else
   --# expr-start 8746 '<LogicBinaryOp And at nodes.lkt:15970:21>' And_Pred_5 ada/nodes.lkt:15970
--# expr-start 8744 '<LogicBinaryOp And at nodes.lkt:15970:21>' And_Pred_4 ada/nodes.lkt:15970
--# expr-start 8742 '<Bind at nodes.lkt:15970:21>' Bind_Result_3 ada/nodes.lkt:15970
--# expr-start 8739 '<FieldAccess for expected_type_var at nodes.lkt:15970:21>' Fld_19 ada/nodes.lkt:15970
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Item_0.Node);
--# expr-done 8739
Fld_19.Value := No_Entity;
Entity_Vars.Reset (Fld_19);
--# expr-start 8741 '<FieldAccess for type_var at nodes.lkt:15970:47>' Fld_21 ada/nodes.lkt:15970
--# expr-start 8740 '<FieldAccess for expr at nodes.lkt:15970:47>' Fld_20 ada/nodes.lkt:15970
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Self.Membership_Expr_F_Expr;
--# expr-done 8740
      if Fld_20 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_20);
--# expr-done 8741
Fld_21.Value := No_Entity;
Entity_Vars.Reset (Fld_21);
Bind_Result_3 := Solver.Create_Unify (Fld_19, Fld_21, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15970:21") else null)); 
--# expr-done 8742
--# expr-start 8743 '<FieldAccess for sub_equation at nodes.lkt:15971:26>' Fld_22 ada/nodes.lkt:15971
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_22 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 8743
And_Pred_4 := Create_And (Bind_Result_3, Fld_22, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15970:21") else null)); 
--# expr-done 8744
--# expr-start 8745 '<FieldAccess for matches_expected_type at nodes.lkt:15972:26>' Fld_23 ada/nodes.lkt:15972
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_23 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Item_0.Node, Origin => Origin);
--# end
--# expr-done 8745
And_Pred_5 := Create_And (And_Pred_4, Fld_23, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15970:21") else null)); 
--# expr-done 8746
   If_Result_1 := And_Pred_5;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 8747
Let_Result := If_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 8748
         declare
            Item_To_Append : constant Logic_Equation := Let_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3076;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8749
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15932:14") else null)); 
--# expr-done 8750
And_Pred_6 := Create_And (And_Pred, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:15931:9") else null)); 
--# expr-done 8751
         Property_Result := And_Pred_6;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1155;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1155;
                     Finalizer_Scope_3076;
            raise;
      end;
   return Property_Result;
end Membership_Expr_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Name
   --
      procedure Initialize_Fields_For_Name
        (Self : Bare_Name
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
      end Initialize_Fields_For_Name;
--# property-start Name.enclosing_defining_name ada/nodes.lkt:15984
pragma Warnings (Off, "is not referenced");
 function Name_P_Enclosing_Defining_Name
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_195 with Inline_Always;
      Fld : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Cast_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_195 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_195;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8755 '<Cast to DefiningName at nodes.lkt:15985:9>' Cast_Result ada/nodes.lkt:15985
--# expr-start 8754 '<Find at nodes.lkt:15985:9>' Find_Result ada/nodes.lkt:15985
   --# expr-start 8752 '<FieldAccess for parents at nodes.lkt:15985:9>' Fld ada/nodes.lkt:15985
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 8752
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 8753 '<IsA DefiningName at nodes.lkt:15985:36>' Is_A ada/nodes.lkt:15985
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Defining_Name_Range; 
--# expr-done 8753
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 8754
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Defining_Name_Range
   then
      Cast_Result := Create_Internal_Entity_Defining_Name
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result := No_Entity_Defining_Name;
   end if;
--# expr-done 8755
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_195;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_195;
            raise;
      end;
   return Property_Result;
end Name_P_Enclosing_Defining_Name;
--# end
--# property-start Name.is_defining ada/nodes.lkt:15989
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Defining
  (Node : Bare_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
      Var_Expr_211 : Bare_Dotted_Name;
Is_A : Boolean;
Fld : Bare_Ada_Node;
Is_A_1 : Boolean;
If_Result : Boolean;
Fld_1 : Bare_Ada_Node;
Fld_2 : Bare_Ada_Node;
Is_A_2 : Boolean;
Fld_3 : Bare_Ada_Node;
Cast_Result : Bare_Dotted_Name;
Fld_4 : Bare_Base_Id;
Scope_Result : Bare_Base_Id;
Result_Var : Bare_Base_Id;
Cast_Result_1 : Bare_Name;
Is_Equal : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8768 '<BooleanBinaryOp Or at nodes.lkt:15990:9>' If_Result_2 ada/nodes.lkt:15990
--# expr-start 8759 '<BooleanBinaryOp Or at nodes.lkt:15990:9>' If_Result ada/nodes.lkt:15990
--# expr-start 8756 '<IsA DefiningName at nodes.lkt:15992:13>' Is_A ada/nodes.lkt:15992
Is_A := Self /= null 
and then Self.Kind in Ada_Defining_Name_Range; 
--# expr-done 8756
if Is_A then
   If_Result := True;
else
   --# expr-start 8758 '<IsA DefiningName at nodes.lkt:15997:13>' Is_A_1 ada/nodes.lkt:15997
--# expr-start 8757 '<parent at nodes.lkt:15997:13>' Fld ada/nodes.lkt:15997
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 8757
Is_A_1 := Fld /= null 
and then Fld.Kind in Ada_Defining_Name_Range; 
--# expr-done 8758
   If_Result := Is_A_1;
end if;
--# expr-done 8759
if If_Result then
   If_Result_2 := True;
else
   --# expr-start 8767 '<BooleanBinaryOp And at nodes.lkt:16002:13>' If_Result_1 ada/nodes.lkt:16002
--# expr-start 8762 '<IsA DefiningName at nodes.lkt:16002:13>' Is_A_2 ada/nodes.lkt:16002
--# expr-start 8761 '<parent at nodes.lkt:16002:13>' Fld_2 ada/nodes.lkt:16002
--# expr-start 8760 '<parent at nodes.lkt:16002:13>' Fld_1 ada/nodes.lkt:16002
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Parent; 
--# expr-done 8760
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Fld_1.Parent; 
--# expr-done 8761
Is_A_2 := Fld_2 /= null 
and then Fld_2.Kind in Ada_Defining_Name_Range; 
--# expr-done 8762
if Is_A_2 then
   --# expr-start 8766 '<Eq at nodes.lkt:16003:17>' Is_Equal ada/nodes.lkt:16003
--# expr-start 8764 '<Cast to DottedName at nodes.lkt:16003:17>' Cast_Result ada/nodes.lkt:16003
--# expr-start 8763 '<parent at nodes.lkt:16003:17>' Fld_3 ada/nodes.lkt:16003
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Parent; 
--# expr-done 8763
   if Fld_3 = null
      or else Fld_3.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Fld_3;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 8764
Var_Expr_211 := Cast_Result;
if Var_Expr_211 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 8765 '<FieldAccess for suffix at nodes.lkt:16003:17>' Fld_4 ada/nodes.lkt:16003
      if Var_Expr_211 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Var_Expr_211.Dotted_Name_F_Suffix;
--# expr-done 8765
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
      Cast_Result_1 := Result_Var;
Is_Equal := Cast_Result_1 = Self; 
--# expr-done 8766
   If_Result_1 := Is_Equal;
else
   If_Result_1 := False;
end if;
--# expr-done 8767
   If_Result_2 := If_Result_1;
end if;
--# expr-done 8768
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Defining;
--# end
--# property-start Name.name_is ada/nodes.lkt:16008
pragma Warnings (Off, "is not referenced");
 function Name_P_Name_Is
  (Node : Bare_Name
      ; Sym : Symbol_Type
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind sym Sym
   Property_Result : Boolean;
      Var_Expr_0 : Symbol_Type;
Fld : Symbol_Type;
Is_Equal : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 8769 '<FieldAccess for name_symbol at nodes.lkt:16008:38>' Fld ada/nodes.lkt:16008
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Self);
--# end
--# expr-done 8769
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Symbol then
   --# scope-start
   --# bind ns Var_Expr_0
--# expr-start 8770 '<Eq at nodes.lkt:16008:68>' Is_Equal ada/nodes.lkt:16008
Is_Equal := Var_Expr_0 = Sym; 
--# expr-done 8770
Scope_Result := Is_Equal;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Name_Is;
--# end
--# property-start Name.is_direct_call ada/nodes.lkt:16013
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Direct_Call
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Boolean;
Fld_1 : Internal_Entity_Base_Formal_Param_Holder;
Fld_2 : Internal_Entity;
Is_A : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8776 '<BooleanBinaryOp And at nodes.lkt:16014:9>' If_Result ada/nodes.lkt:16014
--# expr-start 8771 '<FieldAccess for is_call at nodes.lkt:16014:9>' Fld ada/nodes.lkt:16014
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_call
Fld := Libadalang.Implementation.Name_P_Is_Call (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8771
if Fld then
   --# expr-start 8775 '<Not at nodes.lkt:16015:13>' Not_Val ada/nodes.lkt:16015
--# expr-start 8774 '<IsA AccessToSubpDef at nodes.lkt:16015:17>' Is_A ada/nodes.lkt:16015
--# expr-start 8773 '<parent at nodes.lkt:16015:17>' Fld_2 ada/nodes.lkt:16015
--# expr-start 8772 '<FieldAccess for called_subp_spec at nodes.lkt:16015:17>' Fld_1 ada/nodes.lkt:16015
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.called_subp_spec
Fld_1 := Libadalang.Implementation.Name_P_Called_Subp_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8772
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# expr-done 8773
Is_A := Fld_2.Node /= null 
and then Fld_2.Node.Kind in Ada_Access_To_Subp_Def_Range; 
--# expr-done 8774
Not_Val := not (Is_A); 
--# expr-done 8775
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 8776
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Direct_Call;
--# end
--# property-start Name.is_access_call ada/nodes.lkt:16020
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Access_Call
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Boolean;
Fld_1 : Internal_Entity_Base_Formal_Param_Holder;
Fld_2 : Internal_Entity;
Is_A : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8781 '<BooleanBinaryOp And at nodes.lkt:16021:9>' If_Result ada/nodes.lkt:16021
--# expr-start 8777 '<FieldAccess for is_call at nodes.lkt:16021:9>' Fld ada/nodes.lkt:16021
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_call
Fld := Libadalang.Implementation.Name_P_Is_Call (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8777
if Fld then
   --# expr-start 8780 '<IsA AccessToSubpDef at nodes.lkt:16021:28>' Is_A ada/nodes.lkt:16021
--# expr-start 8779 '<parent at nodes.lkt:16021:28>' Fld_2 ada/nodes.lkt:16021
--# expr-start 8778 '<FieldAccess for called_subp_spec at nodes.lkt:16021:28>' Fld_1 ada/nodes.lkt:16021
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.called_subp_spec
Fld_1 := Libadalang.Implementation.Name_P_Called_Subp_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8778
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# expr-done 8779
Is_A := Fld_2.Node /= null 
and then Fld_2.Node.Kind in Ada_Access_To_Subp_Def_Range; 
--# expr-done 8780
   If_Result := Is_A;
else
   If_Result := False;
end if;
--# expr-done 8781
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Access_Call;
--# end
--# property-start Name.is_call ada/nodes.lkt:16025
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Call
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity_Base_Formal_Param_Holder;
Is_Null : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8787 '<BooleanBinaryOp And at nodes.lkt:16026:9>' If_Result ada/nodes.lkt:16026
--# expr-start 8783 '<Not at nodes.lkt:16026:9>' Not_Val ada/nodes.lkt:16026
--# expr-start 8782 '<FieldAccess for is_defining at nodes.lkt:16026:13>' Fld ada/nodes.lkt:16026
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_defining
Fld := Libadalang.Implementation.Name_P_Is_Defining (Node => Ent.Node);
--# end
--# expr-done 8782
Not_Val := not (Fld); 
--# expr-done 8783
if Not_Val then
   --# expr-start 8786 '<Not at nodes.lkt:16026:36>' Not_Val_1 ada/nodes.lkt:16026
--# expr-start 8785 '<IsNull at nodes.lkt:16026:40>' Is_Null ada/nodes.lkt:16026
--# expr-start 8784 '<FieldAccess for called_formal_subp_spec at nodes.lkt:16026:40>' Fld_1 ada/nodes.lkt:16026
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.called_formal_subp_spec'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Called_Formal_Subp_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8784
Is_Null := Fld_1.Node = null; 
--# expr-done 8785
Not_Val_1 := not (Is_Null); 
--# expr-done 8786
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 8787
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Call;
--# end
--# property-start Name.is_dot_call ada/nodes.lkt:16031
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Dot_Call
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Info;
Fld_3 : Internal_Metadata;
Fld_4 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8794 '<BooleanBinaryOp And at nodes.lkt:16032:9>' If_Result ada/nodes.lkt:16032
--# expr-start 8789 '<Not at nodes.lkt:16032:9>' Not_Val ada/nodes.lkt:16032
--# expr-start 8788 '<FieldAccess for is_defining at nodes.lkt:16032:13>' Fld ada/nodes.lkt:16032
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_defining
Fld := Libadalang.Implementation.Name_P_Is_Defining (Node => Ent.Node);
--# end
--# expr-done 8788
Not_Val := not (Fld); 
--# expr-done 8789
if Not_Val then
   --# expr-start 8793 '<FieldAccess for dottable_subp at nodes.lkt:16032:36>' Fld_4 ada/nodes.lkt:16032
--# expr-start 8792 '<FieldAccess for md at nodes.lkt:16032:36>' Fld_3 ada/nodes.lkt:16032
--# expr-start 8791 '<FieldAccess for info at nodes.lkt:16032:36>' Fld_2 ada/nodes.lkt:16032
--# expr-start 8790 '<FieldAccess for referenced_decl at nodes.lkt:16032:36>' Fld_1 ada/nodes.lkt:16032
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_1 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 8790
Fld_2 := Fld_1.Info;
--# expr-done 8791
Fld_3 := Fld_2.Md;
--# expr-done 8792
Fld_4 := Fld_3.Dottable_Subp;
--# expr-done 8793
   If_Result := Fld_4;
else
   If_Result := False;
end if;
--# expr-done 8794
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Dot_Call;
--# end
--# property-start Name.failsafe_referenced_def_name ada/nodes.lkt:16038
pragma Warnings (Off, "is not referenced");
 function Name_P_Failsafe_Referenced_Def_Name
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Refd_Def
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Refd_Def;
            procedure Finalizer_Scope_3082 with Inline_Always;
      Local_Ref_Decl : Internal_Refd_Decl;
Local_Def_Name : Internal_Entity_Defining_Name;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_1 : Symbol_Type;
Var_Expr : Internal_Entity_Defining_Name;
Fld : Internal_Refd_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Symbol_Type;
Fld_3 : Internal_Entity_Defining_Name_Array_Access;
Fld_4 : Boolean;
Find_Result : Internal_Entity_Defining_Name;
Scope_Result : Internal_Entity_Defining_Name;
Result_Var : Internal_Entity_Defining_Name;
Scope_Result_1 : Internal_Entity_Defining_Name;
Fld_5 : Internal_Entity_Defining_Name;
Result_Var_1 : Internal_Entity_Defining_Name;
Scope_Result_2 : Internal_Entity_Defining_Name;
Result_Var_2 : Internal_Entity_Defining_Name;
Fld_6 : Ref_Result_Kind;
New_Struct : Internal_Refd_Def;
Let_Result : Internal_Refd_Def;
Let_Result_1 : Internal_Refd_Def;
            procedure Finalizer_Scope_3082 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3082;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8805 '<Let at nodes.lkt:16039:9>' Let_Result_1 ada/nodes.lkt:16039
--# scope-start
--# expr-start 8795 '<FieldAccess for failsafe_referenced_decl at nodes.lkt:16039:24>' Fld ada/nodes.lkt:16039
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.failsafe_referenced_decl
Fld := Libadalang.Implementation.Name_P_Failsafe_Referenced_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 8795
Local_Ref_Decl := Fld; 
--# bind ref_decl Local_Ref_Decl
--# expr-start 8804 '<Let at nodes.lkt:16040:9>' Let_Result ada/nodes.lkt:16040
--# scope-start
--# expr-start 8796 '<FieldAccess for decl at nodes.lkt:16041:13>' Fld_1 ada/nodes.lkt:16041
Fld_1 := Local_Ref_Decl.Decl;
--# expr-done 8796
Var_Expr_0 := Fld_1;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind ref_decl Var_Expr_0
--# expr-start 8797 '<FieldAccess for name_symbol at nodes.lkt:16043:17>' Fld_2 ada/nodes.lkt:16043
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 8797
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Symbol then
   --# scope-start
   --# bind rel_name Var_Expr_1
--# expr-start 8800 '<Find at nodes.lkt:16045:21>' Find_Result ada/nodes.lkt:16045
   --# expr-start 8798 '<FieldAccess for defining_names at nodes.lkt:16045:21>' Fld_3 ada/nodes.lkt:16045
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8798
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_3;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind dn Item_2
      --# expr-start 8799 '<FieldAccess for name_is at nodes.lkt:16046:33>' Fld_4 ada/nodes.lkt:16046
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_4 := Libadalang.Implementation.Name_P_Name_Is (Node => Item_2.Node, Sym => Var_Expr_1);
--# end
--# expr-done 8799
      if Fld_4 then
         Find_Result := Item_2; 
      end if;
   --# end
               exit when Fld_4;
         end loop;
      end;
--# expr-done 8800
Scope_Result := Find_Result;
   --# end
      Finalizer_Scope_3082;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Defining_Name;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Defining_Name then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 8801 '<FieldAccess for defining_name at nodes.lkt:16049:21>' Fld_5 ada/nodes.lkt:16049
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8801
   Result_Var_1 := Fld_5;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Defining_Name;
end if;
Local_Def_Name := Result_Var_2; 
--# bind def_name Local_Def_Name
--# expr-start 8803 '<New RefdDef at nodes.lkt:16053:9>' New_Struct ada/nodes.lkt:16053
--# expr-start 8802 '<FieldAccess for kind at nodes.lkt:16053:41>' Fld_6 ada/nodes.lkt:16053
Fld_6 := Local_Ref_Decl.Kind;
--# expr-done 8802
New_Struct := (Def_Name => Local_Def_Name, Kind => Fld_6); 
--# expr-done 8803
Let_Result := New_Struct; 
--# end
--# expr-done 8804
Let_Result_1 := Let_Result; 
--# end
--# expr-done 8805
         Property_Result := Let_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3082;
            raise;
      end;
   return Property_Result;
end Name_P_Failsafe_Referenced_Def_Name;
--# end
--# property-start Name.referenced_defining_name ada/nodes.lkt:16060
pragma Warnings (Off, "is not referenced");
 function Name_P_Referenced_Defining_Name
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_3086 with Inline_Always;
      Local_Ref_Decl : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_1 : Symbol_Type;
Var_Expr : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
Fld_3 : Boolean;
Find_Result : Internal_Entity_Defining_Name;
Scope_Result : Internal_Entity_Defining_Name;
Result_Var : Internal_Entity_Defining_Name;
Scope_Result_1 : Internal_Entity_Defining_Name;
Fld_4 : Internal_Entity_Defining_Name;
Result_Var_1 : Internal_Entity_Defining_Name;
Scope_Result_2 : Internal_Entity_Defining_Name;
Result_Var_2 : Internal_Entity_Defining_Name;
Let_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_3086 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_3086;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8812 '<Let at nodes.lkt:16061:9>' Let_Result ada/nodes.lkt:16061
--# scope-start
--# expr-start 8806 '<FieldAccess for referenced_decl at nodes.lkt:16061:24>' Fld ada/nodes.lkt:16061
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 8806
Local_Ref_Decl := Fld; 
--# bind ref_decl Local_Ref_Decl
Var_Expr_0 := Local_Ref_Decl;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind ref_decl Var_Expr_0
--# expr-start 8807 '<FieldAccess for name_symbol at nodes.lkt:16065:13>' Fld_1 ada/nodes.lkt:16065
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 8807
Var_Expr_1 := Fld_1;
if Var_Expr_1 /= No_Symbol then
   --# scope-start
   --# bind rel_name Var_Expr_1
--# expr-start 8810 '<Find at nodes.lkt:16067:17>' Find_Result ada/nodes.lkt:16067
   --# expr-start 8808 '<FieldAccess for defining_names at nodes.lkt:16067:17>' Fld_2 ada/nodes.lkt:16067
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8808
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_2;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind dn Item_2
      --# expr-start 8809 '<FieldAccess for name_is at nodes.lkt:16067:56>' Fld_3 ada/nodes.lkt:16067
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_3 := Libadalang.Implementation.Name_P_Name_Is (Node => Item_2.Node, Sym => Var_Expr_1);
--# end
--# expr-done 8809
      if Fld_3 then
         Find_Result := Item_2; 
      end if;
   --# end
               exit when Fld_3;
         end loop;
      end;
--# expr-done 8810
Scope_Result := Find_Result;
   --# end
      Finalizer_Scope_3086;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Defining_Name;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Defining_Name then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 8811 '<FieldAccess for defining_name at nodes.lkt:16069:17>' Fld_4 ada/nodes.lkt:16069
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8811
   Result_Var_1 := Fld_4;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Defining_Name;
end if;
Let_Result := Result_Var_2; 
--# end
--# expr-done 8812
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3086;
            raise;
      end;
   return Property_Result;
end Name_P_Referenced_Defining_Name;
--# end
--# property-start Name.gnat_xref_decl ada/nodes.lkt:16077
pragma Warnings (Off, "is not referenced");
 function Name_P_Gnat_Xref_Decl
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
      Local_Dn : Internal_Entity_Defining_Name;
Var_Expr_0 : Boolean;
Local_Bd : Internal_Entity_Basic_Decl;
Var_Expr_212 : Internal_Entity_Defining_Name;
Var_Expr_213 : Internal_Entity_Basic_Decl;
Var_Expr_214 : Internal_Entity_Base_Type_Decl;
Fld : Boolean;
Fld_1 : Internal_Entity_Defining_Name;
Scope_Result : Internal_Entity_Defining_Name;
Result_Var : Internal_Entity_Defining_Name;
Fld_2 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Result_Var_1 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Param_Spec;
Fld_3 : Internal_Entity_Defining_Name;
Cast_Expr_1 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Body_Node;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Internal_Entity_Defining_Name;
Scope_Result_2 : Internal_Entity_Defining_Name;
Result_Var_2 : Internal_Entity_Defining_Name;
Cast_Expr_2 : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Internal_Entity_Defining_Name;
Scope_Result_3 : Internal_Entity_Defining_Name;
Result_Var_3 : Internal_Entity_Defining_Name;
Fld_8 : Internal_Entity_Defining_Name;
Is_A : Boolean;
If_Result : Internal_Entity_Defining_Name;
Is_A_1 : Boolean;
If_Result_1 : Internal_Entity_Defining_Name;
Is_A_2 : Boolean;
If_Result_2 : Internal_Entity_Defining_Name;
Is_A_3 : Boolean;
Cast_Expr_3 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Base_Type_Decl;
Fld_9 : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Internal_Entity_Defining_Name;
Is_A_4 : Boolean;
If_Result_5 : Internal_Entity_Defining_Name;
Is_A_5 : Boolean;
If_Result_6 : Internal_Entity_Defining_Name;
Let_Result : Internal_Entity_Defining_Name;
Let_Result_1 : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8841 '<Let at nodes.lkt:16078:9>' Let_Result_1 ada/nodes.lkt:16078
--# scope-start
--# expr-start 8813 '<FieldAccess for is_defining at nodes.lkt:16078:18>' Fld ada/nodes.lkt:16078
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_defining
Fld := Libadalang.Implementation.Name_P_Is_Defining (Node => Ent.Node);
--# end
--# expr-done 8813
Var_Expr_0 := Fld;
if Var_Expr_0 /= False then
   --# scope-start
   --# bind _ Var_Expr_0
--# expr-start 8814 '<FieldAccess for enclosing_defining_name at nodes.lkt:16078:47>' Fld_1 ada/nodes.lkt:16078
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.enclosing_defining_name
Fld_1 := Libadalang.Implementation.Name_P_Enclosing_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8814
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Defining_Name;
end if;
Local_Dn := Result_Var; 
--# bind dn Local_Dn
--# expr-start 8840 '<Let at nodes.lkt:16079:9>' Let_Result ada/nodes.lkt:16079
--# scope-start
Var_Expr_212 := Local_Dn;
if Var_Expr_212 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 8815 '<FieldAccess for basic_decl at nodes.lkt:16079:18>' Fld_2 ada/nodes.lkt:16079
      if Var_Expr_212.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Var_Expr_212.Node, E_Info => Var_Expr_212.Info);
--# end
--# expr-done 8815
Scope_Result_1 := Fld_2;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Basic_Decl;
end if;
Local_Bd := Result_Var_1; 
--# bind bd Local_Bd
--# expr-start 8839 '<If at nodes.lkt:16081:9>' If_Result_6 ada/nodes.lkt:16081
--# expr-start 8816 '<IsA ParamSpec at nodes.lkt:16081:12>' Is_A_5 ada/nodes.lkt:16081
Is_A_5 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Param_Spec_Range; 
--# expr-done 8816
if Is_A_5 then
   --# expr-start 8818 '<FieldAccess for decl_param at nodes.lkt:16081:33>' Fld_3 ada/nodes.lkt:16081
--# expr-start 8817 '<Cast to ParamSpec at nodes.lkt:16081:33>' Cast_Result ada/nodes.lkt:16081
Cast_Expr := Local_Bd; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Param_Spec_Range
   then
      Cast_Result := Create_Internal_Entity_Param_Spec
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Param_Spec;
   end if;
--# expr-done 8817
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.decl_param
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Decl_Param (Node => Cast_Result.Node, Param => Local_Dn, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result.Info);
--# end
--# expr-done 8818
   If_Result_6 := Fld_3;
else
   --# expr-start 8838 '<If at nodes.lkt:16081:9>' If_Result_5 ada/nodes.lkt:16081
--# expr-start 8819 '<IsA Body at nodes.lkt:16082:14>' Is_A_4 ada/nodes.lkt:16082
Is_A_4 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Body_Node; 
--# expr-done 8819
if Is_A_4 then
--# expr-start 8821 '<FieldAccess for decl_part at nodes.lkt:16083:14>' Fld_4 ada/nodes.lkt:16083
--# expr-start 8820 '<Cast to Body at nodes.lkt:16083:14>' Cast_Result_1 ada/nodes.lkt:16083
Cast_Expr_1 := Local_Bd; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Body_Node
   then
      Cast_Result_1 := Create_Internal_Entity_Body_Node
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Body_Node;
   end if;
--# expr-done 8820
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_4 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Cast_Result_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 8821
Var_Expr_213 := Fld_4;
if Var_Expr_213 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 8822 '<FieldAccess for defining_name at nodes.lkt:16083:14>' Fld_5 ada/nodes.lkt:16083
      if Var_Expr_213.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_213.Node, E_Info => Var_Expr_213.Info);
--# end
--# expr-done 8822
Scope_Result_2 := Fld_5;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Defining_Name;
end if;
   If_Result_5 := Result_Var_2;
else
   --# expr-start 8837 '<If at nodes.lkt:16081:9>' If_Result_4 ada/nodes.lkt:16081
--# expr-start 8826 '<BooleanBinaryOp And at nodes.lkt:16084:14>' If_Result_3 ada/nodes.lkt:16084
--# expr-start 8823 '<IsA BaseTypeDecl at nodes.lkt:16084:14>' Is_A_3 ada/nodes.lkt:16084
Is_A_3 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Base_Type_Decl; 
--# expr-done 8823
if Is_A_3 then
   --# expr-start 8825 '<FieldAccess for is_in_private_part at nodes.lkt:16084:37>' Fld_9 ada/nodes.lkt:16084
--# expr-start 8824 '<Cast to BaseTypeDecl at nodes.lkt:16084:37>' Cast_Result_3 ada/nodes.lkt:16084
Cast_Expr_3 := Local_Bd; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_3 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 8824
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Cast_Result_3.Node, E_Info => Cast_Result_3.Info);
--# end
--# expr-done 8825
   If_Result_3 := Fld_9;
else
   If_Result_3 := False;
end if;
--# expr-done 8826
if If_Result_3 then
--# expr-start 8828 '<FieldAccess for previous_part at nodes.lkt:16085:14>' Fld_6 ada/nodes.lkt:16085
--# expr-start 8827 '<Cast to BaseTypeDecl at nodes.lkt:16085:14>' Cast_Result_2 ada/nodes.lkt:16085
Cast_Expr_2 := Local_Bd; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_2 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 8827
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.previous_part
Fld_6 := Libadalang.Implementation.Base_Type_Decl_P_Previous_Part (Node => Cast_Result_2.Node, Go_To_Incomplete => True, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 8828
Var_Expr_214 := Fld_6;
if Var_Expr_214 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 8829 '<FieldAccess for defining_name at nodes.lkt:16085:14>' Fld_7 ada/nodes.lkt:16085
      if Var_Expr_214.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_214.Node, E_Info => Var_Expr_214.Info);
--# end
--# expr-done 8829
Scope_Result_3 := Fld_7;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Entity_Defining_Name;
end if;
   If_Result_4 := Result_Var_3;
else
   --# expr-start 8836 '<If at nodes.lkt:16081:9>' If_Result_2 ada/nodes.lkt:16081
--# expr-start 8830 '<IsA ObjectDecl at nodes.lkt:16086:14>' Is_A_2 ada/nodes.lkt:16086
Is_A_2 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Object_Decl_Range; 
--# expr-done 8830
if Is_A_2 then
   If_Result_2 := No_Entity_Defining_Name;
else
   --# expr-start 8835 '<If at nodes.lkt:16081:9>' If_Result_1 ada/nodes.lkt:16081
--# expr-start 8831 '<IsA NumberDecl at nodes.lkt:16091:14>' Is_A_1 ada/nodes.lkt:16091
Is_A_1 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Number_Decl_Range; 
--# expr-done 8831
if Is_A_1 then
   If_Result_1 := No_Entity_Defining_Name;
else
   --# expr-start 8834 '<If at nodes.lkt:16081:9>' If_Result ada/nodes.lkt:16081
--# expr-start 8832 '<IsA BasicDecl at nodes.lkt:16095:14>' Is_A ada/nodes.lkt:16095
Is_A := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Basic_Decl; 
--# expr-done 8832
if Is_A then
   If_Result := Local_Dn;
else
   --# expr-start 8833 '<FieldAccess for referenced_defining_name at nodes.lkt:16096:14>' Fld_8 ada/nodes.lkt:16096
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_defining_name
Fld_8 := Libadalang.Implementation.Name_P_Referenced_Defining_Name (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 8833
   If_Result := Fld_8;
end if;
--# expr-done 8834
   If_Result_1 := If_Result;
end if;
--# expr-done 8835
   If_Result_2 := If_Result_1;
end if;
--# expr-done 8836
   If_Result_4 := If_Result_2;
end if;
--# expr-done 8837
   If_Result_5 := If_Result_4;
end if;
--# expr-done 8838
   If_Result_6 := If_Result_5;
end if;
--# expr-done 8839
Let_Result := If_Result_6; 
--# end
--# expr-done 8840
Let_Result_1 := Let_Result; 
--# end
--# expr-done 8841
         Property_Result := Let_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Gnat_Xref_Decl;
--# end
--# property-start Name.all_env_elements_internal ada/nodes.lkt:16101
pragma Warnings (Off, "is not referenced");
 function Name_P_All_Env_Elements_Internal
  (Node : Bare_Name
      ; Seq : Boolean
         := True
      ; Seq_From : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Categories : Ref_Categories
         := (Inherited_Primitives => True, Nocat => True)
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind seq Seq
   --# bind seq_from Seq_From
   --# bind categories Categories
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_205 with Inline_Always;
      Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result_1 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_205 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
            end Finalizer_Scope_205;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8846 '<bind at nodes.lkt:16106:9>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:16106
--# expr-start 8842 '<FieldAccess for origin_node at nodes.lkt:16106:23>' Fld ada/nodes.lkt:16106
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 8842
Bound_Origin := Fld; 
--# expr-start 8845 '<bind at nodes.lkt:16107:9>' Dyn_Var_Bind_Result ada/nodes.lkt:16107
--# expr-start 8843 '<FieldAccess for node_env at nodes.lkt:16107:20>' Fld_1 ada/nodes.lkt:16107
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 8843
Bound_Env := Fld_1; Inc_Ref (Bound_Env);
--# expr-start 8844 '<FieldAccess for all_env_els_impl at nodes.lkt:16109:9>' Fld_2 ada/nodes.lkt:16109
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.all_env_els_impl'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_All_Env_Els_Impl (Node => Ent.Node, Seq => Seq, Seq_From => Seq_From, Categories => Categories, Env => Bound_Env, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 8844
Dyn_Var_Bind_Result := Fld_2; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8845
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 8846
         Property_Result := Dyn_Var_Bind_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_205;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_205;
            raise;
      end;
   return Property_Result;
end Name_P_All_Env_Elements_Internal;
--# end
--# property-start Name.all_env_elements ada/nodes.lkt:16118
pragma Warnings (Off, "is not referenced");
 function Name_P_All_Env_Elements
  (Node : Bare_Name
      ; Seq : Boolean
         := True
      ; Seq_From : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind seq Seq
   --# bind seq_from Seq_From
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_206 with Inline_Always;
      Fld : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_206 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_206;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8847 '<FieldAccess for all_env_elements_internal at nodes.lkt:16121:33>' Fld ada/nodes.lkt:16121
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_env_elements_internal
Fld := Libadalang.Implementation.Name_P_All_Env_Elements_Internal (Node => Ent.Node, Seq => Seq, Seq_From => Seq_From, E_Info => Ent.Info);
--# end
--# expr-done 8847
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_206;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_206;
            raise;
      end;
   return Property_Result;
end Name_P_All_Env_Elements;
--# end
--# property-start Name.first_corresponding_decl ada/nodes.lkt:16123
pragma Warnings (Off, "is not referenced");
 function Name_P_First_Corresponding_Decl
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_207 with Inline_Always;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Dotted_Name;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_3 : Bare_Ada_Node;
Is_A : Boolean;
Fld_4 : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_207 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_207;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8858 '<If at nodes.lkt:16124:9>' If_Result_1 ada/nodes.lkt:16124
--# expr-start 8851 '<BooleanBinaryOp And at nodes.lkt:16124:12>' If_Result ada/nodes.lkt:16124
--# expr-start 8849 '<IsA DottedName at nodes.lkt:16124:12>' Is_A ada/nodes.lkt:16124
--# expr-start 8848 '<parent at nodes.lkt:16124:12>' Fld_3 ada/nodes.lkt:16124
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Parent; 
--# expr-done 8848
Is_A := Fld_3 /= null 
and then Fld_3.Kind in Ada_Dotted_Name_Range; 
--# expr-done 8849
if Is_A then
   --# expr-start 8850 '<FieldAccess for is_suffix at nodes.lkt:16124:42>' Fld_4 ada/nodes.lkt:16124
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_suffix
Fld_4 := Libadalang.Implementation.Name_P_Is_Suffix (Node => Self);
--# end
--# expr-done 8850
   If_Result := Fld_4;
else
   If_Result := False;
end if;
--# expr-done 8851
if If_Result then
   --# expr-start 8854 '<FieldAccess for first_corresponding_decl at nodes.lkt:16125:14>' Fld_1 ada/nodes.lkt:16125
--# expr-start 8853 '<Cast to DottedName at nodes.lkt:16125:14>' Cast_Result ada/nodes.lkt:16125
--# expr-start 8852 '<parent at nodes.lkt:16125:14>' Fld ada/nodes.lkt:16125
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 8852
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Create_Internal_Entity_Dotted_Name
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Dotted_Name;
   end if;
--# expr-done 8853
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.first_corresponding_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_First_Corresponding_Decl (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 8854
   If_Result_1 := Fld_1;
else
   --# expr-start 8857 '<Cast to BasicDecl at nodes.lkt:16126:14>' Cast_Result_1 ada/nodes.lkt:16126
--# expr-start 8856 '<at at nodes.lkt:16126:14>' Get_Result ada/nodes.lkt:16126
--# expr-start 8855 '<FieldAccess for all_env_elements_internal at nodes.lkt:16126:14>' Fld_2 ada/nodes.lkt:16126
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_env_elements_internal
Fld_2 := Libadalang.Implementation.Name_P_All_Env_Elements_Internal (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8855
Get_Result := Get (Self, Fld_2, 0, True); 
--# expr-done 8856
   if Get_Result.Node = null
      or else Get_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Get_Result.Node,
         Info => Get_Result.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 8857
   If_Result_1 := Cast_Result_1;
end if;
--# expr-done 8858
         Property_Result := If_Result_1;
   --# end
      Finalizer_Scope_207;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_207;
            raise;
      end;
   return Property_Result;
end Name_P_First_Corresponding_Decl;
--# end
--# property-start Name.all_args_xref_equation ada/nodes.lkt:16135
pragma Warnings (Off, "is not referenced");
 function Name_P_All_Args_Xref_Equation
  (Node : Bare_Name
      ; Root : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind root Root
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_208 with Inline_Always;
            procedure Finalizer_Scope_3093 with Inline_Always;
            procedure Finalizer_Scope_3094 with Inline_Always;
            procedure Finalizer_Scope_3095 with Inline_Always;
            procedure Finalizer_Scope_3096 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Call_Expr;
Var_Expr_2 : Internal_Entity_Name;
Var_Expr_215 : Internal_Entity_Assoc_List;
Cast_Expr : Internal_Entity_Name;
Cast_Result : Internal_Entity_Call_Expr;
Fld : Internal_Entity_Assoc_List;
Saved : Internal_Entity_Assoc_List;
Fld_1 : Bare_Assoc_List;
Fld_2 : Internal_Entity_Info;
Item_1 : Internal_Entity_Basic_Assoc;
Bare_Item_1 : Bare_Basic_Assoc;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Map_Result : Logic_Equation_Array_Access;
Scope_Result : Logic_Equation_Array_Access;
Result_Var : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var_1 : Logic_Equation;
Fld_5 : Internal_Entity_Name;
Fld_6 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_2 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_208 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_208;
            procedure Finalizer_Scope_3093 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_3093;
            procedure Finalizer_Scope_3094 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3094;
            procedure Finalizer_Scope_3095 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3095;
            procedure Finalizer_Scope_3096 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_3096;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8867 '<LogicBinaryOp And at nodes.lkt:16136:9>' And_Pred ada/nodes.lkt:16136
--# expr-start 8859 '<Cast to CallExpr at nodes.lkt:16136:9>' Cast_Result ada/nodes.lkt:16136
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result := Create_Internal_Entity_Call_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Call_Expr;
   end if;
--# expr-done 8859
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Call_Expr then
   --# scope-start
   --# bind ce Var_Expr_0
--# expr-start 8864 '<LogicAll at nodes.lkt:16137:21>' Logic_Boolean_Op ada/nodes.lkt:16137
--# expr-start 8860 '<FieldAccess for params at nodes.lkt:16137:21>' Fld ada/nodes.lkt:16137
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld := Libadalang.Implementation.Call_Expr_P_Params (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8860
Var_Expr_215 := Fld;
if Var_Expr_215 /= No_Entity_Assoc_List then
   --# scope-start
--# expr-start 8863 '<Map at nodes.lkt:16137:21>' Map_Result ada/nodes.lkt:16137
Saved := Var_Expr_215; 
Fld_1 := Saved.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_1;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_2 := Saved.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind pa Item_1
      --# expr-start 8862 '<FieldAccess for sub_equation at nodes.lkt:16137:52>' Fld_4 ada/nodes.lkt:16137
--# expr-start 8861 '<FieldAccess for expr at nodes.lkt:16137:52>' Fld_3 ada/nodes.lkt:16137
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 8861
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 8862
         declare
            Item_To_Append : constant Logic_Equation := Fld_4;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3095;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8863
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3094;
   Result_Var := Scope_Result;
else
   Result_Var := No_Logic_Equation_Array_Type;
end if;
      Inc_Ref (Result_Var);
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Result_Var.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16137:21") else null)); 
--# expr-done 8864
Scope_Result_1 := Logic_Boolean_Op;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3093;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16138:25") else null)); 
   Result_Var_1 := True_Rel;
end if;
      Inc_Ref (Result_Var_1);
--# expr-start 8865 '<FieldAccess for parent_name at nodes.lkt:16140:14>' Fld_5 ada/nodes.lkt:16140
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name
Fld_5 := Libadalang.Implementation.Name_P_Parent_Name (Node => Ent.Node, Stop_At => Root, E_Info => Ent.Info);
--# end
--# expr-done 8865
Var_Expr_2 := Fld_5;
if Var_Expr_2 /= No_Entity_Name then
   --# scope-start
   --# bind name Var_Expr_2
--# expr-start 8866 '<FieldAccess for all_args_xref_equation at nodes.lkt:16141:23>' Fld_6 ada/nodes.lkt:16141
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_args_xref_equation
Fld_6 := Libadalang.Implementation.Name_P_All_Args_Xref_Equation (Node => Var_Expr_2.Node, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 8866
Scope_Result_2 := Fld_6;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3096;
   Result_Var_2 := Scope_Result_2;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16142:25") else null)); 
   Result_Var_2 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_2);
And_Pred := Create_And (Result_Var_1, Result_Var_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16136:9") else null)); 
--# expr-done 8867
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_208;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_208;
                     Finalizer_Scope_3093;
                     Finalizer_Scope_3094;
                     Finalizer_Scope_3095;
                     Finalizer_Scope_3096;
            raise;
      end;
   return Property_Result;
end Name_P_All_Args_Xref_Equation;
--# end
--# property-start Name.undefined_reference_equation ada/nodes.lkt:16147
pragma Warnings (Off, "is not referenced");
 function Name_P_Undefined_Reference_Equation
  (Node : Bare_Name
  )
   return Logic_Equation
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_209 with Inline_Always;
      Fld : Logic_Var;
Bind_Result : Logic_Equation;
Cast_Expr : Bare_Name;
Cast_Result : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld_1 : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_209 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_209;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8873 '<LogicBinaryOp And at nodes.lkt:16148:9>' And_Pred ada/nodes.lkt:16148
--# expr-start 8869 '<Bind at nodes.lkt:16148:9>' Bind_Result ada/nodes.lkt:16148
--# expr-start 8868 '<FieldAccess for ref_var at nodes.lkt:16148:9>' Fld ada/nodes.lkt:16148
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 8868
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
Bind_Result := Solver.Create_Assign (Fld, No_Entity, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16148:9") else null)); 
--# expr-done 8869
--# expr-start 8872 '<bind at nodes.lkt:16150:13>' Dyn_Var_Bind_Result ada/nodes.lkt:16150
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Error_Location := Cast_Result; 
--# expr-start 8871 '<Predicate on AdaNode.missing_entity_error at nodes.lkt:16151:13>' Pred ada/nodes.lkt:16151
--# expr-start 8870 '<FieldAccess for ref_var at nodes.lkt:16151:43>' Fld_1 ada/nodes.lkt:16151
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 8870
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Pred := Solver.Create_Predicate (Fld_1, Create_Ada_Node_P_Missing_Entity_Error_0_Predicate (Bound_Error_Location)); 
--# expr-done 8871
Dyn_Var_Bind_Result := Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 8872
And_Pred := Create_And (Bind_Result, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16148:9") else null)); 
--# expr-done 8873
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_209;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_209;
            raise;
      end;
   return Property_Result;
end Name_P_Undefined_Reference_Equation;
--# end
--# property-start Name.bottom_up_name_equation ada/nodes.lkt:16155
pragma Warnings (Off, "is not referenced");
 function Name_P_Bottom_Up_Name_Equation
  (Node : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_210 with Inline_Always;
            procedure Finalizer_Scope_3097 with Inline_Always;
            procedure Finalizer_Scope_3098 with Inline_Always;
            procedure Finalizer_Scope_3099 with Inline_Always;
            procedure Finalizer_Scope_3100 with Inline_Always;
      Match_0 : Internal_Entity_Call_Expr;
Match_1 : Internal_Entity_Explicit_Deref;
Match_2 : Internal_Entity_Qual_Expr;
Match_3 : Internal_Entity_Name;
Fld : Bare_Name;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Equation;
Fld_3 : Logic_Equation;
False_Rel : Logic_Equation;
Match_Prefix : Internal_Entity_Name;
Cast_Result : Internal_Entity_Call_Expr;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_1 : Internal_Entity_Explicit_Deref;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_2 : Internal_Entity_Qual_Expr;
Let_Result_2 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Cast_Result_3 : Internal_Entity_Name;
Let_Result_3 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
Match_Result : Logic_Equation;
            procedure Finalizer_Scope_210 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_210;
            procedure Finalizer_Scope_3097 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3097;
            procedure Finalizer_Scope_3098 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_3098;
            procedure Finalizer_Scope_3099 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3099;
            procedure Finalizer_Scope_3100 is
            begin
                     Dec_Ref (False_Rel);
            end Finalizer_Scope_3100;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8879 '<Match at nodes.lkt:16155:47>' Match_Result ada/nodes.lkt:16155
--# expr-start 8875 '<as_entity at nodes.lkt:16156:9>' If_Result ada/nodes.lkt:16156
--# expr-start 8874 '<FieldAccess for innermost_name at nodes.lkt:16156:9>' Fld ada/nodes.lkt:16156
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.innermost_name
Fld := Libadalang.Implementation.Name_P_Innermost_Name (Node => Self);
--# end
--# expr-done 8874
Is_Null := Fld = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
As_Entity := (Info => E_Info, Node => Fld); 
   If_Result := As_Entity;
end if;
--# expr-done 8875
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := If_Result; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind ce Match_0
--# expr-start 8876 '<FieldAccess for general_xref_equation at nodes.lkt:16158:30>' Fld_1 ada/nodes.lkt:16158
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.general_xref_equation
Fld_1 := Libadalang.Implementation.Call_Expr_P_General_Xref_Equation (Node => Match_0.Node, Root => Self, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_0.Info);
--# end
--# expr-done 8876
Let_Result := Fld_1; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3097;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Explicit_Deref =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Explicit_Deref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind ed Match_1
--# expr-start 8877 '<FieldAccess for general_xref_equation at nodes.lkt:16159:35>' Fld_2 ada/nodes.lkt:16159
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ExplicitDeref.general_xref_equation
Fld_2 := Libadalang.Implementation.Explicit_Deref_P_General_Xref_Equation (Node => Match_1.Node, Root => Self, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_1.Info);
--# end
--# expr-done 8877
Let_Result_1 := Fld_2; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3098;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Qual_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Qual_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind qe Match_2
--# expr-start 8878 '<FieldAccess for general_xref_equation at nodes.lkt:16160:30>' Fld_3 ada/nodes.lkt:16160
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start QualExpr.general_xref_equation
Fld_3 := Libadalang.Implementation.Qual_Expr_P_General_Xref_Equation (Node => Match_2.Node, Root => Self, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_2.Info);
--# end
--# expr-done 8878
Let_Result_2 := Fld_3; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3099;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_End_Name | Ada_Reduce_Attribute_Ref .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_3; 
--# bind _ Match_3
False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16161:19") else null)); 
Let_Result_3 := False_Rel; Inc_Ref (Let_Result_3);
--# end
Scope_Result_3 := Let_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3100;
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
end case;
--# expr-done 8879
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_210;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_210;
                     Finalizer_Scope_3097;
                     Finalizer_Scope_3098;
                     Finalizer_Scope_3099;
                     Finalizer_Scope_3100;
            raise;
      end;
   return Property_Result;
end Name_P_Bottom_Up_Name_Equation;
--# end
--# property-start Name.innermost_name ada/nodes.lkt:16174
pragma Warnings (Off, "is not referenced");
 function Name_P_Innermost_Name
  (Node : Bare_Name
  )
   return Bare_Name
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Bare_Name;
      Local_Name : Bare_Name;
Match_0 : Bare_Call_Expr;
Match_1 : Bare_Explicit_Deref;
Match_2 : Bare_Name;
Fld : Bare_Name;
Fld_1 : Bare_Name;
Match_Prefix : Bare_Name;
Cast_Result : Bare_Call_Expr;
Let_Result : Bare_Name;
Scope_Result : Bare_Name;
Cast_Result_1 : Bare_Explicit_Deref;
Let_Result_1 : Bare_Name;
Scope_Result_1 : Bare_Name;
Cast_Result_2 : Bare_Name;
Let_Result_2 : Bare_Name;
Scope_Result_2 : Bare_Name;
Match_Result : Bare_Name;
Fld_2 : Bare_Name;
Is_A : Boolean;
If_Result : Bare_Name;
Is_A_1 : Boolean;
If_Result_1 : Bare_Name;
Let_Result_3 : Bare_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8888 '<Let at nodes.lkt:16175:9>' Let_Result_3 ada/nodes.lkt:16175
--# scope-start
--# expr-start 8882 '<Match at nodes.lkt:16175:20>' Match_Result ada/nodes.lkt:16175
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Self; 
case Ada_Name (Match_Prefix.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind ce Match_0
--# expr-start 8880 '<FieldAccess for name at nodes.lkt:16176:34>' Fld ada/nodes.lkt:16176
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Match_0.Call_Expr_F_Name;
--# expr-done 8880
Let_Result := Fld; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Explicit_Deref =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind ed Match_1
--# expr-start 8881 '<FieldAccess for prefix at nodes.lkt:16177:39>' Fld_1 ada/nodes.lkt:16177
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Match_1.Explicit_Deref_F_Prefix;
--# expr-done 8881
Let_Result_1 := Fld_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_End_Name | Ada_Qual_Expr .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Bare_Ada_Node; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 8882
Local_Name := Match_Result; 
--# bind name Local_Name
--# expr-start 8887 '<If at nodes.lkt:16181:9>' If_Result_1 ada/nodes.lkt:16181
--# expr-start 8883 '<IsA CallExpr, ExplicitDeref at nodes.lkt:16181:12>' Is_A_1 ada/nodes.lkt:16181
Is_A_1 := Local_Name /= null 
and then Local_Name.Kind in Ada_Call_Expr_Range | Ada_Explicit_Deref_Range; 
--# expr-done 8883
if Is_A_1 then
   --# expr-start 8884 '<FieldAccess for innermost_name at nodes.lkt:16181:50>' Fld_2 ada/nodes.lkt:16181
      if Local_Name = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.innermost_name
Fld_2 := Libadalang.Implementation.Name_P_Innermost_Name (Node => Local_Name);
--# end
--# expr-done 8884
   If_Result_1 := Fld_2;
else
   --# expr-start 8886 '<If at nodes.lkt:16181:9>' If_Result ada/nodes.lkt:16181
--# expr-start 8885 '<IsA QualExpr at nodes.lkt:16182:14>' Is_A ada/nodes.lkt:16182
Is_A := Local_Name /= null 
and then Local_Name.Kind in Ada_Qual_Expr_Range; 
--# expr-done 8885
if Is_A then
   If_Result := Local_Name;
else
   If_Result := Self;
end if;
--# expr-done 8886
   If_Result_1 := If_Result;
end if;
--# expr-done 8887
Let_Result_3 := If_Result_1; 
--# end
--# expr-done 8888
         Property_Result := Let_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Innermost_Name;
--# end
--# property-start Name.leftmost_name ada/nodes.lkt:16205
pragma Warnings (Off, "is not referenced");
 function Name_P_Leftmost_Name
  (Node : Bare_Name
  )
   return Bare_Name
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Bare_Name;
      Match_0 : Bare_Call_Expr;
Match_1 : Bare_Array_Subcomponent_Choice_Name;
Match_2 : Bare_Dotted_Name;
Match_3 : Bare_Attribute_Ref;
Match_4 : Bare_Name;
Var_Expr_216 : Bare_Name;
Fld : Bare_Name;
Fld_1 : Bare_Name;
Fld_2 : Bare_Name;
Fld_3 : Bare_Name;
Scope_Result : Bare_Name;
Result_Var : Bare_Name;
Fld_4 : Bare_Name;
Fld_5 : Bare_Name;
Fld_6 : Bare_Name;
Fld_7 : Bare_Name;
Match_Prefix : Bare_Name;
Cast_Result : Bare_Call_Expr;
Let_Result : Bare_Name;
Scope_Result_1 : Bare_Name;
Cast_Result_1 : Bare_Array_Subcomponent_Choice_Name;
Let_Result_1 : Bare_Name;
Scope_Result_2 : Bare_Name;
Cast_Result_2 : Bare_Dotted_Name;
Let_Result_2 : Bare_Name;
Scope_Result_3 : Bare_Name;
Cast_Result_3 : Bare_Attribute_Ref;
Let_Result_3 : Bare_Name;
Scope_Result_4 : Bare_Name;
Cast_Result_4 : Bare_Name;
Let_Result_4 : Bare_Name;
Scope_Result_5 : Bare_Name;
Match_Result : Bare_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8897 '<Match at nodes.lkt:16205:33>' Match_Result ada/nodes.lkt:16205
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Self; 
case Ada_Name (Match_Prefix.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind ce Match_0
--# expr-start 8890 '<FieldAccess for leftmost_name at nodes.lkt:16206:30>' Fld_1 ada/nodes.lkt:16206
--# expr-start 8889 '<FieldAccess for name at nodes.lkt:16206:30>' Fld ada/nodes.lkt:16206
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Match_0.Call_Expr_F_Name;
--# expr-done 8889
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.leftmost_name
Fld_1 := Libadalang.Implementation.Name_P_Leftmost_Name (Node => Fld);
--# end
--# expr-done 8890
Let_Result := Fld_1; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Array_Subcomponent_Choice_Name =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind ascn Match_1
--# expr-start 8891 '<FieldAccess for name at nodes.lkt:16207:51>' Fld_2 ada/nodes.lkt:16207
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Match_1.Array_Subcomponent_Choice_Name_F_Name;
--# expr-done 8891
Var_Expr_216 := Fld_2;
if Var_Expr_216 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 8892 '<FieldAccess for leftmost_name at nodes.lkt:16207:51>' Fld_3 ada/nodes.lkt:16207
      if Var_Expr_216 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.leftmost_name
Fld_3 := Libadalang.Implementation.Name_P_Leftmost_Name (Node => Var_Expr_216);
--# end
--# expr-done 8892
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
Let_Result_1 := Result_Var; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind dn Match_2
--# expr-start 8894 '<FieldAccess for leftmost_name at nodes.lkt:16208:32>' Fld_5 ada/nodes.lkt:16208
--# expr-start 8893 '<FieldAccess for prefix at nodes.lkt:16208:32>' Fld_4 ada/nodes.lkt:16208
      if Match_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Match_2.Dotted_Name_F_Prefix;
--# expr-done 8893
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.leftmost_name
Fld_5 := Libadalang.Implementation.Name_P_Leftmost_Name (Node => Fld_4);
--# end
--# expr-done 8894
Let_Result_2 := Fld_5; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_3 := Cast_Result_3; 
--# bind ar Match_3
--# expr-start 8896 '<FieldAccess for leftmost_name at nodes.lkt:16209:34>' Fld_7 ada/nodes.lkt:16209
--# expr-start 8895 '<FieldAccess for prefix at nodes.lkt:16209:34>' Fld_6 ada/nodes.lkt:16209
      if Match_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Match_3.Attribute_Ref_F_Prefix;
--# expr-done 8895
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.leftmost_name
Fld_7 := Libadalang.Implementation.Name_P_Leftmost_Name (Node => Fld_6);
--# end
--# expr-done 8896
Let_Result_3 := Fld_7; 
--# end
Scope_Result_4 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix;
Match_4 := Cast_Result_4; 
--# bind _ Match_4
Let_Result_4 := Self; 
--# end
Scope_Result_5 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 8897
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Leftmost_Name;
--# end
--# property-start Name.parent_name_equation ada/nodes.lkt:16215
pragma Warnings (Off, "is not referenced");
 function Name_P_Parent_Name_Equation
  (Node : Bare_Name
      ; Typ : Internal_Entity_Base_Type_Decl
      ; Root : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind root Root
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_213 with Inline_Always;
            procedure Finalizer_Scope_3116 with Inline_Always;
            procedure Finalizer_Scope_3117 with Inline_Always;
            procedure Finalizer_Scope_3119 with Inline_Always;
            procedure Finalizer_Scope_3120 with Inline_Always;
      Local_As_Subp_Access : Internal_Entity_Access_To_Subp_Def;
Local_Is_Paramless : Boolean;
Local_Can_Be_Paramless : Boolean;
Local_Comp_Type : Internal_Entity_Base_Type_Decl;
Match_0 : Bare_Call_Expr;
Match_1 : Bare_Explicit_Deref;
Match_2 : Bare_Name;
Var_Expr_0 : Internal_Entity_Name;
Var_Expr_217 : Internal_Entity_Base_Type_Decl;
Var_Expr_218 : Internal_Entity_Access_To_Subp_Def;
Var_Expr_219 : Internal_Entity_Access_To_Subp_Def;
Var_Expr_220 : Internal_Entity_Base_Type_Decl;
Var_Expr_221 : Internal_Entity_Base_Type_Decl;
Var_Expr_222 : Internal_Entity_Base_Type_Decl;
Var_Expr_223 : Internal_Entity_Access_To_Subp_Def;
Var_Expr_224 : Internal_Entity_Call_Expr;
Fld : Internal_Entity_Access_Def;
Scope_Result : Internal_Entity_Access_Def;
Result_Var : Internal_Entity_Access_Def;
Cast_Result : Internal_Entity_Access_To_Subp_Def;
Fld_1 : Internal_Entity_Subp_Spec;
Fld_2 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Fld_3 : Internal_Entity_Subp_Spec;
Fld_4 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Fld_5 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var_3 : Internal_Entity_Base_Type_Decl;
Is_A : Boolean;
Not_Val : Boolean;
Fld_6 : Internal_Entity_Base_Type_Decl;
Scope_Result_4 : Internal_Entity_Base_Type_Decl;
Result_Var_4 : Internal_Entity_Base_Type_Decl;
Fld_7 : Boolean;
Scope_Result_5 : Boolean;
Result_Var_5 : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
False_Rel : Logic_Equation;
As_Entity : Internal_Entity_Call_Expr;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Call_Expr;
Fld_8 : Logic_Equation;
As_Entity_1 : Internal_Entity_Explicit_Deref;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity_Explicit_Deref;
Fld_9 : Logic_Equation;
Fld_10 : Logic_Var;
Fld_11 : Internal_Entity_Subp_Spec;
Scope_Result_6 : Internal_Entity_Subp_Spec;
Result_Var_6 : Internal_Entity_Subp_Spec;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_12 : Logic_Var;
Fld_13 : Bare_Ada_Node;
As_Entity_2 : Internal_Entity;
Is_Null_2 : Boolean;
If_Result_3 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Match_Prefix : Bare_Name;
Cast_Result_2 : Bare_Call_Expr;
Let_Result : Logic_Equation;
Scope_Result_7 : Logic_Equation;
Cast_Result_3 : Bare_Explicit_Deref;
Let_Result_1 : Logic_Equation;
Scope_Result_8 : Logic_Equation;
Cast_Result_4 : Bare_Name;
Let_Result_2 : Logic_Equation;
Scope_Result_9 : Logic_Equation;
Match_Result : Logic_Equation;
Fld_14 : Internal_Entity_Name;
Fld_15 : Logic_Equation;
Fld_16 : Logic_Equation;
Fld_17 : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_18 : Logic_Equation;
If_Result_4 : Logic_Equation;
If_Result_5 : Logic_Equation;
Fld_19 : Logic_Equation;
Fld_20 : Logic_Equation;
Cast_Expr : Internal_Entity_Name;
Cast_Result_5 : Internal_Entity_Call_Expr;
Fld_21 : Boolean;
Scope_Result_10 : Boolean;
Result_Var_7 : Boolean;
If_Result_6 : Logic_Equation;
Is_A_1 : Boolean;
Is_Null_3 : Boolean;
Not_Val_1 : Boolean;
If_Result_7 : Boolean;
If_Result_8 : Logic_Equation;
Scope_Result_11 : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var_8 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_Null_4 : Boolean;
If_Result_9 : Logic_Equation;
Let_Result_3 : Logic_Equation;
Let_Result_4 : Logic_Equation;
Let_Result_5 : Logic_Equation;
Let_Result_6 : Logic_Equation;
            procedure Finalizer_Scope_213 is
            begin
                     Dec_Ref (False_Rel);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_8);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_9);
                     Dec_Ref (Match_Result);
                     Dec_Ref (Scope_Result_11);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var_8);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result_9);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
            end Finalizer_Scope_213;
            procedure Finalizer_Scope_3116 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_3116;
            procedure Finalizer_Scope_3117 is
            begin
                     Dec_Ref (Fld_9);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3117;
            procedure Finalizer_Scope_3119 is
            begin
                     Dec_Ref (Bind_Result_1);
            end Finalizer_Scope_3119;
            procedure Finalizer_Scope_3120 is
            begin
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Fld_18);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Fld_20);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (If_Result_8);
            end Finalizer_Scope_3120;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8946 '<Let at nodes.lkt:16219:9>' Let_Result_6 ada/nodes.lkt:16219
--# scope-start
--# expr-start 8899 '<Cast to AccessToSubpDef at nodes.lkt:16219:30>' Cast_Result ada/nodes.lkt:16219
Var_Expr_217 := Typ;
if Var_Expr_217 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 8898 '<FieldAccess for access_def at nodes.lkt:16219:30>' Fld ada/nodes.lkt:16219
      if Var_Expr_217.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Var_Expr_217.Node, Origin => Origin, E_Info => Var_Expr_217.Info);
--# end
--# expr-done 8898
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Access_Def;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Access_To_Subp_Def_Range
   then
      Cast_Result := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Access_To_Subp_Def;
   end if;
--# expr-done 8899
Local_As_Subp_Access := Cast_Result; 
--# bind as_subp_access Local_As_Subp_Access
--# expr-start 8945 '<Let at nodes.lkt:16220:9>' Let_Result_5 ada/nodes.lkt:16220
--# scope-start
Var_Expr_218 := Local_As_Subp_Access;
if Var_Expr_218 /= No_Entity_Access_To_Subp_Def then
   --# scope-start
--# expr-start 8901 '<FieldAccess for paramless at nodes.lkt:16221:13>' Fld_2 ada/nodes.lkt:16221
--# expr-start 8900 '<FieldAccess for subp_spec at nodes.lkt:16221:13>' Fld_1 ada/nodes.lkt:16221
      if Var_Expr_218.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Subp_Spec (Node => Var_Expr_218.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Var_Expr_218.Info);
--# expr-done 8900
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.paramless
Fld_2 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Paramless (Node => Fld_1.Node, Dottable_Subp => False, Can_Be => False);
--# end
--# expr-done 8901
Scope_Result_1 := Fld_2;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Local_Is_Paramless := Result_Var_1; 
--# bind is_paramless Local_Is_Paramless
--# expr-start 8944 '<Let at nodes.lkt:16225:9>' Let_Result_4 ada/nodes.lkt:16225
--# scope-start
Var_Expr_219 := Local_As_Subp_Access;
if Var_Expr_219 /= No_Entity_Access_To_Subp_Def then
   --# scope-start
--# expr-start 8903 '<FieldAccess for paramless at nodes.lkt:16226:13>' Fld_4 ada/nodes.lkt:16226
--# expr-start 8902 '<FieldAccess for subp_spec at nodes.lkt:16226:13>' Fld_3 ada/nodes.lkt:16226
      if Var_Expr_219.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Subp_Spec (Node => Var_Expr_219.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Var_Expr_219.Info);
--# expr-done 8902
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.paramless
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Paramless (Node => Fld_3.Node, Dottable_Subp => False, Can_Be => True);
--# end
--# expr-done 8903
Scope_Result_2 := Fld_4;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
Local_Can_Be_Paramless := Result_Var_2; 
--# bind can_be_paramless Local_Can_Be_Paramless
--# expr-start 8943 '<Let at nodes.lkt:16230:9>' Let_Result_3 ada/nodes.lkt:16230
--# scope-start
--# expr-start 8909 '<If at nodes.lkt:16234:13>' If_Result ada/nodes.lkt:16234
Var_Expr_220 := Typ;
if Var_Expr_220 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 8904 '<FieldAccess for is_iterable_type at nodes.lkt:16234:16>' Fld_7 ada/nodes.lkt:16234
      if Var_Expr_220.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_iterable_type'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Iterable_Type (Node => Var_Expr_220.Node, Origin => Origin, E_Info => Var_Expr_220.Info);
--# end
--# expr-done 8904
Scope_Result_5 := Fld_7;
   --# end
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := False;
end if;
if Result_Var_5 then
Var_Expr_221 := Typ;
if Var_Expr_221 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 8905 '<FieldAccess for iterable_comp_type at nodes.lkt:16234:45>' Fld_5 ada/nodes.lkt:16234
      if Var_Expr_221.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.iterable_comp_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Iterable_Comp_Type (Node => Var_Expr_221.Node, Origin => Origin, E_Info => Var_Expr_221.Info);
--# end
--# expr-done 8905
Scope_Result_3 := Fld_5;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Entity_Base_Type_Decl;
end if;
   If_Result := Result_Var_3;
else
Var_Expr_222 := Typ;
if Var_Expr_222 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 8908 '<FieldAccess for comp_type at nodes.lkt:16235:18>' Fld_6 ada/nodes.lkt:16235
      if Var_Expr_222.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8907 '<Not at nodes.lkt:16235:46>' Not_Val ada/nodes.lkt:16235
--# expr-start 8906 '<IsA ExplicitDeref at nodes.lkt:16235:50>' Is_A ada/nodes.lkt:16235
Is_A := Self /= null 
and then Self.Kind in Ada_Explicit_Deref_Range; 
--# expr-done 8906
Not_Val := not (Is_A); 
--# expr-done 8907
--# property-call-start BaseTypeDecl.comp_type
Fld_6 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Var_Expr_222.Node, Is_Subscript => Not_Val, Origin => Origin, E_Info => Var_Expr_222.Info);
--# end
--# expr-done 8908
Scope_Result_4 := Fld_6;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := No_Entity_Base_Type_Decl;
end if;
   If_Result := Result_Var_4;
end if;
--# expr-done 8909
Local_Comp_Type := If_Result; 
--# bind comp_type Local_Comp_Type
--# expr-start 8942 '<If at nodes.lkt:16237:9>' If_Result_9 ada/nodes.lkt:16237
--# expr-start 8910 '<IsNull at nodes.lkt:16237:12>' Is_Null_4 ada/nodes.lkt:16237
Is_Null_4 := Typ.Node = null; 
--# expr-done 8910
if Is_Null_4 then
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16237:29") else null)); 
   If_Result_9 := False_Rel;
else
   --# expr-start 8941 '<LogicBinaryOp And at nodes.lkt:16239:13>' And_Pred_1 ada/nodes.lkt:16239
--# expr-start 8922 '<Match at nodes.lkt:16239:13>' Match_Result ada/nodes.lkt:16239
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Self; 
case Ada_Name (Match_Prefix.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_0 := Cast_Result_2; 
--# bind ce Match_0
--# expr-start 8912 '<FieldAccess for subscriptable_type_equation at nodes.lkt:16241:21>' Fld_8 ada/nodes.lkt:16241
--# expr-start 8911 '<as_entity at nodes.lkt:16241:21>' If_Result_1 ada/nodes.lkt:16241
Is_Null := Match_0 = null; 
if Is_Null then
   If_Result_1 := No_Entity_Call_Expr;
else
As_Entity := (Info => E_Info, Node => Match_0); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 8911
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.subscriptable_type_equation
Fld_8 := Libadalang.Implementation.Call_Expr_P_Subscriptable_Type_Equation (Node => If_Result_1.Node, Typ => Typ, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => If_Result_1.Info);
--# end
--# expr-done 8912
Let_Result := Fld_8; Inc_Ref (Let_Result);
--# end
Scope_Result_7 := Let_Result;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3116;
            Match_Result := Scope_Result_7; Inc_Ref (Match_Result);
         when Ada_Explicit_Deref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_1 := Cast_Result_3; 
--# bind ed Match_1
--# expr-start 8918 '<LogicBinaryOp And at nodes.lkt:16243:21>' And_Pred ada/nodes.lkt:16243
--# expr-start 8914 '<FieldAccess for eq_for_type at nodes.lkt:16243:21>' Fld_9 ada/nodes.lkt:16243
--# expr-start 8913 '<as_entity at nodes.lkt:16243:21>' If_Result_2 ada/nodes.lkt:16243
Is_Null_1 := Match_1 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity_Explicit_Deref;
else
As_Entity_1 := (Info => E_Info, Node => Match_1); 
   If_Result_2 := As_Entity_1;
end if;
--# expr-done 8913
      if If_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ExplicitDeref.eq_for_type
Fld_9 := Libadalang.Implementation.Explicit_Deref_P_Eq_For_Type (Node => If_Result_2.Node, Typ => Typ, Env => Env, Origin => Origin, E_Info => If_Result_2.Info);
--# end
--# expr-done 8914
--# expr-start 8917 '<Bind at nodes.lkt:16249:25>' Bind_Result ada/nodes.lkt:16249
--# expr-start 8915 '<FieldAccess for subp_spec_var at nodes.lkt:16249:25>' Fld_10 ada/nodes.lkt:16249
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld_10 := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Self);
--# end
--# expr-done 8915
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
Var_Expr_223 := Local_As_Subp_Access;
if Var_Expr_223 /= No_Entity_Access_To_Subp_Def then
   --# scope-start
--# expr-start 8916 '<FieldAccess for subp_spec at nodes.lkt:16249:49>' Fld_11 ada/nodes.lkt:16249
      if Var_Expr_223.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Subp_Spec (Node => Var_Expr_223.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Var_Expr_223.Info);
--# expr-done 8916
Scope_Result_6 := Fld_11;
   --# end
   Result_Var_6 := Scope_Result_6;
else
   Result_Var_6 := No_Entity_Subp_Spec;
end if;
      Cast_Result_1 := Create_Internal_Entity
        (Node => Result_Var_6.Node,
         Info => Result_Var_6.Info);
Bind_Result := Solver.Create_Assign (Fld_10, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16249:25") else null)); 
--# expr-done 8917
And_Pred := Create_And (Fld_9, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16243:21") else null)); 
--# expr-done 8918
Let_Result_1 := And_Pred; Inc_Ref (Let_Result_1);
--# end
Scope_Result_8 := Let_Result_1;
   Inc_Ref (Scope_Result_8);
   --# end
      Finalizer_Scope_3117;
            Match_Result := Scope_Result_8; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_End_Name | Ada_Qual_Expr .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix;
Match_2 := Cast_Result_4; 
--# bind _ Match_2
--# expr-start 8921 '<Bind at nodes.lkt:16251:27>' Bind_Result_1 ada/nodes.lkt:16251
--# expr-start 8919 '<FieldAccess for type_var at nodes.lkt:16251:27>' Fld_12 ada/nodes.lkt:16251
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 8919
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
--# expr-start 8920 '<FieldAccess for node at nodes.lkt:16251:46>' Fld_13 ada/nodes.lkt:16251
Fld_13 := No_Entity.Node;
--# expr-done 8920
Is_Null_2 := Fld_13 = null; 
if Is_Null_2 then
   If_Result_3 := No_Entity;
else
As_Entity_2 := (Info => E_Info, Node => Fld_13); 
   If_Result_3 := As_Entity_2;
end if;
Bind_Result_1 := Solver.Create_Assign (Fld_12, If_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16251:27") else null)); 
--# expr-done 8921
Let_Result_2 := Bind_Result_1; Inc_Ref (Let_Result_2);
--# end
Scope_Result_9 := Let_Result_2;
   Inc_Ref (Scope_Result_9);
   --# end
      Finalizer_Scope_3119;
            Match_Result := Scope_Result_9; Inc_Ref (Match_Result);
end case;
--# expr-done 8922
--# expr-start 8923 '<FieldAccess for parent_name at nodes.lkt:16253:18>' Fld_14 ada/nodes.lkt:16253
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name
Fld_14 := Libadalang.Implementation.Name_P_Parent_Name (Node => Ent.Node, Stop_At => Root, E_Info => Ent.Info);
--# end
--# expr-done 8923
Var_Expr_0 := Fld_14;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind pn Var_Expr_0
--# expr-start 8940 '<If at nodes.lkt:16255:17>' If_Result_8 ada/nodes.lkt:16255
--# expr-start 8927 '<BooleanBinaryOp And at nodes.lkt:16255:20>' If_Result_7 ada/nodes.lkt:16255
--# expr-start 8924 '<IsA ExplicitDeref at nodes.lkt:16255:20>' Is_A_1 ada/nodes.lkt:16255
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Explicit_Deref_Range; 
--# expr-done 8924
if Is_A_1 then
   --# expr-start 8926 '<Not at nodes.lkt:16255:46>' Not_Val_1 ada/nodes.lkt:16255
--# expr-start 8925 '<IsNull at nodes.lkt:16255:50>' Is_Null_3 ada/nodes.lkt:16255
Is_Null_3 := Local_As_Subp_Access.Node = null; 
--# expr-done 8925
Not_Val_1 := not (Is_Null_3); 
--# expr-done 8926
   If_Result_7 := Not_Val_1;
else
   If_Result_7 := False;
end if;
--# expr-done 8927
if If_Result_7 then
   --# expr-start 8934 '<If at nodes.lkt:16263:21>' If_Result_5 ada/nodes.lkt:16263
if Local_Is_Paramless then
   --# expr-start 8928 '<FieldAccess for parent_name_equation at nodes.lkt:16264:26>' Fld_15 ada/nodes.lkt:16264
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_15 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_0.Node, Typ => Local_Comp_Type, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8928
   If_Result_5 := Fld_15;
else
   --# expr-start 8933 '<If at nodes.lkt:16263:21>' If_Result_4 ada/nodes.lkt:16263
if Local_Can_Be_Paramless then
   --# expr-start 8931 '<LogicBinaryOp Or at nodes.lkt:16272:25>' Or_Pred ada/nodes.lkt:16272
--# expr-start 8929 '<FieldAccess for parent_name_equation at nodes.lkt:16272:25>' Fld_16 ada/nodes.lkt:16272
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_16 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_0.Node, Typ => Local_Comp_Type, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8929
--# expr-start 8930 '<FieldAccess for parent_name_equation at nodes.lkt:16273:29>' Fld_17 ada/nodes.lkt:16273
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_17 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_0.Node, Typ => Typ, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8930
Or_Pred := Create_Or (Fld_16, Fld_17, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16272:25") else null)); 
--# expr-done 8931
   If_Result_4 := Or_Pred;
else
   --# expr-start 8932 '<FieldAccess for parent_name_equation at nodes.lkt:16277:26>' Fld_18 ada/nodes.lkt:16277
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_18 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_0.Node, Typ => Typ, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8932
   If_Result_4 := Fld_18;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 8933
   If_Result_5 := If_Result_4;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 8934
   If_Result_8 := If_Result_5;
else
   --# expr-start 8939 '<If at nodes.lkt:16255:17>' If_Result_6 ada/nodes.lkt:16255
--# expr-start 8935 '<Cast to CallExpr at nodes.lkt:16281:22>' Cast_Result_5 ada/nodes.lkt:16281
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_5 := Create_Internal_Entity_Call_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_5 := No_Entity_Call_Expr;
   end if;
--# expr-done 8935
Var_Expr_224 := Cast_Result_5;
if Var_Expr_224 /= No_Entity_Call_Expr then
   --# scope-start
--# expr-start 8936 '<FieldAccess for check_array_slice at nodes.lkt:16281:22>' Fld_21 ada/nodes.lkt:16281
      if Var_Expr_224.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.check_array_slice
Fld_21 := Libadalang.Implementation.Call_Expr_P_Check_Array_Slice (Node => Var_Expr_224.Node, Typ => Typ, Origin => Origin, E_Info => Var_Expr_224.Info);
--# end
--# expr-done 8936
Scope_Result_10 := Fld_21;
   --# end
   Result_Var_7 := Scope_Result_10;
else
   Result_Var_7 := False;
end if;
if Result_Var_7 then
   --# expr-start 8937 '<FieldAccess for parent_name_equation at nodes.lkt:16282:22>' Fld_19 ada/nodes.lkt:16282
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_19 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_0.Node, Typ => Typ, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8937
   If_Result_6 := Fld_19;
else
   --# expr-start 8938 '<FieldAccess for parent_name_equation at nodes.lkt:16285:22>' Fld_20 ada/nodes.lkt:16285
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_20 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_0.Node, Typ => Local_Comp_Type, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 8938
   If_Result_6 := Fld_20;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 8939
   If_Result_8 := If_Result_6;
end if;
      Inc_Ref (If_Result_8);
--# expr-done 8940
Scope_Result_11 := If_Result_8;
   Inc_Ref (Scope_Result_11);
   --# end
      Finalizer_Scope_3120;
   Result_Var_8 := Scope_Result_11;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16286:29") else null)); 
   Result_Var_8 := True_Rel;
end if;
      Inc_Ref (Result_Var_8);
And_Pred_1 := Create_And (Match_Result, Result_Var_8, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16239:13") else null)); 
--# expr-done 8941
   If_Result_9 := And_Pred_1;
end if;
      Inc_Ref (If_Result_9);
--# expr-done 8942
Let_Result_3 := If_Result_9; Inc_Ref (Let_Result_3);
--# end
--# expr-done 8943
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 8944
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 8945
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 8946
         Property_Result := Let_Result_6;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_213;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_213;
                     Finalizer_Scope_3116;
                     Finalizer_Scope_3117;
                     Finalizer_Scope_3119;
                     Finalizer_Scope_3120;
            raise;
      end;
   return Property_Result;
end Name_P_Parent_Name_Equation;
--# end
--# property-start Name.subtype_indication_equation ada/nodes.lkt:16291
pragma Warnings (Off, "is not referenced");
 function Name_P_Subtype_Indication_Equation
  (Node : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_214 with Inline_Always;
      Fld : Logic_Equation;
            procedure Finalizer_Scope_214 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_214;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 8947 '<FieldAccess for xref_type_equation at nodes.lkt:16291:51>' Fld ada/nodes.lkt:16291
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 8947
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_214;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_214;
            raise;
      end;
   return Property_Result;
end Name_P_Subtype_Indication_Equation;
--# end
--# property-start Name.can_designate_primitive ada/nodes.lkt:16299
pragma Warnings (Off, "is not referenced");
 function Name_P_Can_Designate_Primitive
  (Node : Bare_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
      Match_0 : Bare_Name;
Match_1 : Bare_Renaming_Clause;
Match_2 : Bare_Ada_Node;
Fld : Bare_Ada_Node;
Fld_1 : Boolean;
Fld_2 : Bare_Ada_Node;
Is_A : Boolean;
Not_Val : Boolean;
Match_Prefix : Bare_Ada_Node;
Cast_Result : Bare_Name;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_1 : Bare_Renaming_Clause;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_2 : Bare_Ada_Node;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Match_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8953 '<Match at nodes.lkt:16299:43>' Match_Result ada/nodes.lkt:16299
--# expr-start 8948 '<parent at nodes.lkt:16299:49>' Fld ada/nodes.lkt:16299
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 8948
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind n Match_0
--# expr-start 8949 '<FieldAccess for can_designate_primitive at nodes.lkt:16300:25>' Fld_1 ada/nodes.lkt:16300
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.can_designate_primitive
Fld_1 := Libadalang.Implementation.Name_P_Can_Designate_Primitive (Node => Match_0);
--# end
--# expr-done 8949
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Renaming_Clause .. Ada_Synthetic_Renaming_Clause =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind r Match_1
--# expr-start 8952 '<Not at nodes.lkt:16301:35>' Not_Val ada/nodes.lkt:16301
--# expr-start 8951 '<IsA PackageRenamingDecl at nodes.lkt:16301:39>' Is_A ada/nodes.lkt:16301
--# expr-start 8950 '<parent at nodes.lkt:16301:39>' Fld_2 ada/nodes.lkt:16301
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Match_1.Parent; 
--# expr-done 8950
Is_A := Fld_2 /= null 
and then Fld_2.Kind in Ada_Package_Renaming_Decl_Range; 
--# expr-done 8951
Not_Val := not (Is_A); 
--# expr-done 8952
Let_Result_1 := Not_Val; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Range_Spec | Ada_Reverse_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := True; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 8953
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Can_Designate_Primitive;
--# end
--# property-start Name.parent_name ada/nodes.lkt:16306
pragma Warnings (Off, "is not referenced");
 function Name_P_Parent_Name
  (Node : Bare_Name
      ; Stop_At : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind stop_at Stop_At
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Name;
Is_Null : Boolean;
Cast_Expr : Bare_Name;
Cast_Result_1 : Bare_Name;
Is_Equal : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8959 '<If at nodes.lkt:16307:9>' If_Result_1 ada/nodes.lkt:16307
--# expr-start 8956 '<BooleanBinaryOp Or at nodes.lkt:16307:12>' If_Result ada/nodes.lkt:16307
--# expr-start 8954 '<IsNull at nodes.lkt:16307:12>' Is_Null ada/nodes.lkt:16307
Is_Null := Stop_At = null; 
--# expr-done 8954
if Is_Null then
   If_Result := True;
else
   --# expr-start 8955 '<Eq at nodes.lkt:16307:31>' Is_Equal ada/nodes.lkt:16307
Cast_Expr := Self; 
      Cast_Result_1 := Cast_Expr;
Is_Equal := Cast_Result_1 = Stop_At; 
--# expr-done 8955
   If_Result := Is_Equal;
end if;
--# expr-done 8956
if If_Result then
   If_Result_1 := No_Entity_Name;
else
   --# expr-start 8958 '<Cast to Name at nodes.lkt:16308:14>' Cast_Result ada/nodes.lkt:16308
--# expr-start 8957 '<parent at nodes.lkt:16308:14>' Fld ada/nodes.lkt:16308
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 8957
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 8958
   If_Result_1 := Cast_Result;
end if;
--# expr-done 8959
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Parent_Name;
--# end
--# property-start Name.parent_callexpr ada/nodes.lkt:16324
pragma Warnings (Off, "is not referenced");
 function Name_P_Parent_Callexpr
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Call_Expr
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Call_Expr;
            procedure Finalizer_Scope_217 with Inline_Always;
      Match_0 : Internal_Entity_Dotted_Name;
Match_1 : Internal_Entity_Call_Expr;
Match_2 : Internal_Entity;
Fld : Internal_Entity_Array_Access;
Is_A : Boolean;
Is_A_1 : Boolean;
Fld_1 : Internal_Entity;
Fld_2 : Internal_Entity_Base_Id;
Cast_Result : Internal_Entity;
Is_Equiv : Boolean;
Fld_3 : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity;
Is_Equiv_1 : Boolean;
Match_Prefix : Internal_Entity;
Cast_Result_2 : Internal_Entity_Dotted_Name;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_3 : Internal_Entity_Call_Expr;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_4 : Internal_Entity;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Match_Result : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
Map_Result : Internal_Entity_Array_Access;
Is_A_2 : Boolean;
Find_Result : Internal_Entity;
Cast_Result_5 : Internal_Entity_Call_Expr;
            procedure Finalizer_Scope_217 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_217;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 8974 '<Cast to CallExpr at nodes.lkt:16325:9>' Cast_Result_5 ada/nodes.lkt:16325
--# expr-start 8973 '<Find at nodes.lkt:16325:9>' Find_Result ada/nodes.lkt:16325
   --# expr-start 8971 '<Map at nodes.lkt:16325:9>' Map_Result ada/nodes.lkt:16325
   --# expr-start 8960 '<FieldAccess for parents at nodes.lkt:16325:9>' Fld ada/nodes.lkt:16325
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 8960
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
            Take_While_Ok : Boolean := False;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
         --# expr-start 8970 '<BooleanBinaryOp Or at nodes.lkt:16327:13>' If_Result_1 ada/nodes.lkt:16327
--# expr-start 8961 '<IsA CallExpr at nodes.lkt:16327:13>' Is_A ada/nodes.lkt:16327
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Call_Expr_Range; 
--# expr-done 8961
if Is_A then
   If_Result_1 := True;
else
   --# expr-start 8969 '<BooleanBinaryOp And at nodes.lkt:16329:17>' If_Result ada/nodes.lkt:16329
--# expr-start 8962 '<IsA DottedName, BaseId at nodes.lkt:16329:17>' Is_A_1 ada/nodes.lkt:16329
Is_A_1 := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Dotted_Name_Range | Ada_Base_Id; 
--# expr-done 8962
if Is_A_1 then
   --# expr-start 8968 '<Match at nodes.lkt:16330:21>' Match_Result ada/nodes.lkt:16330
--# expr-start 8963 '<parent at nodes.lkt:16330:27>' Fld_1 ada/nodes.lkt:16330
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Item_0.Node, E_Info => Item_0.Info);
--# expr-done 8963
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind pfx Match_0
--# expr-start 8965 '<Eq at nodes.lkt:16331:45>' Is_Equiv ada/nodes.lkt:16331
--# expr-start 8964 '<FieldAccess for suffix at nodes.lkt:16331:45>' Fld_2 ada/nodes.lkt:16331
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Id (Node => Match_0.Node.Dotted_Name_F_Suffix, Info => Match_0.Info);
--# expr-done 8964
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Is_Equiv := Equivalent (Cast_Result, Item_0); 
--# expr-done 8965
Let_Result := Is_Equiv; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind ce Match_1
--# expr-start 8967 '<Eq at nodes.lkt:16332:42>' Is_Equiv_1 ada/nodes.lkt:16332
--# expr-start 8966 '<FieldAccess for name at nodes.lkt:16332:42>' Fld_3 ada/nodes.lkt:16332
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Match_1.Node.Call_Expr_F_Name, Info => Match_1.Info);
--# expr-done 8966
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Is_Equiv_1 := Equivalent (Cast_Result_1, Item_0); 
--# expr-done 8967
Let_Result_1 := Is_Equiv_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind _ Match_2
Let_Result_2 := False; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 8968
   If_Result := Match_Result;
else
   If_Result := False;
end if;
--# expr-done 8969
   If_Result_1 := If_Result;
end if;
--# expr-done 8970
         Take_While_Ok := If_Result_1;
         if Take_While_Ok then
         declare
            Item_To_Append : constant Internal_Entity := Item_0;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
               exit when not Take_While_Ok;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 8971
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
      --# expr-start 8972 '<IsA CallExpr at nodes.lkt:16337:22>' Is_A_2 ada/nodes.lkt:16337
Is_A_2 := Item_1.Node /= null 
and then Item_1.Node.Kind in Ada_Call_Expr_Range; 
--# expr-done 8972
      if Is_A_2 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Is_A_2;
         end loop;
      end;
--# expr-done 8973
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_5 := Create_Internal_Entity_Call_Expr
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_5 := No_Entity_Call_Expr;
   end if;
--# expr-done 8974
         Property_Result := Cast_Result_5;
   --# end
      Finalizer_Scope_217;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_217;
            raise;
      end;
   return Property_Result;
end Name_P_Parent_Callexpr;
--# end
--# property-start Name.is_range_attribute ada/nodes.lkt:16341
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Range_Attribute
  (Node : Bare_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
      Var_Expr_0 : Bare_Attribute_Ref;
Cast_Expr : Bare_Name;
Cast_Result : Bare_Attribute_Ref;
As_Entity : Internal_Entity_Attribute_Ref;
Is_Null : Boolean;
If_Result : Internal_Entity_Attribute_Ref;
Fld : Internal_Entity_Identifier;
Sym : Symbol_Type;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 8975 '<Cast to AttributeRef at nodes.lkt:16342:9>' Cast_Result ada/nodes.lkt:16342
Cast_Expr := Self; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Attribute_Ref_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 8975
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind attr_ref Var_Expr_0
--# expr-start 8979 '<FieldAccess for name_is at nodes.lkt:16343:27>' Fld_1 ada/nodes.lkt:16343
--# expr-start 8977 '<FieldAccess for attribute at nodes.lkt:16343:27>' Fld ada/nodes.lkt:16343
--# expr-start 8976 '<as_bare_entity at nodes.lkt:16343:27>' If_Result ada/nodes.lkt:16343
Is_Null := Var_Expr_0 = null; 
if Is_Null then
   If_Result := No_Entity_Attribute_Ref;
else
As_Entity := (Info => No_Entity_Info, Node => Var_Expr_0); 
   If_Result := As_Entity;
end if;
--# expr-done 8976
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Identifier (Node => If_Result.Node.Attribute_Ref_F_Attribute, Info => If_Result.Info);
--# expr-done 8977
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 8978 '<Symbol Range at nodes.lkt:16343:69>' Sym ada/nodes.lkt:16343
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Range); 
--# expr-done 8978
--# property-call-start Name.name_is
Fld_1 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld.Node, Sym => Sym);
--# end
--# expr-done 8979
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Range_Attribute;
--# end
--# property-start Name.called_subp_spec ada/nodes.lkt:16351
pragma Warnings (Off, "is not referenced");
 function Name_P_Called_Subp_Spec
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
      Var_Expr_225 : Internal_Entity_Base_Formal_Param_Holder;
Fld : Internal_Entity_Base_Formal_Param_Holder;
Fld_1 : Internal_Entity_Base_Formal_Param_Holder;
Scope_Result : Internal_Entity_Base_Formal_Param_Holder;
Result_Var : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 8980 '<FieldAccess for called_formal_subp_spec at nodes.lkt:16352:9>' Fld ada/nodes.lkt:16352
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.called_formal_subp_spec'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Called_Formal_Subp_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 8980
Var_Expr_225 := Fld;
if Var_Expr_225 /= No_Entity_Base_Formal_Param_Holder then
   --# scope-start
--# expr-start 8981 '<FieldAccess for corresponding_actual at nodes.lkt:16352:9>' Fld_1 ada/nodes.lkt:16352
      if Var_Expr_225.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.corresponding_actual'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Corresponding_Actual (Node => Var_Expr_225.Node, E_Info => Var_Expr_225.Info);
--# end
--# expr-done 8981
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Formal_Param_Holder;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Called_Subp_Spec;
--# end
--# property-start Name.referenced_decl ada/nodes.lkt:16360
pragma Warnings (Off, "is not referenced");
 function Name_P_Referenced_Decl
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Refd_Decl;
Fld_1 : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8983 '<FieldAccess for decl at nodes.lkt:16361:9>' Fld_1 ada/nodes.lkt:16361
--# expr-start 8982 '<FieldAccess for referenced_decl_internal at nodes.lkt:16361:9>' Fld ada/nodes.lkt:16361
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl_internal
Fld := Libadalang.Implementation.Name_P_Referenced_Decl_Internal (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 8982
Fld_1 := Fld.Decl;
--# expr-done 8983
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Referenced_Decl;
--# end
--# property-start Name.failsafe_referenced_decl ada/nodes.lkt:16367
pragma Warnings (Off, "is not referenced");
 function Name_P_Failsafe_Referenced_Decl
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Refd_Decl
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Refd_Decl;
      Fld : Internal_Refd_Decl;
New_Struct : Internal_Refd_Decl;
Try_Result : Internal_Refd_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 8986 '<Try at nodes.lkt:16368:9>' Try_Result ada/nodes.lkt:16368
begin
   --# expr-start 8984 '<FieldAccess for referenced_decl_internal at nodes.lkt:16368:13>' Fld ada/nodes.lkt:16368
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl_internal
Fld := Libadalang.Implementation.Name_P_Referenced_Decl_Internal (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 8984
   Try_Result := Fld;
exception
   when Property_Error =>
      --# expr-start 8985 '<New RefdDecl at nodes.lkt:16368:50>' New_Struct ada/nodes.lkt:16368
New_Struct := (Decl => No_Entity_Basic_Decl, Kind => Error); 
--# expr-done 8985
      Try_Result := New_Struct;
end;
--# expr-done 8986
         Property_Result := Try_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Failsafe_Referenced_Decl;
--# end
--# property-start Name.get_referenced_decl ada/nodes.lkt:16394
pragma Warnings (Off, "is not referenced");
 function Name_P_Get_Referenced_Decl
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Logic_Val_Result
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Logic_Val_Result;
            procedure Finalizer_Scope_3132 with Inline_Always;
      Local_Val_Result : Internal_Logic_Val_Result;
Local_Entity : Internal_Entity_Basic_Decl;
Local_Generic_Context_Node : Bare_Ada_Node;
Local_Entity_With_Generic_Context : Internal_Entity_Basic_Decl;
Var_Expr_0 : Boolean;
Var_Expr_226 : Env_Rebindings;
Var_Expr_227 : Internal_Entity_Body_Node;
Var_Expr_228 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity_Name;
Cast_Result : Internal_Entity;
Fld : Logic_Var;
Fld_1 : Internal_Logic_Val_Result;
Fld_2 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Info;
Fld_4 : Env_Rebindings;
Fld_5 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Scope_Result : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Fld_6 : Internal_Entity_Info;
Fld_7 : Env_Rebindings;
Fld_8 : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_9 : Bare_Basic_Decl;
Cast_Result_2 : Bare_Ada_Node;
Is_Equal : Boolean;
Cast_Expr_1 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Body_Node;
Fld_10 : Internal_Entity_Basic_Decl;
Fld_11 : Bare_Basic_Decl;
Scope_Result_1 : Bare_Basic_Decl;
Result_Var_1 : Bare_Basic_Decl;
Scope_Result_2 : Bare_Basic_Decl;
Result_Var_2 : Bare_Basic_Decl;
Cast_Result_4 : Bare_Ada_Node;
Is_Equal_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Internal_Entity_Basic_Decl;
Fld_12 : Boolean;
Cast_Expr_2 : Internal_Entity_Basic_Decl;
Cast_Result_5 : Internal_Entity;
New_Struct : Internal_Logic_Val_Result;
Scope_Result_3 : Internal_Logic_Val_Result;
Result_Var_3 : Internal_Logic_Val_Result;
Let_Result : Internal_Logic_Val_Result;
Let_Result_1 : Internal_Logic_Val_Result;
Let_Result_2 : Internal_Logic_Val_Result;
Let_Result_3 : Internal_Logic_Val_Result;
            procedure Finalizer_Scope_3132 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_3132;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9014 '<Let at nodes.lkt:16395:9>' Let_Result_3 ada/nodes.lkt:16395
--# scope-start
--# expr-start 8988 '<FieldAccess for logic_val at nodes.lkt:16395:26>' Fld_1 ada/nodes.lkt:16395
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 8987 '<FieldAccess for ref_var at nodes.lkt:16395:47>' Fld ada/nodes.lkt:16395
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 8987
--# property-call-start AdaNode.logic_val
Fld_1 := Libadalang.Implementation.Ada_Node_P_Logic_Val (Node => Self, From_Node => Cast_Result, Lvar => Fld);
--# end
--# expr-done 8988
Local_Val_Result := Fld_1; 
--# bind val_result Local_Val_Result
--# expr-start 9013 '<Let at nodes.lkt:16396:9>' Let_Result_2 ada/nodes.lkt:16396
--# scope-start
--# expr-start 8990 '<Cast to BasicDecl at nodes.lkt:16396:22>' Cast_Result_1 ada/nodes.lkt:16396
--# expr-start 8989 '<FieldAccess for value at nodes.lkt:16396:22>' Fld_2 ada/nodes.lkt:16396
Fld_2 := Local_Val_Result.Value;
--# expr-done 8989
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 8990
Local_Entity := Cast_Result_1; 
--# bind entity Local_Entity
--# expr-start 9012 '<Let at nodes.lkt:16397:9>' Let_Result_1 ada/nodes.lkt:16397
--# scope-start
--# expr-start 8992 '<FieldAccess for rebindings at nodes.lkt:16397:36>' Fld_4 ada/nodes.lkt:16397
--# expr-start 8991 '<FieldAccess for info at nodes.lkt:16397:36>' Fld_3 ada/nodes.lkt:16397
Fld_3 := Ent.Info;
--# expr-done 8991
Fld_4 := Fld_3.Rebindings;
--# expr-done 8992
Var_Expr_226 := Fld_4;
if Var_Expr_226 /= null then
   --# scope-start
--# expr-start 8994 '<env_node at nodes.lkt:16397:36>' Env_Node ada/nodes.lkt:16397
--# expr-start 8993 '<FieldAccess for old_env at nodes.lkt:16397:36>' Fld_5 ada/nodes.lkt:16397
      if Var_Expr_226 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Var_Expr_226.Old_Env;
Inc_Ref (Fld_5);
--# expr-done 8993
Env_Node := AST_Envs.Env_Node (Fld_5); 
--# expr-done 8994
Scope_Result := Env_Node;
   --# end
      Finalizer_Scope_3132;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
Local_Generic_Context_Node := Result_Var; 
--# bind generic_context_node Local_Generic_Context_Node
--# expr-start 9011 '<Let at nodes.lkt:16400:9>' Let_Result ada/nodes.lkt:16400
--# scope-start
--# expr-start 9008 '<If at nodes.lkt:16401:13>' If_Result_2 ada/nodes.lkt:16401
--# expr-start 9004 '<BooleanBinaryOp And at nodes.lkt:16402:17>' If_Result_1 ada/nodes.lkt:16402
--# expr-start 8996 '<Not at nodes.lkt:16402:17>' Not_Val ada/nodes.lkt:16402
--# expr-start 8995 '<IsNull at nodes.lkt:16402:21>' Is_Null ada/nodes.lkt:16402
Is_Null := Local_Generic_Context_Node = null; 
--# expr-done 8995
Not_Val := not (Is_Null); 
--# expr-done 8996
if Not_Val then
   --# expr-start 9003 '<BooleanBinaryOp Or at nodes.lkt:16406:21>' If_Result ada/nodes.lkt:16406
--# expr-start 8998 '<Eq at nodes.lkt:16406:21>' Is_Equal ada/nodes.lkt:16406
--# expr-start 8997 '<FieldAccess for node at nodes.lkt:16407:24>' Fld_9 ada/nodes.lkt:16407
Fld_9 := Local_Entity.Node;
--# expr-done 8997
      Cast_Result_2 := Fld_9;
Is_Equal := Local_Generic_Context_Node = Cast_Result_2; 
--# expr-done 8998
if Is_Equal then
   If_Result := True;
else
   --# expr-start 9002 '<Eq at nodes.lkt:16411:24>' Is_Equal_1 ada/nodes.lkt:16411
--# expr-start 8999 '<Cast to Body at nodes.lkt:16412:24>' Cast_Result_3 ada/nodes.lkt:16412
Cast_Expr_1 := Local_Entity; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Body_Node
   then
      Cast_Result_3 := Create_Internal_Entity_Body_Node
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_3 := No_Entity_Body_Node;
   end if;
--# expr-done 8999
Var_Expr_227 := Cast_Result_3;
if Var_Expr_227 /= No_Entity_Body_Node then
   --# scope-start
--# expr-start 9000 '<FieldAccess for decl_part at nodes.lkt:16412:24>' Fld_10 ada/nodes.lkt:16412
      if Var_Expr_227.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.decl_part
Fld_10 := Libadalang.Implementation.Body_Node_P_Decl_Part (Node => Var_Expr_227.Node, Imprecise_Fallback => False, E_Info => Var_Expr_227.Info);
--# end
--# expr-done 9000
Var_Expr_228 := Fld_10;
if Var_Expr_228 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 9001 '<FieldAccess for node at nodes.lkt:16412:24>' Fld_11 ada/nodes.lkt:16412
Fld_11 := Var_Expr_228.Node;
--# expr-done 9001
Scope_Result_1 := Fld_11;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Bare_Ada_Node;
end if;
Scope_Result_2 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Bare_Ada_Node;
end if;
      Cast_Result_4 := Result_Var_2;
Is_Equal_1 := Local_Generic_Context_Node = Cast_Result_4; 
--# expr-done 9002
   If_Result := Is_Equal_1;
end if;
--# expr-done 9003
   If_Result_1 := If_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 9004
if If_Result_1 then
   --# expr-start 9007 '<FieldAccess for unshed_rebindings_helper at nodes.lkt:16416:17>' Fld_8 ada/nodes.lkt:16416
      if Local_Entity.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9006 '<FieldAccess for rebindings at nodes.lkt:16416:49>' Fld_7 ada/nodes.lkt:16416
--# expr-start 9005 '<FieldAccess for info at nodes.lkt:16416:49>' Fld_6 ada/nodes.lkt:16416
Fld_6 := Ent.Info;
--# expr-done 9005
Fld_7 := Fld_6.Rebindings;
--# expr-done 9006
--# property-call-start BasicDecl.unshed_rebindings_helper
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Unshed_Rebindings_Helper (Node => Local_Entity.Node, Rebindings => Fld_7, E_Info => Local_Entity.Info);
--# end
--# expr-done 9007
   If_Result_2 := Fld_8;
else
   If_Result_2 := Local_Entity;
end if;
--# expr-done 9008
Local_Entity_With_Generic_Context := If_Result_2; 
--# bind entity_with_generic_context Local_Entity_With_Generic_Context
--# expr-start 9009 '<FieldAccess for success at nodes.lkt:16420:9>' Fld_12 ada/nodes.lkt:16420
Fld_12 := Local_Val_Result.Success;
--# expr-done 9009
Var_Expr_0 := Fld_12;
if Var_Expr_0 /= False then
   --# scope-start
   --# bind s Var_Expr_0
--# expr-start 9010 '<New LogicValResult at nodes.lkt:16421:20>' New_Struct ada/nodes.lkt:16421
Cast_Expr_2 := Local_Entity_With_Generic_Context; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
New_Struct := (Success => Var_Expr_0, Value => Cast_Result_5); 
--# expr-done 9010
Scope_Result_3 := New_Struct;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Logic_Val_Result;
end if;
Let_Result := Result_Var_3; 
--# end
--# expr-done 9011
Let_Result_1 := Let_Result; 
--# end
--# expr-done 9012
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 9013
Let_Result_3 := Let_Result_2; 
--# end
--# expr-done 9014
         Property_Result := Let_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3132;
            raise;
      end;
   return Property_Result;
end Name_P_Get_Referenced_Decl;
--# end
--# property-start Name.referenced_decl_internal ada/nodes.lkt:16428
pragma Warnings (Off, "is not referenced");
 function Name_P_Referenced_Decl_Internal
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Refd_Decl
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Refd_Decl;
      Local_V : Internal_Logic_Val_Result;
Local_V_1 : Internal_Logic_Val_Result;
Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Refd_Decl;
Var_Expr_2 : Internal_Refd_Decl;
Var_Expr_229 : Internal_Entity_Name;
Var_Expr_230 : Internal_Entity_Basic_Decl;
Fld : Internal_Logic_Val_Result;
Try_Result : Internal_Logic_Val_Result;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
New_Struct : Internal_Refd_Decl;
Fld_2 : Internal_Entity_Basic_Decl;
New_Struct_1 : Internal_Refd_Decl;
Scope_Result : Internal_Refd_Decl;
New_Struct_2 : Internal_Refd_Decl;
Result_Var : Internal_Refd_Decl;
Scope_Result_1 : Internal_Refd_Decl;
Result_Var_1 : Internal_Refd_Decl;
Fld_3 : Boolean;
If_Result : Internal_Refd_Decl;
Let_Result : Internal_Refd_Decl;
Fld_4 : Internal_Logic_Val_Result;
Fld_5 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
New_Struct_3 : Internal_Refd_Decl;
New_Struct_4 : Internal_Refd_Decl;
Fld_6 : Boolean;
If_Result_1 : Internal_Refd_Decl;
Let_Result_1 : Internal_Refd_Decl;
If_Result_2 : Internal_Refd_Decl;
Fld_7 : Internal_Entity_Basic_Decl;
Fld_8 : Internal_Entity_Basic_Decl;
Scope_Result_2 : Internal_Entity_Basic_Decl;
Result_Var_2 : Internal_Entity_Basic_Decl;
Fld_9 : Ref_Result_Kind;
New_Struct_5 : Internal_Refd_Decl;
Fld_10 : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
Fld_11 : Ref_Result_Kind;
Is_Equal : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Internal_Refd_Decl;
Scope_Result_3 : Internal_Refd_Decl;
Result_Var_3 : Internal_Refd_Decl;
Scope_Result_4 : Internal_Refd_Decl;
Result_Var_4 : Internal_Refd_Decl;
Fld_12 : Boolean;
If_Result_5 : Internal_Refd_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9046 '<If at nodes.lkt:16431:9>' If_Result_5 ada/nodes.lkt:16431
--# expr-start 9015 '<FieldAccess for is_defining at nodes.lkt:16431:12>' Fld_12 ada/nodes.lkt:16431
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_defining
Fld_12 := Libadalang.Implementation.Name_P_Is_Defining (Node => Ent.Node);
--# end
--# expr-done 9015
if Fld_12 then
   If_Result_5 := No_Refd_Decl;
else
--# expr-start 9035 '<If at nodes.lkt:16434:17>' If_Result_2 ada/nodes.lkt:16434
if Imprecise_Fallback then
   --# expr-start 9026 '<Let at nodes.lkt:16437:21>' Let_Result ada/nodes.lkt:16437
--# scope-start
--# expr-start 9017 '<Try at nodes.lkt:16438:25>' Try_Result ada/nodes.lkt:16438
begin
   --# expr-start 9016 '<FieldAccess for get_referenced_decl at nodes.lkt:16438:29>' Fld ada/nodes.lkt:16438
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.get_referenced_decl
Fld := Libadalang.Implementation.Name_P_Get_Referenced_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9016
   Try_Result := Fld;
exception
   when Property_Error =>
      Try_Result := No_Logic_Val_Result;
end;
--# expr-done 9017
Local_V_1 := Try_Result; 
--# bind v Local_V_1
--# expr-start 9025 '<If at nodes.lkt:16441:21>' If_Result ada/nodes.lkt:16441
--# expr-start 9018 '<FieldAccess for success at nodes.lkt:16441:24>' Fld_3 ada/nodes.lkt:16441
Fld_3 := Local_V_1.Success;
--# expr-done 9018
if Fld_3 then
   --# expr-start 9021 '<New RefdDecl at nodes.lkt:16445:25>' New_Struct ada/nodes.lkt:16445
--# expr-start 9020 '<Cast to BasicDecl at nodes.lkt:16446:34>' Cast_Result ada/nodes.lkt:16446
--# expr-start 9019 '<FieldAccess for value at nodes.lkt:16446:34>' Fld_1 ada/nodes.lkt:16446
Fld_1 := Local_V_1.Value;
--# expr-done 9019
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 9020
New_Struct := (Decl => Cast_Result, Kind => Precise); 
--# expr-done 9021
   If_Result := New_Struct;
else
Var_Expr_229 := Ent;
if Var_Expr_229 /= No_Entity_Name then
   --# scope-start
--# expr-start 9022 '<FieldAccess for first_corresponding_decl at nodes.lkt:16453:25>' Fld_2 ada/nodes.lkt:16453
      if Var_Expr_229.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.first_corresponding_decl'
Fld_2 := Libadalang.Implementation.Dispatcher_Expr_P_First_Corresponding_Decl (Node => Var_Expr_229.Node, E_Info => Var_Expr_229.Info);
--# end
--# expr-done 9022
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind fcd Var_Expr_0
--# expr-start 9023 '<New RefdDecl at nodes.lkt:16455:29>' New_Struct_1 ada/nodes.lkt:16455
New_Struct_1 := (Decl => Var_Expr_0, Kind => Imprecise); 
--# expr-done 9023
Scope_Result := New_Struct_1;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 9024 '<New RefdDecl at nodes.lkt:16456:41>' New_Struct_2 ada/nodes.lkt:16456
New_Struct_2 := (Decl => No_Entity_Basic_Decl, Kind => Error); 
--# expr-done 9024
   Result_Var := New_Struct_2;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Refd_Decl;
end if;
   If_Result := Result_Var_1;
end if;
--# expr-done 9025
Let_Result := If_Result; 
--# end
--# expr-done 9026
   If_Result_2 := Let_Result;
else
   --# expr-start 9034 '<Let at nodes.lkt:16462:21>' Let_Result_1 ada/nodes.lkt:16462
--# scope-start
--# expr-start 9027 '<FieldAccess for get_referenced_decl at nodes.lkt:16462:29>' Fld_4 ada/nodes.lkt:16462
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.get_referenced_decl
Fld_4 := Libadalang.Implementation.Name_P_Get_Referenced_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9027
Local_V := Fld_4; 
--# bind v Local_V
--# expr-start 9033 '<If at nodes.lkt:16464:21>' If_Result_1 ada/nodes.lkt:16464
--# expr-start 9028 '<FieldAccess for success at nodes.lkt:16464:24>' Fld_6 ada/nodes.lkt:16464
Fld_6 := Local_V.Success;
--# expr-done 9028
if Fld_6 then
   --# expr-start 9031 '<New RefdDecl at nodes.lkt:16466:25>' New_Struct_3 ada/nodes.lkt:16466
--# expr-start 9030 '<Cast to BasicDecl at nodes.lkt:16467:34>' Cast_Result_1 ada/nodes.lkt:16467
--# expr-start 9029 '<FieldAccess for value at nodes.lkt:16467:34>' Fld_5 ada/nodes.lkt:16467
Fld_5 := Local_V.Value;
--# expr-done 9029
   if Fld_5.Node = null
      or else Fld_5.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 9030
New_Struct_3 := (Decl => Cast_Result_1, Kind => Precise); 
--# expr-done 9031
   If_Result_1 := New_Struct_3;
else
   --# expr-start 9032 '<New RefdDecl at nodes.lkt:16471:25>' New_Struct_4 ada/nodes.lkt:16471
New_Struct_4 := (Decl => No_Entity_Basic_Decl, Kind => Error); 
--# expr-done 9032
   If_Result_1 := New_Struct_4;
end if;
--# expr-done 9033
Let_Result_1 := If_Result_1; 
--# end
--# expr-done 9034
   If_Result_2 := Let_Result_1;
end if;
--# expr-done 9035
Var_Expr_1 := If_Result_2;
if Var_Expr_1 /= No_Refd_Decl then
   --# scope-start
   --# bind res Var_Expr_1
--# expr-start 9039 '<New RefdDecl at nodes.lkt:16479:17>' New_Struct_5 ada/nodes.lkt:16479
--# expr-start 9036 '<FieldAccess for decl at nodes.lkt:16479:31>' Fld_7 ada/nodes.lkt:16479
Fld_7 := Var_Expr_1.Decl;
--# expr-done 9036
Var_Expr_230 := Fld_7;
if Var_Expr_230 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 9037 '<FieldAccess for wrap_public_reference at nodes.lkt:16479:31>' Fld_8 ada/nodes.lkt:16479
      if Var_Expr_230.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.wrap_public_reference
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Wrap_Public_Reference (Node => Var_Expr_230.Node, E_Info => Var_Expr_230.Info);
--# end
--# expr-done 9037
Scope_Result_2 := Fld_8;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Basic_Decl;
end if;
--# expr-start 9038 '<FieldAccess for kind at nodes.lkt:16479:71>' Fld_9 ada/nodes.lkt:16479
Fld_9 := Var_Expr_1.Kind;
--# expr-done 9038
New_Struct_5 := (Decl => Result_Var_2, Kind => Fld_9); 
--# expr-done 9039
Var_Expr_2 := New_Struct_5;
if Var_Expr_2 /= No_Refd_Decl then
   --# scope-start
   --# bind res Var_Expr_2
--# expr-start 9045 '<If at nodes.lkt:16485:21>' If_Result_4 ada/nodes.lkt:16485
--# expr-start 9044 '<BooleanBinaryOp And at nodes.lkt:16485:24>' If_Result_3 ada/nodes.lkt:16485
--# expr-start 9041 '<IsNull at nodes.lkt:16485:24>' Is_Null ada/nodes.lkt:16485
--# expr-start 9040 '<FieldAccess for decl at nodes.lkt:16485:24>' Fld_10 ada/nodes.lkt:16485
Fld_10 := Var_Expr_2.Decl;
--# expr-done 9040
Is_Null := Fld_10.Node = null; 
--# expr-done 9041
if Is_Null then
   --# expr-start 9043 '<Eq at nodes.lkt:16485:45>' Is_Equal ada/nodes.lkt:16485
--# expr-start 9042 '<FieldAccess for kind at nodes.lkt:16485:45>' Fld_11 ada/nodes.lkt:16485
Fld_11 := Var_Expr_2.Kind;
--# expr-done 9042
Is_Equal := Fld_11 = Precise; 
--# expr-done 9043
   If_Result_3 := Is_Equal;
else
   If_Result_3 := False;
end if;
--# expr-done 9044
if If_Result_3 then
   If_Result_4 := No_Refd_Decl;
else
   If_Result_4 := Var_Expr_2;
end if;
--# expr-done 9045
Scope_Result_3 := If_Result_4;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Refd_Decl;
end if;
Scope_Result_4 := Result_Var_3;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := No_Refd_Decl;
end if;
   If_Result_5 := Result_Var_4;
end if;
--# expr-done 9046
         Property_Result := If_Result_5;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Referenced_Decl_Internal;
--# end
--# property-start Name.name_designated_type ada/nodes.lkt:16495
pragma Warnings (Off, "is not referenced");
 function Name_P_Name_Designated_Type
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_224 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_2 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result_1 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_224 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_224;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 9051 '<bind at nodes.lkt:16496:9>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:16496
--# expr-start 9047 '<FieldAccess for node_env at nodes.lkt:16496:20>' Fld ada/nodes.lkt:16496
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 9047
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 9050 '<bind at nodes.lkt:16497:9>' Dyn_Var_Bind_Result ada/nodes.lkt:16497
--# expr-start 9048 '<FieldAccess for origin_node at nodes.lkt:16497:23>' Fld_1 ada/nodes.lkt:16497
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 9048
Bound_Origin := Fld_1; 
--# expr-start 9049 '<FieldAccess for designated_type_impl at nodes.lkt:16499:9>' Fld_2 ada/nodes.lkt:16499
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Ent.Node, Env => Bound_Env, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 9049
Dyn_Var_Bind_Result := Fld_2; 
--# expr-done 9050
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; 
--# expr-done 9051
         Property_Result := Dyn_Var_Bind_Result_1;
   --# end
      Finalizer_Scope_224;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_224;
            raise;
      end;
   return Property_Result;
end Name_P_Name_Designated_Type;
--# end
--# property-start Name.is_static_subtype ada/nodes.lkt:16505
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Static_Subtype
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 9053 '<FieldAccess for is_static_decl at nodes.lkt:16506:9>' Fld_1 ada/nodes.lkt:16506
--# expr-start 9052 '<FieldAccess for name_designated_type at nodes.lkt:16506:9>' Fld ada/nodes.lkt:16506
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9052
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_static_decl'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Static_Decl (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 9053
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Static_Subtype;
--# end
--# property-start Name.name_designated_type_env ada/nodes.lkt:16512
pragma Warnings (Off, "is not referenced");
 function Name_P_Name_Designated_Type_Env
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_226 with Inline_Always;
            procedure Finalizer_Scope_3141 with Inline_Always;
      Var_Expr_231 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_226 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_226;
            procedure Finalizer_Scope_3141 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3141;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 9054 '<FieldAccess for name_designated_type at nodes.lkt:16513:9>' Fld ada/nodes.lkt:16513
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9054
Var_Expr_231 := Fld;
if Var_Expr_231 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 9055 '<FieldAccess for primitives_env at nodes.lkt:16513:9>' Fld_1 ada/nodes.lkt:16513
      if Var_Expr_231.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.primitives_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Primitives_Env (Node => Var_Expr_231.Node, E_Info => Var_Expr_231.Info);
--# end
--# expr-done 9055
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3141;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_Env;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_226;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_226;
                     Finalizer_Scope_3141;
            raise;
      end;
   return Property_Result;
end Name_P_Name_Designated_Type_Env;
--# end
--# property-start Name.referenced_unit ada/nodes.lkt:16517
pragma Warnings (Off, "is not referenced");
 function Name_P_Referenced_Unit
  (Node : Bare_Name
      ; Kind : Analysis_Unit_Kind
      ; Not_Found_Is_Error : Boolean
         := True
  )
   return Bare_Compilation_Unit
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind kind Kind
   --# bind not_found_is_error Not_Found_Is_Error
   Property_Result : Bare_Compilation_Unit;
            procedure Finalizer_Scope_227 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
Fld_1 : Bare_Compilation_Unit;
            procedure Finalizer_Scope_227 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_227;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9057 '<FieldAccess for designated_compilation_unit at nodes.lkt:16521:9>' Fld_1 ada/nodes.lkt:16521
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9056 '<FieldAccess for as_symbol_array at nodes.lkt:16522:13>' Fld ada/nodes.lkt:16522
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Self);
--# end
--# expr-done 9056
--# property-call-start AdaNode.designated_compilation_unit
Fld_1 := Libadalang.Implementation.Ada_Node_P_Designated_Compilation_Unit (Node => Self, Name => Fld, Kind => Kind, Load_If_Needed => True, Not_Found_Is_Error => Not_Found_Is_Error);
--# end
--# expr-done 9057
         Property_Result := Fld_1;
   --# end
      Finalizer_Scope_227;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_227;
            raise;
      end;
   return Property_Result;
end Name_P_Referenced_Unit;
--# end
--# property-start Name.matches ada/nodes.lkt:16533
pragma Warnings (Off, "is not referenced");
 function Name_P_Matches
  (Node : Bare_Name
      ; N : Bare_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind n N
   Property_Result : Boolean;
      Fld : Symbol_Type;
Fld_1 : Symbol_Type;
Is_Equal : Boolean;
Cast_Expr : Bare_Name;
Cast_Result : Bare_Defining_Name;
Fld_2 : Bare_Name;
Fld_3 : Boolean;
Cast_Expr_1 : Bare_Name;
Cast_Result_1 : Bare_Defining_Name;
Fld_4 : Bare_Name;
Fld_5 : Boolean;
Cast_Expr_2 : Bare_Name;
Cast_Result_2 : Bare_Dotted_Name;
Fld_6 : Bare_Name;
Cast_Expr_3 : Bare_Name;
Cast_Result_3 : Bare_Dotted_Name;
Fld_7 : Bare_Name;
Fld_8 : Boolean;
Cast_Expr_4 : Bare_Name;
Cast_Result_4 : Bare_Dotted_Name;
Fld_9 : Bare_Base_Id;
Cast_Expr_5 : Bare_Name;
Cast_Result_5 : Bare_Dotted_Name;
Fld_10 : Bare_Base_Id;
Cast_Result_6 : Bare_Name;
Fld_11 : Boolean;
If_Result : Boolean;
Is_A : Boolean;
Is_A_1 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Is_A_2 : Boolean;
If_Result_3 : Boolean;
Is_A_3 : Boolean;
If_Result_4 : Boolean;
Is_A_4 : Boolean;
Is_A_5 : Boolean;
If_Result_5 : Boolean;
Is_A_6 : Boolean;
Is_A_7 : Boolean;
If_Result_6 : Boolean;
If_Result_7 : Boolean;
If_Result_8 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9093 '<If at nodes.lkt:16534:9>' If_Result_8 ada/nodes.lkt:16534
--# expr-start 9064 '<BooleanBinaryOp Or at nodes.lkt:16535:13>' If_Result_7 ada/nodes.lkt:16535
--# expr-start 9060 '<BooleanBinaryOp And at nodes.lkt:16536:17>' If_Result_5 ada/nodes.lkt:16536
--# expr-start 9058 '<IsA Identifier, SyntheticIdentifier at nodes.lkt:16536:17>' Is_A_4 ada/nodes.lkt:16536
Is_A_4 := Self /= null 
and then Self.Kind in Ada_Identifier_Range | Ada_Synthetic_Identifier_Range; 
--# expr-done 9058
if Is_A_4 then
   --# expr-start 9059 '<IsA Identifier, SyntheticIdentifier at nodes.lkt:16537:21>' Is_A_5 ada/nodes.lkt:16537
Is_A_5 := N /= null 
and then N.Kind in Ada_Identifier_Range | Ada_Synthetic_Identifier_Range; 
--# expr-done 9059
   If_Result_5 := Is_A_5;
else
   If_Result_5 := False;
end if;
--# expr-done 9060
if If_Result_5 then
   If_Result_7 := True;
else
   --# expr-start 9063 '<BooleanBinaryOp And at nodes.lkt:16539:17>' If_Result_6 ada/nodes.lkt:16539
--# expr-start 9061 '<IsA StringLiteral at nodes.lkt:16539:17>' Is_A_6 ada/nodes.lkt:16539
Is_A_6 := Self /= null 
and then Self.Kind in Ada_String_Literal_Range; 
--# expr-done 9061
if Is_A_6 then
   --# expr-start 9062 '<IsA StringLiteral at nodes.lkt:16539:43>' Is_A_7 ada/nodes.lkt:16539
Is_A_7 := N /= null 
and then N.Kind in Ada_String_Literal_Range; 
--# expr-done 9062
   If_Result_6 := Is_A_7;
else
   If_Result_6 := False;
end if;
--# expr-done 9063
   If_Result_7 := If_Result_6;
end if;
--# expr-done 9064
if If_Result_7 then
   --# expr-start 9067 '<Eq at nodes.lkt:16540:14>' Is_Equal ada/nodes.lkt:16540
--# expr-start 9065 '<FieldAccess for name_symbol at nodes.lkt:16540:14>' Fld ada/nodes.lkt:16540
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Self);
--# end
--# expr-done 9065
--# expr-start 9066 '<FieldAccess for name_symbol at nodes.lkt:16540:36>' Fld_1 ada/nodes.lkt:16540
      if N = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => N);
--# end
--# expr-done 9066
Is_Equal := Fld = Fld_1; 
--# expr-done 9067
   If_Result_8 := Is_Equal;
else
   --# expr-start 9092 '<If at nodes.lkt:16534:9>' If_Result_4 ada/nodes.lkt:16534
--# expr-start 9068 '<IsA DefiningName at nodes.lkt:16541:14>' Is_A_3 ada/nodes.lkt:16541
Is_A_3 := Self /= null 
and then Self.Kind in Ada_Defining_Name_Range; 
--# expr-done 9068
if Is_A_3 then
   --# expr-start 9071 '<FieldAccess for matches at nodes.lkt:16541:40>' Fld_3 ada/nodes.lkt:16541
--# expr-start 9070 '<FieldAccess for name at nodes.lkt:16541:40>' Fld_2 ada/nodes.lkt:16541
--# expr-start 9069 '<Cast to DefiningName at nodes.lkt:16541:40>' Cast_Result ada/nodes.lkt:16541
Cast_Expr := Self; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Defining_Name_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 9069
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Defining_Name_F_Name;
--# expr-done 9070
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.matches
Fld_3 := Libadalang.Implementation.Name_P_Matches (Node => Fld_2, N => N);
--# end
--# expr-done 9071
   If_Result_4 := Fld_3;
else
   --# expr-start 9091 '<If at nodes.lkt:16534:9>' If_Result_3 ada/nodes.lkt:16534
--# expr-start 9072 '<IsA DefiningName at nodes.lkt:16542:14>' Is_A_2 ada/nodes.lkt:16542
Is_A_2 := N /= null 
and then N.Kind in Ada_Defining_Name_Range; 
--# expr-done 9072
if Is_A_2 then
   --# expr-start 9075 '<FieldAccess for matches at nodes.lkt:16542:37>' Fld_5 ada/nodes.lkt:16542
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9074 '<FieldAccess for name at nodes.lkt:16542:50>' Fld_4 ada/nodes.lkt:16542
--# expr-start 9073 '<Cast to DefiningName at nodes.lkt:16542:50>' Cast_Result_1 ada/nodes.lkt:16542
Cast_Expr_1 := N; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Defining_Name_Range
   then
      Cast_Result_1 := Cast_Expr_1;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 9073
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Cast_Result_1.Defining_Name_F_Name;
--# expr-done 9074
--# property-call-start Name.matches
Fld_5 := Libadalang.Implementation.Name_P_Matches (Node => Self, N => Fld_4);
--# end
--# expr-done 9075
   If_Result_3 := Fld_5;
else
   --# expr-start 9090 '<If at nodes.lkt:16534:9>' If_Result_2 ada/nodes.lkt:16534
--# expr-start 9078 '<BooleanBinaryOp And at nodes.lkt:16543:14>' If_Result_1 ada/nodes.lkt:16543
--# expr-start 9076 '<IsA DottedName at nodes.lkt:16543:14>' Is_A ada/nodes.lkt:16543
Is_A := Self /= null 
and then Self.Kind in Ada_Dotted_Name_Range; 
--# expr-done 9076
if Is_A then
   --# expr-start 9077 '<IsA DottedName at nodes.lkt:16543:37>' Is_A_1 ada/nodes.lkt:16543
Is_A_1 := N /= null 
and then N.Kind in Ada_Dotted_Name_Range; 
--# expr-done 9077
   If_Result_1 := Is_A_1;
else
   If_Result_1 := False;
end if;
--# expr-done 9078
if If_Result_1 then
   --# expr-start 9089 '<BooleanBinaryOp And at nodes.lkt:16545:13>' If_Result ada/nodes.lkt:16545
--# expr-start 9083 '<FieldAccess for matches at nodes.lkt:16545:13>' Fld_8 ada/nodes.lkt:16545
--# expr-start 9080 '<FieldAccess for prefix at nodes.lkt:16545:13>' Fld_6 ada/nodes.lkt:16545
--# expr-start 9079 '<Cast to DottedName at nodes.lkt:16545:13>' Cast_Result_2 ada/nodes.lkt:16545
Cast_Expr_2 := Self; 
   if Cast_Expr_2 = null
      or else Cast_Expr_2.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_2 := Cast_Expr_2;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 9079
      if Cast_Result_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Cast_Result_2.Dotted_Name_F_Prefix;
--# expr-done 9080
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9082 '<FieldAccess for prefix at nodes.lkt:16545:48>' Fld_7 ada/nodes.lkt:16545
--# expr-start 9081 '<Cast to DottedName at nodes.lkt:16545:48>' Cast_Result_3 ada/nodes.lkt:16545
Cast_Expr_3 := N; 
   if Cast_Expr_3 = null
      or else Cast_Expr_3.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_3 := Cast_Expr_3;
   else
         Cast_Result_3 := No_Bare_Ada_Node;
   end if;
--# expr-done 9081
      if Cast_Result_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Cast_Result_3.Dotted_Name_F_Prefix;
--# expr-done 9082
--# property-call-start Name.matches
Fld_8 := Libadalang.Implementation.Name_P_Matches (Node => Fld_6, N => Fld_7);
--# end
--# expr-done 9083
if Fld_8 then
   --# expr-start 9088 '<FieldAccess for matches at nodes.lkt:16546:17>' Fld_11 ada/nodes.lkt:16546
--# expr-start 9085 '<FieldAccess for suffix at nodes.lkt:16546:17>' Fld_9 ada/nodes.lkt:16546
--# expr-start 9084 '<Cast to DottedName at nodes.lkt:16546:17>' Cast_Result_4 ada/nodes.lkt:16546
Cast_Expr_4 := Self; 
   if Cast_Expr_4 = null
      or else Cast_Expr_4.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_4 := Cast_Expr_4;
   else
         Cast_Result_4 := No_Bare_Ada_Node;
   end if;
--# expr-done 9084
      if Cast_Result_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Cast_Result_4.Dotted_Name_F_Suffix;
--# expr-done 9085
      if Fld_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9087 '<FieldAccess for suffix at nodes.lkt:16546:52>' Fld_10 ada/nodes.lkt:16546
--# expr-start 9086 '<Cast to DottedName at nodes.lkt:16546:52>' Cast_Result_5 ada/nodes.lkt:16546
Cast_Expr_5 := N; 
   if Cast_Expr_5 = null
      or else Cast_Expr_5.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_5 := Cast_Expr_5;
   else
         Cast_Result_5 := No_Bare_Ada_Node;
   end if;
--# expr-done 9086
      if Cast_Result_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Cast_Result_5.Dotted_Name_F_Suffix;
--# expr-done 9087
      Cast_Result_6 := Fld_10;
--# property-call-start Name.matches
Fld_11 := Libadalang.Implementation.Name_P_Matches (Node => Fld_9, N => Cast_Result_6);
--# end
--# expr-done 9088
   If_Result := Fld_11;
else
   If_Result := False;
end if;
--# expr-done 9089
   If_Result_2 := If_Result;
else
   If_Result_2 := False;
end if;
--# expr-done 9090
   If_Result_3 := If_Result_2;
end if;
--# expr-done 9091
   If_Result_4 := If_Result_3;
end if;
--# expr-done 9092
   If_Result_8 := If_Result_4;
end if;
--# expr-done 9093
         Property_Result := If_Result_8;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Matches;
--# end
--# property-start Name.name_matches ada/nodes.lkt:16554
pragma Warnings (Off, "is not referenced");
 function Name_P_Name_Matches
  (Node : Bare_Name
      ; N : Internal_Entity_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind n N
   Property_Result : Boolean;
      Fld : Bare_Name;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9095 '<FieldAccess for matches at nodes.lkt:16554:47>' Fld_1 ada/nodes.lkt:16554
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9094 '<FieldAccess for node at nodes.lkt:16554:60>' Fld ada/nodes.lkt:16554
Fld := N.Node;
--# expr-done 9094
--# property-call-start Name.matches
Fld_1 := Libadalang.Implementation.Name_P_Matches (Node => Self, N => Fld);
--# end
--# expr-done 9095
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Name_Matches;
--# end
--# property-start Name.use_package_name_designated_env ada/nodes.lkt:16562
pragma Warnings (Off, "is not referenced");
 function Name_P_Use_Package_Name_Designated_Env
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_230 with Inline_Always;
      Fld : Internal_Entity;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Use_Package_Clause;
Fld_2 : Integer;
Fld_3 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_230 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_230;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9100 '<FieldAccess for designated_env at nodes.lkt:16563:9>' Fld_3 ada/nodes.lkt:16563
--# expr-start 9098 '<Cast to UsePackageClause at nodes.lkt:16563:9>' Cast_Result ada/nodes.lkt:16563
--# expr-start 9097 '<parent at nodes.lkt:16563:9>' Fld_1 ada/nodes.lkt:16563
--# expr-start 9096 '<parent at nodes.lkt:16563:9>' Fld ada/nodes.lkt:16563
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 9096
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Fld.Node, E_Info => Fld.Info);
--# expr-done 9097
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Use_Package_Clause_Range
   then
      Cast_Result := Create_Internal_Entity_Use_Package_Clause
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 9098
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9099 '<FieldAccess for child_index at nodes.lkt:16564:13>' Fld_2 ada/nodes.lkt:16564
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Child_Index (Node => Self);
--# expr-done 9099
--# property-call-start UsePackageClause.designated_env
Fld_3 := Libadalang.Implementation.Use_Package_Clause_P_Designated_Env (Node => Cast_Result.Node, Index => Fld_2, E_Info => Cast_Result.Info);
--# end
--# expr-done 9100
         Property_Result := Fld_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_230;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_230;
            raise;
      end;
   return Property_Result;
end Name_P_Use_Package_Name_Designated_Env;
--# end
--# property-start Name.xref_type_equation ada/nodes.lkt:16571
pragma Warnings (Off, "is not referenced");
 function Name_P_Xref_Type_Equation
  (Node : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_231 with Inline_Always;
            procedure Finalizer_Scope_3142 with Inline_Always;
            procedure Finalizer_Scope_3143 with Inline_Always;
            procedure Finalizer_Scope_3144 with Inline_Always;
            procedure Finalizer_Scope_3145 with Inline_Always;
            procedure Finalizer_Scope_3146 with Inline_Always;
      Match_0 : Internal_Entity_Dotted_Name;
Match_1 : Internal_Entity_Base_Id;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Match_2 : Internal_Entity_Attribute_Ref;
Match_3 : Internal_Entity_Name;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Name;
Fld_3 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_4 : Internal_Entity_Base_Id;
Fld_5 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Internal_Entity_Base_Type_Decl;
Fld_7 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Fld_8 : Logic_Equation;
Result_Var : Logic_Equation;
Fld_9 : Internal_Entity_Name;
Fld_10 : Logic_Equation;
Fld_11 : Logic_Var;
Fld_12 : Internal_Entity_Name;
Fld_13 : Logic_Var;
Bind_Result_1 : Logic_Equation;
Fld_14 : Logic_Var;
Fld_15 : Internal_Entity_Name;
Fld_16 : Logic_Var;
Bind_Result_2 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_17 : Internal_Entity_Identifier;
Fld_18 : Symbol_Type;
Sym : Symbol_Type;
Is_Equal : Boolean;
If_Result : Logic_Equation;
Fld_19 : Internal_Entity_Identifier;
Fld_20 : Symbol_Type;
Sym_1 : Symbol_Type;
Is_Equal_1 : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
False_Rel : Logic_Equation;
Match_Prefix : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Dotted_Name;
Let_Result : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_2 : Internal_Entity_Base_Id;
Let_Result_1 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Cast_Result_3 : Internal_Entity_Attribute_Ref;
Let_Result_2 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
Cast_Result_4 : Internal_Entity_Name;
Let_Result_3 : Logic_Equation;
Scope_Result_4 : Logic_Equation;
Match_Result : Logic_Equation;
            procedure Finalizer_Scope_231 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_231;
            procedure Finalizer_Scope_3142 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3142;
            procedure Finalizer_Scope_3143 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_3143;
            procedure Finalizer_Scope_3144 is
            begin
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_3144;
            procedure Finalizer_Scope_3145 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3145;
            procedure Finalizer_Scope_3146 is
            begin
                     Dec_Ref (False_Rel);
            end Finalizer_Scope_3146;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9134 '<Match at nodes.lkt:16571:42>' Match_Result ada/nodes.lkt:16571
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind dn Match_0
--# expr-start 9108 '<LogicBinaryOp And at nodes.lkt:16573:13>' And_Pred ada/nodes.lkt:16573
--# expr-start 9102 '<FieldAccess for xref_no_overloading at nodes.lkt:16573:13>' Fld_1 ada/nodes.lkt:16573
--# expr-start 9101 '<FieldAccess for prefix at nodes.lkt:16573:13>' Fld ada/nodes.lkt:16573
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 9101
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_1 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld.Node, Sequential => True, All_Els => False, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 9102
--# expr-start 9107 '<bind at nodes.lkt:16575:17>' Dyn_Var_Bind_Result ada/nodes.lkt:16575
--# expr-start 9104 '<FieldAccess for designated_env_no_overloading at nodes.lkt:16575:28>' Fld_3 ada/nodes.lkt:16575
--# expr-start 9103 '<FieldAccess for prefix at nodes.lkt:16575:28>' Fld_2 ada/nodes.lkt:16575
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 9103
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env_no_overloading'
Fld_3 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env_No_Overloading (Node => Fld_2.Node, Env => Env, Origin => Origin, No_Visibility => False, E_Info => Fld_2.Info);
--# end
--# expr-done 9104
Bound_Env := Fld_3; Inc_Ref (Bound_Env);
--# expr-start 9106 '<FieldAccess for xref_type_equation at nodes.lkt:16577:17>' Fld_5 ada/nodes.lkt:16577
--# expr-start 9105 '<FieldAccess for suffix at nodes.lkt:16577:17>' Fld_4 ada/nodes.lkt:16577
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Base_Id (Node => Match_0.Node.Dotted_Name_F_Suffix, Info => Match_0.Info);
--# expr-done 9105
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_5 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld_4.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_4.Info);
--# end
--# expr-done 9106
Dyn_Var_Bind_Result := Fld_5; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 9107
And_Pred := Create_And (Fld_1, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16573:13") else null)); 
--# expr-done 9108
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
Scope_Result_1 := Let_Result;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3142;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Char_Literal .. Ada_String_Literal =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Base_Id
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind i Match_1
--# expr-start 9109 '<FieldAccess for designated_type_impl at nodes.lkt:16580:13>' Fld_6 ada/nodes.lkt:16580
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Match_1.Node, Env => Env, Origin => Origin, E_Info => Match_1.Info);
--# end
--# expr-done 9109
Var_Expr_0 := Fld_6;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind type Var_Expr_0
--# expr-start 9111 '<Bind at nodes.lkt:16581:27>' Bind_Result ada/nodes.lkt:16581
--# expr-start 9110 '<FieldAccess for ref_var at nodes.lkt:16581:27>' Fld_7 ada/nodes.lkt:16581
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_7 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Match_1.Node);
--# end
--# expr-done 9110
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
Cast_Expr := Var_Expr_0; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_7, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16581:27") else null)); 
--# expr-done 9111
Scope_Result := Bind_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3144;
   Result_Var := Scope_Result;
else
   --# expr-start 9112 '<FieldAccess for undefined_reference_equation at nodes.lkt:16582:29>' Fld_8 ada/nodes.lkt:16582
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.undefined_reference_equation
Fld_8 := Libadalang.Implementation.Name_P_Undefined_Reference_Equation (Node => Ent.Node);
--# end
--# expr-done 9112
   Result_Var := Fld_8;
end if;
      Inc_Ref (Result_Var);
Let_Result_1 := Result_Var; Inc_Ref (Let_Result_1);
--# end
Scope_Result_2 := Let_Result_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3143;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Attribute_Ref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind ar Match_2
--# expr-start 9133 '<LogicBinaryOp And at nodes.lkt:16585:13>' And_Pred_1 ada/nodes.lkt:16585
--# expr-start 9114 '<FieldAccess for xref_type_equation at nodes.lkt:16585:13>' Fld_10 ada/nodes.lkt:16585
--# expr-start 9113 '<FieldAccess for prefix at nodes.lkt:16585:13>' Fld_9 ada/nodes.lkt:16585
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Name (Node => Match_2.Node.Attribute_Ref_F_Prefix, Info => Match_2.Info);
--# expr-done 9113
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_10 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld_9.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_9.Info);
--# end
--# expr-done 9114
--# expr-start 9132 '<If at nodes.lkt:16587:17>' If_Result_1 ada/nodes.lkt:16587
--# expr-start 9118 '<Eq at nodes.lkt:16587:20>' Is_Equal_1 ada/nodes.lkt:16587
--# expr-start 9116 '<FieldAccess for sym at nodes.lkt:16587:20>' Fld_20 ada/nodes.lkt:16587
--# expr-start 9115 '<FieldAccess for attribute at nodes.lkt:16587:20>' Fld_19 ada/nodes.lkt:16587
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Identifier (Node => Match_2.Node.Attribute_Ref_F_Attribute, Info => Match_2.Info);
--# expr-done 9115
      if Fld_19.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld_20 := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Fld_19.Node);
--# end
--# expr-done 9116
--# expr-start 9117 '<Symbol Class at nodes.lkt:16587:42>' Sym_1 ada/nodes.lkt:16587
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Class); 
--# expr-done 9117
Is_Equal_1 := Fld_20 = Sym_1; 
--# expr-done 9118
if Is_Equal_1 then
   --# expr-start 9122 '<NPropagate at nodes.lkt:16589:21>' Bind_Result_1 ada/nodes.lkt:16589
--# expr-start 9120 '<FieldAccess for ref_var at nodes.lkt:16590:53>' Fld_13 ada/nodes.lkt:16590
--# expr-start 9119 '<FieldAccess for prefix at nodes.lkt:16590:53>' Fld_12 ada/nodes.lkt:16590
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Name (Node => Match_2.Node.Attribute_Ref_F_Prefix, Info => Match_2.Info);
--# expr-done 9119
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_13 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_12.Node);
--# end
--# expr-done 9120
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
--# expr-start 9121 '<FieldAccess for ref_var at nodes.lkt:16589:21>' Fld_11 ada/nodes.lkt:16589
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_11 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Match_2.Node);
--# end
--# expr-done 9121
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
Bind_Result_1 := Solver.Create_Propagate (Fld_13, Fld_11, Logic_Functor_947'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16589:21") else null)); 
--# expr-done 9122
   If_Result_1 := Bind_Result_1;
else
   --# expr-start 9131 '<If at nodes.lkt:16587:17>' If_Result ada/nodes.lkt:16587
--# expr-start 9126 '<Eq at nodes.lkt:16591:22>' Is_Equal ada/nodes.lkt:16591
--# expr-start 9124 '<FieldAccess for sym at nodes.lkt:16591:22>' Fld_18 ada/nodes.lkt:16591
--# expr-start 9123 '<FieldAccess for attribute at nodes.lkt:16591:22>' Fld_17 ada/nodes.lkt:16591
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Identifier (Node => Match_2.Node.Attribute_Ref_F_Attribute, Info => Match_2.Info);
--# expr-done 9123
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld_18 := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Fld_17.Node);
--# end
--# expr-done 9124
--# expr-start 9125 '<Symbol Base at nodes.lkt:16591:44>' Sym ada/nodes.lkt:16591
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Base); 
--# expr-done 9125
Is_Equal := Fld_18 = Sym; 
--# expr-done 9126
if Is_Equal then
   --# expr-start 9130 '<NPropagate at nodes.lkt:16593:21>' Bind_Result_2 ada/nodes.lkt:16593
--# expr-start 9128 '<FieldAccess for ref_var at nodes.lkt:16594:55>' Fld_16 ada/nodes.lkt:16594
--# expr-start 9127 '<FieldAccess for prefix at nodes.lkt:16594:55>' Fld_15 ada/nodes.lkt:16594
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Name (Node => Match_2.Node.Attribute_Ref_F_Prefix, Info => Match_2.Info);
--# expr-done 9127
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_16 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_15.Node);
--# end
--# expr-done 9128
Fld_16.Value := No_Entity;
Entity_Vars.Reset (Fld_16);
--# expr-start 9129 '<FieldAccess for ref_var at nodes.lkt:16593:21>' Fld_14 ada/nodes.lkt:16593
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_14 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Match_2.Node);
--# end
--# expr-done 9129
Fld_14.Value := No_Entity;
Entity_Vars.Reset (Fld_14);
Bind_Result_2 := Solver.Create_Propagate (Fld_16, Fld_14, Logic_Functor_872'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16593:21") else null)); 
--# expr-done 9130
   If_Result := Bind_Result_2;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16595:22") else null)); 
   If_Result := True_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 9131
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 9132
And_Pred_1 := Create_And (Fld_10, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16585:13") else null)); 
--# expr-done 9133
Let_Result_2 := And_Pred_1; Inc_Ref (Let_Result_2);
--# end
Scope_Result_3 := Let_Result_2;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3145;
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_4; 
--# bind _ Match_3
False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16597:19") else null)); 
Let_Result_3 := False_Rel; Inc_Ref (Let_Result_3);
--# end
Scope_Result_4 := Let_Result_3;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_3146;
            Match_Result := Scope_Result_4; Inc_Ref (Match_Result);
end case;
--# expr-done 9134
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_231;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_231;
                     Finalizer_Scope_3142;
                     Finalizer_Scope_3143;
                     Finalizer_Scope_3144;
                     Finalizer_Scope_3145;
                     Finalizer_Scope_3146;
            raise;
      end;
   return Property_Result;
end Name_P_Xref_Type_Equation;
--# end
--# property-start Name.xref_no_overloading ada/nodes.lkt:16606
pragma Warnings (Off, "is not referenced");
 function Name_P_Xref_No_Overloading
  (Node : Bare_Name
      ; Sequential : Boolean
         := True
      ; All_Els : Boolean
         := False
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind sequential Sequential
   --# bind all_els All_Els
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_232 with Inline_Always;
            procedure Finalizer_Scope_3147 with Inline_Always;
            procedure Finalizer_Scope_3148 with Inline_Always;
            procedure Finalizer_Scope_3150 with Inline_Always;
      Match_0 : Internal_Entity_Dotted_Name;
Match_1 : Internal_Entity_Base_Id;
Match_2 : Internal_Entity_Name;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Name;
Fld_3 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_4 : Internal_Entity_Base_Id;
Fld_5 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Symbol_Type;
Fld_7 : Boolean;
If_Result : Lookup_Kind;
Fld_8 : Bare_Name;
If_Result_1 : Bare_Name;
Cast_Result : Bare_Ada_Node;
Fld_9 : Internal_Entity_Array_Access;
Fld_10 : Boolean;
Map_Result : Internal_Entity_Array_Access;
Fld_11 : Logic_Var;
Domain_Equation : Logic_Equation;
Fld_12 : Logic_Var;
Fld_13 : Boolean;
If_Result_2 : Lookup_Kind;
Fld_14 : Bare_Name;
If_Result_3 : Bare_Name;
Cast_Result_1 : Bare_Ada_Node;
Fld_15 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_16 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : Logic_Equation;
False_Rel : Logic_Equation;
Match_Prefix : Internal_Entity_Name;
Cast_Result_2 : Internal_Entity_Dotted_Name;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_3 : Internal_Entity_Base_Id;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_4 : Internal_Entity_Name;
Let_Result_2 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Match_Result : Logic_Equation;
            procedure Finalizer_Scope_232 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_232;
            procedure Finalizer_Scope_3147 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3147;
            procedure Finalizer_Scope_3148 is
            begin
                     Dec_Ref (Fld_9);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Domain_Equation);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (If_Result_5);
            end Finalizer_Scope_3148;
            procedure Finalizer_Scope_3150 is
            begin
                     Dec_Ref (False_Rel);
            end Finalizer_Scope_3150;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9163 '<Match at nodes.lkt:16609:19>' Match_Result ada/nodes.lkt:16609
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind dn Match_0
--# expr-start 9142 '<LogicBinaryOp And at nodes.lkt:16611:13>' And_Pred ada/nodes.lkt:16611
--# expr-start 9136 '<FieldAccess for xref_no_overloading at nodes.lkt:16611:13>' Fld_1 ada/nodes.lkt:16611
--# expr-start 9135 '<FieldAccess for prefix at nodes.lkt:16611:13>' Fld ada/nodes.lkt:16611
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 9135
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_1 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld.Node, Sequential => Sequential, All_Els => All_Els, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 9136
--# expr-start 9141 '<bind at nodes.lkt:16613:17>' Dyn_Var_Bind_Result ada/nodes.lkt:16613
--# expr-start 9138 '<FieldAccess for designated_env at nodes.lkt:16613:28>' Fld_3 ada/nodes.lkt:16613
--# expr-start 9137 '<FieldAccess for prefix at nodes.lkt:16613:28>' Fld_2 ada/nodes.lkt:16613
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 9137
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_3 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld_2.Node, Env => Env, Origin => Origin, No_Visibility => False, E_Info => Fld_2.Info);
--# end
--# expr-done 9138
Bound_Env := Fld_3; Inc_Ref (Bound_Env);
--# expr-start 9140 '<FieldAccess for xref_no_overloading at nodes.lkt:16615:17>' Fld_5 ada/nodes.lkt:16615
--# expr-start 9139 '<FieldAccess for suffix at nodes.lkt:16615:17>' Fld_4 ada/nodes.lkt:16615
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Base_Id (Node => Match_0.Node.Dotted_Name_F_Suffix, Info => Match_0.Info);
--# expr-done 9139
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_5 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_4.Node, Sequential => Sequential, All_Els => All_Els, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_4.Info);
--# end
--# expr-done 9140
Dyn_Var_Bind_Result := Fld_5; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 9141
And_Pred := Create_And (Fld_1, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16611:13") else null)); 
--# expr-done 9142
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3147;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Char_Literal .. Ada_String_Literal =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Base_Id
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind i Match_1
--# expr-start 9162 '<If at nodes.lkt:16618:13>' If_Result_5 ada/nodes.lkt:16618
--# expr-start 9144 '<BooleanBinaryOp And at nodes.lkt:16618:16>' If_Result_4 ada/nodes.lkt:16618
if All_Els then
   --# expr-start 9143 '<FieldAccess for is_suffix at nodes.lkt:16618:28>' Fld_16 ada/nodes.lkt:16618
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_suffix
Fld_16 := Libadalang.Implementation.Name_P_Is_Suffix (Node => Self);
--# end
--# expr-done 9143
   If_Result_4 := Fld_16;
else
   If_Result_4 := False;
end if;
--# expr-done 9144
if If_Result_4 then
   --# expr-start 9154 '<domain at nodes.lkt:16620:17>' Domain_Equation ada/nodes.lkt:16620
--# expr-start 9152 '<Map at nodes.lkt:16622:21>' Map_Result ada/nodes.lkt:16622
   --# expr-start 9150 '<FieldAccess for env_get at nodes.lkt:16622:21>' Fld_9 ada/nodes.lkt:16622
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9145 '<FieldAccess for name_symbol at nodes.lkt:16624:25>' Fld_6 ada/nodes.lkt:16624
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Match_1.Node);
--# end
--# expr-done 9145
--# expr-start 9147 '<If at nodes.lkt:16626:32>' If_Result ada/nodes.lkt:16626
--# expr-start 9146 '<FieldAccess for is_prefix at nodes.lkt:16626:35>' Fld_7 ada/nodes.lkt:16626
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld_7 := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 9146
if Fld_7 then
   If_Result := Recursive;
else
   If_Result := Flat;
end if;
--# expr-done 9147
--# expr-start 9149 '<If at nodes.lkt:16625:35>' If_Result_1 ada/nodes.lkt:16625
if Sequential then
   --# expr-start 9148 '<FieldAccess for node at nodes.lkt:16625:54>' Fld_8 ada/nodes.lkt:16625
Fld_8 := Ent.Node;
--# expr-done 9148
   If_Result_1 := Fld_8;
else
   If_Result_1 := No_Bare_Ada_Node;
end if;
--# expr-done 9149
      Cast_Result := If_Result_1;
--# property-call-start AdaNode.env_get
Fld_9 := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Env, Symbol => Fld_6, Lookup => If_Result, From_Node => Cast_Result);
--# end
--# expr-done 9150
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_9;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
         --# expr-start 9151 '<FieldAccess for has_visibility at nodes.lkt:16629:36>' Fld_10 ada/nodes.lkt:16629
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_10 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 9151
         if Fld_10 then
         declare
            Item_To_Append : constant Internal_Entity := Item_0;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 9152
--# expr-start 9153 '<FieldAccess for ref_var at nodes.lkt:16621:21>' Fld_11 ada/nodes.lkt:16621
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_11 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Match_1.Node);
--# end
--# expr-done 9153
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
declare
   Dom : Internal_Entity_Array_Access := Map_Result;
   A   : Entity_Vars.Value_Array (1 .. Length (Dom));
begin
   for J in 0 .. Length (Dom) - 1 loop
      declare
         Item : constant Internal_Entity := Get (Self, Dom, J);
      begin
         A (J + 1) := (Node => Item.Node, Info => Item.Info);
      end;
   end loop;
   Domain_Equation := Solver.Create_Domain
     (Fld_11, A, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16620:17") else null));
end;
--# expr-done 9154
   If_Result_5 := Domain_Equation;
else
   --# expr-start 9161 '<Bind at nodes.lkt:16632:17>' Bind_Result ada/nodes.lkt:16632
--# expr-start 9155 '<FieldAccess for ref_var at nodes.lkt:16632:17>' Fld_12 ada/nodes.lkt:16632
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_12 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Match_1.Node);
--# end
--# expr-done 9155
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
--# expr-start 9160 '<FieldAccess for env_get_first_visible at nodes.lkt:16633:20>' Fld_15 ada/nodes.lkt:16633
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9157 '<If at nodes.lkt:16636:33>' If_Result_2 ada/nodes.lkt:16636
--# expr-start 9156 '<FieldAccess for is_prefix at nodes.lkt:16636:36>' Fld_13 ada/nodes.lkt:16636
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld_13 := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 9156
if Fld_13 then
   If_Result_2 := Recursive;
else
   If_Result_2 := Flat;
end if;
--# expr-done 9157
--# expr-start 9159 '<If at nodes.lkt:16635:31>' If_Result_3 ada/nodes.lkt:16635
if Sequential then
   --# expr-start 9158 '<FieldAccess for node at nodes.lkt:16635:50>' Fld_14 ada/nodes.lkt:16635
Fld_14 := Ent.Node;
--# expr-done 9158
   If_Result_3 := Fld_14;
else
   If_Result_3 := No_Bare_Ada_Node;
end if;
--# expr-done 9159
      Cast_Result_1 := If_Result_3;
--# property-call-start SingleTokNode.env_get_first_visible
Fld_15 := Libadalang.Implementation.Single_Tok_Node_P_Env_Get_First_Visible (Node => Match_1.Node, Lex_Env => Env, Lookup_Type => If_Result_2, From_Node => Cast_Result_1, No_Visibility => False);
--# end
--# expr-done 9160
Bind_Result := Solver.Create_Assign (Fld_12, Fld_15, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16632:17") else null)); 
--# expr-done 9161
   If_Result_5 := Bind_Result;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 9162
Let_Result_1 := If_Result_5; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3148;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind _ Match_2
False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:16639:19") else null)); 
Let_Result_2 := False_Rel; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3150;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
end case;
--# expr-done 9163
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_232;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_232;
                     Finalizer_Scope_3147;
                     Finalizer_Scope_3148;
                     Finalizer_Scope_3150;
            raise;
      end;
   return Property_Result;
end Name_P_Xref_No_Overloading;
--# end
--# property-start Name.is_prefix ada/nodes.lkt:16646
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Prefix
  (Node : Bare_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Dotted_Name;
Fld_2 : Bare_Name;
Cast_Result_1 : Bare_Name;
Is_Equal : Boolean;
If_Result : Boolean;
Fld_3 : Bare_Ada_Node;
Cast_Result_2 : Bare_Name;
Fld_4 : Boolean;
If_Result_1 : Boolean;
Fld_5 : Bare_Ada_Node;
Is_A_1 : Boolean;
Not_Val : Boolean;
If_Result_2 : Boolean;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Name_Name_P_Is_Prefix,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Name,
                                As_Bare_Name => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Boolean;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 9178 '<BooleanBinaryOp Or at nodes.lkt:16647:9>' If_Result_2 ada/nodes.lkt:16647
--# expr-start 9174 '<BooleanBinaryOp And at nodes.lkt:16648:13>' If_Result_1 ada/nodes.lkt:16648
--# expr-start 9170 '<BooleanBinaryOp And at nodes.lkt:16649:17>' If_Result ada/nodes.lkt:16649
--# expr-start 9165 '<IsA DottedName at nodes.lkt:16649:17>' Is_A ada/nodes.lkt:16649
--# expr-start 9164 '<parent at nodes.lkt:16649:17>' Fld ada/nodes.lkt:16649
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 9164
Is_A := Fld /= null 
and then Fld.Kind in Ada_Dotted_Name_Range; 
--# expr-done 9165
if Is_A then
   --# expr-start 9169 '<Eq at nodes.lkt:16650:21>' Is_Equal ada/nodes.lkt:16650
--# expr-start 9168 '<FieldAccess for prefix at nodes.lkt:16650:21>' Fld_2 ada/nodes.lkt:16650
--# expr-start 9167 '<Cast to DottedName at nodes.lkt:16650:21>' Cast_Result ada/nodes.lkt:16650
--# expr-start 9166 '<parent at nodes.lkt:16650:21>' Fld_1 ada/nodes.lkt:16650
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Parent; 
--# expr-done 9166
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 9167
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Dotted_Name_F_Prefix;
--# expr-done 9168
      Cast_Result_1 := Fld_2;
Is_Equal := Cast_Result_1 = Self; 
--# expr-done 9169
   If_Result := Is_Equal;
else
   If_Result := False;
end if;
--# expr-done 9170
if If_Result then
   --# expr-start 9173 '<FieldAccess for is_prefix at nodes.lkt:16652:17>' Fld_4 ada/nodes.lkt:16652
--# expr-start 9172 '<Cast to Name at nodes.lkt:16652:17>' Cast_Result_2 ada/nodes.lkt:16652
--# expr-start 9171 '<parent at nodes.lkt:16652:17>' Fld_3 ada/nodes.lkt:16652
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Parent; 
--# expr-done 9171
   if Fld_3 = null
      or else Fld_3.Kind in Ada_Name
   then
      Cast_Result_2 := Fld_3;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 9172
      if Cast_Result_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld_4 := Libadalang.Implementation.Name_P_Is_Prefix (Node => Cast_Result_2);
--# end
--# expr-done 9173
   If_Result_1 := Fld_4;
else
   If_Result_1 := False;
end if;
--# expr-done 9174
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 9177 '<Not at nodes.lkt:16654:12>' Not_Val ada/nodes.lkt:16654
--# expr-start 9176 '<IsA DottedName at nodes.lkt:16654:16>' Is_A_1 ada/nodes.lkt:16654
--# expr-start 9175 '<parent at nodes.lkt:16654:16>' Fld_5 ada/nodes.lkt:16654
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Parent; 
--# expr-done 9175
Is_A_1 := Fld_5 /= null 
and then Fld_5.Kind in Ada_Dotted_Name_Range; 
--# expr-done 9176
Not_Val := not (Is_A_1); 
--# expr-done 9177
   If_Result_2 := Not_Val;
end if;
--# expr-done 9178
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Boolean,
                        As_Boolean => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Name_P_Is_Prefix;
--# end
--# property-start Name.is_suffix ada/nodes.lkt:16658
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Suffix
  (Node : Bare_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Dotted_Name;
Fld_2 : Bare_Base_Id;
Cast_Result_1 : Bare_Name;
Is_Equal : Boolean;
If_Result : Boolean;
Fld_3 : Bare_Ada_Node;
Cast_Result_2 : Bare_Name;
Fld_4 : Boolean;
If_Result_1 : Boolean;
Fld_5 : Bare_Ada_Node;
Is_A_1 : Boolean;
Not_Val : Boolean;
If_Result_2 : Boolean;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Name_Name_P_Is_Suffix,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Name,
                                As_Bare_Name => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Boolean;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 9193 '<BooleanBinaryOp Or at nodes.lkt:16659:9>' If_Result_2 ada/nodes.lkt:16659
--# expr-start 9189 '<BooleanBinaryOp And at nodes.lkt:16660:13>' If_Result_1 ada/nodes.lkt:16660
--# expr-start 9185 '<BooleanBinaryOp And at nodes.lkt:16661:17>' If_Result ada/nodes.lkt:16661
--# expr-start 9180 '<IsA DottedName at nodes.lkt:16661:17>' Is_A ada/nodes.lkt:16661
--# expr-start 9179 '<parent at nodes.lkt:16661:17>' Fld ada/nodes.lkt:16661
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 9179
Is_A := Fld /= null 
and then Fld.Kind in Ada_Dotted_Name_Range; 
--# expr-done 9180
if Is_A then
   --# expr-start 9184 '<Eq at nodes.lkt:16662:21>' Is_Equal ada/nodes.lkt:16662
--# expr-start 9183 '<FieldAccess for suffix at nodes.lkt:16662:21>' Fld_2 ada/nodes.lkt:16662
--# expr-start 9182 '<Cast to DottedName at nodes.lkt:16662:21>' Cast_Result ada/nodes.lkt:16662
--# expr-start 9181 '<parent at nodes.lkt:16662:21>' Fld_1 ada/nodes.lkt:16662
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Parent; 
--# expr-done 9181
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 9182
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Cast_Result.Dotted_Name_F_Suffix;
--# expr-done 9183
      Cast_Result_1 := Fld_2;
Is_Equal := Cast_Result_1 = Self; 
--# expr-done 9184
   If_Result := Is_Equal;
else
   If_Result := False;
end if;
--# expr-done 9185
if If_Result then
   --# expr-start 9188 '<FieldAccess for is_suffix at nodes.lkt:16664:17>' Fld_4 ada/nodes.lkt:16664
--# expr-start 9187 '<Cast to Name at nodes.lkt:16664:17>' Cast_Result_2 ada/nodes.lkt:16664
--# expr-start 9186 '<parent at nodes.lkt:16664:17>' Fld_3 ada/nodes.lkt:16664
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Parent; 
--# expr-done 9186
   if Fld_3 = null
      or else Fld_3.Kind in Ada_Name
   then
      Cast_Result_2 := Fld_3;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 9187
      if Cast_Result_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_suffix
Fld_4 := Libadalang.Implementation.Name_P_Is_Suffix (Node => Cast_Result_2);
--# end
--# expr-done 9188
   If_Result_1 := Fld_4;
else
   If_Result_1 := False;
end if;
--# expr-done 9189
if If_Result_1 then
   If_Result_2 := True;
else
   --# expr-start 9192 '<Not at nodes.lkt:16666:12>' Not_Val ada/nodes.lkt:16666
--# expr-start 9191 '<IsA DottedName at nodes.lkt:16666:16>' Is_A_1 ada/nodes.lkt:16666
--# expr-start 9190 '<parent at nodes.lkt:16666:16>' Fld_5 ada/nodes.lkt:16666
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Parent; 
--# expr-done 9190
Is_A_1 := Fld_5 /= null 
and then Fld_5.Kind in Ada_Dotted_Name_Range; 
--# expr-done 9191
Not_Val := not (Is_A_1); 
--# expr-done 9192
   If_Result_2 := Not_Val;
end if;
--# expr-done 9193
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Boolean,
                        As_Boolean => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Name_P_Is_Suffix;
--# end
--# property-start Name.is_operator_name ada/nodes.lkt:16670
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Operator_Name
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Symbol_Type;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Sym_10 : Symbol_Type;
Sym_11 : Symbol_Type;
Sym_12 : Symbol_Type;
Sym_13 : Symbol_Type;
Sym_14 : Symbol_Type;
Sym_15 : Symbol_Type;
Sym_16 : Symbol_Type;
Sym_17 : Symbol_Type;
Sym_18 : Symbol_Type;
Sym_19 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
Is_Equal_4 : Boolean;
If_Result_3 : Boolean;
Is_Equal_5 : Boolean;
If_Result_4 : Boolean;
Is_Equal_6 : Boolean;
If_Result_5 : Boolean;
Is_Equal_7 : Boolean;
If_Result_6 : Boolean;
Is_Equal_8 : Boolean;
If_Result_7 : Boolean;
Is_Equal_9 : Boolean;
If_Result_8 : Boolean;
Is_Equal_10 : Boolean;
If_Result_9 : Boolean;
Is_Equal_11 : Boolean;
If_Result_10 : Boolean;
Is_Equal_12 : Boolean;
If_Result_11 : Boolean;
Is_Equal_13 : Boolean;
If_Result_12 : Boolean;
Is_Equal_14 : Boolean;
If_Result_13 : Boolean;
Is_Equal_15 : Boolean;
If_Result_14 : Boolean;
Is_Equal_16 : Boolean;
If_Result_15 : Boolean;
Is_Equal_17 : Boolean;
If_Result_16 : Boolean;
Is_Equal_18 : Boolean;
If_Result_17 : Boolean;
Is_Equal_19 : Boolean;
If_Result_18 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9194 '<FieldAccess for name_symbol at nodes.lkt:16671:9>' Fld ada/nodes.lkt:16671
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 9194
--# expr-start 9195 '<Symbol "=" at nodes.lkt:16671:31>' Sym ada/nodes.lkt:16671
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 9195
Is_Equal_19 := Fld = Sym; 
if Is_Equal_19 then
   If_Result_18 := True;
else
--# expr-start 9196 '<Symbol "/=" at nodes.lkt:16672:15>' Sym_1 ada/nodes.lkt:16672
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 9196
Is_Equal_18 := Fld = Sym_1; 
if Is_Equal_18 then
   If_Result_17 := True;
else
--# expr-start 9197 '<Symbol "<" at nodes.lkt:16673:15>' Sym_2 ada/nodes.lkt:16673
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 9197
Is_Equal_17 := Fld = Sym_2; 
if Is_Equal_17 then
   If_Result_16 := True;
else
--# expr-start 9198 '<Symbol "<=" at nodes.lkt:16674:15>' Sym_3 ada/nodes.lkt:16674
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 9198
Is_Equal_16 := Fld = Sym_3; 
if Is_Equal_16 then
   If_Result_15 := True;
else
--# expr-start 9199 '<Symbol ">" at nodes.lkt:16675:15>' Sym_4 ada/nodes.lkt:16675
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 9199
Is_Equal_15 := Fld = Sym_4; 
if Is_Equal_15 then
   If_Result_14 := True;
else
--# expr-start 9200 '<Symbol ">=" at nodes.lkt:16676:15>' Sym_5 ada/nodes.lkt:16676
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 9200
Is_Equal_14 := Fld = Sym_5; 
if Is_Equal_14 then
   If_Result_13 := True;
else
--# expr-start 9201 '<Symbol "and" at nodes.lkt:16677:15>' Sym_6 ada/nodes.lkt:16677
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_And); 
--# expr-done 9201
Is_Equal_13 := Fld = Sym_6; 
if Is_Equal_13 then
   If_Result_12 := True;
else
--# expr-start 9202 '<Symbol "or" at nodes.lkt:16678:15>' Sym_7 ada/nodes.lkt:16678
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Or); 
--# expr-done 9202
Is_Equal_12 := Fld = Sym_7; 
if Is_Equal_12 then
   If_Result_11 := True;
else
--# expr-start 9203 '<Symbol "xor" at nodes.lkt:16679:15>' Sym_8 ada/nodes.lkt:16679
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Xor); 
--# expr-done 9203
Is_Equal_11 := Fld = Sym_8; 
if Is_Equal_11 then
   If_Result_10 := True;
else
--# expr-start 9204 '<Symbol "abs" at nodes.lkt:16680:15>' Sym_9 ada/nodes.lkt:16680
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs); 
--# expr-done 9204
Is_Equal_10 := Fld = Sym_9; 
if Is_Equal_10 then
   If_Result_9 := True;
else
--# expr-start 9205 '<Symbol "*" at nodes.lkt:16681:15>' Sym_10 ada/nodes.lkt:16681
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 9205
Is_Equal_9 := Fld = Sym_10; 
if Is_Equal_9 then
   If_Result_8 := True;
else
--# expr-start 9206 '<Symbol "/" at nodes.lkt:16682:15>' Sym_11 ada/nodes.lkt:16682
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 9206
Is_Equal_8 := Fld = Sym_11; 
if Is_Equal_8 then
   If_Result_7 := True;
else
--# expr-start 9207 '<Symbol "mod" at nodes.lkt:16683:15>' Sym_12 ada/nodes.lkt:16683
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mod); 
--# expr-done 9207
Is_Equal_7 := Fld = Sym_12; 
if Is_Equal_7 then
   If_Result_6 := True;
else
--# expr-start 9208 '<Symbol "rem" at nodes.lkt:16684:15>' Sym_13 ada/nodes.lkt:16684
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Rem); 
--# expr-done 9208
Is_Equal_6 := Fld = Sym_13; 
if Is_Equal_6 then
   If_Result_5 := True;
else
--# expr-start 9209 '<Symbol "+" at nodes.lkt:16685:15>' Sym_14 ada/nodes.lkt:16685
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 9209
Is_Equal_5 := Fld = Sym_14; 
if Is_Equal_5 then
   If_Result_4 := True;
else
--# expr-start 9210 '<Symbol "-" at nodes.lkt:16686:15>' Sym_15 ada/nodes.lkt:16686
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 9210
Is_Equal_4 := Fld = Sym_15; 
if Is_Equal_4 then
   If_Result_3 := True;
else
--# expr-start 9211 '<Symbol "&""+" at nodes.lkt:16687:15>' Sym_16 ada/nodes.lkt:16687
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_1); 
--# expr-done 9211
Is_Equal_3 := Fld = Sym_16; 
if Is_Equal_3 then
   If_Result_2 := True;
else
--# expr-start 9212 '<Symbol "-" at nodes.lkt:16688:15>' Sym_17 ada/nodes.lkt:16688
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 9212
Is_Equal_2 := Fld = Sym_17; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 9213 '<Symbol "not" at nodes.lkt:16689:15>' Sym_18 ada/nodes.lkt:16689
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Not); 
--# expr-done 9213
Is_Equal_1 := Fld = Sym_18; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 9214 '<Symbol "abs" at nodes.lkt:16690:15>' Sym_19 ada/nodes.lkt:16690
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs); 
--# expr-done 9214
Is_Equal := Fld = Sym_19; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
   If_Result_2 := If_Result_1;
end if;
   If_Result_3 := If_Result_2;
end if;
   If_Result_4 := If_Result_3;
end if;
   If_Result_5 := If_Result_4;
end if;
   If_Result_6 := If_Result_5;
end if;
   If_Result_7 := If_Result_6;
end if;
   If_Result_8 := If_Result_7;
end if;
   If_Result_9 := If_Result_8;
end if;
   If_Result_10 := If_Result_9;
end if;
   If_Result_11 := If_Result_10;
end if;
   If_Result_12 := If_Result_11;
end if;
   If_Result_13 := If_Result_12;
end if;
   If_Result_14 := If_Result_13;
end if;
   If_Result_15 := If_Result_14;
end if;
   If_Result_16 := If_Result_15;
end if;
   If_Result_17 := If_Result_16;
end if;
   If_Result_18 := If_Result_17;
end if;
         Property_Result := If_Result_18;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Operator_Name;
--# end
--# property-start Name.is_write_reference ada/nodes.lkt:16708
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Write_Reference
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
            procedure Finalizer_Scope_3154 with Inline_Always;
            procedure Finalizer_Scope_3157 with Inline_Always;
      Match_0 : Internal_Entity_Assign_Stmt;
Match_1 : Internal_Entity_Call_Expr;
Match_2 : Internal_Entity_Dotted_Name;
Var_Expr_0 : Internal_Entity_Base_Formal_Param_Holder;
Match_3 : Internal_Entity_Param_Assoc;
Match_4 : Internal_Entity_Attribute_Ref;
Match_5 : Internal_Entity_Alternatives_List;
Match_6 : Internal_Entity;
Var_Expr_232 : Internal_Entity_Param_Spec;
Var_Expr_233 : Internal_Entity_Mode;
Var_Expr_234 : Internal_Entity_Call_Expr;
Var_Expr_235 : Internal_Entity_Param_Spec;
Var_Expr_236 : Internal_Entity_Mode;
Fld : Internal_Entity;
Fld_1 : Internal_Entity_Name;
Cast_Result : Internal_Entity;
Cast_Expr : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Fld_2 : Internal_Entity_Name;
Cast_Result_2 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Name;
Cast_Result_3 : Internal_Entity;
Is_Equiv_1 : Boolean;
Fld_3 : Boolean;
If_Result : Boolean;
Fld_4 : Boolean;
Fld_5 : Internal_Entity_Name;
Cast_Result_4 : Internal_Entity;
Cast_Expr_2 : Internal_Entity_Name;
Cast_Result_5 : Internal_Entity;
Is_Equiv_2 : Boolean;
Fld_6 : Internal_Entity_Base_Id;
Fld_7 : Internal_Entity_Base_Formal_Param_Holder;
Fld_8 : Internal_Entity_Info;
Fld_9 : Internal_Metadata;
Fld_10 : Boolean;
Fld_11 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Get_Result : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_6 : Internal_Entity_Param_Spec;
Fld_12 : Internal_Entity_Mode;
Fld_13 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Fld_14 : Internal_Entity;
Fld_15 : Internal_Entity;
Cast_Result_7 : Internal_Entity_Call_Expr;
Fld_16 : Boolean;
Fld_17 : Internal_Entity_Defining_Name_Array_Access;
Fld_18 : Internal_Entity_Basic_Decl;
Cast_Result_8 : Internal_Entity_Param_Spec;
Fld_19 : Internal_Entity_Mode;
Fld_20 : Boolean;
Scope_Result_3 : Boolean;
Result_Var_3 : Boolean;
Scope_Result_4 : Boolean;
Result_Var_4 : Boolean;
Quantifier_Result : Boolean;
Fld_21 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_22 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_23 : Internal_Entity;
Fld_24 : Internal_Entity;
Cast_Result_9 : Internal_Entity_Call_Expr;
Fld_25 : Boolean;
Scope_Result_5 : Boolean;
Result_Var_5 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Dyn_Var_Bind_Result_1 : Boolean;
If_Result_4 : Boolean;
Fld_26 : Internal_Entity_Name;
Cast_Result_10 : Internal_Entity;
Cast_Expr_3 : Internal_Entity_Name;
Cast_Result_11 : Internal_Entity;
Is_Equiv_3 : Boolean;
Fld_27 : Boolean;
If_Result_5 : Boolean;
Fld_28 : Internal_Entity;
Is_A : Boolean;
Match_Prefix : Internal_Entity;
Cast_Result_12 : Internal_Entity_Assign_Stmt;
Let_Result : Boolean;
Scope_Result_6 : Boolean;
Cast_Result_13 : Internal_Entity_Call_Expr;
Let_Result_1 : Boolean;
Scope_Result_7 : Boolean;
Cast_Result_14 : Internal_Entity_Dotted_Name;
Let_Result_2 : Boolean;
Scope_Result_8 : Boolean;
Cast_Result_15 : Internal_Entity_Param_Assoc;
Let_Result_3 : Boolean;
Scope_Result_9 : Boolean;
Cast_Result_16 : Internal_Entity_Attribute_Ref;
Let_Result_4 : Boolean;
Scope_Result_10 : Boolean;
Cast_Result_17 : Internal_Entity_Alternatives_List;
Let_Result_5 : Boolean;
Scope_Result_11 : Boolean;
Cast_Result_18 : Internal_Entity;
Let_Result_6 : Boolean;
Scope_Result_12 : Boolean;
Match_Result : Boolean;
            procedure Finalizer_Scope_3154 is
            begin
                     Dec_Ref (Fld_11);
            end Finalizer_Scope_3154;
            procedure Finalizer_Scope_3157 is
            begin
                     Dec_Ref (Fld_17);
                     Dec_Ref (Fld_21);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_3157;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 9263 '<Match at nodes.lkt:16708:38>' Match_Result ada/nodes.lkt:16708
--# expr-start 9215 '<parent at nodes.lkt:16708:44>' Fld ada/nodes.lkt:16708
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 9215
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Assign_Stmt =>
   --# scope-start
--# scope-start
      Cast_Result_12 := Create_Internal_Entity_Assign_Stmt
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_12; 
--# bind a Match_0
--# expr-start 9217 '<Eq at nodes.lkt:16711:31>' Is_Equiv ada/nodes.lkt:16711
--# expr-start 9216 '<FieldAccess for dest at nodes.lkt:16711:31>' Fld_1 ada/nodes.lkt:16711
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Match_0.Node.Assign_Stmt_F_Dest, Info => Match_0.Info);
--# expr-done 9216
      Cast_Result := Create_Internal_Entity
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
Cast_Expr := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 9217
Let_Result := Is_Equiv; 
--# end
Scope_Result_6 := Let_Result;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_13 := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_13; 
--# bind c Match_1
--# expr-start 9221 '<BooleanBinaryOp And at nodes.lkt:16716:13>' If_Result ada/nodes.lkt:16716
--# expr-start 9219 '<Eq at nodes.lkt:16716:13>' Is_Equiv_1 ada/nodes.lkt:16716
--# expr-start 9218 '<FieldAccess for name at nodes.lkt:16716:13>' Fld_2 ada/nodes.lkt:16716
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Match_1.Node.Call_Expr_F_Name, Info => Match_1.Info);
--# expr-done 9218
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Cast_Expr_1 := Ent; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv_1 := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 9219
if Is_Equiv_1 then
   --# expr-start 9220 '<FieldAccess for is_write_reference at nodes.lkt:16719:17>' Fld_3 ada/nodes.lkt:16719
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_write_reference
Fld_3 := Libadalang.Implementation.Name_P_Is_Write_Reference (Node => Match_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_1.Info);
--# end
--# expr-done 9220
   If_Result := Fld_3;
else
   If_Result := False;
end if;
--# expr-done 9221
Let_Result_1 := If_Result; 
--# end
Scope_Result_7 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_7; 
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_14 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_14; 
--# bind d Match_2
--# expr-start 9237 '<BooleanBinaryOp Or at nodes.lkt:16728:13>' If_Result_3 ada/nodes.lkt:16728
--# expr-start 9222 '<FieldAccess for is_write_reference at nodes.lkt:16730:17>' Fld_4 ada/nodes.lkt:16730
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_write_reference
Fld_4 := Libadalang.Implementation.Name_P_Is_Write_Reference (Node => Match_2.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_2.Info);
--# end
--# expr-done 9222
if Fld_4 then
   If_Result_3 := True;
else
   --# expr-start 9236 '<BooleanBinaryOp And at nodes.lkt:16734:17>' If_Result_2 ada/nodes.lkt:16734
--# expr-start 9224 '<Eq at nodes.lkt:16734:17>' Is_Equiv_2 ada/nodes.lkt:16734
--# expr-start 9223 '<FieldAccess for prefix at nodes.lkt:16734:17>' Fld_5 ada/nodes.lkt:16734
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Name (Node => Match_2.Node.Dotted_Name_F_Prefix, Info => Match_2.Info);
--# expr-done 9223
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Cast_Expr_2 := Ent; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Is_Equiv_2 := Equivalent (Cast_Result_4, Cast_Result_5); 
--# expr-done 9224
if Is_Equiv_2 then
--# expr-start 9226 '<FieldAccess for called_subp_spec at nodes.lkt:16735:21>' Fld_7 ada/nodes.lkt:16735
--# expr-start 9225 '<FieldAccess for suffix at nodes.lkt:16735:21>' Fld_6 ada/nodes.lkt:16735
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Base_Id (Node => Match_2.Node.Dotted_Name_F_Suffix, Info => Match_2.Info);
--# expr-done 9225
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.called_subp_spec
Fld_7 := Libadalang.Implementation.Name_P_Called_Subp_Spec (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 9226
Var_Expr_0 := Fld_7;
if Var_Expr_0 /= No_Entity_Base_Formal_Param_Holder then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 9235 '<BooleanBinaryOp And at nodes.lkt:16737:21>' If_Result_1 ada/nodes.lkt:16737
--# expr-start 9229 '<FieldAccess for dottable_subp at nodes.lkt:16737:21>' Fld_10 ada/nodes.lkt:16737
--# expr-start 9228 '<FieldAccess for md at nodes.lkt:16737:21>' Fld_9 ada/nodes.lkt:16737
--# expr-start 9227 '<FieldAccess for info at nodes.lkt:16737:21>' Fld_8 ada/nodes.lkt:16737
Fld_8 := Var_Expr_0.Info;
--# expr-done 9227
Fld_9 := Fld_8.Md;
--# expr-done 9228
Fld_10 := Fld_9.Dottable_Subp;
--# expr-done 9229
if Fld_10 then
--# expr-start 9232 '<Cast to ParamSpec at nodes.lkt:16738:25>' Cast_Result_6 ada/nodes.lkt:16738
--# expr-start 9231 '<at at nodes.lkt:16738:25>' Get_Result ada/nodes.lkt:16738
--# expr-start 9230 '<FieldAccess for abstract_formal_params at nodes.lkt:16738:25>' Fld_11 ada/nodes.lkt:16738
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_11 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 9230
Get_Result := Get (Self, Fld_11, 0, True); 
--# expr-done 9231
   if Get_Result.Node = null
      or else Get_Result.Node.Kind in Ada_Param_Spec_Range
   then
      Cast_Result_6 := Create_Internal_Entity_Param_Spec
        (Node => Get_Result.Node,
         Info => Get_Result.Info);
   else
         Cast_Result_6 := No_Entity_Param_Spec;
   end if;
--# expr-done 9232
Var_Expr_232 := Cast_Result_6;
if Var_Expr_232 /= No_Entity_Param_Spec then
   --# scope-start
--# expr-start 9233 '<FieldAccess for mode at nodes.lkt:16738:25>' Fld_12 ada/nodes.lkt:16738
      if Var_Expr_232.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Mode (Node => Var_Expr_232.Node.Param_Spec_F_Mode, Info => Var_Expr_232.Info);
--# expr-done 9233
Var_Expr_233 := Fld_12;
if Var_Expr_233 /= No_Entity_Mode then
   --# scope-start
--# expr-start 9234 '<FieldAccess for is_writable at nodes.lkt:16738:25>' Fld_13 ada/nodes.lkt:16738
      if Var_Expr_233.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Mode.is_writable
Fld_13 := Libadalang.Implementation.Mode_P_Is_Writable (Node => Var_Expr_233.Node);
--# end
--# expr-done 9234
Scope_Result := Fld_13;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_1 := Result_Var_1;
else
   If_Result_1 := False;
end if;
--# expr-done 9235
Scope_Result_2 := If_Result_1;
   --# end
      Finalizer_Scope_3154;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_2 := Result_Var_2;
else
   If_Result_2 := False;
end if;
--# expr-done 9236
   If_Result_3 := If_Result_2;
end if;
--# expr-done 9237
Let_Result_2 := If_Result_3; 
--# end
Scope_Result_8 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_8; 
         when Ada_Param_Assoc =>
   --# scope-start
--# scope-start
      Cast_Result_15 := Create_Internal_Entity_Param_Assoc
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_15; 
--# bind p Match_3
--# expr-start 9256 '<If at nodes.lkt:16747:13>' If_Result_4 ada/nodes.lkt:16747
--# expr-start 9245 '<bind at nodes.lkt:16748:17>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:16748
--# expr-start 9238 '<FieldAccess for node_env at nodes.lkt:16748:28>' Fld_21 ada/nodes.lkt:16748
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Libadalang.Implementation.Node_Env (Node => Self);
--# expr-done 9238
Bound_Env := Fld_21; Inc_Ref (Bound_Env);
--# expr-start 9244 '<bind at nodes.lkt:16749:17>' Dyn_Var_Bind_Result ada/nodes.lkt:16749
--# expr-start 9239 '<FieldAccess for origin_node at nodes.lkt:16749:31>' Fld_22 ada/nodes.lkt:16749
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_22 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 9239
Bound_Origin := Fld_22; 
--# expr-start 9242 '<Cast to CallExpr at nodes.lkt:16751:17>' Cast_Result_9 ada/nodes.lkt:16751
--# expr-start 9241 '<parent at nodes.lkt:16751:17>' Fld_24 ada/nodes.lkt:16751
--# expr-start 9240 '<parent at nodes.lkt:16751:17>' Fld_23 ada/nodes.lkt:16751
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Libadalang.Implementation.Parent (Node => Match_3.Node, E_Info => Match_3.Info);
--# expr-done 9240
      if Fld_23.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Libadalang.Implementation.Parent (Node => Fld_23.Node, E_Info => Fld_23.Info);
--# expr-done 9241
   if Fld_24.Node = null
      or else Fld_24.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_9 := Create_Internal_Entity_Call_Expr
        (Node => Fld_24.Node,
         Info => Fld_24.Info);
   else
         Cast_Result_9 := No_Entity_Call_Expr;
   end if;
--# expr-done 9242
Var_Expr_234 := Cast_Result_9;
if Var_Expr_234 /= No_Entity_Call_Expr then
   --# scope-start
--# expr-start 9243 '<FieldAccess for is_type_conversion at nodes.lkt:16751:17>' Fld_25 ada/nodes.lkt:16751
      if Var_Expr_234.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.is_type_conversion
Fld_25 := Libadalang.Implementation.Call_Expr_P_Is_Type_Conversion (Node => Var_Expr_234.Node, Env => Bound_Env, Origin => Bound_Origin, E_Info => Var_Expr_234.Info);
--# end
--# expr-done 9243
Scope_Result_5 := Fld_25;
   --# end
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := False;
end if;
Dyn_Var_Bind_Result := Result_Var_5; 
--# expr-done 9244
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; 
--# expr-done 9245
if Dyn_Var_Bind_Result_1 then
   --# expr-start 9249 '<FieldAccess for is_write_reference at nodes.lkt:16753:18>' Fld_16 ada/nodes.lkt:16753
--# expr-start 9248 '<Cast to CallExpr at nodes.lkt:16753:18>' Cast_Result_7 ada/nodes.lkt:16753
--# expr-start 9247 '<parent at nodes.lkt:16753:18>' Fld_15 ada/nodes.lkt:16753
--# expr-start 9246 '<parent at nodes.lkt:16753:18>' Fld_14 ada/nodes.lkt:16753
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Libadalang.Implementation.Parent (Node => Match_3.Node, E_Info => Match_3.Info);
--# expr-done 9246
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Parent (Node => Fld_14.Node, E_Info => Fld_14.Info);
--# expr-done 9247
   if Fld_15.Node = null
      or else Fld_15.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_7 := Create_Internal_Entity_Call_Expr
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
   else
         Cast_Result_7 := No_Entity_Call_Expr;
   end if;
--# expr-done 9248
      if Cast_Result_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_write_reference
Fld_16 := Libadalang.Implementation.Name_P_Is_Write_Reference (Node => Cast_Result_7.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result_7.Info);
--# end
--# expr-done 9249
   If_Result_4 := Fld_16;
else
   --# expr-start 9255 '<AnyQuantifier at nodes.lkt:16755:17>' Quantifier_Result ada/nodes.lkt:16755
   --# expr-start 9250 '<FieldAccess for get_params at nodes.lkt:16755:17>' Fld_17 ada/nodes.lkt:16755
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicAssoc.get_params
Fld_17 := Libadalang.Implementation.Basic_Assoc_P_Get_Params (Node => Match_3.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_3.Info);
--# end
--# expr-done 9250
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_17;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind m Item_1
--# expr-start 9252 '<Cast to ParamSpec at nodes.lkt:16756:28>' Cast_Result_8 ada/nodes.lkt:16756
--# expr-start 9251 '<FieldAccess for basic_decl at nodes.lkt:16756:28>' Fld_18 ada/nodes.lkt:16756
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_18 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 9251
   if Fld_18.Node = null
      or else Fld_18.Node.Kind in Ada_Param_Spec_Range
   then
      Cast_Result_8 := Create_Internal_Entity_Param_Spec
        (Node => Fld_18.Node,
         Info => Fld_18.Info);
   else
         Cast_Result_8 := No_Entity_Param_Spec;
   end if;
--# expr-done 9252
Var_Expr_235 := Cast_Result_8;
if Var_Expr_235 /= No_Entity_Param_Spec then
   --# scope-start
--# expr-start 9253 '<FieldAccess for mode at nodes.lkt:16756:28>' Fld_19 ada/nodes.lkt:16756
      if Var_Expr_235.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Mode (Node => Var_Expr_235.Node.Param_Spec_F_Mode, Info => Var_Expr_235.Info);
--# expr-done 9253
Var_Expr_236 := Fld_19;
if Var_Expr_236 /= No_Entity_Mode then
   --# scope-start
--# expr-start 9254 '<FieldAccess for is_writable at nodes.lkt:16756:28>' Fld_20 ada/nodes.lkt:16756
      if Var_Expr_236.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Mode.is_writable
Fld_20 := Libadalang.Implementation.Mode_P_Is_Writable (Node => Var_Expr_236.Node);
--# end
--# expr-done 9254
Scope_Result_3 := Fld_20;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := False;
end if;
Scope_Result_4 := Result_Var_3;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := False;
end if;
      Quantifier_Result := Result_Var_4;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 9255
   If_Result_4 := Quantifier_Result;
end if;
--# expr-done 9256
Let_Result_3 := If_Result_4; 
--# end
Scope_Result_9 := Let_Result_3;
   --# end
      Finalizer_Scope_3157;
            Match_Result := Scope_Result_9; 
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_16 := Create_Internal_Entity_Attribute_Ref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_16; 
--# bind a Match_4
--# expr-start 9260 '<BooleanBinaryOp And at nodes.lkt:16760:33>' If_Result_5 ada/nodes.lkt:16760
--# expr-start 9258 '<Eq at nodes.lkt:16760:33>' Is_Equiv_3 ada/nodes.lkt:16760
--# expr-start 9257 '<FieldAccess for prefix at nodes.lkt:16760:33>' Fld_26 ada/nodes.lkt:16760
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Create_Internal_Entity_Name (Node => Match_4.Node.Attribute_Ref_F_Prefix, Info => Match_4.Info);
--# expr-done 9257
      Cast_Result_10 := Create_Internal_Entity
        (Node => Fld_26.Node,
         Info => Fld_26.Info);
Cast_Expr_3 := Ent; 
      Cast_Result_11 := Create_Internal_Entity
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
Is_Equiv_3 := Equivalent (Cast_Result_10, Cast_Result_11); 
--# expr-done 9258
if Is_Equiv_3 then
   --# expr-start 9259 '<FieldAccess for is_access_attr at nodes.lkt:16760:54>' Fld_27 ada/nodes.lkt:16760
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.is_access_attr
Fld_27 := Libadalang.Implementation.Attribute_Ref_P_Is_Access_Attr (Node => Match_4.Node);
--# end
--# expr-done 9259
   If_Result_5 := Fld_27;
else
   If_Result_5 := False;
end if;
--# expr-done 9260
Let_Result_4 := If_Result_5; 
--# end
Scope_Result_10 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_10; 
         when Ada_Alternatives_List =>
   --# scope-start
--# scope-start
      Cast_Result_17 := Create_Internal_Entity_Alternatives_List
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_17; 
--# bind l Match_5
--# expr-start 9262 '<IsA AggregateAssoc at nodes.lkt:16761:37>' Is_A ada/nodes.lkt:16761
--# expr-start 9261 '<parent at nodes.lkt:16761:37>' Fld_28 ada/nodes.lkt:16761
      if Match_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Libadalang.Implementation.Parent (Node => Match_5.Node, E_Info => Match_5.Info);
--# expr-done 9261
Is_A := Fld_28.Node /= null 
and then Fld_28.Node.Kind in Ada_Aggregate_Assoc_Range; 
--# expr-done 9262
Let_Result_5 := Is_A; 
--# end
Scope_Result_11 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_11; 
         when Ada_Abort_Absent .. Ada_Abstract_State_Decl_List | Ada_Constraint_List .. Ada_Iterated_Assoc | Ada_Abstract_State_Decl .. Ada_Array_Subcomponent_Choice_Name | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Abort_Stmt | Ada_Call_Stmt .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_18 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_6 := Cast_Result_18; 
--# bind _ Match_6
Let_Result_6 := False; 
--# end
Scope_Result_12 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_12; 
end case;
--# expr-done 9263
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3154;
                     Finalizer_Scope_3157;
            raise;
      end;
   return Property_Result;
end Name_P_Is_Write_Reference;
--# end
--# property-start Name.potential_actuals_for_dispatch ada/nodes.lkt:16769
pragma Warnings (Off, "is not referenced");
 function Name_P_Potential_Actuals_For_Dispatch
  (Node : Bare_Name
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Expected_Type_For_Expr_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind spec Spec
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Expected_Type_For_Expr_Array_Access;
            procedure Finalizer_Scope_237 with Inline_Always;
            procedure Finalizer_Scope_3165 with Inline_Always;
            procedure Finalizer_Scope_3170 with Inline_Always;
            procedure Finalizer_Scope_3171 with Inline_Always;
            procedure Finalizer_Scope_3172 with Inline_Always;
      Local_Prefix : Internal_Expected_Type_For_Expr_Array_Access;
Var_Expr_0 : Boolean;
Match_0 : Internal_Entity_Call_Expr;
Match_1 : Internal_Entity_Dotted_Name;
Match_2 : Internal_Entity_Identifier;
Match_3 : Internal_Entity_Name;
Var_Expr_1 : Internal_Entity_Dotted_Name;
Local_Args : Internal_Expected_Type_For_Expr_Array_Access;
Var_Expr_237 : Internal_Entity_Call_Expr;
Var_Expr_238 : Internal_Entity_Assoc_List;
Fld : Boolean;
Fld_1 : Internal_Entity_Name;
Cast_Result : Internal_Entity_Dotted_Name;
Fld_2 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Dotted_Name;
Match_Prefix : Internal_Entity_Name;
Cast_Result_2 : Internal_Entity_Call_Expr;
Let_Result : Internal_Entity_Dotted_Name;
Scope_Result : Internal_Entity_Dotted_Name;
Cast_Result_3 : Internal_Entity_Dotted_Name;
Let_Result_1 : Internal_Entity_Dotted_Name;
Scope_Result_1 : Internal_Entity_Dotted_Name;
Cast_Result_4 : Internal_Entity_Identifier;
Let_Result_2 : Internal_Entity_Dotted_Name;
Scope_Result_2 : Internal_Entity_Dotted_Name;
Cast_Result_5 : Internal_Entity_Name;
Let_Result_3 : Internal_Entity_Dotted_Name;
Scope_Result_3 : Internal_Entity_Dotted_Name;
Match_Result : Internal_Entity_Dotted_Name;
Fld_3 : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_4 : Internal_Entity_Base_Formal_Param_Decl;
Fld_5 : Internal_Entity_Type_Expr;
Fld_6 : Internal_Entity_Name;
Cast_Result_6 : Internal_Entity_Expr;
New_Struct : Internal_Expected_Type_For_Expr;
Array_Lit : Internal_Expected_Type_For_Expr_Array_Access;
Scope_Result_4 : Internal_Expected_Type_For_Expr_Array_Access;
Result_Var : Internal_Expected_Type_For_Expr_Array_Access;
Scope_Result_5 : Internal_Expected_Type_For_Expr_Array_Access;
Result_Var_1 : Internal_Expected_Type_For_Expr_Array_Access;
Cast_Expr : Internal_Entity_Name;
Cast_Result_7 : Internal_Entity_Call_Expr;
Fld_7 : Internal_Entity_Assoc_List;
Fld_8 : Internal_Param_Actual_Array_Access;
Fld_9 : Internal_Entity_Defining_Name;
Fld_10 : Internal_Entity_Basic_Decl;
Fld_11 : Internal_Entity_Type_Expr;
Fld_12 : Internal_Entity_Expr;
New_Struct_1 : Internal_Expected_Type_For_Expr;
Map_Result : Internal_Expected_Type_For_Expr_Array_Access;
Scope_Result_6 : Internal_Expected_Type_For_Expr_Array_Access;
Result_Var_2 : Internal_Expected_Type_For_Expr_Array_Access;
Scope_Result_7 : Internal_Expected_Type_For_Expr_Array_Access;
Result_Var_3 : Internal_Expected_Type_For_Expr_Array_Access;
Concat_Result : Internal_Expected_Type_For_Expr_Array_Access;
Let_Result_4 : Internal_Expected_Type_For_Expr_Array_Access;
Let_Result_5 : Internal_Expected_Type_For_Expr_Array_Access;
            procedure Finalizer_Scope_237 is
            begin
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Local_Prefix);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Local_Args);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
            end Finalizer_Scope_237;
            procedure Finalizer_Scope_3165 is
            begin
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_3165;
            procedure Finalizer_Scope_3170 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_3170;
            procedure Finalizer_Scope_3171 is
            begin
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Result_Var_2);
            end Finalizer_Scope_3171;
            procedure Finalizer_Scope_3172 is
            begin
                     Dec_Ref (Fld_8);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3172;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9287 '<Let at nodes.lkt:16775:9>' Let_Result_5 ada/nodes.lkt:16775
--# scope-start
--# expr-start 9264 '<FieldAccess for is_dot_call at nodes.lkt:16776:13>' Fld ada/nodes.lkt:16776
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_dot_call
Fld := Libadalang.Implementation.Name_P_Is_Dot_Call (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 9264
Var_Expr_0 := Fld;
if Var_Expr_0 /= False then
   --# scope-start
   --# bind _ Var_Expr_0
--# expr-start 9269 '<Match at nodes.lkt:16778:17>' Match_Result ada/nodes.lkt:16778
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind c Match_0
--# expr-start 9266 '<Cast to DottedName at nodes.lkt:16779:41>' Cast_Result ada/nodes.lkt:16779
--# expr-start 9265 '<FieldAccess for name at nodes.lkt:16779:41>' Fld_1 ada/nodes.lkt:16779
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Match_0.Node.Call_Expr_F_Name, Info => Match_0.Info);
--# expr-done 9265
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Create_Internal_Entity_Dotted_Name
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 9266
Let_Result := Cast_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind d Match_1
Let_Result_1 := Match_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Identifier =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Identifier
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind i Match_2
--# expr-start 9268 '<Cast to DottedName at nodes.lkt:16781:43>' Cast_Result_1 ada/nodes.lkt:16781
--# expr-start 9267 '<parent at nodes.lkt:16781:43>' Fld_2 ada/nodes.lkt:16781
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Match_2.Node, E_Info => Match_2.Info);
--# expr-done 9267
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Dotted_Name
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 9268
Let_Result_2 := Cast_Result_1; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Char_Literal | Ada_Op_Abs .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_5; 
--# bind _ Match_3
Let_Result_3 := No_Entity_Dotted_Name; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 9269
Var_Expr_1 := Match_Result;
if Var_Expr_1 /= No_Entity_Dotted_Name then
   --# scope-start
   --# bind d Var_Expr_1
--# expr-start 9276 '<ArrayLiteral at nodes.lkt:16786:21>' Array_Lit ada/nodes.lkt:16786
--# expr-start 9275 '<New ExpectedTypeForExpr at nodes.lkt:16787:25>' New_Struct ada/nodes.lkt:16787
--# expr-start 9273 '<FieldAccess for type_expression at nodes.lkt:16788:43>' Fld_5 ada/nodes.lkt:16788
--# expr-start 9272 '<FieldAccess for formal_decl at nodes.lkt:16788:43>' Fld_4 ada/nodes.lkt:16788
--# expr-start 9271 '<at at nodes.lkt:16788:43>' Get_Result ada/nodes.lkt:16788
--# expr-start 9270 '<FieldAccess for unpacked_formal_params at nodes.lkt:16788:43>' Fld_3 ada/nodes.lkt:16788
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_3 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Spec.Node, E_Info => Spec.Info);
--# end
--# expr-done 9270
Get_Result := Get (Self, Fld_3, 0, True); 
--# expr-done 9271
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_4 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 9272
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 9273
--# expr-start 9274 '<FieldAccess for prefix at nodes.lkt:16791:34>' Fld_6 ada/nodes.lkt:16791
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Name (Node => Var_Expr_1.Node.Dotted_Name_F_Prefix, Info => Var_Expr_1.Info);
--# expr-done 9274
      Cast_Result_6 := Create_Internal_Entity_Expr
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
New_Struct := (Expected_Type => Fld_5, Expr => Cast_Result_6); 
--# expr-done 9275
Array_Lit := Create_Internal_Expected_Type_For_Expr_Array (Internal_Internal_Expected_Type_For_Expr_Array'(1 => New_Struct)); 
--# expr-done 9276
Scope_Result_4 := Array_Lit;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_3170;
   Result_Var := Scope_Result_4;
else
   Result_Var := No_Internal_Expected_Type_For_Expr_Array_Type;
end if;
      Inc_Ref (Result_Var);
Scope_Result_5 := Result_Var;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_3165;
   Result_Var_1 := Scope_Result_5;
else
   Result_Var_1 := No_Internal_Expected_Type_For_Expr_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Local_Prefix := Result_Var_1; Inc_Ref (Local_Prefix);
--# bind prefix Local_Prefix
--# expr-start 9286 '<Let at nodes.lkt:16798:9>' Let_Result_4 ada/nodes.lkt:16798
--# scope-start
--# expr-start 9277 '<Cast to CallExpr at nodes.lkt:16799:13>' Cast_Result_7 ada/nodes.lkt:16799
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_7 := Create_Internal_Entity_Call_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_7 := No_Entity_Call_Expr;
   end if;
--# expr-done 9277
Var_Expr_237 := Cast_Result_7;
if Var_Expr_237 /= No_Entity_Call_Expr then
   --# scope-start
--# expr-start 9278 '<FieldAccess for params at nodes.lkt:16799:13>' Fld_7 ada/nodes.lkt:16799
      if Var_Expr_237.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_7 := Libadalang.Implementation.Call_Expr_P_Params (Node => Var_Expr_237.Node, E_Info => Var_Expr_237.Info);
--# end
--# expr-done 9278
Var_Expr_238 := Fld_7;
if Var_Expr_238 /= No_Entity_Assoc_List then
   --# scope-start
--# expr-start 9285 '<Map at nodes.lkt:16799:13>' Map_Result ada/nodes.lkt:16799
   --# expr-start 9279 '<FieldAccess for zip_with_params at nodes.lkt:16799:13>' Fld_8 ada/nodes.lkt:16799
      if Var_Expr_238.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AssocList.zip_with_params
Fld_8 := Libadalang.Implementation.Assoc_List_P_Zip_With_Params (Node => Var_Expr_238.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_238.Info);
--# end
--# expr-done 9279
      declare
         Map_Result_Vec : Internal_Expected_Type_For_Expr_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Actual_Array_Access := Fld_8;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_2
      --# expr-start 9284 '<New ExpectedTypeForExpr at nodes.lkt:16801:17>' New_Struct_1 ada/nodes.lkt:16801
--# expr-start 9282 '<FieldAccess for type_expression at nodes.lkt:16802:35>' Fld_11 ada/nodes.lkt:16802
--# expr-start 9281 '<FieldAccess for basic_decl at nodes.lkt:16802:35>' Fld_10 ada/nodes.lkt:16802
--# expr-start 9280 '<FieldAccess for param at nodes.lkt:16802:35>' Fld_9 ada/nodes.lkt:16802
Fld_9 := Item_2.Param;
--# expr-done 9280
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_10 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Fld_9.Node, E_Info => Fld_9.Info);
--# end
--# expr-done 9281
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Fld_10.Node, E_Info => Fld_10.Info);
--# end
--# expr-done 9282
--# expr-start 9283 '<FieldAccess for actual at nodes.lkt:16803:26>' Fld_12 ada/nodes.lkt:16803
Fld_12 := Item_2.Actual;
--# expr-done 9283
New_Struct_1 := (Expected_Type => Fld_11, Expr => Fld_12); 
--# expr-done 9284
         declare
            Item_To_Append : constant Internal_Expected_Type_For_Expr := New_Struct_1;
         begin
            Internal_Expected_Type_For_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Expected_Type_For_Expr_Array
           (Items_Count => Natural (Internal_Expected_Type_For_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Expected_Type_For_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Expected_Type_For_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Expected_Type_For_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 9285
Scope_Result_6 := Map_Result;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_3172;
   Result_Var_2 := Scope_Result_6;
else
   Result_Var_2 := No_Internal_Expected_Type_For_Expr_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
Scope_Result_7 := Result_Var_2;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3171;
   Result_Var_3 := Scope_Result_7;
else
   Result_Var_3 := No_Internal_Expected_Type_For_Expr_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
Local_Args := Result_Var_3; Inc_Ref (Local_Args);
--# bind args Local_Args
Concat_Result := Concat (Local_Prefix, Local_Args); 
Let_Result_4 := Concat_Result; Inc_Ref (Let_Result_4);
--# end
--# expr-done 9286
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 9287
         Property_Result := Let_Result_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_237;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_237;
                     Finalizer_Scope_3165;
                     Finalizer_Scope_3170;
                     Finalizer_Scope_3171;
                     Finalizer_Scope_3172;
            raise;
      end;
   return Property_Result;
end Name_P_Potential_Actuals_For_Dispatch;
--# end
--# property-start Name.is_dispatching_call ada/nodes.lkt:16811
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Dispatching_Call
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Var_Expr : Internal_Entity_Name;
Fld : Boolean;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Call_Expr;
Cast_Result : Internal_Entity_Name;
Scope_Result : Internal_Entity_Name;
Result_Var : Internal_Entity_Name;
Fld_3 : Internal_Entity_Basic_Decl;
Fld_4 : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9295 '<BooleanBinaryOp Or at nodes.lkt:16812:9>' If_Result_1 ada/nodes.lkt:16812
--# expr-start 9288 '<FieldAccess for is_access_call at nodes.lkt:16812:9>' Fld ada/nodes.lkt:16812
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_access_call
Fld := Libadalang.Implementation.Name_P_Is_Access_Call (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9288
if Fld then
   If_Result_1 := True;
else
   --# expr-start 9294 '<BooleanBinaryOp And at nodes.lkt:16814:13>' If_Result ada/nodes.lkt:16814
--# expr-start 9289 '<FieldAccess for is_direct_call at nodes.lkt:16814:13>' Fld_1 ada/nodes.lkt:16814
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_direct_call
Fld_1 := Libadalang.Implementation.Name_P_Is_Direct_Call (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9289
if Fld_1 then
   --# expr-start 9293 '<FieldAccess for is_dispatching_call_impl at nodes.lkt:16815:17>' Fld_4 ada/nodes.lkt:16815
--# expr-start 9291 '<Cast to Name at nodes.lkt:16815:18>' Cast_Result ada/nodes.lkt:16815
--# expr-start 9290 '<FieldAccess for parent_callexpr at nodes.lkt:16815:18>' Fld_2 ada/nodes.lkt:16815
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_callexpr
Fld_2 := Libadalang.Implementation.Name_P_Parent_Callexpr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9290
      Cast_Result := Create_Internal_Entity_Name
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
--# expr-done 9291
Var_Expr := Cast_Result;
if Var_Expr /= No_Entity_Name then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := Ent;
end if;
      if Result_Var.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9292 '<FieldAccess for referenced_decl at nodes.lkt:16816:39>' Fld_3 ada/nodes.lkt:16816
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_3 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 9292
--# property-call-start Expr.is_dispatching_call_impl
Fld_4 := Libadalang.Implementation.Expr_P_Is_Dispatching_Call_Impl (Node => Result_Var.Node, Decl => Fld_3, Imprecise_Fallback => Imprecise_Fallback, E_Info => Result_Var.Info);
--# end
--# expr-done 9293
   If_Result := Fld_4;
else
   If_Result := False;
end if;
--# expr-done 9294
   If_Result_1 := If_Result;
end if;
--# expr-done 9295
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Dispatching_Call;
--# end
--# property-start Name.is_static_call ada/nodes.lkt:16827
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Static_Call
  (Node : Bare_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Boolean;
Fld_1 : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 9299 '<BooleanBinaryOp And at nodes.lkt:16828:9>' If_Result ada/nodes.lkt:16828
--# expr-start 9296 '<FieldAccess for is_call at nodes.lkt:16828:9>' Fld ada/nodes.lkt:16828
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_call
Fld := Libadalang.Implementation.Name_P_Is_Call (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9296
if Fld then
   --# expr-start 9298 '<Not at nodes.lkt:16828:28>' Not_Val ada/nodes.lkt:16828
--# expr-start 9297 '<FieldAccess for is_dispatching_call at nodes.lkt:16828:32>' Fld_1 ada/nodes.lkt:16828
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.is_dispatching_call'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Is_Dispatching_Call (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 9297
Not_Val := not (Fld_1); 
--# expr-done 9298
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 9299
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Static_Call;
--# end
--# property-start Name.as_single_tok_node_array ada/nodes.lkt:16834
pragma Warnings (Off, "is not referenced");
 function Name_P_As_Single_Tok_Node_Array
  (Node : Bare_Name
  )
   return Bare_Single_Tok_Node_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Bare_Single_Tok_Node_Array_Access;
            procedure Finalizer_Scope_240 with Inline_Always;
            procedure Finalizer_Scope_3175 with Inline_Always;
            procedure Finalizer_Scope_3176 with Inline_Always;
            procedure Finalizer_Scope_3177 with Inline_Always;
      Match_0 : Bare_Defining_Name;
Match_1 : Bare_Single_Tok_Node;
Match_2 : Bare_Dotted_Name;
Match_3 : Bare_Name;
Fld : Bare_Name;
Fld_1 : Bare_Single_Tok_Node_Array_Access;
Array_Lit : Bare_Single_Tok_Node_Array_Access;
Fld_2 : Bare_Name;
Fld_3 : Bare_Single_Tok_Node_Array_Access;
Fld_4 : Bare_Base_Id;
Fld_5 : Bare_Single_Tok_Node_Array_Access;
Concat_Result : Bare_Single_Tok_Node_Array_Access;
Match_Prefix : Bare_Name;
Cast_Result : Bare_Defining_Name;
Let_Result : Bare_Single_Tok_Node_Array_Access;
Scope_Result : Bare_Single_Tok_Node_Array_Access;
Cast_Result_1 : Bare_Single_Tok_Node;
Let_Result_1 : Bare_Single_Tok_Node_Array_Access;
Scope_Result_1 : Bare_Single_Tok_Node_Array_Access;
Cast_Result_2 : Bare_Dotted_Name;
Let_Result_2 : Bare_Single_Tok_Node_Array_Access;
Scope_Result_2 : Bare_Single_Tok_Node_Array_Access;
Cast_Result_3 : Bare_Name;
Let_Result_3 : Bare_Single_Tok_Node_Array_Access;
Scope_Result_3 : Bare_Single_Tok_Node_Array_Access;
Match_Result : Bare_Single_Tok_Node_Array_Access;
            procedure Finalizer_Scope_240 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_240;
            procedure Finalizer_Scope_3175 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3175;
            procedure Finalizer_Scope_3176 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_3176;
            procedure Finalizer_Scope_3177 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_3177;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9307 '<Match at nodes.lkt:16834:60>' Match_Result ada/nodes.lkt:16834
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Self; 
case Ada_Name (Match_Prefix.Kind) is
         when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind dname Match_0
--# expr-start 9301 '<FieldAccess for as_single_tok_node_array at nodes.lkt:16835:37>' Fld_1 ada/nodes.lkt:16835
--# expr-start 9300 '<FieldAccess for name at nodes.lkt:16835:37>' Fld ada/nodes.lkt:16835
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Match_0.Defining_Name_F_Name;
--# expr-done 9300
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.as_single_tok_node_array
Fld_1 := Libadalang.Implementation.Name_P_As_Single_Tok_Node_Array (Node => Fld);
--# end
--# expr-done 9301
Let_Result := Fld_1; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3175;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Char_Literal .. Ada_Real_Literal =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind tok Match_1
--# expr-start 9302 '<ArrayLiteral at nodes.lkt:16836:36>' Array_Lit ada/nodes.lkt:16836
Array_Lit := Create_Bare_Single_Tok_Node_Array (Internal_Bare_Single_Tok_Node_Array'(1 => Match_1)); 
--# expr-done 9302
Let_Result_1 := Array_Lit; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3176;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind dot Match_2
--# expr-start 9304 '<FieldAccess for as_single_tok_node_array at nodes.lkt:16838:13>' Fld_3 ada/nodes.lkt:16838
--# expr-start 9303 '<FieldAccess for prefix at nodes.lkt:16838:13>' Fld_2 ada/nodes.lkt:16838
      if Match_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Match_2.Dotted_Name_F_Prefix;
--# expr-done 9303
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.as_single_tok_node_array
Fld_3 := Libadalang.Implementation.Name_P_As_Single_Tok_Node_Array (Node => Fld_2);
--# end
--# expr-done 9304
--# expr-start 9306 '<FieldAccess for as_single_tok_node_array at nodes.lkt:16839:15>' Fld_5 ada/nodes.lkt:16839
--# expr-start 9305 '<FieldAccess for suffix at nodes.lkt:16839:15>' Fld_4 ada/nodes.lkt:16839
      if Match_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Match_2.Dotted_Name_F_Suffix;
--# expr-done 9305
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.as_single_tok_node_array
Fld_5 := Libadalang.Implementation.Name_P_As_Single_Tok_Node_Array (Node => Fld_4);
--# end
--# expr-done 9306
Concat_Result := Concat (Fld_3, Fld_5); 
Let_Result_2 := Concat_Result; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3177;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Call_Expr | Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Reduce_Attribute_Ref | Ada_Synthetic_Identifier .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_3 := Cast_Result_3; 
--# bind _ Match_3
Let_Result_3 := raise Precondition_Failure with "PropertyError exception"; Inc_Ref (Let_Result_3);
--# end
Scope_Result_3 := Let_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
end case;
--# expr-done 9307
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_240;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_240;
                     Finalizer_Scope_3175;
                     Finalizer_Scope_3176;
                     Finalizer_Scope_3177;
            raise;
      end;
   return Property_Result;
end Name_P_As_Single_Tok_Node_Array;
--# end
--# property-start Name.call_params ada/nodes.lkt:16846
pragma Warnings (Off, "is not referenced");
 function Name_P_Call_Params
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Actual_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_241 with Inline_Always;
            procedure Finalizer_Scope_3185 with Inline_Always;
            procedure Finalizer_Scope_3186 with Inline_Always;
            procedure Finalizer_Scope_3187 with Inline_Always;
            procedure Finalizer_Scope_3190 with Inline_Always;
      Local_Formal_Spec : Internal_Entity_Base_Formal_Param_Holder;
Local_Is_Call : Boolean;
Local_Is_Prefix_Call : Boolean;
Local_Offset : Integer;
Local_Call_Prefix : Internal_Entity_Expr;
Var_Expr_0 : Internal_Entity_Call_Expr;
Match_0 : Internal_Entity_Dotted_Name;
Match_1 : Internal_Entity_Attribute_Ref;
Match_2 : Internal_Entity_Name;
Local_Aparams : Internal_Entity_Assoc_List;
Local_Fparams : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Local_Actual_Formals : Internal_Entity_Defining_Name_Array_Access;
Local_Dparams : Internal_Param_Actual_Array_Access;
Var_Expr_4 : Internal_Entity_Assoc_List;
Var_Expr : Internal_Entity_Name;
Var_Expr_239 : Internal_Entity_Call_Expr;
Var_Expr_240 : Internal_Entity_Base_Formal_Param_Holder;
Var_Expr_241 : Internal_Entity_Base_Formal_Param_Holder;
Var_Expr_242 : Internal_Entity_Param_Spec;
Fld : Internal_Entity_Base_Formal_Param_Holder;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_1 : Boolean;
Is_A : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Integer;
Cast_Expr : Internal_Entity_Name;
Cast_Result : Internal_Entity_Call_Expr;
Fld_2 : Internal_Entity_Name;
Scope_Result : Internal_Entity_Name;
Result_Var : Internal_Entity_Name;
Scope_Result_1 : Internal_Entity_Name;
Result_Var_1 : Internal_Entity_Name;
Fld_3 : Internal_Entity_Name;
Fld_4 : Internal_Entity_Name;
Match_Prefix : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Dotted_Name;
Cast_Result_2 : Internal_Entity_Expr;
Let_Result : Internal_Entity_Expr;
Scope_Result_2 : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Attribute_Ref;
Cast_Result_4 : Internal_Entity_Expr;
Let_Result_1 : Internal_Entity_Expr;
Scope_Result_3 : Internal_Entity_Expr;
Cast_Result_5 : Internal_Entity_Name;
Let_Result_2 : Internal_Entity_Expr;
Scope_Result_4 : Internal_Entity_Expr;
Match_Result : Internal_Entity_Expr;
Cast_Expr_1 : Internal_Entity_Name;
Cast_Result_6 : Internal_Entity_Call_Expr;
Fld_5 : Internal_Entity_Assoc_List;
Scope_Result_5 : Internal_Entity_Assoc_List;
Result_Var_2 : Internal_Entity_Assoc_List;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result_6 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_7 : Internal_Entity_Base_Formal_Param_Holder;
Fld_8 : Internal_Entity_Defining_Name_Array_Access;
Scope_Result_7 : Internal_Entity_Defining_Name_Array_Access;
Result_Var_4 : Internal_Entity_Defining_Name_Array_Access;
Index_2 : Integer;
Fld_9 : Internal_Entity_Defining_Name_Array_Access;
Cast_Expr_2 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_7 : Internal_Entity_Param_Spec;
Fld_10 : Internal_Entity_Expr;
Scope_Result_8 : Internal_Entity_Expr;
Result_Var_5 : Internal_Entity_Expr;
Is_Equal : Boolean;
If_Result_3 : Boolean;
If_Result_4 : Internal_Entity_Expr;
New_Struct : Internal_Param_Actual;
Map_Result : Internal_Param_Actual_Array_Access;
Map_Result_1 : Internal_Param_Actual_Array_Access;
Index_6 : Integer;
Get_Result : Internal_Entity_Defining_Name;
Fld_11 : Internal_Entity_Expr;
Fld_12 : Internal_Entity_Defining_Name;
Arith_Result : Integer;
Fld_13 : Internal_Entity_Expr;
Fld_14 : Internal_Entity_Expr;
Is_Equal_1 : Boolean;
If_Result_5 : Boolean;
If_Result_6 : Internal_Entity_Expr;
New_Struct_1 : Internal_Param_Actual;
Map_Result_2 : Internal_Param_Actual_Array_Access;
Scope_Result_9 : Internal_Param_Actual_Array_Access;
Result_Var_6 : Internal_Param_Actual_Array_Access;
Let_Result_3 : Internal_Param_Actual_Array_Access;
If_Result_7 : Internal_Param_Actual_Array_Access;
Let_Result_4 : Internal_Param_Actual_Array_Access;
Let_Result_5 : Internal_Param_Actual_Array_Access;
Let_Result_6 : Internal_Param_Actual_Array_Access;
Let_Result_7 : Internal_Param_Actual_Array_Access;
Let_Result_8 : Internal_Param_Actual_Array_Access;
Let_Result_9 : Internal_Param_Actual_Array_Access;
Let_Result_10 : Internal_Param_Actual_Array_Access;
Let_Result_11 : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_241 is
            begin
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Local_Fparams);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (Local_Actual_Formals);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_Dparams);
                     Dec_Ref (Scope_Result_9);
                     Dec_Ref (Result_Var_6);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (If_Result_7);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Let_Result_7);
                     Dec_Ref (Let_Result_8);
                     Dec_Ref (Let_Result_9);
                     Dec_Ref (Let_Result_10);
                     Dec_Ref (Let_Result_11);
            end Finalizer_Scope_241;
            procedure Finalizer_Scope_3185 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_3185;
            procedure Finalizer_Scope_3186 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_3186;
            procedure Finalizer_Scope_3187 is
            begin
                     Dec_Ref (Fld_9);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3187;
            procedure Finalizer_Scope_3190 is
            begin
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_3190;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 9355 '<Let at nodes.lkt:16847:9>' Let_Result_11 ada/nodes.lkt:16847
--# scope-start
--# expr-start 9308 '<FieldAccess for called_formal_subp_spec at nodes.lkt:16847:27>' Fld ada/nodes.lkt:16847
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.called_formal_subp_spec'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Called_Formal_Subp_Spec (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9308
Local_Formal_Spec := Fld; 
--# bind formal_spec Local_Formal_Spec
--# expr-start 9354 '<Let at nodes.lkt:16848:9>' Let_Result_10 ada/nodes.lkt:16848
--# scope-start
--# expr-start 9310 '<Not at nodes.lkt:16848:23>' Not_Val ada/nodes.lkt:16848
--# expr-start 9309 '<IsNull at nodes.lkt:16848:27>' Is_Null ada/nodes.lkt:16848
Is_Null := Local_Formal_Spec.Node = null; 
--# expr-done 9309
Not_Val := not (Is_Null); 
--# expr-done 9310
Local_Is_Call := Not_Val; 
--# bind is_call Local_Is_Call
--# expr-start 9353 '<Let at nodes.lkt:16849:9>' Let_Result_9 ada/nodes.lkt:16849
--# scope-start
--# expr-start 9314 '<If at nodes.lkt:16850:13>' If_Result_1 ada/nodes.lkt:16850
if Local_Is_Call then
   --# expr-start 9313 '<BooleanBinaryOp Or at nodes.lkt:16850:29>' If_Result ada/nodes.lkt:16850
--# expr-start 9311 '<FieldAccess for is_dot_call at nodes.lkt:16850:29>' Fld_1 ada/nodes.lkt:16850
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_dot_call
Fld_1 := Libadalang.Implementation.Name_P_Is_Dot_Call (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 9311
if Fld_1 then
   If_Result := True;
else
   --# expr-start 9312 '<IsA AttributeRef at nodes.lkt:16850:51>' Is_A ada/nodes.lkt:16850
Is_A := Ent.Node /= null 
and then Ent.Node.Kind in Ada_Attribute_Ref_Range; 
--# expr-done 9312
   If_Result := Is_A;
end if;
--# expr-done 9313
   If_Result_1 := If_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 9314
Local_Is_Prefix_Call := If_Result_1; 
--# bind is_prefix_call Local_Is_Prefix_Call
--# expr-start 9352 '<Let at nodes.lkt:16852:9>' Let_Result_8 ada/nodes.lkt:16852
--# scope-start
--# expr-start 9315 '<If at nodes.lkt:16852:22>' If_Result_2 ada/nodes.lkt:16852
if Local_Is_Prefix_Call then
   If_Result_2 := 1;
else
   If_Result_2 := 0;
end if;
--# expr-done 9315
Local_Offset := If_Result_2; 
--# bind offset Local_Offset
--# expr-start 9351 '<Let at nodes.lkt:16853:9>' Let_Result_7 ada/nodes.lkt:16853
--# scope-start
--# expr-start 9320 '<Match at nodes.lkt:16853:27>' Match_Result ada/nodes.lkt:16853
--# expr-start 9316 '<Cast to CallExpr at nodes.lkt:16854:13>' Cast_Result ada/nodes.lkt:16854
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result := Create_Internal_Entity_Call_Expr
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Call_Expr;
   end if;
--# expr-done 9316
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Call_Expr then
   --# scope-start
   --# bind ce Var_Expr_0
--# expr-start 9317 '<FieldAccess for name at nodes.lkt:16854:42>' Fld_2 ada/nodes.lkt:16854
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Call_Expr_F_Name, Info => Var_Expr_0.Info);
--# expr-done 9317
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Name;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Name then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Ent;
end if;
      if Result_Var_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Result_Var_1; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind dn Match_0
--# expr-start 9318 '<FieldAccess for prefix at nodes.lkt:16856:36>' Fld_3 ada/nodes.lkt:16856
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 9318
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Let_Result := Cast_Result_2; 
--# end
Scope_Result_2 := Let_Result;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Attribute_Ref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind ar Match_1
--# expr-start 9319 '<FieldAccess for prefix at nodes.lkt:16857:38>' Fld_4 ada/nodes.lkt:16857
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Match_1.Node.Attribute_Ref_F_Prefix, Info => Match_1.Info);
--# expr-done 9319
      Cast_Result_4 := Create_Internal_Entity_Expr
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Let_Result_1 := Cast_Result_4; 
--# end
Scope_Result_3 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_5; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Expr; 
--# end
Scope_Result_4 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_4; 
end case;
--# expr-done 9320
Local_Call_Prefix := Match_Result; 
--# bind call_prefix Local_Call_Prefix
--# expr-start 9350 '<Let at nodes.lkt:16861:9>' Let_Result_6 ada/nodes.lkt:16861
--# scope-start
--# expr-start 9321 '<Cast to CallExpr at nodes.lkt:16861:23>' Cast_Result_6 ada/nodes.lkt:16861
Cast_Expr_1 := Ent; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_6 := Create_Internal_Entity_Call_Expr
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_6 := No_Entity_Call_Expr;
   end if;
--# expr-done 9321
Var_Expr_239 := Cast_Result_6;
if Var_Expr_239 /= No_Entity_Call_Expr then
   --# scope-start
--# expr-start 9322 '<FieldAccess for params at nodes.lkt:16861:23>' Fld_5 ada/nodes.lkt:16861
      if Var_Expr_239.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_5 := Libadalang.Implementation.Call_Expr_P_Params (Node => Var_Expr_239.Node, E_Info => Var_Expr_239.Info);
--# end
--# expr-done 9322
Scope_Result_5 := Fld_5;
   --# end
   Result_Var_2 := Scope_Result_5;
else
   Result_Var_2 := No_Entity_Assoc_List;
end if;
Local_Aparams := Result_Var_2; 
--# bind aparams Local_Aparams
--# expr-start 9349 '<Let at nodes.lkt:16863:9>' Let_Result_5 ada/nodes.lkt:16863
--# scope-start
Var_Expr_240 := Local_Formal_Spec;
if Var_Expr_240 /= No_Entity_Base_Formal_Param_Holder then
   --# scope-start
--# expr-start 9323 '<FieldAccess for abstract_formal_params at nodes.lkt:16863:23>' Fld_6 ada/nodes.lkt:16863
      if Var_Expr_240.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Var_Expr_240.Node, E_Info => Var_Expr_240.Info);
--# end
--# expr-done 9323
Scope_Result_6 := Fld_6;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_3185;
   Result_Var_3 := Scope_Result_6;
else
   Result_Var_3 := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
Local_Fparams := Result_Var_3; Inc_Ref (Local_Fparams);
--# bind fparams Local_Fparams
--# expr-start 9348 '<Let at nodes.lkt:16867:9>' Let_Result_4 ada/nodes.lkt:16867
--# scope-start
Var_Expr_241 := Local_Formal_Spec;
if Var_Expr_241 /= No_Entity_Base_Formal_Param_Holder then
   --# scope-start
--# expr-start 9325 '<FieldAccess for unpacked_formal_params at nodes.lkt:16868:13>' Fld_8 ada/nodes.lkt:16868
--# expr-start 9324 '<FieldAccess for corresponding_actual at nodes.lkt:16868:13>' Fld_7 ada/nodes.lkt:16868
      if Var_Expr_241.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.corresponding_actual'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Corresponding_Actual (Node => Var_Expr_241.Node, E_Info => Var_Expr_241.Info);
--# end
--# expr-done 9324
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_8 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 9325
Scope_Result_7 := Fld_8;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3186;
   Result_Var_4 := Scope_Result_7;
else
   Result_Var_4 := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var_4);
Local_Actual_Formals := Result_Var_4; Inc_Ref (Local_Actual_Formals);
--# bind actual_formals Local_Actual_Formals
--# expr-start 9347 '<If at nodes.lkt:16870:9>' If_Result_7 ada/nodes.lkt:16870
if Local_Is_Call then
   --# expr-start 9346 '<Let at nodes.lkt:16874:13>' Let_Result_3 ada/nodes.lkt:16874
--# scope-start
--# expr-start 9334 '<Mapcat at nodes.lkt:16875:17>' Map_Result_1 ada/nodes.lkt:16875
      declare
         Map_Result_1_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
         Index_2 := 0;
      declare
         Collection : constant Internal_Entity_Base_Formal_Param_Decl_Array_Access := Local_Fparams;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
               --# bind i Index_2
      --# expr-start 9333 '<Map at nodes.lkt:16877:21>' Map_Result ada/nodes.lkt:16877
   --# expr-start 9326 '<FieldAccess for defining_names at nodes.lkt:16877:21>' Fld_9 ada/nodes.lkt:16877
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 9326
      declare
         Map_Result_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_9;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_3
      --# expr-start 9332 '<New ParamActual at nodes.lkt:16879:25>' New_Struct ada/nodes.lkt:16879
--# expr-start 9331 '<If at nodes.lkt:16883:36>' If_Result_4 ada/nodes.lkt:16883
--# expr-start 9328 '<BooleanBinaryOp And at nodes.lkt:16883:39>' If_Result_3 ada/nodes.lkt:16883
if Local_Is_Prefix_Call then
   --# expr-start 9327 '<Eq at nodes.lkt:16883:58>' Is_Equal ada/nodes.lkt:16883
Is_Equal := Index_2 = 0; 
--# expr-done 9327
   If_Result_3 := Is_Equal;
else
   If_Result_3 := False;
end if;
--# expr-done 9328
if If_Result_3 then
   If_Result_4 := Local_Call_Prefix;
else
--# expr-start 9329 '<Cast to ParamSpec at nodes.lkt:16885:34>' Cast_Result_7 ada/nodes.lkt:16885
Cast_Expr_2 := Item_1; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Param_Spec_Range
   then
      Cast_Result_7 := Create_Internal_Entity_Param_Spec
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_7 := No_Entity_Param_Spec;
   end if;
--# expr-done 9329
Var_Expr_242 := Cast_Result_7;
if Var_Expr_242 /= No_Entity_Param_Spec then
   --# scope-start
--# expr-start 9330 '<FieldAccess for default_expr at nodes.lkt:16885:34>' Fld_10 ada/nodes.lkt:16885
      if Var_Expr_242.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Expr (Node => Var_Expr_242.Node.Param_Spec_F_Default_Expr, Info => Var_Expr_242.Info);
--# expr-done 9330
Scope_Result_8 := Fld_10;
   --# end
   Result_Var_5 := Scope_Result_8;
else
   Result_Var_5 := No_Entity_Expr;
end if;
   If_Result_4 := Result_Var_5;
end if;
--# expr-done 9331
New_Struct := (Actual => If_Result_4, Param => Item_3); 
--# expr-done 9332
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 9333
         for Item_To_Append of
               Map_Result.Items
         loop
            Internal_Param_Actual_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_3187;
               Index_2 := Index_2 + 1;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 9334
Local_Dparams := Map_Result_1; Inc_Ref (Local_Dparams);
--# bind dparams Local_Dparams
Var_Expr_4 := Local_Aparams;
if Var_Expr_4 /= No_Entity_Assoc_List then
   --# scope-start
   --# bind ap Var_Expr_4
--# expr-start 9345 '<Map at nodes.lkt:16894:17>' Map_Result_2 ada/nodes.lkt:16894
      declare
         Map_Result_2_Vec : Internal_Param_Actual_Vectors.Vector;
      begin
         Index_6 := 0;
      declare
         Collection : constant Internal_Param_Actual_Array_Access := Local_Dparams;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind dp Item_5
               --# bind i Index_6
      --# expr-start 9344 '<New ParamActual at nodes.lkt:16896:21>' New_Struct_1 ada/nodes.lkt:16896
--# expr-start 9342 '<If at nodes.lkt:16902:32>' If_Result_6 ada/nodes.lkt:16902
--# expr-start 9336 '<BooleanBinaryOp And at nodes.lkt:16902:35>' If_Result_5 ada/nodes.lkt:16902
if Local_Is_Prefix_Call then
   --# expr-start 9335 '<Eq at nodes.lkt:16902:54>' Is_Equal_1 ada/nodes.lkt:16902
Is_Equal_1 := Index_6 = 0; 
--# expr-done 9335
   If_Result_5 := Is_Equal_1;
else
   If_Result_5 := False;
end if;
--# expr-done 9336
if If_Result_5 then
   --# expr-start 9337 '<FieldAccess for actual at nodes.lkt:16902:66>' Fld_11 ada/nodes.lkt:16902
Fld_11 := Item_5.Actual;
--# expr-done 9337
   If_Result_6 := Fld_11;
else
   --# expr-start 9341 '<FieldAccess for actual_for_param_at at nodes.lkt:16904:29>' Fld_14 ada/nodes.lkt:16904
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9338 '<FieldAccess for param at nodes.lkt:16905:33>' Fld_12 ada/nodes.lkt:16905
Fld_12 := Item_5.Param;
--# expr-done 9338
--# expr-start 9339 '<Arithmetic - at nodes.lkt:16906:33>' Arith_Result ada/nodes.lkt:16906
Arith_Result := (Index_6 - Local_Offset); 
--# expr-done 9339
--# expr-start 9340 '<FieldAccess for actual at nodes.lkt:16907:33>' Fld_13 ada/nodes.lkt:16907
Fld_13 := Item_5.Actual;
--# expr-done 9340
--# property-call-start AssocList.actual_for_param_at
Fld_14 := Libadalang.Implementation.Assoc_List_P_Actual_For_Param_At (Node => Var_Expr_4.Node, Param => Fld_12, Pos => Arith_Result, Default_Expr => Fld_13, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 9341
   If_Result_6 := Fld_14;
end if;
--# expr-done 9342
--# expr-start 9343 '<at at nodes.lkt:16897:31>' Get_Result ada/nodes.lkt:16897
Get_Result := Get (Self, Local_Actual_Formals, Index_6, True); 
--# expr-done 9343
New_Struct_1 := (Actual => If_Result_6, Param => Get_Result); 
--# expr-done 9344
         declare
            Item_To_Append : constant Internal_Param_Actual := New_Struct_1;
         begin
            Internal_Param_Actual_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
               Index_6 := Index_6 + 1;
         end loop;
      end;
         Map_Result_2 := Create_Internal_Param_Actual_Array
           (Items_Count => Natural (Internal_Param_Actual_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Param_Actual_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Param_Actual_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Param_Actual_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 9345
Scope_Result_9 := Map_Result_2;
   Inc_Ref (Scope_Result_9);
   --# end
      Finalizer_Scope_3190;
   Result_Var_6 := Scope_Result_9;
else
   Result_Var_6 := Local_Dparams;
end if;
      Inc_Ref (Result_Var_6);
Let_Result_3 := Result_Var_6; Inc_Ref (Let_Result_3);
--# end
--# expr-done 9346
   If_Result_7 := Let_Result_3;
else
   If_Result_7 := raise Precondition_Failure with "this name doesn't reference a call expression";
end if;
      Inc_Ref (If_Result_7);
--# expr-done 9347
Let_Result_4 := If_Result_7; Inc_Ref (Let_Result_4);
--# end
--# expr-done 9348
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 9349
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 9350
Let_Result_7 := Let_Result_6; Inc_Ref (Let_Result_7);
--# end
--# expr-done 9351
Let_Result_8 := Let_Result_7; Inc_Ref (Let_Result_8);
--# end
--# expr-done 9352
Let_Result_9 := Let_Result_8; Inc_Ref (Let_Result_9);
--# end
--# expr-done 9353
Let_Result_10 := Let_Result_9; Inc_Ref (Let_Result_10);
--# end
--# expr-done 9354
Let_Result_11 := Let_Result_10; Inc_Ref (Let_Result_11);
--# end
--# expr-done 9355
         Property_Result := Let_Result_11;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_241;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_241;
                     Finalizer_Scope_3185;
                     Finalizer_Scope_3186;
                     Finalizer_Scope_3187;
                     Finalizer_Scope_3190;
            raise;
      end;
   return Property_Result;
end Name_P_Call_Params;
--# end
--# property-start '[dispatcher]Name.parent_scope' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Parent_Scope
  (Node : Bare_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Call_Expr | Ada_Discrete_Subtype_Name | Ada_Explicit_Deref .. Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.parent_scope
                  Property_Result := Name_P_Parent_Scope
                    (Self
                        , Env
                    );
                  --# end
               when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
                  --# property-call-start DefiningName.parent_scope
                  Property_Result := Defining_Name_P_Parent_Scope
                    (Self
                        , Env
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.parent_scope
                  Property_Result := Dotted_Name_P_Parent_Scope
                    (Self
                        , Env
                    );
                  --# end
               when Ada_End_Name =>
                  --# property-call-start EndName.parent_scope
                  Property_Result := End_Name_P_Parent_Scope
                    (Self
                        , Env
                    );
                  --# end
               when Ada_Char_Literal .. Ada_String_Literal =>
                  --# property-call-start BaseId.parent_scope
                  Property_Result := Base_Id_P_Parent_Scope
                    (Self
                        , Env
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Parent_Scope;
--# end
--# property-start '[dispatcher]Name.all_env_els_impl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_All_Env_Els_Impl
  (Node : Bare_Name
      ; Seq : Boolean
         := True
      ; Seq_From : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Categories : Ref_Categories
         := (Inherited_Primitives => True, Nocat => True)
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind seq Seq
   --# bind seq_from Seq_From
   --# bind categories Categories
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Call_Expr | Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.all_env_els_impl
                  Property_Result := Name_P_All_Env_Els_Impl
                    (Self
                        , Seq
                        , Seq_From
                        , Categories
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
                  --# property-call-start DefiningName.all_env_els_impl
                  Property_Result := Defining_Name_P_All_Env_Els_Impl
                    (Self
                        , Seq
                        , Seq_From
                        , Categories
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.all_env_els_impl
                  Property_Result := Dotted_Name_P_All_Env_Els_Impl
                    (Self
                        , Seq
                        , Seq_From
                        , Categories
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Char_Literal .. Ada_String_Literal =>
                  --# property-call-start BaseId.all_env_els_impl
                  Property_Result := Base_Id_P_All_Env_Els_Impl
                    (Self
                        , Seq
                        , Seq_From
                        , Categories
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_All_Env_Els_Impl;
--# end
--# property-start '[dispatcher]Name.scope' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Scope
  (Node : Bare_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Call_Expr | Ada_Discrete_Subtype_Name | Ada_Explicit_Deref .. Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.scope
                  Property_Result := Name_P_Scope
                    (Self
                        , Env
                    );
                  --# end
               when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
                  --# property-call-start DefiningName.scope
                  Property_Result := Defining_Name_P_Scope
                    (Self
                        , Env
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.scope
                  Property_Result := Dotted_Name_P_Scope
                    (Self
                        , Env
                    );
                  --# end
               when Ada_End_Name =>
                  --# property-call-start EndName.scope
                  Property_Result := End_Name_P_Scope
                    (Self
                        , Env
                    );
                  --# end
               when Ada_Char_Literal .. Ada_String_Literal =>
                  --# property-call-start BaseId.scope
                  Property_Result := Base_Id_P_Scope
                    (Self
                        , Env
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Scope;
--# end
--# property-start '[dispatcher]Name.ref_var' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Ref_Var
  (Node : Bare_Name
  )
   return Logic_Var
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Discrete_Subtype_Name | Ada_Synthetic_Identifier =>
                  --# property-call-start Name.ref_var
                  Property_Result := Name_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Array_Subcomponent_Choice_Name =>
                  --# property-call-start ArraySubcomponentChoiceName.ref_var
                  Property_Result := Array_Subcomponent_Choice_Name_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Attribute_Ref =>
                  --# property-call-start AttributeRef.ref_var
                  Property_Result := Attribute_Ref_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.ref_var
                  Property_Result := Call_Expr_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
                  --# property-call-start DefiningName.ref_var
                  Property_Result := Defining_Name_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.ref_var
                  Property_Result := Dotted_Name_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_End_Name =>
                  --# property-call-start EndName.ref_var
                  Property_Result := End_Name_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Explicit_Deref =>
                  --# property-call-start ExplicitDeref.ref_var
                  Property_Result := Explicit_Deref_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Qual_Expr =>
                  --# property-call-start QualExpr.ref_var
                  Property_Result := Qual_Expr_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Reduce_Attribute_Ref =>
                  --# property-call-start ReduceAttributeRef.ref_var
                  Property_Result := Reduce_Attribute_Ref_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Char_Literal .. Ada_Real_Literal =>
                  --# property-call-start SingleTokNode.ref_var
                  Property_Result := Single_Tok_Node_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Target_Name =>
                  --# property-call-start TargetName.ref_var
                  Property_Result := Target_Name_P_Ref_Var
                    (Self
                    );
                  --# end
               when Ada_Update_Attribute_Ref =>
                  --# property-call-start UpdateAttributeRef.ref_var
                  Property_Result := Update_Attribute_Ref_P_Ref_Var
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Ref_Var;
--# end
--# property-start '[dispatcher]Name.subp_spec_var' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Subp_Spec_Var
  (Node : Bare_Name
  )
   return Logic_Var
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name | Ada_Qual_Expr .. Ada_Reduce_Attribute_Ref | Ada_Synthetic_Identifier .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.subp_spec_var
                  Property_Result := Name_P_Subp_Spec_Var
                    (Self
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.subp_spec_var
                  Property_Result := Call_Expr_P_Subp_Spec_Var
                    (Self
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.subp_spec_var
                  Property_Result := Dotted_Name_P_Subp_Spec_Var
                    (Self
                    );
                  --# end
               when Ada_Explicit_Deref =>
                  --# property-call-start ExplicitDeref.subp_spec_var
                  Property_Result := Explicit_Deref_P_Subp_Spec_Var
                    (Self
                    );
                  --# end
               when Ada_Char_Literal .. Ada_Real_Literal =>
                  --# property-call-start SingleTokNode.subp_spec_var
                  Property_Result := Single_Tok_Node_P_Subp_Spec_Var
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Subp_Spec_Var;
--# end
--# property-start '[dispatcher]Name.defines_subp_spec_var' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Defines_Subp_Spec_Var
  (Node : Bare_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name | Ada_Qual_Expr .. Ada_Reduce_Attribute_Ref | Ada_Synthetic_Identifier .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.defines_subp_spec_var
                  Property_Result := Name_P_Defines_Subp_Spec_Var
                    (Self
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.defines_subp_spec_var
                  Property_Result := Call_Expr_P_Defines_Subp_Spec_Var
                    (Self
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.defines_subp_spec_var
                  Property_Result := Dotted_Name_P_Defines_Subp_Spec_Var
                    (Self
                    );
                  --# end
               when Ada_Explicit_Deref =>
                  --# property-call-start ExplicitDeref.defines_subp_spec_var
                  Property_Result := Explicit_Deref_P_Defines_Subp_Spec_Var
                    (Self
                    );
                  --# end
               when Ada_Char_Literal .. Ada_Real_Literal =>
                  --# property-call-start SingleTokNode.defines_subp_spec_var
                  Property_Result := Single_Tok_Node_P_Defines_Subp_Spec_Var
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Defines_Subp_Spec_Var;
--# end
--# property-start '[dispatcher]Name.called_formal_subp_spec' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Called_Formal_Subp_Spec
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.called_formal_subp_spec
                  Property_Result := Name_P_Called_Formal_Subp_Spec
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Attribute_Ref =>
                  --# property-call-start AttributeRef.called_formal_subp_spec
                  Property_Result := Attribute_Ref_P_Called_Formal_Subp_Spec
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Called_Formal_Subp_Spec;
--# end
--# property-start '[dispatcher]Name.designated_type_impl' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Designated_Type_Impl
  (Node : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Reduce_Attribute_Ref | Ada_Null_Literal .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.designated_type_impl
                  Property_Result := Name_P_Designated_Type_Impl
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Array_Subcomponent_Choice_Name =>
                  --# property-call-start ArraySubcomponentChoiceName.designated_type_impl
                  Property_Result := Array_Subcomponent_Choice_Name_P_Designated_Type_Impl
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Attribute_Ref =>
                  --# property-call-start AttributeRef.designated_type_impl
                  Property_Result := Attribute_Ref_P_Designated_Type_Impl
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.designated_type_impl
                  Property_Result := Call_Expr_P_Designated_Type_Impl
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.designated_type_impl
                  Property_Result := Dotted_Name_P_Designated_Type_Impl
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Char_Literal .. Ada_String_Literal =>
                  --# property-call-start BaseId.designated_type_impl
                  Property_Result := Base_Id_P_Designated_Type_Impl
                    (Self
                        , Env
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Designated_Type_Impl;
--# end
--# property-start '[dispatcher]Name.relative_name' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Relative_Name
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name | Ada_Discrete_Subtype_Name | Ada_Reduce_Attribute_Ref | Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.relative_name
                  Property_Result := Name_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Attribute_Ref =>
                  --# property-call-start AttributeRef.relative_name
                  Property_Result := Attribute_Ref_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.relative_name
                  Property_Result := Call_Expr_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Defining_Name .. Ada_Synthetic_Defining_Name =>
                  --# property-call-start DefiningName.relative_name
                  Property_Result := Defining_Name_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.relative_name
                  Property_Result := Dotted_Name_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_End_Name =>
                  --# property-call-start EndName.relative_name
                  Property_Result := End_Name_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Explicit_Deref =>
                  --# property-call-start ExplicitDeref.relative_name
                  Property_Result := Explicit_Deref_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Qual_Expr =>
                  --# property-call-start QualExpr.relative_name
                  Property_Result := Qual_Expr_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Char_Literal .. Ada_Real_Literal =>
                  --# property-call-start SingleTokNode.relative_name
                  Property_Result := Single_Tok_Node_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Identifier =>
                  --# property-call-start SyntheticIdentifier.relative_name
                  Property_Result := Synthetic_Identifier_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Target_Name =>
                  --# property-call-start TargetName.relative_name
                  Property_Result := Target_Name_P_Relative_Name
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Relative_Name;
--# end
--# property-start '[dispatcher]Name.name_symbol' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Name_Symbol
  (Node : Bare_Name
  )
   return Symbol_Type
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Attribute_Ref .. Ada_Defining_Name | Ada_Discrete_Subtype_Name .. Ada_Reduce_Attribute_Ref | Ada_Target_Name .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.name_symbol
                  Property_Result := Name_P_Name_Symbol
                    (Self
                    );
                  --# end
               when Ada_Array_Subcomponent_Choice_Name =>
                  --# property-call-start ArraySubcomponentChoiceName.name_symbol
                  Property_Result := Array_Subcomponent_Choice_Name_P_Name_Symbol
                    (Self
                    );
                  --# end
               when Ada_Synthetic_Defining_Name =>
                  --# property-call-start SyntheticDefiningName.name_symbol
                  Property_Result := Synthetic_Defining_Name_P_Name_Symbol
                    (Self
                    );
                  --# end
               when Ada_Char_Literal .. Ada_Identifier | Ada_String_Literal .. Ada_Real_Literal =>
                  --# property-call-start SingleTokNode.name_symbol
                  Property_Result := Single_Tok_Node_P_Name_Symbol
                    (Self
                    );
                  --# end
               when Ada_Op_Abs .. Ada_Op_Xor =>
                  --# property-call-start Op.name_symbol
                  Property_Result := Op_P_Name_Symbol
                    (Self
                    );
                  --# end
               when Ada_Synthetic_Identifier =>
                  --# property-call-start SyntheticIdentifier.name_symbol
                  Property_Result := Synthetic_Identifier_P_Name_Symbol
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Name_Symbol;
--# end
--# property-start '[dispatcher]Name.as_symbol_array' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_As_Symbol_Array
  (Node : Bare_Name
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Defining_Name | Ada_Discrete_Subtype_Name .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.as_symbol_array
                  Property_Result := Name_P_As_Symbol_Array
                    (Self
                    );
                  --# end
               when Ada_Synthetic_Defining_Name =>
                  --# property-call-start SyntheticDefiningName.as_symbol_array
                  Property_Result := Synthetic_Defining_Name_P_As_Symbol_Array
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_As_Symbol_Array;
--# end
--# property-start '[dispatcher]Name.canonical_text' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Canonical_Text
  (Node : Bare_Name
  )
   return Symbol_Type
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name .. Ada_Reduce_Attribute_Ref | Ada_Synthetic_Identifier .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.canonical_text
                  Property_Result := Name_P_Canonical_Text
                    (Self
                    );
                  --# end
               when Ada_Char_Literal .. Ada_Real_Literal =>
                  --# property-call-start SingleTokNode.canonical_text
                  Property_Result := Single_Tok_Node_P_Canonical_Text
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Canonical_Text;
--# end
--# property-start '[dispatcher]Name.is_constant' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Name_P_Is_Constant
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Name (Self.Kind) is
               when Ada_Array_Subcomponent_Choice_Name | Ada_Defining_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name | Ada_Reduce_Attribute_Ref .. Ada_Char_Literal | Ada_Op_Abs .. Ada_Null_Literal | Ada_Synthetic_Identifier .. Ada_Update_Attribute_Ref =>
                  --# property-call-start Name.is_constant
                  Property_Result := Name_P_Is_Constant
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Attribute_Ref =>
                  --# property-call-start AttributeRef.is_constant
                  Property_Result := Attribute_Ref_P_Is_Constant
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Call_Expr =>
                  --# property-call-start CallExpr.is_constant
                  Property_Result := Call_Expr_P_Is_Constant
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Dotted_Name =>
                  --# property-call-start DottedName.is_constant
                  Property_Result := Dotted_Name_P_Is_Constant
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Explicit_Deref =>
                  --# property-call-start ExplicitDeref.is_constant
                  Property_Result := Explicit_Deref_P_Is_Constant
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Qual_Expr =>
                  --# property-call-start QualExpr.is_constant
                  Property_Result := Qual_Expr_P_Is_Constant
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Identifier =>
                  --# property-call-start Identifier.is_constant
                  Property_Result := Identifier_P_Is_Constant
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Int_Literal .. Ada_Real_Literal =>
                  --# property-call-start NumLiteral.is_constant
                  Property_Result := Num_Literal_P_Is_Constant
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Name_P_Is_Constant;
--# end
--# property-start Name.parent_scope ada/nodes.lkt:16923
pragma Warnings (Off, "is not referenced");
 function Name_P_Parent_Scope
  (Node : Bare_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Name.parent_scope not implemented";
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Parent_Scope;
--# end
--# property-start Name.all_env_els_impl ada/nodes.lkt:16929
pragma Warnings (Off, "is not referenced");
 function Name_P_All_Env_Els_Impl
  (Node : Bare_Name
      ; Seq : Boolean
         := True
      ; Seq_From : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Categories : Ref_Categories
         := (Inherited_Primitives => True, Nocat => True)
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind seq Seq
   --# bind seq_from Seq_From
   --# bind categories Categories
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Name.all_env_els_impl not implemented";
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_All_Env_Els_Impl;
--# end
--# property-start Name.scope ada/nodes.lkt:16946
pragma Warnings (Off, "is not referenced");
 function Name_P_Scope
  (Node : Bare_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Empty_Env;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Scope;
--# end
--# property-start Name.ref_var ada/nodes.lkt:16954
pragma Warnings (Off, "is not referenced");
 function Name_P_Ref_Var
  (Node : Bare_Name
  )
   return Logic_Var
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Name.ref_var not implemented";
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Ref_Var;
--# end
--# property-start Name.subp_spec_var ada/nodes.lkt:16959
pragma Warnings (Off, "is not referenced");
 function Name_P_Subp_Spec_Var
  (Node : Bare_Name
  )
   return Logic_Var
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Name.subp_spec_var not implemented";
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Subp_Spec_Var;
--# end
--# property-start Name.defines_subp_spec_var ada/nodes.lkt:16964
pragma Warnings (Off, "is not referenced");
 function Name_P_Defines_Subp_Spec_Var
  (Node : Bare_Name
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Defines_Subp_Spec_Var;
--# end
--# property-start Name.called_formal_subp_spec ada/nodes.lkt:16977
pragma Warnings (Off, "is not referenced");
 function Name_P_Called_Formal_Subp_Spec
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Name  := Bare_Name (Node);
     Ent : Internal_Entity_Name :=
       Internal_Entity_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
      Cast_Expr : Internal_Entity_Name;
Cast_Result : Internal_Entity;
Fld : Logic_Var;
Fld_1 : Internal_Logic_Val_Result;
Fld_2 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Fld_3 : Boolean;
If_Result : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9361 '<If at nodes.lkt:16978:9>' If_Result ada/nodes.lkt:16978
--# expr-start 9356 '<FieldAccess for defines_subp_spec_var at nodes.lkt:16978:12>' Fld_3 ada/nodes.lkt:16978
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.defines_subp_spec_var'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Defines_Subp_Spec_Var (Node => Self);
--# end
--# expr-done 9356
if Fld_3 then
   --# expr-start 9360 '<Cast to BaseFormalParamHolder at nodes.lkt:16980:13>' Cast_Result_1 ada/nodes.lkt:16980
--# expr-start 9359 '<FieldAccess for value at nodes.lkt:16980:13>' Fld_2 ada/nodes.lkt:16980
--# expr-start 9358 '<FieldAccess for logic_val at nodes.lkt:16980:13>' Fld_1 ada/nodes.lkt:16980
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 9357 '<FieldAccess for subp_spec_var at nodes.lkt:16980:49>' Fld ada/nodes.lkt:16980
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Self);
--# end
--# expr-done 9357
--# property-call-start AdaNode.logic_val
Fld_1 := Libadalang.Implementation.Ada_Node_P_Logic_Val (Node => Self, From_Node => Cast_Result, Lvar => Fld);
--# end
--# expr-done 9358
Fld_2 := Fld_1.Value;
--# expr-done 9359
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Base_Formal_Param_Holder
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result_1 := No_Entity_Base_Formal_Param_Holder;
   end if;
--# expr-done 9360
   If_Result := Cast_Result_1;
else
   If_Result := No_Entity_Base_Formal_Param_Holder;
end if;
--# expr-done 9361
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Called_Formal_Subp_Spec;
--# end
--# property-start Name.designated_type_impl ada/nodes.lkt:16990
pragma Warnings (Off, "is not referenced");
 function Name_P_Designated_Type_Impl
  (Node : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Type_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Designated_Type_Impl;
--# end
--# property-start Name.relative_name ada/nodes.lkt:16996
pragma Warnings (Off, "is not referenced");
 function Name_P_Relative_Name
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Name.relative_name not implemented";
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Relative_Name;
--# end
--# property-start Name.name_symbol ada/nodes.lkt:17001
pragma Warnings (Off, "is not referenced");
 function Name_P_Name_Symbol
  (Node : Bare_Name
  )
   return Symbol_Type
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld : Internal_Entity_Name;
Fld_1 : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9364 '<FieldAccess for name_symbol at nodes.lkt:17002:9>' Fld_1 ada/nodes.lkt:17002
--# expr-start 9363 '<FieldAccess for relative_name at nodes.lkt:17002:9>' Fld ada/nodes.lkt:17002
--# expr-start 9362 '<as_bare_entity at nodes.lkt:17002:9>' If_Result ada/nodes.lkt:17002
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 9362
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 9363
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 9364
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Name_Symbol;
--# end
--# property-start Name.as_symbol_array ada/nodes.lkt:17012
pragma Warnings (Off, "is not referenced");
 function Name_P_As_Symbol_Array
  (Node : Bare_Name
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_252 with Inline_Always;
      Fld : Bare_Single_Tok_Node_Array_Access;
Sym : Symbol_Type;
Map_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_252 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_252;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9367 '<Map at nodes.lkt:17013:9>' Map_Result ada/nodes.lkt:17013
   --# expr-start 9365 '<FieldAccess for as_single_tok_node_array at nodes.lkt:17013:9>' Fld ada/nodes.lkt:17013
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.as_single_tok_node_array
Fld := Libadalang.Implementation.Name_P_As_Single_Tok_Node_Array (Node => Self);
--# end
--# expr-done 9365
      declare
         Map_Result_Vec : Symbol_Type_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Single_Tok_Node_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 9366 '<GetSymbol at nodes.lkt:17013:52>' Sym ada/nodes.lkt:17013
Sym := Get_Symbol (Item_0); 
--# expr-done 9366
         declare
            Item_To_Append : constant Symbol_Type := Sym;
         begin
            Symbol_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Symbol_Type_Array
           (Items_Count => Natural (Symbol_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Symbol_Type_Vectors.Get
              (Map_Result_Vec,
               I + Symbol_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Symbol_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 9367
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_252;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_252;
            raise;
      end;
   return Property_Result;
end Name_P_As_Symbol_Array;
--# end
--# property-start Name.canonical_text ada/nodes.lkt:17020
pragma Warnings (Off, "is not referenced");
 function Name_P_Canonical_Text
  (Node : Bare_Name
  )
   return Symbol_Type
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
            procedure Finalizer_Scope_253 with Inline_Always;
      Fld : Symbol_Type_Array_Access;
Str : String_Type;
Fld_1 : String_Type;
Sym : Symbol_Type;
            procedure Finalizer_Scope_253 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Str);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_253;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9371 '<to_symbol at nodes.lkt:17021:9>' Sym ada/nodes.lkt:17021
--# expr-start 9370 '<FieldAccess for sym_join at nodes.lkt:17021:9>' Fld_1 ada/nodes.lkt:17021
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9368 '<FieldAccess for as_symbol_array at nodes.lkt:17021:23>' Fld ada/nodes.lkt:17021
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Self);
--# end
--# expr-done 9368
--# expr-start 9369 '<String at nodes.lkt:17021:47>' Str ada/nodes.lkt:17021
Str := Create_String ("."); 
--# expr-done 9369
--# property-call-start AdaNode.sym_join
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sym_Join (Node => Self, Syms => Fld, Sep => Str);
--# end
--# expr-done 9370
Sym := String_To_Symbol (Self, Self.Unit.Context, Fld_1); 
--# expr-done 9371
         Property_Result := Sym;
   --# end
      Finalizer_Scope_253;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_253;
            raise;
      end;
   return Property_Result;
end Name_P_Canonical_Text;
--# end
--# property-start Name.is_constant ada/nodes.lkt:17025
pragma Warnings (Off, "is not referenced");
 function Name_P_Is_Constant
  (Node : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Name  := Bare_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := raise Property_Error with "Property Name.is_constant not implemented";
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Name_P_Is_Constant;
--# end
function Name_P_Name_Designated_Type_Env
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Name
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Lexical_Env :=
         Name_P_Name_Designated_Type_Env (E.Node, E_Info);
   begin
         return Result;
   end;
end;
function Name_P_Use_Package_Name_Designated_Env
  (E : Entity
  ) return Lexical_Env
is
      E_Info : Internal_Entity_Info :=
         Shed_Rebindings (E.Info, Children_Env (E.Node));
begin
      if E.Node /= null
         and then E.Node.Kind not in Ada_Name
      then
         Raise_Property_Exception
           (E.Node,
            Property_Error'Identity,
            "mismatching node type");
      end if;
   declare
      Result : constant Lexical_Env :=
         Name_P_Use_Package_Name_Designated_Env (E.Node, E_Info);
   begin
         return Result;
   end;
end;
   --
   --  Primitives for Bare_Array_Subcomponent_Choice_Name
   --
      procedure Initialize_Fields_For_Array_Subcomponent_Choice_Name
        (Self : Bare_Array_Subcomponent_Choice_Name
         ; Array_Subcomponent_Choice_Name_F_Name : Bare_Name
         ; Array_Subcomponent_Choice_Name_F_Suffix : Bare_Ada_Node
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Array_Subcomponent_Choice_Name_F_Name := Array_Subcomponent_Choice_Name_F_Name;
            Self.Array_Subcomponent_Choice_Name_F_Suffix := Array_Subcomponent_Choice_Name_F_Suffix;
      end Initialize_Fields_For_Array_Subcomponent_Choice_Name;
   function Array_Subcomponent_Choice_Name_F_Name
     (Node : Bare_Array_Subcomponent_Choice_Name) return Bare_Name
   is
   begin
         return Node.Array_Subcomponent_Choice_Name_F_Name;
   end;
   function Array_Subcomponent_Choice_Name_F_Suffix
     (Node : Bare_Array_Subcomponent_Choice_Name) return Bare_Ada_Node
   is
   begin
         return Node.Array_Subcomponent_Choice_Name_F_Suffix;
   end;
--# property-start ArraySubcomponentChoiceName.suffix_exprs ada/nodes.lkt:19386
pragma Warnings (Off, "is not referenced");
 function Array_Subcomponent_Choice_Name_P_Suffix_Exprs
  (Node : Bare_Array_Subcomponent_Choice_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr_Array_Access
is
   Self : Bare_Array_Subcomponent_Choice_Name  := Bare_Array_Subcomponent_Choice_Name (Node);
     Ent : Internal_Entity_Array_Subcomponent_Choice_Name :=
       Internal_Entity_Array_Subcomponent_Choice_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_1276 with Inline_Always;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Assoc_List;
Fld_1 : Bare_Assoc_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Basic_Assoc;
Bare_Item_0 : Bare_Basic_Assoc;
Cast_Expr : Internal_Entity_Basic_Assoc;
Cast_Result_1 : Internal_Entity_Param_Assoc;
Fld_3 : Internal_Entity_Expr;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Map_Result : Internal_Entity_Expr_Array_Access;
            procedure Finalizer_Scope_1276 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1276;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9376 '<Map at nodes.lkt:19387:9>' Map_Result ada/nodes.lkt:19387
   --# expr-start 9373 '<Cast to AssocList at nodes.lkt:19387:9>' Cast_Result ada/nodes.lkt:19387
--# expr-start 9372 '<FieldAccess for suffix at nodes.lkt:19387:9>' Fld ada/nodes.lkt:19387
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Ent.Node.Array_Subcomponent_Choice_Name_F_Suffix, Info => Ent.Info);
--# expr-done 9372
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Assoc_List_Range
   then
      Cast_Result := Create_Internal_Entity_Assoc_List
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 9373
Fld_1 := Cast_Result.Node;
      declare
         Map_Result_Vec : Internal_Entity_Expr_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Expr_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_2 := Cast_Result.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind a Item_0
      --# expr-start 9375 '<FieldAccess for expr at nodes.lkt:19387:47>' Fld_3 ada/nodes.lkt:19387
--# expr-start 9374 '<Cast to ParamAssoc at nodes.lkt:19387:47>' Cast_Result_1 ada/nodes.lkt:19387
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Param_Assoc_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Param_Assoc
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 9374
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 9375
         declare
            Item_To_Append : constant Internal_Entity_Expr := Fld_3;
         begin
            Internal_Entity_Expr_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Expr_Array
           (Items_Count => Natural (Internal_Entity_Expr_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Expr_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Expr_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Expr_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 9376
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1276;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1276;
            raise;
      end;
   return Property_Result;
end Array_Subcomponent_Choice_Name_P_Suffix_Exprs;
--# end
--# property-start ArraySubcomponentChoiceName.delta_aggregate_ancestor_expr_type ada/nodes.lkt:19391
pragma Warnings (Off, "is not referenced");
 function Array_Subcomponent_Choice_Name_P_Delta_Aggregate_Ancestor_Expr_Type
  (Node : Bare_Array_Subcomponent_Choice_Name
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Array_Subcomponent_Choice_Name  := Bare_Array_Subcomponent_Choice_Name (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1277 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result : Bare_Delta_Aggregate;
Fld : Bare_Expr;
As_Entity : Internal_Entity_Expr;
Is_Null : Boolean;
If_Result : Internal_Entity_Expr;
Fld_1 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1277 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_1277;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Array_Subcomponent_Choice_Name_Array_Subcomponent_Choice_Name_P_Delta_Aggregate_Ancestor_Expr_Type,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Array_Subcomponent_Choice_Name,
                                As_Bare_Array_Subcomponent_Choice_Name => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Base_Type_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 9383 '<FieldAccess for expression_type at nodes.lkt:19392:9>' Fld_1 ada/nodes.lkt:19392
--# expr-start 9382 '<as_bare_entity at nodes.lkt:19392:9>' If_Result ada/nodes.lkt:19392
--# expr-start 9381 '<FieldAccess for ancestor_expr at nodes.lkt:19392:9>' Fld ada/nodes.lkt:19392
--# expr-start 9380 '<Cast to DeltaAggregate at nodes.lkt:19392:9>' Cast_Result ada/nodes.lkt:19392
--# expr-start 9379 '<Find at nodes.lkt:19392:9>' Find_Result ada/nodes.lkt:19392
   --# expr-start 9377 '<FieldAccess for parents at nodes.lkt:19392:9>' Node_Parents ada/nodes.lkt:19392
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, False); 
--# expr-done 9377
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 9378 '<IsA DeltaAggregate at nodes.lkt:19392:51>' Is_A ada/nodes.lkt:19392
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Delta_Aggregate_Range; 
--# expr-done 9378
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 9379
   if Find_Result = null
      or else Find_Result.Kind in Ada_Delta_Aggregate_Range
   then
      Cast_Result := Find_Result;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 9380
      if Cast_Result = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Cast_Result.Base_Aggregate_F_Ancestor_Expr;
--# expr-done 9381
Is_Null := Fld = null; 
if Is_Null then
   If_Result := No_Entity_Expr;
else
As_Entity := (Info => No_Entity_Info, Node => Fld); 
   If_Result := As_Entity;
end if;
--# expr-done 9382
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_1 := Libadalang.Implementation.Expr_P_Expression_Type (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 9383
         Property_Result := Fld_1;
   --# end
      Finalizer_Scope_1277;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1277;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Base_Type_Decl,
                        As_Internal_Entity_Base_Type_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Array_Subcomponent_Choice_Name_P_Delta_Aggregate_Ancestor_Expr_Type;
--# end
--# property-start ArraySubcomponentChoiceName.ref_var ada/nodes.lkt:19398
pragma Warnings (Off, "is not referenced");
 function Array_Subcomponent_Choice_Name_P_Ref_Var
  (Node : Bare_Array_Subcomponent_Choice_Name
  )
   return Logic_Var
is
   Self : Bare_Array_Subcomponent_Choice_Name  := Bare_Array_Subcomponent_Choice_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      As_Entity : Internal_Entity_Array_Subcomponent_Choice_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Array_Subcomponent_Choice_Name;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Defining_Name;
Fld_2 : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9387 '<FieldAccess for ref_var at nodes.lkt:19399:9>' Fld_2 ada/nodes.lkt:19399
--# expr-start 9386 '<FieldAccess for name at nodes.lkt:19399:9>' Fld_1 ada/nodes.lkt:19399
--# expr-start 9385 '<FieldAccess for delta_aggregate_ancestor_expr_type at nodes.lkt:19399:9>' Fld ada/nodes.lkt:19399
--# expr-start 9384 '<as_bare_entity at nodes.lkt:19399:9>' If_Result ada/nodes.lkt:19399
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Array_Subcomponent_Choice_Name;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 9384
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArraySubcomponentChoiceName.delta_aggregate_ancestor_expr_type
Fld := Libadalang.Implementation.Array_Subcomponent_Choice_Name_P_Delta_Aggregate_Ancestor_Expr_Type (Node => If_Result.Node);
--# end
--# expr-done 9385
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Defining_Name (Node => Fld.Node.Base_Type_Decl_F_Name, Info => Fld.Info);
--# expr-done 9386
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_1.Node);
--# end
--# expr-done 9387
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Subcomponent_Choice_Name_P_Ref_Var;
--# end
--# property-start ArraySubcomponentChoiceName.name_symbol ada/nodes.lkt:19401
pragma Warnings (Off, "is not referenced");
 function Array_Subcomponent_Choice_Name_P_Name_Symbol
  (Node : Bare_Array_Subcomponent_Choice_Name
  )
   return Symbol_Type
is
   Self : Bare_Array_Subcomponent_Choice_Name  := Bare_Array_Subcomponent_Choice_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Var_Expr_0 : Bare_Name;
Fld : Bare_Name;
Fld_1 : Symbol_Type;
Scope_Result : Symbol_Type;
Result_Var : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 9388 '<FieldAccess for name at nodes.lkt:19401:33>' Fld ada/nodes.lkt:19401
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Array_Subcomponent_Choice_Name_F_Name;
--# expr-done 9388
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind n Var_Expr_0
--# expr-start 9389 '<FieldAccess for name_symbol at nodes.lkt:19401:53>' Fld_1 ada/nodes.lkt:19401
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Var_Expr_0);
--# end
--# expr-done 9389
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Symbol;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Subcomponent_Choice_Name_P_Name_Symbol;
--# end
--# property-start ArraySubcomponentChoiceName.xref_equation ada/nodes.lkt:19403
pragma Warnings (Off, "is not referenced");
 function Array_Subcomponent_Choice_Name_P_Xref_Equation
  (Node : Bare_Array_Subcomponent_Choice_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Array_Subcomponent_Choice_Name  := Bare_Array_Subcomponent_Choice_Name (Node);
     Ent : Internal_Entity_Array_Subcomponent_Choice_Name :=
       Internal_Entity_Array_Subcomponent_Choice_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1280 with Inline_Always;
            procedure Finalizer_Scope_3196 with Inline_Always;
            procedure Finalizer_Scope_3197 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Var_Expr_3 : Internal_Entity_Name;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Fld_2 : Internal_Entity_Expr_Array_Access;
Index_2 : Integer;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_7 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_8 : Logic_Var;
Fld_9 : Internal_Entity_Name;
Fld_10 : Logic_Var;
Bind_Result_1 : Logic_Equation;
Fld_11 : Logic_Var;
Fld_12 : Internal_Entity_Name;
Fld_13 : Internal_Entity_Base_Type_Decl;
Fld_14 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_15 : Internal_Entity_Base_Type_Decl;
Fld_16 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
Fld_17 : Internal_Entity_Name;
Is_A : Boolean;
If_Result : Logic_Equation;
And_Pred_3 : Logic_Equation;
            procedure Finalizer_Scope_1280 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_1280;
            procedure Finalizer_Scope_3196 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3196;
            procedure Finalizer_Scope_3197 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3197;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9418 '<LogicBinaryOp And at nodes.lkt:19405:9>' And_Pred_3 ada/nodes.lkt:19405
--# expr-start 9403 '<LogicBinaryOp And at nodes.lkt:19405:9>' And_Pred_2 ada/nodes.lkt:19405
--# expr-start 9390 '<FieldAccess for name at nodes.lkt:19405:9>' Fld ada/nodes.lkt:19405
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Array_Subcomponent_Choice_Name_F_Name, Info => Ent.Info);
--# expr-done 9390
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind n Var_Expr_0
--# expr-start 9391 '<FieldAccess for sub_equation at nodes.lkt:19405:29>' Fld_1 ada/nodes.lkt:19405
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 9391
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3196;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19405:59") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
--# expr-start 9402 '<LogicAll at nodes.lkt:19407:13>' Logic_Boolean_Op ada/nodes.lkt:19407
--# expr-start 9401 '<Map at nodes.lkt:19407:13>' Map_Result ada/nodes.lkt:19407
   --# expr-start 9392 '<FieldAccess for suffix_exprs at nodes.lkt:19407:13>' Fld_2 ada/nodes.lkt:19407
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArraySubcomponentChoiceName.suffix_exprs
Fld_2 := Libadalang.Implementation.Array_Subcomponent_Choice_Name_P_Suffix_Exprs (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9392
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
         Index_2 := 0;
      declare
         Collection : constant Internal_Entity_Expr_Array_Access := Fld_2;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind a Item_1
               --# bind i Index_2
      --# expr-start 9400 '<LogicBinaryOp And at nodes.lkt:19410:17>' And_Pred_1 ada/nodes.lkt:19410
--# expr-start 9398 '<LogicBinaryOp And at nodes.lkt:19410:17>' And_Pred ada/nodes.lkt:19410
--# expr-start 9393 '<FieldAccess for sub_equation at nodes.lkt:19410:17>' Fld_3 ada/nodes.lkt:19410
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Item_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_1.Info);
--# end
--# expr-done 9393
--# expr-start 9397 '<Bind at nodes.lkt:19411:22>' Bind_Result ada/nodes.lkt:19411
--# expr-start 9394 '<FieldAccess for expected_type_var at nodes.lkt:19411:22>' Fld_4 ada/nodes.lkt:19411
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Item_1.Node);
--# expr-done 9394
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 9396 '<FieldAccess for index_type at nodes.lkt:19412:20>' Fld_6 ada/nodes.lkt:19412
--# expr-start 9395 '<FieldAccess for delta_aggregate_ancestor_expr_type at nodes.lkt:19412:20>' Fld_5 ada/nodes.lkt:19412
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArraySubcomponentChoiceName.delta_aggregate_ancestor_expr_type
Fld_5 := Libadalang.Implementation.Array_Subcomponent_Choice_Name_P_Delta_Aggregate_Ancestor_Expr_Type (Node => Self);
--# end
--# expr-done 9395
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.index_type
Fld_6 := Libadalang.Implementation.Base_Type_Decl_P_Index_Type (Node => Fld_5.Node, Dim => Index_2, Origin => Origin, E_Info => Fld_5.Info);
--# end
--# expr-done 9396
      Cast_Result := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19411:22") else null)); 
--# expr-done 9397
And_Pred := Create_And (Fld_3, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19410:17") else null)); 
--# expr-done 9398
--# expr-start 9399 '<FieldAccess for matches_expected_type at nodes.lkt:19413:22>' Fld_7 ada/nodes.lkt:19413
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_7 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Item_1.Node, Origin => Origin);
--# end
--# expr-done 9399
And_Pred_1 := Create_And (And_Pred, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19410:17") else null)); 
--# expr-done 9400
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_1;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3197;
               Index_2 := Index_2 + 1;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 9401
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19407:13") else null)); 
--# expr-done 9402
And_Pred_2 := Create_And (Result_Var, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19405:9") else null)); 
--# expr-done 9403
--# expr-start 9417 '<If at nodes.lkt:19419:14>' If_Result ada/nodes.lkt:19419
--# expr-start 9405 '<IsA DottedName at nodes.lkt:19419:17>' Is_A ada/nodes.lkt:19419
--# expr-start 9404 '<FieldAccess for name at nodes.lkt:19419:17>' Fld_17 ada/nodes.lkt:19419
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Name (Node => Ent.Node.Array_Subcomponent_Choice_Name_F_Name, Info => Ent.Info);
--# expr-done 9404
Is_A := Fld_17.Node /= null 
and then Fld_17.Node.Kind in Ada_Dotted_Name_Range; 
--# expr-done 9405
if Is_A then
   --# expr-start 9409 '<NPropagate at nodes.lkt:19420:14>' Bind_Result_1 ada/nodes.lkt:19420
--# expr-start 9407 '<FieldAccess for type_var at nodes.lkt:19420:57>' Fld_10 ada/nodes.lkt:19420
--# expr-start 9406 '<FieldAccess for name at nodes.lkt:19420:57>' Fld_9 ada/nodes.lkt:19420
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Name (Node => Ent.Node.Array_Subcomponent_Choice_Name_F_Name, Info => Ent.Info);
--# expr-done 9406
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_9.Node);
--# expr-done 9407
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
--# expr-start 9408 '<FieldAccess for type_var at nodes.lkt:19420:14>' Fld_8 ada/nodes.lkt:19420
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Ent.Node);
--# expr-done 9408
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
Bind_Result_1 := Solver.Create_Propagate (Fld_10, Fld_8, Logic_Functor_897'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19420:14") else null)); 
--# expr-done 9409
   If_Result := Bind_Result_1;
else
   --# expr-start 9416 '<Bind at nodes.lkt:19422:13>' Bind_Result_2 ada/nodes.lkt:19422
--# expr-start 9410 '<FieldAccess for type_var at nodes.lkt:19422:13>' Fld_11 ada/nodes.lkt:19422
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Ent.Node);
--# expr-done 9410
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
--# expr-start 9411 '<FieldAccess for name at nodes.lkt:19423:16>' Fld_12 ada/nodes.lkt:19423
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Name (Node => Ent.Node.Array_Subcomponent_Choice_Name_F_Name, Info => Ent.Info);
--# expr-done 9411
Var_Expr_3 := Fld_12;
if Var_Expr_3 /= No_Entity_Name then
   --# scope-start
   --# bind n Var_Expr_3
--# expr-start 9413 '<FieldAccess for comp_type at nodes.lkt:19424:24>' Fld_14 ada/nodes.lkt:19424
--# expr-start 9412 '<FieldAccess for name_designated_type at nodes.lkt:19424:24>' Fld_13 ada/nodes.lkt:19424
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_13 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 9412
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_14 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Fld_13.Node, Origin => Origin, E_Info => Fld_13.Info);
--# end
--# expr-done 9413
Scope_Result_1 := Fld_14;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 9415 '<FieldAccess for comp_type at nodes.lkt:19425:29>' Fld_16 ada/nodes.lkt:19425
--# expr-start 9414 '<FieldAccess for delta_aggregate_ancestor_expr_type at nodes.lkt:19425:29>' Fld_15 ada/nodes.lkt:19425
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArraySubcomponentChoiceName.delta_aggregate_ancestor_expr_type
Fld_15 := Libadalang.Implementation.Array_Subcomponent_Choice_Name_P_Delta_Aggregate_Ancestor_Expr_Type (Node => Self);
--# end
--# expr-done 9414
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_16 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Fld_15.Node, Origin => Origin, E_Info => Fld_15.Info);
--# end
--# expr-done 9415
   Result_Var_1 := Fld_16;
end if;
      Cast_Result_1 := Create_Internal_Entity
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_11, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19422:13") else null)); 
--# expr-done 9416
   If_Result := Bind_Result_2;
end if;
      Inc_Ref (If_Result);
--# expr-done 9417
And_Pred_3 := Create_And (And_Pred_2, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19405:9") else null)); 
--# expr-done 9418
         Property_Result := And_Pred_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1280;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1280;
                     Finalizer_Scope_3196;
                     Finalizer_Scope_3197;
            raise;
      end;
   return Property_Result;
end Array_Subcomponent_Choice_Name_P_Xref_Equation;
--# end
--# property-start ArraySubcomponentChoiceName.designated_type_impl ada/nodes.lkt:19429
pragma Warnings (Off, "is not referenced");
 function Array_Subcomponent_Choice_Name_P_Designated_Type_Impl
  (Node : Bare_Array_Subcomponent_Choice_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Array_Subcomponent_Choice_Name  := Bare_Array_Subcomponent_Choice_Name (Node);
     Ent : Internal_Entity_Array_Subcomponent_Choice_Name :=
       Internal_Entity_Array_Subcomponent_Choice_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_0 : Internal_Entity_Name;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 9419 '<FieldAccess for name at nodes.lkt:19430:9>' Fld ada/nodes.lkt:19430
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Array_Subcomponent_Choice_Name_F_Name, Info => Ent.Info);
--# expr-done 9419
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind n Var_Expr_0
--# expr-start 9420 '<FieldAccess for designated_type_impl at nodes.lkt:19431:20>' Fld_1 ada/nodes.lkt:19431
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 9420
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 9422 '<FieldAccess for comp_type at nodes.lkt:19432:25>' Fld_3 ada/nodes.lkt:19432
--# expr-start 9421 '<FieldAccess for delta_aggregate_ancestor_expr_type at nodes.lkt:19432:25>' Fld_2 ada/nodes.lkt:19432
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArraySubcomponentChoiceName.delta_aggregate_ancestor_expr_type
Fld_2 := Libadalang.Implementation.Array_Subcomponent_Choice_Name_P_Delta_Aggregate_Ancestor_Expr_Type (Node => Self);
--# end
--# expr-done 9421
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_3 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Fld_2.Node, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 9422
   Result_Var := Fld_3;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Subcomponent_Choice_Name_P_Designated_Type_Impl;
--# end
--# property-start ArraySubcomponentChoiceName.designated_env ada/nodes.lkt:19435
pragma Warnings (Off, "is not referenced");
 function Array_Subcomponent_Choice_Name_P_Designated_Env
  (Node : Bare_Array_Subcomponent_Choice_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Array_Subcomponent_Choice_Name  := Bare_Array_Subcomponent_Choice_Name (Node);
     Ent : Internal_Entity_Array_Subcomponent_Choice_Name :=
       Internal_Entity_Array_Subcomponent_Choice_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1282 with Inline_Always;
            procedure Finalizer_Scope_3200 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Bound_Include_Ud_Indexing : Boolean;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1282 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1282;
            procedure Finalizer_Scope_3200 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_3200;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 9423 '<FieldAccess for name at nodes.lkt:19436:9>' Fld ada/nodes.lkt:19436
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Array_Subcomponent_Choice_Name_F_Name, Info => Ent.Info);
--# expr-done 9423
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind n Var_Expr_0
--# expr-start 9425 '<FieldAccess for defining_env at nodes.lkt:19437:20>' Fld_2 ada/nodes.lkt:19437
--# expr-start 9424 '<FieldAccess for name_designated_type at nodes.lkt:19437:20>' Fld_1 ada/nodes.lkt:19437
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 9424
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld_1.Node, Origin => Origin, Include_Ud_Indexing => False, Dottable_Type => No_Bare_Ada_Node, E_Info => Fld_1.Info);
--# end
--# expr-done 9425
Scope_Result := Fld_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3200;
   Result_Var := Scope_Result;
else
   --# expr-start 9428 '<bind at nodes.lkt:19439:17>' Dyn_Var_Bind_Result ada/nodes.lkt:19439
Bound_Include_Ud_Indexing := False; 
--# expr-start 9427 '<FieldAccess for defining_env at nodes.lkt:19441:17>' Fld_4 ada/nodes.lkt:19441
--# expr-start 9426 '<FieldAccess for delta_aggregate_ancestor_expr_type at nodes.lkt:19441:17>' Fld_3 ada/nodes.lkt:19441
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArraySubcomponentChoiceName.delta_aggregate_ancestor_expr_type
Fld_3 := Libadalang.Implementation.Array_Subcomponent_Choice_Name_P_Delta_Aggregate_Ancestor_Expr_Type (Node => Self);
--# end
--# expr-done 9426
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld_3.Node, Origin => Origin, Include_Ud_Indexing => Bound_Include_Ud_Indexing, Dottable_Type => No_Bare_Ada_Node, E_Info => Fld_3.Info);
--# end
--# expr-done 9427
Dyn_Var_Bind_Result := Fld_4; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 9428
   Result_Var := Dyn_Var_Bind_Result;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1282;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1282;
                     Finalizer_Scope_3200;
            raise;
      end;
   return Property_Result;
end Array_Subcomponent_Choice_Name_P_Designated_Env;
--# end
   --
   --  Primitives for Bare_Attribute_Ref
   --
      procedure Initialize_Fields_For_Attribute_Ref
        (Self : Bare_Attribute_Ref
         ; Attribute_Ref_F_Prefix : Bare_Name
         ; Attribute_Ref_F_Attribute : Bare_Identifier
         ; Attribute_Ref_F_Args : Bare_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Attribute_Ref_F_Prefix := Attribute_Ref_F_Prefix;
            Self.Attribute_Ref_F_Attribute := Attribute_Ref_F_Attribute;
            Self.Attribute_Ref_F_Args := Attribute_Ref_F_Args;
      Self.Attribute_Ref_R_Ref_Var := Null_Var_Record;
      end Initialize_Fields_For_Attribute_Ref;
   function Attribute_Ref_F_Prefix
     (Node : Bare_Attribute_Ref) return Bare_Name
   is
   begin
         return Node.Attribute_Ref_F_Prefix;
   end;
   function Attribute_Ref_F_Attribute
     (Node : Bare_Attribute_Ref) return Bare_Identifier
   is
   begin
         return Node.Attribute_Ref_F_Attribute;
   end;
   function Attribute_Ref_F_Args
     (Node : Bare_Attribute_Ref) return Bare_Assoc_List
   is
   begin
         return Node.Attribute_Ref_F_Args;
   end;
--# property-start AttributeRef.ref_var ada/nodes.lkt:17039
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Ref_Var
  (Node : Bare_Attribute_Ref
  )
   return Logic_Var
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9429 '<FieldAccess for r_ref_var at nodes.lkt:17039:31>' Fld ada/nodes.lkt:17039
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Attribute_Ref_R_Ref_Var'Unrestricted_Access;
--# expr-done 9429
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Ref_Var;
--# end
--# property-start AttributeRef.relative_name ada/nodes.lkt:17041
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Relative_Name
  (Node : Bare_Attribute_Ref
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9431 '<FieldAccess for relative_name at nodes.lkt:17041:41>' Fld_1 ada/nodes.lkt:17041
--# expr-start 9430 '<FieldAccess for prefix at nodes.lkt:17041:41>' Fld ada/nodes.lkt:17041
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9430
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 9431
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Relative_Name;
--# end
--# property-start AttributeRef.is_constant ada/nodes.lkt:17043
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Is_Constant
  (Node : Bare_Attribute_Ref
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Is_Constant;
--# end
--# property-start AttributeRef.designated_type_impl ada/nodes.lkt:17046
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Designated_Type_Impl
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_243 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Classwide_Type_Decl;
Scope_Result : Internal_Entity_Classwide_Type_Decl;
Result_Var : Internal_Entity_Classwide_Type_Decl;
Fld_3 : Internal_Entity_Name;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Internal_Entity_Discrete_Base_Subtype_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_6 : Bare_Identifier;
Fld_7 : Symbol_Type;
Sym : Symbol_Type;
Is_Equal : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_8 : Bare_Identifier;
Fld_9 : Symbol_Type;
Sym_1 : Symbol_Type;
Is_Equal_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9447 '<If at nodes.lkt:17047:9>' If_Result_1 ada/nodes.lkt:17047
--# expr-start 9435 '<Eq at nodes.lkt:17047:12>' Is_Equal_1 ada/nodes.lkt:17047
--# expr-start 9433 '<FieldAccess for sym at nodes.lkt:17047:12>' Fld_9 ada/nodes.lkt:17047
--# expr-start 9432 '<FieldAccess for attribute at nodes.lkt:17047:12>' Fld_8 ada/nodes.lkt:17047
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.Attribute_Ref_F_Attribute;
--# expr-done 9432
      if Fld_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld_9 := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Fld_8);
--# end
--# expr-done 9433
--# expr-start 9434 '<Symbol Class at nodes.lkt:17047:36>' Sym_1 ada/nodes.lkt:17047
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Class); 
--# expr-done 9434
Is_Equal_1 := Fld_9 = Sym_1; 
--# expr-done 9435
if Is_Equal_1 then
--# expr-start 9437 '<FieldAccess for designated_type_impl at nodes.lkt:17048:14>' Fld_1 ada/nodes.lkt:17048
--# expr-start 9436 '<FieldAccess for prefix at nodes.lkt:17048:14>' Fld ada/nodes.lkt:17048
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9436
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Fld.Node, Env => Env, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 9437
Var_Expr_243 := Fld_1;
if Var_Expr_243 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 9438 '<FieldAccess for classwide_type at nodes.lkt:17048:14>' Fld_2 ada/nodes.lkt:17048
      if Var_Expr_243.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Var_Expr_243.Node, E_Info => Var_Expr_243.Info);
--# end
--# expr-done 9438
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Classwide_Type_Decl;
end if;
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   If_Result_1 := Cast_Result_1;
else
   --# expr-start 9446 '<If at nodes.lkt:17047:9>' If_Result ada/nodes.lkt:17047
--# expr-start 9442 '<Eq at nodes.lkt:17049:14>' Is_Equal ada/nodes.lkt:17049
--# expr-start 9440 '<FieldAccess for sym at nodes.lkt:17049:14>' Fld_7 ada/nodes.lkt:17049
--# expr-start 9439 '<FieldAccess for attribute at nodes.lkt:17049:14>' Fld_6 ada/nodes.lkt:17049
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Attribute_Ref_F_Attribute;
--# expr-done 9439
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld_7 := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Fld_6);
--# end
--# expr-done 9440
--# expr-start 9441 '<Symbol Base at nodes.lkt:17049:38>' Sym ada/nodes.lkt:17049
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Base); 
--# expr-done 9441
Is_Equal := Fld_7 = Sym; 
--# expr-done 9442
if Is_Equal then
--# expr-start 9445 '<FieldAccess for scalar_base_subtype at nodes.lkt:17050:14>' Fld_5 ada/nodes.lkt:17050
--# expr-start 9444 '<FieldAccess for designated_type_impl at nodes.lkt:17050:14>' Fld_4 ada/nodes.lkt:17050
--# expr-start 9443 '<FieldAccess for prefix at nodes.lkt:17050:14>' Fld_3 ada/nodes.lkt:17050
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9443
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Fld_3.Node, Env => Env, Origin => Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 9444
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.scalar_base_subtype
Fld_5 := Libadalang.Implementation.Base_Type_Decl_P_Scalar_Base_Subtype (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 9445
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   If_Result := Cast_Result;
else
   If_Result := No_Entity_Base_Type_Decl;
end if;
--# expr-done 9446
   If_Result_1 := If_Result;
end if;
--# expr-done 9447
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Designated_Type_Impl;
--# end
--# property-start AttributeRef.has_context_free_type ada/nodes.lkt:17053
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Has_Context_Free_Type
  (Node : Bare_Attribute_Ref
  )
   return Boolean
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9449 '<Not at nodes.lkt:17053:41>' Not_Val ada/nodes.lkt:17053
--# expr-start 9448 '<FieldAccess for is_access_attr at nodes.lkt:17053:45>' Fld ada/nodes.lkt:17053
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.is_access_attr
Fld := Libadalang.Implementation.Attribute_Ref_P_Is_Access_Attr (Node => Self);
--# end
--# expr-done 9448
Not_Val := not (Fld); 
--# expr-done 9449
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Has_Context_Free_Type;
--# end
--# property-start AttributeRef.is_access_attr ada/nodes.lkt:17055
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Is_Access_Attr
  (Node : Bare_Attribute_Ref
  )
   return Boolean
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Identifier;
Fld_1 : Symbol_Type;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 9451 '<FieldAccess for name_symbol at nodes.lkt:17056:9>' Fld_1 ada/nodes.lkt:17056
--# expr-start 9450 '<FieldAccess for attribute at nodes.lkt:17056:9>' Fld ada/nodes.lkt:17056
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Attribute_Ref_F_Attribute;
--# expr-done 9450
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld);
--# end
--# expr-done 9451
--# expr-start 9452 '<Symbol Access at nodes.lkt:17056:41>' Sym ada/nodes.lkt:17056
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Access); 
--# expr-done 9452
Is_Equal_2 := Fld_1 = Sym; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 9453 '<Symbol Unchecked_Access at nodes.lkt:17057:15>' Sym_1 ada/nodes.lkt:17057
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unchecked_Access); 
--# expr-done 9453
Is_Equal_1 := Fld_1 = Sym_1; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 9454 '<Symbol Unrestricted_Access at nodes.lkt:17058:15>' Sym_2 ada/nodes.lkt:17058
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unrestricted_Access); 
--# expr-done 9454
Is_Equal := Fld_1 = Sym_2; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Is_Access_Attr;
--# end
--# property-start AttributeRef.designated_env ada/nodes.lkt:17061
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Designated_Env
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1162 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Lexical_Env := Empty_Env;
Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Base_Subp_Spec;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Lexical_Env := Empty_Env;
Fld_5 : Internal_Entity_Identifier;
Sym : Symbol_Type;
Fld_6 : Boolean;
If_Result_1 : Lexical_Env := Empty_Env;
Fld_7 : Boolean;
Fld_8 : Internal_Entity_Identifier;
Sym_1 : Symbol_Type;
Fld_9 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1162 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Node_Parents);
                     Dec_Ref (Fld_4);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_3);
            end Finalizer_Scope_1162;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9474 '<If at nodes.lkt:17062:9>' If_Result_3 ada/nodes.lkt:17062
--# expr-start 9459 '<BooleanBinaryOp Or at nodes.lkt:17062:12>' If_Result_2 ada/nodes.lkt:17062
--# expr-start 9455 '<FieldAccess for is_access_attr at nodes.lkt:17062:12>' Fld_7 ada/nodes.lkt:17062
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.is_access_attr
Fld_7 := Libadalang.Implementation.Attribute_Ref_P_Is_Access_Attr (Node => Ent.Node);
--# end
--# expr-done 9455
if Fld_7 then
   If_Result_2 := True;
else
   --# expr-start 9458 '<FieldAccess for name_is at nodes.lkt:17062:37>' Fld_9 ada/nodes.lkt:17062
--# expr-start 9456 '<FieldAccess for attribute at nodes.lkt:17062:37>' Fld_8 ada/nodes.lkt:17062
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Identifier (Node => Ent.Node.Attribute_Ref_F_Attribute, Info => Ent.Info);
--# expr-done 9456
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9457 '<Symbol Old at nodes.lkt:17062:60>' Sym_1 ada/nodes.lkt:17062
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Old); 
--# expr-done 9457
--# property-call-start Name.name_is
Fld_9 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_8.Node, Sym => Sym_1);
--# end
--# expr-done 9458
   If_Result_2 := Fld_9;
end if;
--# expr-done 9459
if If_Result_2 then
   --# expr-start 9461 '<FieldAccess for designated_env at nodes.lkt:17063:14>' Fld_1 ada/nodes.lkt:17063
--# expr-start 9460 '<FieldAccess for prefix at nodes.lkt:17063:14>' Fld ada/nodes.lkt:17063
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9460
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld.Node, Env => Env, Origin => Origin, No_Visibility => No_Visibility, E_Info => Fld.Info);
--# end
--# expr-done 9461
   If_Result_3 := Fld_1;
else
   --# expr-start 9473 '<If at nodes.lkt:17062:9>' If_Result_1 ada/nodes.lkt:17062
--# expr-start 9464 '<FieldAccess for name_is at nodes.lkt:17064:14>' Fld_6 ada/nodes.lkt:17064
--# expr-start 9462 '<FieldAccess for attribute at nodes.lkt:17064:14>' Fld_5 ada/nodes.lkt:17064
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Identifier (Node => Ent.Node.Attribute_Ref_F_Attribute, Info => Ent.Info);
--# expr-done 9462
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9463 '<Symbol Result at nodes.lkt:17064:37>' Sym ada/nodes.lkt:17064
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Result); 
--# expr-done 9463
--# property-call-start Name.name_is
Fld_6 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_5.Node, Sym => Sym);
--# end
--# expr-done 9464
if Fld_6 then
   --# expr-start 9472 '<FieldAccess for defining_env at nodes.lkt:17066:13>' Fld_4 ada/nodes.lkt:17066
--# expr-start 9471 '<FieldAccess for return_type at nodes.lkt:17066:13>' Fld_3 ada/nodes.lkt:17066
--# expr-start 9470 '<FieldAccess for subp_spec_or_null at nodes.lkt:17066:13>' Fld_2 ada/nodes.lkt:17066
--# expr-start 9469 '<Cast to BasicDecl at nodes.lkt:17066:13>' Cast_Result ada/nodes.lkt:17066
--# expr-start 9468 '<as_entity at nodes.lkt:17066:13>' If_Result ada/nodes.lkt:17066
--# expr-start 9467 '<Find at nodes.lkt:17066:13>' Find_Result ada/nodes.lkt:17066
   --# expr-start 9465 '<FieldAccess for parents at nodes.lkt:17066:13>' Node_Parents ada/nodes.lkt:17066
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 9465
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 9466 '<IsA BasicSubpDecl, BaseSubpBody at nodes.lkt:17066:40>' Is_A ada/nodes.lkt:17066
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Basic_Subp_Decl | Ada_Base_Subp_Body; 
--# expr-done 9466
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 9467
Is_Null := Find_Result = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Find_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 9468
   if If_Result.Node = null
      or else If_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => If_Result.Node,
         Info => If_Result.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 9469
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 9470
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_3 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Fld_2.Node, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 9471
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld_3.Node, Origin => Origin, Include_Ud_Indexing => False, Dottable_Type => No_Bare_Ada_Node, E_Info => Fld_3.Info);
--# end
--# expr-done 9472
   If_Result_1 := Fld_4;
else
   If_Result_1 := Empty_Env;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 9473
   If_Result_3 := If_Result_1;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 9474
         Property_Result := If_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1162;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1162;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Designated_Env;
--# end
--# property-start AttributeRef.attribute_subprogram ada/nodes.lkt:17076
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Attribute_Subprogram
  (Node : Bare_Attribute_Ref
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_244 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Identifier;
Fld_3 : Symbol_Type;
Fld_4 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 9476 '<FieldAccess for name_designated_type at nodes.lkt:17077:9>' Fld_1 ada/nodes.lkt:17077
--# expr-start 9475 '<FieldAccess for prefix at nodes.lkt:17077:9>' Fld ada/nodes.lkt:17077
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9475
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 9476
Var_Expr_244 := Fld_1;
if Var_Expr_244 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 9479 '<FieldAccess for attribute_subprogram at nodes.lkt:17077:9>' Fld_4 ada/nodes.lkt:17077
      if Var_Expr_244.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9478 '<FieldAccess for name_symbol at nodes.lkt:17078:13>' Fld_3 ada/nodes.lkt:17078
--# expr-start 9477 '<FieldAccess for attribute at nodes.lkt:17078:13>' Fld_2 ada/nodes.lkt:17078
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Identifier (Node => Ent.Node.Attribute_Ref_F_Attribute, Info => Ent.Info);
--# expr-done 9477
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_2.Node);
--# end
--# expr-done 9478
--# property-call-start BaseTypeDecl.attribute_subprogram
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Attribute_Subprogram (Node => Var_Expr_244.Node, Attr_Name => Fld_3, E_Info => Var_Expr_244.Info);
--# end
--# expr-done 9479
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Attribute_Subprogram;
--# end
--# property-start AttributeRef.xref_equation ada/nodes.lkt:17082
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Xref_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1164 with Inline_Always;
            procedure Finalizer_Scope_3204 with Inline_Always;
            procedure Finalizer_Scope_3205 with Inline_Always;
      Local_Rel_Name : Symbol_Type;
Match_0 : Internal_Entity_Call_Expr;
Match_1 : Internal_Entity_Name;
Fld : Internal_Entity_Identifier;
Fld_1 : Symbol_Type;
Fld_2 : Logic_Equation;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Equation;
Fld_5 : Logic_Equation;
Fld_6 : Logic_Equation;
Fld_7 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Fld_8 : Logic_Equation;
Fld_9 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Fld_10 : Logic_Equation;
Fld_11 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Fld_12 : Logic_Equation;
Fld_13 : Logic_Equation;
Fld_14 : Logic_Equation;
Fld_15 : Logic_Equation;
Fld_16 : Logic_Equation;
Fld_17 : Logic_Equation;
Fld_18 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Fld_19 : Logic_Equation;
Fld_20 : Logic_Equation;
Fld_21 : Logic_Equation;
Fld_22 : Logic_Equation;
Fld_23 : Internal_Entity_Name;
Fld_24 : Logic_Equation;
Fld_25 : Internal_Entity_Name;
Fld_26 : Logic_Equation;
Fld_27 : Logic_Var;
Fld_28 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_29 : Logic_Var;
Fld_30 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_31 : Internal_Entity_Name;
Fld_32 : Logic_Equation;
Fld_33 : Logic_Var;
Fld_34 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_35 : Internal_Entity_Name;
Fld_36 : Logic_Equation;
Fld_37 : Logic_Var;
Fld_38 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_39 : Logic_Var;
Fld_40 : Internal_Entity_Base_Type_Decl;
Cast_Result_7 : Internal_Entity;
Bind_Result_3 : Logic_Equation;
Fld_41 : Logic_Equation;
Fld_42 : Logic_Equation;
Fld_43 : Logic_Equation;
Fld_44 : Internal_Entity_Name;
Fld_45 : Logic_Equation;
Fld_46 : Logic_Var;
Fld_47 : Internal_Entity_Base_Type_Decl;
Cast_Result_8 : Internal_Entity;
Bind_Result_4 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_48 : Internal_Entity_Name;
Fld_49 : Logic_Equation;
Fld_50 : Logic_Equation;
Match_Prefix : Internal_Entity_Name;
Cast_Result_9 : Internal_Entity_Call_Expr;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_10 : Internal_Entity_Name;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Match_Result : Logic_Equation;
Fld_51 : Logic_Var;
Fld_52 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_53 : Internal_Entity_Name;
Fld_54 : Logic_Equation;
Fld_55 : Logic_Var;
Fld_56 : Internal_Entity_Base_Type_Decl;
Cast_Result_11 : Internal_Entity;
Bind_Result_5 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Fld_57 : Logic_Equation;
Fld_58 : Logic_Equation;
Fld_59 : Logic_Equation;
Fld_60 : Logic_Var;
Sym : Symbol_Type;
Fld_61 : Internal_Entity;
Bind_Result_6 : Logic_Equation;
Fld_62 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_12 : Internal_Entity;
Bind_Result_7 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_63 : Logic_Equation;
Fld_64 : Logic_Equation;
Fld_65 : Logic_Equation;
Sym_1 : Symbol_Type;
Is_Equal : Boolean;
If_Result : Logic_Equation;
Sym_2 : Symbol_Type;
Is_Equal_1 : Boolean;
If_Result_1 : Logic_Equation;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Is_Equal_2 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Logic_Equation;
Sym_5 : Symbol_Type;
Is_Equal_4 : Boolean;
If_Result_4 : Logic_Equation;
Sym_6 : Symbol_Type;
Is_Equal_5 : Boolean;
If_Result_5 : Logic_Equation;
Sym_7 : Symbol_Type;
Is_Equal_6 : Boolean;
If_Result_6 : Logic_Equation;
Sym_8 : Symbol_Type;
Is_Equal_7 : Boolean;
If_Result_7 : Logic_Equation;
Sym_9 : Symbol_Type;
Is_Equal_8 : Boolean;
If_Result_8 : Logic_Equation;
Sym_10 : Symbol_Type;
Is_Equal_9 : Boolean;
If_Result_9 : Logic_Equation;
Sym_11 : Symbol_Type;
Sym_12 : Symbol_Type;
Is_Equal_10 : Boolean;
Is_Equal_11 : Boolean;
If_Result_10 : Boolean;
If_Result_11 : Logic_Equation;
Sym_13 : Symbol_Type;
Is_Equal_12 : Boolean;
If_Result_12 : Logic_Equation;
Sym_14 : Symbol_Type;
Sym_15 : Symbol_Type;
Sym_16 : Symbol_Type;
Is_Equal_13 : Boolean;
Is_Equal_14 : Boolean;
If_Result_13 : Boolean;
Is_Equal_15 : Boolean;
If_Result_14 : Boolean;
If_Result_15 : Logic_Equation;
Sym_17 : Symbol_Type;
Is_Equal_16 : Boolean;
If_Result_16 : Logic_Equation;
Sym_18 : Symbol_Type;
Is_Equal_17 : Boolean;
If_Result_17 : Logic_Equation;
Sym_19 : Symbol_Type;
Sym_20 : Symbol_Type;
Is_Equal_18 : Boolean;
Is_Equal_19 : Boolean;
If_Result_18 : Boolean;
If_Result_19 : Logic_Equation;
Sym_21 : Symbol_Type;
Sym_22 : Symbol_Type;
Sym_23 : Symbol_Type;
Sym_24 : Symbol_Type;
Sym_25 : Symbol_Type;
Sym_26 : Symbol_Type;
Sym_27 : Symbol_Type;
Sym_28 : Symbol_Type;
Sym_29 : Symbol_Type;
Sym_30 : Symbol_Type;
Sym_31 : Symbol_Type;
Sym_32 : Symbol_Type;
Sym_33 : Symbol_Type;
Sym_34 : Symbol_Type;
Sym_35 : Symbol_Type;
Sym_36 : Symbol_Type;
Sym_37 : Symbol_Type;
Sym_38 : Symbol_Type;
Sym_39 : Symbol_Type;
Sym_40 : Symbol_Type;
Sym_41 : Symbol_Type;
Sym_42 : Symbol_Type;
Sym_43 : Symbol_Type;
Sym_44 : Symbol_Type;
Sym_45 : Symbol_Type;
Sym_46 : Symbol_Type;
Sym_47 : Symbol_Type;
Sym_48 : Symbol_Type;
Sym_49 : Symbol_Type;
Sym_50 : Symbol_Type;
Is_Equal_20 : Boolean;
Is_Equal_21 : Boolean;
If_Result_20 : Boolean;
Is_Equal_22 : Boolean;
If_Result_21 : Boolean;
Is_Equal_23 : Boolean;
If_Result_22 : Boolean;
Is_Equal_24 : Boolean;
If_Result_23 : Boolean;
Is_Equal_25 : Boolean;
If_Result_24 : Boolean;
Is_Equal_26 : Boolean;
If_Result_25 : Boolean;
Is_Equal_27 : Boolean;
If_Result_26 : Boolean;
Is_Equal_28 : Boolean;
If_Result_27 : Boolean;
Is_Equal_29 : Boolean;
If_Result_28 : Boolean;
Is_Equal_30 : Boolean;
If_Result_29 : Boolean;
Is_Equal_31 : Boolean;
If_Result_30 : Boolean;
Is_Equal_32 : Boolean;
If_Result_31 : Boolean;
Is_Equal_33 : Boolean;
If_Result_32 : Boolean;
Is_Equal_34 : Boolean;
If_Result_33 : Boolean;
Is_Equal_35 : Boolean;
If_Result_34 : Boolean;
Is_Equal_36 : Boolean;
If_Result_35 : Boolean;
Is_Equal_37 : Boolean;
If_Result_36 : Boolean;
Is_Equal_38 : Boolean;
If_Result_37 : Boolean;
Is_Equal_39 : Boolean;
If_Result_38 : Boolean;
Is_Equal_40 : Boolean;
If_Result_39 : Boolean;
Is_Equal_41 : Boolean;
If_Result_40 : Boolean;
Is_Equal_42 : Boolean;
If_Result_41 : Boolean;
Is_Equal_43 : Boolean;
If_Result_42 : Boolean;
Is_Equal_44 : Boolean;
If_Result_43 : Boolean;
Is_Equal_45 : Boolean;
If_Result_44 : Boolean;
Is_Equal_46 : Boolean;
If_Result_45 : Boolean;
Is_Equal_47 : Boolean;
If_Result_46 : Boolean;
Is_Equal_48 : Boolean;
If_Result_47 : Boolean;
Is_Equal_49 : Boolean;
If_Result_48 : Boolean;
If_Result_49 : Logic_Equation;
Sym_51 : Symbol_Type;
Is_Equal_50 : Boolean;
If_Result_50 : Logic_Equation;
Sym_52 : Symbol_Type;
Sym_53 : Symbol_Type;
Sym_54 : Symbol_Type;
Sym_55 : Symbol_Type;
Sym_56 : Symbol_Type;
Sym_57 : Symbol_Type;
Sym_58 : Symbol_Type;
Sym_59 : Symbol_Type;
Sym_60 : Symbol_Type;
Sym_61 : Symbol_Type;
Sym_62 : Symbol_Type;
Sym_63 : Symbol_Type;
Sym_64 : Symbol_Type;
Sym_65 : Symbol_Type;
Sym_66 : Symbol_Type;
Sym_67 : Symbol_Type;
Sym_68 : Symbol_Type;
Is_Equal_51 : Boolean;
Is_Equal_52 : Boolean;
If_Result_51 : Boolean;
Is_Equal_53 : Boolean;
If_Result_52 : Boolean;
Is_Equal_54 : Boolean;
If_Result_53 : Boolean;
Is_Equal_55 : Boolean;
If_Result_54 : Boolean;
Is_Equal_56 : Boolean;
If_Result_55 : Boolean;
Is_Equal_57 : Boolean;
If_Result_56 : Boolean;
Is_Equal_58 : Boolean;
If_Result_57 : Boolean;
Is_Equal_59 : Boolean;
If_Result_58 : Boolean;
Is_Equal_60 : Boolean;
If_Result_59 : Boolean;
Is_Equal_61 : Boolean;
If_Result_60 : Boolean;
Is_Equal_62 : Boolean;
If_Result_61 : Boolean;
Is_Equal_63 : Boolean;
If_Result_62 : Boolean;
Is_Equal_64 : Boolean;
If_Result_63 : Boolean;
Is_Equal_65 : Boolean;
If_Result_64 : Boolean;
Is_Equal_66 : Boolean;
If_Result_65 : Boolean;
Is_Equal_67 : Boolean;
If_Result_66 : Boolean;
If_Result_67 : Logic_Equation;
Sym_69 : Symbol_Type;
Sym_70 : Symbol_Type;
Is_Equal_68 : Boolean;
Is_Equal_69 : Boolean;
If_Result_68 : Boolean;
If_Result_69 : Logic_Equation;
Sym_71 : Symbol_Type;
Sym_72 : Symbol_Type;
Is_Equal_70 : Boolean;
Is_Equal_71 : Boolean;
If_Result_70 : Boolean;
If_Result_71 : Logic_Equation;
Sym_73 : Symbol_Type;
Is_Equal_72 : Boolean;
If_Result_72 : Logic_Equation;
Sym_74 : Symbol_Type;
Is_Equal_73 : Boolean;
If_Result_73 : Logic_Equation;
Sym_75 : Symbol_Type;
Is_Equal_74 : Boolean;
If_Result_74 : Logic_Equation;
Sym_76 : Symbol_Type;
Sym_77 : Symbol_Type;
Sym_78 : Symbol_Type;
Sym_79 : Symbol_Type;
Sym_80 : Symbol_Type;
Sym_81 : Symbol_Type;
Sym_82 : Symbol_Type;
Sym_83 : Symbol_Type;
Sym_84 : Symbol_Type;
Sym_85 : Symbol_Type;
Is_Equal_75 : Boolean;
Is_Equal_76 : Boolean;
If_Result_75 : Boolean;
Is_Equal_77 : Boolean;
If_Result_76 : Boolean;
Is_Equal_78 : Boolean;
If_Result_77 : Boolean;
Is_Equal_79 : Boolean;
If_Result_78 : Boolean;
Is_Equal_80 : Boolean;
If_Result_79 : Boolean;
Is_Equal_81 : Boolean;
If_Result_80 : Boolean;
Is_Equal_82 : Boolean;
If_Result_81 : Boolean;
Is_Equal_83 : Boolean;
If_Result_82 : Boolean;
Is_Equal_84 : Boolean;
If_Result_83 : Boolean;
If_Result_84 : Logic_Equation;
Sym_86 : Symbol_Type;
Sym_87 : Symbol_Type;
Is_Equal_85 : Boolean;
Is_Equal_86 : Boolean;
If_Result_85 : Boolean;
If_Result_86 : Logic_Equation;
Sym_88 : Symbol_Type;
Is_Equal_87 : Boolean;
If_Result_87 : Logic_Equation;
Sym_89 : Symbol_Type;
Sym_90 : Symbol_Type;
Sym_91 : Symbol_Type;
Is_Equal_88 : Boolean;
Is_Equal_89 : Boolean;
If_Result_88 : Boolean;
Is_Equal_90 : Boolean;
If_Result_89 : Boolean;
If_Result_90 : Logic_Equation;
Sym_92 : Symbol_Type;
Is_Equal_91 : Boolean;
If_Result_91 : Logic_Equation;
Sym_93 : Symbol_Type;
Is_Equal_92 : Boolean;
If_Result_92 : Logic_Equation;
Sym_94 : Symbol_Type;
Is_Equal_93 : Boolean;
If_Result_93 : Logic_Equation;
Sym_95 : Symbol_Type;
Is_Equal_94 : Boolean;
If_Result_94 : Logic_Equation;
Sym_96 : Symbol_Type;
Sym_97 : Symbol_Type;
Sym_98 : Symbol_Type;
Is_Equal_95 : Boolean;
Is_Equal_96 : Boolean;
If_Result_95 : Boolean;
Is_Equal_97 : Boolean;
If_Result_96 : Boolean;
If_Result_97 : Logic_Equation;
Sym_99 : Symbol_Type;
Sym_100 : Symbol_Type;
Sym_101 : Symbol_Type;
Sym_102 : Symbol_Type;
Sym_103 : Symbol_Type;
Sym_104 : Symbol_Type;
Sym_105 : Symbol_Type;
Is_Equal_98 : Boolean;
Is_Equal_99 : Boolean;
If_Result_98 : Boolean;
Is_Equal_100 : Boolean;
If_Result_99 : Boolean;
Is_Equal_101 : Boolean;
If_Result_100 : Boolean;
Is_Equal_102 : Boolean;
If_Result_101 : Boolean;
Is_Equal_103 : Boolean;
If_Result_102 : Boolean;
Is_Equal_104 : Boolean;
If_Result_103 : Boolean;
If_Result_104 : Logic_Equation;
Sym_106 : Symbol_Type;
Sym_107 : Symbol_Type;
Is_Equal_105 : Boolean;
Is_Equal_106 : Boolean;
If_Result_105 : Boolean;
If_Result_106 : Logic_Equation;
Sym_108 : Symbol_Type;
Sym_109 : Symbol_Type;
Sym_110 : Symbol_Type;
Sym_111 : Symbol_Type;
Sym_112 : Symbol_Type;
Sym_113 : Symbol_Type;
Sym_114 : Symbol_Type;
Sym_115 : Symbol_Type;
Sym_116 : Symbol_Type;
Sym_117 : Symbol_Type;
Sym_118 : Symbol_Type;
Sym_119 : Symbol_Type;
Sym_120 : Symbol_Type;
Sym_121 : Symbol_Type;
Sym_122 : Symbol_Type;
Sym_123 : Symbol_Type;
Sym_124 : Symbol_Type;
Sym_125 : Symbol_Type;
Sym_126 : Symbol_Type;
Sym_127 : Symbol_Type;
Sym_128 : Symbol_Type;
Sym_129 : Symbol_Type;
Sym_130 : Symbol_Type;
Sym_131 : Symbol_Type;
Sym_132 : Symbol_Type;
Sym_133 : Symbol_Type;
Sym_134 : Symbol_Type;
Sym_135 : Symbol_Type;
Sym_136 : Symbol_Type;
Sym_137 : Symbol_Type;
Sym_138 : Symbol_Type;
Sym_139 : Symbol_Type;
Sym_140 : Symbol_Type;
Sym_141 : Symbol_Type;
Sym_142 : Symbol_Type;
Sym_143 : Symbol_Type;
Sym_144 : Symbol_Type;
Is_Equal_107 : Boolean;
Is_Equal_108 : Boolean;
If_Result_107 : Boolean;
Is_Equal_109 : Boolean;
If_Result_108 : Boolean;
Is_Equal_110 : Boolean;
If_Result_109 : Boolean;
Is_Equal_111 : Boolean;
If_Result_110 : Boolean;
Is_Equal_112 : Boolean;
If_Result_111 : Boolean;
Is_Equal_113 : Boolean;
If_Result_112 : Boolean;
Is_Equal_114 : Boolean;
If_Result_113 : Boolean;
Is_Equal_115 : Boolean;
If_Result_114 : Boolean;
Is_Equal_116 : Boolean;
If_Result_115 : Boolean;
Is_Equal_117 : Boolean;
If_Result_116 : Boolean;
Is_Equal_118 : Boolean;
If_Result_117 : Boolean;
Is_Equal_119 : Boolean;
If_Result_118 : Boolean;
Is_Equal_120 : Boolean;
If_Result_119 : Boolean;
Is_Equal_121 : Boolean;
If_Result_120 : Boolean;
Is_Equal_122 : Boolean;
If_Result_121 : Boolean;
Is_Equal_123 : Boolean;
If_Result_122 : Boolean;
Is_Equal_124 : Boolean;
If_Result_123 : Boolean;
Is_Equal_125 : Boolean;
If_Result_124 : Boolean;
Is_Equal_126 : Boolean;
If_Result_125 : Boolean;
Is_Equal_127 : Boolean;
If_Result_126 : Boolean;
Is_Equal_128 : Boolean;
If_Result_127 : Boolean;
Is_Equal_129 : Boolean;
If_Result_128 : Boolean;
Is_Equal_130 : Boolean;
If_Result_129 : Boolean;
Is_Equal_131 : Boolean;
If_Result_130 : Boolean;
Is_Equal_132 : Boolean;
If_Result_131 : Boolean;
Is_Equal_133 : Boolean;
If_Result_132 : Boolean;
Is_Equal_134 : Boolean;
If_Result_133 : Boolean;
Is_Equal_135 : Boolean;
If_Result_134 : Boolean;
Is_Equal_136 : Boolean;
If_Result_135 : Boolean;
Is_Equal_137 : Boolean;
If_Result_136 : Boolean;
Is_Equal_138 : Boolean;
If_Result_137 : Boolean;
Is_Equal_139 : Boolean;
If_Result_138 : Boolean;
Is_Equal_140 : Boolean;
If_Result_139 : Boolean;
Is_Equal_141 : Boolean;
If_Result_140 : Boolean;
Is_Equal_142 : Boolean;
If_Result_141 : Boolean;
Is_Equal_143 : Boolean;
If_Result_142 : Boolean;
If_Result_143 : Logic_Equation;
Sym_145 : Symbol_Type;
Sym_146 : Symbol_Type;
Sym_147 : Symbol_Type;
Sym_148 : Symbol_Type;
Is_Equal_144 : Boolean;
Is_Equal_145 : Boolean;
If_Result_144 : Boolean;
Is_Equal_146 : Boolean;
If_Result_145 : Boolean;
Is_Equal_147 : Boolean;
If_Result_146 : Boolean;
If_Result_147 : Logic_Equation;
Let_Result_2 : Logic_Equation;
            procedure Finalizer_Scope_1164 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Fld_20);
                     Dec_Ref (Fld_21);
                     Dec_Ref (Fld_22);
                     Dec_Ref (Fld_24);
                     Dec_Ref (Fld_26);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_32);
                     Dec_Ref (Fld_34);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_36);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (Fld_41);
                     Dec_Ref (Fld_42);
                     Dec_Ref (Fld_43);
                     Dec_Ref (Fld_45);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Match_Result);
                     Dec_Ref (Fld_52);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_54);
                     Dec_Ref (Bind_Result_5);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Fld_57);
                     Dec_Ref (Fld_58);
                     Dec_Ref (Fld_59);
                     Dec_Ref (Bind_Result_6);
                     Dec_Ref (Bind_Result_7);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Fld_63);
                     Dec_Ref (Fld_64);
                     Dec_Ref (Fld_65);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (If_Result_7);
                     Dec_Ref (If_Result_8);
                     Dec_Ref (If_Result_9);
                     Dec_Ref (If_Result_11);
                     Dec_Ref (If_Result_12);
                     Dec_Ref (If_Result_15);
                     Dec_Ref (If_Result_16);
                     Dec_Ref (If_Result_17);
                     Dec_Ref (If_Result_19);
                     Dec_Ref (If_Result_49);
                     Dec_Ref (If_Result_50);
                     Dec_Ref (If_Result_67);
                     Dec_Ref (If_Result_69);
                     Dec_Ref (If_Result_71);
                     Dec_Ref (If_Result_72);
                     Dec_Ref (If_Result_73);
                     Dec_Ref (If_Result_74);
                     Dec_Ref (If_Result_84);
                     Dec_Ref (If_Result_86);
                     Dec_Ref (If_Result_87);
                     Dec_Ref (If_Result_90);
                     Dec_Ref (If_Result_91);
                     Dec_Ref (If_Result_92);
                     Dec_Ref (If_Result_93);
                     Dec_Ref (If_Result_94);
                     Dec_Ref (If_Result_97);
                     Dec_Ref (If_Result_104);
                     Dec_Ref (If_Result_106);
                     Dec_Ref (If_Result_143);
                     Dec_Ref (If_Result_147);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1164;
            procedure Finalizer_Scope_3204 is
            begin
                     Dec_Ref (Fld_49);
            end Finalizer_Scope_3204;
            procedure Finalizer_Scope_3205 is
            begin
                     Dec_Ref (Fld_50);
            end Finalizer_Scope_3205;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9767 '<Let at nodes.lkt:17083:9>' Let_Result_2 ada/nodes.lkt:17083
--# scope-start
--# expr-start 9481 '<FieldAccess for name_symbol at nodes.lkt:17083:24>' Fld_1 ada/nodes.lkt:17083
--# expr-start 9480 '<FieldAccess for attribute at nodes.lkt:17083:24>' Fld ada/nodes.lkt:17083
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Identifier (Node => Ent.Node.Attribute_Ref_F_Attribute, Info => Ent.Info);
--# expr-done 9480
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 9481
Local_Rel_Name := Fld_1; 
--# bind rel_name Local_Rel_Name
--# expr-start 9766 '<If at nodes.lkt:17086:9>' If_Result_147 ada/nodes.lkt:17086
--# expr-start 9482 '<Symbol First at nodes.lkt:17086:24>' Sym_145 ada/nodes.lkt:17086
Sym_145 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_First); 
--# expr-done 9482
Is_Equal_147 := Local_Rel_Name = Sym_145; 
if Is_Equal_147 then
   If_Result_146 := True;
else
--# expr-start 9483 '<Symbol Last at nodes.lkt:17086:35>' Sym_146 ada/nodes.lkt:17086
Sym_146 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Last); 
--# expr-done 9483
Is_Equal_146 := Local_Rel_Name = Sym_146; 
if Is_Equal_146 then
   If_Result_145 := True;
else
--# expr-start 9484 '<Symbol Range at nodes.lkt:17086:45>' Sym_147 ada/nodes.lkt:17086
Sym_147 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Range); 
--# expr-done 9484
Is_Equal_145 := Local_Rel_Name = Sym_147; 
if Is_Equal_145 then
   If_Result_144 := True;
else
--# expr-start 9485 '<Symbol Length at nodes.lkt:17086:56>' Sym_148 ada/nodes.lkt:17086
Sym_148 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Length); 
--# expr-done 9485
Is_Equal_144 := Local_Rel_Name = Sym_148; 
   If_Result_144 := Is_Equal_144;
end if;
   If_Result_145 := If_Result_144;
end if;
   If_Result_146 := If_Result_145;
end if;
if If_Result_146 then
   --# expr-start 9486 '<FieldAccess for array_attr_equation at nodes.lkt:17087:14>' Fld_2 ada/nodes.lkt:17087
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.array_attr_equation
Fld_2 := Libadalang.Implementation.Attribute_Ref_P_Array_Attr_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9486
   If_Result_147 := Fld_2;
else
   --# expr-start 9765 '<If at nodes.lkt:17086:9>' If_Result_143 ada/nodes.lkt:17086
--# expr-start 9487 '<Symbol Succ at nodes.lkt:17091:25>' Sym_108 ada/nodes.lkt:17091
Sym_108 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Succ); 
--# expr-done 9487
Is_Equal_143 := Local_Rel_Name = Sym_108; 
if Is_Equal_143 then
   If_Result_142 := True;
else
--# expr-start 9488 '<Symbol Pred at nodes.lkt:17092:19>' Sym_109 ada/nodes.lkt:17092
Sym_109 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pred); 
--# expr-done 9488
Is_Equal_142 := Local_Rel_Name = Sym_109; 
if Is_Equal_142 then
   If_Result_141 := True;
else
--# expr-start 9489 '<Symbol Min at nodes.lkt:17093:19>' Sym_110 ada/nodes.lkt:17093
Sym_110 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Min); 
--# expr-done 9489
Is_Equal_141 := Local_Rel_Name = Sym_110; 
if Is_Equal_141 then
   If_Result_140 := True;
else
--# expr-start 9490 '<Symbol Max at nodes.lkt:17094:19>' Sym_111 ada/nodes.lkt:17094
Sym_111 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Max); 
--# expr-done 9490
Is_Equal_140 := Local_Rel_Name = Sym_111; 
if Is_Equal_140 then
   If_Result_139 := True;
else
--# expr-start 9491 '<Symbol Ceiling at nodes.lkt:17095:19>' Sym_112 ada/nodes.lkt:17095
Sym_112 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ceiling); 
--# expr-done 9491
Is_Equal_139 := Local_Rel_Name = Sym_112; 
if Is_Equal_139 then
   If_Result_138 := True;
else
--# expr-start 9492 '<Symbol Floor at nodes.lkt:17096:19>' Sym_113 ada/nodes.lkt:17096
Sym_113 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Floor); 
--# expr-done 9492
Is_Equal_138 := Local_Rel_Name = Sym_113; 
if Is_Equal_138 then
   If_Result_137 := True;
else
--# expr-start 9493 '<Symbol Rounding at nodes.lkt:17097:19>' Sym_114 ada/nodes.lkt:17097
Sym_114 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Rounding); 
--# expr-done 9493
Is_Equal_137 := Local_Rel_Name = Sym_114; 
if Is_Equal_137 then
   If_Result_136 := True;
else
--# expr-start 9494 '<Symbol Unbiased_Rounding at nodes.lkt:17098:19>' Sym_115 ada/nodes.lkt:17098
Sym_115 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unbiased_Rounding); 
--# expr-done 9494
Is_Equal_136 := Local_Rel_Name = Sym_115; 
if Is_Equal_136 then
   If_Result_135 := True;
else
--# expr-start 9495 '<Symbol Leading_Part at nodes.lkt:17099:19>' Sym_116 ada/nodes.lkt:17099
Sym_116 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Leading_Part); 
--# expr-done 9495
Is_Equal_135 := Local_Rel_Name = Sym_116; 
if Is_Equal_135 then
   If_Result_134 := True;
else
--# expr-start 9496 '<Symbol Truncation at nodes.lkt:17100:19>' Sym_117 ada/nodes.lkt:17100
Sym_117 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Truncation); 
--# expr-done 9496
Is_Equal_134 := Local_Rel_Name = Sym_117; 
if Is_Equal_134 then
   If_Result_133 := True;
else
--# expr-start 9497 '<Symbol Exponent at nodes.lkt:17101:19>' Sym_118 ada/nodes.lkt:17101
Sym_118 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exponent); 
--# expr-done 9497
Is_Equal_133 := Local_Rel_Name = Sym_118; 
if Is_Equal_133 then
   If_Result_132 := True;
else
--# expr-start 9498 '<Symbol Fraction at nodes.lkt:17102:19>' Sym_119 ada/nodes.lkt:17102
Sym_119 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Fraction); 
--# expr-done 9498
Is_Equal_132 := Local_Rel_Name = Sym_119; 
if Is_Equal_132 then
   If_Result_131 := True;
else
--# expr-start 9499 '<Symbol Copy_Sign at nodes.lkt:17103:19>' Sym_120 ada/nodes.lkt:17103
Sym_120 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Copy_Sign); 
--# expr-done 9499
Is_Equal_131 := Local_Rel_Name = Sym_120; 
if Is_Equal_131 then
   If_Result_130 := True;
else
--# expr-start 9500 '<Symbol Remainder at nodes.lkt:17104:19>' Sym_121 ada/nodes.lkt:17104
Sym_121 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Remainder); 
--# expr-done 9500
Is_Equal_130 := Local_Rel_Name = Sym_121; 
if Is_Equal_130 then
   If_Result_129 := True;
else
--# expr-start 9501 '<Symbol Adjacent at nodes.lkt:17105:19>' Sym_122 ada/nodes.lkt:17105
Sym_122 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Adjacent); 
--# expr-done 9501
Is_Equal_129 := Local_Rel_Name = Sym_122; 
if Is_Equal_129 then
   If_Result_128 := True;
else
--# expr-start 9502 '<Symbol Machine at nodes.lkt:17106:19>' Sym_123 ada/nodes.lkt:17106
Sym_123 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine); 
--# expr-done 9502
Is_Equal_128 := Local_Rel_Name = Sym_123; 
if Is_Equal_128 then
   If_Result_127 := True;
else
--# expr-start 9503 '<Symbol Machine_Rounding at nodes.lkt:17107:19>' Sym_124 ada/nodes.lkt:17107
Sym_124 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Rounding); 
--# expr-done 9503
Is_Equal_127 := Local_Rel_Name = Sym_124; 
if Is_Equal_127 then
   If_Result_126 := True;
else
--# expr-start 9504 '<Symbol Scaling at nodes.lkt:17108:19>' Sym_125 ada/nodes.lkt:17108
Sym_125 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Scaling); 
--# expr-done 9504
Is_Equal_126 := Local_Rel_Name = Sym_125; 
if Is_Equal_126 then
   If_Result_125 := True;
else
--# expr-start 9505 '<Symbol Compose at nodes.lkt:17109:19>' Sym_126 ada/nodes.lkt:17109
Sym_126 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Compose); 
--# expr-done 9505
Is_Equal_125 := Local_Rel_Name = Sym_126; 
if Is_Equal_125 then
   If_Result_124 := True;
else
--# expr-start 9506 '<Symbol Mod at nodes.lkt:17110:19>' Sym_127 ada/nodes.lkt:17110
Sym_127 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mod_170); 
--# expr-done 9506
Is_Equal_124 := Local_Rel_Name = Sym_127; 
if Is_Equal_124 then
   If_Result_123 := True;
else
--# expr-start 9507 '<Symbol Value at nodes.lkt:17111:19>' Sym_128 ada/nodes.lkt:17111
Sym_128 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Value); 
--# expr-done 9507
Is_Equal_123 := Local_Rel_Name = Sym_128; 
if Is_Equal_123 then
   If_Result_122 := True;
else
--# expr-start 9508 '<Symbol Wide_Value at nodes.lkt:17112:19>' Sym_129 ada/nodes.lkt:17112
Sym_129 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Value); 
--# expr-done 9508
Is_Equal_122 := Local_Rel_Name = Sym_129; 
if Is_Equal_122 then
   If_Result_121 := True;
else
--# expr-start 9509 '<Symbol Wide_Wide_Value at nodes.lkt:17113:19>' Sym_130 ada/nodes.lkt:17113
Sym_130 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Value); 
--# expr-done 9509
Is_Equal_121 := Local_Rel_Name = Sym_130; 
if Is_Equal_121 then
   If_Result_120 := True;
else
--# expr-start 9510 '<Symbol Fixed_Value at nodes.lkt:17114:19>' Sym_131 ada/nodes.lkt:17114
Sym_131 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Fixed_Value); 
--# expr-done 9510
Is_Equal_120 := Local_Rel_Name = Sym_131; 
if Is_Equal_120 then
   If_Result_119 := True;
else
--# expr-start 9511 '<Symbol Integer_Value at nodes.lkt:17115:19>' Sym_132 ada/nodes.lkt:17115
Sym_132 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Integer_Value); 
--# expr-done 9511
Is_Equal_119 := Local_Rel_Name = Sym_132; 
if Is_Equal_119 then
   If_Result_118 := True;
else
--# expr-start 9512 '<Symbol Pos at nodes.lkt:17116:19>' Sym_133 ada/nodes.lkt:17116
Sym_133 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pos); 
--# expr-done 9512
Is_Equal_118 := Local_Rel_Name = Sym_133; 
if Is_Equal_118 then
   If_Result_117 := True;
else
--# expr-start 9513 '<Symbol Val at nodes.lkt:17117:19>' Sym_134 ada/nodes.lkt:17117
Sym_134 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Val); 
--# expr-done 9513
Is_Equal_117 := Local_Rel_Name = Sym_134; 
if Is_Equal_117 then
   If_Result_116 := True;
else
--# expr-start 9514 '<Symbol Enum_Val at nodes.lkt:17118:19>' Sym_135 ada/nodes.lkt:17118
Sym_135 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Enum_Val); 
--# expr-done 9514
Is_Equal_116 := Local_Rel_Name = Sym_135; 
if Is_Equal_116 then
   If_Result_115 := True;
else
--# expr-start 9515 '<Symbol Write at nodes.lkt:17119:19>' Sym_136 ada/nodes.lkt:17119
Sym_136 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Write); 
--# expr-done 9515
Is_Equal_115 := Local_Rel_Name = Sym_136; 
if Is_Equal_115 then
   If_Result_114 := True;
else
--# expr-start 9516 '<Symbol Read at nodes.lkt:17120:19>' Sym_137 ada/nodes.lkt:17120
Sym_137 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Read); 
--# expr-done 9516
Is_Equal_114 := Local_Rel_Name = Sym_137; 
if Is_Equal_114 then
   If_Result_113 := True;
else
--# expr-start 9517 '<Symbol Output at nodes.lkt:17121:19>' Sym_138 ada/nodes.lkt:17121
Sym_138 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Output); 
--# expr-done 9517
Is_Equal_113 := Local_Rel_Name = Sym_138; 
if Is_Equal_113 then
   If_Result_112 := True;
else
--# expr-start 9518 '<Symbol Input at nodes.lkt:17122:19>' Sym_139 ada/nodes.lkt:17122
Sym_139 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Input); 
--# expr-done 9518
Is_Equal_112 := Local_Rel_Name = Sym_139; 
if Is_Equal_112 then
   If_Result_111 := True;
else
--# expr-start 9519 '<Symbol Put_Image at nodes.lkt:17123:19>' Sym_140 ada/nodes.lkt:17123
Sym_140 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Put_Image); 
--# expr-done 9519
Is_Equal_111 := Local_Rel_Name = Sym_140; 
if Is_Equal_111 then
   If_Result_110 := True;
else
--# expr-start 9520 '<Symbol Asm_Input at nodes.lkt:17124:19>' Sym_141 ada/nodes.lkt:17124
Sym_141 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asm_Input); 
--# expr-done 9520
Is_Equal_110 := Local_Rel_Name = Sym_141; 
if Is_Equal_110 then
   If_Result_109 := True;
else
--# expr-start 9521 '<Symbol Asm_Output at nodes.lkt:17125:19>' Sym_142 ada/nodes.lkt:17125
Sym_142 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asm_Output); 
--# expr-done 9521
Is_Equal_109 := Local_Rel_Name = Sym_142; 
if Is_Equal_109 then
   If_Result_108 := True;
else
--# expr-start 9522 '<Symbol Model at nodes.lkt:17126:19>' Sym_143 ada/nodes.lkt:17126
Sym_143 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Model); 
--# expr-done 9522
Is_Equal_108 := Local_Rel_Name = Sym_143; 
if Is_Equal_108 then
   If_Result_107 := True;
else
--# expr-start 9523 '<Symbol Round at nodes.lkt:17127:19>' Sym_144 ada/nodes.lkt:17127
Sym_144 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Round); 
--# expr-done 9523
Is_Equal_107 := Local_Rel_Name = Sym_144; 
   If_Result_107 := Is_Equal_107;
end if;
   If_Result_108 := If_Result_107;
end if;
   If_Result_109 := If_Result_108;
end if;
   If_Result_110 := If_Result_109;
end if;
   If_Result_111 := If_Result_110;
end if;
   If_Result_112 := If_Result_111;
end if;
   If_Result_113 := If_Result_112;
end if;
   If_Result_114 := If_Result_113;
end if;
   If_Result_115 := If_Result_114;
end if;
   If_Result_116 := If_Result_115;
end if;
   If_Result_117 := If_Result_116;
end if;
   If_Result_118 := If_Result_117;
end if;
   If_Result_119 := If_Result_118;
end if;
   If_Result_120 := If_Result_119;
end if;
   If_Result_121 := If_Result_120;
end if;
   If_Result_122 := If_Result_121;
end if;
   If_Result_123 := If_Result_122;
end if;
   If_Result_124 := If_Result_123;
end if;
   If_Result_125 := If_Result_124;
end if;
   If_Result_126 := If_Result_125;
end if;
   If_Result_127 := If_Result_126;
end if;
   If_Result_128 := If_Result_127;
end if;
   If_Result_129 := If_Result_128;
end if;
   If_Result_130 := If_Result_129;
end if;
   If_Result_131 := If_Result_130;
end if;
   If_Result_132 := If_Result_131;
end if;
   If_Result_133 := If_Result_132;
end if;
   If_Result_134 := If_Result_133;
end if;
   If_Result_135 := If_Result_134;
end if;
   If_Result_136 := If_Result_135;
end if;
   If_Result_137 := If_Result_136;
end if;
   If_Result_138 := If_Result_137;
end if;
   If_Result_139 := If_Result_138;
end if;
   If_Result_140 := If_Result_139;
end if;
   If_Result_141 := If_Result_140;
end if;
   If_Result_142 := If_Result_141;
end if;
if If_Result_142 then
   --# expr-start 9524 '<FieldAccess for attribute_subprogram_equation at nodes.lkt:17127:33>' Fld_3 ada/nodes.lkt:17127
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.attribute_subprogram_equation
Fld_3 := Libadalang.Implementation.Attribute_Ref_P_Attribute_Subprogram_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9524
   If_Result_143 := Fld_3;
else
   --# expr-start 9764 '<If at nodes.lkt:17086:9>' If_Result_106 ada/nodes.lkt:17086
--# expr-start 9525 '<Symbol Size at nodes.lkt:17128:26>' Sym_106 ada/nodes.lkt:17128
Sym_106 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Size); 
--# expr-done 9525
Is_Equal_106 := Local_Rel_Name = Sym_106; 
if Is_Equal_106 then
   If_Result_105 := True;
else
--# expr-start 9526 '<Symbol VADS_Size at nodes.lkt:17128:36>' Sym_107 ada/nodes.lkt:17128
Sym_107 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Vads_Size); 
--# expr-done 9526
Is_Equal_105 := Local_Rel_Name = Sym_107; 
   If_Result_105 := Is_Equal_105;
end if;
if If_Result_105 then
   --# expr-start 9527 '<FieldAccess for size_equation at nodes.lkt:17128:54>' Fld_4 ada/nodes.lkt:17128
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.size_equation
Fld_4 := Libadalang.Implementation.Attribute_Ref_P_Size_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9527
   If_Result_106 := Fld_4;
else
   --# expr-start 9763 '<If at nodes.lkt:17086:9>' If_Result_104 ada/nodes.lkt:17086
--# expr-start 9528 '<Symbol Max_Size_In_Storage_Elements at nodes.lkt:17130:25>' Sym_99 ada/nodes.lkt:17130
Sym_99 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Max_Size_In_Storage_Elements); 
--# expr-done 9528
Is_Equal_104 := Local_Rel_Name = Sym_99; 
if Is_Equal_104 then
   If_Result_103 := True;
else
--# expr-start 9529 '<Symbol Max_Alignment_For_Allocation at nodes.lkt:17131:19>' Sym_100 ada/nodes.lkt:17131
Sym_100 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Max_Alignment_For_Allocation); 
--# expr-done 9529
Is_Equal_103 := Local_Rel_Name = Sym_100; 
if Is_Equal_103 then
   If_Result_102 := True;
else
--# expr-start 9530 '<Symbol Aft at nodes.lkt:17132:19>' Sym_101 ada/nodes.lkt:17132
Sym_101 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aft); 
--# expr-done 9530
Is_Equal_102 := Local_Rel_Name = Sym_101; 
if Is_Equal_102 then
   If_Result_101 := True;
else
--# expr-start 9531 '<Symbol Object_Size at nodes.lkt:17133:19>' Sym_102 ada/nodes.lkt:17133
Sym_102 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Object_Size); 
--# expr-done 9531
Is_Equal_101 := Local_Rel_Name = Sym_102; 
if Is_Equal_101 then
   If_Result_100 := True;
else
--# expr-start 9532 '<Symbol Value_Size at nodes.lkt:17134:19>' Sym_103 ada/nodes.lkt:17134
Sym_103 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Value_Size); 
--# expr-done 9532
Is_Equal_100 := Local_Rel_Name = Sym_103; 
if Is_Equal_100 then
   If_Result_99 := True;
else
--# expr-start 9533 '<Symbol Storage_Size at nodes.lkt:17135:19>' Sym_104 ada/nodes.lkt:17135
Sym_104 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Storage_Size); 
--# expr-done 9533
Is_Equal_99 := Local_Rel_Name = Sym_104; 
if Is_Equal_99 then
   If_Result_98 := True;
else
--# expr-start 9534 '<Symbol Scale at nodes.lkt:17136:19>' Sym_105 ada/nodes.lkt:17136
Sym_105 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Scale); 
--# expr-done 9534
Is_Equal_98 := Local_Rel_Name = Sym_105; 
   If_Result_98 := Is_Equal_98;
end if;
   If_Result_99 := If_Result_98;
end if;
   If_Result_100 := If_Result_99;
end if;
   If_Result_101 := If_Result_100;
end if;
   If_Result_102 := If_Result_101;
end if;
   If_Result_103 := If_Result_102;
end if;
if If_Result_103 then
   --# expr-start 9535 '<FieldAccess for subtype_attr_equation at nodes.lkt:17136:33>' Fld_5 ada/nodes.lkt:17136
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.subtype_attr_equation
Fld_5 := Libadalang.Implementation.Attribute_Ref_P_Subtype_Attr_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9535
   If_Result_104 := Fld_5;
else
   --# expr-start 9762 '<If at nodes.lkt:17086:9>' If_Result_97 ada/nodes.lkt:17086
--# expr-start 9536 '<Symbol Access at nodes.lkt:17138:25>' Sym_96 ada/nodes.lkt:17138
Sym_96 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Access); 
--# expr-done 9536
Is_Equal_97 := Local_Rel_Name = Sym_96; 
if Is_Equal_97 then
   If_Result_96 := True;
else
--# expr-start 9537 '<Symbol Unchecked_Access at nodes.lkt:17139:19>' Sym_97 ada/nodes.lkt:17139
Sym_97 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unchecked_Access); 
--# expr-done 9537
Is_Equal_96 := Local_Rel_Name = Sym_97; 
if Is_Equal_96 then
   If_Result_95 := True;
else
--# expr-start 9538 '<Symbol Unrestricted_Access at nodes.lkt:17140:19>' Sym_98 ada/nodes.lkt:17140
Sym_98 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unrestricted_Access); 
--# expr-done 9538
Is_Equal_95 := Local_Rel_Name = Sym_98; 
   If_Result_95 := Is_Equal_95;
end if;
   If_Result_96 := If_Result_95;
end if;
if If_Result_96 then
   --# expr-start 9539 '<FieldAccess for access_equation at nodes.lkt:17140:47>' Fld_6 ada/nodes.lkt:17140
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.access_equation
Fld_6 := Libadalang.Implementation.Attribute_Ref_P_Access_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9539
   If_Result_97 := Fld_6;
else
   --# expr-start 9761 '<If at nodes.lkt:17086:9>' If_Result_94 ada/nodes.lkt:17086
--# expr-start 9541 '<Eq at nodes.lkt:17141:14>' Is_Equal_94 ada/nodes.lkt:17141
--# expr-start 9540 '<Symbol Image at nodes.lkt:17141:26>' Sym_95 ada/nodes.lkt:17141
Sym_95 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Image); 
--# expr-done 9540
Is_Equal_94 := Local_Rel_Name = Sym_95; 
--# expr-done 9541
if Is_Equal_94 then
   --# expr-start 9543 '<FieldAccess for image_equation at nodes.lkt:17142:14>' Fld_8 ada/nodes.lkt:17142
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9542 '<FieldAccess for std_string_type at nodes.lkt:17142:34>' Fld_7 ada/nodes.lkt:17142
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_7 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 9542
      Cast_Result := Create_Internal_Entity
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
--# property-call-start AttributeRef.image_equation
Fld_8 := Libadalang.Implementation.Attribute_Ref_P_Image_Equation (Node => Ent.Node, Str_Type => Cast_Result, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9543
   If_Result_94 := Fld_8;
else
   --# expr-start 9760 '<If at nodes.lkt:17086:9>' If_Result_93 ada/nodes.lkt:17086
--# expr-start 9545 '<Eq at nodes.lkt:17143:14>' Is_Equal_93 ada/nodes.lkt:17143
--# expr-start 9544 '<Symbol Wide_Image at nodes.lkt:17143:26>' Sym_94 ada/nodes.lkt:17143
Sym_94 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Image); 
--# expr-done 9544
Is_Equal_93 := Local_Rel_Name = Sym_94; 
--# expr-done 9545
if Is_Equal_93 then
   --# expr-start 9547 '<FieldAccess for image_equation at nodes.lkt:17144:14>' Fld_10 ada/nodes.lkt:17144
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9546 '<FieldAccess for std_wide_string_type at nodes.lkt:17144:34>' Fld_9 ada/nodes.lkt:17144
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_wide_string_type
Fld_9 := Libadalang.Implementation.Ada_Node_P_Std_Wide_String_Type (Node => Self);
--# end
--# expr-done 9546
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_9.Node,
         Info => Fld_9.Info);
--# property-call-start AttributeRef.image_equation
Fld_10 := Libadalang.Implementation.Attribute_Ref_P_Image_Equation (Node => Ent.Node, Str_Type => Cast_Result_1, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9547
   If_Result_93 := Fld_10;
else
   --# expr-start 9759 '<If at nodes.lkt:17086:9>' If_Result_92 ada/nodes.lkt:17086
--# expr-start 9549 '<Eq at nodes.lkt:17145:14>' Is_Equal_92 ada/nodes.lkt:17145
--# expr-start 9548 '<Symbol Wide_Wide_Image at nodes.lkt:17145:26>' Sym_93 ada/nodes.lkt:17145
Sym_93 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Image); 
--# expr-done 9548
Is_Equal_92 := Local_Rel_Name = Sym_93; 
--# expr-done 9549
if Is_Equal_92 then
   --# expr-start 9551 '<FieldAccess for image_equation at nodes.lkt:17146:14>' Fld_12 ada/nodes.lkt:17146
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9550 '<FieldAccess for std_wide_wide_string_type at nodes.lkt:17146:34>' Fld_11 ada/nodes.lkt:17146
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_wide_wide_string_type
Fld_11 := Libadalang.Implementation.Ada_Node_P_Std_Wide_Wide_String_Type (Node => Self);
--# end
--# expr-done 9550
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_11.Node,
         Info => Fld_11.Info);
--# property-call-start AttributeRef.image_equation
Fld_12 := Libadalang.Implementation.Attribute_Ref_P_Image_Equation (Node => Ent.Node, Str_Type => Cast_Result_2, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9551
   If_Result_92 := Fld_12;
else
   --# expr-start 9758 '<If at nodes.lkt:17086:9>' If_Result_91 ada/nodes.lkt:17086
--# expr-start 9553 '<Eq at nodes.lkt:17147:14>' Is_Equal_91 ada/nodes.lkt:17147
--# expr-start 9552 '<Symbol Enum_Rep at nodes.lkt:17147:26>' Sym_92 ada/nodes.lkt:17147
Sym_92 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Enum_Rep); 
--# expr-done 9552
Is_Equal_91 := Local_Rel_Name = Sym_92; 
--# expr-done 9553
if Is_Equal_91 then
   --# expr-start 9554 '<FieldAccess for enum_rep_equation at nodes.lkt:17147:43>' Fld_13 ada/nodes.lkt:17147
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.enum_rep_equation
Fld_13 := Libadalang.Implementation.Attribute_Ref_P_Enum_Rep_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9554
   If_Result_91 := Fld_13;
else
   --# expr-start 9757 '<If at nodes.lkt:17086:9>' If_Result_90 ada/nodes.lkt:17086
--# expr-start 9555 '<Symbol Invalid_Value at nodes.lkt:17148:26>' Sym_89 ada/nodes.lkt:17148
Sym_89 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Invalid_Value); 
--# expr-done 9555
Is_Equal_90 := Local_Rel_Name = Sym_89; 
if Is_Equal_90 then
   If_Result_89 := True;
else
--# expr-start 9556 '<Symbol First_Valid at nodes.lkt:17148:45>' Sym_90 ada/nodes.lkt:17148
Sym_90 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_First_Valid); 
--# expr-done 9556
Is_Equal_89 := Local_Rel_Name = Sym_90; 
if Is_Equal_89 then
   If_Result_88 := True;
else
--# expr-start 9557 '<Symbol Last_Valid at nodes.lkt:17148:62>' Sym_91 ada/nodes.lkt:17148
Sym_91 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Last_Valid); 
--# expr-done 9557
Is_Equal_88 := Local_Rel_Name = Sym_91; 
   If_Result_88 := Is_Equal_88;
end if;
   If_Result_89 := If_Result_88;
end if;
if If_Result_89 then
   --# expr-start 9558 '<FieldAccess for self_type_equation at nodes.lkt:17149:14>' Fld_14 ada/nodes.lkt:17149
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.self_type_equation
Fld_14 := Libadalang.Implementation.Attribute_Ref_P_Self_Type_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9558
   If_Result_90 := Fld_14;
else
   --# expr-start 9756 '<If at nodes.lkt:17086:9>' If_Result_87 ada/nodes.lkt:17086
--# expr-start 9560 '<Eq at nodes.lkt:17150:14>' Is_Equal_87 ada/nodes.lkt:17150
--# expr-start 9559 '<Symbol Identity at nodes.lkt:17150:26>' Sym_88 ada/nodes.lkt:17150
Sym_88 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Identity); 
--# expr-done 9559
Is_Equal_87 := Local_Rel_Name = Sym_88; 
--# expr-done 9560
if Is_Equal_87 then
   --# expr-start 9561 '<FieldAccess for identity_equation at nodes.lkt:17150:43>' Fld_15 ada/nodes.lkt:17150
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.identity_equation
Fld_15 := Libadalang.Implementation.Attribute_Ref_P_Identity_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9561
   If_Result_87 := Fld_15;
else
   --# expr-start 9755 '<If at nodes.lkt:17086:9>' If_Result_86 ada/nodes.lkt:17086
--# expr-start 9562 '<Symbol Address at nodes.lkt:17151:26>' Sym_86 ada/nodes.lkt:17151
Sym_86 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Address); 
--# expr-done 9562
Is_Equal_86 := Local_Rel_Name = Sym_86; 
if Is_Equal_86 then
   If_Result_85 := True;
else
--# expr-start 9563 '<Symbol Code_Address at nodes.lkt:17151:39>' Sym_87 ada/nodes.lkt:17151
Sym_87 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Code_Address); 
--# expr-done 9563
Is_Equal_85 := Local_Rel_Name = Sym_87; 
   If_Result_85 := Is_Equal_85;
end if;
if If_Result_85 then
   --# expr-start 9564 '<FieldAccess for address_equation at nodes.lkt:17152:14>' Fld_16 ada/nodes.lkt:17152
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.address_equation
Fld_16 := Libadalang.Implementation.Attribute_Ref_P_Address_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9564
   If_Result_86 := Fld_16;
else
   --# expr-start 9754 '<If at nodes.lkt:17086:9>' If_Result_84 ada/nodes.lkt:17086
--# expr-start 9565 '<Symbol Small at nodes.lkt:17154:25>' Sym_76 ada/nodes.lkt:17154
Sym_76 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Small); 
--# expr-done 9565
Is_Equal_84 := Local_Rel_Name = Sym_76; 
if Is_Equal_84 then
   If_Result_83 := True;
else
--# expr-start 9566 '<Symbol Model_Small at nodes.lkt:17155:19>' Sym_77 ada/nodes.lkt:17155
Sym_77 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Model_Small); 
--# expr-done 9566
Is_Equal_83 := Local_Rel_Name = Sym_77; 
if Is_Equal_83 then
   If_Result_82 := True;
else
--# expr-start 9567 '<Symbol Safe_Small at nodes.lkt:17156:19>' Sym_78 ada/nodes.lkt:17156
Sym_78 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Safe_Small); 
--# expr-done 9567
Is_Equal_82 := Local_Rel_Name = Sym_78; 
if Is_Equal_82 then
   If_Result_81 := True;
else
--# expr-start 9568 '<Symbol Epsilon at nodes.lkt:17157:19>' Sym_79 ada/nodes.lkt:17157
Sym_79 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Epsilon); 
--# expr-done 9568
Is_Equal_81 := Local_Rel_Name = Sym_79; 
if Is_Equal_81 then
   If_Result_80 := True;
else
--# expr-start 9569 '<Symbol Model_Epsilon at nodes.lkt:17158:19>' Sym_80 ada/nodes.lkt:17158
Sym_80 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Model_Epsilon); 
--# expr-done 9569
Is_Equal_80 := Local_Rel_Name = Sym_80; 
if Is_Equal_80 then
   If_Result_79 := True;
else
--# expr-start 9570 '<Symbol Large at nodes.lkt:17159:19>' Sym_81 ada/nodes.lkt:17159
Sym_81 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Large); 
--# expr-done 9570
Is_Equal_79 := Local_Rel_Name = Sym_81; 
if Is_Equal_79 then
   If_Result_78 := True;
else
--# expr-start 9571 '<Symbol Safe_Large at nodes.lkt:17160:19>' Sym_82 ada/nodes.lkt:17160
Sym_82 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Safe_Large); 
--# expr-done 9571
Is_Equal_78 := Local_Rel_Name = Sym_82; 
if Is_Equal_78 then
   If_Result_77 := True;
else
--# expr-start 9572 '<Symbol Delta at nodes.lkt:17161:19>' Sym_83 ada/nodes.lkt:17161
Sym_83 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Delta); 
--# expr-done 9572
Is_Equal_77 := Local_Rel_Name = Sym_83; 
if Is_Equal_77 then
   If_Result_76 := True;
else
--# expr-start 9573 '<Symbol Safe_First at nodes.lkt:17162:19>' Sym_84 ada/nodes.lkt:17162
Sym_84 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Safe_First); 
--# expr-done 9573
Is_Equal_76 := Local_Rel_Name = Sym_84; 
if Is_Equal_76 then
   If_Result_75 := True;
else
--# expr-start 9574 '<Symbol Safe_Last at nodes.lkt:17163:19>' Sym_85 ada/nodes.lkt:17163
Sym_85 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Safe_Last); 
--# expr-done 9574
Is_Equal_75 := Local_Rel_Name = Sym_85; 
   If_Result_75 := Is_Equal_75;
end if;
   If_Result_76 := If_Result_75;
end if;
   If_Result_77 := If_Result_76;
end if;
   If_Result_78 := If_Result_77;
end if;
   If_Result_79 := If_Result_78;
end if;
   If_Result_80 := If_Result_79;
end if;
   If_Result_81 := If_Result_80;
end if;
   If_Result_82 := If_Result_81;
end if;
   If_Result_83 := If_Result_82;
end if;
if If_Result_83 then
   --# expr-start 9575 '<FieldAccess for universal_real_equation at nodes.lkt:17163:37>' Fld_17 ada/nodes.lkt:17163
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.universal_real_equation
Fld_17 := Libadalang.Implementation.Attribute_Ref_P_Universal_Real_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9575
   If_Result_84 := Fld_17;
else
   --# expr-start 9753 '<If at nodes.lkt:17086:9>' If_Result_74 ada/nodes.lkt:17086
--# expr-start 9577 '<Eq at nodes.lkt:17164:14>' Is_Equal_74 ada/nodes.lkt:17164
--# expr-start 9576 '<Symbol Img at nodes.lkt:17164:26>' Sym_75 ada/nodes.lkt:17164
Sym_75 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Img); 
--# expr-done 9576
Is_Equal_74 := Local_Rel_Name = Sym_75; 
--# expr-done 9577
if Is_Equal_74 then
   --# expr-start 9579 '<FieldAccess for img_equation at nodes.lkt:17164:38>' Fld_19 ada/nodes.lkt:17164
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9578 '<FieldAccess for std_string_type at nodes.lkt:17164:56>' Fld_18 ada/nodes.lkt:17164
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_18 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 9578
      Cast_Result_3 := Create_Internal_Entity
        (Node => Fld_18.Node,
         Info => Fld_18.Info);
--# property-call-start AttributeRef.img_equation
Fld_19 := Libadalang.Implementation.Attribute_Ref_P_Img_Equation (Node => Ent.Node, Str_Type => Cast_Result_3, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9579
   If_Result_74 := Fld_19;
else
   --# expr-start 9752 '<If at nodes.lkt:17086:9>' If_Result_73 ada/nodes.lkt:17086
--# expr-start 9581 '<Eq at nodes.lkt:17165:14>' Is_Equal_73 ada/nodes.lkt:17165
--# expr-start 9580 '<Symbol Tag at nodes.lkt:17165:26>' Sym_74 ada/nodes.lkt:17165
Sym_74 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Tag); 
--# expr-done 9580
Is_Equal_73 := Local_Rel_Name = Sym_74; 
--# expr-done 9581
if Is_Equal_73 then
   --# expr-start 9582 '<FieldAccess for tag_attr_equation at nodes.lkt:17165:38>' Fld_20 ada/nodes.lkt:17165
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.tag_attr_equation
Fld_20 := Libadalang.Implementation.Attribute_Ref_P_Tag_Attr_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9582
   If_Result_73 := Fld_20;
else
   --# expr-start 9751 '<If at nodes.lkt:17086:9>' If_Result_72 ada/nodes.lkt:17086
--# expr-start 9584 '<Eq at nodes.lkt:17166:14>' Is_Equal_72 ada/nodes.lkt:17166
--# expr-start 9583 '<Symbol Result at nodes.lkt:17166:26>' Sym_73 ada/nodes.lkt:17166
Sym_73 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Result); 
--# expr-done 9583
Is_Equal_72 := Local_Rel_Name = Sym_73; 
--# expr-done 9584
if Is_Equal_72 then
   --# expr-start 9585 '<FieldAccess for result_attr_equation at nodes.lkt:17166:41>' Fld_21 ada/nodes.lkt:17166
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.result_attr_equation
Fld_21 := Libadalang.Implementation.Attribute_Ref_P_Result_Attr_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9585
   If_Result_72 := Fld_21;
else
   --# expr-start 9750 '<If at nodes.lkt:17086:9>' If_Result_71 ada/nodes.lkt:17086
--# expr-start 9586 '<Symbol Old at nodes.lkt:17167:26>' Sym_71 ada/nodes.lkt:17167
Sym_71 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Old); 
--# expr-done 9586
Is_Equal_71 := Local_Rel_Name = Sym_71; 
if Is_Equal_71 then
   If_Result_70 := True;
else
--# expr-start 9587 '<Symbol Loop_Entry at nodes.lkt:17167:35>' Sym_72 ada/nodes.lkt:17167
Sym_72 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Loop_Entry); 
--# expr-done 9587
Is_Equal_70 := Local_Rel_Name = Sym_72; 
   If_Result_70 := Is_Equal_70;
end if;
if If_Result_70 then
   --# expr-start 9588 '<FieldAccess for bind_to_prefix_eq at nodes.lkt:17167:54>' Fld_22 ada/nodes.lkt:17167
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.bind_to_prefix_eq
Fld_22 := Libadalang.Implementation.Attribute_Ref_P_Bind_To_Prefix_Eq (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9588
   If_Result_71 := Fld_22;
else
   --# expr-start 9749 '<If at nodes.lkt:17086:9>' If_Result_69 ada/nodes.lkt:17086
--# expr-start 9589 '<Symbol Class at nodes.lkt:17168:26>' Sym_69 ada/nodes.lkt:17168
Sym_69 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Class); 
--# expr-done 9589
Is_Equal_69 := Local_Rel_Name = Sym_69; 
if Is_Equal_69 then
   If_Result_68 := True;
else
--# expr-start 9590 '<Symbol Base at nodes.lkt:17168:37>' Sym_70 ada/nodes.lkt:17168
Sym_70 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Base); 
--# expr-done 9590
Is_Equal_68 := Local_Rel_Name = Sym_70; 
   If_Result_68 := Is_Equal_68;
end if;
if If_Result_68 then
   --# expr-start 9592 '<FieldAccess for sub_equation at nodes.lkt:17168:50>' Fld_24 ada/nodes.lkt:17168
--# expr-start 9591 '<FieldAccess for prefix at nodes.lkt:17168:50>' Fld_23 ada/nodes.lkt:17168
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9591
      if Fld_23.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_24 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_23.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_23.Info);
--# end
--# expr-done 9592
   If_Result_69 := Fld_24;
else
   --# expr-start 9748 '<If at nodes.lkt:17086:9>' If_Result_67 ada/nodes.lkt:17086
--# expr-start 9593 '<Symbol Valid at nodes.lkt:17170:25>' Sym_52 ada/nodes.lkt:17170
Sym_52 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Valid); 
--# expr-done 9593
Is_Equal_67 := Local_Rel_Name = Sym_52; 
if Is_Equal_67 then
   If_Result_66 := True;
else
--# expr-start 9594 '<Symbol Machine_Overflows at nodes.lkt:17171:19>' Sym_53 ada/nodes.lkt:17171
Sym_53 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Overflows); 
--# expr-done 9594
Is_Equal_66 := Local_Rel_Name = Sym_53; 
if Is_Equal_66 then
   If_Result_65 := True;
else
--# expr-start 9595 '<Symbol Machine_Rounds at nodes.lkt:17172:19>' Sym_54 ada/nodes.lkt:17172
Sym_54 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Rounds); 
--# expr-done 9595
Is_Equal_65 := Local_Rel_Name = Sym_54; 
if Is_Equal_65 then
   If_Result_64 := True;
else
--# expr-start 9596 '<Symbol Has_Access_Values at nodes.lkt:17173:19>' Sym_55 ada/nodes.lkt:17173
Sym_55 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Has_Access_Values); 
--# expr-done 9596
Is_Equal_64 := Local_Rel_Name = Sym_55; 
if Is_Equal_64 then
   If_Result_63 := True;
else
--# expr-start 9597 '<Symbol Has_Discriminants at nodes.lkt:17174:19>' Sym_56 ada/nodes.lkt:17174
Sym_56 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Has_Discriminants); 
--# expr-done 9597
Is_Equal_63 := Local_Rel_Name = Sym_56; 
if Is_Equal_63 then
   If_Result_62 := True;
else
--# expr-start 9598 '<Symbol Has_Tagged_Values at nodes.lkt:17175:19>' Sym_57 ada/nodes.lkt:17175
Sym_57 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Has_Tagged_Values); 
--# expr-done 9598
Is_Equal_62 := Local_Rel_Name = Sym_57; 
if Is_Equal_62 then
   If_Result_61 := True;
else
--# expr-start 9599 '<Symbol Definite at nodes.lkt:17176:19>' Sym_58 ada/nodes.lkt:17176
Sym_58 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Definite); 
--# expr-done 9599
Is_Equal_61 := Local_Rel_Name = Sym_58; 
if Is_Equal_61 then
   If_Result_60 := True;
else
--# expr-start 9600 '<Symbol Constrained at nodes.lkt:17177:19>' Sym_59 ada/nodes.lkt:17177
Sym_59 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Constrained); 
--# expr-done 9600
Is_Equal_60 := Local_Rel_Name = Sym_59; 
if Is_Equal_60 then
   If_Result_59 := True;
else
--# expr-start 9601 '<Symbol Initialized at nodes.lkt:17178:19>' Sym_60 ada/nodes.lkt:17178
Sym_60 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Initialized); 
--# expr-done 9601
Is_Equal_59 := Local_Rel_Name = Sym_60; 
if Is_Equal_59 then
   If_Result_58 := True;
else
--# expr-start 9602 '<Symbol Valid_Scalars at nodes.lkt:17179:19>' Sym_61 ada/nodes.lkt:17179
Sym_61 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Valid_Scalars); 
--# expr-done 9602
Is_Equal_58 := Local_Rel_Name = Sym_61; 
if Is_Equal_58 then
   If_Result_57 := True;
else
--# expr-start 9603 '<Symbol Unconstrained_Array at nodes.lkt:17180:19>' Sym_62 ada/nodes.lkt:17180
Sym_62 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unconstrained_Array); 
--# expr-done 9603
Is_Equal_57 := Local_Rel_Name = Sym_62; 
if Is_Equal_57 then
   If_Result_56 := True;
else
--# expr-start 9604 '<Symbol Library_Level at nodes.lkt:17181:19>' Sym_63 ada/nodes.lkt:17181
Sym_63 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Library_Level); 
--# expr-done 9604
Is_Equal_56 := Local_Rel_Name = Sym_63; 
if Is_Equal_56 then
   If_Result_55 := True;
else
--# expr-start 9605 '<Symbol Preelaborable_Initialization at nodes.lkt:17182:19>' Sym_64 ada/nodes.lkt:17182
Sym_64 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Preelaborable_Initialization); 
--# expr-done 9605
Is_Equal_55 := Local_Rel_Name = Sym_64; 
if Is_Equal_55 then
   If_Result_54 := True;
else
--# expr-start 9606 '<Symbol Denorm at nodes.lkt:17183:19>' Sym_65 ada/nodes.lkt:17183
Sym_65 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Denorm); 
--# expr-done 9606
Is_Equal_54 := Local_Rel_Name = Sym_65; 
if Is_Equal_54 then
   If_Result_53 := True;
else
--# expr-start 9607 '<Symbol Signed_Zeros at nodes.lkt:17184:19>' Sym_66 ada/nodes.lkt:17184
Sym_66 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Signed_Zeros); 
--# expr-done 9607
Is_Equal_53 := Local_Rel_Name = Sym_66; 
if Is_Equal_53 then
   If_Result_52 := True;
else
--# expr-start 9608 '<Symbol Fast_Math at nodes.lkt:17185:19>' Sym_67 ada/nodes.lkt:17185
Sym_67 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Fast_Math); 
--# expr-done 9608
Is_Equal_52 := Local_Rel_Name = Sym_67; 
if Is_Equal_52 then
   If_Result_51 := True;
else
--# expr-start 9609 '<Symbol Passed_By_Reference at nodes.lkt:17186:19>' Sym_68 ada/nodes.lkt:17186
Sym_68 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Passed_By_Reference); 
--# expr-done 9609
Is_Equal_51 := Local_Rel_Name = Sym_68; 
   If_Result_51 := Is_Equal_51;
end if;
   If_Result_52 := If_Result_51;
end if;
   If_Result_53 := If_Result_52;
end if;
   If_Result_54 := If_Result_53;
end if;
   If_Result_55 := If_Result_54;
end if;
   If_Result_56 := If_Result_55;
end if;
   If_Result_57 := If_Result_56;
end if;
   If_Result_58 := If_Result_57;
end if;
   If_Result_59 := If_Result_58;
end if;
   If_Result_60 := If_Result_59;
end if;
   If_Result_61 := If_Result_60;
end if;
   If_Result_62 := If_Result_61;
end if;
   If_Result_63 := If_Result_62;
end if;
   If_Result_64 := If_Result_63;
end if;
   If_Result_65 := If_Result_64;
end if;
   If_Result_66 := If_Result_65;
end if;
if If_Result_66 then
   --# expr-start 9615 '<LogicBinaryOp And at nodes.lkt:17188:13>' And_Pred ada/nodes.lkt:17188
--# expr-start 9611 '<FieldAccess for sub_equation at nodes.lkt:17188:13>' Fld_26 ada/nodes.lkt:17188
--# expr-start 9610 '<FieldAccess for prefix at nodes.lkt:17188:13>' Fld_25 ada/nodes.lkt:17188
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9610
      if Fld_25.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_26 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_25.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_25.Info);
--# end
--# expr-done 9611
--# expr-start 9614 '<Bind at nodes.lkt:17188:45>' Bind_Result ada/nodes.lkt:17188
--# expr-start 9612 '<FieldAccess for type_var at nodes.lkt:17188:45>' Fld_27 ada/nodes.lkt:17188
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9612
Fld_27.Value := No_Entity;
Entity_Vars.Reset (Fld_27);
--# expr-start 9613 '<FieldAccess for bool_type at nodes.lkt:17188:64>' Fld_28 ada/nodes.lkt:17188
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_28 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 9613
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_28.Node,
         Info => Fld_28.Info);
Bind_Result := Solver.Create_Assign (Fld_27, Cast_Result_4, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17188:45") else null)); 
--# expr-done 9614
And_Pred := Create_And (Fld_26, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17188:13") else null)); 
--# expr-done 9615
   If_Result_67 := And_Pred;
else
   --# expr-start 9747 '<If at nodes.lkt:17086:9>' If_Result_50 ada/nodes.lkt:17086
--# expr-start 9617 '<Eq at nodes.lkt:17194:14>' Is_Equal_50 ada/nodes.lkt:17194
--# expr-start 9616 '<Symbol Enabled at nodes.lkt:17194:26>' Sym_51 ada/nodes.lkt:17194
Sym_51 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Enabled); 
--# expr-done 9616
Is_Equal_50 := Local_Rel_Name = Sym_51; 
--# expr-done 9617
if Is_Equal_50 then
   --# expr-start 9620 '<Bind at nodes.lkt:17194:42>' Bind_Result_1 ada/nodes.lkt:17194
--# expr-start 9618 '<FieldAccess for type_var at nodes.lkt:17194:42>' Fld_29 ada/nodes.lkt:17194
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_29 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9618
Fld_29.Value := No_Entity;
Entity_Vars.Reset (Fld_29);
--# expr-start 9619 '<FieldAccess for bool_type at nodes.lkt:17194:61>' Fld_30 ada/nodes.lkt:17194
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_30 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 9619
      Cast_Result_5 := Create_Internal_Entity
        (Node => Fld_30.Node,
         Info => Fld_30.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_29, Cast_Result_5, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17194:42") else null)); 
--# expr-done 9620
   If_Result_50 := Bind_Result_1;
else
   --# expr-start 9746 '<If at nodes.lkt:17086:9>' If_Result_49 ada/nodes.lkt:17086
--# expr-start 9621 '<Symbol Width at nodes.lkt:17196:25>' Sym_21 ada/nodes.lkt:17196
Sym_21 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Width); 
--# expr-done 9621
Is_Equal_49 := Local_Rel_Name = Sym_21; 
if Is_Equal_49 then
   If_Result_48 := True;
else
--# expr-start 9622 '<Symbol Component_Size at nodes.lkt:17197:19>' Sym_22 ada/nodes.lkt:17197
Sym_22 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Component_Size); 
--# expr-done 9622
Is_Equal_48 := Local_Rel_Name = Sym_22; 
if Is_Equal_48 then
   If_Result_47 := True;
else
--# expr-start 9623 '<Symbol Position at nodes.lkt:17198:19>' Sym_23 ada/nodes.lkt:17198
Sym_23 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Position); 
--# expr-done 9623
Is_Equal_47 := Local_Rel_Name = Sym_23; 
if Is_Equal_47 then
   If_Result_46 := True;
else
--# expr-start 9624 '<Symbol Mantissa at nodes.lkt:17199:19>' Sym_24 ada/nodes.lkt:17199
Sym_24 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mantissa); 
--# expr-done 9624
Is_Equal_46 := Local_Rel_Name = Sym_24; 
if Is_Equal_46 then
   If_Result_45 := True;
else
--# expr-start 9625 '<Symbol Model_Mantissa at nodes.lkt:17200:19>' Sym_25 ada/nodes.lkt:17200
Sym_25 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Model_Mantissa); 
--# expr-done 9625
Is_Equal_45 := Local_Rel_Name = Sym_25; 
if Is_Equal_45 then
   If_Result_44 := True;
else
--# expr-start 9626 '<Symbol Machine_Mantissa at nodes.lkt:17201:19>' Sym_26 ada/nodes.lkt:17201
Sym_26 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Mantissa); 
--# expr-done 9626
Is_Equal_44 := Local_Rel_Name = Sym_26; 
if Is_Equal_44 then
   If_Result_43 := True;
else
--# expr-start 9627 '<Symbol Fore at nodes.lkt:17202:19>' Sym_27 ada/nodes.lkt:17202
Sym_27 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Fore); 
--# expr-done 9627
Is_Equal_43 := Local_Rel_Name = Sym_27; 
if Is_Equal_43 then
   If_Result_42 := True;
else
--# expr-start 9628 '<Symbol Aft at nodes.lkt:17203:19>' Sym_28 ada/nodes.lkt:17203
Sym_28 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aft); 
--# expr-done 9628
Is_Equal_42 := Local_Rel_Name = Sym_28; 
if Is_Equal_42 then
   If_Result_41 := True;
else
--# expr-start 9629 '<Symbol Digits at nodes.lkt:17204:19>' Sym_29 ada/nodes.lkt:17204
Sym_29 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Digits); 
--# expr-done 9629
Is_Equal_41 := Local_Rel_Name = Sym_29; 
if Is_Equal_41 then
   If_Result_40 := True;
else
--# expr-start 9630 '<Symbol Modulus at nodes.lkt:17205:19>' Sym_30 ada/nodes.lkt:17205
Sym_30 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Modulus); 
--# expr-done 9630
Is_Equal_40 := Local_Rel_Name = Sym_30; 
if Is_Equal_40 then
   If_Result_39 := True;
else
--# expr-start 9631 '<Symbol Word_Size at nodes.lkt:17206:19>' Sym_31 ada/nodes.lkt:17206
Sym_31 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Word_Size); 
--# expr-done 9631
Is_Equal_39 := Local_Rel_Name = Sym_31; 
if Is_Equal_39 then
   If_Result_38 := True;
else
--# expr-start 9632 '<Symbol Wchar_T_Size at nodes.lkt:17207:19>' Sym_32 ada/nodes.lkt:17207
Sym_32 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wchar_T_Size); 
--# expr-done 9632
Is_Equal_38 := Local_Rel_Name = Sym_32; 
if Is_Equal_38 then
   If_Result_37 := True;
else
--# expr-start 9633 '<Symbol Max_Integer_Size at nodes.lkt:17208:19>' Sym_33 ada/nodes.lkt:17208
Sym_33 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Max_Integer_Size); 
--# expr-done 9633
Is_Equal_37 := Local_Rel_Name = Sym_33; 
if Is_Equal_37 then
   If_Result_36 := True;
else
--# expr-start 9634 '<Symbol Address_Size at nodes.lkt:17209:19>' Sym_34 ada/nodes.lkt:17209
Sym_34 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Address_Size); 
--# expr-done 9634
Is_Equal_36 := Local_Rel_Name = Sym_34; 
if Is_Equal_36 then
   If_Result_35 := True;
else
--# expr-start 9635 '<Symbol Maximum_Alignment at nodes.lkt:17210:19>' Sym_35 ada/nodes.lkt:17210
Sym_35 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Maximum_Alignment); 
--# expr-done 9635
Is_Equal_35 := Local_Rel_Name = Sym_35; 
if Is_Equal_35 then
   If_Result_34 := True;
else
--# expr-start 9636 '<Symbol System_Allocator_Alignment at nodes.lkt:17211:19>' Sym_36 ada/nodes.lkt:17211
Sym_36 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_System_Allocator_Alignment); 
--# expr-done 9636
Is_Equal_34 := Local_Rel_Name = Sym_36; 
if Is_Equal_34 then
   If_Result_33 := True;
else
--# expr-start 9637 '<Symbol Finalization_Size at nodes.lkt:17212:19>' Sym_37 ada/nodes.lkt:17212
Sym_37 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Finalization_Size); 
--# expr-done 9637
Is_Equal_33 := Local_Rel_Name = Sym_37; 
if Is_Equal_33 then
   If_Result_32 := True;
else
--# expr-start 9638 '<Symbol Descriptor_Size at nodes.lkt:17213:19>' Sym_38 ada/nodes.lkt:17213
Sym_38 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Descriptor_Size); 
--# expr-done 9638
Is_Equal_32 := Local_Rel_Name = Sym_38; 
if Is_Equal_32 then
   If_Result_31 := True;
else
--# expr-start 9639 '<Symbol Alignment at nodes.lkt:17214:19>' Sym_39 ada/nodes.lkt:17214
Sym_39 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Alignment); 
--# expr-done 9639
Is_Equal_31 := Local_Rel_Name = Sym_39; 
if Is_Equal_31 then
   If_Result_30 := True;
else
--# expr-start 9640 '<Symbol First_Bit at nodes.lkt:17215:19>' Sym_40 ada/nodes.lkt:17215
Sym_40 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_First_Bit); 
--# expr-done 9640
Is_Equal_30 := Local_Rel_Name = Sym_40; 
if Is_Equal_30 then
   If_Result_29 := True;
else
--# expr-start 9641 '<Symbol Last_Bit at nodes.lkt:17216:19>' Sym_41 ada/nodes.lkt:17216
Sym_41 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Last_Bit); 
--# expr-done 9641
Is_Equal_29 := Local_Rel_Name = Sym_41; 
if Is_Equal_29 then
   If_Result_28 := True;
else
--# expr-start 9642 '<Symbol Default_Bit_Order at nodes.lkt:17217:19>' Sym_42 ada/nodes.lkt:17217
Sym_42 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Default_Bit_Order); 
--# expr-done 9642
Is_Equal_28 := Local_Rel_Name = Sym_42; 
if Is_Equal_28 then
   If_Result_27 := True;
else
--# expr-start 9643 '<Symbol Range_Length at nodes.lkt:17218:19>' Sym_43 ada/nodes.lkt:17218
Sym_43 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Range_Length); 
--# expr-done 9643
Is_Equal_27 := Local_Rel_Name = Sym_43; 
if Is_Equal_27 then
   If_Result_26 := True;
else
--# expr-start 9644 '<Symbol Storage_Unit at nodes.lkt:17219:19>' Sym_44 ada/nodes.lkt:17219
Sym_44 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Storage_Unit); 
--# expr-done 9644
Is_Equal_26 := Local_Rel_Name = Sym_44; 
if Is_Equal_26 then
   If_Result_25 := True;
else
--# expr-start 9645 '<Symbol Stream_Size at nodes.lkt:17220:19>' Sym_45 ada/nodes.lkt:17220
Sym_45 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Stream_Size); 
--# expr-done 9645
Is_Equal_25 := Local_Rel_Name = Sym_45; 
if Is_Equal_25 then
   If_Result_24 := True;
else
--# expr-start 9646 '<Symbol Small_Numerator at nodes.lkt:17221:19>' Sym_46 ada/nodes.lkt:17221
Sym_46 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Small_Numerator); 
--# expr-done 9646
Is_Equal_24 := Local_Rel_Name = Sym_46; 
if Is_Equal_24 then
   If_Result_23 := True;
else
--# expr-start 9647 '<Symbol Small_Denominator at nodes.lkt:17222:19>' Sym_47 ada/nodes.lkt:17222
Sym_47 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Small_Denominator); 
--# expr-done 9647
Is_Equal_23 := Local_Rel_Name = Sym_47; 
if Is_Equal_23 then
   If_Result_22 := True;
else
--# expr-start 9648 '<Symbol Machine_Emin at nodes.lkt:17223:19>' Sym_48 ada/nodes.lkt:17223
Sym_48 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Emin); 
--# expr-done 9648
Is_Equal_22 := Local_Rel_Name = Sym_48; 
if Is_Equal_22 then
   If_Result_21 := True;
else
--# expr-start 9649 '<Symbol Machine_Emax at nodes.lkt:17224:19>' Sym_49 ada/nodes.lkt:17224
Sym_49 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Emax); 
--# expr-done 9649
Is_Equal_21 := Local_Rel_Name = Sym_49; 
if Is_Equal_21 then
   If_Result_20 := True;
else
--# expr-start 9650 '<Symbol Model_Emin at nodes.lkt:17225:19>' Sym_50 ada/nodes.lkt:17225
Sym_50 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Model_Emin); 
--# expr-done 9650
Is_Equal_20 := Local_Rel_Name = Sym_50; 
   If_Result_20 := Is_Equal_20;
end if;
   If_Result_21 := If_Result_20;
end if;
   If_Result_22 := If_Result_21;
end if;
   If_Result_23 := If_Result_22;
end if;
   If_Result_24 := If_Result_23;
end if;
   If_Result_25 := If_Result_24;
end if;
   If_Result_26 := If_Result_25;
end if;
   If_Result_27 := If_Result_26;
end if;
   If_Result_28 := If_Result_27;
end if;
   If_Result_29 := If_Result_28;
end if;
   If_Result_30 := If_Result_29;
end if;
   If_Result_31 := If_Result_30;
end if;
   If_Result_32 := If_Result_31;
end if;
   If_Result_33 := If_Result_32;
end if;
   If_Result_34 := If_Result_33;
end if;
   If_Result_35 := If_Result_34;
end if;
   If_Result_36 := If_Result_35;
end if;
   If_Result_37 := If_Result_36;
end if;
   If_Result_38 := If_Result_37;
end if;
   If_Result_39 := If_Result_38;
end if;
   If_Result_40 := If_Result_39;
end if;
   If_Result_41 := If_Result_40;
end if;
   If_Result_42 := If_Result_41;
end if;
   If_Result_43 := If_Result_42;
end if;
   If_Result_44 := If_Result_43;
end if;
   If_Result_45 := If_Result_44;
end if;
   If_Result_46 := If_Result_45;
end if;
   If_Result_47 := If_Result_46;
end if;
   If_Result_48 := If_Result_47;
end if;
if If_Result_48 then
   --# expr-start 9655 '<LogicBinaryOp And at nodes.lkt:17227:13>' And_Pred_1 ada/nodes.lkt:17227
--# expr-start 9652 '<FieldAccess for sub_equation at nodes.lkt:17227:13>' Fld_32 ada/nodes.lkt:17227
--# expr-start 9651 '<FieldAccess for prefix at nodes.lkt:17227:13>' Fld_31 ada/nodes.lkt:17227
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9651
      if Fld_31.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_32 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_31.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_31.Info);
--# end
--# expr-done 9652
--# expr-start 9654 '<FieldAccess for universal_int_bind at nodes.lkt:17228:18>' Fld_34 ada/nodes.lkt:17228
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9653 '<FieldAccess for type_var at nodes.lkt:17228:42>' Fld_33 ada/nodes.lkt:17228
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9653
--# property-call-start AdaNode.universal_int_bind
Fld_34 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_33, Origin => Origin);
--# end
--# expr-done 9654
And_Pred_1 := Create_And (Fld_32, Fld_34, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17227:13") else null)); 
--# expr-done 9655
   If_Result_49 := And_Pred_1;
else
   --# expr-start 9745 '<If at nodes.lkt:17086:9>' If_Result_19 ada/nodes.lkt:17086
--# expr-start 9656 '<Symbol External_Tag at nodes.lkt:17229:26>' Sym_19 ada/nodes.lkt:17229
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_External_Tag); 
--# expr-done 9656
Is_Equal_19 := Local_Rel_Name = Sym_19; 
if Is_Equal_19 then
   If_Result_18 := True;
else
--# expr-start 9657 '<Symbol Type_Key at nodes.lkt:17229:44>' Sym_20 ada/nodes.lkt:17229
Sym_20 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Type_Key); 
--# expr-done 9657
Is_Equal_18 := Local_Rel_Name = Sym_20; 
   If_Result_18 := Is_Equal_18;
end if;
if If_Result_18 then
   --# expr-start 9663 '<LogicBinaryOp And at nodes.lkt:17231:13>' And_Pred_2 ada/nodes.lkt:17231
--# expr-start 9659 '<FieldAccess for sub_equation at nodes.lkt:17231:13>' Fld_36 ada/nodes.lkt:17231
--# expr-start 9658 '<FieldAccess for prefix at nodes.lkt:17231:13>' Fld_35 ada/nodes.lkt:17231
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_35 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9658
      if Fld_35.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_36 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_35.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_35.Info);
--# end
--# expr-done 9659
--# expr-start 9662 '<Bind at nodes.lkt:17232:18>' Bind_Result_2 ada/nodes.lkt:17232
--# expr-start 9660 '<FieldAccess for type_var at nodes.lkt:17232:18>' Fld_37 ada/nodes.lkt:17232
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_37 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9660
Fld_37.Value := No_Entity;
Entity_Vars.Reset (Fld_37);
--# expr-start 9661 '<FieldAccess for std_string_type at nodes.lkt:17232:37>' Fld_38 ada/nodes.lkt:17232
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_38 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 9661
      Cast_Result_6 := Create_Internal_Entity
        (Node => Fld_38.Node,
         Info => Fld_38.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_37, Cast_Result_6, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17232:18") else null)); 
--# expr-done 9662
And_Pred_2 := Create_And (Fld_36, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17231:13") else null)); 
--# expr-done 9663
   If_Result_19 := And_Pred_2;
else
   --# expr-start 9744 '<If at nodes.lkt:17086:9>' If_Result_17 ada/nodes.lkt:17086
--# expr-start 9665 '<Eq at nodes.lkt:17233:14>' Is_Equal_17 ada/nodes.lkt:17233
--# expr-start 9664 '<Symbol Target_Name at nodes.lkt:17233:26>' Sym_18 ada/nodes.lkt:17233
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Target_Name); 
--# expr-done 9664
Is_Equal_17 := Local_Rel_Name = Sym_18; 
--# expr-done 9665
if Is_Equal_17 then
   --# expr-start 9668 '<Bind at nodes.lkt:17234:14>' Bind_Result_3 ada/nodes.lkt:17234
--# expr-start 9666 '<FieldAccess for type_var at nodes.lkt:17234:14>' Fld_39 ada/nodes.lkt:17234
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_39 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9666
Fld_39.Value := No_Entity;
Entity_Vars.Reset (Fld_39);
--# expr-start 9667 '<FieldAccess for std_string_type at nodes.lkt:17234:33>' Fld_40 ada/nodes.lkt:17234
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_40 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 9667
      Cast_Result_7 := Create_Internal_Entity
        (Node => Fld_40.Node,
         Info => Fld_40.Info);
Bind_Result_3 := Solver.Create_Assign (Fld_39, Cast_Result_7, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17234:14") else null)); 
--# expr-done 9668
   If_Result_17 := Bind_Result_3;
else
   --# expr-start 9743 '<If at nodes.lkt:17086:9>' If_Result_16 ada/nodes.lkt:17086
--# expr-start 9670 '<Eq at nodes.lkt:17235:14>' Is_Equal_16 ada/nodes.lkt:17235
--# expr-start 9669 '<Symbol Storage_Pool at nodes.lkt:17235:26>' Sym_17 ada/nodes.lkt:17235
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Storage_Pool); 
--# expr-done 9669
Is_Equal_16 := Local_Rel_Name = Sym_17; 
--# expr-done 9670
if Is_Equal_16 then
   --# expr-start 9671 '<FieldAccess for storage_pool_equation at nodes.lkt:17235:47>' Fld_41 ada/nodes.lkt:17235
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.storage_pool_equation
Fld_41 := Libadalang.Implementation.Attribute_Ref_P_Storage_Pool_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9671
   If_Result_16 := Fld_41;
else
   --# expr-start 9742 '<If at nodes.lkt:17086:9>' If_Result_15 ada/nodes.lkt:17086
--# expr-start 9672 '<Symbol Bit_Order at nodes.lkt:17237:25>' Sym_14 ada/nodes.lkt:17237
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Bit_Order); 
--# expr-done 9672
Is_Equal_15 := Local_Rel_Name = Sym_14; 
if Is_Equal_15 then
   If_Result_14 := True;
else
--# expr-start 9673 '<Symbol Scalar_Storage_Order at nodes.lkt:17238:19>' Sym_15 ada/nodes.lkt:17238
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Scalar_Storage_Order); 
--# expr-done 9673
Is_Equal_14 := Local_Rel_Name = Sym_15; 
if Is_Equal_14 then
   If_Result_13 := True;
else
--# expr-start 9674 '<Symbol Default_Scalar_Storage_Order at nodes.lkt:17239:19>' Sym_16 ada/nodes.lkt:17239
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Default_Scalar_Storage_Order); 
--# expr-done 9674
Is_Equal_13 := Local_Rel_Name = Sym_16; 
   If_Result_13 := Is_Equal_13;
end if;
   If_Result_14 := If_Result_13;
end if;
if If_Result_14 then
   --# expr-start 9675 '<FieldAccess for order_equation at nodes.lkt:17239:56>' Fld_42 ada/nodes.lkt:17239
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.order_equation
Fld_42 := Libadalang.Implementation.Attribute_Ref_P_Order_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9675
   If_Result_15 := Fld_42;
else
   --# expr-start 9741 '<If at nodes.lkt:17086:9>' If_Result_12 ada/nodes.lkt:17086
--# expr-start 9677 '<Eq at nodes.lkt:17240:14>' Is_Equal_12 ada/nodes.lkt:17240
--# expr-start 9676 '<Symbol Type_Class at nodes.lkt:17240:26>' Sym_13 ada/nodes.lkt:17240
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Type_Class); 
--# expr-done 9676
Is_Equal_12 := Local_Rel_Name = Sym_13; 
--# expr-done 9677
if Is_Equal_12 then
   --# expr-start 9678 '<FieldAccess for type_class_equation at nodes.lkt:17240:45>' Fld_43 ada/nodes.lkt:17240
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.type_class_equation
Fld_43 := Libadalang.Implementation.Attribute_Ref_P_Type_Class_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9678
   If_Result_12 := Fld_43;
else
   --# expr-start 9740 '<If at nodes.lkt:17086:9>' If_Result_11 ada/nodes.lkt:17086
--# expr-start 9679 '<Symbol Callable at nodes.lkt:17243:26>' Sym_11 ada/nodes.lkt:17243
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Callable); 
--# expr-done 9679
Is_Equal_11 := Local_Rel_Name = Sym_11; 
if Is_Equal_11 then
   If_Result_10 := True;
else
--# expr-start 9680 '<Symbol Terminated at nodes.lkt:17243:40>' Sym_12 ada/nodes.lkt:17243
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Terminated); 
--# expr-done 9680
Is_Equal_10 := Local_Rel_Name = Sym_12; 
   If_Result_10 := Is_Equal_10;
end if;
if If_Result_10 then
   --# expr-start 9686 '<LogicBinaryOp And at nodes.lkt:17245:13>' And_Pred_3 ada/nodes.lkt:17245
--# expr-start 9682 '<FieldAccess for sub_equation at nodes.lkt:17245:13>' Fld_45 ada/nodes.lkt:17245
--# expr-start 9681 '<FieldAccess for prefix at nodes.lkt:17245:13>' Fld_44 ada/nodes.lkt:17245
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_44 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9681
      if Fld_44.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_45 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_44.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_44.Info);
--# end
--# expr-done 9682
--# expr-start 9685 '<Bind at nodes.lkt:17245:45>' Bind_Result_4 ada/nodes.lkt:17245
--# expr-start 9683 '<FieldAccess for type_var at nodes.lkt:17245:45>' Fld_46 ada/nodes.lkt:17245
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_46 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9683
Fld_46.Value := No_Entity;
Entity_Vars.Reset (Fld_46);
--# expr-start 9684 '<FieldAccess for bool_type at nodes.lkt:17245:64>' Fld_47 ada/nodes.lkt:17245
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_47 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 9684
      Cast_Result_8 := Create_Internal_Entity
        (Node => Fld_47.Node,
         Info => Fld_47.Info);
Bind_Result_4 := Solver.Create_Assign (Fld_46, Cast_Result_8, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17245:45") else null)); 
--# expr-done 9685
And_Pred_3 := Create_And (Fld_45, Bind_Result_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17245:13") else null)); 
--# expr-done 9686
   If_Result_11 := And_Pred_3;
else
   --# expr-start 9739 '<If at nodes.lkt:17086:9>' If_Result_9 ada/nodes.lkt:17086
--# expr-start 9688 '<Eq at nodes.lkt:17248:14>' Is_Equal_9 ada/nodes.lkt:17248
--# expr-start 9687 '<Symbol Count at nodes.lkt:17248:26>' Sym_10 ada/nodes.lkt:17248
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Count); 
--# expr-done 9687
Is_Equal_9 := Local_Rel_Name = Sym_10; 
--# expr-done 9688
if Is_Equal_9 then
   --# expr-start 9695 '<LogicBinaryOp And at nodes.lkt:17250:13>' And_Pred_4 ada/nodes.lkt:17250
--# expr-start 9692 '<Match at nodes.lkt:17250:13>' Match_Result ada/nodes.lkt:17250
--# expr-start 9689 '<FieldAccess for prefix at nodes.lkt:17250:19>' Fld_48 ada/nodes.lkt:17250
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_48 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9689
      if Fld_48.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_48; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Call_Expr =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Call_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_9; 
--# bind ce Match_0
--# expr-start 9690 '<FieldAccess for sub_equation at nodes.lkt:17253:38>' Fld_49 ada/nodes.lkt:17253
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_49 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_0.Info);
--# end
--# expr-done 9690
Let_Result := Fld_49; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3204;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Attribute_Ref | Ada_Defining_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_10; 
--# bind o Match_1
--# expr-start 9691 '<FieldAccess for xref_no_overloading at nodes.lkt:17256:27>' Fld_50 ada/nodes.lkt:17256
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_50 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Match_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_1.Info);
--# end
--# expr-done 9691
Let_Result_1 := Fld_50; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3205;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
end case;
--# expr-done 9692
--# expr-start 9694 '<FieldAccess for universal_int_bind at nodes.lkt:17258:18>' Fld_52 ada/nodes.lkt:17258
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9693 '<FieldAccess for type_var at nodes.lkt:17258:42>' Fld_51 ada/nodes.lkt:17258
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_51 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9693
--# property-call-start AdaNode.universal_int_bind
Fld_52 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_51, Origin => Origin);
--# end
--# expr-done 9694
And_Pred_4 := Create_And (Match_Result, Fld_52, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17250:13") else null)); 
--# expr-done 9695
   If_Result_9 := And_Pred_4;
else
   --# expr-start 9738 '<If at nodes.lkt:17086:9>' If_Result_8 ada/nodes.lkt:17086
--# expr-start 9697 '<Eq at nodes.lkt:17259:14>' Is_Equal_8 ada/nodes.lkt:17259
--# expr-start 9696 '<Symbol Caller at nodes.lkt:17259:26>' Sym_9 ada/nodes.lkt:17259
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Caller); 
--# expr-done 9696
Is_Equal_8 := Local_Rel_Name = Sym_9; 
--# expr-done 9697
if Is_Equal_8 then
   --# expr-start 9703 '<LogicBinaryOp And at nodes.lkt:17261:13>' And_Pred_5 ada/nodes.lkt:17261
--# expr-start 9699 '<FieldAccess for xref_no_overloading at nodes.lkt:17261:13>' Fld_54 ada/nodes.lkt:17261
--# expr-start 9698 '<FieldAccess for prefix at nodes.lkt:17261:13>' Fld_53 ada/nodes.lkt:17261
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_53 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9698
      if Fld_53.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_54 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_53.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_53.Info);
--# end
--# expr-done 9699
--# expr-start 9702 '<Bind at nodes.lkt:17262:18>' Bind_Result_5 ada/nodes.lkt:17262
--# expr-start 9700 '<FieldAccess for type_var at nodes.lkt:17262:18>' Fld_55 ada/nodes.lkt:17262
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_55 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9700
Fld_55.Value := No_Entity;
Entity_Vars.Reset (Fld_55);
--# expr-start 9701 '<FieldAccess for task_id_type at nodes.lkt:17262:37>' Fld_56 ada/nodes.lkt:17262
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.task_id_type
Fld_56 := Libadalang.Implementation.Ada_Node_P_Task_Id_Type (Node => Self);
--# end
--# expr-done 9701
      Cast_Result_11 := Create_Internal_Entity
        (Node => Fld_56.Node,
         Info => Fld_56.Info);
Bind_Result_5 := Solver.Create_Assign (Fld_55, Cast_Result_11, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17262:18") else null)); 
--# expr-done 9702
And_Pred_5 := Create_And (Fld_54, Bind_Result_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17261:13") else null)); 
--# expr-done 9703
   If_Result_8 := And_Pred_5;
else
   --# expr-start 9737 '<If at nodes.lkt:17086:9>' If_Result_7 ada/nodes.lkt:17086
--# expr-start 9705 '<Eq at nodes.lkt:17263:14>' Is_Equal_7 ada/nodes.lkt:17263
--# expr-start 9704 '<Symbol Machine_Radix at nodes.lkt:17263:26>' Sym_8 ada/nodes.lkt:17263
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Radix); 
--# expr-done 9704
Is_Equal_7 := Local_Rel_Name = Sym_8; 
--# expr-done 9705
if Is_Equal_7 then
   --# expr-start 9706 '<FieldAccess for universal_int_equation at nodes.lkt:17263:48>' Fld_57 ada/nodes.lkt:17263
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.universal_int_equation
Fld_57 := Libadalang.Implementation.Attribute_Ref_P_Universal_Int_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9706
   If_Result_7 := Fld_57;
else
   --# expr-start 9736 '<If at nodes.lkt:17086:9>' If_Result_6 ada/nodes.lkt:17086
--# expr-start 9708 '<Eq at nodes.lkt:17264:14>' Is_Equal_6 ada/nodes.lkt:17264
--# expr-start 9707 '<Symbol To_Address at nodes.lkt:17264:26>' Sym_7 ada/nodes.lkt:17264
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_To_Address); 
--# expr-done 9707
Is_Equal_6 := Local_Rel_Name = Sym_7; 
--# expr-done 9708
if Is_Equal_6 then
   --# expr-start 9709 '<FieldAccess for to_address_equation at nodes.lkt:17264:45>' Fld_58 ada/nodes.lkt:17264
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.to_address_equation
Fld_58 := Libadalang.Implementation.Attribute_Ref_P_To_Address_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9709
   If_Result_6 := Fld_58;
else
   --# expr-start 9735 '<If at nodes.lkt:17086:9>' If_Result_5 ada/nodes.lkt:17086
--# expr-start 9711 '<Eq at nodes.lkt:17265:14>' Is_Equal_5 ada/nodes.lkt:17265
--# expr-start 9710 '<Symbol Index at nodes.lkt:17265:26>' Sym_6 ada/nodes.lkt:17265
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Index); 
--# expr-done 9710
Is_Equal_5 := Local_Rel_Name = Sym_6; 
--# expr-done 9711
if Is_Equal_5 then
   --# expr-start 9712 '<FieldAccess for index_equation at nodes.lkt:17265:40>' Fld_59 ada/nodes.lkt:17265
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.index_equation
Fld_59 := Libadalang.Implementation.Attribute_Ref_P_Index_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9712
   If_Result_5 := Fld_59;
else
   --# expr-start 9734 '<If at nodes.lkt:17086:9>' If_Result_4 ada/nodes.lkt:17086
--# expr-start 9714 '<Eq at nodes.lkt:17266:14>' Is_Equal_4 ada/nodes.lkt:17266
--# expr-start 9713 '<Symbol Abort_Signal at nodes.lkt:17266:26>' Sym_5 ada/nodes.lkt:17266
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abort_Signal); 
--# expr-done 9713
Is_Equal_4 := Local_Rel_Name = Sym_5; 
--# expr-done 9714
if Is_Equal_4 then
   --# expr-start 9721 '<LogicBinaryOp And at nodes.lkt:17268:13>' And_Pred_6 ada/nodes.lkt:17268
--# expr-start 9718 '<Bind at nodes.lkt:17268:13>' Bind_Result_6 ada/nodes.lkt:17268
--# expr-start 9715 '<FieldAccess for ref_var at nodes.lkt:17268:13>' Fld_60 ada/nodes.lkt:17268
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_60 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 9715
Fld_60.Value := No_Entity;
Entity_Vars.Reset (Fld_60);
--# expr-start 9717 '<FieldAccess for std_entity at nodes.lkt:17268:31>' Fld_61 ada/nodes.lkt:17268
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9716 '<Symbol abort_signal_ at nodes.lkt:17268:47>' Sym ada/nodes.lkt:17268
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abort_Signal_315); 
--# expr-done 9716
--# property-call-start AdaNode.std_entity
Fld_61 := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 9717
Bind_Result_6 := Solver.Create_Assign (Fld_60, Fld_61, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17268:13") else null)); 
--# expr-done 9718
--# expr-start 9720 '<Bind at nodes.lkt:17269:18>' Bind_Result_7 ada/nodes.lkt:17269
--# expr-start 9719 '<FieldAccess for type_var at nodes.lkt:17269:18>' Fld_62 ada/nodes.lkt:17269
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_62 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9719
Fld_62.Value := No_Entity;
Entity_Vars.Reset (Fld_62);
Cast_Expr := No_Entity_Base_Type_Decl; 
      Cast_Result_12 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result_7 := Solver.Create_Assign (Fld_62, Cast_Result_12, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17269:18") else null)); 
--# expr-done 9720
And_Pred_6 := Create_And (Bind_Result_6, Bind_Result_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17268:13") else null)); 
--# expr-done 9721
   If_Result_4 := And_Pred_6;
else
   --# expr-start 9733 '<If at nodes.lkt:17086:9>' If_Result_3 ada/nodes.lkt:17086
--# expr-start 9722 '<Symbol Has_Same_Storage at nodes.lkt:17270:26>' Sym_3 ada/nodes.lkt:17270
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Has_Same_Storage); 
--# expr-done 9722
Is_Equal_3 := Local_Rel_Name = Sym_3; 
if Is_Equal_3 then
   If_Result_2 := True;
else
--# expr-start 9723 '<Symbol Overlaps_Storage at nodes.lkt:17270:48>' Sym_4 ada/nodes.lkt:17270
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Overlaps_Storage); 
--# expr-done 9723
Is_Equal_2 := Local_Rel_Name = Sym_4; 
   If_Result_2 := Is_Equal_2;
end if;
if If_Result_2 then
   --# expr-start 9724 '<FieldAccess for storage_equation at nodes.lkt:17271:14>' Fld_63 ada/nodes.lkt:17271
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.storage_equation
Fld_63 := Libadalang.Implementation.Attribute_Ref_P_Storage_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9724
   If_Result_3 := Fld_63;
else
   --# expr-start 9732 '<If at nodes.lkt:17086:9>' If_Result_1 ada/nodes.lkt:17086
--# expr-start 9726 '<Eq at nodes.lkt:17272:14>' Is_Equal_1 ada/nodes.lkt:17272
--# expr-start 9725 '<Symbol Deref at nodes.lkt:17272:26>' Sym_2 ada/nodes.lkt:17272
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Deref); 
--# expr-done 9725
Is_Equal_1 := Local_Rel_Name = Sym_2; 
--# expr-done 9726
if Is_Equal_1 then
   --# expr-start 9727 '<FieldAccess for deref_equation at nodes.lkt:17272:40>' Fld_64 ada/nodes.lkt:17272
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.deref_equation
Fld_64 := Libadalang.Implementation.Attribute_Ref_P_Deref_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9727
   If_Result_1 := Fld_64;
else
   --# expr-start 9731 '<If at nodes.lkt:17086:9>' If_Result ada/nodes.lkt:17086
--# expr-start 9729 '<Eq at nodes.lkt:17273:14>' Is_Equal ada/nodes.lkt:17273
--# expr-start 9728 '<Symbol Mechanism_Code at nodes.lkt:17273:26>' Sym_1 ada/nodes.lkt:17273
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mechanism_Code); 
--# expr-done 9728
Is_Equal := Local_Rel_Name = Sym_1; 
--# expr-done 9729
if Is_Equal then
   --# expr-start 9730 '<FieldAccess for mechanism_code_equation at nodes.lkt:17273:49>' Fld_65 ada/nodes.lkt:17273
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.mechanism_code_equation
Fld_65 := Libadalang.Implementation.Attribute_Ref_P_Mechanism_Code_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 9730
   If_Result := Fld_65;
else
   If_Result := raise Property_Error with "Unhandled attribute";
end if;
      Inc_Ref (If_Result);
--# expr-done 9731
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 9732
   If_Result_3 := If_Result_1;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 9733
   If_Result_4 := If_Result_3;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 9734
   If_Result_5 := If_Result_4;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 9735
   If_Result_6 := If_Result_5;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 9736
   If_Result_7 := If_Result_6;
end if;
      Inc_Ref (If_Result_7);
--# expr-done 9737
   If_Result_8 := If_Result_7;
end if;
      Inc_Ref (If_Result_8);
--# expr-done 9738
   If_Result_9 := If_Result_8;
end if;
      Inc_Ref (If_Result_9);
--# expr-done 9739
   If_Result_11 := If_Result_9;
end if;
      Inc_Ref (If_Result_11);
--# expr-done 9740
   If_Result_12 := If_Result_11;
end if;
      Inc_Ref (If_Result_12);
--# expr-done 9741
   If_Result_15 := If_Result_12;
end if;
      Inc_Ref (If_Result_15);
--# expr-done 9742
   If_Result_16 := If_Result_15;
end if;
      Inc_Ref (If_Result_16);
--# expr-done 9743
   If_Result_17 := If_Result_16;
end if;
      Inc_Ref (If_Result_17);
--# expr-done 9744
   If_Result_19 := If_Result_17;
end if;
      Inc_Ref (If_Result_19);
--# expr-done 9745
   If_Result_49 := If_Result_19;
end if;
      Inc_Ref (If_Result_49);
--# expr-done 9746
   If_Result_50 := If_Result_49;
end if;
      Inc_Ref (If_Result_50);
--# expr-done 9747
   If_Result_67 := If_Result_50;
end if;
      Inc_Ref (If_Result_67);
--# expr-done 9748
   If_Result_69 := If_Result_67;
end if;
      Inc_Ref (If_Result_69);
--# expr-done 9749
   If_Result_71 := If_Result_69;
end if;
      Inc_Ref (If_Result_71);
--# expr-done 9750
   If_Result_72 := If_Result_71;
end if;
      Inc_Ref (If_Result_72);
--# expr-done 9751
   If_Result_73 := If_Result_72;
end if;
      Inc_Ref (If_Result_73);
--# expr-done 9752
   If_Result_74 := If_Result_73;
end if;
      Inc_Ref (If_Result_74);
--# expr-done 9753
   If_Result_84 := If_Result_74;
end if;
      Inc_Ref (If_Result_84);
--# expr-done 9754
   If_Result_86 := If_Result_84;
end if;
      Inc_Ref (If_Result_86);
--# expr-done 9755
   If_Result_87 := If_Result_86;
end if;
      Inc_Ref (If_Result_87);
--# expr-done 9756
   If_Result_90 := If_Result_87;
end if;
      Inc_Ref (If_Result_90);
--# expr-done 9757
   If_Result_91 := If_Result_90;
end if;
      Inc_Ref (If_Result_91);
--# expr-done 9758
   If_Result_92 := If_Result_91;
end if;
      Inc_Ref (If_Result_92);
--# expr-done 9759
   If_Result_93 := If_Result_92;
end if;
      Inc_Ref (If_Result_93);
--# expr-done 9760
   If_Result_94 := If_Result_93;
end if;
      Inc_Ref (If_Result_94);
--# expr-done 9761
   If_Result_97 := If_Result_94;
end if;
      Inc_Ref (If_Result_97);
--# expr-done 9762
   If_Result_104 := If_Result_97;
end if;
      Inc_Ref (If_Result_104);
--# expr-done 9763
   If_Result_106 := If_Result_104;
end if;
      Inc_Ref (If_Result_106);
--# expr-done 9764
   If_Result_143 := If_Result_106;
end if;
      Inc_Ref (If_Result_143);
--# expr-done 9765
   If_Result_147 := If_Result_143;
end if;
      Inc_Ref (If_Result_147);
--# expr-done 9766
Let_Result_2 := If_Result_147; Inc_Ref (Let_Result_2);
--# end
--# expr-done 9767
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1164;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1164;
                     Finalizer_Scope_3204;
                     Finalizer_Scope_3205;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Xref_Equation;
--# end
--# property-start AttributeRef.attribute_subprogram_equation ada/nodes.lkt:17279
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Attribute_Subprogram_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1165 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1165 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1165;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9773 '<LogicBinaryOp And at nodes.lkt:17280:9>' And_Pred ada/nodes.lkt:17280
--# expr-start 9769 '<FieldAccess for xref_type_equation at nodes.lkt:17280:9>' Fld_1 ada/nodes.lkt:17280
--# expr-start 9768 '<FieldAccess for prefix at nodes.lkt:17280:9>' Fld ada/nodes.lkt:17280
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9768
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_1 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 9769
--# expr-start 9772 '<Bind at nodes.lkt:17281:14>' Bind_Result ada/nodes.lkt:17281
--# expr-start 9770 '<FieldAccess for ref_var at nodes.lkt:17281:14>' Fld_2 ada/nodes.lkt:17281
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 9770
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 9771 '<FieldAccess for attribute_subprogram at nodes.lkt:17281:32>' Fld_3 ada/nodes.lkt:17281
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.attribute_subprogram
Fld_3 := Libadalang.Implementation.Attribute_Ref_P_Attribute_Subprogram (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9771
      Cast_Result := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Bind_Result := Solver.Create_Assign (Fld_2, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17281:14") else null)); 
--# expr-done 9772
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17280:9") else null)); 
--# expr-done 9773
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1165;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1165;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Attribute_Subprogram_Equation;
--# end
--# property-start AttributeRef.type_class_equation ada/nodes.lkt:17286
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Type_Class_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1166 with Inline_Always;
            procedure Finalizer_Scope_3206 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_245 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1166 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1166;
            procedure Finalizer_Scope_3206 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3206;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9787 '<Let at nodes.lkt:17287:9>' Let_Result ada/nodes.lkt:17287
--# scope-start
--# expr-start 9781 '<Cast to BaseTypeDecl at nodes.lkt:17288:13>' Cast_Result ada/nodes.lkt:17288
--# expr-start 9777 '<FieldAccess for get_unit_root_decl at nodes.lkt:17288:13>' Fld ada/nodes.lkt:17288
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9776 '<ArrayLiteral at nodes.lkt:17289:17>' Array_Lit ada/nodes.lkt:17289
--# expr-start 9774 '<Symbol System at nodes.lkt:17289:18>' Sym ada/nodes.lkt:17289
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_System); 
--# expr-done 9774
--# expr-start 9775 '<Symbol Aux_DEC at nodes.lkt:17289:29>' Sym_1 ada/nodes.lkt:17289
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Aux_Dec); 
--# expr-done 9775
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 9776
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Ent.Node, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 9777
Var_Expr_245 := Fld;
if Var_Expr_245 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 9780 '<EnvGet at nodes.lkt:17288:13>' Env_Get_Result ada/nodes.lkt:17288
--# expr-start 9778 '<FieldAccess for children_env at nodes.lkt:17288:13>' Fld_1 ada/nodes.lkt:17288
      if Var_Expr_245 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_245);
--# expr-done 9778
--# expr-start 9779 '<Symbol Type_Class at nodes.lkt:17293:24>' Sym_2 ada/nodes.lkt:17293
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Type_Class); 
--# expr-done 9779
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 9780
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_3206;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 9781
Local_Typ := Cast_Result; 
--# bind typ Local_Typ
--# expr-start 9786 '<LogicBinaryOp And at nodes.lkt:17296:9>' And_Pred ada/nodes.lkt:17296
--# expr-start 9783 '<FieldAccess for xref_equation at nodes.lkt:17296:9>' Fld_3 ada/nodes.lkt:17296
--# expr-start 9782 '<FieldAccess for prefix at nodes.lkt:17296:9>' Fld_2 ada/nodes.lkt:17296
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9782
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 9783
--# expr-start 9785 '<Bind at nodes.lkt:17296:42>' Bind_Result ada/nodes.lkt:17296
--# expr-start 9784 '<FieldAccess for type_var at nodes.lkt:17296:42>' Fld_4 ada/nodes.lkt:17296
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9784
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Cast_Expr := Local_Typ; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17296:42") else null)); 
--# expr-done 9785
And_Pred := Create_And (Fld_3, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17296:9") else null)); 
--# expr-done 9786
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 9787
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1166;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1166;
                     Finalizer_Scope_3206;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Type_Class_Equation;
--# end
--# property-start AttributeRef.storage_pool_equation ada/nodes.lkt:17301
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Storage_Pool_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1167 with Inline_Always;
            procedure Finalizer_Scope_3207 with Inline_Always;
      Local_Typ : Internal_Entity_Classwide_Type_Decl;
Var_Expr_246 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Classwide_Type_Decl;
Fld_3 : Internal_Entity_Name;
Fld_4 : Logic_Equation;
Fld_5 : Logic_Var;
Cast_Expr : Internal_Entity_Classwide_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1167 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1167;
            procedure Finalizer_Scope_3207 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3207;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9802 '<Let at nodes.lkt:17302:9>' Let_Result ada/nodes.lkt:17302
--# scope-start
--# expr-start 9796 '<FieldAccess for classwide_type at nodes.lkt:17303:13>' Fld_2 ada/nodes.lkt:17303
--# expr-start 9795 '<Cast to BaseTypeDecl at nodes.lkt:17303:13>' Cast_Result ada/nodes.lkt:17303
--# expr-start 9791 '<FieldAccess for get_unit_root_decl at nodes.lkt:17303:13>' Fld ada/nodes.lkt:17303
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9790 '<ArrayLiteral at nodes.lkt:17304:17>' Array_Lit ada/nodes.lkt:17304
--# expr-start 9788 '<Symbol System at nodes.lkt:17304:18>' Sym ada/nodes.lkt:17304
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_System); 
--# expr-done 9788
--# expr-start 9789 '<Symbol Storage_Pools at nodes.lkt:17304:29>' Sym_1 ada/nodes.lkt:17304
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Storage_Pools); 
--# expr-done 9789
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 9790
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Ent.Node, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 9791
Var_Expr_246 := Fld;
if Var_Expr_246 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 9794 '<EnvGet at nodes.lkt:17303:13>' Env_Get_Result ada/nodes.lkt:17303
--# expr-start 9792 '<FieldAccess for children_env at nodes.lkt:17303:13>' Fld_1 ada/nodes.lkt:17303
      if Var_Expr_246 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_246);
--# expr-done 9792
--# expr-start 9793 '<Symbol Root_Storage_Pool at nodes.lkt:17308:24>' Sym_2 ada/nodes.lkt:17308
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Root_Storage_Pool); 
--# expr-done 9793
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 9794
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_3207;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 9795
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 9796
Local_Typ := Fld_2; 
--# bind typ Local_Typ
--# expr-start 9801 '<LogicBinaryOp And at nodes.lkt:17312:9>' And_Pred ada/nodes.lkt:17312
--# expr-start 9798 '<FieldAccess for xref_equation at nodes.lkt:17312:9>' Fld_4 ada/nodes.lkt:17312
--# expr-start 9797 '<FieldAccess for prefix at nodes.lkt:17312:9>' Fld_3 ada/nodes.lkt:17312
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9797
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_4 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 9798
--# expr-start 9800 '<Bind at nodes.lkt:17312:42>' Bind_Result ada/nodes.lkt:17312
--# expr-start 9799 '<FieldAccess for type_var at nodes.lkt:17312:42>' Fld_5 ada/nodes.lkt:17312
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9799
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr := Local_Typ; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17312:42") else null)); 
--# expr-done 9800
And_Pred := Create_And (Fld_4, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17312:9") else null)); 
--# expr-done 9801
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 9802
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1167;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1167;
                     Finalizer_Scope_3207;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Storage_Pool_Equation;
--# end
--# property-start AttributeRef.order_equation ada/nodes.lkt:17317
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Order_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1168 with Inline_Always;
            procedure Finalizer_Scope_3208 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_247 : Bare_Basic_Decl;
Sym : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_1 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1168 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1168;
            procedure Finalizer_Scope_3208 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3208;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9815 '<Let at nodes.lkt:17318:9>' Let_Result ada/nodes.lkt:17318
--# scope-start
--# expr-start 9809 '<Cast to BaseTypeDecl at nodes.lkt:17319:13>' Cast_Result ada/nodes.lkt:17319
--# expr-start 9805 '<FieldAccess for get_unit_root_decl at nodes.lkt:17319:13>' Fld ada/nodes.lkt:17319
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9804 '<ArrayLiteral at nodes.lkt:17320:17>' Array_Lit ada/nodes.lkt:17320
--# expr-start 9803 '<Symbol System at nodes.lkt:17320:18>' Sym ada/nodes.lkt:17320
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_System); 
--# expr-done 9803
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym)); 
--# expr-done 9804
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Ent.Node, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 9805
Var_Expr_247 := Fld;
if Var_Expr_247 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 9808 '<EnvGet at nodes.lkt:17319:13>' Env_Get_Result ada/nodes.lkt:17319
--# expr-start 9806 '<FieldAccess for children_env at nodes.lkt:17319:13>' Fld_1 ada/nodes.lkt:17319
      if Var_Expr_247 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_247);
--# expr-done 9806
--# expr-start 9807 '<Symbol Bit_Order at nodes.lkt:17324:24>' Sym_1 ada/nodes.lkt:17324
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Bit_Order); 
--# expr-done 9807
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_1), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 9808
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_3208;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 9809
Local_Typ := Cast_Result; 
--# bind typ Local_Typ
--# expr-start 9814 '<LogicBinaryOp And at nodes.lkt:17327:9>' And_Pred ada/nodes.lkt:17327
--# expr-start 9811 '<FieldAccess for xref_equation at nodes.lkt:17327:9>' Fld_3 ada/nodes.lkt:17327
--# expr-start 9810 '<FieldAccess for prefix at nodes.lkt:17327:9>' Fld_2 ada/nodes.lkt:17327
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9810
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 9811
--# expr-start 9813 '<Bind at nodes.lkt:17327:42>' Bind_Result ada/nodes.lkt:17327
--# expr-start 9812 '<FieldAccess for type_var at nodes.lkt:17327:42>' Fld_4 ada/nodes.lkt:17327
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9812
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Cast_Expr := Local_Typ; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17327:42") else null)); 
--# expr-done 9813
And_Pred := Create_And (Fld_3, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17327:9") else null)); 
--# expr-done 9814
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 9815
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1168;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1168;
                     Finalizer_Scope_3208;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Order_Equation;
--# end
--# property-start AttributeRef.bind_to_prefix_eq ada/nodes.lkt:17331
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Bind_To_Prefix_Eq
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1169 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Logic_Var;
Fld_2 : Logic_Var;
Bind_Result : Logic_Equation;
Fld_3 : Internal_Entity_Name;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Logic_Var;
Fld_6 : Bare_Name;
Fld_7 : Logic_Var;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1169 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1169;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9827 '<LogicBinaryOp And at nodes.lkt:17332:9>' And_Pred_1 ada/nodes.lkt:17332
--# expr-start 9822 '<LogicBinaryOp And at nodes.lkt:17332:9>' And_Pred ada/nodes.lkt:17332
--# expr-start 9819 '<Bind at nodes.lkt:17332:9>' Bind_Result ada/nodes.lkt:17332
--# expr-start 9817 '<FieldAccess for expected_type_var at nodes.lkt:17332:9>' Fld_1 ada/nodes.lkt:17332
--# expr-start 9816 '<FieldAccess for prefix at nodes.lkt:17332:9>' Fld ada/nodes.lkt:17332
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Attribute_Ref_F_Prefix;
--# expr-done 9816
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld);
--# expr-done 9817
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 9818 '<FieldAccess for expected_type_var at nodes.lkt:17332:45>' Fld_2 ada/nodes.lkt:17332
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 9818
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result := Solver.Create_Unify (Fld_1, Fld_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17332:9") else null)); 
--# expr-done 9819
--# expr-start 9821 '<FieldAccess for sub_equation at nodes.lkt:17333:14>' Fld_4 ada/nodes.lkt:17333
--# expr-start 9820 '<FieldAccess for prefix at nodes.lkt:17333:14>' Fld_3 ada/nodes.lkt:17333
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9820
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 9821
And_Pred := Create_And (Bind_Result, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17332:9") else null)); 
--# expr-done 9822
--# expr-start 9826 '<Bind at nodes.lkt:17334:14>' Bind_Result_1 ada/nodes.lkt:17334
--# expr-start 9823 '<FieldAccess for type_var at nodes.lkt:17334:14>' Fld_5 ada/nodes.lkt:17334
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9823
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 9825 '<FieldAccess for type_var at nodes.lkt:17334:34>' Fld_7 ada/nodes.lkt:17334
--# expr-start 9824 '<FieldAccess for prefix at nodes.lkt:17334:34>' Fld_6 ada/nodes.lkt:17334
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9824
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_6);
--# expr-done 9825
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
Bind_Result_1 := Solver.Create_Unify (Fld_5, Fld_7, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17334:14") else null)); 
--# expr-done 9826
And_Pred_1 := Create_And (And_Pred, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17332:9") else null)); 
--# expr-done 9827
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1169;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1169;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Bind_To_Prefix_Eq;
--# end
--# property-start AttributeRef.result_attr_equation ada/nodes.lkt:17337
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Result_Attr_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1170 with Inline_Always;
      Local_Containing_Decl : Internal_Entity_Basic_Decl;
Var_Expr_1 : Bare_Concrete_Type_Decl;
Local_Returns : Internal_Entity_Base_Type_Decl;
Match_0 : Internal_Entity_Concrete_Type_Decl;
Match_1 : Internal_Entity_Basic_Decl;
Var_Expr_2 : Internal_Entity_Base_Subp_Spec;
Env_Node : Bare_Ada_Node;
Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Concrete_Type_Decl;
Fld : Bare_Type_Def;
Is_A_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
Find_Result : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Type_Def;
Cast_Result_2 : Internal_Entity_Access_To_Subp_Def;
Fld_2 : Internal_Entity_Subp_Spec;
Fld_3 : Internal_Entity_Base_Subp_Spec;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity_Concrete_Type_Decl;
Cast_Result_4 : Internal_Entity_Base_Subp_Spec;
Let_Result : Internal_Entity_Base_Subp_Spec;
Scope_Result_1 : Internal_Entity_Base_Subp_Spec;
Cast_Result_5 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Base_Subp_Spec;
Scope_Result_2 : Internal_Entity_Base_Subp_Spec;
Match_Result : Internal_Entity_Base_Subp_Spec;
Fld_4 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Fld_5 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_6 : Internal_Entity_Name;
Fld_7 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Basic_Decl;
Cast_Result_7 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
            procedure Finalizer_Scope_1170 is
            begin
                     Dec_Ref (Node_Parents);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_1170;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9851 '<Let at nodes.lkt:17342:9>' Let_Result_3 ada/nodes.lkt:17342
--# scope-start
--# expr-start 9837 '<Cast to BasicDecl at nodes.lkt:17343:13>' Cast_Result_1 ada/nodes.lkt:17343
--# expr-start 9836 '<as_entity at nodes.lkt:17343:13>' If_Result_1 ada/nodes.lkt:17343
--# expr-start 9835 '<Find at nodes.lkt:17343:13>' Find_Result ada/nodes.lkt:17343
   --# expr-start 9829 '<FieldAccess for parents at nodes.lkt:17343:13>' Node_Parents ada/nodes.lkt:17343
--# expr-start 9828 '<env_node at nodes.lkt:17343:13>' Env_Node ada/nodes.lkt:17343
Env_Node := AST_Envs.Env_Node (Env); 
--# expr-done 9828
      if Env_Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Env_Node, True); 
--# expr-done 9829
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 9834 '<BooleanBinaryOp Or at nodes.lkt:17345:17>' If_Result ada/nodes.lkt:17345
--# expr-start 9830 '<IsA BasicSubpDecl, BaseSubpBody at nodes.lkt:17345:17>' Is_A ada/nodes.lkt:17345
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Basic_Subp_Decl | Ada_Base_Subp_Body; 
--# expr-done 9830
if Is_A then
   If_Result := True;
else
--# expr-start 9831 '<Cast to ConcreteTypeDecl at nodes.lkt:17346:20>' Cast_Result ada/nodes.lkt:17346
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Concrete_Type_Decl_Range
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 9831
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 9833 '<IsA AccessToSubpDef at nodes.lkt:17347:29>' Is_A_1 ada/nodes.lkt:17347
--# expr-start 9832 '<FieldAccess for type_def at nodes.lkt:17347:29>' Fld ada/nodes.lkt:17347
      if Var_Expr_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Var_Expr_1.Type_Decl_F_Type_Def;
--# expr-done 9832
Is_A_1 := Fld /= null 
and then Fld.Kind in Ada_Access_To_Subp_Def_Range; 
--# expr-done 9833
Scope_Result := Is_A_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 9834
      if If_Result then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when If_Result;
         end loop;
      end;
--# expr-done 9835
Is_Null := Find_Result = null; 
if Is_Null then
   If_Result_1 := No_Entity;
else
As_Entity := (Info => E_Info, Node => Find_Result); 
   If_Result_1 := As_Entity;
end if;
--# expr-done 9836
   if If_Result_1.Node = null
      or else If_Result_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => If_Result_1.Node,
         Info => If_Result_1.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 9837
Local_Containing_Decl := Cast_Result_1; 
--# bind containing_decl Local_Containing_Decl
--# expr-start 9850 '<Let at nodes.lkt:17352:9>' Let_Result_2 ada/nodes.lkt:17352
--# scope-start
--# expr-start 9842 '<Match at nodes.lkt:17353:13>' Match_Result ada/nodes.lkt:17353
      if Local_Containing_Decl.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Local_Containing_Decl; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Concrete_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Concrete_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_3; 
--# bind sd Match_0
--# expr-start 9840 '<FieldAccess for subp_spec at nodes.lkt:17355:21>' Fld_2 ada/nodes.lkt:17355
--# expr-start 9839 '<Cast to AccessToSubpDef at nodes.lkt:17355:21>' Cast_Result_2 ada/nodes.lkt:17355
--# expr-start 9838 '<FieldAccess for type_def at nodes.lkt:17355:21>' Fld_1 ada/nodes.lkt:17355
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Def (Node => Match_0.Node.Type_Decl_F_Type_Def, Info => Match_0.Info);
--# expr-done 9838
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Access_To_Subp_Def_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result_2 := No_Entity_Access_To_Subp_Def;
   end if;
--# expr-done 9839
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Subp_Spec (Node => Cast_Result_2.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Cast_Result_2.Info);
--# expr-done 9840
      Cast_Result_4 := Create_Internal_Entity_Base_Subp_Spec
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Let_Result := Cast_Result_4; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Synth_Anonymous_Type_Decl | Ada_Formal_Type_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_5; 
--# bind bd Match_1
--# expr-start 9841 '<FieldAccess for subp_spec_or_null at nodes.lkt:17356:39>' Fld_3 ada/nodes.lkt:17356
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 9841
Let_Result_1 := Fld_3; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 9842
Var_Expr_2 := Match_Result;
if Var_Expr_2 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_2
--# expr-start 9843 '<FieldAccess for return_type at nodes.lkt:17358:25>' Fld_4 ada/nodes.lkt:17358
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_4 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Var_Expr_2.Node, Origin => Origin, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 9843
Scope_Result_3 := Fld_4;
   --# end
   Result_Var_1 := Scope_Result_3;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Local_Returns := Result_Var_1; 
--# bind returns Local_Returns
--# expr-start 9849 '<LogicBinaryOp And at nodes.lkt:17360:9>' And_Pred ada/nodes.lkt:17360
--# expr-start 9845 '<Bind at nodes.lkt:17360:9>' Bind_Result ada/nodes.lkt:17360
--# expr-start 9844 '<FieldAccess for type_var at nodes.lkt:17360:9>' Fld_5 ada/nodes.lkt:17360
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9844
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr_1 := Local_Returns; 
      Cast_Result_6 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result_6, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17360:9") else null)); 
--# expr-done 9845
--# expr-start 9848 '<Bind at nodes.lkt:17361:14>' Bind_Result_1 ada/nodes.lkt:17361
--# expr-start 9847 '<FieldAccess for ref_var at nodes.lkt:17361:14>' Fld_7 ada/nodes.lkt:17361
--# expr-start 9846 '<FieldAccess for prefix at nodes.lkt:17361:14>' Fld_6 ada/nodes.lkt:17361
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9846
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_7 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_6.Node);
--# end
--# expr-done 9847
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
Cast_Expr_2 := Local_Containing_Decl; 
      Cast_Result_7 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_7, Cast_Result_7, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17361:14") else null)); 
--# expr-done 9848
And_Pred := Create_And (Bind_Result, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17360:9") else null)); 
--# expr-done 9849
Let_Result_2 := And_Pred; Inc_Ref (Let_Result_2);
--# end
--# expr-done 9850
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 9851
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1170;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1170;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Result_Attr_Equation;
--# end
--# property-start AttributeRef.tag_attr_equation ada/nodes.lkt:17365
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Tag_Attr_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1171 with Inline_Always;
            procedure Finalizer_Scope_3214 with Inline_Always;
      Local_Tag_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_248 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1171 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1171;
            procedure Finalizer_Scope_3214 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3214;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9865 '<Let at nodes.lkt:17366:9>' Let_Result ada/nodes.lkt:17366
--# scope-start
--# expr-start 9859 '<Cast to BaseTypeDecl at nodes.lkt:17367:13>' Cast_Result ada/nodes.lkt:17367
--# expr-start 9855 '<FieldAccess for get_unit_root_decl at nodes.lkt:17367:13>' Fld ada/nodes.lkt:17367
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9854 '<ArrayLiteral at nodes.lkt:17368:17>' Array_Lit ada/nodes.lkt:17368
--# expr-start 9852 '<Symbol Ada at nodes.lkt:17368:18>' Sym ada/nodes.lkt:17368
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ada); 
--# expr-done 9852
--# expr-start 9853 '<Symbol Tags at nodes.lkt:17368:26>' Sym_1 ada/nodes.lkt:17368
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Tags); 
--# expr-done 9853
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 9854
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Ent.Node, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 9855
Var_Expr_248 := Fld;
if Var_Expr_248 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 9858 '<EnvGet at nodes.lkt:17367:13>' Env_Get_Result ada/nodes.lkt:17367
--# expr-start 9856 '<FieldAccess for children_env at nodes.lkt:17367:13>' Fld_1 ada/nodes.lkt:17367
      if Var_Expr_248 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_248);
--# expr-done 9856
--# expr-start 9857 '<Symbol Tag at nodes.lkt:17372:24>' Sym_2 ada/nodes.lkt:17372
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Tag); 
--# expr-done 9857
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 9858
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_3214;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 9859
Local_Tag_Type := Cast_Result; 
--# bind tag_type Local_Tag_Type
--# expr-start 9864 '<LogicBinaryOp And at nodes.lkt:17376:9>' And_Pred ada/nodes.lkt:17376
--# expr-start 9861 '<FieldAccess for xref_equation at nodes.lkt:17376:9>' Fld_3 ada/nodes.lkt:17376
--# expr-start 9860 '<FieldAccess for prefix at nodes.lkt:17376:9>' Fld_2 ada/nodes.lkt:17376
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9860
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 9861
--# expr-start 9863 '<Bind at nodes.lkt:17379:14>' Bind_Result ada/nodes.lkt:17379
--# expr-start 9862 '<FieldAccess for type_var at nodes.lkt:17379:14>' Fld_4 ada/nodes.lkt:17379
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9862
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Cast_Expr := Local_Tag_Type; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17379:14") else null)); 
--# expr-done 9863
And_Pred := Create_And (Fld_3, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17376:9") else null)); 
--# expr-done 9864
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 9865
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1171;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1171;
                     Finalizer_Scope_3214;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Tag_Attr_Equation;
--# end
--# property-start AttributeRef.address_equation ada/nodes.lkt:17383
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Address_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1172 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Name;
Fld_3 : Logic_Var;
Pred : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Internal_Entity_Name;
Fld_5 : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_6 : Logic_Var;
Fld_7 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1172 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1172;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9878 '<LogicBinaryOp And at nodes.lkt:17387:9>' And_Pred_1 ada/nodes.lkt:17387
--# expr-start 9874 '<LogicBinaryOp Or at nodes.lkt:17388:13>' Or_Pred ada/nodes.lkt:17388
--# expr-start 9871 '<LogicBinaryOp And at nodes.lkt:17389:17>' And_Pred ada/nodes.lkt:17389
--# expr-start 9867 '<FieldAccess for xref_no_overloading at nodes.lkt:17389:17>' Fld_1 ada/nodes.lkt:17389
--# expr-start 9866 '<FieldAccess for prefix at nodes.lkt:17389:17>' Fld ada/nodes.lkt:17389
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9866
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_1 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 9867
--# expr-start 9870 '<Predicate on BasicDecl.is_subprogram at nodes.lkt:17390:22>' Pred ada/nodes.lkt:17390
--# expr-start 9869 '<FieldAccess for ref_var at nodes.lkt:17390:47>' Fld_3 ada/nodes.lkt:17390
--# expr-start 9868 '<FieldAccess for prefix at nodes.lkt:17390:47>' Fld_2 ada/nodes.lkt:17390
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9868
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_2);
--# end
--# expr-done 9869
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Pred := Solver.Create_Predicate (Fld_3, Create_Basic_Decl_P_Is_Subprogram_0_Predicate); 
--# expr-done 9870
And_Pred := Create_And (Fld_1, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17389:17") else null)); 
--# expr-done 9871
--# expr-start 9873 '<FieldAccess for sub_equation at nodes.lkt:17392:17>' Fld_5 ada/nodes.lkt:17392
--# expr-start 9872 '<FieldAccess for prefix at nodes.lkt:17392:17>' Fld_4 ada/nodes.lkt:17392
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9872
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_4.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_4.Info);
--# end
--# expr-done 9873
Or_Pred := Create_Or (And_Pred, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17388:13") else null)); 
--# expr-done 9874
--# expr-start 9877 '<Bind at nodes.lkt:17394:14>' Bind_Result ada/nodes.lkt:17394
--# expr-start 9875 '<FieldAccess for type_var at nodes.lkt:17394:14>' Fld_6 ada/nodes.lkt:17394
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9875
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
--# expr-start 9876 '<FieldAccess for system_address_type at nodes.lkt:17394:33>' Fld_7 ada/nodes.lkt:17394
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.system_address_type
Fld_7 := Libadalang.Implementation.Ada_Node_P_System_Address_Type (Node => Ent.Node);
--# end
--# expr-done 9876
      Cast_Result := Create_Internal_Entity
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
Bind_Result := Solver.Create_Assign (Fld_6, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17394:14") else null)); 
--# expr-done 9877
And_Pred_1 := Create_And (Or_Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17387:9") else null)); 
--# expr-done 9878
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1172;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1172;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Address_Equation;
--# end
--# property-start AttributeRef.identity_equation ada/nodes.lkt:17397
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Identity_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1173 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Bare_Name;
Fld_4 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1173 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1173;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9885 '<LogicBinaryOp And at nodes.lkt:17400:9>' And_Pred ada/nodes.lkt:17400
--# expr-start 9880 '<FieldAccess for sub_equation at nodes.lkt:17400:9>' Fld_1 ada/nodes.lkt:17400
--# expr-start 9879 '<FieldAccess for prefix at nodes.lkt:17400:9>' Fld ada/nodes.lkt:17400
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9879
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 9880
--# expr-start 9884 '<NPropagate at nodes.lkt:17401:14>' Bind_Result ada/nodes.lkt:17401
--# expr-start 9882 '<FieldAccess for ref_var at nodes.lkt:17401:58>' Fld_4 ada/nodes.lkt:17401
--# expr-start 9881 '<FieldAccess for prefix at nodes.lkt:17401:58>' Fld_3 ada/nodes.lkt:17401
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9881
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_3);
--# end
--# expr-done 9882
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 9883 '<FieldAccess for type_var at nodes.lkt:17401:14>' Fld_2 ada/nodes.lkt:17401
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9883
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result := Solver.Create_Propagate (Fld_4, Fld_2, Logic_Functor_682'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17401:14") else null)); 
--# expr-done 9884
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17400:9") else null)); 
--# expr-done 9885
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1173;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1173;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Identity_Equation;
--# end
--# property-start AttributeRef.universal_real_equation ada/nodes.lkt:17404
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Universal_Real_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1174 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1174 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1174;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9890 '<LogicBinaryOp And at nodes.lkt:17405:9>' And_Pred ada/nodes.lkt:17405
--# expr-start 9887 '<FieldAccess for universal_real_bind at nodes.lkt:17405:9>' Fld_1 ada/nodes.lkt:17405
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9886 '<FieldAccess for type_var at nodes.lkt:17405:34>' Fld ada/nodes.lkt:17405
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9886
--# property-call-start AdaNode.universal_real_bind
Fld_1 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Bind (Node => Self, Type_Var => Fld, Origin => Origin);
--# end
--# expr-done 9887
--# expr-start 9889 '<FieldAccess for sub_equation at nodes.lkt:17406:14>' Fld_3 ada/nodes.lkt:17406
--# expr-start 9888 '<FieldAccess for prefix at nodes.lkt:17406:14>' Fld_2 ada/nodes.lkt:17406
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9888
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 9889
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17405:9") else null)); 
--# expr-done 9890
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1174;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1174;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Universal_Real_Equation;
--# end
--# property-start AttributeRef.universal_int_equation ada/nodes.lkt:17409
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Universal_Int_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1175 with Inline_Always;
            procedure Finalizer_Scope_3215 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Internal_Entity_Assoc_List;
Fld_7 : Bare_Assoc_List;
Fld_8 : Internal_Entity_Info;
Item_0 : Internal_Entity_Basic_Assoc;
Bare_Item_0 : Bare_Basic_Assoc;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_11 : Internal_Entity_Expr;
Fld_12 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_13 : Internal_Entity_Expr;
Fld_14 : Logic_Equation;
And_Pred_2 : Logic_Equation;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_3 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1175 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1175;
            procedure Finalizer_Scope_3215 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_12);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_14);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_3215;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9911 '<Let at nodes.lkt:17410:9>' Let_Result ada/nodes.lkt:17410
--# scope-start
--# expr-start 9892 '<FieldAccess for name_designated_type at nodes.lkt:17410:19>' Fld_1 ada/nodes.lkt:17410
--# expr-start 9891 '<FieldAccess for prefix at nodes.lkt:17410:19>' Fld ada/nodes.lkt:17410
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9891
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 9892
Local_Typ := Fld_1; 
--# bind typ Local_Typ
--# expr-start 9910 '<LogicBinaryOp And at nodes.lkt:17412:9>' And_Pred_3 ada/nodes.lkt:17412
--# expr-start 9897 '<LogicBinaryOp And at nodes.lkt:17413:13>' And_Pred ada/nodes.lkt:17413
--# expr-start 9894 '<FieldAccess for sub_equation at nodes.lkt:17413:13>' Fld_3 ada/nodes.lkt:17413
--# expr-start 9893 '<FieldAccess for prefix at nodes.lkt:17413:13>' Fld_2 ada/nodes.lkt:17413
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9893
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 9894
--# expr-start 9896 '<FieldAccess for universal_int_bind at nodes.lkt:17414:18>' Fld_5 ada/nodes.lkt:17414
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 9895 '<FieldAccess for type_var at nodes.lkt:17414:42>' Fld_4 ada/nodes.lkt:17414
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9895
--# property-call-start AdaNode.universal_int_bind
Fld_5 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_4, Origin => Origin);
--# end
--# expr-done 9896
And_Pred := Create_And (Fld_3, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17413:13") else null)); 
--# expr-done 9897
--# expr-start 9909 '<LogicAll at nodes.lkt:17416:14>' Logic_Boolean_Op ada/nodes.lkt:17416
--# expr-start 9908 '<Map at nodes.lkt:17416:14>' Map_Result ada/nodes.lkt:17416
   --# expr-start 9898 '<FieldAccess for args at nodes.lkt:17416:14>' Fld_6 ada/nodes.lkt:17416
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Attribute_Ref_F_Args, Info => Ent.Info);
--# expr-done 9898
Fld_7 := Fld_6.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_7 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_7;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_8 := Fld_6.Info;
As_Entity := (Info => Fld_8, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind arg Item_0
      --# expr-start 9907 '<LogicBinaryOp And at nodes.lkt:17418:13>' And_Pred_2 ada/nodes.lkt:17418
--# expr-start 9904 '<LogicBinaryOp And at nodes.lkt:17419:17>' And_Pred_1 ada/nodes.lkt:17419
--# expr-start 9901 '<Bind at nodes.lkt:17419:17>' Bind_Result ada/nodes.lkt:17419
--# expr-start 9900 '<FieldAccess for expected_type_var at nodes.lkt:17419:17>' Fld_10 ada/nodes.lkt:17419
--# expr-start 9899 '<FieldAccess for expr at nodes.lkt:17419:17>' Fld_9 ada/nodes.lkt:17419
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 9899
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_9.Node);
--# expr-done 9900
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
Cast_Expr := Local_Typ; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_10, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17419:17") else null)); 
--# expr-done 9901
--# expr-start 9903 '<FieldAccess for sub_equation at nodes.lkt:17420:22>' Fld_12 ada/nodes.lkt:17420
--# expr-start 9902 '<FieldAccess for expr at nodes.lkt:17420:22>' Fld_11 ada/nodes.lkt:17420
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 9902
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_12 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_11.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_11.Info);
--# end
--# expr-done 9903
And_Pred_1 := Create_And (Bind_Result, Fld_12, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17419:17") else null)); 
--# expr-done 9904
--# expr-start 9906 '<FieldAccess for matches_expected_type at nodes.lkt:17422:18>' Fld_14 ada/nodes.lkt:17422
--# expr-start 9905 '<FieldAccess for expr at nodes.lkt:17422:18>' Fld_13 ada/nodes.lkt:17422
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_13 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 9905
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_14 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_13.Node, Origin => Origin);
--# end
--# expr-done 9906
And_Pred_2 := Create_And (And_Pred_1, Fld_14, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17418:13") else null)); 
--# expr-done 9907
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_2;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3215;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 9908
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17416:14") else null)); 
--# expr-done 9909
And_Pred_3 := Create_And (And_Pred, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17412:9") else null)); 
--# expr-done 9910
Let_Result := And_Pred_3; Inc_Ref (Let_Result);
--# end
--# expr-done 9911
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1175;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1175;
                     Finalizer_Scope_3215;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Universal_Int_Equation;
--# end
--# property-start AttributeRef.image_equation ada/nodes.lkt:17427
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Image_Equation
  (Node : Bare_Attribute_Ref
      ; Str_Type : Internal_Entity
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind str_type Str_Type
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1176 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Name;
Fld_6 : Logic_Equation;
Fld_7 : Logic_Var;
Fld_8 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_Null : Boolean;
If_Result : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1176 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1176;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9927 '<Let at nodes.lkt:17428:9>' Let_Result ada/nodes.lkt:17428
--# scope-start
--# expr-start 9913 '<FieldAccess for name_designated_type at nodes.lkt:17428:19>' Fld_1 ada/nodes.lkt:17428
--# expr-start 9912 '<FieldAccess for prefix at nodes.lkt:17428:19>' Fld ada/nodes.lkt:17428
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9912
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 9913
Local_Typ := Fld_1; 
--# bind typ Local_Typ
--# expr-start 9926 '<If at nodes.lkt:17430:9>' If_Result ada/nodes.lkt:17430
--# expr-start 9914 '<IsNull at nodes.lkt:17430:12>' Is_Null ada/nodes.lkt:17430
Is_Null := Local_Typ.Node = null; 
--# expr-done 9914
if Is_Null then
   --# expr-start 9919 '<LogicBinaryOp And at nodes.lkt:17433:13>' And_Pred ada/nodes.lkt:17433
--# expr-start 9916 '<FieldAccess for sub_equation at nodes.lkt:17433:13>' Fld_3 ada/nodes.lkt:17433
--# expr-start 9915 '<FieldAccess for prefix at nodes.lkt:17433:13>' Fld_2 ada/nodes.lkt:17433
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9915
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 9916
--# expr-start 9918 '<Bind at nodes.lkt:17433:45>' Bind_Result ada/nodes.lkt:17433
--# expr-start 9917 '<FieldAccess for type_var at nodes.lkt:17433:45>' Fld_4 ada/nodes.lkt:17433
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9917
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Bind_Result := Solver.Create_Assign (Fld_4, Str_Type, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17433:45") else null)); 
--# expr-done 9918
And_Pred := Create_And (Fld_3, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17433:13") else null)); 
--# expr-done 9919
   If_Result := And_Pred;
else
   --# expr-start 9925 '<LogicBinaryOp And at nodes.lkt:17436:13>' And_Pred_1 ada/nodes.lkt:17436
--# expr-start 9921 '<FieldAccess for xref_type_equation at nodes.lkt:17436:13>' Fld_6 ada/nodes.lkt:17436
--# expr-start 9920 '<FieldAccess for prefix at nodes.lkt:17436:13>' Fld_5 ada/nodes.lkt:17436
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9920
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_6 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld_5.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_5.Info);
--# end
--# expr-done 9921
--# expr-start 9924 '<Bind at nodes.lkt:17437:18>' Bind_Result_1 ada/nodes.lkt:17437
--# expr-start 9922 '<FieldAccess for ref_var at nodes.lkt:17437:18>' Fld_7 ada/nodes.lkt:17437
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_7 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 9922
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
--# expr-start 9923 '<FieldAccess for attribute_subprogram at nodes.lkt:17437:36>' Fld_8 ada/nodes.lkt:17437
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.attribute_subprogram
Fld_8 := Libadalang.Implementation.Attribute_Ref_P_Attribute_Subprogram (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9923
      Cast_Result := Create_Internal_Entity
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_7, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17437:18") else null)); 
--# expr-done 9924
And_Pred_1 := Create_And (Fld_6, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17436:13") else null)); 
--# expr-done 9925
   If_Result := And_Pred_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 9926
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 9927
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1176;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1176;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Image_Equation;
--# end
--# property-start AttributeRef.img_equation ada/nodes.lkt:17441
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Img_Equation
  (Node : Bare_Attribute_Ref
      ; Str_Type : Internal_Entity
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind str_type Str_Type
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1177 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1177 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1177;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9932 '<LogicBinaryOp And at nodes.lkt:17442:9>' And_Pred ada/nodes.lkt:17442
--# expr-start 9929 '<FieldAccess for xref_equation at nodes.lkt:17444:13>' Fld_1 ada/nodes.lkt:17444
--# expr-start 9928 '<FieldAccess for prefix at nodes.lkt:17444:13>' Fld ada/nodes.lkt:17444
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9928
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 9929
--# expr-start 9931 '<Bind at nodes.lkt:17448:9>' Bind_Result ada/nodes.lkt:17448
--# expr-start 9930 '<FieldAccess for type_var at nodes.lkt:17448:9>' Fld_2 ada/nodes.lkt:17448
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9930
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result := Solver.Create_Assign (Fld_2, Str_Type, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17448:9") else null)); 
--# expr-done 9931
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17442:9") else null)); 
--# expr-done 9932
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1177;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1177;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Img_Equation;
--# end
--# property-start AttributeRef.enum_rep_equation ada/nodes.lkt:17453
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Enum_Rep_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1178 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Fld_5 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Internal_Entity_Name;
Fld_7 : Logic_Equation;
Fld_8 : Logic_Var;
Fld_9 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_Null : Boolean;
If_Result : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1178 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1178;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9949 '<Let at nodes.lkt:17454:9>' Let_Result ada/nodes.lkt:17454
--# scope-start
--# expr-start 9934 '<FieldAccess for name_designated_type at nodes.lkt:17454:19>' Fld_1 ada/nodes.lkt:17454
--# expr-start 9933 '<FieldAccess for prefix at nodes.lkt:17454:19>' Fld ada/nodes.lkt:17454
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9933
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 9934
Local_Typ := Fld_1; 
--# bind typ Local_Typ
--# expr-start 9948 '<If at nodes.lkt:17456:9>' If_Result ada/nodes.lkt:17456
--# expr-start 9935 '<IsNull at nodes.lkt:17456:12>' Is_Null ada/nodes.lkt:17456
Is_Null := Local_Typ.Node = null; 
--# expr-done 9935
if Is_Null then
   --# expr-start 9941 '<LogicBinaryOp And at nodes.lkt:17459:13>' And_Pred ada/nodes.lkt:17459
--# expr-start 9937 '<FieldAccess for sub_equation at nodes.lkt:17459:13>' Fld_3 ada/nodes.lkt:17459
--# expr-start 9936 '<FieldAccess for prefix at nodes.lkt:17459:13>' Fld_2 ada/nodes.lkt:17459
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9936
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 9937
--# expr-start 9940 '<Bind at nodes.lkt:17460:18>' Bind_Result ada/nodes.lkt:17460
--# expr-start 9938 '<FieldAccess for type_var at nodes.lkt:17460:18>' Fld_4 ada/nodes.lkt:17460
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9938
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 9939 '<FieldAccess for universal_int_type at nodes.lkt:17460:37>' Fld_5 ada/nodes.lkt:17460
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld_5 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Self);
--# end
--# expr-done 9939
      Cast_Result := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17460:18") else null)); 
--# expr-done 9940
And_Pred := Create_And (Fld_3, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17459:13") else null)); 
--# expr-done 9941
   If_Result := And_Pred;
else
   --# expr-start 9947 '<LogicBinaryOp And at nodes.lkt:17463:13>' And_Pred_1 ada/nodes.lkt:17463
--# expr-start 9943 '<FieldAccess for xref_type_equation at nodes.lkt:17463:13>' Fld_7 ada/nodes.lkt:17463
--# expr-start 9942 '<FieldAccess for prefix at nodes.lkt:17463:13>' Fld_6 ada/nodes.lkt:17463
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9942
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_7 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld_6.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_6.Info);
--# end
--# expr-done 9943
--# expr-start 9946 '<Bind at nodes.lkt:17464:18>' Bind_Result_1 ada/nodes.lkt:17464
--# expr-start 9944 '<FieldAccess for ref_var at nodes.lkt:17464:18>' Fld_8 ada/nodes.lkt:17464
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_8 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 9944
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
--# expr-start 9945 '<FieldAccess for attribute_subprogram at nodes.lkt:17464:36>' Fld_9 ada/nodes.lkt:17464
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AttributeRef.attribute_subprogram
Fld_9 := Libadalang.Implementation.Attribute_Ref_P_Attribute_Subprogram (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 9945
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_9.Node,
         Info => Fld_9.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_8, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17464:18") else null)); 
--# expr-done 9946
And_Pred_1 := Create_And (Fld_7, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17463:13") else null)); 
--# expr-done 9947
   If_Result := And_Pred_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 9948
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 9949
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1178;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1178;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Enum_Rep_Equation;
--# end
--# property-start AttributeRef.self_type_equation ada/nodes.lkt:17470
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Self_Type_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1179 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1179 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1179;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 9957 '<Let at nodes.lkt:17471:9>' Let_Result ada/nodes.lkt:17471
--# scope-start
--# expr-start 9951 '<FieldAccess for name_designated_type at nodes.lkt:17471:19>' Fld_1 ada/nodes.lkt:17471
--# expr-start 9950 '<FieldAccess for prefix at nodes.lkt:17471:19>' Fld ada/nodes.lkt:17471
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9950
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 9951
Local_Typ := Fld_1; 
--# bind typ Local_Typ
--# expr-start 9956 '<LogicBinaryOp And at nodes.lkt:17473:9>' And_Pred ada/nodes.lkt:17473
--# expr-start 9953 '<FieldAccess for xref_type_equation at nodes.lkt:17473:9>' Fld_3 ada/nodes.lkt:17473
--# expr-start 9952 '<FieldAccess for prefix at nodes.lkt:17473:9>' Fld_2 ada/nodes.lkt:17473
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9952
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_3 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 9953
--# expr-start 9955 '<Bind at nodes.lkt:17473:47>' Bind_Result ada/nodes.lkt:17473
--# expr-start 9954 '<FieldAccess for type_var at nodes.lkt:17473:47>' Fld_4 ada/nodes.lkt:17473
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9954
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Cast_Expr := Local_Typ; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17473:47") else null)); 
--# expr-done 9955
And_Pred := Create_And (Fld_3, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17473:9") else null)); 
--# expr-done 9956
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 9957
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1179;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1179;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Self_Type_Equation;
--# end
--# property-start AttributeRef.access_equation ada/nodes.lkt:17477
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Access_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1180 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Bare_Name;
Fld_4 : Logic_Var;
Pred : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Logic_Var;
Fld_6 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_7 : Internal_Entity_Name;
Fld_8 : Logic_Equation;
Fld_9 : Logic_Var;
Fld_10 : Logic_Var;
Bind_Result_1 : Logic_Equation;
Fld_11 : Bare_Name;
Fld_12 : Logic_Var;
Fld_13 : Logic_Var;
Bind_Result_2 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_14 : Bare_Name;
Fld_15 : Logic_Var;
Fld_16 : Bare_Name;
Fld_17 : Logic_Var;
Bind_Result_3 : Logic_Equation;
Fld_18 : Bare_Name;
Fld_19 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result_4 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_20 : Internal_Entity_Name;
Fld_21 : Logic_Equation;
Or_Pred : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_22 : Bare_Name;
Fld_23 : Logic_Var;
Fld_24 : Logic_Var;
Bind_Result_5 : Logic_Equation;
Fld_25 : Internal_Entity_Name;
Fld_26 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Fld_27 : Logic_Var;
Fld_28 : Bare_Name;
Fld_29 : Logic_Var;
Bind_Result_6 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_30 : Logic_Var;
Fld_31 : Bare_Name;
Fld_32 : Logic_Var;
Bind_Result_7 : Logic_Equation;
False_Rel : Logic_Equation;
Fld_33 : Bare_Ada_Node;
Is_A : Boolean;
If_Result : Logic_Equation;
Fld_34 : Bare_Ada_Node;
Is_A_1 : Boolean;
Fld_35 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Logic_Equation;
Or_Pred_1 : Logic_Equation;
And_Pred_7 : Logic_Equation;
Or_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_1180 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_21);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Bind_Result_5);
                     Dec_Ref (Fld_26);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Bind_Result_6);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Bind_Result_7);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Or_Pred_1);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (Or_Pred_2);
            end Finalizer_Scope_1180;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10018 '<LogicBinaryOp Or at nodes.lkt:17478:9>' Or_Pred_2 ada/nodes.lkt:17478
--# expr-start 9968 '<LogicBinaryOp And at nodes.lkt:17480:13>' And_Pred_1 ada/nodes.lkt:17480
--# expr-start 9964 '<LogicBinaryOp And at nodes.lkt:17480:13>' And_Pred ada/nodes.lkt:17480
--# expr-start 9959 '<FieldAccess for xref_no_overloading at nodes.lkt:17480:13>' Fld_1 ada/nodes.lkt:17480
--# expr-start 9958 '<FieldAccess for prefix at nodes.lkt:17480:13>' Fld ada/nodes.lkt:17480
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9958
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_1 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld.Node, All_Els => True, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 9959
--# expr-start 9963 '<Predicate on BaseTypeDecl.is_subp_access_of at nodes.lkt:17481:18>' Pred ada/nodes.lkt:17481
--# expr-start 9960 '<FieldAccess for type_var at nodes.lkt:17481:50>' Fld_2 ada/nodes.lkt:17481
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9960
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 9962 '<FieldAccess for ref_var at nodes.lkt:17482:13>' Fld_4 ada/nodes.lkt:17482
--# expr-start 9961 '<FieldAccess for prefix at nodes.lkt:17482:13>' Fld_3 ada/nodes.lkt:17482
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9961
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_3);
--# end
--# expr-done 9962
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Pred := Solver.Create_N_Predicate ((Fld_2, Fld_4), Create_Base_Type_Decl_P_Is_Subp_Access_Of_0_Predicate (Origin)); 
--# expr-done 9963
And_Pred := Create_And (Fld_1, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17480:13") else null)); 
--# expr-done 9964
--# expr-start 9967 '<Bind at nodes.lkt:17483:18>' Bind_Result ada/nodes.lkt:17483
--# expr-start 9965 '<FieldAccess for type_var at nodes.lkt:17483:18>' Fld_5 ada/nodes.lkt:17483
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9965
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 9966 '<FieldAccess for expected_type_var at nodes.lkt:17483:38>' Fld_6 ada/nodes.lkt:17483
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 9966
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
Bind_Result := Solver.Create_Unify (Fld_5, Fld_6, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17483:18") else null)); 
--# expr-done 9967
And_Pred_1 := Create_And (And_Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17480:13") else null)); 
--# expr-done 9968
--# expr-start 10017 '<LogicBinaryOp And at nodes.lkt:17487:13>' And_Pred_7 ada/nodes.lkt:17487
--# expr-start 9970 '<FieldAccess for sub_equation at nodes.lkt:17487:13>' Fld_8 ada/nodes.lkt:17487
--# expr-start 9969 '<FieldAccess for prefix at nodes.lkt:17487:13>' Fld_7 ada/nodes.lkt:17487
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9969
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_7.Info);
--# end
--# expr-done 9970
--# expr-start 10016 '<LogicBinaryOp Or at nodes.lkt:17497:17>' Or_Pred_1 ada/nodes.lkt:17497
--# expr-start 9991 '<LogicBinaryOp And at nodes.lkt:17497:17>' And_Pred_4 ada/nodes.lkt:17497
--# expr-start 9978 '<LogicBinaryOp And at nodes.lkt:17497:17>' And_Pred_2 ada/nodes.lkt:17497
--# expr-start 9973 '<Bind at nodes.lkt:17497:17>' Bind_Result_1 ada/nodes.lkt:17497
--# expr-start 9971 '<FieldAccess for expected_type_var at nodes.lkt:17497:17>' Fld_9 ada/nodes.lkt:17497
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 9971
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
--# expr-start 9972 '<FieldAccess for type_var at nodes.lkt:17497:46>' Fld_10 ada/nodes.lkt:17497
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 9972
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
Bind_Result_1 := Solver.Create_Unify (Fld_9, Fld_10, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17497:17") else null)); 
--# expr-done 9973
--# expr-start 9977 '<NPropagate at nodes.lkt:17498:22>' Bind_Result_2 ada/nodes.lkt:17498
--# expr-start 9974 '<FieldAccess for expected_type_var at nodes.lkt:17500:21>' Fld_13 ada/nodes.lkt:17500
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 9974
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
--# expr-start 9976 '<FieldAccess for expected_type_var at nodes.lkt:17498:22>' Fld_12 ada/nodes.lkt:17498
--# expr-start 9975 '<FieldAccess for prefix at nodes.lkt:17498:22>' Fld_11 ada/nodes.lkt:17498
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9975
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_11);
--# expr-done 9976
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
Bind_Result_2 := Solver.Create_Propagate (Fld_13, Fld_12, Logic_Functor_887'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17498:22") else null)); 
--# expr-done 9977
And_Pred_2 := Create_And (Bind_Result_1, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17497:17") else null)); 
--# expr-done 9978
--# expr-start 9990 '<LogicBinaryOp Or at nodes.lkt:17507:21>' Or_Pred ada/nodes.lkt:17507
--# expr-start 9987 '<LogicBinaryOp And at nodes.lkt:17507:21>' And_Pred_3 ada/nodes.lkt:17507
--# expr-start 9983 '<Bind at nodes.lkt:17507:21>' Bind_Result_3 ada/nodes.lkt:17507
--# expr-start 9980 '<FieldAccess for expected_type_var at nodes.lkt:17507:21>' Fld_15 ada/nodes.lkt:17507
--# expr-start 9979 '<FieldAccess for prefix at nodes.lkt:17507:21>' Fld_14 ada/nodes.lkt:17507
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9979
      if Fld_14 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_14);
--# expr-done 9980
Fld_15.Value := No_Entity;
Entity_Vars.Reset (Fld_15);
--# expr-start 9982 '<FieldAccess for type_var at nodes.lkt:17507:57>' Fld_17 ada/nodes.lkt:17507
--# expr-start 9981 '<FieldAccess for prefix at nodes.lkt:17507:57>' Fld_16 ada/nodes.lkt:17507
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9981
      if Fld_16 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_16);
--# expr-done 9982
Fld_17.Value := No_Entity;
Entity_Vars.Reset (Fld_17);
Bind_Result_3 := Solver.Create_Unify (Fld_15, Fld_17, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17507:21") else null)); 
--# expr-done 9983
--# expr-start 9986 '<Bind at nodes.lkt:17508:26>' Bind_Result_4 ada/nodes.lkt:17508
--# expr-start 9985 '<FieldAccess for type_var at nodes.lkt:17508:26>' Fld_19 ada/nodes.lkt:17508
--# expr-start 9984 '<FieldAccess for prefix at nodes.lkt:17508:26>' Fld_18 ada/nodes.lkt:17508
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9984
      if Fld_18 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_18);
--# expr-done 9985
Fld_19.Value := No_Entity;
Entity_Vars.Reset (Fld_19);
Cast_Expr := No_Entity_Base_Type_Decl; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result_4 := Solver.Create_Assign (Fld_19, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17508:26") else null)); 
--# expr-done 9986
And_Pred_3 := Create_And (Bind_Result_3, Bind_Result_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17507:21") else null)); 
--# expr-done 9987
--# expr-start 9989 '<FieldAccess for matches_expected_formal_type at nodes.lkt:17513:25>' Fld_21 ada/nodes.lkt:17513
--# expr-start 9988 '<FieldAccess for prefix at nodes.lkt:17513:25>' Fld_20 ada/nodes.lkt:17513
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 9988
      if Fld_20.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_21 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_20.Node, Origin => Origin);
--# end
--# expr-done 9989
Or_Pred := Create_Or (And_Pred_3, Fld_21, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17507:21") else null)); 
--# expr-done 9990
And_Pred_4 := Create_And (And_Pred_2, Or_Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17497:17") else null)); 
--# expr-done 9991
--# expr-start 10015 '<If at nodes.lkt:17521:17>' If_Result_2 ada/nodes.lkt:17521
--# expr-start 9995 '<BooleanBinaryOp And at nodes.lkt:17521:20>' If_Result_1 ada/nodes.lkt:17521
--# expr-start 9993 '<IsA DottedName at nodes.lkt:17521:20>' Is_A_1 ada/nodes.lkt:17521
--# expr-start 9992 '<parent at nodes.lkt:17521:20>' Fld_34 ada/nodes.lkt:17521
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_34 := Self.Parent; 
--# expr-done 9992
Is_A_1 := Fld_34 /= null 
and then Fld_34.Kind in Ada_Dotted_Name_Range; 
--# expr-done 9993
if Is_A_1 then
   --# expr-start 9994 '<FieldAccess for is_prefix at nodes.lkt:17521:50>' Fld_35 ada/nodes.lkt:17521
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld_35 := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 9994
   If_Result_1 := Fld_35;
else
   If_Result_1 := False;
end if;
--# expr-done 9995
if If_Result_1 then
   --# expr-start 10007 '<LogicBinaryOp And at nodes.lkt:17523:21>' And_Pred_6 ada/nodes.lkt:17523
--# expr-start 10002 '<LogicBinaryOp And at nodes.lkt:17523:21>' And_Pred_5 ada/nodes.lkt:17523
--# expr-start 9999 '<Bind at nodes.lkt:17523:21>' Bind_Result_5 ada/nodes.lkt:17523
--# expr-start 9997 '<FieldAccess for expected_type_var at nodes.lkt:17523:21>' Fld_23 ada/nodes.lkt:17523
--# expr-start 9996 '<FieldAccess for prefix at nodes.lkt:17523:21>' Fld_22 ada/nodes.lkt:17523
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Self.Attribute_Ref_F_Prefix;
--# expr-done 9996
      if Fld_22 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_22);
--# expr-done 9997
Fld_23.Value := No_Entity;
Entity_Vars.Reset (Fld_23);
--# expr-start 9998 '<FieldAccess for expected_type_var at nodes.lkt:17524:25>' Fld_24 ada/nodes.lkt:17524
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 9998
Fld_24.Value := No_Entity;
Entity_Vars.Reset (Fld_24);
Bind_Result_5 := Solver.Create_Unify (Fld_23, Fld_24, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17523:21") else null)); 
--# expr-done 9999
--# expr-start 10001 '<FieldAccess for matches_expected_prefix_type at nodes.lkt:17525:26>' Fld_26 ada/nodes.lkt:17525
--# expr-start 10000 '<FieldAccess for prefix at nodes.lkt:17525:26>' Fld_25 ada/nodes.lkt:17525
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10000
      if Fld_25.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_prefix_type
Fld_26 := Libadalang.Implementation.Expr_P_Matches_Expected_Prefix_Type (Node => Fld_25.Node, Origin => Origin);
--# end
--# expr-done 10001
And_Pred_5 := Create_And (Bind_Result_5, Fld_26, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17523:21") else null)); 
--# expr-done 10002
--# expr-start 10006 '<NPropagate at nodes.lkt:17526:26>' Bind_Result_6 ada/nodes.lkt:17526
--# expr-start 10004 '<FieldAccess for type_var at nodes.lkt:17528:25>' Fld_29 ada/nodes.lkt:17528
--# expr-start 10003 '<FieldAccess for prefix at nodes.lkt:17528:25>' Fld_28 ada/nodes.lkt:17528
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Self.Attribute_Ref_F_Prefix;
--# expr-done 10003
      if Fld_28 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_29 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_28);
--# expr-done 10004
Fld_29.Value := No_Entity;
Entity_Vars.Reset (Fld_29);
--# expr-start 10005 '<FieldAccess for type_var at nodes.lkt:17526:26>' Fld_27 ada/nodes.lkt:17526
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10005
Fld_27.Value := No_Entity;
Entity_Vars.Reset (Fld_27);
Bind_Result_6 := Solver.Create_Propagate (Fld_29, Fld_27, Logic_Functor_845'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17526:26") else null)); 
--# expr-done 10006
And_Pred_6 := Create_And (And_Pred_5, Bind_Result_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17523:21") else null)); 
--# expr-done 10007
   If_Result_2 := And_Pred_6;
else
   --# expr-start 10014 '<If at nodes.lkt:17521:17>' If_Result ada/nodes.lkt:17521
--# expr-start 10009 '<IsA ExplicitDeref at nodes.lkt:17530:22>' Is_A ada/nodes.lkt:17530
--# expr-start 10008 '<parent at nodes.lkt:17530:22>' Fld_33 ada/nodes.lkt:17530
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Self.Parent; 
--# expr-done 10008
Is_A := Fld_33 /= null 
and then Fld_33.Kind in Ada_Explicit_Deref_Range; 
--# expr-done 10009
if Is_A then
   --# expr-start 10013 '<NPropagate at nodes.lkt:17532:21>' Bind_Result_7 ada/nodes.lkt:17532
--# expr-start 10011 '<FieldAccess for type_var at nodes.lkt:17534:25>' Fld_32 ada/nodes.lkt:17534
--# expr-start 10010 '<FieldAccess for prefix at nodes.lkt:17534:25>' Fld_31 ada/nodes.lkt:17534
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Self.Attribute_Ref_F_Prefix;
--# expr-done 10010
      if Fld_31 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_31);
--# expr-done 10011
Fld_32.Value := No_Entity;
Entity_Vars.Reset (Fld_32);
--# expr-start 10012 '<FieldAccess for type_var at nodes.lkt:17532:21>' Fld_30 ada/nodes.lkt:17532
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10012
Fld_30.Value := No_Entity;
Entity_Vars.Reset (Fld_30);
Bind_Result_7 := Solver.Create_Propagate (Fld_32, Fld_30, Logic_Functor_845'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17532:21") else null)); 
--# expr-done 10013
   If_Result := Bind_Result_7;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17536:22") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 10014
   If_Result_2 := If_Result;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 10015
Or_Pred_1 := Create_Or (And_Pred_4, If_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17497:17") else null)); 
--# expr-done 10016
And_Pred_7 := Create_And (Fld_8, Or_Pred_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17487:13") else null)); 
--# expr-done 10017
Or_Pred_2 := Create_Or (And_Pred_1, And_Pred_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17478:9") else null)); 
--# expr-done 10018
         Property_Result := Or_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1180;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1180;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Access_Equation;
--# end
--# property-start AttributeRef.size_equation ada/nodes.lkt:17541
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Size_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1181 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Name;
Fld_3 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_4 : Logic_Var;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Internal_Entity_Name;
Fld_7 : Logic_Equation;
Fld_8 : Logic_Var;
Fld_9 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1181 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1181;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10035 '<Let at nodes.lkt:17542:9>' Let_Result ada/nodes.lkt:17542
--# scope-start
--# expr-start 10020 '<FieldAccess for name_designated_type at nodes.lkt:17542:19>' Fld_1 ada/nodes.lkt:17542
--# expr-start 10019 '<FieldAccess for prefix at nodes.lkt:17542:19>' Fld ada/nodes.lkt:17542
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10019
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 10020
Local_Typ := Fld_1; 
--# bind typ Local_Typ
--# expr-start 10034 '<If at nodes.lkt:17544:9>' If_Result ada/nodes.lkt:17544
--# expr-start 10022 '<Not at nodes.lkt:17544:12>' Not_Val ada/nodes.lkt:17544
--# expr-start 10021 '<IsNull at nodes.lkt:17544:16>' Is_Null ada/nodes.lkt:17544
Is_Null := Local_Typ.Node = null; 
--# expr-done 10021
Not_Val := not (Is_Null); 
--# expr-done 10022
if Not_Val then
   --# expr-start 10028 '<LogicBinaryOp And at nodes.lkt:17546:13>' And_Pred ada/nodes.lkt:17546
--# expr-start 10025 '<Bind at nodes.lkt:17546:13>' Bind_Result ada/nodes.lkt:17546
--# expr-start 10024 '<FieldAccess for ref_var at nodes.lkt:17546:13>' Fld_3 ada/nodes.lkt:17546
--# expr-start 10023 '<FieldAccess for prefix at nodes.lkt:17546:13>' Fld_2 ada/nodes.lkt:17546
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Attribute_Ref_F_Prefix;
--# expr-done 10023
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_2);
--# end
--# expr-done 10024
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Cast_Expr := Local_Typ; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_3, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17546:13") else null)); 
--# expr-done 10025
--# expr-start 10027 '<FieldAccess for universal_int_bind at nodes.lkt:17547:18>' Fld_5 ada/nodes.lkt:17547
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10026 '<FieldAccess for type_var at nodes.lkt:17547:42>' Fld_4 ada/nodes.lkt:17547
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10026
--# property-call-start AdaNode.universal_int_bind
Fld_5 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_4, Origin => Origin);
--# end
--# expr-done 10027
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17546:13") else null)); 
--# expr-done 10028
   If_Result := And_Pred;
else
   --# expr-start 10033 '<LogicBinaryOp And at nodes.lkt:17549:13>' And_Pred_1 ada/nodes.lkt:17549
--# expr-start 10030 '<FieldAccess for sub_equation at nodes.lkt:17549:13>' Fld_7 ada/nodes.lkt:17549
--# expr-start 10029 '<FieldAccess for prefix at nodes.lkt:17549:13>' Fld_6 ada/nodes.lkt:17549
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10029
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_6.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_6.Info);
--# end
--# expr-done 10030
--# expr-start 10032 '<FieldAccess for universal_int_bind at nodes.lkt:17550:18>' Fld_9 ada/nodes.lkt:17550
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10031 '<FieldAccess for type_var at nodes.lkt:17550:42>' Fld_8 ada/nodes.lkt:17550
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10031
--# property-call-start AdaNode.universal_int_bind
Fld_9 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_8, Origin => Origin);
--# end
--# expr-done 10032
And_Pred_1 := Create_And (Fld_7, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17549:13") else null)); 
--# expr-done 10033
   If_Result := And_Pred_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 10034
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 10035
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1181;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1181;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Size_Equation;
--# end
--# property-start AttributeRef.array_attr_equation ada/nodes.lkt:17554
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Array_Attr_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1182 with Inline_Always;
            procedure Finalizer_Scope_3217 with Inline_Always;
      Local_Is_Length : Boolean;
Local_Typ : Internal_Entity_Base_Type_Decl;
Local_Dim : Integer;
Var_Expr_0 : Internal_Entity_Basic_Assoc;
Var_Expr_1 : Internal_Entity_Expr;
Ignored : Boolean;
Local_Res : Boolean;
Local_Pfx_Typ : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Identifier;
Sym : Symbol_Type;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Assoc_List;
Fld_5 : Bare_Assoc_List;
Fld_6 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_7 : Internal_Entity_Expr;
Fld_8 : Boolean;
Fld_9 : Big_Integer_Type;
Small_Int : Integer;
Let_Result : Integer;
Scope_Result : Integer;
Result_Var : Integer;
Scope_Result_1 : Integer;
Result_Var_1 : Integer;
Arith_Result : Integer;
Fld_10 : Internal_Entity_Name;
Fld_11 : Logic_Equation;
Fld_12 : Logic_Var;
Fld_13 : Logic_Equation;
Fld_14 : Logic_Var;
Fld_15 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_16 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
False_Rel : Logic_Equation;
Fld_17 : Boolean;
Fld_18 : Boolean;
Not_Val : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Logic_Equation;
Fld_19 : Boolean;
If_Result_4 : Logic_Equation;
Fld_20 : Boolean;
If_Result_5 : Boolean;
If_Result_6 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_21 : Internal_Entity_Name;
Fld_22 : Internal_Entity_Name;
Fld_23 : Logic_Var;
Pred : Logic_Equation;
Fld_24 : Boolean;
Fld_25 : Internal_Entity_Name;
Fld_26 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Fld_27 : Logic_Var;
Fld_28 : Logic_Equation;
Fld_29 : Logic_Var;
Fld_30 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
If_Result_7 : Logic_Equation;
False_Rel_1 : Logic_Equation;
If_Result_8 : Logic_Equation;
Let_Result_1 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
If_Result_9 : Logic_Equation;
Let_Result_3 : Logic_Equation;
Let_Result_4 : Logic_Equation;
Let_Result_5 : Logic_Equation;
            procedure Finalizer_Scope_1182 is
            begin
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Pred);
                     Dec_Ref (Fld_28);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (If_Result_7);
                     Dec_Ref (False_Rel_1);
                     Dec_Ref (If_Result_8);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (If_Result_9);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
            end Finalizer_Scope_1182;
            procedure Finalizer_Scope_3217 is
            begin
                     Dec_Ref (Fld_9);
            end Finalizer_Scope_3217;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10091 '<Let at nodes.lkt:17555:9>' Let_Result_5 ada/nodes.lkt:17555
--# scope-start
--# expr-start 10038 '<FieldAccess for name_is at nodes.lkt:17555:25>' Fld_1 ada/nodes.lkt:17555
--# expr-start 10036 '<FieldAccess for attribute at nodes.lkt:17555:25>' Fld ada/nodes.lkt:17555
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Identifier (Node => Ent.Node.Attribute_Ref_F_Attribute, Info => Ent.Info);
--# expr-done 10036
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10037 '<Symbol Length at nodes.lkt:17555:48>' Sym ada/nodes.lkt:17555
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Length); 
--# expr-done 10037
--# property-call-start Name.name_is
Fld_1 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld.Node, Sym => Sym);
--# end
--# expr-done 10038
Local_Is_Length := Fld_1; 
--# bind is_length Local_Is_Length
--# expr-start 10090 '<Let at nodes.lkt:17556:9>' Let_Result_4 ada/nodes.lkt:17556
--# scope-start
--# expr-start 10040 '<FieldAccess for name_designated_type at nodes.lkt:17556:19>' Fld_3 ada/nodes.lkt:17556
--# expr-start 10039 '<FieldAccess for prefix at nodes.lkt:17556:19>' Fld_2 ada/nodes.lkt:17556
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10039
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_3 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 10040
Local_Typ := Fld_3; 
--# bind typ Local_Typ
--# expr-start 10089 '<Let at nodes.lkt:17559:9>' Let_Result_3 ada/nodes.lkt:17559
--# scope-start
--# expr-start 10047 '<Arithmetic - at nodes.lkt:17560:13>' Arith_Result ada/nodes.lkt:17560
--# expr-start 10041 '<FieldAccess for args at nodes.lkt:17560:13>' Fld_4 ada/nodes.lkt:17560
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Attribute_Ref_F_Args, Info => Ent.Info);
--# expr-done 10041
Fld_5 := Fld_4.Node;
Get_Result := Get (Self, Fld_5, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_6 := Fld_4.Info;
As_Entity := (Info => Fld_6, Node => Get_Result); 
   If_Result := As_Entity;
end if;
Var_Expr_0 := If_Result;
if Var_Expr_0 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind arg Var_Expr_0
--# expr-start 10042 '<FieldAccess for expr at nodes.lkt:17562:17>' Fld_7 ada/nodes.lkt:17562
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10042
Var_Expr_1 := Fld_7;
if Var_Expr_1 /= No_Entity_Expr then
   --# scope-start
   --# bind expr Var_Expr_1
--# expr-start 10046 '<Let at nodes.lkt:17564:25>' Let_Result ada/nodes.lkt:17564
--# scope-start
--# expr-start 10043 '<FieldAccess for resolve_names_internal at nodes.lkt:17564:33>' Fld_8 ada/nodes.lkt:17564
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_internal
Fld_8 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal (Node => Var_Expr_1.Node, Generate_Diagnostics => False, Env => Env, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10043
Ignored := Fld_8; 
--# bind _ Ignored
--# expr-start 10045 '<as_int at nodes.lkt:17566:25>' Small_Int ada/nodes.lkt:17566
--# expr-start 10044 '<FieldAccess for eval_as_int at nodes.lkt:17566:25>' Fld_9 ada/nodes.lkt:17566
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_9 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10044
Small_Int := To_Integer (Self, Fld_9); 
--# expr-done 10045
Let_Result := Small_Int; 
--# end
--# expr-done 10046
Scope_Result := Let_Result;
   --# end
      Finalizer_Scope_3217;
   Result_Var := Scope_Result;
else
   Result_Var := 1;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := 1;
end if;
Arith_Result := (Result_Var_1 - 1); 
--# expr-done 10047
Local_Dim := Arith_Result; 
--# bind dim Local_Dim
--# expr-start 10088 '<If at nodes.lkt:17574:9>' If_Result_9 ada/nodes.lkt:17574
--# expr-start 10049 '<Not at nodes.lkt:17574:12>' Not_Val_1 ada/nodes.lkt:17574
--# expr-start 10048 '<IsNull at nodes.lkt:17574:16>' Is_Null_1 ada/nodes.lkt:17574
Is_Null_1 := Local_Typ.Node = null; 
--# expr-done 10048
Not_Val_1 := not (Is_Null_1); 
--# expr-done 10049
if Not_Val_1 then
   --# expr-start 10070 '<LogicBinaryOp And at nodes.lkt:17577:13>' And_Pred ada/nodes.lkt:17577
--# expr-start 10051 '<FieldAccess for xref_type_equation at nodes.lkt:17577:13>' Fld_11 ada/nodes.lkt:17577
--# expr-start 10050 '<FieldAccess for prefix at nodes.lkt:17577:13>' Fld_10 ada/nodes.lkt:17577
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10050
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_11 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld_10.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_10.Info);
--# end
--# expr-done 10051
--# expr-start 10069 '<If at nodes.lkt:17579:17>' If_Result_6 ada/nodes.lkt:17579
--# expr-start 10053 '<BooleanBinaryOp And at nodes.lkt:17579:20>' If_Result_5 ada/nodes.lkt:17579
--# expr-start 10052 '<FieldAccess for is_array_def_with_deref at nodes.lkt:17579:20>' Fld_20 ada/nodes.lkt:17579
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_array_def_with_deref
Fld_20 := Libadalang.Implementation.Base_Type_Decl_P_Is_Array_Def_With_Deref (Node => Local_Typ.Node, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 10052
if Fld_20 then
   If_Result_5 := Local_Is_Length;
else
   If_Result_5 := False;
end if;
--# expr-done 10053
if If_Result_5 then
   --# expr-start 10055 '<FieldAccess for universal_int_bind at nodes.lkt:17580:22>' Fld_13 ada/nodes.lkt:17580
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10054 '<FieldAccess for type_var at nodes.lkt:17580:46>' Fld_12 ada/nodes.lkt:17580
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10054
--# property-call-start AdaNode.universal_int_bind
Fld_13 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_12, Origin => Origin);
--# end
--# expr-done 10055
   If_Result_6 := Fld_13;
else
   --# expr-start 10068 '<If at nodes.lkt:17579:17>' If_Result_4 ada/nodes.lkt:17579
--# expr-start 10056 '<FieldAccess for is_array_def_with_deref at nodes.lkt:17583:22>' Fld_19 ada/nodes.lkt:17583
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_array_def_with_deref
Fld_19 := Libadalang.Implementation.Base_Type_Decl_P_Is_Array_Def_With_Deref (Node => Local_Typ.Node, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 10056
if Fld_19 then
   --# expr-start 10059 '<Bind at nodes.lkt:17584:22>' Bind_Result ada/nodes.lkt:17584
--# expr-start 10057 '<FieldAccess for type_var at nodes.lkt:17584:22>' Fld_14 ada/nodes.lkt:17584
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10057
Fld_14.Value := No_Entity;
Entity_Vars.Reset (Fld_14);
--# expr-start 10058 '<FieldAccess for index_type at nodes.lkt:17584:41>' Fld_15 ada/nodes.lkt:17584
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.index_type
Fld_15 := Libadalang.Implementation.Base_Type_Decl_P_Index_Type (Node => Local_Typ.Node, Dim => Local_Dim, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 10058
      Cast_Result := Create_Internal_Entity
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
Bind_Result := Solver.Create_Assign (Fld_14, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17584:22") else null)); 
--# expr-done 10059
   If_Result_4 := Bind_Result;
else
   --# expr-start 10067 '<If at nodes.lkt:17579:17>' If_Result_3 ada/nodes.lkt:17579
--# expr-start 10064 '<BooleanBinaryOp Or at nodes.lkt:17588:21>' If_Result_2 ada/nodes.lkt:17588
--# expr-start 10060 '<FieldAccess for is_discrete_type at nodes.lkt:17588:21>' Fld_17 ada/nodes.lkt:17588
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_discrete_type'
Fld_17 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Discrete_Type (Node => Local_Typ.Node, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 10060
if Fld_17 then
   If_Result_2 := True;
else
   --# expr-start 10063 '<BooleanBinaryOp And at nodes.lkt:17589:25>' If_Result_1 ada/nodes.lkt:17589
--# expr-start 10061 '<FieldAccess for is_real_type at nodes.lkt:17589:25>' Fld_18 ada/nodes.lkt:17589
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_real_type'
Fld_18 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Real_Type (Node => Local_Typ.Node, Origin => Origin, E_Info => Local_Typ.Info);
--# end
--# expr-done 10061
if Fld_18 then
   --# expr-start 10062 '<Not at nodes.lkt:17589:48>' Not_Val ada/nodes.lkt:17589
Not_Val := not (Local_Is_Length); 
--# expr-done 10062
   If_Result_1 := Not_Val;
else
   If_Result_1 := False;
end if;
--# expr-done 10063
   If_Result_2 := If_Result_1;
end if;
--# expr-done 10064
if If_Result_2 then
   --# expr-start 10066 '<Bind at nodes.lkt:17590:22>' Bind_Result_1 ada/nodes.lkt:17590
--# expr-start 10065 '<FieldAccess for type_var at nodes.lkt:17590:22>' Fld_16 ada/nodes.lkt:17590
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10065
Fld_16.Value := No_Entity;
Entity_Vars.Reset (Fld_16);
Cast_Expr := Local_Typ; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_16, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17590:22") else null)); 
--# expr-done 10066
   If_Result_3 := Bind_Result_1;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17591:22") else null)); 
   If_Result_3 := False_Rel;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 10067
   If_Result_4 := If_Result_3;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 10068
   If_Result_6 := If_Result_4;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 10069
And_Pred := Create_And (Fld_11, If_Result_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17577:13") else null)); 
--# expr-done 10070
   If_Result_9 := And_Pred;
else
   --# expr-start 10087 '<Let at nodes.lkt:17597:13>' Let_Result_2 ada/nodes.lkt:17597
--# scope-start
--# expr-start 10075 '<FieldAccess for resolve_names_internal_with_eq at nodes.lkt:17598:17>' Fld_24 ada/nodes.lkt:17598
--# expr-start 10071 '<FieldAccess for prefix at nodes.lkt:17598:17>' Fld_21 ada/nodes.lkt:17598
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10071
      if Fld_21.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10074 '<Predicate on BaseTypeDecl.is_array_def_with_deref at nodes.lkt:17599:21>' Pred ada/nodes.lkt:17599
--# expr-start 10073 '<FieldAccess for type_var at nodes.lkt:17599:59>' Fld_23 ada/nodes.lkt:17599
--# expr-start 10072 '<FieldAccess for prefix at nodes.lkt:17599:59>' Fld_22 ada/nodes.lkt:17599
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10072
      if Fld_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_22.Node);
--# expr-done 10073
Fld_23.Value := No_Entity;
Entity_Vars.Reset (Fld_23);
Pred := Solver.Create_Predicate (Fld_23, Create_Base_Type_Decl_P_Is_Array_Def_With_Deref_0_Predicate (Origin)); 
--# expr-done 10074
--# property-call-start AdaNode.resolve_names_internal_with_eq
Fld_24 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal_With_Eq (Node => Fld_21.Node, Additional_Equation => Pred, Env => Env, Origin => Origin, E_Info => Fld_21.Info);
--# end
--# expr-done 10075
Local_Res := Fld_24; 
--# bind res Local_Res
--# expr-start 10086 '<Let at nodes.lkt:17603:13>' Let_Result_1 ada/nodes.lkt:17603
--# scope-start
--# expr-start 10078 '<Cast to BaseTypeDecl at nodes.lkt:17603:27>' Cast_Result_2 ada/nodes.lkt:17603
--# expr-start 10077 '<FieldAccess for type_val at nodes.lkt:17603:27>' Fld_26 ada/nodes.lkt:17603
--# expr-start 10076 '<FieldAccess for prefix at nodes.lkt:17603:27>' Fld_25 ada/nodes.lkt:17603
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10076
      if Fld_25.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_26 := Libadalang.Implementation.Expr_P_Type_Val (Node => Fld_25.Node);
--# end
--# expr-done 10077
   if Fld_26.Node = null
      or else Fld_26.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_26.Node,
         Info => Fld_26.Info);
   else
         Cast_Result_2 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 10078
Local_Pfx_Typ := Cast_Result_2; 
--# bind pfx_typ Local_Pfx_Typ
--# expr-start 10085 '<If at nodes.lkt:17605:13>' If_Result_8 ada/nodes.lkt:17605
if Local_Res then
   --# expr-start 10084 '<If at nodes.lkt:17607:17>' If_Result_7 ada/nodes.lkt:17607
if Local_Is_Length then
   --# expr-start 10080 '<FieldAccess for universal_int_bind at nodes.lkt:17607:35>' Fld_28 ada/nodes.lkt:17607
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10079 '<FieldAccess for type_var at nodes.lkt:17607:59>' Fld_27 ada/nodes.lkt:17607
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10079
--# property-call-start AdaNode.universal_int_bind
Fld_28 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_27, Origin => Origin);
--# end
--# expr-done 10080
   If_Result_7 := Fld_28;
else
   --# expr-start 10083 '<Bind at nodes.lkt:17608:22>' Bind_Result_2 ada/nodes.lkt:17608
--# expr-start 10081 '<FieldAccess for type_var at nodes.lkt:17608:22>' Fld_29 ada/nodes.lkt:17608
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_29 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10081
Fld_29.Value := No_Entity;
Entity_Vars.Reset (Fld_29);
--# expr-start 10082 '<FieldAccess for index_type at nodes.lkt:17608:41>' Fld_30 ada/nodes.lkt:17608
      if Local_Pfx_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.index_type
Fld_30 := Libadalang.Implementation.Base_Type_Decl_P_Index_Type (Node => Local_Pfx_Typ.Node, Dim => Local_Dim, Origin => Origin, E_Info => Local_Pfx_Typ.Info);
--# end
--# expr-done 10082
      Cast_Result_3 := Create_Internal_Entity
        (Node => Fld_30.Node,
         Info => Fld_30.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_29, Cast_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17608:22") else null)); 
--# expr-done 10083
   If_Result_7 := Bind_Result_2;
end if;
      Inc_Ref (If_Result_7);
--# expr-done 10084
   If_Result_8 := If_Result_7;
else
   False_Rel_1 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17609:18") else null)); 
   If_Result_8 := False_Rel_1;
end if;
      Inc_Ref (If_Result_8);
--# expr-done 10085
Let_Result_1 := If_Result_8; Inc_Ref (Let_Result_1);
--# end
--# expr-done 10086
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 10087
   If_Result_9 := Let_Result_2;
end if;
      Inc_Ref (If_Result_9);
--# expr-done 10088
Let_Result_3 := If_Result_9; Inc_Ref (Let_Result_3);
--# end
--# expr-done 10089
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 10090
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 10091
         Property_Result := Let_Result_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1182;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1182;
                     Finalizer_Scope_3217;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Array_Attr_Equation;
--# end
--# property-start AttributeRef.subtype_attr_equation ada/nodes.lkt:17616
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Subtype_Attr_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1183 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_4 : Logic_Var;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1183 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1183;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10099 '<LogicBinaryOp And at nodes.lkt:17617:9>' And_Pred ada/nodes.lkt:17617
--# expr-start 10096 '<Bind at nodes.lkt:17617:9>' Bind_Result ada/nodes.lkt:17617
--# expr-start 10093 '<FieldAccess for ref_var at nodes.lkt:17617:9>' Fld_1 ada/nodes.lkt:17617
--# expr-start 10092 '<FieldAccess for prefix at nodes.lkt:17617:9>' Fld ada/nodes.lkt:17617
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Attribute_Ref_F_Prefix;
--# expr-done 10092
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld);
--# end
--# expr-done 10093
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 10095 '<FieldAccess for name_designated_type at nodes.lkt:17617:34>' Fld_3 ada/nodes.lkt:17617
--# expr-start 10094 '<FieldAccess for prefix at nodes.lkt:17617:34>' Fld_2 ada/nodes.lkt:17617
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10094
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_3 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 10095
      Cast_Result := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17617:9") else null)); 
--# expr-done 10096
--# expr-start 10098 '<FieldAccess for universal_int_bind at nodes.lkt:17618:14>' Fld_5 ada/nodes.lkt:17618
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10097 '<FieldAccess for type_var at nodes.lkt:17618:38>' Fld_4 ada/nodes.lkt:17618
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10097
--# property-call-start AdaNode.universal_int_bind
Fld_5 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_4, Origin => Origin);
--# end
--# expr-done 10098
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17617:9") else null)); 
--# expr-done 10099
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1183;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1183;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Subtype_Attr_Equation;
--# end
--# property-start AttributeRef.to_address_equation ada/nodes.lkt:17622
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_To_Address_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1184 with Inline_Always;
            procedure Finalizer_Scope_3218 with Inline_Always;
      Local_To_Address_Subp : Internal_Entity_Basic_Subp_Decl;
Var_Expr_249 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Subp_Decl;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Cast_Expr : Internal_Entity_Basic_Subp_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1184 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1184;
            procedure Finalizer_Scope_3218 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3218;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10113 '<Let at nodes.lkt:17625:9>' Let_Result ada/nodes.lkt:17625
--# scope-start
--# expr-start 10107 '<Cast to BasicSubpDecl at nodes.lkt:17626:13>' Cast_Result ada/nodes.lkt:17626
--# expr-start 10103 '<FieldAccess for get_unit_root_decl at nodes.lkt:17626:13>' Fld ada/nodes.lkt:17626
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10102 '<ArrayLiteral at nodes.lkt:17627:17>' Array_Lit ada/nodes.lkt:17627
--# expr-start 10100 '<Symbol System at nodes.lkt:17627:18>' Sym ada/nodes.lkt:17627
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_System); 
--# expr-done 10100
--# expr-start 10101 '<Symbol Storage_Elements at nodes.lkt:17627:29>' Sym_1 ada/nodes.lkt:17627
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Storage_Elements); 
--# expr-done 10101
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 10102
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Ent.Node, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 10103
Var_Expr_249 := Fld;
if Var_Expr_249 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 10106 '<EnvGet at nodes.lkt:17626:13>' Env_Get_Result ada/nodes.lkt:17626
--# expr-start 10104 '<FieldAccess for children_env at nodes.lkt:17626:13>' Fld_1 ada/nodes.lkt:17626
      if Var_Expr_249 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_249);
--# expr-done 10104
--# expr-start 10105 '<Symbol To_Address at nodes.lkt:17631:24>' Sym_2 ada/nodes.lkt:17631
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_To_Address); 
--# expr-done 10105
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Minimal), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 10106
Scope_Result := Env_Get_Result;
   --# end
      Finalizer_Scope_3218;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Basic_Subp_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Subp_Decl
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result := No_Entity_Basic_Subp_Decl;
   end if;
--# expr-done 10107
Local_To_Address_Subp := Cast_Result; 
--# bind to_address_subp Local_To_Address_Subp
--# expr-start 10112 '<LogicBinaryOp And at nodes.lkt:17634:9>' And_Pred ada/nodes.lkt:17634
--# expr-start 10109 '<FieldAccess for sub_equation at nodes.lkt:17634:9>' Fld_3 ada/nodes.lkt:17634
--# expr-start 10108 '<FieldAccess for prefix at nodes.lkt:17634:9>' Fld_2 ada/nodes.lkt:17634
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10108
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 10109
--# expr-start 10111 '<Bind at nodes.lkt:17634:41>' Bind_Result ada/nodes.lkt:17634
--# expr-start 10110 '<FieldAccess for ref_var at nodes.lkt:17634:41>' Fld_4 ada/nodes.lkt:17634
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 10110
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Cast_Expr := Local_To_Address_Subp; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17634:41") else null)); 
--# expr-done 10111
And_Pred := Create_And (Fld_3, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17634:9") else null)); 
--# expr-done 10112
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 10113
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1184;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1184;
                     Finalizer_Scope_3218;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_To_Address_Equation;
--# end
--# property-start AttributeRef.index_equation ada/nodes.lkt:17639
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Index_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1185 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Cast_Result : Internal_Entity_Entry_Decl;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Name;
Fld_4 : Logic_Equation;
Fld_5 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1185 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1185;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10124 '<Let at nodes.lkt:17640:9>' Let_Result ada/nodes.lkt:17640
--# scope-start
--# expr-start 10118 '<FieldAccess for family_type at nodes.lkt:17641:13>' Fld_2 ada/nodes.lkt:17641
--# expr-start 10117 '<Cast to EntryDecl at nodes.lkt:17641:13>' Cast_Result ada/nodes.lkt:17641
--# expr-start 10116 '<EnvGet at nodes.lkt:17641:13>' Env_Get_Result ada/nodes.lkt:17641
--# expr-start 10115 '<FieldAccess for name_symbol at nodes.lkt:17641:27>' Fld_1 ada/nodes.lkt:17641
--# expr-start 10114 '<FieldAccess for prefix at nodes.lkt:17641:27>' Fld ada/nodes.lkt:17641
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10114
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 10115
Env_Get_Result := AST_Envs.Get_First (Self => Env, Key => Thin (Fld_1), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 10116
   if Env_Get_Result.Node = null
      or else Env_Get_Result.Node.Kind in Ada_Entry_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Entry_Decl
        (Node => Env_Get_Result.Node,
         Info => Env_Get_Result.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10117
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EntryDecl.family_type
Fld_2 := Libadalang.Implementation.Entry_Decl_P_Family_Type (Node => Cast_Result.Node, Origin => Origin, E_Info => Cast_Result.Info);
--# end
--# expr-done 10118
Local_Typ := Fld_2; 
--# bind typ Local_Typ
--# expr-start 10123 '<LogicBinaryOp And at nodes.lkt:17645:9>' And_Pred ada/nodes.lkt:17645
--# expr-start 10120 '<FieldAccess for sub_equation at nodes.lkt:17645:9>' Fld_4 ada/nodes.lkt:17645
--# expr-start 10119 '<FieldAccess for prefix at nodes.lkt:17645:9>' Fld_3 ada/nodes.lkt:17645
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10119
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 10120
--# expr-start 10122 '<Bind at nodes.lkt:17645:41>' Bind_Result ada/nodes.lkt:17645
--# expr-start 10121 '<FieldAccess for type_var at nodes.lkt:17645:41>' Fld_5 ada/nodes.lkt:17645
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10121
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr := Local_Typ; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17645:41") else null)); 
--# expr-done 10122
And_Pred := Create_And (Fld_4, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17645:9") else null)); 
--# expr-done 10123
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 10124
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1185;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1185;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Index_Equation;
--# end
--# property-start AttributeRef.deref_equation ada/nodes.lkt:17650
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Deref_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1186 with Inline_Always;
            procedure Finalizer_Scope_3219 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Assoc;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Bare_Name;
Fld_4 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Assoc_List;
Fld_6 : Bare_Assoc_List;
Fld_7 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Equation;
Fld_10 : Internal_Entity_Expr;
Fld_11 : Logic_Var;
Fld_12 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_13 : Internal_Entity_Expr;
Fld_14 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Scope_Result : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_3 : Logic_Equation;
            procedure Finalizer_Scope_1186 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_1186;
            procedure Finalizer_Scope_3219 is
            begin
                     Dec_Ref (Fld_9);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_14);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_3219;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10143 '<LogicBinaryOp And at nodes.lkt:17651:9>' And_Pred_3 ada/nodes.lkt:17651
--# expr-start 10131 '<LogicBinaryOp And at nodes.lkt:17651:9>' And_Pred ada/nodes.lkt:17651
--# expr-start 10126 '<FieldAccess for xref_type_equation at nodes.lkt:17651:9>' Fld_1 ada/nodes.lkt:17651
--# expr-start 10125 '<FieldAccess for prefix at nodes.lkt:17651:9>' Fld ada/nodes.lkt:17651
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10125
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_1 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 10126
--# expr-start 10130 '<Bind at nodes.lkt:17652:14>' Bind_Result ada/nodes.lkt:17652
--# expr-start 10127 '<FieldAccess for type_var at nodes.lkt:17652:14>' Fld_2 ada/nodes.lkt:17652
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10127
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 10129 '<FieldAccess for ref_var at nodes.lkt:17652:34>' Fld_4 ada/nodes.lkt:17652
--# expr-start 10128 '<FieldAccess for prefix at nodes.lkt:17652:34>' Fld_3 ada/nodes.lkt:17652
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Attribute_Ref_F_Prefix;
--# expr-done 10128
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_3);
--# end
--# expr-done 10129
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Bind_Result := Solver.Create_Unify (Fld_2, Fld_4, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17652:14") else null)); 
--# expr-done 10130
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17651:9") else null)); 
--# expr-done 10131
--# expr-start 10132 '<FieldAccess for args at nodes.lkt:17653:14>' Fld_5 ada/nodes.lkt:17653
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Attribute_Ref_F_Args, Info => Ent.Info);
--# expr-done 10132
Fld_6 := Fld_5.Node;
Get_Result := Get (Self, Fld_6, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_7 := Fld_5.Info;
As_Entity := (Info => Fld_7, Node => Get_Result); 
   If_Result := As_Entity;
end if;
Var_Expr_0 := If_Result;
if Var_Expr_0 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind arg Var_Expr_0
--# expr-start 10142 '<LogicBinaryOp And at nodes.lkt:17655:13>' And_Pred_2 ada/nodes.lkt:17655
--# expr-start 10139 '<LogicBinaryOp And at nodes.lkt:17655:13>' And_Pred_1 ada/nodes.lkt:17655
--# expr-start 10134 '<FieldAccess for sub_equation at nodes.lkt:17655:13>' Fld_9 ada/nodes.lkt:17655
--# expr-start 10133 '<FieldAccess for expr at nodes.lkt:17655:13>' Fld_8 ada/nodes.lkt:17655
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_8 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10133
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_9 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_8.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_8.Info);
--# end
--# expr-done 10134
--# expr-start 10138 '<Bind at nodes.lkt:17656:18>' Bind_Result_1 ada/nodes.lkt:17656
--# expr-start 10136 '<FieldAccess for expected_type_var at nodes.lkt:17656:18>' Fld_11 ada/nodes.lkt:17656
--# expr-start 10135 '<FieldAccess for expr at nodes.lkt:17656:18>' Fld_10 ada/nodes.lkt:17656
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10135
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_10.Node);
--# expr-done 10136
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
--# expr-start 10137 '<FieldAccess for system_address_type at nodes.lkt:17656:52>' Fld_12 ada/nodes.lkt:17656
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.system_address_type
Fld_12 := Libadalang.Implementation.Ada_Node_P_System_Address_Type (Node => Self);
--# end
--# expr-done 10137
      Cast_Result := Create_Internal_Entity
        (Node => Fld_12.Node,
         Info => Fld_12.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_11, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17656:18") else null)); 
--# expr-done 10138
And_Pred_1 := Create_And (Fld_9, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17655:13") else null)); 
--# expr-done 10139
--# expr-start 10141 '<FieldAccess for matches_expected_type at nodes.lkt:17657:18>' Fld_14 ada/nodes.lkt:17657
--# expr-start 10140 '<FieldAccess for expr at nodes.lkt:17657:18>' Fld_13 ada/nodes.lkt:17657
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_13 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10140
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_14 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_13.Node, Origin => Origin);
--# end
--# expr-done 10141
And_Pred_2 := Create_And (And_Pred_1, Fld_14, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17655:13") else null)); 
--# expr-done 10142
Scope_Result := And_Pred_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3219;
   Result_Var := Scope_Result;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17658:25") else null)); 
   Result_Var := False_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_3 := Create_And (And_Pred, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17651:9") else null)); 
--# expr-done 10143
         Property_Result := And_Pred_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1186;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1186;
                     Finalizer_Scope_3219;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Deref_Equation;
--# end
--# property-start AttributeRef.mechanism_code_equation ada/nodes.lkt:17663
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Mechanism_Code_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1187 with Inline_Always;
            procedure Finalizer_Scope_3220 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Assoc;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Internal_Entity_Assoc_List;
Fld_5 : Bare_Assoc_List;
Fld_6 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_7 : Internal_Entity_Expr;
Fld_8 : Logic_Equation;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Logic_Var;
Fld_11 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_3 : Logic_Equation;
            procedure Finalizer_Scope_1187 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_1187;
            procedure Finalizer_Scope_3220 is
            begin
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_11);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_13);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_3220;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10159 '<LogicBinaryOp And at nodes.lkt:17664:9>' And_Pred_3 ada/nodes.lkt:17664
--# expr-start 10148 '<LogicBinaryOp And at nodes.lkt:17664:9>' And_Pred ada/nodes.lkt:17664
--# expr-start 10145 '<FieldAccess for xref_no_overloading at nodes.lkt:17664:9>' Fld_1 ada/nodes.lkt:17664
--# expr-start 10144 '<FieldAccess for prefix at nodes.lkt:17664:9>' Fld ada/nodes.lkt:17664
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10144
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_1 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 10145
--# expr-start 10147 '<FieldAccess for universal_int_bind at nodes.lkt:17665:14>' Fld_3 ada/nodes.lkt:17665
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10146 '<FieldAccess for type_var at nodes.lkt:17665:38>' Fld_2 ada/nodes.lkt:17665
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10146
--# property-call-start AdaNode.universal_int_bind
Fld_3 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Ent.Node, Type_Var => Fld_2, Origin => Origin);
--# end
--# expr-done 10147
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17664:9") else null)); 
--# expr-done 10148
--# expr-start 10149 '<FieldAccess for args at nodes.lkt:17666:14>' Fld_4 ada/nodes.lkt:17666
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Attribute_Ref_F_Args, Info => Ent.Info);
--# expr-done 10149
Fld_5 := Fld_4.Node;
Get_Result := Get (Self, Fld_5, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_6 := Fld_4.Info;
As_Entity := (Info => Fld_6, Node => Get_Result); 
   If_Result := As_Entity;
end if;
Var_Expr_0 := If_Result;
if Var_Expr_0 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind arg Var_Expr_0
--# expr-start 10158 '<LogicBinaryOp And at nodes.lkt:17668:13>' And_Pred_2 ada/nodes.lkt:17668
--# expr-start 10155 '<LogicBinaryOp And at nodes.lkt:17668:13>' And_Pred_1 ada/nodes.lkt:17668
--# expr-start 10151 '<FieldAccess for sub_equation at nodes.lkt:17668:13>' Fld_8 ada/nodes.lkt:17668
--# expr-start 10150 '<FieldAccess for expr at nodes.lkt:17668:13>' Fld_7 ada/nodes.lkt:17668
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10150
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_7.Info);
--# end
--# expr-done 10151
--# expr-start 10154 '<FieldAccess for universal_int_bind at nodes.lkt:17669:18>' Fld_11 ada/nodes.lkt:17669
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10153 '<FieldAccess for expected_type_var at nodes.lkt:17669:42>' Fld_10 ada/nodes.lkt:17669
--# expr-start 10152 '<FieldAccess for expr at nodes.lkt:17669:42>' Fld_9 ada/nodes.lkt:17669
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10152
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_9.Node);
--# expr-done 10153
--# property-call-start AdaNode.universal_int_bind
Fld_11 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Ent.Node, Type_Var => Fld_10, Origin => Origin);
--# end
--# expr-done 10154
And_Pred_1 := Create_And (Fld_8, Fld_11, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17668:13") else null)); 
--# expr-done 10155
--# expr-start 10157 '<FieldAccess for matches_expected_type at nodes.lkt:17670:18>' Fld_13 ada/nodes.lkt:17670
--# expr-start 10156 '<FieldAccess for expr at nodes.lkt:17670:18>' Fld_12 ada/nodes.lkt:17670
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10156
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_13 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_12.Node, Origin => Origin);
--# end
--# expr-done 10157
And_Pred_2 := Create_And (And_Pred_1, Fld_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17668:13") else null)); 
--# expr-done 10158
Scope_Result := And_Pred_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3220;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17671:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_3 := Create_And (And_Pred, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17664:9") else null)); 
--# expr-done 10159
         Property_Result := And_Pred_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1187;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1187;
                     Finalizer_Scope_3220;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Mechanism_Code_Equation;
--# end
--# property-start AttributeRef.storage_equation ada/nodes.lkt:17677
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Storage_Equation
  (Node : Bare_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1188 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Internal_Entity_Assoc_List;
Fld_5 : Bare_Assoc_List;
Fld_6 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_7 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1188 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1188;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10168 '<LogicBinaryOp And at nodes.lkt:17679:9>' And_Pred_1 ada/nodes.lkt:17679
--# expr-start 10165 '<LogicBinaryOp And at nodes.lkt:17679:9>' And_Pred ada/nodes.lkt:17679
--# expr-start 10161 '<FieldAccess for sub_equation at nodes.lkt:17679:9>' Fld_1 ada/nodes.lkt:17679
--# expr-start 10160 '<FieldAccess for prefix at nodes.lkt:17679:9>' Fld ada/nodes.lkt:17679
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10160
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 10161
--# expr-start 10164 '<Bind at nodes.lkt:17682:14>' Bind_Result ada/nodes.lkt:17682
--# expr-start 10162 '<FieldAccess for type_var at nodes.lkt:17682:14>' Fld_2 ada/nodes.lkt:17682
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10162
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 10163 '<FieldAccess for bool_type at nodes.lkt:17683:12>' Fld_3 ada/nodes.lkt:17683
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 10163
      Cast_Result := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Bind_Result := Solver.Create_Assign (Fld_2, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17682:14") else null)); 
--# expr-done 10164
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17679:9") else null)); 
--# expr-done 10165
--# expr-start 10167 '<FieldAccess for sub_equation at nodes.lkt:17686:14>' Fld_7 ada/nodes.lkt:17686
--# expr-start 10166 '<FieldAccess for args at nodes.lkt:17686:14>' Fld_4 ada/nodes.lkt:17686
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Attribute_Ref_F_Args, Info => Ent.Info);
--# expr-done 10166
Fld_5 := Fld_4.Node;
Get_Result := Get (Self, Fld_5, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_6 := Fld_4.Info;
As_Entity := (Info => Fld_6, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => If_Result.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => If_Result.Info);
--# end
--# expr-done 10167
And_Pred_1 := Create_And (And_Pred, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17679:9") else null)); 
--# expr-done 10168
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1188;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1188;
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Storage_Equation;
--# end
--# property-start AttributeRef.called_formal_subp_spec ada/nodes.lkt:17688
pragma Warnings (Off, "is not referenced");
 function Attribute_Ref_P_Called_Formal_Subp_Spec
  (Node : Bare_Attribute_Ref
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Attribute_Ref  := Bare_Attribute_Ref (Node);
     Ent : Internal_Entity_Attribute_Ref :=
       Internal_Entity_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
      Local_Rel_Name : Symbol_Type;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Identifier;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Internal_Entity_Base_Subp_Spec;
Scope_Result : Internal_Entity_Base_Subp_Spec;
Result_Var : Internal_Entity_Base_Subp_Spec;
Cast_Result : Internal_Entity_Base_Formal_Param_Holder;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Internal_Entity_Base_Formal_Param_Holder;
Let_Result : Internal_Entity_Base_Formal_Param_Holder;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10179 '<Let at nodes.lkt:17689:9>' Let_Result ada/nodes.lkt:17689
--# scope-start
--# expr-start 10170 '<FieldAccess for name_symbol at nodes.lkt:17689:24>' Fld_1 ada/nodes.lkt:17689
--# expr-start 10169 '<FieldAccess for attribute at nodes.lkt:17689:24>' Fld ada/nodes.lkt:17689
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Identifier (Node => Ent.Node.Attribute_Ref_F_Attribute, Info => Ent.Info);
--# expr-done 10169
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld.Node);
--# end
--# expr-done 10170
Local_Rel_Name := Fld_1; 
--# bind rel_name Local_Rel_Name
--# expr-start 10178 '<If at nodes.lkt:17691:9>' If_Result_2 ada/nodes.lkt:17691
--# expr-start 10171 '<Symbol Image at nodes.lkt:17691:24>' Sym ada/nodes.lkt:17691
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Image); 
--# expr-done 10171
Is_Equal_2 := Local_Rel_Name = Sym; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 10172 '<Symbol Wide_Image at nodes.lkt:17691:35>' Sym_1 ada/nodes.lkt:17691
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Image); 
--# expr-done 10172
Is_Equal_1 := Local_Rel_Name = Sym_1; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 10173 '<Symbol Wide_Wide_Image at nodes.lkt:17691:51>' Sym_2 ada/nodes.lkt:17691
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Image); 
--# expr-done 10173
Is_Equal := Local_Rel_Name = Sym_2; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
if If_Result_1 then
--# expr-start 10175 '<FieldAccess for expression_type at nodes.lkt:17693:13>' Fld_3 ada/nodes.lkt:17693
--# expr-start 10174 '<FieldAccess for prefix at nodes.lkt:17693:13>' Fld_2 ada/nodes.lkt:17693
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 10174
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_3 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 10175
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_0
--# expr-start 10177 '<FieldAccess for subp_spec_or_null at nodes.lkt:17694:26>' Fld_5 ada/nodes.lkt:17694
--# expr-start 10176 '<FieldAccess for attribute_subprogram at nodes.lkt:17694:26>' Fld_4 ada/nodes.lkt:17694
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.attribute_subprogram
Fld_4 := Libadalang.Implementation.Base_Type_Decl_P_Attribute_Subprogram (Node => Var_Expr_0.Node, Attr_Name => Local_Rel_Name, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10176
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 10177
Scope_Result := Fld_5;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Subp_Spec;
end if;
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   If_Result_2 := Cast_Result;
else
   If_Result_2 := No_Entity_Base_Formal_Param_Holder;
end if;
--# expr-done 10178
Let_Result := If_Result_2; 
--# end
--# expr-done 10179
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Attribute_Ref_P_Called_Formal_Subp_Spec;
--# end
   --
   --  Primitives for Bare_Call_Expr
   --
      procedure Initialize_Fields_For_Call_Expr
        (Self : Bare_Call_Expr
         ; Call_Expr_F_Name : Bare_Name
         ; Call_Expr_F_Suffix : Bare_Ada_Node
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Call_Expr_F_Name := Call_Expr_F_Name;
            Self.Call_Expr_F_Suffix := Call_Expr_F_Suffix;
      Self.Call_Expr_R_Called_Spec := Null_Var_Record;
      end Initialize_Fields_For_Call_Expr;
   function Call_Expr_F_Name
     (Node : Bare_Call_Expr) return Bare_Name
   is
   begin
         return Node.Call_Expr_F_Name;
   end;
   function Call_Expr_F_Suffix
     (Node : Bare_Call_Expr) return Bare_Ada_Node
   is
   begin
         return Node.Call_Expr_F_Suffix;
   end;
--# property-start CallExpr.ref_var ada/nodes.lkt:17713
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Ref_Var
  (Node : Bare_Call_Expr
  )
   return Logic_Var
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Bare_Name;
Fld_1 : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10181 '<FieldAccess for ref_var at nodes.lkt:17713:31>' Fld_1 ada/nodes.lkt:17713
--# expr-start 10180 '<FieldAccess for name at nodes.lkt:17713:31>' Fld ada/nodes.lkt:17713
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Call_Expr_F_Name;
--# expr-done 10180
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld);
--# end
--# expr-done 10181
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Ref_Var;
--# end
--# property-start CallExpr.subp_spec_var ada/nodes.lkt:17715
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Subp_Spec_Var
  (Node : Bare_Call_Expr
  )
   return Logic_Var
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 10182 '<FieldAccess for r_called_spec at nodes.lkt:17715:37>' Fld ada/nodes.lkt:17715
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Call_Expr_R_Called_Spec'Unrestricted_Access;
--# expr-done 10182
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Subp_Spec_Var;
--# end
--# property-start CallExpr.defines_subp_spec_var ada/nodes.lkt:17717
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Defines_Subp_Spec_Var
  (Node : Bare_Call_Expr
  )
   return Boolean
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Defines_Subp_Spec_Var;
--# end
--# property-start CallExpr.relative_name ada/nodes.lkt:17719
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Relative_Name
  (Node : Bare_Call_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 10184 '<FieldAccess for relative_name at nodes.lkt:17719:41>' Fld_1 ada/nodes.lkt:17719
--# expr-start 10183 '<FieldAccess for name at nodes.lkt:17719:41>' Fld ada/nodes.lkt:17719
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10183
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 10184
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Relative_Name;
--# end
--# property-start CallExpr.kind ada/nodes.lkt:17724
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Kind
  (Node : Bare_Call_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Call_Expr_Kind
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Call_Expr_Kind;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
If_Result : Call_Expr_Kind;
Fld_2 : Internal_Entity_Assoc_List;
Fld_3 : Bare_Assoc_List;
Len : Integer;
Is_Equal : Boolean;
Fld_4 : Internal_Entity_Name;
Fld_5 : Internal_Entity_Basic_Decl;
Is_A_1 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Call_Expr_Kind;
Fld_6 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_7 : Internal_Entity_Name;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Entity_Array_Type_Def;
Scope_Result : Internal_Entity_Array_Type_Def;
Result_Var : Internal_Entity_Array_Type_Def;
Is_Null : Boolean;
Not_Val : Boolean;
Dyn_Var_Bind_Result : Boolean;
If_Result_3 : Call_Expr_Kind;
Fld_10 : Boolean;
If_Result_4 : Call_Expr_Kind;
Fld_11 : Boolean;
If_Result_5 : Call_Expr_Kind;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10208 '<If at nodes.lkt:17725:9>' If_Result_5 ada/nodes.lkt:17725
--# expr-start 10185 '<FieldAccess for is_call at nodes.lkt:17725:12>' Fld_11 ada/nodes.lkt:17725
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_call
Fld_11 := Libadalang.Implementation.Name_P_Is_Call (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10185
if Fld_11 then
   If_Result_5 := Call;
else
   --# expr-start 10207 '<If at nodes.lkt:17725:9>' If_Result_4 ada/nodes.lkt:17725
--# expr-start 10186 '<FieldAccess for is_array_slice at nodes.lkt:17726:14>' Fld_10 ada/nodes.lkt:17726
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.is_array_slice
Fld_10 := Libadalang.Implementation.Call_Expr_P_Is_Array_Slice (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10186
if Fld_10 then
   If_Result_4 := Array_Slice;
else
   --# expr-start 10206 '<If at nodes.lkt:17725:9>' If_Result_3 ada/nodes.lkt:17725
--# expr-start 10193 '<bind at nodes.lkt:17728:13>' Dyn_Var_Bind_Result ada/nodes.lkt:17728
--# expr-start 10187 '<FieldAccess for origin_node at nodes.lkt:17728:27>' Fld_6 ada/nodes.lkt:17728
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_6 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 10187
Bound_Origin := Fld_6; 
--# expr-start 10192 '<Not at nodes.lkt:17730:13>' Not_Val ada/nodes.lkt:17730
--# expr-start 10191 '<IsNull at nodes.lkt:17730:17>' Is_Null ada/nodes.lkt:17730
--# expr-start 10189 '<FieldAccess for expression_type at nodes.lkt:17730:17>' Fld_8 ada/nodes.lkt:17730
--# expr-start 10188 '<FieldAccess for name at nodes.lkt:17730:17>' Fld_7 ada/nodes.lkt:17730
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10188
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_8 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 10189
Var_Expr_0 := Fld_8;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_0
--# expr-start 10190 '<FieldAccess for array_def_with_deref at nodes.lkt:17731:26>' Fld_9 ada/nodes.lkt:17731
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.array_def_with_deref
Fld_9 := Libadalang.Implementation.Base_Type_Decl_P_Array_Def_With_Deref (Node => Var_Expr_0.Node, Origin => Bound_Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10190
Scope_Result := Fld_9;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Array_Type_Def;
end if;
Is_Null := Result_Var.Node = null; 
--# expr-done 10191
Not_Val := not (Is_Null); 
--# expr-done 10192
Dyn_Var_Bind_Result := Not_Val; 
--# expr-done 10193
if Dyn_Var_Bind_Result then
   If_Result_3 := Array_Index;
else
   --# expr-start 10205 '<If at nodes.lkt:17725:9>' If_Result_2 ada/nodes.lkt:17725
--# expr-start 10200 '<BooleanBinaryOp And at nodes.lkt:17739:13>' If_Result_1 ada/nodes.lkt:17739
--# expr-start 10196 '<Eq at nodes.lkt:17739:13>' Is_Equal ada/nodes.lkt:17739
--# expr-start 10195 '<length at nodes.lkt:17739:13>' Len ada/nodes.lkt:17739
--# expr-start 10194 '<FieldAccess for params at nodes.lkt:17739:13>' Fld_2 ada/nodes.lkt:17739
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_2 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10194
Fld_3 := Fld_2.Node; 
Len := Length (Fld_3); 
--# expr-done 10195
Is_Equal := Len = 1; 
--# expr-done 10196
if Is_Equal then
   --# expr-start 10199 '<IsA BaseTypeDecl at nodes.lkt:17740:17>' Is_A_1 ada/nodes.lkt:17740
--# expr-start 10198 '<FieldAccess for referenced_decl at nodes.lkt:17740:17>' Fld_5 ada/nodes.lkt:17740
--# expr-start 10197 '<FieldAccess for name at nodes.lkt:17740:17>' Fld_4 ada/nodes.lkt:17740
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10197
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_5 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld_4.Node, Imprecise_Fallback => False, E_Info => Fld_4.Info);
--# end
--# expr-done 10198
Is_A_1 := Fld_5.Node /= null 
and then Fld_5.Node.Kind in Ada_Base_Type_Decl; 
--# expr-done 10199
   If_Result_1 := Is_A_1;
else
   If_Result_1 := False;
end if;
--# expr-done 10200
if If_Result_1 then
   If_Result_2 := Type_Conversion;
else
   --# expr-start 10204 '<If at nodes.lkt:17725:9>' If_Result ada/nodes.lkt:17725
--# expr-start 10203 '<IsA EntryDecl at nodes.lkt:17746:14>' Is_A ada/nodes.lkt:17746
--# expr-start 10202 '<FieldAccess for referenced_decl at nodes.lkt:17746:14>' Fld_1 ada/nodes.lkt:17746
--# expr-start 10201 '<FieldAccess for name at nodes.lkt:17746:14>' Fld ada/nodes.lkt:17746
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10201
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_1 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Fld.Node, Imprecise_Fallback => False, E_Info => Fld.Info);
--# end
--# expr-done 10202
Is_A := Fld_1.Node /= null 
and then Fld_1.Node.Kind in Ada_Entry_Decl_Range; 
--# expr-done 10203
if Is_A then
   If_Result := Family_Index;
else
   If_Result := raise Property_Error with "undetermined CallExpr kind";
end if;
--# expr-done 10204
   If_Result_2 := If_Result;
end if;
--# expr-done 10205
   If_Result_3 := If_Result_2;
end if;
--# expr-done 10206
   If_Result_4 := If_Result_3;
end if;
--# expr-done 10207
   If_Result_5 := If_Result_4;
end if;
--# expr-done 10208
         Property_Result := If_Result_5;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Kind;
--# end
--# property-start CallExpr.is_constant ada/nodes.lkt:17751
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Is_Constant
  (Node : Bare_Call_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Match_0 : Internal_Entity_Name;
Match_1 : Internal_Entity_Expr;
Fld : Internal_Entity_Assoc_List;
Fld_1 : Bare_Assoc_List;
Fld_2 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Boolean;
Match_Prefix : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_1 : Internal_Entity_Expr;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Match_Result : Boolean;
Fld_5 : Internal_Entity_Basic_Decl;
Fld_6 : Boolean;
Fld_7 : Call_Expr_Kind;
Is_Equal : Boolean;
If_Result_1 : Boolean;
Fld_8 : Call_Expr_Kind;
Is_Equal_1 : Boolean;
If_Result_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10220 '<If at nodes.lkt:17752:9>' If_Result_2 ada/nodes.lkt:17752
--# expr-start 10210 '<Eq at nodes.lkt:17752:12>' Is_Equal_1 ada/nodes.lkt:17752
--# expr-start 10209 '<FieldAccess for kind at nodes.lkt:17752:12>' Fld_8 ada/nodes.lkt:17752
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.kind
Fld_8 := Libadalang.Implementation.Call_Expr_P_Kind (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10209
Is_Equal_1 := Fld_8 = Type_Conversion; 
--# expr-done 10210
if Is_Equal_1 then
   --# expr-start 10214 '<Match at nodes.lkt:17754:13>' Match_Result ada/nodes.lkt:17754
--# expr-start 10212 '<FieldAccess for expr at nodes.lkt:17754:19>' Fld_3 ada/nodes.lkt:17754
--# expr-start 10211 '<FieldAccess for params at nodes.lkt:17754:19>' Fld ada/nodes.lkt:17754
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10211
Fld_1 := Fld.Node;
Get_Result := Get (Self, Fld_1, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 10212
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_3; 
case Ada_Expr (Match_Prefix.Node.Kind) is
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind n Match_0
--# expr-start 10213 '<FieldAccess for is_constant at nodes.lkt:17757:33>' Fld_4 ada/nodes.lkt:17757
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.is_constant'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Is_Constant (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 10213
Let_Result := Fld_4; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl_Expr .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind _ Match_1
Let_Result_1 := True; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 10214
   If_Result_2 := Match_Result;
else
   --# expr-start 10219 '<If at nodes.lkt:17752:9>' If_Result_1 ada/nodes.lkt:17752
--# expr-start 10216 '<Eq at nodes.lkt:17762:14>' Is_Equal ada/nodes.lkt:17762
--# expr-start 10215 '<FieldAccess for kind at nodes.lkt:17762:14>' Fld_7 ada/nodes.lkt:17762
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.kind
Fld_7 := Libadalang.Implementation.Call_Expr_P_Kind (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10215
Is_Equal := Fld_7 = Call; 
--# expr-done 10216
if Is_Equal then
   If_Result_1 := True;
else
   --# expr-start 10218 '<FieldAccess for is_constant_object at nodes.lkt:17765:14>' Fld_6 ada/nodes.lkt:17765
--# expr-start 10217 '<FieldAccess for referenced_decl at nodes.lkt:17765:14>' Fld_5 ada/nodes.lkt:17765
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_5 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 10217
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_constant_object'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Constant_Object (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 10218
   If_Result_1 := Fld_6;
end if;
--# expr-done 10219
   If_Result_2 := If_Result_1;
end if;
--# expr-done 10220
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Is_Constant;
--# end
--# property-start CallExpr.designated_env ada/nodes.lkt:17768
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Designated_Env
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1196 with Inline_Always;
            procedure Finalizer_Scope_3225 with Inline_Always;
            procedure Finalizer_Scope_3226 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Match_0 : Internal_Entity_Basic_Decl;
Match_1 : Internal_Entity;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Lexical_Env := Empty_Env;
Bound_Include_Ud_Indexing : Boolean;
Fld_3 : Internal_Entity_Array_Access;
Fld_4 : Lexical_Env := Empty_Env;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Let_Result : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Cast_Result_1 : Internal_Entity;
Let_Result_1 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Match_Result : Lexical_Env := Empty_Env;
Map_Result : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Lexical_Env := Empty_Env;
Let_Result_2 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1196 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Group_Env);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1196;
            procedure Finalizer_Scope_3225 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_3225;
            procedure Finalizer_Scope_3226 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3226;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10233 '<Let at nodes.lkt:17769:9>' Let_Result_2 ada/nodes.lkt:17769
--# scope-start
--# expr-start 10222 '<FieldAccess for name_designated_type at nodes.lkt:17769:19>' Fld_1 ada/nodes.lkt:17769
--# expr-start 10221 '<FieldAccess for name at nodes.lkt:17769:19>' Fld ada/nodes.lkt:17769
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10221
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 10222
Local_Typ := Fld_1; 
--# bind typ Local_Typ
--# expr-start 10232 '<If at nodes.lkt:17771:9>' If_Result ada/nodes.lkt:17771
--# expr-start 10224 '<Not at nodes.lkt:17771:12>' Not_Val ada/nodes.lkt:17771
--# expr-start 10223 '<IsNull at nodes.lkt:17771:16>' Is_Null ada/nodes.lkt:17771
Is_Null := Local_Typ.Node = null; 
--# expr-done 10223
Not_Val := not (Is_Null); 
--# expr-done 10224
if Not_Val then
   --# expr-start 10225 '<FieldAccess for defining_env at nodes.lkt:17771:33>' Fld_2 ada/nodes.lkt:17771
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Local_Typ.Node, Origin => Origin, Include_Ud_Indexing => False, Dottable_Type => No_Bare_Ada_Node, E_Info => Local_Typ.Info);
--# end
--# expr-done 10225
   If_Result := Fld_2;
else
   --# expr-start 10231 '<bind at nodes.lkt:17777:17>' Dyn_Var_Bind_Result ada/nodes.lkt:17777
Bound_Include_Ud_Indexing := True; 
--# expr-start 10230 '<env_group at nodes.lkt:17779:17>' Group_Env ada/nodes.lkt:17779
--# expr-start 10229 '<Map at nodes.lkt:17779:17>' Map_Result ada/nodes.lkt:17779
   --# expr-start 10226 '<FieldAccess for env_elements at nodes.lkt:17779:17>' Fld_3 ada/nodes.lkt:17779
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.env_elements
Fld_3 := Libadalang.Implementation.Expr_P_Env_Elements (Node => Ent.Node, Env => Env, No_Visibility => No_Visibility, E_Info => Ent.Info);
--# end
--# expr-done 10226
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_3;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
      --# expr-start 10228 '<Match at nodes.lkt:17781:21>' Match_Result ada/nodes.lkt:17781
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Abstract_State_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind bd Match_0
--# expr-start 10227 '<FieldAccess for defining_env at nodes.lkt:17782:55>' Fld_4 ada/nodes.lkt:17782
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Match_0.Node, Origin => Origin, Include_Ud_Indexing => Bound_Include_Ud_Indexing, Dottable_Type => No_Bare_Ada_Node, E_Info => Match_0.Info);
--# end
--# expr-done 10227
Let_Result := Fld_4; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3226;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind _ Match_1
Let_Result_1 := Empty_Env; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
end case;
--# expr-done 10228
         declare
            Item_To_Append : constant Lexical_Env := Match_Result;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3225;
         end loop;
      end;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10229
Group_Env := Group (Map_Result, No_Metadata); 
--# expr-done 10230
Dyn_Var_Bind_Result := Group_Env; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 10231
   If_Result := Dyn_Var_Bind_Result;
end if;
      Inc_Ref (If_Result);
--# expr-done 10232
Let_Result_2 := If_Result; Inc_Ref (Let_Result_2);
--# end
--# expr-done 10233
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1196;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1196;
                     Finalizer_Scope_3225;
                     Finalizer_Scope_3226;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Designated_Env;
--# end
--# property-start CallExpr.designated_env_no_overloading ada/nodes.lkt:17796
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Designated_Env_No_Overloading
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Empty_Env;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Designated_Env_No_Overloading;
--# end
--# property-start CallExpr.env_elements_impl ada/nodes.lkt:17799
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Env_Elements_Impl
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1198 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1198 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1198;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10235 '<FieldAccess for env_elements_impl at nodes.lkt:17800:9>' Fld_1 ada/nodes.lkt:17800
--# expr-start 10234 '<FieldAccess for name at nodes.lkt:17800:9>' Fld ada/nodes.lkt:17800
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10234
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.env_elements_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Env_Elements_Impl (Node => Fld.Node, Env => Env, E_Info => Fld.Info);
--# end
--# expr-done 10235
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1198;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1198;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Env_Elements_Impl;
--# end
--# property-start CallExpr.designated_type_impl ada/nodes.lkt:17805
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Designated_Type_Impl
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_3228 with Inline_Always;
            procedure Finalizer_Scope_3229 with Inline_Always;
      Local_Prefix_Tpe : Internal_Entity_Base_Type_Decl;
Local_Matches_Formals : Boolean;
Var_Expr_0 : Internal_Entity_Assoc_List;
Var_Expr_250 : Internal_Entity_Base_Type_Decl;
Var_Expr_251 : Internal_Entity_Name;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Assoc_List;
Fld_3 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Fld_4 : Internal_Param_Match_Array_Access;
Fld_5 : Boolean;
Fld_6 : Internal_Entity_Defining_Name;
Fld_7 : Internal_Entity_Base_Formal_Param_Decl;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Single_Actual;
Fld_10 : Internal_Entity_Basic_Assoc;
Fld_11 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_12 : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Fld_13 : Boolean;
If_Result : Boolean;
Quantifier_Result : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_3228 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3228;
            procedure Finalizer_Scope_3229 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3229;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10255 '<Let at nodes.lkt:17807:9>' Let_Result_1 ada/nodes.lkt:17807
--# scope-start
--# expr-start 10237 '<FieldAccess for designated_type_impl at nodes.lkt:17807:26>' Fld_1 ada/nodes.lkt:17807
--# expr-start 10236 '<FieldAccess for name at nodes.lkt:17807:26>' Fld ada/nodes.lkt:17807
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10236
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Fld.Node, Env => Env, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 10237
Local_Prefix_Tpe := Fld_1; 
--# bind prefix_tpe Local_Prefix_Tpe
--# expr-start 10254 '<Let at nodes.lkt:17811:9>' Let_Result ada/nodes.lkt:17811
--# scope-start
--# expr-start 10238 '<FieldAccess for params at nodes.lkt:17812:13>' Fld_2 ada/nodes.lkt:17812
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_2 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10238
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Assoc_List then
   --# scope-start
   --# bind ps Var_Expr_0
--# expr-start 10252 '<AllQuantifier at nodes.lkt:17814:17>' Quantifier_Result ada/nodes.lkt:17814
   --# expr-start 10240 '<FieldAccess for match_formals at nodes.lkt:17814:17>' Fld_4 ada/nodes.lkt:17814
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Var_Expr_250 := Local_Prefix_Tpe;
if Var_Expr_250 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 10239 '<FieldAccess for discriminants_list at nodes.lkt:17814:36>' Fld_3 ada/nodes.lkt:17814
      if Var_Expr_250.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discriminants_list'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discriminants_List (Node => Var_Expr_250.Node, Origin => Origin, E_Info => Var_Expr_250.Info);
--# end
--# expr-done 10239
Scope_Result := Fld_3;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3229;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Formal_Param_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
--# property-call-start AdaNode.match_formals
Fld_4 := Libadalang.Implementation.Ada_Node_P_Match_Formals (Node => Self, Formal_Params => Result_Var, Params => Var_Expr_0, Is_Dottable_Subp => False);
--# end
--# expr-done 10240
      Quantifier_Result := True;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_4;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_1
      --# expr-start 10251 '<BooleanBinaryOp And at nodes.lkt:17817:21>' If_Result ada/nodes.lkt:17817
--# expr-start 10241 '<FieldAccess for has_matched at nodes.lkt:17817:21>' Fld_5 ada/nodes.lkt:17817
Fld_5 := Item_1.Has_Matched;
--# expr-done 10241
if Fld_5 then
   --# expr-start 10250 '<FieldAccess for matching_type at nodes.lkt:17818:25>' Fld_13 ada/nodes.lkt:17818
--# expr-start 10244 '<FieldAccess for formal_type at nodes.lkt:17818:25>' Fld_8 ada/nodes.lkt:17818
--# expr-start 10243 '<FieldAccess for formal_decl at nodes.lkt:17818:25>' Fld_7 ada/nodes.lkt:17818
--# expr-start 10242 '<FieldAccess for formal at nodes.lkt:17818:25>' Fld_6 ada/nodes.lkt:17818
Fld_6 := Item_1.Formal;
--# expr-done 10242
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_7 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# end
--# expr-done 10243
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_8 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_7.Node, Origin => Origin, E_Info => Fld_7.Info);
--# end
--# expr-done 10244
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10248 '<Cast to Name at nodes.lkt:17819:25>' Cast_Result ada/nodes.lkt:17819
--# expr-start 10247 '<FieldAccess for expr at nodes.lkt:17819:25>' Fld_11 ada/nodes.lkt:17819
--# expr-start 10246 '<FieldAccess for assoc at nodes.lkt:17819:25>' Fld_10 ada/nodes.lkt:17819
--# expr-start 10245 '<FieldAccess for actual at nodes.lkt:17819:25>' Fld_9 ada/nodes.lkt:17819
Fld_9 := Item_1.Actual;
--# expr-done 10245
Fld_10 := Fld_9.Assoc;
--# expr-done 10246
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_10.Node, E_Info => Fld_10.Info);
--# end
--# expr-done 10247
   if Fld_11.Node = null
      or else Fld_11.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Fld_11.Node,
         Info => Fld_11.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 10248
Var_Expr_251 := Cast_Result;
if Var_Expr_251 /= No_Entity_Name then
   --# scope-start
--# expr-start 10249 '<FieldAccess for name_designated_type at nodes.lkt:17819:25>' Fld_12 ada/nodes.lkt:17819
      if Var_Expr_251.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_12 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Var_Expr_251.Node, E_Info => Var_Expr_251.Info);
--# end
--# expr-done 10249
Scope_Result_1 := Fld_12;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
--# property-call-start BaseTypeDecl.matching_type
Fld_13 := Libadalang.Implementation.Base_Type_Decl_P_Matching_Type (Node => Fld_8.Node, Expected_Type => Result_Var_1, Origin => Origin, E_Info => Fld_8.Info);
--# end
--# expr-done 10250
   If_Result := Fld_13;
else
   If_Result := False;
end if;
--# expr-done 10251
      Quantifier_Result := If_Result;
   --# end
               exit when not Quantifier_Result;
         end loop;
      end;
--# expr-done 10252
Scope_Result_2 := Quantifier_Result;
   --# end
      Finalizer_Scope_3228;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := True;
end if;
Local_Matches_Formals := Result_Var_2; 
--# bind matches_formals Local_Matches_Formals
--# expr-start 10253 '<If at nodes.lkt:17827:9>' If_Result_1 ada/nodes.lkt:17827
if Local_Matches_Formals then
   If_Result_1 := Local_Prefix_Tpe;
else
   If_Result_1 := No_Entity_Base_Type_Decl;
end if;
--# expr-done 10253
Let_Result := If_Result_1; 
--# end
--# expr-done 10254
Let_Result_1 := Let_Result; 
--# end
--# expr-done 10255
         Property_Result := Let_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3228;
                     Finalizer_Scope_3229;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Designated_Type_Impl;
--# end
--# property-start CallExpr.params ada/nodes.lkt:17830
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Params
  (Node : Bare_Call_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Assoc_List
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Assoc_List;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Assoc_List;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 10257 '<Cast to AssocList at nodes.lkt:17830:39>' Cast_Result ada/nodes.lkt:17830
--# expr-start 10256 '<FieldAccess for suffix at nodes.lkt:17830:39>' Fld ada/nodes.lkt:17830
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Ent.Node.Call_Expr_F_Suffix, Info => Ent.Info);
--# expr-done 10256
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Assoc_List_Range
   then
      Cast_Result := Create_Internal_Entity_Assoc_List
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Assoc_List;
   end if;
--# expr-done 10257
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Params;
--# end
--# property-start CallExpr.check_array_slice ada/nodes.lkt:17835
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Check_Array_Slice
  (Node : Bare_Call_Expr
      ; Typ : Internal_Entity_Base_Type_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Atd : Internal_Entity_Array_Type_Def;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity;
Var_Expr_2 : Internal_Entity_Assoc_List;
Var_Expr_3 : Internal_Entity_Name;
Fld : Internal_Entity_Array_Type_Def;
Scope_Result : Internal_Entity_Array_Type_Def;
Result_Var : Internal_Entity_Array_Type_Def;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity;
Is_A : Boolean;
Is_A_1 : Boolean;
If_Result : Boolean;
Is_A_2 : Boolean;
If_Result_1 : Boolean;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Assoc_List;
Fld_2 : Bare_Assoc_List;
Len : Integer;
Is_Equal : Boolean;
Saved : Internal_Entity_Assoc_List;
Fld_3 : Bare_Assoc_List;
Fld_4 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity_Basic_Assoc;
Fld_5 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_6 : Internal_Entity_Base_Type_Decl;
Is_Null_2 : Boolean;
Not_Val_1 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_3 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_4 : Boolean;
Scope_Result_3 : Boolean;
Result_Var_3 : Boolean;
If_Result_5 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10278 '<Let at nodes.lkt:17836:9>' Let_Result ada/nodes.lkt:17836
--# scope-start
Var_Expr_0 := Typ;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind t Var_Expr_0
--# expr-start 10258 '<FieldAccess for array_def_with_deref at nodes.lkt:17836:33>' Fld ada/nodes.lkt:17836
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.array_def_with_deref
Fld := Libadalang.Implementation.Base_Type_Decl_P_Array_Def_With_Deref (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10258
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Array_Type_Def;
end if;
Local_Atd := Result_Var; 
--# bind atd Local_Atd
--# expr-start 10277 '<BooleanBinaryOp And at nodes.lkt:17838:9>' If_Result_5 ada/nodes.lkt:17838
--# expr-start 10260 '<Not at nodes.lkt:17838:9>' Not_Val ada/nodes.lkt:17838
--# expr-start 10259 '<IsNull at nodes.lkt:17838:13>' Is_Null ada/nodes.lkt:17838
Is_Null := Local_Atd.Node = null; 
--# expr-done 10259
Not_Val := not (Is_Null); 
--# expr-done 10260
if Not_Val then
--# expr-start 10261 '<FieldAccess for suffix at nodes.lkt:17839:13>' Fld_1 ada/nodes.lkt:17839
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity (Node => Ent.Node.Call_Expr_F_Suffix, Info => Ent.Info);
--# expr-done 10261
Var_Expr_1 := Fld_1;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind sfx Var_Expr_1
--# expr-start 10276 '<BooleanBinaryOp Or at nodes.lkt:17841:13>' If_Result_4 ada/nodes.lkt:17841
--# expr-start 10266 '<BooleanBinaryOp Or at nodes.lkt:17841:13>' If_Result_1 ada/nodes.lkt:17841
--# expr-start 10264 '<BooleanBinaryOp Or at nodes.lkt:17841:13>' If_Result ada/nodes.lkt:17841
--# expr-start 10262 '<IsA BinOp at nodes.lkt:17843:17>' Is_A ada/nodes.lkt:17843
Is_A := Var_Expr_1.Node /= null 
and then Var_Expr_1.Node.Kind in Ada_Bin_Op_Range; 
--# expr-done 10262
if Is_A then
   If_Result := True;
else
   --# expr-start 10263 '<IsA AttributeRef at nodes.lkt:17847:17>' Is_A_1 ada/nodes.lkt:17847
Is_A_1 := Var_Expr_1.Node /= null 
and then Var_Expr_1.Node.Kind in Ada_Attribute_Ref_Range; 
--# expr-done 10263
   If_Result := Is_A_1;
end if;
--# expr-done 10264
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 10265 '<IsA SubtypeIndication at nodes.lkt:17851:17>' Is_A_2 ada/nodes.lkt:17851
Is_A_2 := Var_Expr_1.Node /= null 
and then Var_Expr_1.Node.Kind in Ada_Subtype_Indication_Range; 
--# expr-done 10265
   If_Result_1 := Is_A_2;
end if;
--# expr-done 10266
if If_Result_1 then
   If_Result_4 := True;
else
--# expr-start 10267 '<Cast to AssocList at nodes.lkt:17855:17>' Cast_Result ada/nodes.lkt:17855
Cast_Expr := Var_Expr_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Assoc_List_Range
   then
      Cast_Result := Create_Internal_Entity_Assoc_List
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Assoc_List;
   end if;
--# expr-done 10267
Var_Expr_2 := Cast_Result;
if Var_Expr_2 /= No_Entity_Assoc_List then
   --# scope-start
   --# bind al Var_Expr_2
--# expr-start 10275 '<BooleanBinaryOp And at nodes.lkt:17857:21>' If_Result_3 ada/nodes.lkt:17857
--# expr-start 10269 '<Eq at nodes.lkt:17857:21>' Is_Equal ada/nodes.lkt:17857
--# expr-start 10268 '<length at nodes.lkt:17857:21>' Len ada/nodes.lkt:17857
Fld_2 := Var_Expr_2.Node; 
Len := Length (Fld_2); 
--# expr-done 10268
Is_Equal := Len = 1; 
--# expr-done 10269
if Is_Equal then
--# expr-start 10271 '<Cast to Name at nodes.lkt:17858:25>' Cast_Result_1 ada/nodes.lkt:17858
--# expr-start 10270 '<FieldAccess for expr at nodes.lkt:17858:25>' Fld_5 ada/nodes.lkt:17858
Saved := Var_Expr_2; 
Fld_3 := Saved.Node;
Get_Result := Get (Self, Fld_3, 0, True); 
Is_Null_1 := Get_Result = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity_Basic_Assoc;
else
Fld_4 := Saved.Info;
As_Entity := (Info => Fld_4, Node => Get_Result); 
   If_Result_2 := As_Entity;
end if;
      if If_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result_2.Node, E_Info => If_Result_2.Info);
--# end
--# expr-done 10270
   if Fld_5.Node = null
      or else Fld_5.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   else
         Cast_Result_1 := No_Entity_Name;
   end if;
--# expr-done 10271
Var_Expr_3 := Cast_Result_1;
if Var_Expr_3 /= No_Entity_Name then
   --# scope-start
   --# bind n Var_Expr_3
--# expr-start 10274 '<Not at nodes.lkt:17859:32>' Not_Val_1 ada/nodes.lkt:17859
--# expr-start 10273 '<IsNull at nodes.lkt:17859:36>' Is_Null_2 ada/nodes.lkt:17859
--# expr-start 10272 '<FieldAccess for name_designated_type at nodes.lkt:17859:36>' Fld_6 ada/nodes.lkt:17859
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_6 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 10272
Is_Null_2 := Fld_6.Node = null; 
--# expr-done 10273
Not_Val_1 := not (Is_Null_2); 
--# expr-done 10274
Scope_Result_1 := Not_Val_1;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_3 := Result_Var_1;
else
   If_Result_3 := False;
end if;
--# expr-done 10275
Scope_Result_2 := If_Result_3;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_4 := Result_Var_2;
end if;
--# expr-done 10276
Scope_Result_3 := If_Result_4;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := False;
end if;
   If_Result_5 := Result_Var_3;
else
   If_Result_5 := False;
end if;
--# expr-done 10277
Let_Result := If_Result_5; 
--# end
--# expr-done 10278
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Check_Array_Slice;
--# end
--# property-start CallExpr.is_array_slice ada/nodes.lkt:17869
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Is_Array_Slice
  (Node : Bare_Call_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Name;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Boolean;
Dyn_Var_Bind_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10283 '<bind at nodes.lkt:17870:9>' Dyn_Var_Bind_Result ada/nodes.lkt:17870
--# expr-start 10279 '<FieldAccess for origin_node at nodes.lkt:17870:23>' Fld ada/nodes.lkt:17870
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 10279
Bound_Origin := Fld; 
--# expr-start 10282 '<FieldAccess for check_array_slice at nodes.lkt:17872:9>' Fld_3 ada/nodes.lkt:17872
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10281 '<FieldAccess for expression_type at nodes.lkt:17872:32>' Fld_2 ada/nodes.lkt:17872
--# expr-start 10280 '<FieldAccess for name at nodes.lkt:17872:32>' Fld_1 ada/nodes.lkt:17872
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10280
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_2 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 10281
--# property-call-start CallExpr.check_array_slice
Fld_3 := Libadalang.Implementation.Call_Expr_P_Check_Array_Slice (Node => Ent.Node, Typ => Fld_2, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 10282
Dyn_Var_Bind_Result := Fld_3; 
--# expr-done 10283
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Is_Array_Slice;
--# end
--# property-start CallExpr.xref_equation ada/nodes.lkt:17876
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Xref_Equation
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1203 with Inline_Always;
      Fld : Logic_Equation;
            procedure Finalizer_Scope_1203 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1203;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10284 '<FieldAccess for bottom_up_name_equation at nodes.lkt:17876:37>' Fld ada/nodes.lkt:17876
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.bottom_up_name_equation
Fld := Libadalang.Implementation.Name_P_Bottom_Up_Name_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10284
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1203;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1203;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Xref_Equation;
--# end
--# property-start CallExpr.type_conv_self_xref_equation ada/nodes.lkt:17882
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Type_Conv_Self_Xref_Equation
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1204 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Bare_Name;
Fld_4 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1204 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1204;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10291 '<LogicBinaryOp And at nodes.lkt:17883:9>' And_Pred ada/nodes.lkt:17883
--# expr-start 10286 '<FieldAccess for subtype_indication_equation at nodes.lkt:17883:9>' Fld_1 ada/nodes.lkt:17883
--# expr-start 10285 '<FieldAccess for name at nodes.lkt:17883:9>' Fld ada/nodes.lkt:17883
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10285
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.subtype_indication_equation
Fld_1 := Libadalang.Implementation.Name_P_Subtype_Indication_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 10286
--# expr-start 10290 '<Bind at nodes.lkt:17884:14>' Bind_Result ada/nodes.lkt:17884
--# expr-start 10287 '<FieldAccess for type_var at nodes.lkt:17884:14>' Fld_2 ada/nodes.lkt:17884
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10287
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 10289 '<FieldAccess for ref_var at nodes.lkt:17884:34>' Fld_4 ada/nodes.lkt:17884
--# expr-start 10288 '<FieldAccess for name at nodes.lkt:17884:34>' Fld_3 ada/nodes.lkt:17884
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Call_Expr_F_Name;
--# expr-done 10288
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_3);
--# end
--# expr-done 10289
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Bind_Result := Solver.Create_Unify (Fld_2, Fld_4, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17884:14") else null)); 
--# expr-done 10290
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17883:9") else null)); 
--# expr-done 10291
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1204;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1204;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Type_Conv_Self_Xref_Equation;
--# end
--# property-start CallExpr.entry_equation ada/nodes.lkt:17889
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Entry_Equation
  (Node : Bare_Call_Expr
      ; E : Internal_Entity_Entry_Decl
      ; Root : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind e E
   --# bind root Root
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1205 with Inline_Always;
            procedure Finalizer_Scope_3236 with Inline_Always;
            procedure Finalizer_Scope_3237 with Inline_Always;
            procedure Finalizer_Scope_3238 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Call_Expr;
Fld : Internal_Entity_Base_Type_Decl;
Bound_Logic_Context : Internal_Logic_Context;
Fld_1 : Internal_Entity_Assoc_List;
Fld_2 : Bare_Assoc_List;
Fld_3 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Fld_6 : Internal_Entity_Assoc_List;
Fld_7 : Bare_Assoc_List;
Fld_8 : Internal_Entity_Info;
Get_Result_1 : Bare_Basic_Assoc;
As_Entity_1 : Internal_Entity_Basic_Assoc;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Assoc;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Logic_Equation;
And_Pred : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Fld_11 : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Call_Expr;
Fld_12 : Internal_Entity_Assoc_List;
Fld_13 : Bare_Assoc_List;
Fld_14 : Internal_Entity_Info;
Item_2 : Internal_Entity_Basic_Assoc;
Bare_Item_2 : Bare_Basic_Assoc;
Fld_15 : Internal_Entity_Expr;
Fld_16 : Logic_Equation;
As_Entity_2 : Internal_Entity_Basic_Assoc;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Basic_Assoc;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Cast_Expr_1 : Internal_Entity_Entry_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Fld_17 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Cast_Expr_2 : Internal_Entity_Entry_Decl;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Fld_18 : Logic_Equation;
Fld_19 : Boolean;
If_Result_3 : Logic_Equation;
            procedure Finalizer_Scope_1205 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_18);
                     Dec_Ref (If_Result_3);
            end Finalizer_Scope_1205;
            procedure Finalizer_Scope_3236 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Fld_10);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3236;
            procedure Finalizer_Scope_3237 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Fld_17);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3237;
            procedure Finalizer_Scope_3238 is
            begin
                     Dec_Ref (Fld_16);
            end Finalizer_Scope_3238;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10314 '<If at nodes.lkt:17890:9>' If_Result_3 ada/nodes.lkt:17890
--# expr-start 10292 '<FieldAccess for has_family at nodes.lkt:17890:12>' Fld_19 ada/nodes.lkt:17890
      if E.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EntryDecl.has_family
Fld_19 := Libadalang.Implementation.Entry_Decl_P_Has_Family (Node => E.Node);
--# end
--# expr-done 10292
if Fld_19 then
   --# expr-start 10312 '<LogicBinaryOp And at nodes.lkt:17893:13>' And_Pred_2 ada/nodes.lkt:17893
--# expr-start 10293 '<FieldAccess for family_type at nodes.lkt:17893:13>' Fld ada/nodes.lkt:17893
      if E.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EntryDecl.family_type
Fld := Libadalang.Implementation.Entry_Decl_P_Family_Type (Node => E.Node, Origin => Origin, E_Info => E.Info);
--# end
--# expr-done 10293
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind ft Var_Expr_0
--# expr-start 10302 '<LogicBinaryOp And at nodes.lkt:17895:17>' And_Pred ada/nodes.lkt:17895
--# expr-start 10298 '<bind at nodes.lkt:17896:21>' Dyn_Var_Bind_Result ada/nodes.lkt:17896
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 10297 '<Bind at nodes.lkt:17897:21>' Bind_Result ada/nodes.lkt:17897
--# expr-start 10296 '<FieldAccess for expected_type_var at nodes.lkt:17897:21>' Fld_5 ada/nodes.lkt:17897
--# expr-start 10295 '<FieldAccess for expr at nodes.lkt:17897:21>' Fld_4 ada/nodes.lkt:17897
--# expr-start 10294 '<FieldAccess for params at nodes.lkt:17897:21>' Fld_1 ada/nodes.lkt:17897
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_1 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10294
Fld_2 := Fld_1.Node;
Get_Result := Get (Self, Fld_2, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 10295
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_4.Node);
--# expr-done 10296
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr := Var_Expr_0; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17897:21") else null)); 
--# expr-done 10297
Dyn_Var_Bind_Result := Bind_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 10298
--# expr-start 10301 '<FieldAccess for matches_expected_type at nodes.lkt:17899:22>' Fld_10 ada/nodes.lkt:17899
--# expr-start 10300 '<FieldAccess for expr at nodes.lkt:17899:22>' Fld_9 ada/nodes.lkt:17899
--# expr-start 10299 '<FieldAccess for params at nodes.lkt:17899:22>' Fld_6 ada/nodes.lkt:17899
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_6 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10299
Fld_7 := Fld_6.Node;
Get_Result_1 := Get (Self, Fld_7, 0, True); 
Is_Null_1 := Get_Result_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Basic_Assoc;
else
Fld_8 := Fld_6.Info;
As_Entity_1 := (Info => Fld_8, Node => Get_Result_1); 
   If_Result_1 := As_Entity_1;
end if;
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result_1.Node, E_Info => If_Result_1.Info);
--# end
--# expr-done 10300
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_10 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_9.Node, Origin => Origin);
--# end
--# expr-done 10301
And_Pred := Create_And (Dyn_Var_Bind_Result, Fld_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17895:17") else null)); 
--# expr-done 10302
Scope_Result := And_Pred;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3236;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17900:29") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
--# expr-start 10304 '<Cast to CallExpr at nodes.lkt:17905:17>' Cast_Result_1 ada/nodes.lkt:17905
--# expr-start 10303 '<FieldAccess for parent_name at nodes.lkt:17905:17>' Fld_11 ada/nodes.lkt:17905
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name
Fld_11 := Libadalang.Implementation.Name_P_Parent_Name (Node => Ent.Node, Stop_At => Root, E_Info => Ent.Info);
--# end
--# expr-done 10303
   if Fld_11.Node = null
      or else Fld_11.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Call_Expr
        (Node => Fld_11.Node,
         Info => Fld_11.Info);
   else
         Cast_Result_1 := No_Entity_Call_Expr;
   end if;
--# expr-done 10304
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Entity_Call_Expr then
   --# scope-start
   --# bind c Var_Expr_1
--# expr-start 10311 '<LogicBinaryOp And at nodes.lkt:17907:21>' And_Pred_1 ada/nodes.lkt:17907
--# expr-start 10309 '<LogicAll at nodes.lkt:17907:21>' Logic_Boolean_Op ada/nodes.lkt:17907
--# expr-start 10308 '<Map at nodes.lkt:17907:21>' Map_Result ada/nodes.lkt:17907
   --# expr-start 10305 '<FieldAccess for params at nodes.lkt:17907:21>' Fld_12 ada/nodes.lkt:17907
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_12 := Libadalang.Implementation.Call_Expr_P_Params (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10305
Fld_13 := Fld_12.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_13 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_13;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_2 := Untyped_Item_2; 
Is_Null_2 := Bare_Item_2 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Basic_Assoc;
else
Fld_14 := Fld_12.Info;
As_Entity_2 := (Info => Fld_14, Node => Bare_Item_2); 
   If_Result_2 := As_Entity_2;
end if;
                  Item_2 := If_Result_2; 
   --# scope-start
               --# bind pa Item_2
      --# expr-start 10307 '<FieldAccess for sub_equation at nodes.lkt:17907:50>' Fld_16 ada/nodes.lkt:17907
--# expr-start 10306 '<FieldAccess for expr at nodes.lkt:17907:50>' Fld_15 ada/nodes.lkt:17907
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_15 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_2.Node, E_Info => Item_2.Info);
--# end
--# expr-done 10306
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_16 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_15.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_15.Info);
--# end
--# expr-done 10307
         declare
            Item_To_Append : constant Logic_Equation := Fld_16;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3238;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10308
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17907:21") else null)); 
--# expr-done 10309
--# expr-start 10310 '<FieldAccess for entity_equation at nodes.lkt:17908:26>' Fld_17 ada/nodes.lkt:17908
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr_1 := E; 
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# property-call-start CallExpr.entity_equation
Fld_17 := Libadalang.Implementation.Call_Expr_P_Entity_Equation (Node => Var_Expr_1.Node, S => Cast_Result_2, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, Logic_Context => Logic_Context, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10310
And_Pred_1 := Create_And (Logic_Boolean_Op, Fld_17, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17907:21") else null)); 
--# expr-done 10311
Scope_Result_1 := And_Pred_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3237;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17909:33") else null)); 
   Result_Var_1 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
And_Pred_2 := Create_And (Result_Var, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17893:13") else null)); 
--# expr-done 10312
   If_Result_3 := And_Pred_2;
else
   --# expr-start 10313 '<FieldAccess for entity_equation at nodes.lkt:17917:14>' Fld_18 ada/nodes.lkt:17917
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr_2 := E; 
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
--# property-call-start CallExpr.entity_equation
Fld_18 := Libadalang.Implementation.Call_Expr_P_Entity_Equation (Node => Ent.Node, S => Cast_Result_3, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, Logic_Context => Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 10313
   If_Result_3 := Fld_18;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 10314
         Property_Result := If_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1205;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1205;
                     Finalizer_Scope_3236;
                     Finalizer_Scope_3237;
                     Finalizer_Scope_3238;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Entry_Equation;
--# end
--# property-start CallExpr.entity_equation ada/nodes.lkt:17920
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Entity_Equation
  (Node : Bare_Call_Expr
      ; S : Internal_Entity_Basic_Decl
      ; Root : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind s S
   --# bind root Root
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1206 with Inline_Always;
            procedure Finalizer_Scope_3239 with Inline_Always;
            procedure Finalizer_Scope_3240 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Var_Expr_1 : Internal_Entity_Name;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Base_Type_Decl;
Fld_3 : Logic_Equation;
Fld_4 : Internal_Entity_Base_Subp_Spec;
Cast_Result : Internal_Entity_Base_Formal_Param_Holder;
Fld_5 : Internal_Entity_Info;
Fld_6 : Internal_Metadata;
Fld_7 : Boolean;
Fld_8 : Logic_Equation;
Fld_9 : Internal_Entity_Name;
Fld_10 : Internal_Entity_Base_Type_Decl;
Fld_11 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_12 : Internal_Entity_Base_Subp_Spec;
Cast_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Fld_13 : Internal_Entity_Info;
Fld_14 : Internal_Metadata;
Fld_15 : Boolean;
Fld_16 : Logic_Equation;
Fld_17 : Internal_Entity_Name;
Fld_18 : Internal_Entity_Base_Type_Decl;
Fld_19 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
False_Rel : Logic_Equation;
Fld_20 : Internal_Entity_Assoc_List;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Logic_Equation;
Fld_21 : Boolean;
If_Result_1 : Logic_Equation;
Fld_22 : Boolean;
If_Result_2 : Logic_Equation;
            procedure Finalizer_Scope_1206 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_2);
            end Finalizer_Scope_1206;
            procedure Finalizer_Scope_3239 is
            begin
                     Dec_Ref (Fld_11);
            end Finalizer_Scope_3239;
            procedure Finalizer_Scope_3240 is
            begin
                     Dec_Ref (Fld_19);
            end Finalizer_Scope_3240;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10345 '<If at nodes.lkt:17927:9>' If_Result_2 ada/nodes.lkt:17927
--# expr-start 10315 '<FieldAccess for is_paramless at nodes.lkt:17927:12>' Fld_22 ada/nodes.lkt:17927
      if S.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_paramless
Fld_22 := Libadalang.Implementation.Basic_Decl_P_Is_Paramless (Node => S.Node, E_Info => S.Info);
--# end
--# expr-done 10315
if Fld_22 then
   --# expr-start 10317 '<FieldAccess for parent_name_equation at nodes.lkt:17927:34>' Fld_1 ada/nodes.lkt:17927
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10316 '<FieldAccess for expr_type at nodes.lkt:17927:60>' Fld ada/nodes.lkt:17927
      if S.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => S.Node, Origin => Origin, E_Info => S.Info);
--# end
--# expr-done 10316
--# property-call-start Name.parent_name_equation
Fld_1 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Ent.Node, Typ => Fld, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10317
   If_Result_2 := Fld_1;
else
   --# expr-start 10344 '<If at nodes.lkt:17927:9>' If_Result_1 ada/nodes.lkt:17927
--# expr-start 10318 '<FieldAccess for can_be_paramless at nodes.lkt:17931:14>' Fld_21 ada/nodes.lkt:17931
      if S.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.can_be_paramless
Fld_21 := Libadalang.Implementation.Basic_Decl_P_Can_Be_Paramless (Node => S.Node, E_Info => S.Info);
--# end
--# expr-done 10318
if Fld_21 then
   --# expr-start 10330 '<LogicBinaryOp Or at nodes.lkt:17933:13>' Or_Pred ada/nodes.lkt:17933
--# expr-start 10320 '<FieldAccess for parent_name_equation at nodes.lkt:17933:13>' Fld_3 ada/nodes.lkt:17933
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10319 '<FieldAccess for expr_type at nodes.lkt:17933:39>' Fld_2 ada/nodes.lkt:17933
      if S.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => S.Node, Origin => Origin, E_Info => S.Info);
--# end
--# expr-done 10319
--# property-call-start Name.parent_name_equation
Fld_3 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Ent.Node, Typ => Fld_2, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10320
--# expr-start 10329 '<LogicBinaryOp And at nodes.lkt:17935:17>' And_Pred ada/nodes.lkt:17935
--# expr-start 10325 '<FieldAccess for subprogram_equation at nodes.lkt:17935:17>' Fld_8 ada/nodes.lkt:17935
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10321 '<FieldAccess for subp_spec_or_null at nodes.lkt:17936:21>' Fld_4 ada/nodes.lkt:17936
      if S.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => S.Node, E_Info => S.Info);
--# end
--# expr-done 10321
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
--# expr-start 10324 '<FieldAccess for dottable_subp at nodes.lkt:17937:21>' Fld_7 ada/nodes.lkt:17937
--# expr-start 10323 '<FieldAccess for md at nodes.lkt:17937:21>' Fld_6 ada/nodes.lkt:17937
--# expr-start 10322 '<FieldAccess for info at nodes.lkt:17937:21>' Fld_5 ada/nodes.lkt:17937
Fld_5 := S.Info;
--# expr-done 10322
Fld_6 := Fld_5.Md;
--# expr-done 10323
Fld_7 := Fld_6.Dottable_Subp;
--# expr-done 10324
--# property-call-start CallExpr.subprogram_equation
Fld_8 := Libadalang.Implementation.Call_Expr_P_Subprogram_Equation (Node => Ent.Node, Subp_Spec => Cast_Result, Dottable_Subp => Fld_7, Env => Env, Origin => Origin, Logic_Context => Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 10325
--# expr-start 10326 '<FieldAccess for parent_name at nodes.lkt:17939:22>' Fld_9 ada/nodes.lkt:17939
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name
Fld_9 := Libadalang.Implementation.Name_P_Parent_Name (Node => Ent.Node, Stop_At => Root, E_Info => Ent.Info);
--# end
--# expr-done 10326
Var_Expr_1 := Fld_9;
if Var_Expr_1 /= No_Entity_Name then
   --# scope-start
   --# bind pn Var_Expr_1
--# expr-start 10328 '<FieldAccess for parent_name_equation at nodes.lkt:17940:29>' Fld_11 ada/nodes.lkt:17940
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10327 '<FieldAccess for expr_type at nodes.lkt:17940:53>' Fld_10 ada/nodes.lkt:17940
      if S.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => S.Node, Origin => Origin, E_Info => S.Info);
--# end
--# expr-done 10327
--# property-call-start Name.parent_name_equation
Fld_11 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_1.Node, Typ => Fld_10, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10328
Scope_Result := Fld_11;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3239;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17941:33") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred := Create_And (Fld_8, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17935:17") else null)); 
--# expr-done 10329
Or_Pred := Create_Or (Fld_3, And_Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17933:13") else null)); 
--# expr-done 10330
   If_Result_1 := Or_Pred;
else
   --# expr-start 10343 '<If at nodes.lkt:17927:9>' If_Result ada/nodes.lkt:17927
--# expr-start 10333 '<Not at nodes.lkt:17944:14>' Not_Val ada/nodes.lkt:17944
--# expr-start 10332 '<IsNull at nodes.lkt:17944:18>' Is_Null ada/nodes.lkt:17944
--# expr-start 10331 '<FieldAccess for params at nodes.lkt:17944:18>' Fld_20 ada/nodes.lkt:17944
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_20 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10331
Is_Null := Fld_20.Node = null; 
--# expr-done 10332
Not_Val := not (Is_Null); 
--# expr-done 10333
if Not_Val then
   --# expr-start 10342 '<LogicBinaryOp And at nodes.lkt:17946:13>' And_Pred_1 ada/nodes.lkt:17946
--# expr-start 10338 '<FieldAccess for subprogram_equation at nodes.lkt:17946:13>' Fld_16 ada/nodes.lkt:17946
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10334 '<FieldAccess for subp_spec_or_null at nodes.lkt:17947:17>' Fld_12 ada/nodes.lkt:17947
      if S.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => S.Node, E_Info => S.Info);
--# end
--# expr-done 10334
      Cast_Result_1 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Fld_12.Node,
         Info => Fld_12.Info);
--# expr-start 10337 '<FieldAccess for dottable_subp at nodes.lkt:17948:17>' Fld_15 ada/nodes.lkt:17948
--# expr-start 10336 '<FieldAccess for md at nodes.lkt:17948:17>' Fld_14 ada/nodes.lkt:17948
--# expr-start 10335 '<FieldAccess for info at nodes.lkt:17948:17>' Fld_13 ada/nodes.lkt:17948
Fld_13 := S.Info;
--# expr-done 10335
Fld_14 := Fld_13.Md;
--# expr-done 10336
Fld_15 := Fld_14.Dottable_Subp;
--# expr-done 10337
--# property-call-start CallExpr.subprogram_equation
Fld_16 := Libadalang.Implementation.Call_Expr_P_Subprogram_Equation (Node => Ent.Node, Subp_Spec => Cast_Result_1, Dottable_Subp => Fld_15, Env => Env, Origin => Origin, Logic_Context => Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 10338
--# expr-start 10339 '<FieldAccess for parent_name at nodes.lkt:17950:18>' Fld_17 ada/nodes.lkt:17950
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name
Fld_17 := Libadalang.Implementation.Name_P_Parent_Name (Node => Ent.Node, Stop_At => Root, E_Info => Ent.Info);
--# end
--# expr-done 10339
Var_Expr_0 := Fld_17;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind pn Var_Expr_0
--# expr-start 10341 '<FieldAccess for parent_name_equation at nodes.lkt:17951:25>' Fld_19 ada/nodes.lkt:17951
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10340 '<FieldAccess for expr_type at nodes.lkt:17951:49>' Fld_18 ada/nodes.lkt:17951
      if S.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_18 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => S.Node, Origin => Origin, E_Info => S.Info);
--# end
--# expr-done 10340
--# property-call-start Name.parent_name_equation
Fld_19 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_0.Node, Typ => Fld_18, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10341
Scope_Result_1 := Fld_19;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3240;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17952:29") else null)); 
   Result_Var_1 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
And_Pred_1 := Create_And (Fld_16, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17946:13") else null)); 
--# expr-done 10342
   If_Result := And_Pred_1;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17954:14") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 10343
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 10344
   If_Result_2 := If_Result_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 10345
         Property_Result := If_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1206;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1206;
                     Finalizer_Scope_3239;
                     Finalizer_Scope_3240;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Entity_Equation;
--# end
--# property-start CallExpr.is_type_conversion ada/nodes.lkt:17958
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Is_Type_Conversion
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Name;
Is_A : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity_Name;
Fld_2 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10353 '<BooleanBinaryOp And at nodes.lkt:17959:9>' If_Result ada/nodes.lkt:17959
--# expr-start 10348 '<Not at nodes.lkt:17959:9>' Not_Val ada/nodes.lkt:17959
--# expr-start 10347 '<IsA QualExpr at nodes.lkt:17959:13>' Is_A ada/nodes.lkt:17959
--# expr-start 10346 '<FieldAccess for name at nodes.lkt:17959:13>' Fld ada/nodes.lkt:17959
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10346
Is_A := Fld.Node /= null 
and then Fld.Node.Kind in Ada_Qual_Expr_Range; 
--# expr-done 10347
Not_Val := not (Is_A); 
--# expr-done 10348
if Not_Val then
   --# expr-start 10352 '<Not at nodes.lkt:17962:13>' Not_Val_1 ada/nodes.lkt:17962
--# expr-start 10351 '<IsNull at nodes.lkt:17962:17>' Is_Null ada/nodes.lkt:17962
--# expr-start 10350 '<FieldAccess for designated_type_impl at nodes.lkt:17962:17>' Fld_2 ada/nodes.lkt:17962
--# expr-start 10349 '<FieldAccess for name at nodes.lkt:17962:17>' Fld_1 ada/nodes.lkt:17962
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10349
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Fld_1.Node, Env => Env, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 10350
Is_Null := Fld_2.Node = null; 
--# expr-done 10351
Not_Val_1 := not (Is_Null); 
--# expr-done 10352
   If_Result := Not_Val_1;
else
   If_Result := False;
end if;
--# expr-done 10353
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Is_Type_Conversion;
--# end
--# property-start CallExpr.xref_stop_resolution ada/nodes.lkt:17965
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Xref_Stop_Resolution
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10356 '<BooleanBinaryOp Or at nodes.lkt:17966:9>' If_Result ada/nodes.lkt:17966
--# expr-start 10354 '<Super at nodes.lkt:17966:9>' Fld ada/nodes.lkt:17966
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.xref_stop_resolution
Fld := Libadalang.Implementation.Ada_Node_P_Xref_Stop_Resolution (Node => Ent.Node, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 10354
if Fld then
   If_Result := True;
else
   --# expr-start 10355 '<FieldAccess for is_type_conversion at nodes.lkt:17966:25>' Fld_1 ada/nodes.lkt:17966
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.is_type_conversion
Fld_1 := Libadalang.Implementation.Call_Expr_P_Is_Type_Conversion (Node => Ent.Node, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 10355
   If_Result := Fld_1;
end if;
--# expr-done 10356
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Xref_Stop_Resolution;
--# end
--# property-start CallExpr.stop_resolution_equation ada/nodes.lkt:17969
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Stop_Resolution_Equation
  (Node : Bare_Call_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1209 with Inline_Always;
      Fld : Logic_Equation;
Fld_1 : Logic_Equation;
Fld_2 : Boolean;
If_Result : Logic_Equation;
            procedure Finalizer_Scope_1209 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_1209;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10360 '<If at nodes.lkt:17970:9>' If_Result ada/nodes.lkt:17970
--# expr-start 10357 '<FieldAccess for is_type_conversion at nodes.lkt:17970:12>' Fld_2 ada/nodes.lkt:17970
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.is_type_conversion
Fld_2 := Libadalang.Implementation.Call_Expr_P_Is_Type_Conversion (Node => Ent.Node, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 10357
if Fld_2 then
   --# expr-start 10358 '<FieldAccess for type_conv_self_xref_equation at nodes.lkt:17970:43>' Fld ada/nodes.lkt:17970
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.type_conv_self_xref_equation
Fld := Libadalang.Implementation.Call_Expr_P_Type_Conv_Self_Xref_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10358
   If_Result := Fld;
else
   --# expr-start 10359 '<Super at nodes.lkt:17971:14>' Fld_1 ada/nodes.lkt:17971
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.stop_resolution_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Stop_Resolution_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10359
   If_Result := Fld_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 10360
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1209;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1209;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Stop_Resolution_Equation;
--# end
--# property-start CallExpr.general_xref_equation ada/nodes.lkt:17976
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_General_Xref_Equation
  (Node : Bare_Call_Expr
      ; Root : Bare_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind root Root
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1210 with Inline_Always;
            procedure Finalizer_Scope_3241 with Inline_Always;
            procedure Finalizer_Scope_3242 with Inline_Always;
            procedure Finalizer_Scope_3243 with Inline_Always;
            procedure Finalizer_Scope_3245 with Inline_Always;
            procedure Finalizer_Scope_3246 with Inline_Always;
      Local_Subps : Internal_Entity_Array_Access;
Var_Expr_1 : Internal_Entity_Entry_Decl;
Var_Expr_2 : Boolean;
Var_Expr_3 : Internal_Entity_Base_Type_Decl;
Var_Expr_4 : Internal_Entity_Name;
Var_Expr_252 : Bare_Aggregate_Assoc;
Fld : Logic_Equation;
Fld_1 : Internal_Entity_Assoc_List;
Fld_2 : Bare_Assoc_List;
Fld_3 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_7 : Internal_Entity_Name;
Fld_8 : Internal_Entity_Name;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_11 : Internal_Entity_Name;
Fld_12 : Boolean;
Fld_13 : Logic_Equation;
Fld_14 : Internal_Entity_Name;
Fld_15 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_16 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Fld_17 : Internal_Entity_Name;
Fld_18 : Internal_Entity_Name;
Fld_19 : Logic_Var;
Is_Logic_Var_Defined : Boolean;
Eq_Solution : Internal_Entity;
If_Result_1 : Internal_Entity;
Cast_Result_2 : Internal_Entity;
New_Struct : Internal_Logic_Context;
Bound_Logic_Context : Internal_Logic_Context;
Fld_20 : Internal_Entity_Name;
Fld_21 : Logic_Var;
Is_Logic_Var_Defined_1 : Boolean;
Eq_Solution_1 : Internal_Entity;
If_Result_2 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Fld_22 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var_2 : Logic_Equation;
Fld_23 : Lexical_Env := Empty_Env;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_4 : Bare_Aggregate_Assoc;
As_Entity_1 : Internal_Entity_Aggregate_Assoc;
Is_Null_1 : Boolean;
If_Result_3 : Internal_Entity_Aggregate_Assoc;
Fld_24 : Internal_Entity_Base_Aggregate;
Scope_Result_3 : Internal_Entity_Base_Aggregate;
Result_Var_3 : Internal_Entity_Base_Aggregate;
Is_A : Boolean;
If_Result_4 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_25 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
Fld_26 : Internal_Entity_Array_Access;
True_Rel_1 : Logic_Equation;
Fld_27 : Internal_Entity_Name;
Cast_Result_5 : Internal_Entity;
New_Struct_1 : Internal_Logic_Context;
Bound_Logic_Context_1 : Internal_Logic_Context;
Bound_Logic_Context_2 : Internal_Logic_Context;
Fld_28 : Bare_Name;
Fld_29 : Logic_Var;
Cast_Expr_2 : Internal_Entity;
Cast_Result_6 : Internal_Entity_Basic_Decl;
Fld_30 : Internal_Entity_Basic_Decl;
Cast_Result_7 : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result_2 : Logic_Equation;
Cast_Expr_3 : Internal_Entity;
Cast_Result_8 : Internal_Entity_Entry_Decl;
Fld_31 : Logic_Equation;
Scope_Result_4 : Logic_Equation;
Cast_Expr_4 : Internal_Entity;
Cast_Result_9 : Internal_Entity_Basic_Decl;
Fld_32 : Logic_Equation;
Result_Var_4 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Dyn_Var_Bind_Result_3 : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Is_Equal : Boolean;
If_Result_5 : Logic_Equation;
Let_Result : Logic_Equation;
Fld_33 : Internal_Entity_Name;
Fld_34 : Logic_Equation;
And_Pred_5 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_35 : Internal_Entity_Name;
Is_A_1 : Boolean;
If_Result_6 : Logic_Equation;
Fld_36 : Boolean;
If_Result_7 : Logic_Equation;
            procedure Finalizer_Scope_1210 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Fld_23);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_25);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (Fld_26);
                     Dec_Ref (Local_Subps);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Fld_34);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (If_Result_7);
            end Finalizer_Scope_1210;
            procedure Finalizer_Scope_3241 is
            begin
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_3241;
            procedure Finalizer_Scope_3242 is
            begin
                     Dec_Ref (Fld_13);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Fld_22);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_3242;
            procedure Finalizer_Scope_3243 is
            begin
                     Dec_Ref (Fld_16);
            end Finalizer_Scope_3243;
            procedure Finalizer_Scope_3245 is
            begin
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_2);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Fld_32);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Dyn_Var_Bind_Result_3);
            end Finalizer_Scope_3245;
            procedure Finalizer_Scope_3246 is
            begin
                     Dec_Ref (Fld_31);
            end Finalizer_Scope_3246;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10429 '<If at nodes.lkt:17977:9>' If_Result_7 ada/nodes.lkt:17977
--# expr-start 10361 '<FieldAccess for is_type_conversion at nodes.lkt:17977:12>' Fld_36 ada/nodes.lkt:17977
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.is_type_conversion
Fld_36 := Libadalang.Implementation.Call_Expr_P_Is_Type_Conversion (Node => Ent.Node, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 10361
if Fld_36 then
   --# expr-start 10374 '<LogicBinaryOp And at nodes.lkt:17980:13>' And_Pred_2 ada/nodes.lkt:17980
--# expr-start 10369 '<LogicBinaryOp And at nodes.lkt:17981:17>' And_Pred_1 ada/nodes.lkt:17981
--# expr-start 10367 '<LogicBinaryOp And at nodes.lkt:17982:21>' And_Pred ada/nodes.lkt:17982
--# expr-start 10362 '<FieldAccess for type_conv_self_xref_equation at nodes.lkt:17982:21>' Fld ada/nodes.lkt:17982
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.type_conv_self_xref_equation
Fld := Libadalang.Implementation.Call_Expr_P_Type_Conv_Self_Xref_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10362
--# expr-start 10366 '<Bind at nodes.lkt:17983:26>' Bind_Result ada/nodes.lkt:17983
--# expr-start 10365 '<FieldAccess for expected_type_var at nodes.lkt:17983:26>' Fld_5 ada/nodes.lkt:17983
--# expr-start 10364 '<FieldAccess for expr at nodes.lkt:17983:26>' Fld_4 ada/nodes.lkt:17983
--# expr-start 10363 '<FieldAccess for params at nodes.lkt:17983:26>' Fld_1 ada/nodes.lkt:17983
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_1 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10363
Fld_2 := Fld_1.Node;
Get_Result := Get (Self, Fld_2, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 10364
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_4.Node);
--# expr-done 10365
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr := No_Entity_Base_Type_Decl; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17983:26") else null)); 
--# expr-done 10366
And_Pred := Create_And (Fld, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17982:21") else null)); 
--# expr-done 10367
--# expr-start 10368 '<FieldAccess for all_args_xref_equation at nodes.lkt:17986:22>' Fld_6 ada/nodes.lkt:17986
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_args_xref_equation
Fld_6 := Libadalang.Implementation.Name_P_All_Args_Xref_Equation (Node => Ent.Node, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10368
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17981:17") else null)); 
--# expr-done 10369
--# expr-start 10370 '<FieldAccess for parent_name at nodes.lkt:17988:18>' Fld_7 ada/nodes.lkt:17988
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name
Fld_7 := Libadalang.Implementation.Name_P_Parent_Name (Node => Ent.Node, Stop_At => Root, E_Info => Ent.Info);
--# end
--# expr-done 10370
Var_Expr_4 := Fld_7;
if Var_Expr_4 /= No_Entity_Name then
   --# scope-start
   --# bind pn Var_Expr_4
--# expr-start 10373 '<FieldAccess for parent_name_equation at nodes.lkt:17990:17>' Fld_10 ada/nodes.lkt:17990
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10372 '<FieldAccess for name_designated_type at nodes.lkt:17991:21>' Fld_9 ada/nodes.lkt:17991
--# expr-start 10371 '<FieldAccess for name at nodes.lkt:17991:21>' Fld_8 ada/nodes.lkt:17991
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10371
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_9 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld_8.Node, E_Info => Fld_8.Info);
--# end
--# expr-done 10372
--# property-call-start Name.parent_name_equation
Fld_10 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_4.Node, Typ => Fld_9, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 10373
Scope_Result := Fld_10;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3241;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17994:29") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (And_Pred_1, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:17980:13") else null)); 
--# expr-done 10374
   If_Result_7 := And_Pred_2;
else
   --# expr-start 10428 '<If at nodes.lkt:17977:9>' If_Result_6 ada/nodes.lkt:17977
--# expr-start 10376 '<IsA AttributeRef at nodes.lkt:18001:14>' Is_A_1 ada/nodes.lkt:18001
--# expr-start 10375 '<FieldAccess for name at nodes.lkt:18001:14>' Fld_35 ada/nodes.lkt:18001
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_35 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10375
Is_A_1 := Fld_35.Node /= null 
and then Fld_35.Node.Kind in Ada_Attribute_Ref_Range; 
--# expr-done 10376
if Is_A_1 then
--# expr-start 10378 '<FieldAccess for resolve_names_internal at nodes.lkt:18003:13>' Fld_12 ada/nodes.lkt:18003
--# expr-start 10377 '<FieldAccess for name at nodes.lkt:18003:13>' Fld_11 ada/nodes.lkt:18003
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10377
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_internal
Fld_12 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal (Node => Fld_11.Node, Generate_Diagnostics => False, Env => Env, Origin => Origin, E_Info => Fld_11.Info);
--# end
--# expr-done 10378
Var_Expr_2 := Fld_12;
if Var_Expr_2 /= False then
   --# scope-start
   --# bind _ Var_Expr_2
--# expr-start 10395 '<LogicBinaryOp And at nodes.lkt:18005:17>' And_Pred_3 ada/nodes.lkt:18005
--# expr-start 10379 '<FieldAccess for all_args_xref_equation at nodes.lkt:18005:17>' Fld_13 ada/nodes.lkt:18005
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_args_xref_equation
Fld_13 := Libadalang.Implementation.Name_P_All_Args_Xref_Equation (Node => Ent.Node, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10379
--# expr-start 10382 '<Cast to BaseTypeDecl at nodes.lkt:18006:22>' Cast_Result_1 ada/nodes.lkt:18006
--# expr-start 10381 '<FieldAccess for type_val at nodes.lkt:18006:22>' Fld_15 ada/nodes.lkt:18006
--# expr-start 10380 '<FieldAccess for name at nodes.lkt:18006:22>' Fld_14 ada/nodes.lkt:18006
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10380
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_15 := Libadalang.Implementation.Expr_P_Type_Val (Node => Fld_14.Node);
--# end
--# expr-done 10381
   if Fld_15.Node = null
      or else Fld_15.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
   else
         Cast_Result_1 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 10382
Var_Expr_3 := Cast_Result_1;
if Var_Expr_3 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_3
--# expr-start 10383 '<FieldAccess for parent_name_equation at nodes.lkt:18007:30>' Fld_16 ada/nodes.lkt:18007
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_16 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Ent.Node, Typ => Var_Expr_3, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10383
Scope_Result_1 := Fld_16;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3243;
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 10394 '<bind at nodes.lkt:18009:25>' Dyn_Var_Bind_Result ada/nodes.lkt:18009
--# expr-start 10388 '<New LogicContext at nodes.lkt:18010:29>' New_Struct ada/nodes.lkt:18010
--# expr-start 10386 '<get_value at nodes.lkt:18012:43>' If_Result_1 ada/nodes.lkt:18012
--# expr-start 10385 '<FieldAccess for ref_var at nodes.lkt:18012:43>' Fld_19 ada/nodes.lkt:18012
--# expr-start 10384 '<FieldAccess for name at nodes.lkt:18012:43>' Fld_18 ada/nodes.lkt:18012
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10384
      if Fld_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_19 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_18.Node);
--# end
--# expr-done 10385
Is_Logic_Var_Defined := Entity_Vars.Is_Defined (Fld_19); 
if Is_Logic_Var_Defined then
Eq_Solution := Entity_Vars.Get_Value (Fld_19); 
   If_Result_1 := Eq_Solution;
else
   If_Result_1 := No_Entity;
end if;
--# expr-done 10386
--# expr-start 10387 '<FieldAccess for name at nodes.lkt:18011:42>' Fld_17 ada/nodes.lkt:18011
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10387
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_17.Node,
         Info => Fld_17.Info);
New_Struct := (Decl_Node => If_Result_1, Ref_Node => Cast_Result_2); 
--# expr-done 10388
Bound_Logic_Context := New_Struct; 
--# expr-start 10393 '<FieldAccess for entity_equation at nodes.lkt:18018:25>' Fld_22 ada/nodes.lkt:18018
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10392 '<Cast to BasicDecl at nodes.lkt:18019:29>' Cast_Result_3 ada/nodes.lkt:18019
--# expr-start 10391 '<get_value at nodes.lkt:18019:29>' If_Result_2 ada/nodes.lkt:18019
--# expr-start 10390 '<FieldAccess for ref_var at nodes.lkt:18019:29>' Fld_21 ada/nodes.lkt:18019
--# expr-start 10389 '<FieldAccess for name at nodes.lkt:18019:29>' Fld_20 ada/nodes.lkt:18019
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10389
      if Fld_20.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_21 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_20.Node);
--# end
--# expr-done 10390
Is_Logic_Var_Defined_1 := Entity_Vars.Is_Defined (Fld_21); 
if Is_Logic_Var_Defined_1 then
Eq_Solution_1 := Entity_Vars.Get_Value (Fld_21); 
   If_Result_2 := Eq_Solution_1;
else
   If_Result_2 := No_Entity;
end if;
--# expr-done 10391
   if If_Result_2.Node = null
      or else If_Result_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => If_Result_2.Node,
         Info => If_Result_2.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10392
--# property-call-start CallExpr.entity_equation
Fld_22 := Libadalang.Implementation.Call_Expr_P_Entity_Equation (Node => Ent.Node, S => Cast_Result_3, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, Logic_Context => Bound_Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 10393
Dyn_Var_Bind_Result := Fld_22; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 10394
   Result_Var_1 := Dyn_Var_Bind_Result;
end if;
      Inc_Ref (Result_Var_1);
And_Pred_3 := Create_And (Fld_13, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18005:17") else null)); 
--# expr-done 10395
Scope_Result_2 := And_Pred_3;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3242;
   Result_Var_2 := Scope_Result_2;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18024:29") else null)); 
   Result_Var_2 := False_Rel;
end if;
      Inc_Ref (Result_Var_2);
   If_Result_6 := Result_Var_2;
else
   --# expr-start 10427 '<LogicBinaryOp And at nodes.lkt:18027:13>' And_Pred_6 ada/nodes.lkt:18027
--# expr-start 10403 '<bind at nodes.lkt:18031:17>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:18031
--# expr-start 10401 '<If at nodes.lkt:18032:21>' If_Result_4 ada/nodes.lkt:18032
--# expr-start 10399 '<IsA DeltaAggregate at nodes.lkt:18033:25>' Is_A ada/nodes.lkt:18033
--# expr-start 10396 '<Cast to AggregateAssoc at nodes.lkt:18033:25>' Cast_Result_4 ada/nodes.lkt:18033
Cast_Expr_1 := Entry_Point; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Aggregate_Assoc_Range
   then
      Cast_Result_4 := Cast_Expr_1;
   else
         Cast_Result_4 := No_Bare_Ada_Node;
   end if;
--# expr-done 10396
Var_Expr_252 := Cast_Result_4;
if Var_Expr_252 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 10398 '<FieldAccess for base_aggregate at nodes.lkt:18033:25>' Fld_24 ada/nodes.lkt:18033
--# expr-start 10397 '<as_entity at nodes.lkt:18033:25>' If_Result_3 ada/nodes.lkt:18033
Is_Null_1 := Var_Expr_252 = null; 
if Is_Null_1 then
   If_Result_3 := No_Entity_Aggregate_Assoc;
else
As_Entity_1 := (Info => E_Info, Node => Var_Expr_252); 
   If_Result_3 := As_Entity_1;
end if;
--# expr-done 10397
      if If_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.base_aggregate
Fld_24 := Libadalang.Implementation.Aggregate_Assoc_P_Base_Aggregate (Node => If_Result_3.Node, E_Info => If_Result_3.Info);
--# end
--# expr-done 10398
Scope_Result_3 := Fld_24;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Entity_Base_Aggregate;
end if;
Is_A := Result_Var_3.Node /= null 
and then Result_Var_3.Node.Kind in Ada_Delta_Aggregate_Range; 
--# expr-done 10399
if Is_A then
   --# expr-start 10400 '<FieldAccess for children_env at nodes.lkt:18037:26>' Fld_23 ada/nodes.lkt:18037
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 10400
   If_Result_4 := Fld_23;
else
   If_Result_4 := Env;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 10401
Bound_Env := If_Result_4; Inc_Ref (Bound_Env);
--# expr-start 10402 '<FieldAccess for all_args_xref_equation at nodes.lkt:18040:17>' Fld_25 ada/nodes.lkt:18040
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_args_xref_equation
Fld_25 := Libadalang.Implementation.Name_P_All_Args_Xref_Equation (Node => Ent.Node, Root => Root, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 10402
Dyn_Var_Bind_Result_1 := Fld_25; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 10403
--# expr-start 10426 '<LogicBinaryOp And at nodes.lkt:18045:17>' And_Pred_5 ada/nodes.lkt:18045
--# expr-start 10423 '<Let at nodes.lkt:18046:21>' Let_Result ada/nodes.lkt:18046
--# scope-start
--# expr-start 10404 '<FieldAccess for env_elements at nodes.lkt:18046:33>' Fld_26 ada/nodes.lkt:18046
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.env_elements
Fld_26 := Libadalang.Implementation.Expr_P_Env_Elements (Node => Ent.Node, Env => Env, No_Visibility => False, E_Info => Ent.Info);
--# end
--# expr-done 10404
Local_Subps := Fld_26; Inc_Ref (Local_Subps);
--# bind subps Local_Subps
--# expr-start 10422 '<If at nodes.lkt:18048:21>' If_Result_5 ada/nodes.lkt:18048
--# expr-start 10405 '<IsNull at nodes.lkt:18048:24>' Is_Equal ada/nodes.lkt:18048
Is_Equal := Equivalent (Local_Subps, No_Internal_Entity_Array_Type); 
--# expr-done 10405
if Is_Equal then
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18048:43") else null)); 
   If_Result_5 := True_Rel_1;
else
   --# expr-start 10421 '<LogicAny at nodes.lkt:18050:25>' Logic_Boolean_Op ada/nodes.lkt:18050
--# expr-start 10420 '<Map at nodes.lkt:18050:25>' Map_Result ada/nodes.lkt:18050
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Subps;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind s Item_0
      --# expr-start 10419 '<bind at nodes.lkt:18052:33>' Dyn_Var_Bind_Result_3 ada/nodes.lkt:18052
--# expr-start 10407 '<New LogicContext at nodes.lkt:18053:37>' New_Struct_1 ada/nodes.lkt:18053
--# expr-start 10406 '<FieldAccess for name at nodes.lkt:18054:50>' Fld_27 ada/nodes.lkt:18054
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10406
      Cast_Result_5 := Create_Internal_Entity
        (Node => Fld_27.Node,
         Info => Fld_27.Info);
New_Struct_1 := (Decl_Node => Item_0, Ref_Node => Cast_Result_5); 
--# expr-done 10407
Bound_Logic_Context_1 := New_Struct_1; 
--# expr-start 10418 '<LogicBinaryOp And at nodes.lkt:18058:33>' And_Pred_4 ada/nodes.lkt:18058
--# expr-start 10413 '<bind at nodes.lkt:18059:37>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:18059
Bound_Logic_Context_2 := No_Logic_Context; 
--# expr-start 10412 '<Bind at nodes.lkt:18060:37>' Bind_Result_1 ada/nodes.lkt:18060
--# expr-start 10409 '<FieldAccess for ref_var at nodes.lkt:18060:37>' Fld_29 ada/nodes.lkt:18060
--# expr-start 10408 '<FieldAccess for name at nodes.lkt:18060:37>' Fld_28 ada/nodes.lkt:18060
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Self.Call_Expr_F_Name;
--# expr-done 10408
      if Fld_28 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_29 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_28);
--# end
--# expr-done 10409
Fld_29.Value := No_Entity;
Entity_Vars.Reset (Fld_29);
--# expr-start 10411 '<FieldAccess for corresponding_actual at nodes.lkt:18061:40>' Fld_30 ada/nodes.lkt:18061
--# expr-start 10410 '<Cast to BasicDecl at nodes.lkt:18061:40>' Cast_Result_6 ada/nodes.lkt:18061
Cast_Expr_2 := Item_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_6 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_6 := No_Entity_Basic_Decl;
   end if;
--# expr-done 10410
      if Cast_Result_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.corresponding_actual'
Fld_30 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Corresponding_Actual (Node => Cast_Result_6.Node, E_Info => Cast_Result_6.Info);
--# end
--# expr-done 10411
      Cast_Result_7 := Create_Internal_Entity
        (Node => Fld_30.Node,
         Info => Fld_30.Info);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context_2); 
Bind_Result_1 := Solver.Create_Assign (Fld_29, Cast_Result_7, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18060:37") else null)); 
--# expr-done 10412
Dyn_Var_Bind_Result_2 := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result_2);
--# expr-done 10413
--# expr-start 10414 '<Cast to EntryDecl at nodes.lkt:18063:38>' Cast_Result_8 ada/nodes.lkt:18063
Cast_Expr_3 := Item_0; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Entry_Decl_Range
   then
      Cast_Result_8 := Create_Internal_Entity_Entry_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_8 := No_Entity_Entry_Decl;
   end if;
--# expr-done 10414
Var_Expr_1 := Cast_Result_8;
if Var_Expr_1 /= No_Entity_Entry_Decl then
   --# scope-start
   --# bind e Var_Expr_1
--# expr-start 10415 '<FieldAccess for entry_equation at nodes.lkt:18064:44>' Fld_31 ada/nodes.lkt:18064
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.entry_equation
Fld_31 := Libadalang.Implementation.Call_Expr_P_Entry_Equation (Node => Ent.Node, E => Var_Expr_1, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, Logic_Context => Bound_Logic_Context_1, E_Info => Ent.Info);
--# end
--# expr-done 10415
Scope_Result_4 := Fld_31;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_3246;
   Result_Var_4 := Scope_Result_4;
else
   --# expr-start 10417 '<FieldAccess for entity_equation at nodes.lkt:18065:49>' Fld_32 ada/nodes.lkt:18065
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10416 '<Cast to BasicDecl at nodes.lkt:18066:41>' Cast_Result_9 ada/nodes.lkt:18066
Cast_Expr_4 := Item_0; 
   if Cast_Expr_4.Node = null
      or else Cast_Expr_4.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_9 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
   else
         Cast_Result_9 := No_Entity_Basic_Decl;
   end if;
--# expr-done 10416
--# property-call-start CallExpr.entity_equation
Fld_32 := Libadalang.Implementation.Call_Expr_P_Entity_Equation (Node => Ent.Node, S => Cast_Result_9, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, Logic_Context => Bound_Logic_Context_1, E_Info => Ent.Info);
--# end
--# expr-done 10417
   Result_Var_4 := Fld_32;
end if;
      Inc_Ref (Result_Var_4);
And_Pred_4 := Create_And (Dyn_Var_Bind_Result_2, Result_Var_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18058:33") else null)); 
--# expr-done 10418
Dyn_Var_Bind_Result_3 := And_Pred_4; Inc_Ref (Dyn_Var_Bind_Result_3);
--# expr-done 10419
         declare
            Item_To_Append : constant Logic_Equation := Dyn_Var_Bind_Result_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3245;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10420
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18050:25") else null)); 
--# expr-done 10421
   If_Result_5 := Logic_Boolean_Op;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 10422
Let_Result := If_Result_5; Inc_Ref (Let_Result);
--# end
--# expr-done 10423
--# expr-start 10425 '<FieldAccess for sub_equation at nodes.lkt:18073:22>' Fld_34 ada/nodes.lkt:18073
--# expr-start 10424 '<FieldAccess for name at nodes.lkt:18073:22>' Fld_33 ada/nodes.lkt:18073
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10424
      if Fld_33.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_34 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_33.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_33.Info);
--# end
--# expr-done 10425
And_Pred_5 := Create_And (Let_Result, Fld_34, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18045:17") else null)); 
--# expr-done 10426
And_Pred_6 := Create_And (Dyn_Var_Bind_Result_1, And_Pred_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18027:13") else null)); 
--# expr-done 10427
   If_Result_6 := And_Pred_6;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 10428
   If_Result_7 := If_Result_6;
end if;
      Inc_Ref (If_Result_7);
--# expr-done 10429
         Property_Result := If_Result_7;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1210;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1210;
                     Finalizer_Scope_3241;
                     Finalizer_Scope_3242;
                     Finalizer_Scope_3243;
                     Finalizer_Scope_3245;
                     Finalizer_Scope_3246;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_General_Xref_Equation;
--# end
--# property-start CallExpr.subscriptable_type_equation ada/nodes.lkt:18081
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Subscriptable_Type_Equation
  (Node : Bare_Call_Expr
      ; Typ : Internal_Entity_Base_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1211 with Inline_Always;
            procedure Finalizer_Scope_3249 with Inline_Always;
            procedure Finalizer_Scope_3250 with Inline_Always;
            procedure Finalizer_Scope_3251 with Inline_Always;
            procedure Finalizer_Scope_3252 with Inline_Always;
            procedure Finalizer_Scope_3253 with Inline_Always;
            procedure Finalizer_Scope_3254 with Inline_Always;
            procedure Finalizer_Scope_3255 with Inline_Always;
            procedure Finalizer_Scope_3256 with Inline_Always;
            procedure Finalizer_Scope_3257 with Inline_Always;
            procedure Finalizer_Scope_3258 with Inline_Always;
            procedure Finalizer_Scope_3259 with Inline_Always;
            procedure Finalizer_Scope_3260 with Inline_Always;
      Local_Atd : Internal_Entity_Array_Type_Def;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Local_Real_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Local_Formals : Internal_Entity_Defining_Name_Array_Access;
Local_Ret_Type : Internal_Entity_Base_Type_Decl;
Local_Params : Internal_Entity_Assoc_List;
Match_0 : Internal_Entity_Assoc_List;
Var_Expr_5 : Internal_Entity_Basic_Assoc;
Var_Expr_6 : Internal_Entity_Name;
Match_1 : Internal_Entity_Bin_Op;
Match_2 : Internal_Entity_Attribute_Ref;
Match_3 : Internal_Entity_Subtype_Indication;
Match_4 : Internal_Entity;
Var_Expr_9 : Internal_Entity_Access_To_Subp_Def;
Var_Expr_253 : Internal_Entity_Assoc_List;
Fld : Internal_Entity_Array_Type_Def;
Scope_Result : Internal_Entity_Array_Type_Def;
Result_Var : Internal_Entity_Array_Type_Def;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Fld_3 : Internal_Entity_Access_Def;
Cast_Result : Internal_Entity_Access_To_Subp_Def;
Fld_4 : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
New_Struct : Internal_Logic_Context;
Bound_Logic_Context : Internal_Logic_Context;
Fld_5 : Internal_Entity_Subp_Spec;
Cast_Result_3 : Internal_Entity_Base_Formal_Param_Holder;
Fld_6 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Scope_Result_2 : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var_2 : Logic_Equation;
Fld_7 : Internal_Entity;
Fld_8 : Internal_Entity_Assoc_List;
Fld_9 : Bare_Assoc_List;
Fld_10 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result_1 : Internal_Entity_Basic_Assoc;
Fld_11 : Internal_Entity_Expr;
Cast_Result_4 : Internal_Entity_Name;
False_Rel_1 : Logic_Equation;
Fld_12 : Logic_Equation;
Fld_13 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_14 : Internal_Entity_Base_Type_Decl;
Is_Null_1 : Boolean;
If_Result_2 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
False_Rel_2 : Logic_Equation;
Result_Var_3 : Logic_Equation;
Scope_Result_4 : Logic_Equation;
False_Rel_3 : Logic_Equation;
Result_Var_4 : Logic_Equation;
Fld_15 : Internal_Entity_Assoc_List;
Saved : Internal_Entity_Assoc_List;
Fld_16 : Bare_Assoc_List;
Fld_17 : Internal_Entity_Info;
Item_7 : Internal_Entity_Basic_Assoc;
Bare_Item_7 : Bare_Basic_Assoc;
Index_8 : Integer;
Fld_18 : Internal_Entity_Array_Indices;
Fld_19 : Internal_Entity_Expr;
Fld_20 : Logic_Equation;
As_Entity_1 : Internal_Entity_Basic_Assoc;
Is_Null_2 : Boolean;
If_Result_3 : Internal_Entity_Basic_Assoc;
Map_Result : Logic_Equation_Array_Access;
Scope_Result_5 : Logic_Equation_Array_Access;
Result_Var_5 : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Fld_21 : Logic_Var;
Fld_22 : Internal_Entity_Base_Type_Decl;
Cast_Result_6 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Or_Pred : Logic_Equation;
Fld_23 : Internal_Entity_Array_Indices;
Fld_24 : Internal_Entity_Expr;
Fld_25 : Logic_Equation;
Fld_26 : Internal_Entity_Array_Indices;
Fld_27 : Internal_Entity_Expr;
Fld_28 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_29 : Logic_Var;
Fld_30 : Internal_Entity_Expr;
Fld_31 : Logic_Var;
Bind_Result_2 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_32 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_7 : Internal_Entity;
Bind_Result_3 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_33 : Internal_Entity_Expr;
Fld_34 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Fld_35 : Internal_Entity_Expr;
Fld_36 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_37 : Logic_Equation;
Fld_38 : Internal_Entity_Array_Indices;
Cast_Expr_3 : Internal_Entity_Attribute_Ref;
Cast_Result_8 : Internal_Entity_Expr;
Fld_39 : Logic_Equation;
And_Pred_7 : Logic_Equation;
Fld_40 : Logic_Var;
Cast_Expr_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_9 : Internal_Entity;
Bind_Result_4 : Logic_Equation;
And_Pred_8 : Logic_Equation;
Fld_41 : Logic_Equation;
Fld_42 : Logic_Var;
Cast_Expr_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_10 : Internal_Entity;
Bind_Result_5 : Logic_Equation;
And_Pred_9 : Logic_Equation;
False_Rel_4 : Logic_Equation;
Match_Prefix : Internal_Entity;
Cast_Result_11 : Internal_Entity_Assoc_List;
Let_Result : Logic_Equation;
Scope_Result_6 : Logic_Equation;
Cast_Result_12 : Internal_Entity_Bin_Op;
Let_Result_1 : Logic_Equation;
Scope_Result_7 : Logic_Equation;
Cast_Result_13 : Internal_Entity_Attribute_Ref;
Let_Result_2 : Logic_Equation;
Scope_Result_8 : Logic_Equation;
Cast_Result_14 : Internal_Entity_Subtype_Indication;
Let_Result_3 : Logic_Equation;
Scope_Result_9 : Logic_Equation;
Cast_Result_15 : Internal_Entity;
Let_Result_4 : Logic_Equation;
Scope_Result_10 : Logic_Equation;
Match_Result : Logic_Equation;
Fld_43 : Internal_Entity_Basic_Decl_Array_Access;
Fld_44 : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
Fld_45 : Internal_Entity_Base_Subp_Spec;
Fld_46 : Internal_Entity_Defining_Name_Array_Access;
Fld_47 : Internal_Entity_Base_Subp_Spec;
Fld_48 : Internal_Entity_Base_Type_Decl;
Fld_49 : Internal_Entity_Assoc_List;
Fld_50 : Logic_Var;
Cast_Expr_6 : Internal_Entity_Base_Type_Decl;
Cast_Result_16 : Internal_Entity;
Bind_Result_6 : Logic_Equation;
Saved_1 : Internal_Entity_Assoc_List;
Fld_51 : Bare_Assoc_List;
Fld_52 : Internal_Entity_Info;
Item_3 : Internal_Entity_Basic_Assoc;
Bare_Item_3 : Bare_Basic_Assoc;
Index_4 : Integer;
Fld_53 : Internal_Entity_Expr;
Fld_54 : Logic_Var;
Arith_Result : Integer;
Get_Result_1 : Internal_Entity_Defining_Name;
Fld_55 : Internal_Entity_Base_Formal_Param_Decl;
Fld_56 : Internal_Entity_Base_Type_Decl;
Cast_Result_17 : Internal_Entity;
Bind_Result_7 : Logic_Equation;
Fld_57 : Internal_Entity_Expr;
Fld_58 : Logic_Equation;
And_Pred_10 : Logic_Equation;
As_Entity_2 : Internal_Entity_Basic_Assoc;
Is_Null_3 : Boolean;
If_Result_4 : Internal_Entity_Basic_Assoc;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
And_Pred_11 : Logic_Equation;
False_Rel_5 : Logic_Equation;
Len : Integer;
Fld_59 : Bare_Assoc_List;
Len_1 : Integer;
Arith_Result_1 : Integer;
Is_Equal : Boolean;
If_Result_5 : Logic_Equation;
Let_Result_5 : Logic_Equation;
Let_Result_6 : Logic_Equation;
Let_Result_7 : Logic_Equation;
Map_Result_2 : Logic_Equation_Array_Access;
Logic_Boolean_Op_2 : Logic_Equation;
False_Rel_6 : Logic_Equation;
Is_Null_4 : Boolean;
Not_Val : Boolean;
Fld_60 : Boolean;
If_Result_6 : Boolean;
If_Result_7 : Logic_Equation;
Is_Null_5 : Boolean;
Not_Val_1 : Boolean;
Fld_61 : Internal_Entity_Array_Indices;
Is_Null_6 : Boolean;
Not_Val_2 : Boolean;
If_Result_8 : Boolean;
If_Result_9 : Logic_Equation;
Fld_62 : Internal_Entity_Access_Def;
Is_A : Boolean;
If_Result_10 : Logic_Equation;
Let_Result_8 : Logic_Equation;
Let_Result_9 : Logic_Equation;
            procedure Finalizer_Scope_1211 is
            begin
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_8);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_9);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Scope_Result_10);
                     Dec_Ref (Match_Result);
                     Dec_Ref (Fld_43);
                     Dec_Ref (Fld_44);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Logic_Boolean_Op_2);
                     Dec_Ref (False_Rel_6);
                     Dec_Ref (If_Result_7);
                     Dec_Ref (If_Result_9);
                     Dec_Ref (If_Result_10);
                     Dec_Ref (Let_Result_8);
                     Dec_Ref (Let_Result_9);
            end Finalizer_Scope_1211;
            procedure Finalizer_Scope_3249 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_3249;
            procedure Finalizer_Scope_3250 is
            begin
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (False_Rel_3);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_5);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Or_Pred);
            end Finalizer_Scope_3250;
            procedure Finalizer_Scope_3251 is
            begin
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (False_Rel_2);
                     Dec_Ref (Result_Var_3);
            end Finalizer_Scope_3251;
            procedure Finalizer_Scope_3252 is
            begin
                     Dec_Ref (False_Rel_1);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (If_Result_2);
            end Finalizer_Scope_3252;
            procedure Finalizer_Scope_3253 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3253;
            procedure Finalizer_Scope_3254 is
            begin
                     Dec_Ref (Fld_20);
            end Finalizer_Scope_3254;
            procedure Finalizer_Scope_3255 is
            begin
                     Dec_Ref (Fld_25);
                     Dec_Ref (Fld_28);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_34);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Fld_36);
                     Dec_Ref (And_Pred_6);
            end Finalizer_Scope_3255;
            procedure Finalizer_Scope_3256 is
            begin
                     Dec_Ref (Fld_37);
                     Dec_Ref (Fld_39);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (And_Pred_8);
            end Finalizer_Scope_3256;
            procedure Finalizer_Scope_3257 is
            begin
                     Dec_Ref (Fld_41);
                     Dec_Ref (Bind_Result_5);
                     Dec_Ref (And_Pred_9);
            end Finalizer_Scope_3257;
            procedure Finalizer_Scope_3258 is
            begin
                     Dec_Ref (False_Rel_4);
            end Finalizer_Scope_3258;
            procedure Finalizer_Scope_3259 is
            begin
                     Dec_Ref (Fld_46);
                     Dec_Ref (Local_Formals);
                     Dec_Ref (Bind_Result_6);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (And_Pred_11);
                     Dec_Ref (False_Rel_5);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Let_Result_7);
            end Finalizer_Scope_3259;
            procedure Finalizer_Scope_3260 is
            begin
                     Dec_Ref (Bind_Result_7);
                     Dec_Ref (Fld_58);
                     Dec_Ref (And_Pred_10);
            end Finalizer_Scope_3260;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10544 '<Let at nodes.lkt:18082:9>' Let_Result_9 ada/nodes.lkt:18082
--# scope-start
Var_Expr_0 := Typ;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind t Var_Expr_0
--# expr-start 10430 '<FieldAccess for array_def_with_deref at nodes.lkt:18082:33>' Fld ada/nodes.lkt:18082
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.array_def_with_deref
Fld := Libadalang.Implementation.Base_Type_Decl_P_Array_Def_With_Deref (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10430
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Array_Type_Def;
end if;
Local_Atd := Result_Var; 
--# bind atd Local_Atd
--# expr-start 10543 '<Let at nodes.lkt:18083:9>' Let_Result_8 ada/nodes.lkt:18083
--# scope-start
Var_Expr_1 := Typ;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind t Var_Expr_1
--# expr-start 10433 '<If at nodes.lkt:18085:24>' If_Result ada/nodes.lkt:18085
--# expr-start 10431 '<FieldAccess for is_implicit_deref at nodes.lkt:18085:27>' Fld_2 ada/nodes.lkt:18085
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_implicit_deref
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Is_Implicit_Deref (Node => Var_Expr_1.Node, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10431
if Fld_2 then
   --# expr-start 10432 '<FieldAccess for accessed_type at nodes.lkt:18085:54>' Fld_1 ada/nodes.lkt:18085
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Var_Expr_1.Node, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10432
   If_Result := Fld_1;
else
   If_Result := Var_Expr_1;
end if;
--# expr-done 10433
Scope_Result_1 := If_Result;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Local_Real_Typ := Result_Var_1; 
--# bind real_typ Local_Real_Typ
--# expr-start 10542 '<If at nodes.lkt:18089:9>' If_Result_10 ada/nodes.lkt:18089
--# expr-start 10435 '<IsA AccessToSubpDef at nodes.lkt:18089:12>' Is_A ada/nodes.lkt:18089
--# expr-start 10434 '<FieldAccess for access_def at nodes.lkt:18089:12>' Fld_62 ada/nodes.lkt:18089
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_62 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Typ.Node, Origin => Origin, E_Info => Typ.Info);
--# end
--# expr-done 10434
Is_A := Fld_62.Node /= null 
and then Fld_62.Node.Kind in Ada_Access_To_Subp_Def_Range; 
--# expr-done 10435
if Is_A then
--# expr-start 10437 '<Cast to AccessToSubpDef at nodes.lkt:18091:13>' Cast_Result ada/nodes.lkt:18091
--# expr-start 10436 '<FieldAccess for access_def at nodes.lkt:18091:13>' Fld_3 ada/nodes.lkt:18091
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Typ.Node, Origin => Origin, E_Info => Typ.Info);
--# end
--# expr-done 10436
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Access_To_Subp_Def_Range
   then
      Cast_Result := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result := No_Entity_Access_To_Subp_Def;
   end if;
--# expr-done 10437
Var_Expr_9 := Cast_Result;
if Var_Expr_9 /= No_Entity_Access_To_Subp_Def then
   --# scope-start
   --# bind asd Var_Expr_9
--# expr-start 10442 '<bind at nodes.lkt:18093:21>' Dyn_Var_Bind_Result ada/nodes.lkt:18093
--# expr-start 10439 '<New LogicContext at nodes.lkt:18094:25>' New_Struct ada/nodes.lkt:18094
Cast_Expr := Typ; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 10438 '<FieldAccess for name at nodes.lkt:18094:47>' Fld_4 ada/nodes.lkt:18094
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Ent.Node.Call_Expr_F_Name, Info => Ent.Info);
--# expr-done 10438
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
New_Struct := (Decl_Node => Cast_Result_2, Ref_Node => Cast_Result_1); 
--# expr-done 10439
Bound_Logic_Context := New_Struct; 
--# expr-start 10441 '<FieldAccess for subprogram_equation at nodes.lkt:18096:21>' Fld_6 ada/nodes.lkt:18096
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10440 '<FieldAccess for subp_spec at nodes.lkt:18096:46>' Fld_5 ada/nodes.lkt:18096
      if Var_Expr_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Subp_Spec (Node => Var_Expr_9.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Var_Expr_9.Info);
--# expr-done 10440
      Cast_Result_3 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
--# property-call-start CallExpr.subprogram_equation
Fld_6 := Libadalang.Implementation.Call_Expr_P_Subprogram_Equation (Node => Ent.Node, Subp_Spec => Cast_Result_3, Dottable_Subp => False, Env => Env, Origin => Origin, Logic_Context => Bound_Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 10441
Dyn_Var_Bind_Result := Fld_6; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 10442
Scope_Result_2 := Dyn_Var_Bind_Result;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3249;
   Result_Var_2 := Scope_Result_2;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18098:29") else null)); 
   Result_Var_2 := False_Rel;
end if;
      Inc_Ref (Result_Var_2);
   If_Result_10 := Result_Var_2;
else
   --# expr-start 10541 '<If at nodes.lkt:18089:9>' If_Result_9 ada/nodes.lkt:18089
--# expr-start 10448 '<BooleanBinaryOp And at nodes.lkt:18100:14>' If_Result_8 ada/nodes.lkt:18100
--# expr-start 10444 '<Not at nodes.lkt:18100:14>' Not_Val_1 ada/nodes.lkt:18100
--# expr-start 10443 '<IsNull at nodes.lkt:18100:18>' Is_Null_5 ada/nodes.lkt:18100
Is_Null_5 := Local_Atd.Node = null; 
--# expr-done 10443
Not_Val_1 := not (Is_Null_5); 
--# expr-done 10444
if Not_Val_1 then
   --# expr-start 10447 '<Not at nodes.lkt:18100:34>' Not_Val_2 ada/nodes.lkt:18100
--# expr-start 10446 '<IsNull at nodes.lkt:18100:38>' Is_Null_6 ada/nodes.lkt:18100
--# expr-start 10445 '<FieldAccess for indices at nodes.lkt:18100:38>' Fld_61 ada/nodes.lkt:18100
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_61 := Create_Internal_Entity_Array_Indices (Node => Local_Atd.Node.Array_Type_Def_F_Indices, Info => Local_Atd.Info);
--# expr-done 10445
Is_Null_6 := Fld_61.Node = null; 
--# expr-done 10446
Not_Val_2 := not (Is_Null_6); 
--# expr-done 10447
   If_Result_8 := Not_Val_2;
else
   If_Result_8 := False;
end if;
--# expr-done 10448
if If_Result_8 then
   --# expr-start 10503 '<Match at nodes.lkt:18102:13>' Match_Result ada/nodes.lkt:18102
--# expr-start 10449 '<FieldAccess for suffix at nodes.lkt:18102:19>' Fld_7 ada/nodes.lkt:18102
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity (Node => Ent.Node.Call_Expr_F_Suffix, Info => Ent.Info);
--# expr-done 10449
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_7; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Assoc_List =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Create_Internal_Entity_Assoc_List
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_11; 
--# bind _ Match_0
--# expr-start 10470 '<LogicBinaryOp Or at nodes.lkt:18104:21>' Or_Pred ada/nodes.lkt:18104
--# expr-start 10450 '<FieldAccess for params at nodes.lkt:18106:25>' Fld_8 ada/nodes.lkt:18106
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_8 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10450
Fld_9 := Fld_8.Node;
Get_Result := Get (Self, Fld_9, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result_1 := No_Entity_Basic_Assoc;
else
Fld_10 := Fld_8.Info;
As_Entity := (Info => Fld_10, Node => Get_Result); 
   If_Result_1 := As_Entity;
end if;
Var_Expr_5 := If_Result_1;
if Var_Expr_5 /= No_Entity_Basic_Assoc then
   --# scope-start
   --# bind param Var_Expr_5
--# expr-start 10452 '<Cast to Name at nodes.lkt:18108:29>' Cast_Result_4 ada/nodes.lkt:18108
--# expr-start 10451 '<FieldAccess for expr at nodes.lkt:18108:29>' Fld_11 ada/nodes.lkt:18108
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_5.Node, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 10451
   if Fld_11.Node = null
      or else Fld_11.Node.Kind in Ada_Name
   then
      Cast_Result_4 := Create_Internal_Entity_Name
        (Node => Fld_11.Node,
         Info => Fld_11.Info);
   else
         Cast_Result_4 := No_Entity_Name;
   end if;
--# expr-done 10452
Var_Expr_6 := Cast_Result_4;
if Var_Expr_6 /= No_Entity_Name then
   --# scope-start
   --# bind name Var_Expr_6
--# expr-start 10459 '<If at nodes.lkt:18110:33>' If_Result_2 ada/nodes.lkt:18110
--# expr-start 10454 '<IsNull at nodes.lkt:18110:36>' Is_Null_1 ada/nodes.lkt:18110
--# expr-start 10453 '<FieldAccess for name_designated_type at nodes.lkt:18110:36>' Fld_14 ada/nodes.lkt:18110
      if Var_Expr_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_14 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Var_Expr_6.Node, E_Info => Var_Expr_6.Info);
--# end
--# expr-done 10453
Is_Null_1 := Fld_14.Node = null; 
--# expr-done 10454
if Is_Null_1 then
   False_Rel_1 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18111:38") else null)); 
   If_Result_2 := False_Rel_1;
else
   --# expr-start 10458 '<LogicBinaryOp And at nodes.lkt:18113:37>' And_Pred ada/nodes.lkt:18113
--# expr-start 10455 '<FieldAccess for xref_type_equation at nodes.lkt:18113:37>' Fld_12 ada/nodes.lkt:18113
      if Var_Expr_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_12 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Var_Expr_6.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_6.Info);
--# end
--# expr-done 10455
--# expr-start 10457 '<Bind at nodes.lkt:18114:42>' Bind_Result ada/nodes.lkt:18114
--# expr-start 10456 '<FieldAccess for type_var at nodes.lkt:18114:42>' Fld_13 ada/nodes.lkt:18114
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10456
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
Cast_Expr_1 := Local_Real_Typ; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result := Solver.Create_Assign (Fld_13, Cast_Result_5, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18114:42") else null)); 
--# expr-done 10457
And_Pred := Create_And (Fld_12, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18113:37") else null)); 
--# expr-done 10458
   If_Result_2 := And_Pred;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 10459
Scope_Result_3 := If_Result_2;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3252;
   Result_Var_3 := Scope_Result_3;
else
   False_Rel_2 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18115:45") else null)); 
   Result_Var_3 := False_Rel_2;
end if;
      Inc_Ref (Result_Var_3);
Scope_Result_4 := Result_Var_3;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_3251;
   Result_Var_4 := Scope_Result_4;
else
   False_Rel_3 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18117:41") else null)); 
   Result_Var_4 := False_Rel_3;
end if;
      Inc_Ref (Result_Var_4);
--# expr-start 10469 '<LogicBinaryOp And at nodes.lkt:18122:25>' And_Pred_1 ada/nodes.lkt:18122
--# expr-start 10465 '<LogicAll at nodes.lkt:18122:25>' Logic_Boolean_Op ada/nodes.lkt:18122
--# expr-start 10460 '<FieldAccess for params at nodes.lkt:18122:25>' Fld_15 ada/nodes.lkt:18122
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_15 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10460
Var_Expr_253 := Fld_15;
if Var_Expr_253 /= No_Entity_Assoc_List then
   --# scope-start
--# expr-start 10464 '<Map at nodes.lkt:18122:25>' Map_Result ada/nodes.lkt:18122
Saved := Var_Expr_253; 
Fld_16 := Saved.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_16 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
         Index_8 := 0;
      declare
         Collection : constant Bare_Assoc_List := Fld_16;
      begin
         for Untyped_Item_7 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_7 := Untyped_Item_7; 
Is_Null_2 := Bare_Item_7 = null; 
if Is_Null_2 then
   If_Result_3 := No_Entity_Basic_Assoc;
else
Fld_17 := Saved.Info;
As_Entity_1 := (Info => Fld_17, Node => Bare_Item_7); 
   If_Result_3 := As_Entity_1;
end if;
                  Item_7 := If_Result_3; 
   --# scope-start
               --# bind pa Item_7
               --# bind i Index_8
      --# expr-start 10463 '<FieldAccess for constrain_index_expr at nodes.lkt:18124:29>' Fld_20 ada/nodes.lkt:18124
--# expr-start 10461 '<FieldAccess for indices at nodes.lkt:18124:29>' Fld_18 ada/nodes.lkt:18124
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Create_Internal_Entity_Array_Indices (Node => Local_Atd.Node.Array_Type_Def_F_Indices, Info => Local_Atd.Info);
--# expr-done 10461
      if Fld_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10462 '<FieldAccess for expr at nodes.lkt:18124:62>' Fld_19 ada/nodes.lkt:18124
      if Item_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_19 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_7.Node, E_Info => Item_7.Info);
--# end
--# expr-done 10462
--# property-call-start '[dispatcher]ArrayIndices.constrain_index_expr'
Fld_20 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Constrain_Index_Expr (Node => Fld_18.Node, Index_Expr => Fld_19, Dim => Index_8, Origin => Origin, E_Info => Fld_18.Info);
--# end
--# expr-done 10463
         declare
            Item_To_Append : constant Logic_Equation := Fld_20;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3254;
               Index_8 := Index_8 + 1;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10464
Scope_Result_5 := Map_Result;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_3253;
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := No_Logic_Equation_Array_Type;
end if;
      Inc_Ref (Result_Var_5);
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Result_Var_5.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18122:25") else null)); 
--# expr-done 10465
--# expr-start 10468 '<Bind at nodes.lkt:18126:30>' Bind_Result_1 ada/nodes.lkt:18126
--# expr-start 10466 '<FieldAccess for type_var at nodes.lkt:18126:30>' Fld_21 ada/nodes.lkt:18126
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10466
Fld_21.Value := No_Entity;
Entity_Vars.Reset (Fld_21);
--# expr-start 10467 '<FieldAccess for comp_type at nodes.lkt:18126:49>' Fld_22 ada/nodes.lkt:18126
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArrayTypeDef.comp_type
Fld_22 := Libadalang.Implementation.Array_Type_Def_P_Comp_Type (Node => Local_Atd.Node, Origin => Origin, E_Info => Local_Atd.Info);
--# end
--# expr-done 10467
      Cast_Result_6 := Create_Internal_Entity
        (Node => Fld_22.Node,
         Info => Fld_22.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_21, Cast_Result_6, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18126:30") else null)); 
--# expr-done 10468
And_Pred_1 := Create_And (Logic_Boolean_Op, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18122:25") else null)); 
--# expr-done 10469
Or_Pred := Create_Or (Result_Var_4, And_Pred_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18104:21") else null)); 
--# expr-done 10470
Let_Result := Or_Pred; Inc_Ref (Let_Result);
--# end
Scope_Result_6 := Let_Result;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_3250;
            Match_Result := Scope_Result_6; Inc_Ref (Match_Result);
         when Ada_Bin_Op .. Ada_Relation_Op =>
   --# scope-start
--# scope-start
      Cast_Result_12 := Create_Internal_Entity_Bin_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_12; 
--# bind bo Match_1
--# expr-start 10491 '<LogicBinaryOp And at nodes.lkt:18131:21>' And_Pred_6 ada/nodes.lkt:18131
--# expr-start 10488 '<LogicBinaryOp And at nodes.lkt:18132:25>' And_Pred_5 ada/nodes.lkt:18132
--# expr-start 10485 '<LogicBinaryOp And at nodes.lkt:18133:29>' And_Pred_4 ada/nodes.lkt:18133
--# expr-start 10482 '<LogicBinaryOp And at nodes.lkt:18134:33>' And_Pred_3 ada/nodes.lkt:18134
--# expr-start 10477 '<LogicBinaryOp And at nodes.lkt:18135:37>' And_Pred_2 ada/nodes.lkt:18135
--# expr-start 10473 '<FieldAccess for constrain_index_expr at nodes.lkt:18135:37>' Fld_25 ada/nodes.lkt:18135
--# expr-start 10471 '<FieldAccess for indices at nodes.lkt:18135:37>' Fld_23 ada/nodes.lkt:18135
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Create_Internal_Entity_Array_Indices (Node => Local_Atd.Node.Array_Type_Def_F_Indices, Info => Local_Atd.Info);
--# expr-done 10471
      if Fld_23.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10472 '<FieldAccess for left at nodes.lkt:18136:41>' Fld_24 ada/nodes.lkt:18136
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Create_Internal_Entity_Expr (Node => Match_1.Node.Bin_Op_F_Left, Info => Match_1.Info);
--# expr-done 10472
--# property-call-start '[dispatcher]ArrayIndices.constrain_index_expr'
Fld_25 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Constrain_Index_Expr (Node => Fld_23.Node, Index_Expr => Fld_24, Dim => 0, Origin => Origin, E_Info => Fld_23.Info);
--# end
--# expr-done 10473
--# expr-start 10476 '<FieldAccess for constrain_index_expr at nodes.lkt:18139:42>' Fld_28 ada/nodes.lkt:18139
--# expr-start 10474 '<FieldAccess for indices at nodes.lkt:18139:42>' Fld_26 ada/nodes.lkt:18139
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Create_Internal_Entity_Array_Indices (Node => Local_Atd.Node.Array_Type_Def_F_Indices, Info => Local_Atd.Info);
--# expr-done 10474
      if Fld_26.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10475 '<FieldAccess for right at nodes.lkt:18140:41>' Fld_27 ada/nodes.lkt:18140
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Create_Internal_Entity_Expr (Node => Match_1.Node.Bin_Op_F_Right, Info => Match_1.Info);
--# expr-done 10475
--# property-call-start '[dispatcher]ArrayIndices.constrain_index_expr'
Fld_28 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Constrain_Index_Expr (Node => Fld_26.Node, Index_Expr => Fld_27, Dim => 0, Origin => Origin, E_Info => Fld_26.Info);
--# end
--# expr-done 10476
And_Pred_2 := Create_And (Fld_25, Fld_28, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18135:37") else null)); 
--# expr-done 10477
--# expr-start 10481 '<Bind at nodes.lkt:18144:38>' Bind_Result_2 ada/nodes.lkt:18144
--# expr-start 10478 '<FieldAccess for expected_type_var at nodes.lkt:18144:38>' Fld_29 ada/nodes.lkt:18144
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_29 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Match_1.Node);
--# expr-done 10478
Fld_29.Value := No_Entity;
Entity_Vars.Reset (Fld_29);
--# expr-start 10480 '<FieldAccess for expected_type_var at nodes.lkt:18145:37>' Fld_31 ada/nodes.lkt:18145
--# expr-start 10479 '<FieldAccess for right at nodes.lkt:18145:37>' Fld_30 ada/nodes.lkt:18145
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Create_Internal_Entity_Expr (Node => Match_1.Node.Bin_Op_F_Right, Info => Match_1.Info);
--# expr-done 10479
      if Fld_30.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_30.Node);
--# expr-done 10480
Fld_31.Value := No_Entity;
Entity_Vars.Reset (Fld_31);
Bind_Result_2 := Solver.Create_Unify (Fld_29, Fld_31, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18144:38") else null)); 
--# expr-done 10481
And_Pred_3 := Create_And (And_Pred_2, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18134:33") else null)); 
--# expr-done 10482
--# expr-start 10484 '<Bind at nodes.lkt:18147:34>' Bind_Result_3 ada/nodes.lkt:18147
--# expr-start 10483 '<FieldAccess for type_var at nodes.lkt:18147:34>' Fld_32 ada/nodes.lkt:18147
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10483
Fld_32.Value := No_Entity;
Entity_Vars.Reset (Fld_32);
Cast_Expr_2 := Local_Real_Typ; 
      Cast_Result_7 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Bind_Result_3 := Solver.Create_Assign (Fld_32, Cast_Result_7, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18147:34") else null)); 
--# expr-done 10484
And_Pred_4 := Create_And (And_Pred_3, Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18133:29") else null)); 
--# expr-done 10485
--# expr-start 10487 '<FieldAccess for sub_equation at nodes.lkt:18149:30>' Fld_34 ada/nodes.lkt:18149
--# expr-start 10486 '<FieldAccess for left at nodes.lkt:18149:30>' Fld_33 ada/nodes.lkt:18149
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Create_Internal_Entity_Expr (Node => Match_1.Node.Bin_Op_F_Left, Info => Match_1.Info);
--# expr-done 10486
      if Fld_33.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_34 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_33.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_33.Info);
--# end
--# expr-done 10487
And_Pred_5 := Create_And (And_Pred_4, Fld_34, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18132:25") else null)); 
--# expr-done 10488
--# expr-start 10490 '<FieldAccess for sub_equation at nodes.lkt:18151:26>' Fld_36 ada/nodes.lkt:18151
--# expr-start 10489 '<FieldAccess for right at nodes.lkt:18151:26>' Fld_35 ada/nodes.lkt:18151
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_35 := Create_Internal_Entity_Expr (Node => Match_1.Node.Bin_Op_F_Right, Info => Match_1.Info);
--# expr-done 10489
      if Fld_35.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_36 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_35.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_35.Info);
--# end
--# expr-done 10490
And_Pred_6 := Create_And (And_Pred_5, Fld_36, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18131:21") else null)); 
--# expr-done 10491
Let_Result_1 := And_Pred_6; Inc_Ref (Let_Result_1);
--# end
Scope_Result_7 := Let_Result_1;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3255;
            Match_Result := Scope_Result_7; Inc_Ref (Match_Result);
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_13 := Create_Internal_Entity_Attribute_Ref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_13; 
--# bind ar Match_2
--# expr-start 10498 '<LogicBinaryOp And at nodes.lkt:18155:21>' And_Pred_8 ada/nodes.lkt:18155
--# expr-start 10495 '<LogicBinaryOp And at nodes.lkt:18156:25>' And_Pred_7 ada/nodes.lkt:18156
--# expr-start 10492 '<FieldAccess for sub_equation at nodes.lkt:18156:25>' Fld_37 ada/nodes.lkt:18156
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_37 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_2.Info);
--# end
--# expr-done 10492
--# expr-start 10494 '<FieldAccess for constrain_index_expr at nodes.lkt:18157:30>' Fld_39 ada/nodes.lkt:18157
--# expr-start 10493 '<FieldAccess for indices at nodes.lkt:18157:30>' Fld_38 ada/nodes.lkt:18157
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_38 := Create_Internal_Entity_Array_Indices (Node => Local_Atd.Node.Array_Type_Def_F_Indices, Info => Local_Atd.Info);
--# expr-done 10493
      if Fld_38.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr_3 := Match_2; 
      Cast_Result_8 := Create_Internal_Entity_Expr
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
--# property-call-start '[dispatcher]ArrayIndices.constrain_index_expr'
Fld_39 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Constrain_Index_Expr (Node => Fld_38.Node, Index_Expr => Cast_Result_8, Dim => 0, Origin => Origin, E_Info => Fld_38.Info);
--# end
--# expr-done 10494
And_Pred_7 := Create_And (Fld_37, Fld_39, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18156:25") else null)); 
--# expr-done 10495
--# expr-start 10497 '<Bind at nodes.lkt:18159:26>' Bind_Result_4 ada/nodes.lkt:18159
--# expr-start 10496 '<FieldAccess for type_var at nodes.lkt:18159:26>' Fld_40 ada/nodes.lkt:18159
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_40 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10496
Fld_40.Value := No_Entity;
Entity_Vars.Reset (Fld_40);
Cast_Expr_4 := Local_Real_Typ; 
      Cast_Result_9 := Create_Internal_Entity
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
Bind_Result_4 := Solver.Create_Assign (Fld_40, Cast_Result_9, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18159:26") else null)); 
--# expr-done 10497
And_Pred_8 := Create_And (And_Pred_7, Bind_Result_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18155:21") else null)); 
--# expr-done 10498
Let_Result_2 := And_Pred_8; Inc_Ref (Let_Result_2);
--# end
Scope_Result_8 := Let_Result_2;
   Inc_Ref (Scope_Result_8);
   --# end
      Finalizer_Scope_3256;
            Match_Result := Scope_Result_8; Inc_Ref (Match_Result);
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_14 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_14; 
--# bind st Match_3
--# expr-start 10502 '<LogicBinaryOp And at nodes.lkt:18163:21>' And_Pred_9 ada/nodes.lkt:18163
--# expr-start 10499 '<FieldAccess for sub_equation at nodes.lkt:18163:21>' Fld_41 ada/nodes.lkt:18163
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_41 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_3.Info);
--# end
--# expr-done 10499
--# expr-start 10501 '<Bind at nodes.lkt:18163:44>' Bind_Result_5 ada/nodes.lkt:18163
--# expr-start 10500 '<FieldAccess for type_var at nodes.lkt:18163:44>' Fld_42 ada/nodes.lkt:18163
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_42 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10500
Fld_42.Value := No_Entity;
Entity_Vars.Reset (Fld_42);
Cast_Expr_5 := Local_Real_Typ; 
      Cast_Result_10 := Create_Internal_Entity
        (Node => Cast_Expr_5.Node,
         Info => Cast_Expr_5.Info);
Bind_Result_5 := Solver.Create_Assign (Fld_42, Cast_Result_10, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18163:44") else null)); 
--# expr-done 10501
And_Pred_9 := Create_And (Fld_41, Bind_Result_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18163:21") else null)); 
--# expr-done 10502
Let_Result_3 := And_Pred_9; Inc_Ref (Let_Result_3);
--# end
Scope_Result_9 := Let_Result_3;
   Inc_Ref (Scope_Result_9);
   --# end
      Finalizer_Scope_3257;
            Match_Result := Scope_Result_9; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Base_Assoc_List | Ada_Case_Expr_Alternative_List .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_15 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_15; 
--# bind _ Match_4
False_Rel_4 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18164:27") else null)); 
Let_Result_4 := False_Rel_4; Inc_Ref (Let_Result_4);
--# end
Scope_Result_10 := Let_Result_4;
   Inc_Ref (Scope_Result_10);
   --# end
      Finalizer_Scope_3258;
            Match_Result := Scope_Result_10; Inc_Ref (Match_Result);
end case;
--# expr-done 10503
   If_Result_9 := Match_Result;
else
   --# expr-start 10540 '<If at nodes.lkt:18089:9>' If_Result_7 ada/nodes.lkt:18089
--# expr-start 10507 '<BooleanBinaryOp And at nodes.lkt:18168:14>' If_Result_6 ada/nodes.lkt:18168
--# expr-start 10505 '<Not at nodes.lkt:18168:14>' Not_Val ada/nodes.lkt:18168
--# expr-start 10504 '<IsNull at nodes.lkt:18168:18>' Is_Null_4 ada/nodes.lkt:18168
Is_Null_4 := Typ.Node = null; 
--# expr-done 10504
Not_Val := not (Is_Null_4); 
--# expr-done 10505
if Not_Val then
   --# expr-start 10506 '<FieldAccess for has_ud_indexing at nodes.lkt:18168:34>' Fld_60 ada/nodes.lkt:18168
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.has_ud_indexing'
Fld_60 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Has_Ud_Indexing (Node => Typ.Node, E_Info => Typ.Info);
--# end
--# expr-done 10506
   If_Result_6 := Fld_60;
else
   If_Result_6 := False;
end if;
--# expr-done 10507
if If_Result_6 then
   --# expr-start 10539 '<LogicAny at nodes.lkt:18170:13>' Logic_Boolean_Op_2 ada/nodes.lkt:18170
--# expr-start 10538 '<Map at nodes.lkt:18170:13>' Map_Result_2 ada/nodes.lkt:18170
   --# expr-start 10508 '<FieldAccess for constant_indexing_fns at nodes.lkt:18170:14>' Fld_43 ada/nodes.lkt:18170
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.constant_indexing_fns'
Fld_43 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Constant_Indexing_Fns (Node => Typ.Node, E_Info => Typ.Info);
--# end
--# expr-done 10508
--# expr-start 10509 '<FieldAccess for variable_indexing_fns at nodes.lkt:18170:44>' Fld_44 ada/nodes.lkt:18170
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.variable_indexing_fns'
Fld_44 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Variable_Indexing_Fns (Node => Typ.Node, E_Info => Typ.Info);
--# end
--# expr-done 10509
Concat_Result := Concat (Fld_43, Fld_44); 
      declare
         Map_Result_2_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Concat_Result;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind fn Item_2
      --# expr-start 10537 '<Let at nodes.lkt:18173:21>' Let_Result_7 ada/nodes.lkt:18173
--# scope-start
--# expr-start 10511 '<FieldAccess for unpacked_formal_params at nodes.lkt:18174:25>' Fld_46 ada/nodes.lkt:18174
--# expr-start 10510 '<FieldAccess for subp_spec_or_null at nodes.lkt:18174:25>' Fld_45 ada/nodes.lkt:18174
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_45 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Item_2.Node, E_Info => Item_2.Info);
--# end
--# expr-done 10510
      if Fld_45.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_46 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Fld_45.Node, E_Info => Fld_45.Info);
--# end
--# expr-done 10511
Local_Formals := Fld_46; Inc_Ref (Local_Formals);
--# bind formals Local_Formals
--# expr-start 10536 '<Let at nodes.lkt:18175:21>' Let_Result_6 ada/nodes.lkt:18175
--# scope-start
--# expr-start 10513 '<FieldAccess for return_type at nodes.lkt:18175:36>' Fld_48 ada/nodes.lkt:18175
--# expr-start 10512 '<FieldAccess for subp_spec_or_null at nodes.lkt:18175:36>' Fld_47 ada/nodes.lkt:18175
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_47 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Item_2.Node, E_Info => Item_2.Info);
--# end
--# expr-done 10512
      if Fld_47.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_48 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Fld_47.Node, Origin => Origin, E_Info => Fld_47.Info);
--# end
--# expr-done 10513
Local_Ret_Type := Fld_48; 
--# bind ret_type Local_Ret_Type
--# expr-start 10535 '<Let at nodes.lkt:18176:21>' Let_Result_5 ada/nodes.lkt:18176
--# scope-start
--# expr-start 10514 '<FieldAccess for params at nodes.lkt:18176:34>' Fld_49 ada/nodes.lkt:18176
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_49 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10514
Local_Params := Fld_49; 
--# bind params Local_Params
--# expr-start 10534 '<If at nodes.lkt:18180:21>' If_Result_5 ada/nodes.lkt:18180
--# expr-start 10518 '<Eq at nodes.lkt:18180:24>' Is_Equal ada/nodes.lkt:18180
--# expr-start 10515 '<length at nodes.lkt:18180:24>' Len ada/nodes.lkt:18180
Len := Length (Local_Formals); 
--# expr-done 10515
--# expr-start 10517 '<Arithmetic + at nodes.lkt:18180:44>' Arith_Result_1 ada/nodes.lkt:18180
--# expr-start 10516 '<length at nodes.lkt:18180:44>' Len_1 ada/nodes.lkt:18180
Fld_59 := Local_Params.Node; 
Len_1 := Length (Fld_59); 
--# expr-done 10516
Arith_Result_1 := (Len_1 + 1); 
--# expr-done 10517
Is_Equal := Len = Arith_Result_1; 
--# expr-done 10518
if Is_Equal then
   --# expr-start 10533 '<LogicBinaryOp And at nodes.lkt:18182:25>' And_Pred_11 ada/nodes.lkt:18182
--# expr-start 10520 '<Bind at nodes.lkt:18182:25>' Bind_Result_6 ada/nodes.lkt:18182
--# expr-start 10519 '<FieldAccess for type_var at nodes.lkt:18182:25>' Fld_50 ada/nodes.lkt:18182
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_50 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10519
Fld_50.Value := No_Entity;
Entity_Vars.Reset (Fld_50);
Cast_Expr_6 := Local_Ret_Type; 
      Cast_Result_16 := Create_Internal_Entity
        (Node => Cast_Expr_6.Node,
         Info => Cast_Expr_6.Info);
Bind_Result_6 := Solver.Create_Assign (Fld_50, Cast_Result_16, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18182:25") else null)); 
--# expr-done 10520
--# expr-start 10532 '<LogicAll at nodes.lkt:18183:30>' Logic_Boolean_Op_1 ada/nodes.lkt:18183
--# expr-start 10531 '<Map at nodes.lkt:18183:30>' Map_Result_1 ada/nodes.lkt:18183
Saved_1 := Local_Params; 
Fld_51 := Saved_1.Node;
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_51 = null then
      Map_Result_1 := Create_Logic_Equation_Array (0);
      else
         Index_4 := 0;
      declare
         Collection : constant Bare_Assoc_List := Fld_51;
      begin
         for Untyped_Item_3 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_3 := Untyped_Item_3; 
Is_Null_3 := Bare_Item_3 = null; 
if Is_Null_3 then
   If_Result_4 := No_Entity_Basic_Assoc;
else
Fld_52 := Saved_1.Info;
As_Entity_2 := (Info => Fld_52, Node => Bare_Item_3); 
   If_Result_4 := As_Entity_2;
end if;
                  Item_3 := If_Result_4; 
   --# scope-start
               --# bind param Item_3
               --# bind i Index_4
      --# expr-start 10530 '<LogicBinaryOp And at nodes.lkt:18185:29>' And_Pred_10 ada/nodes.lkt:18185
--# expr-start 10527 '<Bind at nodes.lkt:18185:29>' Bind_Result_7 ada/nodes.lkt:18185
--# expr-start 10522 '<FieldAccess for expected_type_var at nodes.lkt:18185:29>' Fld_54 ada/nodes.lkt:18185
--# expr-start 10521 '<FieldAccess for expr at nodes.lkt:18185:29>' Fld_53 ada/nodes.lkt:18185
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_53 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_3.Node, E_Info => Item_3.Info);
--# end
--# expr-done 10521
      if Fld_53.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_54 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_53.Node);
--# expr-done 10522
Fld_54.Value := No_Entity;
Entity_Vars.Reset (Fld_54);
--# expr-start 10526 '<FieldAccess for formal_type at nodes.lkt:18186:32>' Fld_56 ada/nodes.lkt:18186
--# expr-start 10525 '<FieldAccess for formal_decl at nodes.lkt:18186:32>' Fld_55 ada/nodes.lkt:18186
--# expr-start 10524 '<at at nodes.lkt:18186:32>' Get_Result_1 ada/nodes.lkt:18186
--# expr-start 10523 '<Arithmetic + at nodes.lkt:18186:41>' Arith_Result ada/nodes.lkt:18186
Arith_Result := (Index_4 + 1); 
--# expr-done 10523
Get_Result_1 := Get (Self, Local_Formals, Arith_Result, True); 
--# expr-done 10524
      if Get_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_55 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result_1.Node, E_Info => Get_Result_1.Info);
--# end
--# expr-done 10525
      if Fld_55.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.formal_type
Fld_56 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Formal_Type (Node => Fld_55.Node, Origin => Origin, E_Info => Fld_55.Info);
--# end
--# expr-done 10526
      Cast_Result_17 := Create_Internal_Entity
        (Node => Fld_56.Node,
         Info => Fld_56.Info);
Bind_Result_7 := Solver.Create_Assign (Fld_54, Cast_Result_17, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18185:29") else null)); 
--# expr-done 10527
--# expr-start 10529 '<FieldAccess for matches_expected_type at nodes.lkt:18187:34>' Fld_58 ada/nodes.lkt:18187
--# expr-start 10528 '<FieldAccess for expr at nodes.lkt:18187:34>' Fld_57 ada/nodes.lkt:18187
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_57 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Item_3.Node, E_Info => Item_3.Info);
--# end
--# expr-done 10528
      if Fld_57.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_58 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_57.Node, Origin => Origin);
--# end
--# expr-done 10529
And_Pred_10 := Create_And (Bind_Result_7, Fld_58, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18185:29") else null)); 
--# expr-done 10530
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_10;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3260;
               Index_4 := Index_4 + 1;
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 10531
Logic_Boolean_Op_1 := Solver.Create_All (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18183:30") else null)); 
--# expr-done 10532
And_Pred_11 := Create_And (Bind_Result_6, Logic_Boolean_Op_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18182:25") else null)); 
--# expr-done 10533
   If_Result_5 := And_Pred_11;
else
   False_Rel_5 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18189:26") else null)); 
   If_Result_5 := False_Rel_5;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 10534
Let_Result_5 := If_Result_5; Inc_Ref (Let_Result_5);
--# end
--# expr-done 10535
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 10536
Let_Result_7 := Let_Result_6; Inc_Ref (Let_Result_7);
--# end
--# expr-done 10537
         declare
            Item_To_Append : constant Logic_Equation := Let_Result_7;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3259;
         end loop;
      end;
         Map_Result_2 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_2_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 10538
Logic_Boolean_Op_2 := Solver.Create_Any (Relation_Array (Map_Result_2.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18170:13") else null)); 
--# expr-done 10539
   If_Result_7 := Logic_Boolean_Op_2;
else
   False_Rel_6 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18192:14") else null)); 
   If_Result_7 := False_Rel_6;
end if;
      Inc_Ref (If_Result_7);
--# expr-done 10540
   If_Result_9 := If_Result_7;
end if;
      Inc_Ref (If_Result_9);
--# expr-done 10541
   If_Result_10 := If_Result_9;
end if;
      Inc_Ref (If_Result_10);
--# expr-done 10542
Let_Result_8 := If_Result_10; Inc_Ref (Let_Result_8);
--# end
--# expr-done 10543
Let_Result_9 := Let_Result_8; Inc_Ref (Let_Result_9);
--# end
--# expr-done 10544
         Property_Result := Let_Result_9;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1211;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1211;
                     Finalizer_Scope_3249;
                     Finalizer_Scope_3250;
                     Finalizer_Scope_3251;
                     Finalizer_Scope_3252;
                     Finalizer_Scope_3253;
                     Finalizer_Scope_3254;
                     Finalizer_Scope_3255;
                     Finalizer_Scope_3256;
                     Finalizer_Scope_3257;
                     Finalizer_Scope_3258;
                     Finalizer_Scope_3259;
                     Finalizer_Scope_3260;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Subscriptable_Type_Equation;
--# end
--# property-start CallExpr.subprogram_equation ada/nodes.lkt:18196
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Subprogram_Equation
  (Node : Bare_Call_Expr
      ; Subp_Spec : Internal_Entity_Base_Formal_Param_Holder
      ; Dottable_Subp : Boolean
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind subp_spec Subp_Spec
   --# bind dottable_subp Dottable_Subp
   --# bind env Env
   --# bind origin Origin
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1212 with Inline_Always;
            procedure Finalizer_Scope_3261 with Inline_Always;
            procedure Finalizer_Scope_3263 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Formal_Param_Holder;
Local_N : Internal_Entity_Base_Formal_Param_Decl;
Var_Expr_254 : Internal_Entity_Base_Subp_Spec;
Fld : Logic_Var;
Cast_Expr : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
Bound_Logic_Context : Internal_Logic_Context;
Fld_2 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Formal_Param_Holder;
Cast_Result_2 : Internal_Entity;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_3 : Internal_Entity_Assoc_List;
Fld_4 : Internal_Param_Match_Array_Access;
Fld_5 : Internal_Entity_Defining_Name;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl;
Fld_7 : Internal_Single_Actual;
Fld_8 : Internal_Entity_Basic_Assoc;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Logic_Equation;
True_Rel : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_11 : Internal_Single_Actual;
Fld_12 : Bare_Base_Id;
Fld_13 : Logic_Var;
Fld_14 : Internal_Entity_Defining_Name;
Fld_15 : Internal_Entity_Defining_Name;
Fld_16 : Internal_Entity_Base_Formal_Param_Decl;
Fld_17 : Bare_Base_Formal_Param_Decl;
Cast_Result_3 : Bare_Ada_Node;
Fld_18 : Internal_Entity_Info;
Fld_19 : Env_Rebindings;
Fld_20 : Internal_Entity_Info;
Fld_21 : Boolean;
Fld_22 : Internal_Entity;
Let_Result : Internal_Entity;
Logic_Ctx_2 : Internal_Logic_Context_Access;
Bind_Result_2 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
Fld_23 : Internal_Single_Actual;
Fld_24 : Bare_Base_Id;
Is_Null : Boolean;
If_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
False_Rel : Logic_Equation;
Fld_25 : Boolean;
If_Result_1 : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_2 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
False_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
            procedure Finalizer_Scope_1212 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (False_Rel_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_1212;
            procedure Finalizer_Scope_3261 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_3261;
            procedure Finalizer_Scope_3263 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_3263;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
Var_Expr_0 := Subp_Spec;
if Var_Expr_0 /= No_Entity_Base_Formal_Param_Holder then
   --# scope-start
   --# bind subp_spec Var_Expr_0
--# expr-start 10585 '<LogicBinaryOp And at nodes.lkt:18202:13>' And_Pred_2 ada/nodes.lkt:18202
--# expr-start 10552 '<LogicBinaryOp And at nodes.lkt:18205:17>' And_Pred ada/nodes.lkt:18205
--# expr-start 10548 '<Bind at nodes.lkt:18205:17>' Bind_Result ada/nodes.lkt:18205
--# expr-start 10545 '<FieldAccess for type_var at nodes.lkt:18205:17>' Fld ada/nodes.lkt:18205
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 10545
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 10546 '<Cast to BaseSubpSpec at nodes.lkt:18205:36>' Cast_Result ada/nodes.lkt:18205
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Subp_Spec
   then
      Cast_Result := Create_Internal_Entity_Base_Subp_Spec
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Subp_Spec;
   end if;
--# expr-done 10546
Var_Expr_254 := Cast_Result;
if Var_Expr_254 /= No_Entity_Base_Subp_Spec then
   --# scope-start
--# expr-start 10547 '<FieldAccess for return_type at nodes.lkt:18205:36>' Fld_1 ada/nodes.lkt:18205
      if Var_Expr_254.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Var_Expr_254.Node, Origin => Origin, E_Info => Var_Expr_254.Info);
--# end
--# expr-done 10547
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
      Cast_Result_1 := Create_Internal_Entity
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
Logic_Ctx := Allocate_Logic_Context (Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld, Cast_Result_1, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18205:17") else null)); 
--# expr-done 10548
--# expr-start 10551 '<bind at nodes.lkt:18210:25>' Dyn_Var_Bind_Result ada/nodes.lkt:18210
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 10550 '<Bind at nodes.lkt:18211:25>' Bind_Result_1 ada/nodes.lkt:18211
--# expr-start 10549 '<FieldAccess for subp_spec_var at nodes.lkt:18211:25>' Fld_2 ada/nodes.lkt:18211
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Self);
--# end
--# expr-done 10549
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Cast_Expr_1 := Var_Expr_0; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Logic_Ctx_1 := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result_1 := Solver.Create_Assign (Fld_2, Cast_Result_2, Solver_Ifc.No_Converter, Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18211:25") else null)); 
--# expr-done 10550
Dyn_Var_Bind_Result := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 10551
And_Pred := Create_And (Bind_Result, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18205:17") else null)); 
--# expr-done 10552
--# expr-start 10584 '<LogicAll at nodes.lkt:18218:17>' Logic_Boolean_Op ada/nodes.lkt:18218
--# expr-start 10583 '<Map at nodes.lkt:18218:17>' Map_Result ada/nodes.lkt:18218
   --# expr-start 10554 '<FieldAccess for match_param_list at nodes.lkt:18218:17>' Fld_4 ada/nodes.lkt:18218
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10553 '<FieldAccess for params at nodes.lkt:18218:44>' Fld_3 ada/nodes.lkt:18218
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_3 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10553
--# property-call-start BaseFormalParamHolder.match_param_list
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Param_List (Node => Var_Expr_0.Node, Params => Fld_3, Is_Dottable_Subp => Dottable_Subp, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10554
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Param_Match_Array_Access := Fld_4;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind pm Item_1
      --# expr-start 10582 '<If at nodes.lkt:18221:21>' If_Result_1 ada/nodes.lkt:18221
--# expr-start 10555 '<FieldAccess for has_matched at nodes.lkt:18221:24>' Fld_25 ada/nodes.lkt:18221
Fld_25 := Item_1.Has_Matched;
--# expr-done 10555
if Fld_25 then
   --# expr-start 10581 '<LogicBinaryOp And at nodes.lkt:18223:25>' And_Pred_1 ada/nodes.lkt:18223
--# expr-start 10561 '<FieldAccess for call_argument_equation at nodes.lkt:18223:25>' Fld_10 ada/nodes.lkt:18223
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10557 '<FieldAccess for formal_decl at nodes.lkt:18224:29>' Fld_6 ada/nodes.lkt:18224
--# expr-start 10556 '<FieldAccess for formal at nodes.lkt:18224:29>' Fld_5 ada/nodes.lkt:18224
Fld_5 := Item_1.Formal;
--# expr-done 10556
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_6 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 10557
--# expr-start 10560 '<FieldAccess for expr at nodes.lkt:18225:29>' Fld_9 ada/nodes.lkt:18225
--# expr-start 10559 '<FieldAccess for assoc at nodes.lkt:18225:29>' Fld_8 ada/nodes.lkt:18225
--# expr-start 10558 '<FieldAccess for actual at nodes.lkt:18225:29>' Fld_7 ada/nodes.lkt:18225
Fld_7 := Item_1.Actual;
--# expr-done 10558
Fld_8 := Fld_7.Assoc;
--# expr-done 10559
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_8.Node, E_Info => Fld_8.Info);
--# end
--# expr-done 10560
--# property-call-start BaseFormalParamHolder.call_argument_equation
Fld_10 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Call_Argument_Equation (Node => Var_Expr_0.Node, Param => Fld_6, Arg => Fld_9, Origin => Origin, Logic_Context => Logic_Context, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10561
--# expr-start 10580 '<If at nodes.lkt:18230:29>' If_Result ada/nodes.lkt:18230
--# expr-start 10564 '<IsNull at nodes.lkt:18230:32>' Is_Null ada/nodes.lkt:18230
--# expr-start 10563 '<FieldAccess for name at nodes.lkt:18230:32>' Fld_24 ada/nodes.lkt:18230
--# expr-start 10562 '<FieldAccess for actual at nodes.lkt:18230:32>' Fld_23 ada/nodes.lkt:18230
Fld_23 := Item_1.Actual;
--# expr-done 10562
Fld_24 := Fld_23.Name;
--# expr-done 10563
Is_Null := Fld_24 = null; 
--# expr-done 10564
if Is_Null then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18230:60") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 10579 '<bind at nodes.lkt:18232:33>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:18232
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 10578 '<Bind at nodes.lkt:18233:33>' Bind_Result_2 ada/nodes.lkt:18233
--# expr-start 10567 '<FieldAccess for ref_var at nodes.lkt:18233:33>' Fld_13 ada/nodes.lkt:18233
--# expr-start 10566 '<FieldAccess for name at nodes.lkt:18233:33>' Fld_12 ada/nodes.lkt:18233
--# expr-start 10565 '<FieldAccess for actual at nodes.lkt:18233:33>' Fld_11 ada/nodes.lkt:18233
Fld_11 := Item_1.Actual;
--# expr-done 10565
Fld_12 := Fld_11.Name;
--# expr-done 10566
      if Fld_12 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_13 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_12);
--# end
--# expr-done 10567
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
--# expr-start 10577 '<Let at nodes.lkt:18235:37>' Let_Result ada/nodes.lkt:18235
--# scope-start
--# expr-start 10570 '<FieldAccess for formal_decl at nodes.lkt:18236:41>' Fld_16 ada/nodes.lkt:18236
--# expr-start 10569 '<FieldAccess for corresponding_actual_param at nodes.lkt:18236:41>' Fld_15 ada/nodes.lkt:18236
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10568 '<FieldAccess for formal at nodes.lkt:18237:45>' Fld_14 ada/nodes.lkt:18237
Fld_14 := Item_1.Formal;
--# expr-done 10568
--# property-call-start BaseFormalParamHolder.corresponding_actual_param
Fld_15 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Corresponding_Actual_Param (Node => Var_Expr_0.Node, Name => Fld_14, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10569
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_16 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_15.Node, E_Info => Fld_15.Info);
--# end
--# expr-done 10570
Local_N := Fld_16; 
--# bind n Local_N
--# expr-start 10576 '<FieldAccess for entity_no_md at nodes.lkt:18241:37>' Fld_22 ada/nodes.lkt:18241
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10571 '<FieldAccess for node at nodes.lkt:18242:41>' Fld_17 ada/nodes.lkt:18242
Fld_17 := Local_N.Node;
--# expr-done 10571
      Cast_Result_3 := Fld_17;
--# expr-start 10573 '<FieldAccess for rebindings at nodes.lkt:18243:41>' Fld_19 ada/nodes.lkt:18243
--# expr-start 10572 '<FieldAccess for info at nodes.lkt:18243:41>' Fld_18 ada/nodes.lkt:18243
Fld_18 := Local_N.Info;
--# expr-done 10572
Fld_19 := Fld_18.Rebindings;
--# expr-done 10573
--# expr-start 10575 '<FieldAccess for from_rebound at nodes.lkt:18244:41>' Fld_21 ada/nodes.lkt:18244
--# expr-start 10574 '<FieldAccess for info at nodes.lkt:18244:41>' Fld_20 ada/nodes.lkt:18244
Fld_20 := Local_N.Info;
--# expr-done 10574
Fld_21 := Fld_20.From_Rebound;
--# expr-done 10575
--# property-call-start AdaNode.entity_no_md
Fld_22 := Libadalang.Implementation.Ada_Node_P_Entity_No_Md (Node => Ent.Node, N => Cast_Result_3, Rebindings => Fld_19, From_Rebound => Fld_21);
--# end
--# expr-done 10576
Let_Result := Fld_22; 
--# end
--# expr-done 10577
Logic_Ctx_2 := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result_2 := Solver.Create_Assign (Fld_13, Let_Result, Solver_Ifc.No_Converter, Logic_Ctx_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18233:33") else null)); 
--# expr-done 10578
Dyn_Var_Bind_Result_1 := Bind_Result_2; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 10579
   If_Result := Dyn_Var_Bind_Result_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 10580
And_Pred_1 := Create_And (Fld_10, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18223:25") else null)); 
--# expr-done 10581
   If_Result_1 := And_Pred_1;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18249:26") else null)); 
   If_Result_1 := False_Rel;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 10582
         declare
            Item_To_Append : constant Logic_Equation := If_Result_1;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3263;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10583
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18218:17") else null)); 
--# expr-done 10584
And_Pred_2 := Create_And (And_Pred, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18202:13") else null)); 
--# expr-done 10585
Scope_Result_1 := And_Pred_2;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3261;
   Result_Var_1 := Scope_Result_1;
else
   False_Rel_1 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:18252:25") else null)); 
   Result_Var_1 := False_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
         Property_Result := Result_Var_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1212;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1212;
                     Finalizer_Scope_3261;
                     Finalizer_Scope_3263;
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Subprogram_Equation;
--# end
--# property-start CallExpr.check_for_type ada/nodes.lkt:18260
pragma Warnings (Off, "is not referenced");
 function Call_Expr_P_Check_For_Type
  (Node : Bare_Call_Expr
      ; Typ : Internal_Entity_Base_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Call_Expr  := Bare_Call_Expr (Node);
     Ent : Internal_Entity_Call_Expr :=
       Internal_Entity_Call_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Atd : Internal_Entity_Array_Type_Def;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Var_Expr_2 : Internal_Entity_Array_Type_Def;
Match_0 : Bare_Assoc_List;
Match_1 : Bare_Bin_Op;
Match_2 : Bare_Subtype_Indication;
Match_3 : Bare_Attribute_Ref;
Match_4 : Bare_Ada_Node;
Var_Expr_3 : Internal_Entity_Access_To_Subp_Def;
Var_Expr_4 : Bare_Assoc_List;
Var_Expr_5 : Internal_Entity_Call_Expr;
Fld : Internal_Entity_Array_Type_Def;
Scope_Result : Internal_Entity_Array_Type_Def;
Result_Var : Internal_Entity_Array_Type_Def;
Fld_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_2 : Bare_Ada_Node;
Fld_3 : Integer;
Len : Integer;
Is_Equal : Boolean;
Fld_4 : Integer;
Is_Equal_1 : Boolean;
Fld_5 : Integer;
Is_Equal_2 : Boolean;
Fld_6 : Integer;
Is_Equal_3 : Boolean;
Match_Prefix : Bare_Ada_Node;
Cast_Result : Bare_Assoc_List;
Let_Result : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_1 : Bare_Bin_Op;
Let_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Cast_Result_2 : Bare_Subtype_Indication;
Let_Result_2 : Boolean;
Scope_Result_3 : Boolean;
Cast_Result_3 : Bare_Attribute_Ref;
Let_Result_3 : Boolean;
Scope_Result_4 : Boolean;
Cast_Result_4 : Bare_Ada_Node;
Let_Result_4 : Boolean;
Scope_Result_5 : Boolean;
Match_Result : Boolean;
Scope_Result_6 : Boolean;
Result_Var_1 : Boolean;
Fld_7 : Internal_Entity_Access_Def;
Cast_Result_5 : Internal_Entity_Access_To_Subp_Def;
Fld_8 : Internal_Entity_Subp_Spec;
Fld_9 : Internal_Entity_Assoc_List;
Fld_10 : Boolean;
Scope_Result_7 : Boolean;
Result_Var_2 : Boolean;
If_Result : Boolean;
Fld_11 : Boolean;
Fld_12 : Bare_Ada_Node;
Cast_Result_6 : Bare_Assoc_List;
Len_1 : Integer;
Comp_Result : Boolean;
Scope_Result_8 : Boolean;
Result_Var_3 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Fld_13 : Internal_Entity;
Cast_Result_7 : Internal_Entity_Call_Expr;
Fld_14 : Internal_Entity_Base_Type_Decl;
Fld_15 : Internal_Entity_Base_Type_Decl;
Fld_16 : Boolean;
If_Result_3 : Internal_Entity_Base_Type_Decl;
Fld_17 : Boolean;
If_Result_4 : Internal_Entity_Base_Type_Decl;
Fld_18 : Boolean;
Scope_Result_9 : Boolean;
Result_Var_4 : Boolean;
If_Result_5 : Boolean;
Scope_Result_10 : Boolean;
Result_Var_5 : Boolean;
Dyn_Var_Bind_Result : Boolean;
Let_Result_5 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10622 '<Let at nodes.lkt:18264:9>' Let_Result_5 ada/nodes.lkt:18264
--# scope-start
Var_Expr_0 := Typ;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind t Var_Expr_0
--# expr-start 10586 '<FieldAccess for array_def_with_deref at nodes.lkt:18264:33>' Fld ada/nodes.lkt:18264
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.array_def_with_deref
Fld := Libadalang.Implementation.Base_Type_Decl_P_Array_Def_With_Deref (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10586
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Array_Type_Def;
end if;
Local_Atd := Result_Var; 
--# bind atd Local_Atd
--# expr-start 10621 '<bind at nodes.lkt:18267:13>' Dyn_Var_Bind_Result ada/nodes.lkt:18267
--# expr-start 10587 '<FieldAccess for origin_node at nodes.lkt:18267:27>' Fld_1 ada/nodes.lkt:18267
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 10587
Bound_Origin := Fld_1; 
Var_Expr_1 := Typ;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_1
--# expr-start 10620 '<BooleanBinaryOp And at nodes.lkt:18271:17>' If_Result_5 ada/nodes.lkt:18271
--# expr-start 10610 '<BooleanBinaryOp Or at nodes.lkt:18272:21>' If_Result_2 ada/nodes.lkt:18272
--# expr-start 10604 '<BooleanBinaryOp Or at nodes.lkt:18272:21>' If_Result ada/nodes.lkt:18272
Var_Expr_2 := Local_Atd;
if Var_Expr_2 /= No_Entity_Array_Type_Def then
   --# scope-start
   --# bind _ Var_Expr_2
--# expr-start 10598 '<Match at nodes.lkt:18276:29>' Match_Result ada/nodes.lkt:18276
--# expr-start 10588 '<FieldAccess for suffix at nodes.lkt:18276:35>' Fld_2 ada/nodes.lkt:18276
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Call_Expr_F_Suffix;
--# expr-done 10588
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_2; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Assoc_List =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind al Match_0
--# expr-start 10591 '<Eq at nodes.lkt:18279:37>' Is_Equal ada/nodes.lkt:18279
--# expr-start 10589 '<FieldAccess for array_ndims at nodes.lkt:18279:37>' Fld_3 ada/nodes.lkt:18279
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.array_ndims'
Fld_3 := Libadalang.Implementation.Dispatcher_Type_Def_P_Array_Ndims (Node => Local_Atd.Node, Origin => Bound_Origin, E_Info => Local_Atd.Info);
--# end
--# expr-done 10589
--# expr-start 10590 '<length at nodes.lkt:18279:58>' Len ada/nodes.lkt:18279
Len := Length (Match_0); 
--# expr-done 10590
Is_Equal := Fld_3 = Len; 
--# expr-done 10591
Let_Result := Is_Equal; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Bin_Op .. Ada_Relation_Op =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind _ Match_1
--# expr-start 10593 '<Eq at nodes.lkt:18282:50>' Is_Equal_1 ada/nodes.lkt:18282
--# expr-start 10592 '<FieldAccess for array_ndims at nodes.lkt:18282:50>' Fld_4 ada/nodes.lkt:18282
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.array_ndims'
Fld_4 := Libadalang.Implementation.Dispatcher_Type_Def_P_Array_Ndims (Node => Local_Atd.Node, Origin => Bound_Origin, E_Info => Local_Atd.Info);
--# end
--# expr-done 10592
Is_Equal_1 := Fld_4 = 1; 
--# expr-done 10593
Let_Result_1 := Is_Equal_1; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind _ Match_2
--# expr-start 10595 '<Eq at nodes.lkt:18284:37>' Is_Equal_2 ada/nodes.lkt:18284
--# expr-start 10594 '<FieldAccess for array_ndims at nodes.lkt:18284:37>' Fld_5 ada/nodes.lkt:18284
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.array_ndims'
Fld_5 := Libadalang.Implementation.Dispatcher_Type_Def_P_Array_Ndims (Node => Local_Atd.Node, Origin => Bound_Origin, E_Info => Local_Atd.Info);
--# end
--# expr-done 10594
Is_Equal_2 := Fld_5 = 1; 
--# expr-done 10595
Let_Result_2 := Is_Equal_2; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_3 := Cast_Result_3; 
--# bind _ Match_3
--# expr-start 10597 '<Eq at nodes.lkt:18285:57>' Is_Equal_3 ada/nodes.lkt:18285
--# expr-start 10596 '<FieldAccess for array_ndims at nodes.lkt:18285:57>' Fld_6 ada/nodes.lkt:18285
      if Local_Atd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.array_ndims'
Fld_6 := Libadalang.Implementation.Dispatcher_Type_Def_P_Array_Ndims (Node => Local_Atd.Node, Origin => Bound_Origin, E_Info => Local_Atd.Info);
--# end
--# expr-done 10596
Is_Equal_3 := Fld_6 = 1; 
--# expr-done 10597
Let_Result_3 := Is_Equal_3; 
--# end
Scope_Result_4 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Abort_Absent .. Ada_Base_Assoc_List | Ada_Case_Expr_Alternative_List .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix;
Match_4 := Cast_Result_4; 
--# bind _ Match_4
Let_Result_4 := False; 
--# end
Scope_Result_5 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 10598
Scope_Result_6 := Match_Result;
   --# end
   Result_Var_1 := Scope_Result_6;
else
   Result_Var_1 := False;
end if;
if Result_Var_1 then
   If_Result := True;
else
--# expr-start 10600 '<Cast to AccessToSubpDef at nodes.lkt:18293:25>' Cast_Result_5 ada/nodes.lkt:18293
--# expr-start 10599 '<FieldAccess for access_def at nodes.lkt:18293:25>' Fld_7 ada/nodes.lkt:18293
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Var_Expr_1.Node, Origin => Bound_Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10599
   if Fld_7.Node = null
      or else Fld_7.Node.Kind in Ada_Access_To_Subp_Def_Range
   then
      Cast_Result_5 := Create_Internal_Entity_Access_To_Subp_Def
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
   else
         Cast_Result_5 := No_Entity_Access_To_Subp_Def;
   end if;
--# expr-done 10600
Var_Expr_3 := Cast_Result_5;
if Var_Expr_3 /= No_Entity_Access_To_Subp_Def then
   --# scope-start
   --# bind sa Var_Expr_3
--# expr-start 10603 '<FieldAccess for is_matching_param_list at nodes.lkt:18295:29>' Fld_10 ada/nodes.lkt:18295
--# expr-start 10601 '<FieldAccess for subp_spec at nodes.lkt:18295:29>' Fld_8 ada/nodes.lkt:18295
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Subp_Spec (Node => Var_Expr_3.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Var_Expr_3.Info);
--# expr-done 10601
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10602 '<FieldAccess for params at nodes.lkt:18296:33>' Fld_9 ada/nodes.lkt:18296
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_9 := Libadalang.Implementation.Call_Expr_P_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10602
--# property-call-start BaseFormalParamHolder.is_matching_param_list
Fld_10 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Is_Matching_Param_List (Node => Fld_8.Node, Params => Fld_9, Is_Dottable_Subp => False, Env => Env);
--# end
--# expr-done 10603
Scope_Result_7 := Fld_10;
   --# end
   Result_Var_2 := Scope_Result_7;
else
   Result_Var_2 := False;
end if;
   If_Result := Result_Var_2;
end if;
--# expr-done 10604
if If_Result then
   If_Result_2 := True;
else
   --# expr-start 10609 '<BooleanBinaryOp And at nodes.lkt:18303:25>' If_Result_1 ada/nodes.lkt:18303
--# expr-start 10605 '<FieldAccess for has_ud_indexing at nodes.lkt:18303:25>' Fld_11 ada/nodes.lkt:18303
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.has_ud_indexing'
Fld_11 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Has_Ud_Indexing (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10605
if Fld_11 then
--# expr-start 10607 '<Cast to AssocList at nodes.lkt:18304:29>' Cast_Result_6 ada/nodes.lkt:18304
--# expr-start 10606 '<FieldAccess for suffix at nodes.lkt:18304:29>' Fld_12 ada/nodes.lkt:18304
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Self.Call_Expr_F_Suffix;
--# expr-done 10606
   if Fld_12 = null
      or else Fld_12.Kind in Ada_Assoc_List_Range
   then
      Cast_Result_6 := Fld_12;
   else
         Cast_Result_6 := No_Bare_Ada_Node;
   end if;
--# expr-done 10607
Var_Expr_4 := Cast_Result_6;
if Var_Expr_4 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind al Var_Expr_4
--# expr-start 10608 '<length at nodes.lkt:18305:37>' Len_1 ada/nodes.lkt:18305
Len_1 := Length (Var_Expr_4); 
--# expr-done 10608
Comp_Result := Len_1 >= 1; 
Scope_Result_8 := Comp_Result;
   --# end
   Result_Var_3 := Scope_Result_8;
else
   Result_Var_3 := False;
end if;
   If_Result_1 := Result_Var_3;
else
   If_Result_1 := False;
end if;
--# expr-done 10609
   If_Result_2 := If_Result_1;
end if;
--# expr-done 10610
if If_Result_2 then
--# expr-start 10612 '<Cast to CallExpr at nodes.lkt:18312:21>' Cast_Result_7 ada/nodes.lkt:18312
--# expr-start 10611 '<parent at nodes.lkt:18312:21>' Fld_13 ada/nodes.lkt:18312
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 10611
   if Fld_13.Node = null
      or else Fld_13.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_7 := Create_Internal_Entity_Call_Expr
        (Node => Fld_13.Node,
         Info => Fld_13.Info);
   else
         Cast_Result_7 := No_Entity_Call_Expr;
   end if;
--# expr-done 10612
Var_Expr_5 := Cast_Result_7;
if Var_Expr_5 /= No_Entity_Call_Expr then
   --# scope-start
   --# bind ce Var_Expr_5
--# expr-start 10619 '<FieldAccess for check_for_type at nodes.lkt:18319:25>' Fld_18 ada/nodes.lkt:18319
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10618 '<If at nodes.lkt:18320:29>' If_Result_4 ada/nodes.lkt:18320
--# expr-start 10613 '<FieldAccess for check_array_slice at nodes.lkt:18320:32>' Fld_17 ada/nodes.lkt:18320
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.check_array_slice
Fld_17 := Libadalang.Implementation.Call_Expr_P_Check_Array_Slice (Node => Ent.Node, Typ => Var_Expr_1, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 10613
if Fld_17 then
   If_Result_4 := Var_Expr_1;
else
   --# expr-start 10617 '<If at nodes.lkt:18323:33>' If_Result_3 ada/nodes.lkt:18323
--# expr-start 10614 '<FieldAccess for is_iterable_type at nodes.lkt:18323:36>' Fld_16 ada/nodes.lkt:18323
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_iterable_type'
Fld_16 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Iterable_Type (Node => Var_Expr_1.Node, Origin => Bound_Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10614
if Fld_16 then
   --# expr-start 10615 '<FieldAccess for iterable_comp_type at nodes.lkt:18324:38>' Fld_14 ada/nodes.lkt:18324
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.iterable_comp_type'
Fld_14 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Iterable_Comp_Type (Node => Var_Expr_1.Node, Origin => Bound_Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10615
   If_Result_3 := Fld_14;
else
   --# expr-start 10616 '<FieldAccess for comp_type at nodes.lkt:18325:38>' Fld_15 ada/nodes.lkt:18325
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.comp_type
Fld_15 := Libadalang.Implementation.Base_Type_Decl_P_Comp_Type (Node => Var_Expr_1.Node, Is_Subscript => True, Origin => Bound_Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10616
   If_Result_3 := Fld_15;
end if;
--# expr-done 10617
   If_Result_4 := If_Result_3;
end if;
--# expr-done 10618
--# property-call-start CallExpr.check_for_type
Fld_18 := Libadalang.Implementation.Call_Expr_P_Check_For_Type (Node => Var_Expr_5.Node, Typ => If_Result_4, Env => Env, Origin => Bound_Origin, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 10619
Scope_Result_9 := Fld_18;
   --# end
   Result_Var_4 := Scope_Result_9;
else
   Result_Var_4 := True;
end if;
   If_Result_5 := Result_Var_4;
else
   If_Result_5 := False;
end if;
--# expr-done 10620
Scope_Result_10 := If_Result_5;
   --# end
   Result_Var_5 := Scope_Result_10;
else
   Result_Var_5 := False;
end if;
Dyn_Var_Bind_Result := Result_Var_5; 
--# expr-done 10621
Let_Result_5 := Dyn_Var_Bind_Result; 
--# end
--# expr-done 10622
         Property_Result := Let_Result_5;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Call_Expr_P_Check_For_Type;
--# end
   --
   --  Primitives for Bare_Defining_Name
   --
      procedure Initialize_Fields_For_Defining_Name
        (Self : Bare_Defining_Name
         ; Defining_Name_F_Name : Bare_Name
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Defining_Name_F_Name := Defining_Name_F_Name;
      end Initialize_Fields_For_Defining_Name;
   function Defining_Name_F_Name
     (Node : Bare_Defining_Name) return Bare_Name
   is
   begin
         return Node.Defining_Name_F_Name;
   end;
--# property-start DefiningName.parent_scope ada/nodes.lkt:18348
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Parent_Scope
  (Node : Bare_Defining_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1214 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1214 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1214;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10624 '<FieldAccess for parent_scope at nodes.lkt:18348:38>' Fld_1 ada/nodes.lkt:18348
--# expr-start 10623 '<FieldAccess for name at nodes.lkt:18348:38>' Fld ada/nodes.lkt:18348
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Defining_Name_F_Name;
--# expr-done 10623
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.parent_scope'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Parent_Scope (Node => Fld, Env => Env);
--# end
--# expr-done 10624
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1214;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1214;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Parent_Scope;
--# end
--# property-start DefiningName.scope ada/nodes.lkt:18351
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Scope
  (Node : Bare_Defining_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1215 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1215 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1215;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10626 '<FieldAccess for scope at nodes.lkt:18351:31>' Fld_1 ada/nodes.lkt:18351
--# expr-start 10625 '<FieldAccess for name at nodes.lkt:18351:31>' Fld ada/nodes.lkt:18351
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Defining_Name_F_Name;
--# expr-done 10625
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.scope'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Scope (Node => Fld, Env => Env);
--# end
--# expr-done 10626
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1215;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1215;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Scope;
--# end
--# property-start DefiningName.relative_name ada/nodes.lkt:18353
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Relative_Name
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 10628 '<FieldAccess for relative_name at nodes.lkt:18353:41>' Fld_1 ada/nodes.lkt:18353
--# expr-start 10627 '<FieldAccess for name at nodes.lkt:18353:41>' Fld ada/nodes.lkt:18353
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Defining_Name_F_Name, Info => Ent.Info);
--# expr-done 10627
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 10628
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Relative_Name;
--# end
--# property-start DefiningName.ref_var ada/nodes.lkt:18355
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Ref_Var
  (Node : Bare_Defining_Name
  )
   return Logic_Var
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Bare_Name;
Fld_1 : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10630 '<FieldAccess for ref_var at nodes.lkt:18355:31>' Fld_1 ada/nodes.lkt:18355
--# expr-start 10629 '<FieldAccess for name at nodes.lkt:18355:31>' Fld ada/nodes.lkt:18355
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Defining_Name_F_Name;
--# expr-done 10629
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld);
--# end
--# expr-done 10630
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Ref_Var;
--# end
--# property-start DefiningName.env_elements_impl ada/nodes.lkt:18358
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Env_Elements_Impl
  (Node : Bare_Defining_Name
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1218 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1218 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1218;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10632 '<FieldAccess for env_elements_impl at nodes.lkt:18359:9>' Fld_1 ada/nodes.lkt:18359
--# expr-start 10631 '<FieldAccess for name at nodes.lkt:18359:9>' Fld ada/nodes.lkt:18359
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Defining_Name_F_Name, Info => Ent.Info);
--# expr-done 10631
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.env_elements_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Env_Elements_Impl (Node => Fld.Node, Env => Env, E_Info => Fld.Info);
--# end
--# expr-done 10632
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1218;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1218;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Env_Elements_Impl;
--# end
--# property-start DefiningName.formal_decl ada/nodes.lkt:18363
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Formal_Decl
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Decl;
            procedure Finalizer_Scope_1219 with Inline_Always;
      Fld : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Cast_Result : Internal_Entity_Base_Formal_Param_Decl;
            procedure Finalizer_Scope_1219 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1219;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 10636 '<Cast to BaseFormalParamDecl at nodes.lkt:18364:9>' Cast_Result ada/nodes.lkt:18364
--# expr-start 10635 '<Find at nodes.lkt:18364:9>' Find_Result ada/nodes.lkt:18364
   --# expr-start 10633 '<FieldAccess for parents at nodes.lkt:18364:9>' Fld ada/nodes.lkt:18364
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 10633
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
      --# expr-start 10634 '<IsA BaseFormalParamDecl at nodes.lkt:18364:36>' Is_A ada/nodes.lkt:18364
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Base_Formal_Param_Decl; 
--# expr-done 10634
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 10635
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Base_Formal_Param_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Formal_Param_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10636
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_1219;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1219;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Formal_Decl;
--# end
--# property-start DefiningName.fully_qualified_name_impl ada/nodes.lkt:18369
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Fully_Qualified_Name_Impl
  (Node : Bare_Defining_Name
      ; Include_Profile : Boolean
      ; Suffix : String_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind include_profile Include_Profile
   --# bind suffix Suffix
   Property_Result : String_Type_Array_Access;
            procedure Finalizer_Scope_1220 with Inline_Always;
            procedure Finalizer_Scope_3276 with Inline_Always;
            procedure Finalizer_Scope_3277 with Inline_Always;
            procedure Finalizer_Scope_3278 with Inline_Always;
            procedure Finalizer_Scope_3279 with Inline_Always;
            procedure Finalizer_Scope_3280 with Inline_Always;
            procedure Finalizer_Scope_3281 with Inline_Always;
            procedure Finalizer_Scope_3282 with Inline_Always;
            procedure Finalizer_Scope_3283 with Inline_Always;
            procedure Finalizer_Scope_3284 with Inline_Always;
      Local_Def_Name_Array : String_Type_Array_Access;
Match_0 : Bare_Synthetic_Defining_Name;
Match_1 : Bare_Defining_Name;
Local_Bd : Internal_Entity_Basic_Decl;
Local_Self_Name : String_Type_Array_Access;
Local_Parent_Decl : Internal_Entity_Basic_Decl;
Local_Is_Instantiated : Boolean;
Local_Fqn : String_Type_Array_Access;
Var_Expr_3 : String_Type_Array_Access;
Var_Expr_4 : Internal_Entity_Subunit;
Var_Expr_255 : Internal_Entity_Basic_Decl;
Var_Expr : String_Type_Array_Access;
Fld : Symbol_Type;
Fld_1 : String_Type;
Array_Lit : String_Type_Array_Access;
Fld_2 : Bare_Single_Tok_Node_Array_Access;
Fld_3 : String_Type;
Map_Result : String_Type_Array_Access;
Match_Prefix : Bare_Defining_Name;
Cast_Result : Bare_Synthetic_Defining_Name;
Let_Result : String_Type_Array_Access;
Scope_Result : String_Type_Array_Access;
Cast_Result_1 : Bare_Defining_Name;
Let_Result_1 : String_Type_Array_Access;
Scope_Result_1 : String_Type_Array_Access;
Match_Result : String_Type_Array_Access;
Fld_4 : Internal_Entity_Basic_Decl;
Index_2 : Integer;
Fld_5 : String_Type;
Str : String_Type;
If_Result : String_Type;
Concat_Result : String_Type;
Str_1 : String_Type;
Len : Integer;
Arith_Result : Integer;
Is_Equal : Boolean;
If_Result_1 : String_Type;
Concat_Result_1 : String_Type;
Map_Result_1 : String_Type_Array_Access;
Fld_6 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
Is_A_1 : Boolean;
If_Result_2 : Boolean;
Fld_7 : String_Type_Array_Access;
Concat_Result_2 : String_Type_Array_Access;
If_Result_3 : String_Type_Array_Access;
Scope_Result_2 : String_Type_Array_Access;
Result_Var : String_Type_Array_Access;
Scope_Result_3 : String_Type_Array_Access;
Result_Var_1 : String_Type_Array_Access;
Not_Val : Boolean;
Fld_8 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : String_Type_Array_Access;
Fld_9 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Subunit;
Fld_10 : Internal_Entity_Name;
Fld_11 : Bare_Single_Tok_Node_Array_Access;
Scope_Result_4 : Bare_Single_Tok_Node_Array_Access;
Result_Var_2 : Bare_Single_Tok_Node_Array_Access;
Fld_12 : String_Type;
Map_Result_2 : String_Type_Array_Access;
Concat_Result_3 : String_Type_Array_Access;
Scope_Result_5 : String_Type_Array_Access;
Result_Var_3 : String_Type_Array_Access;
Let_Result_2 : String_Type_Array_Access;
Let_Result_3 : String_Type_Array_Access;
Let_Result_4 : String_Type_Array_Access;
Let_Result_5 : String_Type_Array_Access;
Let_Result_6 : String_Type_Array_Access;
Let_Result_7 : String_Type_Array_Access;
            procedure Finalizer_Scope_1220 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Match_Result);
                     Dec_Ref (Local_Def_Name_Array);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_Self_Name);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (Local_Fqn);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Concat_Result_3);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Let_Result_7);
            end Finalizer_Scope_1220;
            procedure Finalizer_Scope_3276 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_3276;
            procedure Finalizer_Scope_3277 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3277;
            procedure Finalizer_Scope_3278 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3278;
            procedure Finalizer_Scope_3279 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Str);
                     Dec_Ref (If_Result);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Str_1);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Concat_Result_1);
            end Finalizer_Scope_3279;
            procedure Finalizer_Scope_3280 is
            begin
                     Dec_Ref (Fld_7);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_3280;
            procedure Finalizer_Scope_3281 is
            begin
                     Dec_Ref (Var_Expr_3);
                     Dec_Ref (Concat_Result_2);
                     Dec_Ref (If_Result_3);
            end Finalizer_Scope_3281;
            procedure Finalizer_Scope_3282 is
            begin
                     Dec_Ref (Fld_11);
            end Finalizer_Scope_3282;
            procedure Finalizer_Scope_3283 is
            begin
                     Dec_Ref (Fld_12);
            end Finalizer_Scope_3283;
            procedure Finalizer_Scope_3284 is
            begin
                     Dec_Ref (Var_Expr);
            end Finalizer_Scope_3284;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10675 '<Let at nodes.lkt:18373:9>' Let_Result_7 ada/nodes.lkt:18373
--# scope-start
--# expr-start 10643 '<Match at nodes.lkt:18373:30>' Match_Result ada/nodes.lkt:18373
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Self; 
case Ada_Defining_Name_Range (Match_Prefix.Kind) is
         when Ada_Synthetic_Defining_Name =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind scel Match_0
--# expr-start 10639 '<ArrayLiteral at nodes.lkt:18374:49>' Array_Lit ada/nodes.lkt:18374
--# expr-start 10638 '<FieldAccess for image at nodes.lkt:18374:50>' Fld_1 ada/nodes.lkt:18374
--# expr-start 10637 '<FieldAccess for name_symbol at nodes.lkt:18374:50>' Fld ada/nodes.lkt:18374
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Match_0);
--# end
--# expr-done 10637
Fld_1 := Libadalang.Implementation.Image (Self => Fld);
--# expr-done 10638
Array_Lit := Create_String_Type_Array (Internal_String_Type_Array'(1 => Fld_1)); 
--# expr-done 10639
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3276;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Defining_Name =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind n Match_1
--# expr-start 10642 '<Map at nodes.lkt:18375:23>' Map_Result ada/nodes.lkt:18375
   --# expr-start 10640 '<FieldAccess for as_single_tok_node_array at nodes.lkt:18375:23>' Fld_2 ada/nodes.lkt:18375
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.as_single_tok_node_array
Fld_2 := Libadalang.Implementation.Name_P_As_Single_Tok_Node_Array (Node => Match_1);
--# end
--# expr-done 10640
      declare
         Map_Result_Vec : String_Type_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Single_Tok_Node_Array_Access := Fld_2;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 10641 '<FieldAccess for text at nodes.lkt:18375:63>' Fld_3 ada/nodes.lkt:18375
      if Item_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Text (Node => Item_0);
--# expr-done 10641
         declare
            Item_To_Append : constant String_Type := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            String_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3278;
         end loop;
      end;
         Map_Result := Create_String_Type_Array
           (Items_Count => Natural (String_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := String_Type_Vectors.Get
              (Map_Result_Vec,
               I + String_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         String_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10642
Let_Result_1 := Map_Result; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3277;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
end case;
--# expr-done 10643
Local_Def_Name_Array := Match_Result; Inc_Ref (Local_Def_Name_Array);
--# bind def_name_array Local_Def_Name_Array
--# expr-start 10674 '<Let at nodes.lkt:18377:9>' Let_Result_6 ada/nodes.lkt:18377
--# scope-start
--# expr-start 10644 '<FieldAccess for basic_decl at nodes.lkt:18377:18>' Fld_4 ada/nodes.lkt:18377
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_4 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10644
Local_Bd := Fld_4; 
--# bind bd Local_Bd
--# expr-start 10673 '<Let at nodes.lkt:18378:9>' Let_Result_5 ada/nodes.lkt:18378
--# scope-start
--# expr-start 10653 '<Map at nodes.lkt:18379:13>' Map_Result_1 ada/nodes.lkt:18379
      declare
         Map_Result_1_Vec : String_Type_Vectors.Vector;
      begin
         Index_2 := 0;
      declare
         Collection : constant String_Type_Array_Access := Local_Def_Name_Array;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_1
               --# bind i Index_2
--# expr-start 10647 '<If at nodes.lkt:18381:22>' If_Result ada/nodes.lkt:18381
if Include_Profile then
   --# expr-start 10645 '<FieldAccess for custom_id_text at nodes.lkt:18381:46>' Fld_5 ada/nodes.lkt:18381
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.custom_id_text'
Fld_5 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Custom_Id_Text (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 10645
   If_Result := Fld_5;
else
   --# expr-start 10646 '<String at nodes.lkt:18381:71>' Str ada/nodes.lkt:18381
Str := Create_String (""); 
--# expr-done 10646
   If_Result := Str;
end if;
      Inc_Ref (If_Result);
--# expr-done 10647
Concat_Result := Concat_String (Item_1, If_Result); 
--# expr-start 10652 '<If at nodes.lkt:18382:20>' If_Result_1 ada/nodes.lkt:18382
--# expr-start 10650 '<Eq at nodes.lkt:18382:23>' Is_Equal ada/nodes.lkt:18382
--# expr-start 10649 '<Arithmetic - at nodes.lkt:18382:28>' Arith_Result ada/nodes.lkt:18382
--# expr-start 10648 '<length at nodes.lkt:18382:28>' Len ada/nodes.lkt:18382
Len := Length (Local_Def_Name_Array); 
--# expr-done 10648
Arith_Result := (Len - 1); 
--# expr-done 10649
Is_Equal := Index_2 = Arith_Result; 
--# expr-done 10650
if Is_Equal then
   If_Result_1 := Suffix;
else
   --# expr-start 10651 '<String at nodes.lkt:18382:73>' Str_1 ada/nodes.lkt:18382
Str_1 := Create_String (""); 
--# expr-done 10651
   If_Result_1 := Str_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 10652
Concat_Result_1 := Concat_String (Concat_Result, If_Result_1); 
         declare
            Item_To_Append : constant String_Type := Concat_Result_1;
         begin
               Inc_Ref (Item_To_Append);
            String_Type_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3279;
               Index_2 := Index_2 + 1;
         end loop;
      end;
         Map_Result_1 := Create_String_Type_Array
           (Items_Count => Natural (String_Type_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := String_Type_Vectors.Get
              (Map_Result_1_Vec,
               I + String_Type_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         String_Type_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 10653
Local_Self_Name := Map_Result_1; Inc_Ref (Local_Self_Name);
--# bind self_name Local_Self_Name
--# expr-start 10672 '<Let at nodes.lkt:18384:9>' Let_Result_4 ada/nodes.lkt:18384
--# scope-start
--# expr-start 10654 '<FieldAccess for parent_basic_decl at nodes.lkt:18384:27>' Fld_6 ada/nodes.lkt:18384
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_6 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 10654
Local_Parent_Decl := Fld_6; 
--# bind parent_decl Local_Parent_Decl
--# expr-start 10671 '<Let at nodes.lkt:18385:9>' Let_Result_3 ada/nodes.lkt:18385
--# scope-start
--# expr-start 10657 '<BooleanBinaryOp And at nodes.lkt:18386:13>' If_Result_2 ada/nodes.lkt:18386
--# expr-start 10655 '<IsA GenericDecl, Body at nodes.lkt:18386:14>' Is_A ada/nodes.lkt:18386
Is_A := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Generic_Decl | Ada_Body_Node; 
--# expr-done 10655
if Is_A then
   --# expr-start 10656 '<IsA GenericInstantiation at nodes.lkt:18386:44>' Is_A_1 ada/nodes.lkt:18386
Is_A_1 := Local_Parent_Decl.Node /= null 
and then Local_Parent_Decl.Node.Kind in Ada_Generic_Instantiation; 
--# expr-done 10656
   If_Result_2 := Is_A_1;
else
   If_Result_2 := False;
end if;
--# expr-done 10657
Local_Is_Instantiated := If_Result_2; 
--# bind is_instantiated Local_Is_Instantiated
--# expr-start 10670 '<Let at nodes.lkt:18387:9>' Let_Result_2 ada/nodes.lkt:18387
--# scope-start
--# expr-start 10663 '<If at nodes.lkt:18388:13>' If_Result_5 ada/nodes.lkt:18388
--# expr-start 10660 '<BooleanBinaryOp And at nodes.lkt:18388:16>' If_Result_4 ada/nodes.lkt:18388
--# expr-start 10658 '<Not at nodes.lkt:18388:16>' Not_Val ada/nodes.lkt:18388
Not_Val := not (Local_Is_Instantiated); 
--# expr-done 10658
if Not_Val then
   --# expr-start 10659 '<FieldAccess for is_compilation_unit_root at nodes.lkt:18388:40>' Fld_8 ada/nodes.lkt:18388
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_compilation_unit_root
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Is_Compilation_Unit_Root (Node => Local_Bd.Node);
--# end
--# expr-done 10659
   If_Result_4 := Fld_8;
else
   If_Result_4 := False;
end if;
--# expr-done 10660
if If_Result_4 then
   If_Result_5 := Local_Self_Name;
else
Var_Expr_255 := Local_Parent_Decl;
if Var_Expr_255 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 10661 '<FieldAccess for fully_qualified_name_string_array at nodes.lkt:18391:17>' Fld_7 ada/nodes.lkt:18391
      if Var_Expr_255.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.fully_qualified_name_string_array
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Fully_Qualified_Name_String_Array (Node => Var_Expr_255.Node, Include_Profile => Include_Profile, E_Info => Var_Expr_255.Info);
--# end
--# expr-done 10661
Var_Expr_3 := Fld_7;
      Inc_Ref (Var_Expr_3);
if Var_Expr_3 /= No_String_Type_Array_Type then
   --# scope-start
   --# bind fqn Var_Expr_3
--# expr-start 10662 '<If at nodes.lkt:18399:21>' If_Result_3 ada/nodes.lkt:18399
if Local_Is_Instantiated then
   If_Result_3 := Var_Expr_3;
else
Concat_Result_2 := Concat (Var_Expr_3, Local_Self_Name); 
   If_Result_3 := Concat_Result_2;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 10662
Scope_Result_2 := If_Result_3;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3281;
   Result_Var := Scope_Result_2;
else
   Result_Var := No_String_Type_Array_Type;
end if;
      Inc_Ref (Result_Var);
Scope_Result_3 := Result_Var;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3280;
   Result_Var_1 := Scope_Result_3;
else
   Result_Var_1 := No_String_Type_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
   If_Result_5 := Result_Var_1;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 10663
Local_Fqn := If_Result_5; Inc_Ref (Local_Fqn);
--# bind fqn Local_Fqn
--# expr-start 10669 '<Map at nodes.lkt:18402:9>' Map_Result_2 ada/nodes.lkt:18402
--# expr-start 10665 '<Cast to Subunit at nodes.lkt:18402:9>' Cast_Result_2 ada/nodes.lkt:18402
--# expr-start 10664 '<parent at nodes.lkt:18402:9>' Fld_9 ada/nodes.lkt:18402
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Parent (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# expr-done 10664
   if Fld_9.Node = null
      or else Fld_9.Node.Kind in Ada_Subunit_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Subunit
        (Node => Fld_9.Node,
         Info => Fld_9.Info);
   else
         Cast_Result_2 := No_Entity_Subunit;
   end if;
--# expr-done 10665
Var_Expr_4 := Cast_Result_2;
if Var_Expr_4 /= No_Entity_Subunit then
   --# scope-start
   --# bind su Var_Expr_4
--# expr-start 10667 '<FieldAccess for as_single_tok_node_array at nodes.lkt:18402:42>' Fld_11 ada/nodes.lkt:18402
--# expr-start 10666 '<FieldAccess for name at nodes.lkt:18402:42>' Fld_10 ada/nodes.lkt:18402
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Name (Node => Var_Expr_4.Node.Subunit_F_Name, Info => Var_Expr_4.Info);
--# expr-done 10666
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.as_single_tok_node_array
Fld_11 := Libadalang.Implementation.Name_P_As_Single_Tok_Node_Array (Node => Fld_10.Node);
--# end
--# expr-done 10667
Scope_Result_4 := Fld_11;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_3282;
   Result_Var_2 := Scope_Result_4;
else
   Result_Var_2 := No_Bare_Single_Tok_Node_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
      declare
         Map_Result_2_Vec : String_Type_Vectors.Vector;
      begin
      declare
         Collection : constant Bare_Single_Tok_Node_Array_Access := Result_Var_2;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_5
      --# expr-start 10668 '<FieldAccess for text at nodes.lkt:18403:21>' Fld_12 ada/nodes.lkt:18403
      if Item_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Text (Node => Item_5);
--# expr-done 10668
         declare
            Item_To_Append : constant String_Type := Fld_12;
         begin
               Inc_Ref (Item_To_Append);
            String_Type_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3283;
         end loop;
      end;
         Map_Result_2 := Create_String_Type_Array
           (Items_Count => Natural (String_Type_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := String_Type_Vectors.Get
              (Map_Result_2_Vec,
               I + String_Type_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         String_Type_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 10669
Concat_Result_3 := Concat (Map_Result_2, Local_Fqn); 
Var_Expr := Concat_Result_3;
      Inc_Ref (Var_Expr);
if Var_Expr /= No_String_Type_Array_Type then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_5 := Var_Expr;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_3284;
   Result_Var_3 := Scope_Result_5;
else
   Result_Var_3 := Local_Fqn;
end if;
      Inc_Ref (Result_Var_3);
Let_Result_2 := Result_Var_3; Inc_Ref (Let_Result_2);
--# end
--# expr-done 10670
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 10671
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 10672
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 10673
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 10674
Let_Result_7 := Let_Result_6; Inc_Ref (Let_Result_7);
--# end
--# expr-done 10675
         Property_Result := Let_Result_7;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1220;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1220;
                     Finalizer_Scope_3276;
                     Finalizer_Scope_3277;
                     Finalizer_Scope_3278;
                     Finalizer_Scope_3279;
                     Finalizer_Scope_3280;
                     Finalizer_Scope_3281;
                     Finalizer_Scope_3282;
                     Finalizer_Scope_3283;
                     Finalizer_Scope_3284;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Fully_Qualified_Name_Impl;
--# end
--# property-start DefiningName.canonical_fully_qualified_name_impl ada/nodes.lkt:18409
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Canonical_Fully_Qualified_Name_Impl
  (Node : Bare_Defining_Name
      ; Include_Profile : Boolean
      ; Suffix : String_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind include_profile Include_Profile
   --# bind suffix Suffix
   Property_Result : String_Type;
            procedure Finalizer_Scope_1221 with Inline_Always;
            procedure Finalizer_Scope_3286 with Inline_Always;
      Str : String_Type;
Fld : String_Type_Array_Access;
Sym : Symbol_Type;
Map_Result : Symbol_Type_Array_Access;
Fld_1 : String_Type;
Map_Result_1 : String_Type_Array_Access;
Join_Result : String_Type;
            procedure Finalizer_Scope_1221 is
            begin
                     Dec_Ref (Str);
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Join_Result);
            end Finalizer_Scope_1221;
            procedure Finalizer_Scope_3286 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3286;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10682 '<Join at nodes.lkt:18413:9>' Join_Result ada/nodes.lkt:18413
--# expr-start 10676 '<String at nodes.lkt:18413:9>' Str ada/nodes.lkt:18413
Str := Create_String ("."); 
--# expr-done 10676
--# expr-start 10681 '<Map at nodes.lkt:18414:13>' Map_Result_1 ada/nodes.lkt:18414
   --# expr-start 10679 '<Map at nodes.lkt:18414:13>' Map_Result ada/nodes.lkt:18414
   --# expr-start 10677 '<FieldAccess for fully_qualified_name_impl at nodes.lkt:18414:13>' Fld ada/nodes.lkt:18414
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.fully_qualified_name_impl
Fld := Libadalang.Implementation.Defining_Name_P_Fully_Qualified_Name_Impl (Node => Ent.Node, Include_Profile => Include_Profile, Suffix => Suffix, E_Info => Ent.Info);
--# end
--# expr-done 10677
      declare
         Map_Result_Vec : Symbol_Type_Vectors.Vector;
      begin
      declare
         Collection : constant String_Type_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 10678 '<to_symbol at nodes.lkt:18419:25>' Sym ada/nodes.lkt:18419
Sym := String_To_Symbol (Self, Self.Unit.Context, Item_0); 
--# expr-done 10678
         declare
            Item_To_Append : constant Symbol_Type := Sym;
         begin
            Symbol_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Symbol_Type_Array
           (Items_Count => Natural (Symbol_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Symbol_Type_Vectors.Get
              (Map_Result_Vec,
               I + Symbol_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Symbol_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10679
      declare
         Map_Result_1_Vec : String_Type_Vectors.Vector;
      begin
      declare
         Collection : constant Symbol_Type_Array_Access := Map_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_1
      --# expr-start 10680 '<FieldAccess for image at nodes.lkt:18420:25>' Fld_1 ada/nodes.lkt:18420
Fld_1 := Libadalang.Implementation.Image (Self => Item_1);
--# expr-done 10680
         declare
            Item_To_Append : constant String_Type := Fld_1;
         begin
               Inc_Ref (Item_To_Append);
            String_Type_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3286;
         end loop;
      end;
         Map_Result_1 := Create_String_Type_Array
           (Items_Count => Natural (String_Type_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := String_Type_Vectors.Get
              (Map_Result_1_Vec,
               I + String_Type_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         String_Type_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 10681
Join_Result := Join_Strings (Str, Map_Result_1); 
--# expr-done 10682
         Property_Result := Join_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1221;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1221;
                     Finalizer_Scope_3286;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Canonical_Fully_Qualified_Name_Impl;
--# end
--# property-start DefiningName.unique_identifying_name_impl ada/nodes.lkt:18424
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Unique_Identifying_Name_Impl
  (Node : Bare_Defining_Name
      ; Suffix : String_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind suffix Suffix
   Property_Result : String_Type;
            procedure Finalizer_Scope_1222 with Inline_Always;
            procedure Finalizer_Scope_3287 with Inline_Always;
            procedure Finalizer_Scope_3288 with Inline_Always;
      Match_0 : Internal_Entity_Anonymous_Type_Decl;
Match_1 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : String_Type;
Fld_2 : String_Type;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Anonymous_Type_Decl;
Let_Result : String_Type;
Scope_Result : String_Type;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Let_Result_1 : String_Type;
Scope_Result_1 : String_Type;
Match_Result : String_Type;
            procedure Finalizer_Scope_1222 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_1222;
            procedure Finalizer_Scope_3287 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3287;
            procedure Finalizer_Scope_3288 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_3288;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10686 '<Match at nodes.lkt:18424:64>' Match_Result ada/nodes.lkt:18424
--# expr-start 10683 '<FieldAccess for basic_decl at nodes.lkt:18425:9>' Fld ada/nodes.lkt:18425
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10683
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Type_Decl .. Ada_Synth_Anonymous_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Anonymous_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind atd Match_0
--# expr-start 10684 '<FieldAccess for custom_id_text at nodes.lkt:18427:40>' Fld_1 ada/nodes.lkt:18427
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.custom_id_text'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Custom_Id_Text (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 10684
Let_Result := Fld_1; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3287;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Abstract_State_Decl .. Ada_Single_Task_Type_Decl | Ada_Concrete_Type_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind _ Match_1
--# expr-start 10685 '<FieldAccess for canonical_fully_qualified_name_impl at nodes.lkt:18429:13>' Fld_2 ada/nodes.lkt:18429
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.canonical_fully_qualified_name_impl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Canonical_Fully_Qualified_Name_Impl (Node => Ent.Node, Include_Profile => True, Suffix => Suffix, E_Info => Ent.Info);
--# end
--# expr-done 10685
Let_Result_1 := Fld_2; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3288;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
end case;
--# expr-done 10686
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1222;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1222;
                     Finalizer_Scope_3287;
                     Finalizer_Scope_3288;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Unique_Identifying_Name_Impl;
--# end
--# property-start DefiningName.canonical_fully_qualified_name ada/nodes.lkt:18438
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Canonical_Fully_Qualified_Name
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_1223 with Inline_Always;
      Str : String_Type;
Fld : String_Type;
            procedure Finalizer_Scope_1223 is
            begin
                     Dec_Ref (Str);
                     Dec_Ref (Fld);
            end Finalizer_Scope_1223;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10688 '<FieldAccess for canonical_fully_qualified_name_impl at nodes.lkt:18439:9>' Fld ada/nodes.lkt:18439
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10687 '<String at nodes.lkt:18441:20>' Str ada/nodes.lkt:18441
Str := Create_String (""); 
--# expr-done 10687
--# property-call-start DefiningName.canonical_fully_qualified_name_impl
Fld := Libadalang.Implementation.Defining_Name_P_Canonical_Fully_Qualified_Name_Impl (Node => Ent.Node, Include_Profile => False, Suffix => Str, E_Info => Ent.Info);
--# end
--# expr-done 10688
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1223;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1223;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Canonical_Fully_Qualified_Name;
--# end
--# property-start DefiningName.unique_identifying_name ada/nodes.lkt:18453
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Unique_Identifying_Name
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_1224 with Inline_Always;
      Str : String_Type;
Fld : String_Type;
            procedure Finalizer_Scope_1224 is
            begin
                     Dec_Ref (Str);
                     Dec_Ref (Fld);
            end Finalizer_Scope_1224;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10690 '<FieldAccess for unique_identifying_name_impl at nodes.lkt:18454:9>' Fld ada/nodes.lkt:18454
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10689 '<String at nodes.lkt:18454:50>' Str ada/nodes.lkt:18454
Str := Create_String (""); 
--# expr-done 10689
--# property-call-start DefiningName.unique_identifying_name_impl
Fld := Libadalang.Implementation.Defining_Name_P_Unique_Identifying_Name_Impl (Node => Ent.Node, Suffix => Str, E_Info => Ent.Info);
--# end
--# expr-done 10690
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1224;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1224;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Unique_Identifying_Name;
--# end
--# property-start DefiningName.fully_qualified_name_array ada/nodes.lkt:18459
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Fully_Qualified_Name_Array
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1225 with Inline_Always;
      Str : String_Type;
Fld : String_Type_Array_Access;
Sym : Symbol_Type;
Map_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1225 is
            begin
                     Dec_Ref (Str);
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1225;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10694 '<Map at nodes.lkt:18460:9>' Map_Result ada/nodes.lkt:18460
   --# expr-start 10692 '<FieldAccess for fully_qualified_name_impl at nodes.lkt:18460:9>' Fld ada/nodes.lkt:18460
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10691 '<String at nodes.lkt:18460:70>' Str ada/nodes.lkt:18460
Str := Create_String (""); 
--# expr-done 10691
--# property-call-start DefiningName.fully_qualified_name_impl
Fld := Libadalang.Implementation.Defining_Name_P_Fully_Qualified_Name_Impl (Node => Ent.Node, Include_Profile => False, Suffix => Str, E_Info => Ent.Info);
--# end
--# expr-done 10692
      declare
         Map_Result_Vec : Symbol_Type_Vectors.Vector;
      begin
      declare
         Collection : constant String_Type_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 10693 '<to_symbol at nodes.lkt:18461:20>' Sym ada/nodes.lkt:18461
Sym := String_To_Symbol (Self, Self.Unit.Context, Item_0); 
--# expr-done 10693
         declare
            Item_To_Append : constant Symbol_Type := Sym;
         begin
            Symbol_Type_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Symbol_Type_Array
           (Items_Count => Natural (Symbol_Type_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Symbol_Type_Vectors.Get
              (Map_Result_Vec,
               I + Symbol_Type_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Symbol_Type_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10694
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1225;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1225;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Fully_Qualified_Name_Array;
--# end
--# property-start DefiningName.fully_qualified_name ada/nodes.lkt:18466
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Fully_Qualified_Name
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_1226 with Inline_Always;
      Str : String_Type;
Str_1 : String_Type;
Fld : String_Type_Array_Access;
Join_Result : String_Type;
            procedure Finalizer_Scope_1226 is
            begin
                     Dec_Ref (Str);
                     Dec_Ref (Str_1);
                     Dec_Ref (Fld);
                     Dec_Ref (Join_Result);
            end Finalizer_Scope_1226;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10698 '<Join at nodes.lkt:18467:9>' Join_Result ada/nodes.lkt:18467
--# expr-start 10695 '<String at nodes.lkt:18467:9>' Str ada/nodes.lkt:18467
Str := Create_String ("."); 
--# expr-done 10695
--# expr-start 10697 '<FieldAccess for fully_qualified_name_impl at nodes.lkt:18468:13>' Fld ada/nodes.lkt:18468
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10696 '<String at nodes.lkt:18468:74>' Str_1 ada/nodes.lkt:18468
Str_1 := Create_String (""); 
--# expr-done 10696
--# property-call-start DefiningName.fully_qualified_name_impl
Fld := Libadalang.Implementation.Defining_Name_P_Fully_Qualified_Name_Impl (Node => Ent.Node, Include_Profile => False, Suffix => Str_1, E_Info => Ent.Info);
--# end
--# expr-done 10697
Join_Result := Join_Strings (Str, Fld); 
--# expr-done 10698
         Property_Result := Join_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1226;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1226;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Fully_Qualified_Name;
--# end
--# property-start DefiningName.all_env_els_impl ada/nodes.lkt:18472
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_All_Env_Els_Impl
  (Node : Bare_Defining_Name
      ; Seq : Boolean
         := True
      ; Seq_From : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Categories : Ref_Categories
         := (Inherited_Primitives => True, Nocat => True)
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind seq Seq
   --# bind seq_from Seq_From
   --# bind categories Categories
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1227 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1227 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1227;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10700 '<FieldAccess for all_env_els_impl at nodes.lkt:18477:9>' Fld_1 ada/nodes.lkt:18477
--# expr-start 10699 '<FieldAccess for name at nodes.lkt:18477:9>' Fld ada/nodes.lkt:18477
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Defining_Name_F_Name, Info => Ent.Info);
--# expr-done 10699
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.all_env_els_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_All_Env_Els_Impl (Node => Fld.Node, Seq => Seq, Seq_From => Seq_From, Categories => Categories, Env => Env, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 10700
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1227;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1227;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_All_Env_Els_Impl;
--# end
--# property-start DefiningName.basic_decl ada/nodes.lkt:18482
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Basic_Decl
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Is_A : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 10701 '<FieldAccess for basic_decl_internal at nodes.lkt:18483:9>' Fld ada/nodes.lkt:18483
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl_internal
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl_Internal (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10701
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind bd Var_Expr_0
--# expr-start 10705 '<If at nodes.lkt:18485:13>' If_Result ada/nodes.lkt:18485
--# expr-start 10702 '<IsA GenericPackageInternal, GenericSubpInternal, SingleTaskTypeDecl at nodes.lkt:18486:17>' Is_A ada/nodes.lkt:18486
Is_A := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Generic_Package_Internal_Range | Ada_Generic_Subp_Internal_Range | Ada_Single_Task_Type_Decl_Range; 
--# expr-done 10702
if Is_A then
   --# expr-start 10704 '<Cast to BasicDecl at nodes.lkt:18489:18>' Cast_Result ada/nodes.lkt:18489
--# expr-start 10703 '<parent at nodes.lkt:18489:18>' Fld_1 ada/nodes.lkt:18489
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 10703
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10704
   If_Result := Cast_Result;
else
   If_Result := Var_Expr_0;
end if;
--# expr-done 10705
Scope_Result := If_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Basic_Decl;
--# end
--# property-start DefiningName.basic_decl_internal ada/nodes.lkt:18496
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Basic_Decl_Internal
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_1229 with Inline_Always;
      Fld : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_1229 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1229;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Defining_Name_Defining_Name_P_Basic_Decl_Internal,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Defining_Name,
                                As_Bare_Defining_Name => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Basic_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 10709 '<Cast to BasicDecl at nodes.lkt:18497:9>' Cast_Result ada/nodes.lkt:18497
--# expr-start 10708 '<Find at nodes.lkt:18497:9>' Find_Result ada/nodes.lkt:18497
   --# expr-start 10706 '<FieldAccess for parents at nodes.lkt:18497:9>' Fld ada/nodes.lkt:18497
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 10706
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 10707 '<IsA BasicDecl at nodes.lkt:18497:36>' Is_A ada/nodes.lkt:18497
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Basic_Decl; 
--# expr-done 10707
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 10708
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10709
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_1229;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1229;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Basic_Decl,
                        As_Internal_Entity_Basic_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Defining_Name_P_Basic_Decl_Internal;
--# end
--# property-start DefiningName.find_refs ada/nodes.lkt:18503
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Find_Refs
  (Node : Bare_Defining_Name
      ; Root : Internal_Entity
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Ref_Result_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind root Root
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Ref_Result_Array_Access;
            procedure Finalizer_Scope_1230 with Inline_Always;
      Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Ref_Result_Array_Access;
            procedure Finalizer_Scope_1230 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1230;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10711 '<FieldAccess for find_refs_impl at nodes.lkt:18504:9>' Fld_1 ada/nodes.lkt:18504
--# expr-start 10710 '<FieldAccess for canonical_part at nodes.lkt:18504:9>' Fld ada/nodes.lkt:18504
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.canonical_part
Fld := Libadalang.Implementation.Defining_Name_P_Canonical_Part (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10710
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.find_refs_impl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Find_Refs_Impl (Node => Fld.Node, Root => Root, Skip_Name => Self, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 10711
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1230;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1230;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Find_Refs;
--# end
--# property-start DefiningName.find_refs_impl ada/nodes.lkt:18511
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Find_Refs_Impl
  (Node : Bare_Defining_Name
      ; Root : Internal_Entity
      ; Skip_Name : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Ref_Result_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind root Root
   --# bind skip_name Skip_Name
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Ref_Result_Array_Access;
            procedure Finalizer_Scope_1231 with Inline_Always;
            procedure Finalizer_Scope_3292 with Inline_Always;
            procedure Finalizer_Scope_3294 with Inline_Always;
            procedure Finalizer_Scope_3295 with Inline_Always;
            procedure Finalizer_Scope_3296 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Array_Access;
Var_Expr_3 : Internal_Entity_Base_Id;
Var_Expr_4 : Ref_Result_Kind;
Fld : Internal_Entity_Array_Access;
Is_Null : Boolean;
Fld_1 : Bare_Ada_Node;
Cast_Expr : Bare_Defining_Name;
Cast_Result : Bare_Ada_Node;
Is_Equal : Boolean;
If_Result : Boolean;
Not_Val : Boolean;
Map_Result : Internal_Entity_Array_Access;
Fld_2 : Internal_Ref_Result_Array_Access;
Map_Result_1 : Internal_Ref_Result_Array_Access;
Scope_Result : Internal_Ref_Result_Array_Access;
Result_Var : Internal_Ref_Result_Array_Access;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Id;
Fld_3 : Ref_Result_Kind;
New_Struct : Internal_Ref_Result;
Array_Lit : Internal_Ref_Result_Array_Access;
Is_Equal_1 : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Internal_Ref_Result_Array_Access;
Scope_Result_1 : Internal_Ref_Result_Array_Access;
Result_Var_1 : Internal_Ref_Result_Array_Access;
Scope_Result_2 : Internal_Ref_Result_Array_Access;
Result_Var_2 : Internal_Ref_Result_Array_Access;
Concat_Result : Internal_Ref_Result_Array_Access;
            procedure Finalizer_Scope_1231 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_1231;
            procedure Finalizer_Scope_3292 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_3292;
            procedure Finalizer_Scope_3294 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_3294;
            procedure Finalizer_Scope_3295 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_3295;
            procedure Finalizer_Scope_3296 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (If_Result_2);
            end Finalizer_Scope_3296;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 10712 '<children at nodes.lkt:18516:9>' Fld ada/nodes.lkt:18516
      if Root.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children (Node => Root.Node, E_Info => Root.Info);
--# expr-done 10712
Var_Expr_0 := Fld;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= No_Internal_Entity_Array_Type then
   --# scope-start
   --# bind c Var_Expr_0
--# expr-start 10720 '<Mapcat at nodes.lkt:18518:13>' Map_Result_1 ada/nodes.lkt:18518
   --# expr-start 10718 '<Map at nodes.lkt:18518:13>' Map_Result ada/nodes.lkt:18518
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Var_Expr_0;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_1
         --# expr-start 10717 '<Not at nodes.lkt:18518:29>' Not_Val ada/nodes.lkt:18518
--# expr-start 10716 '<BooleanBinaryOp Or at nodes.lkt:18518:34>' If_Result ada/nodes.lkt:18518
--# expr-start 10713 '<IsNull at nodes.lkt:18518:34>' Is_Null ada/nodes.lkt:18518
Is_Null := Item_1.Node = null; 
--# expr-done 10713
if Is_Null then
   If_Result := True;
else
   --# expr-start 10715 '<Eq at nodes.lkt:18518:47>' Is_Equal ada/nodes.lkt:18518
--# expr-start 10714 '<FieldAccess for node at nodes.lkt:18518:47>' Fld_1 ada/nodes.lkt:18518
Fld_1 := Item_1.Node;
--# expr-done 10714
Cast_Expr := Skip_Name; 
      Cast_Result := Cast_Expr;
Is_Equal := Fld_1 = Cast_Result; 
--# expr-done 10715
   If_Result := Is_Equal;
end if;
--# expr-done 10716
Not_Val := not (If_Result); 
--# expr-done 10717
         if Not_Val then
         declare
            Item_To_Append : constant Internal_Entity := Item_1;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10718
      declare
         Map_Result_1_Vec : Internal_Ref_Result_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_2
      --# expr-start 10719 '<FieldAccess for find_refs_impl at nodes.lkt:18519:24>' Fld_2 ada/nodes.lkt:18519
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.find_refs_impl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Find_Refs_Impl (Node => Ent.Node, Root => Item_2, Skip_Name => Skip_Name, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10719
         for Item_To_Append of
               Fld_2.Items
         loop
            Internal_Ref_Result_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_3294;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Ref_Result_Array
           (Items_Count => Natural (Internal_Ref_Result_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Ref_Result_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Ref_Result_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Ref_Result_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 10720
Scope_Result := Map_Result_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3292;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Ref_Result_Array_Type;
end if;
      Inc_Ref (Result_Var);
--# expr-start 10721 '<Cast to BaseId at nodes.lkt:18522:11>' Cast_Result_1 ada/nodes.lkt:18522
Cast_Expr_1 := Root; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Base_Id
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Id
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Base_Id;
   end if;
--# expr-done 10721
Var_Expr_3 := Cast_Result_1;
if Var_Expr_3 /= No_Entity_Base_Id then
   --# scope-start
   --# bind id Var_Expr_3
--# expr-start 10722 '<FieldAccess for is_referenced_by at nodes.lkt:18524:13>' Fld_3 ada/nodes.lkt:18524
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.is_referenced_by
Fld_3 := Libadalang.Implementation.Defining_Name_P_Is_Referenced_By (Node => Ent.Node, Id => Var_Expr_3, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10722
Var_Expr_4 := Fld_3;
if Var_Expr_4 /= No_Ref then
   --# scope-start
   --# bind ref_kind Var_Expr_4
--# expr-start 10725 '<If at nodes.lkt:18526:17>' If_Result_2 ada/nodes.lkt:18526
Is_Equal_2 := Var_Expr_4 = Precise; 
if Is_Equal_2 then
   If_Result_1 := True;
else
Is_Equal_1 := Var_Expr_4 = Imprecise; 
   If_Result_1 := Is_Equal_1;
end if;
if If_Result_1 then
   --# expr-start 10724 '<ArrayLiteral at nodes.lkt:18527:22>' Array_Lit ada/nodes.lkt:18527
--# expr-start 10723 '<New RefResult at nodes.lkt:18527:23>' New_Struct ada/nodes.lkt:18527
New_Struct := (Kind => Var_Expr_4, Ref => Var_Expr_3); 
--# expr-done 10723
Array_Lit := Create_Internal_Ref_Result_Array (Internal_Internal_Ref_Result_Array'(1 => New_Struct)); 
--# expr-done 10724
   If_Result_2 := Array_Lit;
else
   If_Result_2 := No_Internal_Ref_Result_Array_Type;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 10725
Scope_Result_1 := If_Result_2;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3296;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Ref_Result_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
Scope_Result_2 := Result_Var_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3295;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Internal_Ref_Result_Array_Type;
end if;
      Inc_Ref (Result_Var_2);
Concat_Result := Concat (Result_Var, Result_Var_2); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1231;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1231;
                     Finalizer_Scope_3292;
                     Finalizer_Scope_3294;
                     Finalizer_Scope_3295;
                     Finalizer_Scope_3296;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Find_Refs_Impl;
--# end
--# property-start DefiningName.is_referenced_by ada/nodes.lkt:18542
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Is_Referenced_By
  (Node : Bare_Defining_Name
      ; Id : Internal_Entity_Base_Id
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Ref_Result_Kind
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind id Id
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Ref_Result_Kind;
            procedure Finalizer_Scope_3297 with Inline_Always;
            procedure Finalizer_Scope_3300 with Inline_Always;
      Var_Expr_0 : Internal_Refd_Def;
Local_Canon : Bare_Defining_Name;
Var_Expr_1 : Internal_Entity_Basic_Decl_Array_Access;
Var_Expr_256 : Internal_Entity_Defining_Name;
Var_Expr_257 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
New_Struct : Internal_Refd_Def;
Fld_1 : Internal_Refd_Def;
Fld_2 : Boolean;
If_Result : Internal_Refd_Def;
Fld_3 : Internal_Entity_Defining_Name;
Fld_4 : Internal_Entity_Defining_Name;
Fld_5 : Bare_Defining_Name;
Scope_Result : Bare_Defining_Name;
Result_Var : Bare_Defining_Name;
Scope_Result_1 : Bare_Defining_Name;
Result_Var_1 : Bare_Defining_Name;
Fld_6 : Ref_Result_Kind;
Cast_Expr : Bare_Defining_Name;
Cast_Result : Bare_Defining_Name;
Is_Equal : Boolean;
Fld_7 : Internal_Entity_Basic_Decl;
Fld_8 : Internal_Entity_Basic_Decl_Array_Access;
Fld_9 : Internal_Entity_Defining_Name;
Fld_10 : Bare_Defining_Name;
Cast_Result_1 : Bare_Defining_Name;
Is_Equal_1 : Boolean;
Quantifier_Result : Boolean;
Fld_11 : Boolean;
If_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Ref_Result_Kind;
Let_Result : Ref_Result_Kind;
Scope_Result_3 : Ref_Result_Kind;
Result_Var_3 : Ref_Result_Kind;
Fld_12 : Symbol_Type;
Fld_13 : Boolean;
If_Result_4 : Ref_Result_Kind;
            procedure Finalizer_Scope_3297 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_3297;
            procedure Finalizer_Scope_3300 is
            begin
                     Dec_Ref (Var_Expr_1);
            end Finalizer_Scope_3300;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10749 '<If at nodes.lkt:18543:9>' If_Result_4 ada/nodes.lkt:18543
--# expr-start 10727 '<FieldAccess for name_is at nodes.lkt:18543:12>' Fld_13 ada/nodes.lkt:18543
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10726 '<FieldAccess for name_symbol at nodes.lkt:18543:25>' Fld_12 ada/nodes.lkt:18543
      if Id.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_12 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Id.Node);
--# end
--# expr-done 10726
--# property-call-start Name.name_is
Fld_13 := Libadalang.Implementation.Name_P_Name_Is (Node => Self, Sym => Fld_12);
--# end
--# expr-done 10727
if Fld_13 then
--# expr-start 10732 '<If at nodes.lkt:18545:17>' If_Result ada/nodes.lkt:18545
--# expr-start 10728 '<FieldAccess for is_defining at nodes.lkt:18545:20>' Fld_2 ada/nodes.lkt:18545
      if Id.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_defining
Fld_2 := Libadalang.Implementation.Name_P_Is_Defining (Node => Id.Node);
--# end
--# expr-done 10728
if Fld_2 then
   --# expr-start 10730 '<New RefdDef at nodes.lkt:18547:21>' New_Struct ada/nodes.lkt:18547
--# expr-start 10729 '<FieldAccess for enclosing_defining_name at nodes.lkt:18548:34>' Fld ada/nodes.lkt:18548
      if Id.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.enclosing_defining_name
Fld := Libadalang.Implementation.Name_P_Enclosing_Defining_Name (Node => Id.Node, E_Info => Id.Info);
--# end
--# expr-done 10729
New_Struct := (Def_Name => Fld, Kind => Precise); 
--# expr-done 10730
   If_Result := New_Struct;
else
   --# expr-start 10731 '<FieldAccess for failsafe_referenced_def_name at nodes.lkt:18551:22>' Fld_1 ada/nodes.lkt:18551
      if Id.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.failsafe_referenced_def_name
Fld_1 := Libadalang.Implementation.Name_P_Failsafe_Referenced_Def_Name (Node => Id.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Id.Info);
--# end
--# expr-done 10731
   If_Result := Fld_1;
end if;
--# expr-done 10732
Var_Expr_0 := If_Result;
if Var_Expr_0 /= No_Refd_Def then
   --# scope-start
   --# bind def_res Var_Expr_0
--# expr-start 10748 '<Let at nodes.lkt:18553:17>' Let_Result ada/nodes.lkt:18553
--# scope-start
--# expr-start 10733 '<FieldAccess for def_name at nodes.lkt:18553:29>' Fld_3 ada/nodes.lkt:18553
Fld_3 := Var_Expr_0.Def_Name;
--# expr-done 10733
Var_Expr_256 := Fld_3;
if Var_Expr_256 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 10734 '<FieldAccess for canonical_part at nodes.lkt:18553:29>' Fld_4 ada/nodes.lkt:18553
      if Var_Expr_256.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.canonical_part
Fld_4 := Libadalang.Implementation.Defining_Name_P_Canonical_Part (Node => Var_Expr_256.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_256.Info);
--# end
--# expr-done 10734
Var_Expr_257 := Fld_4;
if Var_Expr_257 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 10735 '<FieldAccess for node at nodes.lkt:18553:29>' Fld_5 ada/nodes.lkt:18553
Fld_5 := Var_Expr_257.Node;
--# expr-done 10735
Scope_Result := Fld_5;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Bare_Ada_Node;
end if;
Local_Canon := Result_Var_1; 
--# bind canon Local_Canon
--# expr-start 10747 '<If at nodes.lkt:18555:17>' If_Result_3 ada/nodes.lkt:18555
--# expr-start 10745 '<BooleanBinaryOp Or at nodes.lkt:18557:21>' If_Result_2 ada/nodes.lkt:18557
--# expr-start 10736 '<Eq at nodes.lkt:18557:21>' Is_Equal ada/nodes.lkt:18557
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Is_Equal := Cast_Result = Local_Canon; 
--# expr-done 10736
if Is_Equal then
   If_Result_2 := True;
else
--# expr-start 10738 '<FieldAccess for base_subp_declarations at nodes.lkt:18561:24>' Fld_8 ada/nodes.lkt:18561
--# expr-start 10737 '<FieldAccess for basic_decl at nodes.lkt:18561:24>' Fld_7 ada/nodes.lkt:18561
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_7 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10737
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.base_subp_declarations
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Base_Subp_Declarations (Node => Fld_7.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_7.Info);
--# end
--# expr-done 10738
Var_Expr_1 := Fld_8;
      Inc_Ref (Var_Expr_1);
if Var_Expr_1 /= No_Internal_Entity_Basic_Decl_Array_Type then
   --# scope-start
   --# bind decls Var_Expr_1
--# expr-start 10744 '<BooleanBinaryOp And at nodes.lkt:18563:25>' If_Result_1 ada/nodes.lkt:18563
--# expr-start 10742 '<AnyQuantifier at nodes.lkt:18563:25>' Quantifier_Result ada/nodes.lkt:18563
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Var_Expr_1;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind d Item_2
      --# expr-start 10741 '<Eq at nodes.lkt:18564:36>' Is_Equal_1 ada/nodes.lkt:18564
--# expr-start 10740 '<FieldAccess for node at nodes.lkt:18564:36>' Fld_10 ada/nodes.lkt:18564
--# expr-start 10739 '<FieldAccess for defining_name at nodes.lkt:18564:36>' Fld_9 ada/nodes.lkt:18564
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_9 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Item_2.Node, E_Info => Item_2.Info);
--# end
--# expr-done 10739
Fld_10 := Fld_9.Node;
--# expr-done 10740
      Cast_Result_1 := Fld_10;
Is_Equal_1 := Cast_Result_1 = Local_Canon; 
--# expr-done 10741
      Quantifier_Result := Is_Equal_1;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 10742
if Quantifier_Result then
   --# expr-start 10743 '<FieldAccess for is_dispatching_call at nodes.lkt:18566:29>' Fld_11 ada/nodes.lkt:18566
      if Id.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.is_dispatching_call'
Fld_11 := Libadalang.Implementation.Dispatcher_Expr_P_Is_Dispatching_Call (Node => Id.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Id.Info);
--# end
--# expr-done 10743
   If_Result_1 := Fld_11;
else
   If_Result_1 := False;
end if;
--# expr-done 10744
Scope_Result_2 := If_Result_1;
   --# end
      Finalizer_Scope_3300;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_2 := Result_Var_2;
end if;
--# expr-done 10745
if If_Result_2 then
   --# expr-start 10746 '<FieldAccess for kind at nodes.lkt:18568:22>' Fld_6 ada/nodes.lkt:18568
Fld_6 := Var_Expr_0.Kind;
--# expr-done 10746
   If_Result_3 := Fld_6;
else
   If_Result_3 := No_Ref;
end if;
--# expr-done 10747
Let_Result := If_Result_3; 
--# end
--# expr-done 10748
Scope_Result_3 := Let_Result;
   --# end
      Finalizer_Scope_3297;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Ref;
end if;
   If_Result_4 := Result_Var_3;
else
   If_Result_4 := No_Ref;
end if;
--# expr-done 10749
         Property_Result := If_Result_4;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3297;
                     Finalizer_Scope_3300;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Is_Referenced_By;
--# end
--# property-start DefiningName.find_all_references ada/nodes.lkt:18581
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Find_All_References
  (Node : Bare_Defining_Name
      ; Units : Internal_Unit_Array_Access
      ; Follow_Renamings : Boolean
         := False
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Ref_Result_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind units Units
   --# bind follow_renamings Follow_Renamings
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Ref_Result_Array_Access;
            procedure Finalizer_Scope_1233 with Inline_Always;
            procedure Finalizer_Scope_3302 with Inline_Always;
            procedure Finalizer_Scope_3303 with Inline_Always;
            procedure Finalizer_Scope_3304 with Inline_Always;
            procedure Finalizer_Scope_3305 with Inline_Always;
            procedure Finalizer_Scope_3306 with Inline_Always;
            procedure Finalizer_Scope_3309 with Inline_Always;
            procedure Finalizer_Scope_3311 with Inline_Always;
      Local_Dn : Internal_Entity_Defining_Name;
Local_Bases : Internal_Entity_Basic_Decl_Array_Access;
Local_All_Units : Internal_Unit_Array_Access;
Local_Refs : Internal_Ref_Result_Array_Access;
Var_Expr_2 : Bare_Ada_Node;
Var_Expr_5 : Internal_Entity_Renaming_Clause;
Var_Expr_8 : Internal_Entity_Basic_Decl;
Var_Expr : Internal_Entity_Basic_Decl_Array_Access;
Fld : Internal_Entity_Defining_Name;
Cast_Expr : Bare_Defining_Name;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result : Internal_Entity_Basic_Decl_Array_Access;
Fld_3 : Internal_Entity_Basic_Decl;
Array_Lit : Internal_Entity_Basic_Decl_Array_Access;
Result_Var : Internal_Entity_Basic_Decl_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl_Array_Access;
Fld_4 : Internal_Unit_Array_Access;
Map_Result : Internal_Unit_Array_Access;
Unique_Array : Internal_Unit_Array_Access;
Fld_5 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Fld_6 : Internal_Ref_Result_Array_Access;
Scope_Result_1 : Internal_Ref_Result_Array_Access;
Result_Var_1 : Internal_Ref_Result_Array_Access;
Map_Result_1 : Internal_Ref_Result_Array_Access;
Fld_7 : Internal_Entity_Base_Id;
Fld_8 : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity_Renaming_Clause;
Fld_9 : Internal_Entity_Name;
Fld_10 : Internal_Entity_Defining_Name;
Fld_11 : Internal_Entity_Defining_Name;
Fld_12 : Bare_Defining_Name;
Fld_13 : Bare_Defining_Name;
Cast_Result_2 : Bare_Defining_Name;
Is_Equal : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Map_Result_2 : Internal_Ref_Result_Array_Access;
Fld_14 : Internal_Entity_Base_Id;
Fld_15 : Internal_Entity_Array_Access;
Is_A_1 : Boolean;
Find_Result_1 : Internal_Entity;
Fld_16 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Fld_17 : Internal_Entity_Defining_Name;
Fld_18 : Internal_Ref_Result_Array_Access;
Scope_Result_3 : Internal_Ref_Result_Array_Access;
Result_Var_3 : Internal_Ref_Result_Array_Access;
Map_Result_3 : Internal_Ref_Result_Array_Access;
Concat_Result : Internal_Ref_Result_Array_Access;
If_Result_1 : Internal_Ref_Result_Array_Access;
Let_Result : Internal_Ref_Result_Array_Access;
Let_Result_1 : Internal_Ref_Result_Array_Access;
Let_Result_2 : Internal_Ref_Result_Array_Access;
Let_Result_3 : Internal_Ref_Result_Array_Access;
            procedure Finalizer_Scope_1233 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Local_Bases);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Local_All_Units);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_Refs);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_1233;
            procedure Finalizer_Scope_3302 is
            begin
                     Dec_Ref (Var_Expr);
            end Finalizer_Scope_3302;
            procedure Finalizer_Scope_3303 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3303;
            procedure Finalizer_Scope_3304 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_3304;
            procedure Finalizer_Scope_3305 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_3305;
            procedure Finalizer_Scope_3306 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_3306;
            procedure Finalizer_Scope_3309 is
            begin
                     Dec_Ref (Fld_15);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
            end Finalizer_Scope_3309;
            procedure Finalizer_Scope_3311 is
            begin
                     Dec_Ref (Fld_18);
            end Finalizer_Scope_3311;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10788 '<Let at nodes.lkt:18585:9>' Let_Result_3 ada/nodes.lkt:18585
--# scope-start
--# expr-start 10750 '<FieldAccess for canonical_part at nodes.lkt:18585:18>' Fld ada/nodes.lkt:18585
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.canonical_part
Fld := Libadalang.Implementation.Defining_Name_P_Canonical_Part (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10750
Local_Dn := Fld; 
--# bind dn Local_Dn
--# expr-start 10787 '<Let at nodes.lkt:18594:9>' Let_Result_2 ada/nodes.lkt:18594
--# scope-start
--# expr-start 10755 '<bind at nodes.lkt:18595:13>' Dyn_Var_Bind_Result ada/nodes.lkt:18595
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 10752 '<FieldAccess for root_subp_declarations at nodes.lkt:18597:13>' Fld_2 ada/nodes.lkt:18597
--# expr-start 10751 '<FieldAccess for basic_decl at nodes.lkt:18597:13>' Fld_1 ada/nodes.lkt:18597
      if Local_Dn.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Local_Dn.Node, E_Info => Local_Dn.Info);
--# end
--# expr-done 10751
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.root_subp_declarations
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Root_Subp_Declarations (Node => Fld_1.Node, Origin => Bound_Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_1.Info);
--# end
--# expr-done 10752
Var_Expr := Fld_2;
      Inc_Ref (Var_Expr);
if Var_Expr /= No_Internal_Entity_Basic_Decl_Array_Type then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3302;
   Result_Var := Scope_Result;
else
   --# expr-start 10754 '<ArrayLiteral at nodes.lkt:18597:58>' Array_Lit ada/nodes.lkt:18597
--# expr-start 10753 '<FieldAccess for basic_decl at nodes.lkt:18597:59>' Fld_3 ada/nodes.lkt:18597
      if Local_Dn.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_3 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Local_Dn.Node, E_Info => Local_Dn.Info);
--# end
--# expr-done 10753
Array_Lit := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Fld_3)); 
--# expr-done 10754
   Result_Var := Array_Lit;
end if;
      Inc_Ref (Result_Var);
Dyn_Var_Bind_Result := Result_Var; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 10755
Local_Bases := Dyn_Var_Bind_Result; Inc_Ref (Local_Bases);
--# bind bases Local_Bases
--# expr-start 10786 '<Let at nodes.lkt:18599:9>' Let_Result_1 ada/nodes.lkt:18599
--# scope-start
--# expr-start 10758 '<unique at nodes.lkt:18600:13>' Unique_Array ada/nodes.lkt:18600
--# expr-start 10757 '<Mapcat at nodes.lkt:18600:13>' Map_Result ada/nodes.lkt:18600
      declare
         Map_Result_Vec : Internal_Unit_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Local_Bases;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind base Item_0
      --# expr-start 10756 '<FieldAccess for filter_is_imported_by at nodes.lkt:18600:36>' Fld_4 ada/nodes.lkt:18600
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Ada_Node_P_Filter_Is_Imported_By (Node => Item_0.Node, Units => Units, Transitive => True);
--# expr-done 10756
         for Item_To_Append of
               Fld_4.Items
         loop
            Internal_Unit_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_3303;
         end loop;
      end;
         Map_Result := Create_Internal_Unit_Array
           (Items_Count => Natural (Internal_Unit_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Unit_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Unit_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Unit_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10757
Unique_Array := Make_Unique (Map_Result); 
--# expr-done 10758
Local_All_Units := Unique_Array; Inc_Ref (Local_All_Units);
--# bind all_units Local_All_Units
--# expr-start 10785 '<Let at nodes.lkt:18602:9>' Let_Result ada/nodes.lkt:18602
--# scope-start
--# expr-start 10762 '<Mapcat at nodes.lkt:18603:13>' Map_Result_1 ada/nodes.lkt:18603
      declare
         Map_Result_1_Vec : Internal_Ref_Result_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Unit_Array_Access := Local_All_Units;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind u Item_1
--# expr-start 10759 '<FieldAccess for root at nodes.lkt:18605:17>' Fld_5 ada/nodes.lkt:18605
      if Item_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Item_1.Ast_Root;
--# expr-done 10759
Var_Expr_2 := Fld_5;
if Var_Expr_2 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind r Var_Expr_2
--# expr-start 10761 '<FieldAccess for find_refs_impl at nodes.lkt:18605:34>' Fld_6 ada/nodes.lkt:18605
      if Local_Dn.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10760 '<as_bare_entity at nodes.lkt:18605:52>' If_Result ada/nodes.lkt:18605
Is_Null := Var_Expr_2 = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => No_Entity_Info, Node => Var_Expr_2); 
   If_Result := As_Entity;
end if;
--# expr-done 10760
--# property-call-start DefiningName.find_refs_impl
Fld_6 := Libadalang.Implementation.Defining_Name_P_Find_Refs_Impl (Node => Local_Dn.Node, Root => If_Result, Skip_Name => Self, Imprecise_Fallback => Imprecise_Fallback, E_Info => Local_Dn.Info);
--# end
--# expr-done 10761
Scope_Result_1 := Fld_6;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3305;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Ref_Result_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
         for Item_To_Append of
               Result_Var_1.Items
         loop
            Internal_Ref_Result_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_3304;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Ref_Result_Array
           (Items_Count => Natural (Internal_Ref_Result_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Ref_Result_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Ref_Result_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Ref_Result_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 10762
Local_Refs := Map_Result_1; Inc_Ref (Local_Refs);
--# bind refs Local_Refs
--# expr-start 10784 '<If at nodes.lkt:18608:9>' If_Result_1 ada/nodes.lkt:18608
if Follow_Renamings then
--# expr-start 10783 '<Mapcat at nodes.lkt:18611:15>' Map_Result_3 ada/nodes.lkt:18611
   --# expr-start 10774 '<Map at nodes.lkt:18611:15>' Map_Result_2 ada/nodes.lkt:18611
      declare
         Map_Result_2_Vec : Internal_Ref_Result_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Ref_Result_Array_Access := Local_Refs;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind f Item_3
--# expr-start 10767 '<Cast to RenamingClause at nodes.lkt:18613:17>' Cast_Result_1 ada/nodes.lkt:18613
--# expr-start 10766 '<Find at nodes.lkt:18613:17>' Find_Result ada/nodes.lkt:18613
   --# expr-start 10764 '<FieldAccess for parents at nodes.lkt:18613:17>' Fld_8 ada/nodes.lkt:18613
--# expr-start 10763 '<FieldAccess for ref at nodes.lkt:18613:17>' Fld_7 ada/nodes.lkt:18613
Fld_7 := Item_3.Ref;
--# expr-done 10763
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Parents (Node => Fld_7.Node, With_Self => True, E_Info => Fld_7.Info);
--# expr-done 10764
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_8;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_4
      --# expr-start 10765 '<IsA RenamingClause at nodes.lkt:18613:45>' Is_A ada/nodes.lkt:18613
Is_A := Item_4.Node /= null 
and then Item_4.Node.Kind in Ada_Renaming_Clause_Range; 
--# expr-done 10765
      if Is_A then
         Find_Result := Item_4; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 10766
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Renaming_Clause_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Renaming_Clause
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_1 := No_Entity_Renaming_Clause;
   end if;
--# expr-done 10767
Var_Expr_5 := Cast_Result_1;
if Var_Expr_5 /= No_Entity_Renaming_Clause then
   --# scope-start
   --# bind r Var_Expr_5
--# expr-start 10773 '<Eq at nodes.lkt:18617:21>' Is_Equal ada/nodes.lkt:18617
--# expr-start 10771 '<FieldAccess for node at nodes.lkt:18617:21>' Fld_12 ada/nodes.lkt:18617
--# expr-start 10770 '<FieldAccess for canonical_part at nodes.lkt:18617:21>' Fld_11 ada/nodes.lkt:18617
--# expr-start 10769 '<FieldAccess for referenced_defining_name at nodes.lkt:18617:21>' Fld_10 ada/nodes.lkt:18617
--# expr-start 10768 '<FieldAccess for renamed_object at nodes.lkt:18617:21>' Fld_9 ada/nodes.lkt:18617
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Name (Node => Var_Expr_5.Node.Renaming_Clause_F_Renamed_Object, Info => Var_Expr_5.Info);
--# expr-done 10768
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_defining_name
Fld_10 := Libadalang.Implementation.Name_P_Referenced_Defining_Name (Node => Fld_9.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_9.Info);
--# end
--# expr-done 10769
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.canonical_part
Fld_11 := Libadalang.Implementation.Defining_Name_P_Canonical_Part (Node => Fld_10.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_10.Info);
--# end
--# expr-done 10770
Fld_12 := Fld_11.Node;
--# expr-done 10771
      Cast_Result_2 := Fld_12;
--# expr-start 10772 '<FieldAccess for node at nodes.lkt:18620:24>' Fld_13 ada/nodes.lkt:18620
Fld_13 := Local_Dn.Node;
--# expr-done 10772
Is_Equal := Cast_Result_2 = Fld_13; 
--# expr-done 10773
Scope_Result_2 := Is_Equal;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
         if Result_Var_2 then
         declare
            Item_To_Append : constant Internal_Ref_Result := Item_3;
         begin
            Internal_Ref_Result_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
      Finalizer_Scope_3306;
         end loop;
      end;
         Map_Result_2 := Create_Internal_Ref_Result_Array
           (Items_Count => Natural (Internal_Ref_Result_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Ref_Result_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Ref_Result_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Ref_Result_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 10774
      declare
         Map_Result_3_Vec : Internal_Ref_Result_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Ref_Result_Array_Access := Map_Result_2;
      begin
         for Item_6 of
               Collection.Items
         loop
   --# scope-start
               --# bind f Item_6
--# expr-start 10780 '<Cast to BasicDecl at nodes.lkt:18625:17>' Cast_Result_3 ada/nodes.lkt:18625
--# expr-start 10779 '<parent at nodes.lkt:18625:17>' Fld_16 ada/nodes.lkt:18625
--# expr-start 10778 '<Find at nodes.lkt:18625:17>' Find_Result_1 ada/nodes.lkt:18625
   --# expr-start 10776 '<FieldAccess for parents at nodes.lkt:18625:17>' Fld_15 ada/nodes.lkt:18625
--# expr-start 10775 '<FieldAccess for ref at nodes.lkt:18625:17>' Fld_14 ada/nodes.lkt:18625
Fld_14 := Item_6.Ref;
--# expr-done 10775
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Parents (Node => Fld_14.Node, With_Self => True, E_Info => Fld_14.Info);
--# expr-done 10776
      Find_Result_1 := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_15;
      begin
         for Item_7 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_7
      --# expr-start 10777 '<IsA RenamingClause at nodes.lkt:18625:45>' Is_A_1 ada/nodes.lkt:18625
Is_A_1 := Item_7.Node /= null 
and then Item_7.Node.Kind in Ada_Renaming_Clause_Range; 
--# expr-done 10777
      if Is_A_1 then
         Find_Result_1 := Item_7; 
      end if;
   --# end
               exit when Is_A_1;
         end loop;
      end;
--# expr-done 10778
      if Find_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Parent (Node => Find_Result_1.Node, E_Info => Find_Result_1.Info);
--# expr-done 10779
   if Fld_16.Node = null
      or else Fld_16.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10780
Var_Expr_8 := Cast_Result_3;
if Var_Expr_8 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind bd Var_Expr_8
--# expr-start 10782 '<FieldAccess for find_all_references at nodes.lkt:18638:21>' Fld_18 ada/nodes.lkt:18638
--# expr-start 10781 '<FieldAccess for defining_name at nodes.lkt:18638:21>' Fld_17 ada/nodes.lkt:18638
      if Var_Expr_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_17 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_8.Node, E_Info => Var_Expr_8.Info);
--# end
--# expr-done 10781
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.find_all_references
Fld_18 := Libadalang.Implementation.Defining_Name_P_Find_All_References (Node => Fld_17.Node, Units => Units, Follow_Renamings => True, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_17.Info);
--# end
--# expr-done 10782
Scope_Result_3 := Fld_18;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3311;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Internal_Ref_Result_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
         for Item_To_Append of
               Result_Var_3.Items
         loop
            Internal_Ref_Result_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_3309;
         end loop;
      end;
         Map_Result_3 := Create_Internal_Ref_Result_Array
           (Items_Count => Natural (Internal_Ref_Result_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Ref_Result_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Ref_Result_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Ref_Result_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 10783
Concat_Result := Concat (Local_Refs, Map_Result_3); 
   If_Result_1 := Concat_Result;
else
   If_Result_1 := Local_Refs;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 10784
Let_Result := If_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 10785
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 10786
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 10787
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 10788
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1233;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1233;
                     Finalizer_Scope_3302;
                     Finalizer_Scope_3303;
                     Finalizer_Scope_3304;
                     Finalizer_Scope_3305;
                     Finalizer_Scope_3306;
                     Finalizer_Scope_3309;
                     Finalizer_Scope_3311;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Find_All_References;
--# end
--# property-start DefiningName.find_matching_name ada/nodes.lkt:18649
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Find_Matching_Name
  (Node : Bare_Defining_Name
      ; Bd : Internal_Entity_Basic_Decl
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind bd Bd
   Property_Result : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_3312 with Inline_Always;
      Var_Expr_258 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Name;
Fld_2 : Symbol_Type;
Fld_3 : Boolean;
Find_Result : Internal_Entity_Defining_Name;
Scope_Result : Internal_Entity_Defining_Name;
Result_Var : Internal_Entity_Defining_Name;
            procedure Finalizer_Scope_3312 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_3312;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
Var_Expr_258 := Bd;
if Var_Expr_258 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 10793 '<Find at nodes.lkt:18650:9>' Find_Result ada/nodes.lkt:18650
   --# expr-start 10789 '<FieldAccess for defining_names at nodes.lkt:18650:9>' Fld ada/nodes.lkt:18650
      if Var_Expr_258.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Var_Expr_258.Node, E_Info => Var_Expr_258.Info);
--# end
--# expr-done 10789
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind di Item_0
      --# expr-start 10792 '<FieldAccess for name_is at nodes.lkt:18650:43>' Fld_3 ada/nodes.lkt:18650
--# expr-start 10790 '<FieldAccess for name at nodes.lkt:18650:43>' Fld_1 ada/nodes.lkt:18650
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Ent.Node.Defining_Name_F_Name, Info => Ent.Info);
--# expr-done 10790
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10791 '<FieldAccess for name_symbol at nodes.lkt:18650:61>' Fld_2 ada/nodes.lkt:18650
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Item_0.Node);
--# end
--# expr-done 10791
--# property-call-start Name.name_is
Fld_3 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_1.Node, Sym => Fld_2);
--# end
--# expr-done 10792
      if Fld_3 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Fld_3;
         end loop;
      end;
--# expr-done 10793
Scope_Result := Find_Result;
   --# end
      Finalizer_Scope_3312;
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Defining_Name;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3312;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Find_Matching_Name;
--# end
--# property-start DefiningName.find_all_calls ada/nodes.lkt:18662
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Find_All_Calls
  (Node : Bare_Defining_Name
      ; Units : Internal_Unit_Array_Access
      ; Follow_Renamings : Boolean
         := False
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Ref_Result_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind units Units
   --# bind follow_renamings Follow_Renamings
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Ref_Result_Array_Access;
            procedure Finalizer_Scope_1235 with Inline_Always;
      Fld : Internal_Ref_Result_Array_Access;
Fld_1 : Internal_Entity_Base_Id;
Fld_2 : Boolean;
Map_Result : Internal_Ref_Result_Array_Access;
            procedure Finalizer_Scope_1235 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1235;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10797 '<Map at nodes.lkt:18666:9>' Map_Result ada/nodes.lkt:18666
   --# expr-start 10794 '<FieldAccess for find_all_references at nodes.lkt:18666:9>' Fld ada/nodes.lkt:18666
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.find_all_references
Fld := Libadalang.Implementation.Defining_Name_P_Find_All_References (Node => Ent.Node, Units => Units, Follow_Renamings => Follow_Renamings, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10794
      declare
         Map_Result_Vec : Internal_Ref_Result_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Ref_Result_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind r Item_0
         --# expr-start 10796 '<FieldAccess for is_direct_call at nodes.lkt:18667:20>' Fld_2 ada/nodes.lkt:18667
--# expr-start 10795 '<FieldAccess for ref at nodes.lkt:18667:20>' Fld_1 ada/nodes.lkt:18667
Fld_1 := Item_0.Ref;
--# expr-done 10795
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_direct_call
Fld_2 := Libadalang.Implementation.Name_P_Is_Direct_Call (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 10796
         if Fld_2 then
         declare
            Item_To_Append : constant Internal_Ref_Result := Item_0;
         begin
            Internal_Ref_Result_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Ref_Result_Array
           (Items_Count => Natural (Internal_Ref_Result_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Ref_Result_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Ref_Result_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Ref_Result_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10797
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1235;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1235;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Find_All_Calls;
--# end
--# property-start DefiningName.next_part ada/nodes.lkt:18673
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Next_Part
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10801 '<FieldAccess for find_matching_name at nodes.lkt:18674:9>' Fld_3 ada/nodes.lkt:18674
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10800 '<FieldAccess for next_part_for_name at nodes.lkt:18675:13>' Fld_2 ada/nodes.lkt:18675
--# expr-start 10798 '<FieldAccess for basic_decl at nodes.lkt:18675:13>' Fld ada/nodes.lkt:18675
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10798
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10799 '<FieldAccess for name_symbol at nodes.lkt:18675:50>' Fld_1 ada/nodes.lkt:18675
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 10799
--# property-call-start '[dispatcher]BasicDecl.next_part_for_name'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Next_Part_For_Name (Node => Fld.Node, Sym => Fld_1, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 10800
--# property-call-start DefiningName.find_matching_name
Fld_3 := Libadalang.Implementation.Defining_Name_P_Find_Matching_Name (Node => Ent.Node, Bd => Fld_2, E_Info => Ent.Info);
--# end
--# expr-done 10801
         Property_Result := Fld_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Next_Part;
--# end
--# property-start DefiningName.previous_part ada/nodes.lkt:18681
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Previous_Part
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10805 '<FieldAccess for find_matching_name at nodes.lkt:18682:9>' Fld_3 ada/nodes.lkt:18682
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10804 '<FieldAccess for previous_part_for_name at nodes.lkt:18683:13>' Fld_2 ada/nodes.lkt:18683
--# expr-start 10802 '<FieldAccess for basic_decl at nodes.lkt:18683:13>' Fld ada/nodes.lkt:18683
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10802
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10803 '<FieldAccess for name_symbol at nodes.lkt:18683:54>' Fld_1 ada/nodes.lkt:18683
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 10803
--# property-call-start '[dispatcher]BasicDecl.previous_part_for_name'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Previous_Part_For_Name (Node => Fld.Node, Sym => Fld_1, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 10804
--# property-call-start DefiningName.find_matching_name
Fld_3 := Libadalang.Implementation.Defining_Name_P_Find_Matching_Name (Node => Ent.Node, Bd => Fld_2, E_Info => Ent.Info);
--# end
--# expr-done 10805
         Property_Result := Fld_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Previous_Part;
--# end
--# property-start DefiningName.canonical_part ada/nodes.lkt:18689
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Canonical_Part
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10809 '<FieldAccess for find_matching_name at nodes.lkt:18690:9>' Fld_3 ada/nodes.lkt:18690
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10808 '<FieldAccess for canonical_part_for_name at nodes.lkt:18691:13>' Fld_2 ada/nodes.lkt:18691
--# expr-start 10806 '<FieldAccess for basic_decl at nodes.lkt:18691:13>' Fld ada/nodes.lkt:18691
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10806
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10807 '<FieldAccess for name_symbol at nodes.lkt:18691:55>' Fld_1 ada/nodes.lkt:18691
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 10807
--# property-call-start BasicDecl.canonical_part_for_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Canonical_Part_For_Name (Node => Fld.Node, Sym => Fld_1, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 10808
--# property-call-start DefiningName.find_matching_name
Fld_3 := Libadalang.Implementation.Defining_Name_P_Find_Matching_Name (Node => Ent.Node, Bd => Fld_2, E_Info => Ent.Info);
--# end
--# expr-done 10809
         Property_Result := Fld_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Canonical_Part;
--# end
--# property-start DefiningName.most_visible_part ada/nodes.lkt:18699
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Most_Visible_Part
  (Node : Bare_Defining_Name
      ; Origin : Bare_Ada_Node
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name;
      Fld : Internal_Entity_Basic_Decl;
Fld_1 : Symbol_Type;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Defining_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10813 '<FieldAccess for find_matching_name at nodes.lkt:18700:9>' Fld_3 ada/nodes.lkt:18700
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10812 '<FieldAccess for most_visible_part_for_name at nodes.lkt:18701:13>' Fld_2 ada/nodes.lkt:18701
--# expr-start 10810 '<FieldAccess for basic_decl at nodes.lkt:18701:13>' Fld ada/nodes.lkt:18701
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10810
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10811 '<FieldAccess for name_symbol at nodes.lkt:18701:58>' Fld_1 ada/nodes.lkt:18701
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Ent.Node);
--# end
--# expr-done 10811
--# property-call-start BasicDecl.most_visible_part_for_name
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Part_For_Name (Node => Fld.Node, Sym => Fld_1, Origin => Origin, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 10812
--# property-call-start DefiningName.find_matching_name
Fld_3 := Libadalang.Implementation.Defining_Name_P_Find_Matching_Name (Node => Ent.Node, Bd => Fld_2, E_Info => Ent.Info);
--# end
--# expr-done 10813
         Property_Result := Fld_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Most_Visible_Part;
--# end
--# property-start DefiningName.all_previous_parts ada/nodes.lkt:18707
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_All_Previous_Parts
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1240 with Inline_Always;
            procedure Finalizer_Scope_3315 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
Concat_Result : Internal_Entity_Defining_Name_Array_Access;
Cast_Expr : Internal_Entity_Defining_Name;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Defining_Name;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Defining_Name_Array_Access;
Scope_Result : Internal_Entity_Defining_Name_Array_Access;
Result_Var : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1240 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1240;
            procedure Finalizer_Scope_3315 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_3315;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 10814 '<FieldAccess for previous_part at nodes.lkt:18708:9>' Fld ada/nodes.lkt:18708
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.previous_part
Fld := Libadalang.Implementation.Defining_Name_P_Previous_Part (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10814
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind pp Var_Expr_0
--# expr-start 10818 '<If at nodes.lkt:18710:13>' If_Result ada/nodes.lkt:18710
--# expr-start 10815 '<Eq at nodes.lkt:18710:16>' Is_Equiv ada/nodes.lkt:18710
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Var_Expr_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 10815
if Is_Equiv then
   If_Result := No_Internal_Entity_Defining_Name_Array_Type;
else
   --# expr-start 10816 '<FieldAccess for all_previous_parts at nodes.lkt:18711:18>' Fld_1 ada/nodes.lkt:18711
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.all_previous_parts
Fld_1 := Libadalang.Implementation.Defining_Name_P_All_Previous_Parts (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10816
--# expr-start 10817 '<ArrayLiteral at nodes.lkt:18711:44>' Array_Lit ada/nodes.lkt:18711
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Var_Expr_0)); 
--# expr-done 10817
Concat_Result := Concat (Fld_1, Array_Lit); 
   If_Result := Concat_Result;
end if;
      Inc_Ref (If_Result);
--# expr-done 10818
Scope_Result := If_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3315;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1240;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1240;
                     Finalizer_Scope_3315;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_All_Previous_Parts;
--# end
--# property-start DefiningName.all_next_parts ada/nodes.lkt:18717
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_All_Next_Parts
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1241 with Inline_Always;
            procedure Finalizer_Scope_3316 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
Concat_Result : Internal_Entity_Defining_Name_Array_Access;
Cast_Expr : Internal_Entity_Defining_Name;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Defining_Name;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Internal_Entity_Defining_Name_Array_Access;
Scope_Result : Internal_Entity_Defining_Name_Array_Access;
Result_Var : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1241 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1241;
            procedure Finalizer_Scope_3316 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_3316;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 10819 '<FieldAccess for next_part at nodes.lkt:18718:9>' Fld ada/nodes.lkt:18718
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.next_part
Fld := Libadalang.Implementation.Defining_Name_P_Next_Part (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10819
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind np Var_Expr_0
--# expr-start 10823 '<If at nodes.lkt:18720:13>' If_Result ada/nodes.lkt:18720
--# expr-start 10820 '<Eq at nodes.lkt:18720:16>' Is_Equiv ada/nodes.lkt:18720
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Var_Expr_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 10820
if Is_Equiv then
   If_Result := No_Internal_Entity_Defining_Name_Array_Type;
else
   --# expr-start 10821 '<ArrayLiteral at nodes.lkt:18721:18>' Array_Lit ada/nodes.lkt:18721
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Var_Expr_0)); 
--# expr-done 10821
--# expr-start 10822 '<FieldAccess for all_next_parts at nodes.lkt:18721:25>' Fld_1 ada/nodes.lkt:18721
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.all_next_parts
Fld_1 := Libadalang.Implementation.Defining_Name_P_All_Next_Parts (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10822
Concat_Result := Concat (Array_Lit, Fld_1); 
   If_Result := Concat_Result;
end if;
      Inc_Ref (If_Result);
--# expr-done 10823
Scope_Result := If_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3316;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1241;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1241;
                     Finalizer_Scope_3316;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_All_Next_Parts;
--# end
--# property-start DefiningName.all_parts ada/nodes.lkt:18728
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_All_Parts
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1242 with Inline_Always;
      Local_Prevs : Internal_Entity_Defining_Name_Array_Access;
Local_Nexts : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
Concat_Result : Internal_Entity_Defining_Name_Array_Access;
Concat_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Let_Result : Internal_Entity_Defining_Name_Array_Access;
Let_Result_1 : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1242 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Prevs);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Nexts);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1242;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10828 '<Let at nodes.lkt:18729:9>' Let_Result_1 ada/nodes.lkt:18729
--# scope-start
--# expr-start 10824 '<FieldAccess for all_previous_parts at nodes.lkt:18729:21>' Fld ada/nodes.lkt:18729
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.all_previous_parts
Fld := Libadalang.Implementation.Defining_Name_P_All_Previous_Parts (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10824
Local_Prevs := Fld; Inc_Ref (Local_Prevs);
--# bind prevs Local_Prevs
--# expr-start 10827 '<Let at nodes.lkt:18730:9>' Let_Result ada/nodes.lkt:18730
--# scope-start
--# expr-start 10825 '<FieldAccess for all_next_parts at nodes.lkt:18730:21>' Fld_1 ada/nodes.lkt:18730
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.all_next_parts
Fld_1 := Libadalang.Implementation.Defining_Name_P_All_Next_Parts (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10825
Local_Nexts := Fld_1; Inc_Ref (Local_Nexts);
--# bind nexts Local_Nexts
--# expr-start 10826 '<ArrayLiteral at nodes.lkt:18732:17>' Array_Lit ada/nodes.lkt:18732
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Ent)); 
--# expr-done 10826
Concat_Result := Concat (Local_Prevs, Array_Lit); 
Concat_Result_1 := Concat (Concat_Result, Local_Nexts); 
Let_Result := Concat_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 10827
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 10828
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1242;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1242;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_All_Parts;
--# end
--# property-start DefiningName.get_aspect_impl ada/nodes.lkt:18738
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Get_Aspect_Impl
  (Node : Bare_Defining_Name
      ; Name : Symbol_Type
      ; Inherited : Boolean
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind inherited Inherited
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Aspect;
      Var_Expr_0 : Internal_Entity_Pragma_Node;
Var_Expr_1 : Internal_Entity_Aspect_Assoc;
Var_Expr_2 : Internal_Entity_Attribute_Def_Clause;
Var_Expr_3 : Internal_Entity_At_Clause;
Var_Expr : Internal_Aspect;
Var_Expr_4 : Internal_Aspect;
Var_Expr_5 : Internal_Aspect;
Fld : Internal_Entity_Pragma_Node;
Fld_1 : Internal_Aspect;
Scope_Result : Internal_Aspect;
Result_Var : Internal_Aspect;
Scope_Result_1 : Internal_Aspect;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Aspect_Assoc;
Fld_4 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Aspect_Assoc;
Cast_Result : Internal_Entity;
New_Struct : Internal_Aspect;
Scope_Result_2 : Internal_Aspect;
Result_Var_1 : Internal_Aspect;
Result_Var_2 : Internal_Aspect;
Scope_Result_3 : Internal_Aspect;
Fld_5 : Internal_Entity_Attribute_Def_Clause;
Fld_6 : Internal_Entity_Expr;
Cast_Expr_1 : Internal_Entity_Attribute_Def_Clause;
Cast_Result_1 : Internal_Entity;
New_Struct_1 : Internal_Aspect;
Scope_Result_4 : Internal_Aspect;
Result_Var_3 : Internal_Aspect;
Result_Var_4 : Internal_Aspect;
Scope_Result_5 : Internal_Aspect;
Fld_7 : Internal_Entity_At_Clause;
Fld_8 : Internal_Entity_Expr;
Cast_Expr_2 : Internal_Entity_At_Clause;
Cast_Result_2 : Internal_Entity;
New_Struct_2 : Internal_Aspect;
Scope_Result_6 : Internal_Aspect;
Result_Var_5 : Internal_Aspect;
Sym : Symbol_Type;
Is_Equal : Boolean;
If_Result : Internal_Aspect;
Result_Var_6 : Internal_Aspect;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 10829 '<FieldAccess for get_pragma at nodes.lkt:18741:17>' Fld ada/nodes.lkt:18741
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_pragma
Fld := Libadalang.Implementation.Defining_Name_P_Get_Pragma (Node => Ent.Node, Name => Name, E_Info => Ent.Info);
--# end
--# expr-done 10829
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Pragma_Node then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 10830 '<FieldAccess for as_aspect at nodes.lkt:18741:49>' Fld_1 ada/nodes.lkt:18741
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.as_aspect
Fld_1 := Libadalang.Implementation.Pragma_Node_P_As_Aspect (Node => Var_Expr_0.Node, Inherited => Inherited, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10830
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Aspect;
end if;
Var_Expr_5 := Result_Var;
if Var_Expr_5 /= No_Aspect then
   --# scope-start
   --# bind e Var_Expr_5
Scope_Result_1 := Var_Expr_5;
   --# end
   Result_Var_2 := Scope_Result_1;
else
--# expr-start 10832 '<FieldAccess for get_aspect_assoc at nodes.lkt:18742:21>' Fld_3 ada/nodes.lkt:18742
--# expr-start 10831 '<FieldAccess for basic_decl_internal at nodes.lkt:18742:21>' Fld_2 ada/nodes.lkt:18742
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl_internal
Fld_2 := Libadalang.Implementation.Defining_Name_P_Basic_Decl_Internal (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10831
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.get_aspect_assoc
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect_Assoc (Node => Fld_2.Node, Name => Name, E_Info => Fld_2.Info);
--# end
--# expr-done 10832
Var_Expr_1 := Fld_3;
if Var_Expr_1 /= No_Entity_Aspect_Assoc then
   --# scope-start
   --# bind aa Var_Expr_1
--# expr-start 10834 '<New Aspect at nodes.lkt:18744:21>' New_Struct ada/nodes.lkt:18744
Cast_Expr := Var_Expr_1; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 10833 '<FieldAccess for expr at nodes.lkt:18747:31>' Fld_4 ada/nodes.lkt:18747
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Var_Expr_1.Node.Aspect_Assoc_F_Expr, Info => Var_Expr_1.Info);
--# expr-done 10833
New_Struct := (Exists => True, Inherited => Inherited, Node => Cast_Result, Value => Fld_4); 
--# expr-done 10834
Scope_Result_2 := New_Struct;
   --# end
   Result_Var_1 := Scope_Result_2;
else
   Result_Var_1 := No_Aspect;
end if;
   Result_Var_2 := Result_Var_1;
end if;
Var_Expr_4 := Result_Var_2;
if Var_Expr_4 /= No_Aspect then
   --# scope-start
   --# bind e Var_Expr_4
Scope_Result_3 := Var_Expr_4;
   --# end
   Result_Var_4 := Scope_Result_3;
else
--# expr-start 10835 '<FieldAccess for get_representation_clause at nodes.lkt:18752:17>' Fld_5 ada/nodes.lkt:18752
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_representation_clause
Fld_5 := Libadalang.Implementation.Defining_Name_P_Get_Representation_Clause (Node => Ent.Node, Name => Name, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10835
Var_Expr_2 := Fld_5;
if Var_Expr_2 /= No_Entity_Attribute_Def_Clause then
   --# scope-start
   --# bind rc Var_Expr_2
--# expr-start 10837 '<New Aspect at nodes.lkt:18754:17>' New_Struct_1 ada/nodes.lkt:18754
Cast_Expr_1 := Var_Expr_2; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# expr-start 10836 '<FieldAccess for expr at nodes.lkt:18757:27>' Fld_6 ada/nodes.lkt:18757
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Var_Expr_2.Node.Attribute_Def_Clause_F_Expr, Info => Var_Expr_2.Info);
--# expr-done 10836
New_Struct_1 := (Exists => True, Inherited => Inherited, Node => Cast_Result_1, Value => Fld_6); 
--# expr-done 10837
Scope_Result_4 := New_Struct_1;
   --# end
   Result_Var_3 := Scope_Result_4;
else
   Result_Var_3 := No_Aspect;
end if;
   Result_Var_4 := Result_Var_3;
end if;
Var_Expr := Result_Var_4;
if Var_Expr /= No_Aspect then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_5 := Var_Expr;
   --# end
   Result_Var_6 := Scope_Result_5;
else
   --# expr-start 10843 '<If at nodes.lkt:18762:13>' If_Result ada/nodes.lkt:18762
--# expr-start 10839 '<Eq at nodes.lkt:18762:16>' Is_Equal ada/nodes.lkt:18762
--# expr-start 10838 '<Symbol Address at nodes.lkt:18762:24>' Sym ada/nodes.lkt:18762
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Address); 
--# expr-done 10838
Is_Equal := Name = Sym; 
--# expr-done 10839
if Is_Equal then
--# expr-start 10840 '<FieldAccess for get_at_clause at nodes.lkt:18764:13>' Fld_7 ada/nodes.lkt:18764
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_at_clause
Fld_7 := Libadalang.Implementation.Defining_Name_P_Get_At_Clause (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10840
Var_Expr_3 := Fld_7;
if Var_Expr_3 /= No_Entity_At_Clause then
   --# scope-start
   --# bind atc Var_Expr_3
--# expr-start 10842 '<New Aspect at nodes.lkt:18766:17>' New_Struct_2 ada/nodes.lkt:18766
Cast_Expr_2 := Var_Expr_3; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
--# expr-start 10841 '<FieldAccess for expr at nodes.lkt:18769:27>' Fld_8 ada/nodes.lkt:18769
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Expr (Node => Var_Expr_3.Node.At_Clause_F_Expr, Info => Var_Expr_3.Info);
--# expr-done 10841
New_Struct_2 := (Exists => True, Inherited => Inherited, Node => Cast_Result_2, Value => Fld_8); 
--# expr-done 10842
Scope_Result_6 := New_Struct_2;
   --# end
   Result_Var_5 := Scope_Result_6;
else
   Result_Var_5 := No_Aspect;
end if;
   If_Result := Result_Var_5;
else
   If_Result := No_Aspect;
end if;
--# expr-done 10843
   Result_Var_6 := If_Result;
end if;
         Property_Result := Result_Var_6;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Get_Aspect_Impl;
--# end
--# property-start DefiningName.get_aspect_on_parts ada/nodes.lkt:18785
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Get_Aspect_On_Parts
  (Node : Bare_Defining_Name
      ; Name : Symbol_Type
      ; Inherited : Boolean
      ; Previous_Parts_Only : Boolean
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind inherited Inherited
   --# bind previous_parts_only Previous_Parts_Only
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Aspect;
            procedure Finalizer_Scope_1244 with Inline_Always;
      Local_Parts_To_Check : Internal_Entity_Defining_Name_Array_Access;
Local_Self_Aspects : Internal_Aspect_Array_Access;
Var_Expr_2 : Internal_Entity_Aspect_Assoc;
Var_Expr_4 : Internal_Entity_Base_Type_Decl;
Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr : Internal_Aspect;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
Array_Lit_1 : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Defining_Name_Array_Access;
Concat_Result : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
Sym : Symbol_Type;
Is_Equal : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Sym_1 : Symbol_Type;
Is_Equal_1 : Boolean;
If_Result_2 : Internal_Entity_Defining_Name_Array_Access;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Aspect_Assoc;
Fld_4 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Aspect_Assoc;
Cast_Result : Internal_Entity;
New_Struct : Internal_Aspect;
Scope_Result : Internal_Aspect;
Result_Var : Internal_Aspect;
Map_Result : Internal_Aspect_Array_Access;
Fld_5 : Internal_Aspect;
Map_Result_1 : Internal_Aspect_Array_Access;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Is_Equal_2 : Boolean;
Is_Equal_3 : Boolean;
If_Result_3 : Boolean;
Is_Equal_4 : Boolean;
If_Result_4 : Boolean;
Is_Equal_5 : Boolean;
If_Result_5 : Boolean;
Is_Equal_6 : Boolean;
If_Result_6 : Boolean;
Is_Equal_7 : Boolean;
If_Result_7 : Boolean;
Is_Equal_8 : Boolean;
If_Result_8 : Boolean;
Is_Equal_9 : Boolean;
If_Result_9 : Boolean;
If_Result_10 : Internal_Aspect_Array_Access;
Fld_6 : Boolean;
Find_Result : Internal_Aspect;
Scope_Result_1 : Internal_Aspect;
Fld_7 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity_Base_Subtype_Decl;
Fld_8 : Internal_Entity_Base_Type_Decl;
Fld_9 : Internal_Entity_Base_Type_Decl;
Is_A : Boolean;
If_Result_11 : Internal_Entity_Base_Type_Decl;
Fld_10 : Internal_Entity_Defining_Name;
Fld_11 : Internal_Aspect;
Is_Null : Boolean;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Cast_Expr_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Is_Equiv : Boolean;
If_Result_12 : Boolean;
If_Result_13 : Internal_Aspect;
Let_Result : Internal_Aspect;
Scope_Result_2 : Internal_Aspect;
Result_Var_1 : Internal_Aspect;
Result_Var_2 : Internal_Aspect;
Let_Result_1 : Internal_Aspect;
Let_Result_2 : Internal_Aspect;
            procedure Finalizer_Scope_1244 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Fld);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Local_Parts_To_Check);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (If_Result_10);
                     Dec_Ref (Local_Self_Aspects);
            end Finalizer_Scope_1244;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10887 '<Let at nodes.lkt:18790:9>' Let_Result_2 ada/nodes.lkt:18790
--# scope-start
--# expr-start 10853 '<If at nodes.lkt:18795:13>' If_Result_2 ada/nodes.lkt:18795
--# expr-start 10845 '<Eq at nodes.lkt:18795:16>' Is_Equal_1 ada/nodes.lkt:18795
--# expr-start 10844 '<Symbol SPARK_Mode at nodes.lkt:18795:24>' Sym_1 ada/nodes.lkt:18795
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 10844
Is_Equal_1 := Name = Sym_1; 
--# expr-done 10845
if Is_Equal_1 then
   --# expr-start 10846 '<ArrayLiteral at nodes.lkt:18796:18>' Array_Lit ada/nodes.lkt:18796
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Ent)); 
--# expr-done 10846
   If_Result_2 := Array_Lit;
else
   --# expr-start 10852 '<If at nodes.lkt:18795:13>' If_Result_1 ada/nodes.lkt:18795
--# expr-start 10848 '<BooleanBinaryOp Or at nodes.lkt:18798:17>' If_Result ada/nodes.lkt:18798
if Previous_Parts_Only then
   If_Result := True;
else
--# expr-start 10847 '<Symbol Ghost at nodes.lkt:18801:28>' Sym ada/nodes.lkt:18801
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ghost); 
--# expr-done 10847
Is_Equal := Name = Sym; 
   If_Result := Is_Equal;
end if;
--# expr-done 10848
if If_Result then
   --# expr-start 10849 '<ArrayLiteral at nodes.lkt:18802:18>' Array_Lit_1 ada/nodes.lkt:18802
Array_Lit_1 := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Ent)); 
--# expr-done 10849
--# expr-start 10850 '<FieldAccess for all_previous_parts at nodes.lkt:18802:27>' Fld ada/nodes.lkt:18802
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.all_previous_parts
Fld := Libadalang.Implementation.Defining_Name_P_All_Previous_Parts (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10850
Concat_Result := Concat (Array_Lit_1, Fld); 
   If_Result_1 := Concat_Result;
else
   --# expr-start 10851 '<FieldAccess for all_parts at nodes.lkt:18803:18>' Fld_1 ada/nodes.lkt:18803
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.all_parts
Fld_1 := Libadalang.Implementation.Defining_Name_P_All_Parts (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10851
   If_Result_1 := Fld_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 10852
   If_Result_2 := If_Result_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 10853
Local_Parts_To_Check := If_Result_2; Inc_Ref (Local_Parts_To_Check);
--# bind parts_to_check Local_Parts_To_Check
--# expr-start 10886 '<Let at nodes.lkt:18805:9>' Let_Result_1 ada/nodes.lkt:18805
--# scope-start
--# expr-start 10869 '<If at nodes.lkt:18810:13>' If_Result_10 ada/nodes.lkt:18810
--# expr-start 10854 '<Symbol Implicit_Dereference at nodes.lkt:18811:25>' Sym_2 ada/nodes.lkt:18811
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Implicit_Dereference); 
--# expr-done 10854
Is_Equal_9 := Name = Sym_2; 
if Is_Equal_9 then
   If_Result_9 := True;
else
--# expr-start 10855 '<Symbol Constant_Indexing at nodes.lkt:18812:23>' Sym_3 ada/nodes.lkt:18812
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Constant_Indexing); 
--# expr-done 10855
Is_Equal_8 := Name = Sym_3; 
if Is_Equal_8 then
   If_Result_8 := True;
else
--# expr-start 10856 '<Symbol Variable_Indexing at nodes.lkt:18813:23>' Sym_4 ada/nodes.lkt:18813
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Variable_Indexing); 
--# expr-done 10856
Is_Equal_7 := Name = Sym_4; 
if Is_Equal_7 then
   If_Result_7 := True;
else
--# expr-start 10857 '<Symbol Iterable at nodes.lkt:18814:23>' Sym_5 ada/nodes.lkt:18814
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterable); 
--# expr-done 10857
Is_Equal_6 := Name = Sym_5; 
if Is_Equal_6 then
   If_Result_6 := True;
else
--# expr-start 10858 '<Symbol Iterator_Element at nodes.lkt:18815:23>' Sym_6 ada/nodes.lkt:18815
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Iterator_Element); 
--# expr-done 10858
Is_Equal_5 := Name = Sym_6; 
if Is_Equal_5 then
   If_Result_5 := True;
else
--# expr-start 10859 '<Symbol Integer_Literal at nodes.lkt:18816:23>' Sym_7 ada/nodes.lkt:18816
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Integer_Literal); 
--# expr-done 10859
Is_Equal_4 := Name = Sym_7; 
if Is_Equal_4 then
   If_Result_4 := True;
else
--# expr-start 10860 '<Symbol Real_Literal at nodes.lkt:18817:23>' Sym_8 ada/nodes.lkt:18817
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Real_Literal); 
--# expr-done 10860
Is_Equal_3 := Name = Sym_8; 
if Is_Equal_3 then
   If_Result_3 := True;
else
--# expr-start 10861 '<Symbol String_Literal at nodes.lkt:18818:23>' Sym_9 ada/nodes.lkt:18818
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String_Literal); 
--# expr-done 10861
Is_Equal_2 := Name = Sym_9; 
   If_Result_3 := Is_Equal_2;
end if;
   If_Result_4 := If_Result_3;
end if;
   If_Result_5 := If_Result_4;
end if;
   If_Result_6 := If_Result_5;
end if;
   If_Result_7 := If_Result_6;
end if;
   If_Result_8 := If_Result_7;
end if;
   If_Result_9 := If_Result_8;
end if;
if If_Result_9 then
   --# expr-start 10866 '<Map at nodes.lkt:18820:17>' Map_Result ada/nodes.lkt:18820
      declare
         Map_Result_Vec : Internal_Aspect_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Local_Parts_To_Check;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
--# expr-start 10863 '<FieldAccess for get_aspect_assoc at nodes.lkt:18821:28>' Fld_3 ada/nodes.lkt:18821
--# expr-start 10862 '<FieldAccess for basic_decl_internal at nodes.lkt:18821:28>' Fld_2 ada/nodes.lkt:18821
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl_internal
Fld_2 := Libadalang.Implementation.Defining_Name_P_Basic_Decl_Internal (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 10862
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.get_aspect_assoc
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect_Assoc (Node => Fld_2.Node, Name => Name, E_Info => Fld_2.Info);
--# end
--# expr-done 10863
Var_Expr_2 := Fld_3;
if Var_Expr_2 /= No_Entity_Aspect_Assoc then
   --# scope-start
   --# bind aa Var_Expr_2
--# expr-start 10865 '<New Aspect at nodes.lkt:18822:33>' New_Struct ada/nodes.lkt:18822
Cast_Expr := Var_Expr_2; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 10864 '<FieldAccess for expr at nodes.lkt:18825:35>' Fld_4 ada/nodes.lkt:18825
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Var_Expr_2.Node.Aspect_Assoc_F_Expr, Info => Var_Expr_2.Info);
--# expr-done 10864
New_Struct := (Exists => True, Inherited => Inherited, Node => Cast_Result, Value => Fld_4); 
--# expr-done 10865
Scope_Result := New_Struct;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Aspect;
end if;
         declare
            Item_To_Append : constant Internal_Aspect := Result_Var;
         begin
            Internal_Aspect_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Aspect_Array
           (Items_Count => Natural (Internal_Aspect_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Aspect_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Aspect_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Aspect_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10866
   If_Result_10 := Map_Result;
else
   --# expr-start 10868 '<Map at nodes.lkt:18831:17>' Map_Result_1 ada/nodes.lkt:18831
      declare
         Map_Result_1_Vec : Internal_Aspect_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Local_Parts_To_Check;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 10867 '<FieldAccess for get_aspect_impl at nodes.lkt:18831:43>' Fld_5 ada/nodes.lkt:18831
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_aspect_impl
Fld_5 := Libadalang.Implementation.Defining_Name_P_Get_Aspect_Impl (Node => Item_0.Node, Name => Name, Inherited => Inherited, Imprecise_Fallback => Imprecise_Fallback, E_Info => Item_0.Info);
--# end
--# expr-done 10867
         declare
            Item_To_Append : constant Internal_Aspect := Fld_5;
         begin
            Internal_Aspect_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Aspect_Array
           (Items_Count => Natural (Internal_Aspect_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Aspect_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Aspect_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Aspect_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 10868
   If_Result_10 := Map_Result_1;
end if;
      Inc_Ref (If_Result_10);
--# expr-done 10869
Local_Self_Aspects := If_Result_10; Inc_Ref (Local_Self_Aspects);
--# bind self_aspects Local_Self_Aspects
--# expr-start 10871 '<Find at nodes.lkt:18833:9>' Find_Result ada/nodes.lkt:18833
      Find_Result := No_Aspect;
      declare
         Collection : constant Internal_Aspect_Array_Access := Local_Self_Aspects;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind a Item_3
      --# expr-start 10870 '<FieldAccess for exists at nodes.lkt:18833:34>' Fld_6 ada/nodes.lkt:18833
Fld_6 := Item_3.Exists;
--# expr-done 10870
      if Fld_6 then
         Find_Result := Item_3; 
      end if;
   --# end
               exit when Fld_6;
         end loop;
      end;
--# expr-done 10871
Var_Expr := Find_Result;
if Var_Expr /= No_Aspect then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_2 := Scope_Result_1;
else
--# expr-start 10873 '<Cast to BaseTypeDecl at nodes.lkt:18834:13>' Cast_Result_1 ada/nodes.lkt:18834
--# expr-start 10872 '<FieldAccess for basic_decl at nodes.lkt:18834:13>' Fld_7 ada/nodes.lkt:18834
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_7 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10872
   if Fld_7.Node = null
      or else Fld_7.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
   else
         Cast_Result_1 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 10873
Var_Expr_4 := Cast_Result_1;
if Var_Expr_4 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bd Var_Expr_4
--# expr-start 10885 '<Let at nodes.lkt:18837:13>' Let_Result ada/nodes.lkt:18837
--# scope-start
--# expr-start 10878 '<If at nodes.lkt:18838:17>' If_Result_11 ada/nodes.lkt:18838
--# expr-start 10874 '<IsA BaseSubtypeDecl at nodes.lkt:18838:20>' Is_A ada/nodes.lkt:18838
Is_A := Var_Expr_4.Node /= null 
and then Var_Expr_4.Node.Kind in Ada_Base_Subtype_Decl; 
--# expr-done 10874
if Is_A then
   --# expr-start 10876 '<FieldAccess for get_type at nodes.lkt:18839:22>' Fld_8 ada/nodes.lkt:18839
--# expr-start 10875 '<Cast to BaseSubtypeDecl at nodes.lkt:18839:22>' Cast_Result_2 ada/nodes.lkt:18839
Cast_Expr_1 := Var_Expr_4; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Base_Subtype_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Base_Subtype_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_2 := No_Entity_Base_Subtype_Decl;
   end if;
--# expr-done 10875
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld_8 := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Cast_Result_2.Node, Origin => No_Bare_Ada_Node, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 10876
   If_Result_11 := Fld_8;
else
   --# expr-start 10877 '<FieldAccess for base_type at nodes.lkt:18840:22>' Fld_9 ada/nodes.lkt:18840
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_type'
Fld_9 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Type (Node => Var_Expr_4.Node, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 10877
   If_Result_11 := Fld_9;
end if;
--# expr-done 10878
Local_Typ := If_Result_11; 
--# bind typ Local_Typ
--# expr-start 10884 '<If at nodes.lkt:18842:13>' If_Result_13 ada/nodes.lkt:18842
--# expr-start 10881 '<BooleanBinaryOp Or at nodes.lkt:18842:16>' If_Result_12 ada/nodes.lkt:18842
--# expr-start 10879 '<IsNull at nodes.lkt:18842:16>' Is_Null ada/nodes.lkt:18842
Is_Null := Local_Typ.Node = null; 
--# expr-done 10879
if Is_Null then
   If_Result_12 := True;
else
   --# expr-start 10880 '<Eq at nodes.lkt:18842:31>' Is_Equiv ada/nodes.lkt:18842
Cast_Expr_2 := Local_Typ; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Cast_Expr_3 := Var_Expr_4; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
Is_Equiv := Equivalent (Cast_Result_3, Cast_Result_4); 
--# expr-done 10880
   If_Result_12 := Is_Equiv;
end if;
--# expr-done 10881
if If_Result_12 then
   If_Result_13 := No_Aspect;
else
   --# expr-start 10883 '<FieldAccess for get_aspect_on_parts at nodes.lkt:18845:17>' Fld_11 ada/nodes.lkt:18845
--# expr-start 10882 '<FieldAccess for name at nodes.lkt:18845:17>' Fld_10 ada/nodes.lkt:18845
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Defining_Name (Node => Local_Typ.Node.Base_Type_Decl_F_Name, Info => Local_Typ.Info);
--# expr-done 10882
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_aspect_on_parts
Fld_11 := Libadalang.Implementation.Defining_Name_P_Get_Aspect_On_Parts (Node => Fld_10.Node, Name => Name, Inherited => True, Previous_Parts_Only => Previous_Parts_Only, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_10.Info);
--# end
--# expr-done 10883
   If_Result_13 := Fld_11;
end if;
--# expr-done 10884
Let_Result := If_Result_13; 
--# end
--# expr-done 10885
Scope_Result_2 := Let_Result;
   --# end
   Result_Var_1 := Scope_Result_2;
else
   Result_Var_1 := No_Aspect;
end if;
   Result_Var_2 := Result_Var_1;
end if;
Let_Result_1 := Result_Var_2; 
--# end
--# expr-done 10886
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 10887
         Property_Result := Let_Result_2;
   --# end
      Finalizer_Scope_1244;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1244;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Get_Aspect_On_Parts;
--# end
--# property-start DefiningName.get_aspect ada/nodes.lkt:18874
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Get_Aspect
  (Node : Bare_Defining_Name
      ; Name : Symbol_Type
      ; Previous_Parts_Only : Boolean
         := False
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind previous_parts_only Previous_Parts_Only
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Aspect;
      Fld : Internal_Aspect;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Defining_Name_Defining_Name_P_Get_Aspect,
            Items    => new Mmz_Key_Array (1 ..  5))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Defining_Name,
                                As_Bare_Defining_Name => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Symbol_Type,
                                      As_Symbol_Type => Name);
               Mmz_K.Items (3) := (Kind => Mmz_Boolean,
                                      As_Boolean => Previous_Parts_Only);
               Mmz_K.Items (4) := (Kind => Mmz_Boolean,
                                      As_Boolean => Imprecise_Fallback);
               Mmz_K.Items (5) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Aspect;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 10888 '<FieldAccess for get_aspect_on_parts at nodes.lkt:18875:9>' Fld ada/nodes.lkt:18875
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_aspect_on_parts
Fld := Libadalang.Implementation.Defining_Name_P_Get_Aspect_On_Parts (Node => Ent.Node, Name => Name, Inherited => False, Previous_Parts_Only => Previous_Parts_Only, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10888
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Aspect,
                        As_Internal_Aspect => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Defining_Name_P_Get_Aspect;
--# end
--# property-start DefiningName.has_aspect ada/nodes.lkt:18889
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Has_Aspect
  (Node : Bare_Defining_Name
      ; Name : Symbol_Type
      ; Previous_Parts_Only : Boolean
         := False
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind previous_parts_only Previous_Parts_Only
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
            procedure Finalizer_Scope_3330 with Inline_Always;
      Local_A : Internal_Aspect;
Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Aspect;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Not_Val : Boolean;
Fld_5 : Big_Integer_Type;
Big_Int : Big_Integer_Type;
Is_Equal : Boolean;
If_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Fld_6 : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Boolean;
Let_Result : Boolean;
            procedure Finalizer_Scope_3330 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Big_Int);
            end Finalizer_Scope_3330;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10903 '<Let at nodes.lkt:18890:9>' Let_Result ada/nodes.lkt:18890
--# scope-start
--# expr-start 10889 '<FieldAccess for get_aspect at nodes.lkt:18890:17>' Fld ada/nodes.lkt:18890
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_aspect
Fld := Libadalang.Implementation.Defining_Name_P_Get_Aspect (Node => Ent.Node, Name => Name, Previous_Parts_Only => Previous_Parts_Only, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10889
Local_A := Fld; 
--# bind a Local_A
--# expr-start 10902 '<BooleanBinaryOp And at nodes.lkt:18892:9>' If_Result_2 ada/nodes.lkt:18892
--# expr-start 10890 '<FieldAccess for exists at nodes.lkt:18892:9>' Fld_1 ada/nodes.lkt:18892
Fld_1 := Local_A.Exists;
--# expr-done 10890
if Fld_1 then
   --# expr-start 10901 '<If at nodes.lkt:18894:13>' If_Result_1 ada/nodes.lkt:18894
--# expr-start 10891 '<FieldAccess for is_contract_aspect at nodes.lkt:18894:16>' Fld_6 ada/nodes.lkt:18894
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.is_contract_aspect
Fld_6 := Libadalang.Implementation.Ada_Node_P_Is_Contract_Aspect (Node => Self, Name => Name);
--# end
--# expr-done 10891
if Fld_6 then
   If_Result_1 := True;
else
--# expr-start 10892 '<FieldAccess for value at nodes.lkt:18901:17>' Fld_2 ada/nodes.lkt:18901
Fld_2 := Local_A.Value;
--# expr-done 10892
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind value Var_Expr_0
--# expr-start 10900 '<BooleanBinaryOp Or at nodes.lkt:18907:21>' If_Result ada/nodes.lkt:18907
--# expr-start 10896 '<Not at nodes.lkt:18907:21>' Not_Val ada/nodes.lkt:18907
--# expr-start 10895 '<Eq at nodes.lkt:18907:21>' Is_Equiv ada/nodes.lkt:18907
--# expr-start 10893 '<FieldAccess for expression_type at nodes.lkt:18907:21>' Fld_3 ada/nodes.lkt:18907
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_3 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10893
      Cast_Result := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
--# expr-start 10894 '<FieldAccess for bool_type at nodes.lkt:18907:48>' Fld_4 ada/nodes.lkt:18907
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_4 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 10894
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 10895
Not_Val := not (Is_Equiv); 
--# expr-done 10896
if Not_Val then
   If_Result := True;
else
   --# expr-start 10899 '<Eq at nodes.lkt:18908:24>' Is_Equal ada/nodes.lkt:18908
--# expr-start 10897 '<FieldAccess for eval_as_int at nodes.lkt:18908:24>' Fld_5 ada/nodes.lkt:18908
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_5 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10897
--# expr-start 10898 '<BigInteger 1 at nodes.lkt:18908:47>' Big_Int ada/nodes.lkt:18908
Big_Int := Create_Big_Integer ("1"); 
--# expr-done 10898
Is_Equal := Equivalent (Fld_5, Big_Int); 
--# expr-done 10899
   If_Result := Is_Equal;
end if;
--# expr-done 10900
Scope_Result := If_Result;
   --# end
      Finalizer_Scope_3330;
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
   If_Result_1 := Result_Var;
end if;
--# expr-done 10901
   If_Result_2 := If_Result_1;
else
   If_Result_2 := False;
end if;
--# expr-done 10902
Let_Result := If_Result_2; 
--# end
--# expr-done 10903
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3330;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Has_Aspect;
--# end
--# property-start DefiningName.is_valid_pragma_for_name ada/nodes.lkt:18917
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Is_Valid_Pragma_For_Name
  (Node : Bare_Defining_Name
      ; Name : Symbol_Type
      ; Decl : Internal_Entity
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind decl Decl
   Property_Result : Boolean;
            procedure Finalizer_Scope_3331 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Pragma_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Pragma_Node;
Fld : Internal_Entity_Identifier;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Defining_Name_Array_Access;
Cast_Expr_1 : Internal_Entity_Defining_Name;
Cast_Result_1 : Internal_Entity;
Cast_Expr_2 : Internal_Entity_Defining_Name;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
Find_Result : Internal_Entity_Defining_Name;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
Fld_3 : Bare_Pragma_Node;
Node_Comp : Boolean;
If_Result_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
            procedure Finalizer_Scope_3331 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_3331;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 10904 '<Cast to Pragma at nodes.lkt:18918:9>' Cast_Result ada/nodes.lkt:18918
Cast_Expr := Decl; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result := Create_Internal_Entity_Pragma_Node
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Pragma_Node;
   end if;
--# expr-done 10904
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Pragma_Node then
   --# scope-start
   --# bind p Var_Expr_0
--# expr-start 10915 '<BooleanBinaryOp And at nodes.lkt:18920:13>' If_Result_1 ada/nodes.lkt:18920
--# expr-start 10912 '<BooleanBinaryOp And at nodes.lkt:18920:13>' If_Result ada/nodes.lkt:18920
--# expr-start 10906 '<FieldAccess for name_is at nodes.lkt:18922:17>' Fld_1 ada/nodes.lkt:18922
--# expr-start 10905 '<FieldAccess for id at nodes.lkt:18922:17>' Fld ada/nodes.lkt:18922
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Identifier (Node => Var_Expr_0.Node.Pragma_Node_F_Id, Info => Var_Expr_0.Info);
--# expr-done 10905
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_1 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld.Node, Sym => Name);
--# end
--# expr-done 10906
if Fld_1 then
   --# expr-start 10911 '<Not at nodes.lkt:18926:17>' Not_Val ada/nodes.lkt:18926
--# expr-start 10910 '<IsNull at nodes.lkt:18926:21>' Is_Null ada/nodes.lkt:18926
--# expr-start 10909 '<Find at nodes.lkt:18926:21>' Find_Result ada/nodes.lkt:18926
   --# expr-start 10907 '<FieldAccess for associated_entities at nodes.lkt:18926:21>' Fld_2 ada/nodes.lkt:18926
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.associated_entities
Fld_2 := Libadalang.Implementation.Pragma_Node_P_Associated_Entities (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 10907
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_2;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind d Item_1
      --# expr-start 10908 '<Eq at nodes.lkt:18926:57>' Is_Equiv ada/nodes.lkt:18926
Cast_Expr_1 := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Cast_Expr_2 := Item_1; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 10908
      if Is_Equiv then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Is_Equiv;
         end loop;
      end;
--# expr-done 10909
Is_Null := Find_Result.Node = null; 
--# expr-done 10910
Not_Val := not (Is_Null); 
--# expr-done 10911
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 10912
if If_Result then
   --# expr-start 10914 '<OrderingTest '"'"'lt'"'"' at nodes.lkt:18930:17>' Node_Comp ada/nodes.lkt:18930
--# expr-start 10913 '<FieldAccess for node at nodes.lkt:18930:24>' Fld_3 ada/nodes.lkt:18930
Fld_3 := Var_Expr_0.Node;
--# expr-done 10913
Node_Comp := Compare (Self, Self, Fld_3, Less_Than); 
--# expr-done 10914
   If_Result_1 := Node_Comp;
else
   If_Result_1 := False;
end if;
--# expr-done 10915
Scope_Result := If_Result_1;
   --# end
      Finalizer_Scope_3331;
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3331;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Is_Valid_Pragma_For_Name;
--# end
--# property-start DefiningName.find_valid_pragma_for_name ada/nodes.lkt:18939
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Find_Valid_Pragma_For_Name
  (Node : Bare_Defining_Name
      ; Name : Symbol_Type
      ; Regions : Internal_Entity_Ada_Node_List_Array_Access
      ; Region_Index : Integer
         := 0
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Pragma_Node
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind regions Regions
   --# bind region_index Region_Index
   Property_Result : Internal_Entity_Pragma_Node;
      Var_Expr_0 : Internal_Entity_Ada_Node_List;
Var_Expr : Internal_Entity_Pragma_Node;
Get_Result : Internal_Entity_Ada_Node_List;
Saved : Internal_Entity_Ada_Node_List;
Fld : Bare_Ada_Node_List;
Fld_1 : Internal_Entity_Info;
Item_1 : Internal_Entity;
Bare_Item_1 : Bare_Ada_Node;
Fld_2 : Boolean;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Find_Result : Internal_Entity;
Cast_Result : Internal_Entity_Pragma_Node;
Scope_Result : Internal_Entity_Pragma_Node;
Arith_Result : Integer;
Fld_3 : Internal_Entity_Pragma_Node;
Result_Var : Internal_Entity_Pragma_Node;
Scope_Result_1 : Internal_Entity_Pragma_Node;
Result_Var_1 : Internal_Entity_Pragma_Node;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 10916 '<at at nodes.lkt:18944:9>' Get_Result ada/nodes.lkt:18944
Get_Result := Get (Self, Regions, Region_Index, True); 
--# expr-done 10916
Var_Expr_0 := Get_Result;
if Var_Expr_0 /= No_Entity_Ada_Node_List then
   --# scope-start
   --# bind r Var_Expr_0
--# expr-start 10919 '<Cast to Pragma at nodes.lkt:18946:13>' Cast_Result ada/nodes.lkt:18946
--# expr-start 10918 '<Find at nodes.lkt:18946:13>' Find_Result ada/nodes.lkt:18946
Saved := Var_Expr_0; 
Fld := Saved.Node;
      Find_Result := No_Entity;
      if Fld = null then
      Find_Result := No_Entity;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_1 := Saved.Info;
As_Entity := (Info => Fld_1, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind d Item_1
      --# expr-start 10917 '<FieldAccess for is_valid_pragma_for_name at nodes.lkt:18946:27>' Fld_2 ada/nodes.lkt:18946
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.is_valid_pragma_for_name
Fld_2 := Libadalang.Implementation.Defining_Name_P_Is_Valid_Pragma_For_Name (Node => Ent.Node, Name => Name, Decl => Item_1, E_Info => Ent.Info);
--# end
--# expr-done 10917
      if Fld_2 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Fld_2;
         end loop;
      end;
      end if;
--# expr-done 10918
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result := Create_Internal_Entity_Pragma_Node
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result := No_Entity_Pragma_Node;
   end if;
--# expr-done 10919
Var_Expr := Cast_Result;
if Var_Expr /= No_Entity_Pragma_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 10921 '<FieldAccess for find_valid_pragma_for_name at nodes.lkt:18947:17>' Fld_3 ada/nodes.lkt:18947
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10920 '<Arithmetic + at nodes.lkt:18950:17>' Arith_Result ada/nodes.lkt:18950
Arith_Result := (Region_Index + 1); 
--# expr-done 10920
--# property-call-start DefiningName.find_valid_pragma_for_name
Fld_3 := Libadalang.Implementation.Defining_Name_P_Find_Valid_Pragma_For_Name (Node => Ent.Node, Name => Name, Regions => Regions, Region_Index => Arith_Result, E_Info => Ent.Info);
--# end
--# expr-done 10921
   Result_Var := Fld_3;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Pragma_Node;
end if;
         Property_Result := Result_Var_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Find_Valid_Pragma_For_Name;
--# end
--# property-start DefiningName.get_pragma ada/nodes.lkt:18960
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Get_Pragma
  (Node : Bare_Defining_Name
      ; Name : Symbol_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Pragma_Node
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   Property_Result : Internal_Entity_Pragma_Node;
            procedure Finalizer_Scope_1249 with Inline_Always;
      Local_Bd : Internal_Entity_Basic_Decl;
Match_0 : Internal_Entity_Enum_Literal_Decl;
Match_1 : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Pragma_Node_List;
Var_Expr : Internal_Entity_Pragma_Node;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity;
Fld_2 : Internal_Entity;
Fld_3 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Enum_Literal_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Pragma_Node_List;
Saved : Internal_Entity_Pragma_Node_List;
Fld_5 : Bare_Pragma_Node_List;
Fld_6 : Internal_Entity_Info;
Item_1 : Internal_Entity_Pragma_Node;
Bare_Item_1 : Bare_Pragma_Node;
Fld_7 : Internal_Entity_Identifier;
Fld_8 : Boolean;
As_Entity : Internal_Entity_Pragma_Node;
Is_Null : Boolean;
If_Result : Internal_Entity_Pragma_Node;
Find_Result : Internal_Entity_Pragma_Node;
Scope_Result_2 : Internal_Entity_Pragma_Node;
Result_Var : Internal_Entity_Pragma_Node;
Scope_Result_3 : Internal_Entity_Pragma_Node;
Fld_9 : Internal_Entity_Ada_Node_List_Array_Access;
Fld_10 : Internal_Entity_Pragma_Node;
Result_Var_1 : Internal_Entity_Pragma_Node;
Let_Result_2 : Internal_Entity_Pragma_Node;
            procedure Finalizer_Scope_1249 is
            begin
                     Dec_Ref (Fld_9);
            end Finalizer_Scope_1249;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10934 '<Let at nodes.lkt:18961:9>' Let_Result_2 ada/nodes.lkt:18961
--# scope-start
--# expr-start 10927 '<Match at nodes.lkt:18961:18>' Match_Result ada/nodes.lkt:18961
--# expr-start 10922 '<FieldAccess for basic_decl at nodes.lkt:18961:24>' Fld ada/nodes.lkt:18961
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10922
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Enum_Literal_Decl .. Ada_Synthetic_Char_Enum_Lit =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Enum_Literal_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind eld Match_0
--# expr-start 10926 '<Cast to BasicDecl at nodes.lkt:18965:17>' Cast_Result ada/nodes.lkt:18965
--# expr-start 10925 '<parent at nodes.lkt:18965:17>' Fld_3 ada/nodes.lkt:18965
--# expr-start 10924 '<parent at nodes.lkt:18965:17>' Fld_2 ada/nodes.lkt:18965
--# expr-start 10923 '<parent at nodes.lkt:18965:17>' Fld_1 ada/nodes.lkt:18965
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Match_0.Node, E_Info => Match_0.Info);
--# expr-done 10923
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# expr-done 10924
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# expr-done 10925
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10926
Let_Result := Cast_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl .. Ada_Entry_Decl | Ada_Generic_Subp_Internal .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind o Match_1
Let_Result_1 := Match_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 10927
Local_Bd := Match_Result; 
--# bind bd Local_Bd
--# expr-start 10928 '<FieldAccess for library_item_pragmas at nodes.lkt:18970:9>' Fld_4 ada/nodes.lkt:18970
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.library_item_pragmas
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Library_Item_Pragmas (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 10928
Var_Expr_0 := Fld_4;
if Var_Expr_0 /= No_Entity_Pragma_Node_List then
   --# scope-start
   --# bind plist Var_Expr_0
--# expr-start 10931 '<Find at nodes.lkt:18972:13>' Find_Result ada/nodes.lkt:18972
Saved := Var_Expr_0; 
Fld_5 := Saved.Node;
      Find_Result := No_Entity_Pragma_Node;
      if Fld_5 = null then
      Find_Result := No_Entity_Pragma_Node;
      else
      declare
         Collection : constant Bare_Pragma_Node_List := Fld_5;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Pragma_Node;
else
Fld_6 := Saved.Info;
As_Entity := (Info => Fld_6, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind p Item_1
      --# expr-start 10930 '<FieldAccess for name_is at nodes.lkt:18974:24>' Fld_8 ada/nodes.lkt:18974
--# expr-start 10929 '<FieldAccess for id at nodes.lkt:18974:24>' Fld_7 ada/nodes.lkt:18974
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Identifier (Node => Item_1.Node.Pragma_Node_F_Id, Info => Item_1.Info);
--# expr-done 10929
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_8 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_7.Node, Sym => Name);
--# end
--# expr-done 10930
      if Fld_8 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Fld_8;
         end loop;
      end;
      end if;
--# expr-done 10931
Scope_Result_2 := Find_Result;
   --# end
   Result_Var := Scope_Result_2;
else
   Result_Var := No_Entity_Pragma_Node;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Pragma_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_3 := Var_Expr;
   --# end
   Result_Var_1 := Scope_Result_3;
else
   --# expr-start 10933 '<FieldAccess for find_valid_pragma_for_name at nodes.lkt:18978:9>' Fld_10 ada/nodes.lkt:18978
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10932 '<FieldAccess for pragma_regions at nodes.lkt:18979:43>' Fld_9 ada/nodes.lkt:18979
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.pragma_regions
Fld_9 := Libadalang.Implementation.Basic_Decl_P_Pragma_Regions (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 10932
--# property-call-start DefiningName.find_valid_pragma_for_name
Fld_10 := Libadalang.Implementation.Defining_Name_P_Find_Valid_Pragma_For_Name (Node => Ent.Node, Name => Name, Regions => Fld_9, E_Info => Ent.Info);
--# end
--# expr-done 10933
   Result_Var_1 := Fld_10;
end if;
Let_Result_2 := Result_Var_1; 
--# end
--# expr-done 10934
         Property_Result := Let_Result_2;
   --# end
      Finalizer_Scope_1249;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1249;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Get_Pragma;
--# end
--# property-start DefiningName.get_representation_clause ada/nodes.lkt:18986
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Get_Representation_Clause
  (Node : Bare_Defining_Name
      ; Name : Symbol_Type
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Attribute_Def_Clause
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_Attribute_Def_Clause;
      Var_Expr_1 : Internal_Entity_Attribute_Def_Clause;
Local_Attr : Internal_Entity_Attribute_Ref;
Var_Expr_259 : Bare_Declarative_Part;
Fld : Bare_Declarative_Part;
Fld_1 : Bare_Ada_Node_List;
As_Entity : Internal_Entity_Ada_Node_List;
Is_Null : Boolean;
If_Result : Internal_Entity_Ada_Node_List;
Fld_2 : Bare_Ada_Node_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Attribute_Def_Clause;
Fld_4 : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Attribute_Ref;
Fld_5 : Internal_Entity_Identifier;
Fld_6 : Boolean;
Fld_7 : Internal_Entity_Name;
Fld_8 : Internal_Entity_Defining_Name;
Cast_Result_2 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Defining_Name;
Cast_Result_3 : Internal_Entity;
Is_Equiv : Boolean;
If_Result_1 : Boolean;
Let_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity;
Find_Result : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Cast_Result_4 : Internal_Entity_Attribute_Def_Clause;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10949 '<Cast to AttributeDefClause at nodes.lkt:18987:9>' Cast_Result_4 ada/nodes.lkt:18987
--# expr-start 10935 '<FieldAccess for declarative_scope at nodes.lkt:18987:9>' Fld ada/nodes.lkt:18987
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 10935
Var_Expr_259 := Fld;
if Var_Expr_259 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 10948 '<Find at nodes.lkt:18987:9>' Find_Result ada/nodes.lkt:18987
   --# expr-start 10937 '<as_entity at nodes.lkt:18987:9>' If_Result ada/nodes.lkt:18987
--# expr-start 10936 '<FieldAccess for decls at nodes.lkt:18987:9>' Fld_1 ada/nodes.lkt:18987
      if Var_Expr_259 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Var_Expr_259.Declarative_Part_F_Decls;
--# expr-done 10936
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Ada_Node_List;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 10937
Fld_2 := If_Result.Node;
      Find_Result := No_Entity;
      if Fld_2 = null then
      Find_Result := No_Entity;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity;
else
Fld_3 := If_Result.Info;
As_Entity_1 := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result_2 := As_Entity_1;
end if;
                  Item_0 := If_Result_2; 
   --# scope-start
               --# bind d Item_0
--# expr-start 10938 '<Cast to AttributeDefClause at nodes.lkt:18989:13>' Cast_Result ada/nodes.lkt:18989
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Attribute_Def_Clause_Range
   then
      Cast_Result := Create_Internal_Entity_Attribute_Def_Clause
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Attribute_Def_Clause;
   end if;
--# expr-done 10938
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Attribute_Def_Clause then
   --# scope-start
   --# bind p Var_Expr_1
--# expr-start 10947 '<Let at nodes.lkt:18991:21>' Let_Result ada/nodes.lkt:18991
--# scope-start
--# expr-start 10940 '<Cast to AttributeRef at nodes.lkt:18991:32>' Cast_Result_1 ada/nodes.lkt:18991
--# expr-start 10939 '<FieldAccess for attribute_expr at nodes.lkt:18991:32>' Fld_4 ada/nodes.lkt:18991
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Var_Expr_1.Node.Attribute_Def_Clause_F_Attribute_Expr, Info => Var_Expr_1.Info);
--# expr-done 10939
   if Fld_4.Node = null
      or else Fld_4.Node.Kind in Ada_Attribute_Ref_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Attribute_Ref
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10940
Local_Attr := Cast_Result_1; 
--# bind attr Local_Attr
--# expr-start 10946 '<BooleanBinaryOp And at nodes.lkt:18993:21>' If_Result_1 ada/nodes.lkt:18993
--# expr-start 10942 '<FieldAccess for name_is at nodes.lkt:18993:21>' Fld_6 ada/nodes.lkt:18993
--# expr-start 10941 '<FieldAccess for attribute at nodes.lkt:18993:21>' Fld_5 ada/nodes.lkt:18993
      if Local_Attr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Identifier (Node => Local_Attr.Node.Attribute_Ref_F_Attribute, Info => Local_Attr.Info);
--# expr-done 10941
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_6 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_5.Node, Sym => Name);
--# end
--# expr-done 10942
if Fld_6 then
   --# expr-start 10945 '<Eq at nodes.lkt:18994:25>' Is_Equiv ada/nodes.lkt:18994
--# expr-start 10944 '<FieldAccess for referenced_defining_name at nodes.lkt:18994:25>' Fld_8 ada/nodes.lkt:18994
--# expr-start 10943 '<FieldAccess for prefix at nodes.lkt:18994:25>' Fld_7 ada/nodes.lkt:18994
      if Local_Attr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Name (Node => Local_Attr.Node.Attribute_Ref_F_Prefix, Info => Local_Attr.Info);
--# expr-done 10943
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_defining_name
Fld_8 := Libadalang.Implementation.Name_P_Referenced_Defining_Name (Node => Fld_7.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_7.Info);
--# end
--# expr-done 10944
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
Cast_Expr_1 := Ent; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 10945
   If_Result_1 := Is_Equiv;
else
   If_Result_1 := False;
end if;
--# expr-done 10946
Let_Result := If_Result_1; 
--# end
--# expr-done 10947
Scope_Result := Let_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
      end if;
--# expr-done 10948
Scope_Result_1 := Find_Result;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
   if Result_Var_1.Node = null
      or else Result_Var_1.Node.Kind in Ada_Attribute_Def_Clause_Range
   then
      Cast_Result_4 := Create_Internal_Entity_Attribute_Def_Clause
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
   else
         Cast_Result_4 := No_Entity_Attribute_Def_Clause;
   end if;
--# expr-done 10949
         Property_Result := Cast_Result_4;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Get_Representation_Clause;
--# end
--# property-start DefiningName.get_at_clause ada/nodes.lkt:19003
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Get_At_Clause
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_At_Clause
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Entity_At_Clause;
      Var_Expr_1 : Internal_Entity_At_Clause;
Var_Expr_260 : Bare_Declarative_Part;
Fld : Bare_Declarative_Part;
Fld_1 : Bare_Ada_Node_List;
As_Entity : Internal_Entity_Ada_Node_List;
Is_Null : Boolean;
If_Result : Internal_Entity_Ada_Node_List;
Fld_2 : Bare_Ada_Node_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_At_Clause;
Fld_4 : Internal_Entity_Base_Id;
Fld_5 : Internal_Entity_Defining_Name;
Cast_Result_1 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Defining_Name;
Cast_Result_2 : Internal_Entity;
Is_Equiv : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Find_Result : Internal_Entity;
Scope_Result_1 : Internal_Entity;
Result_Var_1 : Internal_Entity;
Cast_Result_3 : Internal_Entity_At_Clause;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 10958 '<Cast to AtClause at nodes.lkt:19004:9>' Cast_Result_3 ada/nodes.lkt:19004
--# expr-start 10950 '<FieldAccess for declarative_scope at nodes.lkt:19004:9>' Fld ada/nodes.lkt:19004
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.declarative_scope
Fld := Libadalang.Implementation.Ada_Node_P_Declarative_Scope (Node => Ent.Node);
--# end
--# expr-done 10950
Var_Expr_260 := Fld;
if Var_Expr_260 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 10957 '<Find at nodes.lkt:19004:9>' Find_Result ada/nodes.lkt:19004
   --# expr-start 10952 '<as_entity at nodes.lkt:19004:9>' If_Result ada/nodes.lkt:19004
--# expr-start 10951 '<FieldAccess for decls at nodes.lkt:19004:9>' Fld_1 ada/nodes.lkt:19004
      if Var_Expr_260 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Var_Expr_260.Declarative_Part_F_Decls;
--# expr-done 10951
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Ada_Node_List;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 10952
Fld_2 := If_Result.Node;
      Find_Result := No_Entity;
      if Fld_2 = null then
      Find_Result := No_Entity;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_1 := Bare_Item_0 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
Fld_3 := If_Result.Info;
As_Entity_1 := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind d Item_0
--# expr-start 10953 '<Cast to AtClause at nodes.lkt:19006:13>' Cast_Result ada/nodes.lkt:19006
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_At_Clause_Range
   then
      Cast_Result := Create_Internal_Entity_At_Clause
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_At_Clause;
   end if;
--# expr-done 10953
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_At_Clause then
   --# scope-start
   --# bind p Var_Expr_1
--# expr-start 10956 '<Eq at nodes.lkt:19006:38>' Is_Equiv ada/nodes.lkt:19006
--# expr-start 10955 '<FieldAccess for referenced_defining_name at nodes.lkt:19006:38>' Fld_5 ada/nodes.lkt:19006
--# expr-start 10954 '<FieldAccess for name at nodes.lkt:19006:38>' Fld_4 ada/nodes.lkt:19006
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Base_Id (Node => Var_Expr_1.Node.At_Clause_F_Name, Info => Var_Expr_1.Info);
--# expr-done 10954
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_defining_name
Fld_5 := Libadalang.Implementation.Name_P_Referenced_Defining_Name (Node => Fld_4.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_4.Info);
--# end
--# expr-done 10955
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Cast_Expr_1 := Ent; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result_1, Cast_Result_2); 
--# expr-done 10956
Scope_Result := Is_Equiv;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
      end if;
--# expr-done 10957
Scope_Result_1 := Find_Result;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity;
end if;
   if Result_Var_1.Node = null
      or else Result_Var_1.Node.Kind in Ada_At_Clause_Range
   then
      Cast_Result_3 := Create_Internal_Entity_At_Clause
        (Node => Result_Var_1.Node,
         Info => Result_Var_1.Info);
   else
         Cast_Result_3 := No_Entity_At_Clause;
   end if;
--# expr-done 10958
         Property_Result := Cast_Result_3;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Get_At_Clause;
--# end
--# property-start DefiningName.get_annotations_impl ada/nodes.lkt:19013
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Get_Annotations_Impl
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Aspect_Array_Access;
            procedure Finalizer_Scope_1252 with Inline_Always;
            procedure Finalizer_Scope_3349 with Inline_Always;
            procedure Finalizer_Scope_3351 with Inline_Always;
      Local_Bd : Internal_Entity_Basic_Decl;
Local_Pragmas : Internal_Aspect_Array_Access;
Match_0 : Internal_Entity_Enum_Literal_Decl;
Match_1 : Internal_Entity_Basic_Decl;
Local_Aspects : Internal_Aspect_Array_Access;
Var_Expr_261 : Internal_Entity_Aspect_Spec;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity;
Fld_2 : Internal_Entity;
Fld_3 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Enum_Literal_Decl;
Let_Result : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Let_Result_1 : Internal_Entity_Basic_Decl;
Scope_Result_1 : Internal_Entity_Basic_Decl;
Match_Result : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Ada_Node_List_Array_Access;
Saved : Internal_Entity_Ada_Node_List;
Fld_5 : Bare_Ada_Node_List;
Fld_6 : Internal_Entity_Info;
Item_1 : Internal_Entity;
Bare_Item_1 : Bare_Ada_Node;
Cast_Expr : Internal_Entity;
Cast_Result_3 : Internal_Entity_Pragma_Node;
Fld_7 : Internal_Entity_Base_Assoc_List;
Fld_8 : Bare_Base_Assoc_List;
Fld_9 : Internal_Entity_Info;
Get_Result : Bare_Base_Assoc;
As_Entity : Internal_Entity_Base_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Assoc;
Fld_10 : Internal_Entity_Expr;
New_Struct : Internal_Aspect;
As_Entity_1 : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity;
Sym : Symbol_Type;
Fld_11 : Boolean;
Map_Result : Internal_Aspect_Array_Access;
Map_Result_1 : Internal_Aspect_Array_Access;
Fld_12 : Internal_Entity_Aspect_Spec;
Fld_13 : Internal_Entity_Aspect_Assoc_List;
Fld_14 : Bare_Aspect_Assoc_List;
Fld_15 : Internal_Entity_Info;
Item_2 : Internal_Entity_Aspect_Assoc;
Bare_Item_2 : Bare_Aspect_Assoc;
Fld_16 : Internal_Entity_Expr;
Cast_Result_4 : Internal_Entity_Base_Aggregate;
Fld_17 : Internal_Entity_Assoc_List;
Fld_18 : Bare_Assoc_List;
Fld_19 : Internal_Entity_Info;
Get_Result_1 : Bare_Basic_Assoc;
As_Entity_2 : Internal_Entity_Basic_Assoc;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Basic_Assoc;
Fld_20 : Internal_Entity_Expr;
Cast_Expr_1 : Internal_Entity_Aspect_Assoc;
Cast_Result_5 : Internal_Entity;
New_Struct_1 : Internal_Aspect;
As_Entity_3 : Internal_Entity_Aspect_Assoc;
Is_Null_3 : Boolean;
If_Result_3 : Internal_Entity_Aspect_Assoc;
Fld_21 : Internal_Entity_Name;
Sym_1 : Symbol_Type;
Fld_22 : Boolean;
Map_Result_2 : Internal_Aspect_Array_Access;
Scope_Result_2 : Internal_Aspect_Array_Access;
Result_Var : Internal_Aspect_Array_Access;
Concat_Result : Internal_Aspect_Array_Access;
Let_Result_2 : Internal_Aspect_Array_Access;
Let_Result_3 : Internal_Aspect_Array_Access;
Let_Result_4 : Internal_Aspect_Array_Access;
            procedure Finalizer_Scope_1252 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Local_Pragmas);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Aspects);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_1252;
            procedure Finalizer_Scope_3349 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3349;
            procedure Finalizer_Scope_3351 is
            begin
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_3351;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 10987 '<Let at nodes.lkt:19014:9>' Let_Result_4 ada/nodes.lkt:19014
--# scope-start
--# expr-start 10959 '<FieldAccess for basic_decl_internal at nodes.lkt:19014:18>' Fld ada/nodes.lkt:19014
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl_internal
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl_Internal (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10959
Local_Bd := Fld; 
--# bind bd Local_Bd
--# expr-start 10986 '<Let at nodes.lkt:19016:9>' Let_Result_3 ada/nodes.lkt:19016
--# scope-start
--# expr-start 10973 '<Mapcat at nodes.lkt:19017:13>' Map_Result_1 ada/nodes.lkt:19017
   --# expr-start 10965 '<FieldAccess for pragma_regions at nodes.lkt:19017:13>' Fld_4 ada/nodes.lkt:19017
--# expr-start 10964 '<Match at nodes.lkt:19017:13>' Match_Result ada/nodes.lkt:19017
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Local_Bd; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Enum_Literal_Decl .. Ada_Synthetic_Char_Enum_Lit =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Enum_Literal_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind eld Match_0
--# expr-start 10963 '<Cast to BasicDecl at nodes.lkt:19021:21>' Cast_Result ada/nodes.lkt:19021
--# expr-start 10962 '<parent at nodes.lkt:19021:21>' Fld_3 ada/nodes.lkt:19021
--# expr-start 10961 '<parent at nodes.lkt:19021:21>' Fld_2 ada/nodes.lkt:19021
--# expr-start 10960 '<parent at nodes.lkt:19021:21>' Fld_1 ada/nodes.lkt:19021
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Match_0.Node, E_Info => Match_0.Info);
--# expr-done 10960
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# expr-done 10961
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# expr-done 10962
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 10963
Let_Result := Cast_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl .. Ada_Entry_Decl | Ada_Generic_Subp_Internal .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind o Match_1
Let_Result_1 := Match_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 10964
      if Match_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.pragma_regions
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Pragma_Regions (Node => Match_Result.Node, E_Info => Match_Result.Info);
--# end
--# expr-done 10965
      declare
         Map_Result_1_Vec : Internal_Aspect_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Ada_Node_List_Array_Access := Fld_4;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind r Item_0
      --# expr-start 10972 '<Map at nodes.lkt:19027:17>' Map_Result ada/nodes.lkt:19027
Saved := Item_0; 
Fld_5 := Saved.Node;
      declare
         Map_Result_Vec : Internal_Aspect_Vectors.Vector;
      begin
      if Fld_5 = null then
      Map_Result := Create_Internal_Aspect_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Fld_5;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_1 := Bare_Item_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity;
else
Fld_6 := Saved.Info;
As_Entity_1 := (Info => Fld_6, Node => Bare_Item_1); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_1 := If_Result_1; 
   --# scope-start
               --# bind d Item_1
         --# expr-start 10967 '<FieldAccess for is_valid_pragma_for_name at nodes.lkt:19035:28>' Fld_11 ada/nodes.lkt:19035
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10966 '<Symbol Annotate at nodes.lkt:19035:58>' Sym ada/nodes.lkt:19035
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Annotate); 
--# expr-done 10966
--# property-call-start DefiningName.is_valid_pragma_for_name
Fld_11 := Libadalang.Implementation.Defining_Name_P_Is_Valid_Pragma_For_Name (Node => Ent.Node, Name => Sym, Decl => Item_1, E_Info => Ent.Info);
--# end
--# expr-done 10967
         if Fld_11 then
      --# expr-start 10971 '<New Aspect at nodes.lkt:19029:21>' New_Struct ada/nodes.lkt:19029
--# expr-start 10970 '<FieldAccess for assoc_expr at nodes.lkt:19032:31>' Fld_10 ada/nodes.lkt:19032
--# expr-start 10969 '<FieldAccess for args at nodes.lkt:19032:31>' Fld_7 ada/nodes.lkt:19032
--# expr-start 10968 '<Cast to Pragma at nodes.lkt:19032:31>' Cast_Result_3 ada/nodes.lkt:19032
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Pragma_Node
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_3 := No_Entity_Pragma_Node;
   end if;
--# expr-done 10968
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Base_Assoc_List (Node => Cast_Result_3.Node.Pragma_Node_F_Args, Info => Cast_Result_3.Info);
--# expr-done 10969
Fld_8 := Fld_7.Node;
Get_Result := Get (Self, Fld_8, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Base_Assoc;
else
Fld_9 := Fld_7.Info;
As_Entity := (Info => Fld_9, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_10 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 10970
New_Struct := (Exists => True, Inherited => False, Node => Item_1, Value => Fld_10); 
--# expr-done 10971
         declare
            Item_To_Append : constant Internal_Aspect := New_Struct;
         begin
            Internal_Aspect_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Aspect_Array
           (Items_Count => Natural (Internal_Aspect_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Aspect_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Aspect_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Aspect_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10972
         for Item_To_Append of
               Map_Result.Items
         loop
            Internal_Aspect_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_3349;
         end loop;
      end;
         Map_Result_1 := Create_Internal_Aspect_Array
           (Items_Count => Natural (Internal_Aspect_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Aspect_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Aspect_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Aspect_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 10973
Local_Pragmas := Map_Result_1; Inc_Ref (Local_Pragmas);
--# bind pragmas Local_Pragmas
--# expr-start 10985 '<Let at nodes.lkt:19039:9>' Let_Result_2 ada/nodes.lkt:19039
--# scope-start
--# expr-start 10974 '<FieldAccess for get_aspect_spec at nodes.lkt:19040:13>' Fld_12 ada/nodes.lkt:19040
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.get_aspect_spec'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Get_Aspect_Spec (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 10974
Var_Expr_261 := Fld_12;
if Var_Expr_261 /= No_Entity_Aspect_Spec then
   --# scope-start
--# expr-start 10984 '<Map at nodes.lkt:19040:13>' Map_Result_2 ada/nodes.lkt:19040
   --# expr-start 10975 '<FieldAccess for aspect_assocs at nodes.lkt:19040:13>' Fld_13 ada/nodes.lkt:19040
      if Var_Expr_261.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Aspect_Assoc_List (Node => Var_Expr_261.Node.Aspect_Spec_F_Aspect_Assocs, Info => Var_Expr_261.Info);
--# expr-done 10975
Fld_14 := Fld_13.Node;
      declare
         Map_Result_2_Vec : Internal_Aspect_Vectors.Vector;
      begin
      if Fld_14 = null then
      Map_Result_2 := Create_Internal_Aspect_Array (0);
      else
      declare
         Collection : constant Bare_Aspect_Assoc_List := Fld_14;
      begin
         for Untyped_Item_2 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_2 := Untyped_Item_2; 
Is_Null_3 := Bare_Item_2 = null; 
if Is_Null_3 then
   If_Result_3 := No_Entity_Aspect_Assoc;
else
Fld_15 := Fld_13.Info;
As_Entity_3 := (Info => Fld_15, Node => Bare_Item_2); 
   If_Result_3 := As_Entity_3;
end if;
                  Item_2 := If_Result_3; 
   --# scope-start
               --# bind asp Item_2
         --# expr-start 10978 '<FieldAccess for name_is at nodes.lkt:19048:26>' Fld_22 ada/nodes.lkt:19048
--# expr-start 10976 '<FieldAccess for id at nodes.lkt:19048:26>' Fld_21 ada/nodes.lkt:19048
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Create_Internal_Entity_Name (Node => Item_2.Node.Aspect_Assoc_F_Id, Info => Item_2.Info);
--# expr-done 10976
      if Fld_21.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 10977 '<Symbol Annotate at nodes.lkt:19048:41>' Sym_1 ada/nodes.lkt:19048
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Annotate); 
--# expr-done 10977
--# property-call-start Name.name_is
Fld_22 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_21.Node, Sym => Sym_1);
--# end
--# expr-done 10978
         if Fld_22 then
      --# expr-start 10983 '<New Aspect at nodes.lkt:19042:17>' New_Struct_1 ada/nodes.lkt:19042
Cast_Expr_1 := Item_2; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# expr-start 10982 '<FieldAccess for expr at nodes.lkt:19045:27>' Fld_20 ada/nodes.lkt:19045
--# expr-start 10981 '<FieldAccess for assocs at nodes.lkt:19045:27>' Fld_17 ada/nodes.lkt:19045
--# expr-start 10980 '<Cast to BaseAggregate at nodes.lkt:19045:27>' Cast_Result_4 ada/nodes.lkt:19045
--# expr-start 10979 '<FieldAccess for expr at nodes.lkt:19045:27>' Fld_16 ada/nodes.lkt:19045
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Create_Internal_Entity_Expr (Node => Item_2.Node.Aspect_Assoc_F_Expr, Info => Item_2.Info);
--# expr-done 10979
   if Fld_16.Node = null
      or else Fld_16.Node.Kind in Ada_Base_Aggregate
   then
      Cast_Result_4 := Create_Internal_Entity_Base_Aggregate
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
   else
         Cast_Result_4 := No_Entity_Base_Aggregate;
   end if;
--# expr-done 10980
      if Cast_Result_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity_Assoc_List (Node => Cast_Result_4.Node.Base_Aggregate_F_Assocs, Info => Cast_Result_4.Info);
--# expr-done 10981
Fld_18 := Fld_17.Node;
Get_Result_1 := Get (Self, Fld_18, 0, True); 
Is_Null_2 := Get_Result_1 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Basic_Assoc;
else
Fld_19 := Fld_17.Info;
As_Entity_2 := (Info => Fld_19, Node => Get_Result_1); 
   If_Result_2 := As_Entity_2;
end if;
      if If_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_20 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result_2.Node, E_Info => If_Result_2.Info);
--# end
--# expr-done 10982
New_Struct_1 := (Exists => True, Inherited => False, Node => Cast_Result_5, Value => Fld_20); 
--# expr-done 10983
         declare
            Item_To_Append : constant Internal_Aspect := New_Struct_1;
         begin
            Internal_Aspect_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result_2 := Create_Internal_Aspect_Array
           (Items_Count => Natural (Internal_Aspect_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Aspect_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Aspect_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Aspect_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 10984
Scope_Result_2 := Map_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3351;
   Result_Var := Scope_Result_2;
else
   Result_Var := No_Internal_Aspect_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Aspects := Result_Var; Inc_Ref (Local_Aspects);
--# bind aspects Local_Aspects
Concat_Result := Concat (Local_Pragmas, Local_Aspects); 
Let_Result_2 := Concat_Result; Inc_Ref (Let_Result_2);
--# end
--# expr-done 10985
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 10986
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 10987
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1252;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1252;
                     Finalizer_Scope_3349;
                     Finalizer_Scope_3351;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Get_Annotations_Impl;
--# end
--# property-start DefiningName.get_annotations ada/nodes.lkt:19067
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Get_Annotations
  (Node : Bare_Defining_Name
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect_Array_Access
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Aspect_Array_Access;
            procedure Finalizer_Scope_1253 with Inline_Always;
            procedure Finalizer_Scope_3353 with Inline_Always;
            procedure Finalizer_Scope_3354 with Inline_Always;
      Local_Self_Annotations : Internal_Aspect_Array_Access;
Local_Inherited_Annotations : Internal_Aspect_Array_Access;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Local_Typ : Internal_Entity_Base_Type_Decl;
Local_Config_Annotations : Internal_Aspect_Array_Access;
Fld : Internal_Entity_Defining_Name_Array_Access;
Fld_1 : Internal_Aspect_Array_Access;
Map_Result : Internal_Aspect_Array_Access;
Fld_2 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Subtype_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Type_Decl;
Is_A : Boolean;
If_Result : Internal_Entity_Base_Type_Decl;
Fld_5 : Internal_Entity_Defining_Name;
Fld_6 : Internal_Aspect_Array_Access;
Fld_7 : Boolean;
Fld_8 : Internal_Entity;
Fld_9 : Internal_Entity_Expr;
New_Struct : Internal_Aspect;
Map_Result_1 : Internal_Aspect_Array_Access;
Is_Null : Boolean;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Is_Equiv : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Internal_Aspect_Array_Access;
Let_Result : Internal_Aspect_Array_Access;
Scope_Result : Internal_Aspect_Array_Access;
Result_Var : Internal_Aspect_Array_Access;
Fld_10 : Bare_Compilation_Unit;
Sym : Symbol_Type;
Fld_11 : Internal_Entity_Pragma_Node_Array_Access;
Fld_12 : Internal_Entity_Base_Assoc_List;
Fld_13 : Bare_Base_Assoc_List;
Fld_14 : Internal_Entity_Info;
Get_Result : Bare_Base_Assoc;
As_Entity : Internal_Entity_Base_Assoc;
Is_Null_1 : Boolean;
If_Result_3 : Internal_Entity_Base_Assoc;
Fld_15 : Internal_Entity_Expr;
Cast_Expr_3 : Internal_Entity_Pragma_Node;
Cast_Result_4 : Internal_Entity;
New_Struct_1 : Internal_Aspect;
Map_Result_2 : Internal_Aspect_Array_Access;
Concat_Result : Internal_Aspect_Array_Access;
Concat_Result_1 : Internal_Aspect_Array_Access;
Unique_Array : Internal_Aspect_Array_Access;
Let_Result_1 : Internal_Aspect_Array_Access;
Let_Result_2 : Internal_Aspect_Array_Access;
Let_Result_3 : Internal_Aspect_Array_Access;
            procedure Finalizer_Scope_1253 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Local_Self_Annotations);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Inherited_Annotations);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Local_Config_Annotations);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Unique_Array);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_1253;
            procedure Finalizer_Scope_3353 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3353;
            procedure Finalizer_Scope_3354 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_3354;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 11020 '<Let at nodes.lkt:19068:9>' Let_Result_3 ada/nodes.lkt:19068
--# scope-start
--# expr-start 10990 '<Mapcat at nodes.lkt:19069:13>' Map_Result ada/nodes.lkt:19069
   --# expr-start 10988 '<FieldAccess for all_parts at nodes.lkt:19069:13>' Fld ada/nodes.lkt:19069
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.all_parts
Fld := Libadalang.Implementation.Defining_Name_P_All_Parts (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 10988
      declare
         Map_Result_Vec : Internal_Aspect_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 10989 '<FieldAccess for get_annotations_impl at nodes.lkt:19069:44>' Fld_1 ada/nodes.lkt:19069
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_annotations_impl
Fld_1 := Libadalang.Implementation.Defining_Name_P_Get_Annotations_Impl (Node => Item_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Item_0.Info);
--# end
--# expr-done 10989
         for Item_To_Append of
               Fld_1.Items
         loop
            Internal_Aspect_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_3353;
         end loop;
      end;
         Map_Result := Create_Internal_Aspect_Array
           (Items_Count => Natural (Internal_Aspect_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Aspect_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Aspect_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Aspect_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 10990
Local_Self_Annotations := Map_Result; Inc_Ref (Local_Self_Annotations);
--# bind self_annotations Local_Self_Annotations
--# expr-start 11019 '<Let at nodes.lkt:19070:9>' Let_Result_2 ada/nodes.lkt:19070
--# scope-start
--# expr-start 10992 '<Cast to BaseTypeDecl at nodes.lkt:19071:13>' Cast_Result ada/nodes.lkt:19071
--# expr-start 10991 '<FieldAccess for basic_decl at nodes.lkt:19071:13>' Fld_2 ada/nodes.lkt:19071
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 10991
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 10992
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bd Var_Expr_1
--# expr-start 11009 '<Let at nodes.lkt:19073:21>' Let_Result ada/nodes.lkt:19073
--# scope-start
--# expr-start 10997 '<If at nodes.lkt:19074:25>' If_Result ada/nodes.lkt:19074
--# expr-start 10993 '<IsA BaseSubtypeDecl at nodes.lkt:19074:28>' Is_A ada/nodes.lkt:19074
Is_A := Var_Expr_1.Node /= null 
and then Var_Expr_1.Node.Kind in Ada_Base_Subtype_Decl; 
--# expr-done 10993
if Is_A then
   --# expr-start 10995 '<FieldAccess for get_type at nodes.lkt:19075:30>' Fld_3 ada/nodes.lkt:19075
--# expr-start 10994 '<Cast to BaseSubtypeDecl at nodes.lkt:19075:30>' Cast_Result_1 ada/nodes.lkt:19075
Cast_Expr := Var_Expr_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Subtype_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Subtype_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Base_Subtype_Decl;
   end if;
--# expr-done 10994
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubtypeDecl.get_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Subtype_Decl_P_Get_Type (Node => Cast_Result_1.Node, Origin => No_Bare_Ada_Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 10995
   If_Result := Fld_3;
else
   --# expr-start 10996 '<FieldAccess for base_type at nodes.lkt:19076:30>' Fld_4 ada/nodes.lkt:19076
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.base_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Base_Type (Node => Var_Expr_1.Node, Origin => No_Bare_Ada_Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 10996
   If_Result := Fld_4;
end if;
--# expr-done 10997
Local_Typ := If_Result; 
--# bind typ Local_Typ
--# expr-start 11008 '<If at nodes.lkt:19078:21>' If_Result_2 ada/nodes.lkt:19078
--# expr-start 11000 '<BooleanBinaryOp Or at nodes.lkt:19078:24>' If_Result_1 ada/nodes.lkt:19078
--# expr-start 10998 '<IsNull at nodes.lkt:19078:24>' Is_Null ada/nodes.lkt:19078
Is_Null := Local_Typ.Node = null; 
--# expr-done 10998
if Is_Null then
   If_Result_1 := True;
else
   --# expr-start 10999 '<Eq at nodes.lkt:19078:39>' Is_Equiv ada/nodes.lkt:19078
Cast_Expr_1 := Local_Typ; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Cast_Expr_2 := Var_Expr_1; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Is_Equiv := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 10999
   If_Result_1 := Is_Equiv;
end if;
--# expr-done 11000
if If_Result_1 then
   If_Result_2 := No_Internal_Aspect_Array_Type;
else
   --# expr-start 11007 '<Map at nodes.lkt:19080:25>' Map_Result_1 ada/nodes.lkt:19080
   --# expr-start 11002 '<FieldAccess for get_annotations at nodes.lkt:19080:25>' Fld_6 ada/nodes.lkt:19080
--# expr-start 11001 '<FieldAccess for name at nodes.lkt:19080:25>' Fld_5 ada/nodes.lkt:19080
      if Local_Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Defining_Name (Node => Local_Typ.Node.Base_Type_Decl_F_Name, Info => Local_Typ.Info);
--# expr-done 11001
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.get_annotations
Fld_6 := Libadalang.Implementation.Defining_Name_P_Get_Annotations (Node => Fld_5.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_5.Info);
--# end
--# expr-done 11002
      declare
         Map_Result_1_Vec : Internal_Aspect_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Aspect_Array_Access := Fld_6;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind a Item_2
      --# expr-start 11006 '<New Aspect at nodes.lkt:19082:29>' New_Struct ada/nodes.lkt:19082
--# expr-start 11003 '<FieldAccess for exists at nodes.lkt:19083:40>' Fld_7 ada/nodes.lkt:19083
Fld_7 := Item_2.Exists;
--# expr-done 11003
--# expr-start 11004 '<FieldAccess for node at nodes.lkt:19084:38>' Fld_8 ada/nodes.lkt:19084
Fld_8 := Item_2.Node;
--# expr-done 11004
--# expr-start 11005 '<FieldAccess for value at nodes.lkt:19085:39>' Fld_9 ada/nodes.lkt:19085
Fld_9 := Item_2.Value;
--# expr-done 11005
New_Struct := (Exists => Fld_7, Inherited => True, Node => Fld_8, Value => Fld_9); 
--# expr-done 11006
         declare
            Item_To_Append : constant Internal_Aspect := New_Struct;
         begin
            Internal_Aspect_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Aspect_Array
           (Items_Count => Natural (Internal_Aspect_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Aspect_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Aspect_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Aspect_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 11007
   If_Result_2 := Map_Result_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 11008
Let_Result := If_Result_2; Inc_Ref (Let_Result);
--# end
--# expr-done 11009
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3354;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Aspect_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Inherited_Annotations := Result_Var; Inc_Ref (Local_Inherited_Annotations);
--# bind inherited_annotations Local_Inherited_Annotations
--# expr-start 11018 '<Let at nodes.lkt:19091:9>' Let_Result_1 ada/nodes.lkt:19091
--# scope-start
--# expr-start 11016 '<Map at nodes.lkt:19092:13>' Map_Result_2 ada/nodes.lkt:19092
   --# expr-start 11012 '<FieldAccess for config_pragmas at nodes.lkt:19092:13>' Fld_11 ada/nodes.lkt:19092
--# expr-start 11010 '<FieldAccess for enclosing_compilation_unit at nodes.lkt:19092:13>' Fld_10 ada/nodes.lkt:19092
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.enclosing_compilation_unit
Fld_10 := Libadalang.Implementation.Ada_Node_P_Enclosing_Compilation_Unit (Node => Ent.Node);
--# end
--# expr-done 11010
      if Fld_10 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11011 '<Symbol Annotate at nodes.lkt:19092:62>' Sym ada/nodes.lkt:19092
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Annotate); 
--# expr-done 11011
--# property-call-start CompilationUnit.config_pragmas
Fld_11 := Libadalang.Implementation.Compilation_Unit_P_Config_Pragmas (Node => Fld_10, Name => Sym);
--# end
--# expr-done 11012
      declare
         Map_Result_2_Vec : Internal_Aspect_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Pragma_Node_Array_Access := Fld_11;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_3
      --# expr-start 11015 '<New Aspect at nodes.lkt:19094:17>' New_Struct_1 ada/nodes.lkt:19094
Cast_Expr_3 := Item_3; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
--# expr-start 11014 '<FieldAccess for assoc_expr at nodes.lkt:19097:27>' Fld_15 ada/nodes.lkt:19097
--# expr-start 11013 '<FieldAccess for args at nodes.lkt:19097:27>' Fld_12 ada/nodes.lkt:19097
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Base_Assoc_List (Node => Item_3.Node.Pragma_Node_F_Args, Info => Item_3.Info);
--# expr-done 11013
Fld_13 := Fld_12.Node;
Get_Result := Get (Self, Fld_13, 0, True); 
Is_Null_1 := Get_Result = null; 
if Is_Null_1 then
   If_Result_3 := No_Entity_Base_Assoc;
else
Fld_14 := Fld_12.Info;
As_Entity := (Info => Fld_14, Node => Get_Result); 
   If_Result_3 := As_Entity;
end if;
      if If_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_15 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result_3.Node, E_Info => If_Result_3.Info);
--# end
--# expr-done 11014
New_Struct_1 := (Exists => True, Inherited => False, Node => Cast_Result_4, Value => Fld_15); 
--# expr-done 11015
         declare
            Item_To_Append : constant Internal_Aspect := New_Struct_1;
         begin
            Internal_Aspect_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Aspect_Array
           (Items_Count => Natural (Internal_Aspect_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Aspect_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Aspect_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Aspect_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 11016
Local_Config_Annotations := Map_Result_2; Inc_Ref (Local_Config_Annotations);
--# bind config_annotations Local_Config_Annotations
--# expr-start 11017 '<unique at nodes.lkt:19107:9>' Unique_Array ada/nodes.lkt:19107
Concat_Result := Concat (Local_Self_Annotations, Local_Inherited_Annotations); 
Concat_Result_1 := Concat (Concat_Result, Local_Config_Annotations); 
Unique_Array := Make_Unique (Concat_Result_1); 
--# expr-done 11017
Let_Result_1 := Unique_Array; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11018
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 11019
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 11020
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1253;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1253;
                     Finalizer_Scope_3353;
                     Finalizer_Scope_3354;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Get_Annotations;
--# end
--# property-start DefiningName.is_imported ada/nodes.lkt:19114
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Is_Imported
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Sym : Symbol_Type;
Fld : Boolean;
Sym_1 : Symbol_Type;
Fld_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 11025 '<BooleanBinaryOp Or at nodes.lkt:19115:9>' If_Result ada/nodes.lkt:19115
--# expr-start 11022 '<FieldAccess for has_aspect at nodes.lkt:19115:9>' Fld ada/nodes.lkt:19115
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11021 '<Symbol Import at nodes.lkt:19115:25>' Sym ada/nodes.lkt:19115
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Import); 
--# expr-done 11021
--# property-call-start DefiningName.has_aspect
Fld := Libadalang.Implementation.Defining_Name_P_Has_Aspect (Node => Ent.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 11022
if Fld then
   If_Result := True;
else
   --# expr-start 11024 '<FieldAccess for has_aspect at nodes.lkt:19115:39>' Fld_1 ada/nodes.lkt:19115
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11023 '<Symbol Interface at nodes.lkt:19115:55>' Sym_1 ada/nodes.lkt:19115
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Interface); 
--# expr-done 11023
--# property-call-start DefiningName.has_aspect
Fld_1 := Libadalang.Implementation.Defining_Name_P_Has_Aspect (Node => Ent.Node, Name => Sym_1, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 11024
   If_Result := Fld_1;
end if;
--# expr-done 11025
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Is_Imported;
--# end
--# property-start DefiningName.is_ghost_code ada/nodes.lkt:19121
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Is_Ghost_Code
  (Node : Bare_Defining_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Local_Bd : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Generic_Instantiation;
Match_0 : Internal_Entity_Subp_Renaming_Decl;
Match_1 : Internal_Entity_Package_Renaming_Decl;
Match_2 : Internal_Entity_Generic_Renaming_Decl;
Match_3 : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Entity_Name;
Var_Expr_262 : Internal_Entity_Basic_Decl;
Var_Expr_263 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Basic_Decl;
Sym : Symbol_Type;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Generic_Instantiation;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_1 : Boolean;
Fld_6 : Internal_Entity_Renaming_Clause;
Fld_7 : Internal_Entity_Name;
Fld_8 : Internal_Entity_Renaming_Clause;
Fld_9 : Internal_Entity_Name;
Fld_10 : Internal_Entity_Name;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Subp_Renaming_Decl;
Let_Result : Internal_Entity_Name;
Scope_Result_2 : Internal_Entity_Name;
Cast_Result_2 : Internal_Entity_Package_Renaming_Decl;
Let_Result_1 : Internal_Entity_Name;
Scope_Result_3 : Internal_Entity_Name;
Cast_Result_3 : Internal_Entity_Generic_Renaming_Decl;
Let_Result_2 : Internal_Entity_Name;
Scope_Result_4 : Internal_Entity_Name;
Cast_Result_4 : Internal_Entity_Basic_Decl;
Let_Result_3 : Internal_Entity_Name;
Scope_Result_5 : Internal_Entity_Name;
Match_Result : Internal_Entity_Name;
Fld_11 : Internal_Entity_Defining_Name;
Fld_12 : Boolean;
Scope_Result_6 : Boolean;
Result_Var_2 : Boolean;
Scope_Result_7 : Boolean;
Result_Var_3 : Boolean;
If_Result_2 : Boolean;
Let_Result_4 : Boolean;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Defining_Name_Defining_Name_P_Is_Ghost_Code,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Defining_Name,
                                As_Bare_Defining_Name => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Boolean;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 11045 '<Let at nodes.lkt:19122:9>' Let_Result_4 ada/nodes.lkt:19122
--# scope-start
--# expr-start 11026 '<FieldAccess for basic_decl at nodes.lkt:19122:18>' Fld ada/nodes.lkt:19122
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 11026
Local_Bd := Fld; 
--# bind bd Local_Bd
--# expr-start 11044 '<BooleanBinaryOp Or at nodes.lkt:19124:9>' If_Result_2 ada/nodes.lkt:19124
--# expr-start 11035 '<BooleanBinaryOp Or at nodes.lkt:19124:9>' If_Result_1 ada/nodes.lkt:19124
--# expr-start 11031 '<BooleanBinaryOp Or at nodes.lkt:19124:9>' If_Result ada/nodes.lkt:19124
--# expr-start 11028 '<FieldAccess for has_aspect at nodes.lkt:19124:9>' Fld_1 ada/nodes.lkt:19124
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11027 '<Symbol Ghost at nodes.lkt:19124:25>' Sym ada/nodes.lkt:19124
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ghost); 
--# expr-done 11027
--# property-call-start DefiningName.has_aspect
Fld_1 := Libadalang.Implementation.Defining_Name_P_Has_Aspect (Node => Ent.Node, Name => Sym, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 11028
if Fld_1 then
   If_Result := True;
else
--# expr-start 11029 '<FieldAccess for parent_basic_decl at nodes.lkt:19124:38>' Fld_2 ada/nodes.lkt:19124
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_2 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Local_Bd.Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 11029
Var_Expr_262 := Fld_2;
if Var_Expr_262 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 11030 '<FieldAccess for is_ghost_code at nodes.lkt:19124:38>' Fld_3 ada/nodes.lkt:19124
      if Var_Expr_262.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_ghost_code
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Is_Ghost_Code (Node => Var_Expr_262.Node, E_Info => Var_Expr_262.Info);
--# end
--# expr-done 11030
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
end if;
--# expr-done 11031
if If_Result then
   If_Result_1 := True;
else
--# expr-start 11032 '<Cast to GenericInstantiation at nodes.lkt:19127:13>' Cast_Result ada/nodes.lkt:19127
Cast_Expr := Local_Bd; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Generic_Instantiation
   then
      Cast_Result := Create_Internal_Entity_Generic_Instantiation
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Generic_Instantiation;
   end if;
--# expr-done 11032
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Generic_Instantiation then
   --# scope-start
   --# bind gi Var_Expr_0
--# expr-start 11034 '<FieldAccess for is_ghost_code at nodes.lkt:19128:25>' Fld_5 ada/nodes.lkt:19128
--# expr-start 11033 '<FieldAccess for designated_bare_generic_decl at nodes.lkt:19128:25>' Fld_4 ada/nodes.lkt:19128
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericInstantiation.designated_bare_generic_decl
Fld_4 := Libadalang.Implementation.Generic_Instantiation_P_Designated_Bare_Generic_Decl (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 11033
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_ghost_code
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Is_Ghost_Code (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 11034
Scope_Result_1 := Fld_5;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_1 := Result_Var_1;
end if;
--# expr-done 11035
if If_Result_1 then
   If_Result_2 := True;
else
--# expr-start 11041 '<Match at nodes.lkt:19133:13>' Match_Result ada/nodes.lkt:19133
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Local_Bd; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Subp_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Subp_Renaming_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind sr Match_0
--# expr-start 11037 '<FieldAccess for renamed_object at nodes.lkt:19134:46>' Fld_7 ada/nodes.lkt:19134
--# expr-start 11036 '<FieldAccess for renames at nodes.lkt:19134:46>' Fld_6 ada/nodes.lkt:19134
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Renaming_Clause (Node => Match_0.Node.Subp_Renaming_Decl_F_Renames, Info => Match_0.Info);
--# expr-done 11036
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Name (Node => Fld_6.Node.Renaming_Clause_F_Renamed_Object, Info => Fld_6.Info);
--# expr-done 11037
Let_Result := Fld_7; 
--# end
Scope_Result_2 := Let_Result;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Package_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Package_Renaming_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind pr Match_1
--# expr-start 11039 '<FieldAccess for renamed_object at nodes.lkt:19135:49>' Fld_9 ada/nodes.lkt:19135
--# expr-start 11038 '<FieldAccess for renames at nodes.lkt:19135:49>' Fld_8 ada/nodes.lkt:19135
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Renaming_Clause (Node => Match_1.Node.Package_Renaming_Decl_F_Renames, Info => Match_1.Info);
--# expr-done 11038
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Create_Internal_Entity_Name (Node => Fld_8.Node.Renaming_Clause_F_Renamed_Object, Info => Fld_8.Info);
--# expr-done 11039
Let_Result_1 := Fld_9; 
--# end
Scope_Result_3 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Generic_Package_Renaming_Decl .. Ada_Generic_Subp_Renaming_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Generic_Renaming_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_3; 
--# bind gr Match_2
--# expr-start 11040 '<FieldAccess for renaming_name at nodes.lkt:19136:49>' Fld_10 ada/nodes.lkt:19136
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericRenamingDecl.renaming_name'
Fld_10 := Libadalang.Implementation.Dispatcher_Generic_Renaming_Decl_P_Renaming_Name (Node => Match_2.Node, E_Info => Match_2.Info);
--# end
--# expr-done 11040
Let_Result_2 := Fld_10; 
--# end
Scope_Result_4 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Abstract_State_Decl .. Ada_Subp_Body | Ada_Package_Body_Stub .. Ada_Generic_Subp_Instantiation | Ada_Label_Decl .. Ada_No_Type_Object_Renaming_Decl | Ada_Single_Protected_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_4; 
--# bind _ Match_3
Let_Result_3 := No_Entity_Name; 
--# end
Scope_Result_5 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_5; 
end case;
--# expr-done 11041
Var_Expr_1 := Match_Result;
if Var_Expr_1 /= No_Entity_Name then
   --# scope-start
   --# bind c Var_Expr_1
--# expr-start 11042 '<FieldAccess for referenced_defining_name at nodes.lkt:19139:24>' Fld_11 ada/nodes.lkt:19139
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_defining_name
Fld_11 := Libadalang.Implementation.Name_P_Referenced_Defining_Name (Node => Var_Expr_1.Node, Imprecise_Fallback => False, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 11042
Var_Expr_263 := Fld_11;
if Var_Expr_263 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 11043 '<FieldAccess for is_ghost_code at nodes.lkt:19139:24>' Fld_12 ada/nodes.lkt:19139
      if Var_Expr_263.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.is_ghost_code
Fld_12 := Libadalang.Implementation.Defining_Name_P_Is_Ghost_Code (Node => Var_Expr_263.Node, E_Info => Var_Expr_263.Info);
--# end
--# expr-done 11043
Scope_Result_6 := Fld_12;
   --# end
   Result_Var_2 := Scope_Result_6;
else
   Result_Var_2 := False;
end if;
Scope_Result_7 := Result_Var_2;
   --# end
   Result_Var_3 := Scope_Result_7;
else
   Result_Var_3 := False;
end if;
   If_Result_2 := Result_Var_3;
end if;
--# expr-done 11044
Let_Result_4 := If_Result_2; 
--# end
--# expr-done 11045
         Property_Result := Let_Result_4;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Boolean,
                        As_Boolean => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end Defining_Name_P_Is_Ghost_Code;
--# end
--# property-start DefiningName.xref_equation ada/nodes.lkt:19144
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Xref_Equation
  (Node : Bare_Defining_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
     Ent : Internal_Entity_Defining_Name :=
       Internal_Entity_Defining_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1256 with Inline_Always;
            procedure Finalizer_Scope_3365 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Dotted_Name;
Fld : Internal_Entity_Name;
Cast_Result : Internal_Entity_Dotted_Name;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_1256 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1256;
            procedure Finalizer_Scope_3365 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_3365;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 11047 '<Cast to DottedName at nodes.lkt:19148:9>' Cast_Result ada/nodes.lkt:19148
--# expr-start 11046 '<FieldAccess for name at nodes.lkt:19148:9>' Fld ada/nodes.lkt:19148
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Defining_Name_F_Name, Info => Ent.Info);
--# expr-done 11046
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result := Create_Internal_Entity_Dotted_Name
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Dotted_Name;
   end if;
--# expr-done 11047
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Dotted_Name then
   --# scope-start
   --# bind dn Var_Expr_0
--# expr-start 11051 '<bind at nodes.lkt:19153:17>' Dyn_Var_Bind_Result ada/nodes.lkt:19153
--# expr-start 11048 '<FieldAccess for std_env at nodes.lkt:19153:28>' Fld_1 ada/nodes.lkt:19153
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_env
Fld_1 := Libadalang.Implementation.Ada_Node_P_Std_Env (Node => Ent.Node);
--# end
--# expr-done 11048
Bound_Env := Fld_1; Inc_Ref (Bound_Env);
--# expr-start 11050 '<FieldAccess for xref_equation at nodes.lkt:19155:17>' Fld_3 ada/nodes.lkt:19155
--# expr-start 11049 '<FieldAccess for prefix at nodes.lkt:19155:17>' Fld_2 ada/nodes.lkt:19155
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Dotted_Name_F_Prefix, Info => Var_Expr_0.Info);
--# expr-done 11049
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld_2.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 11050
Dyn_Var_Bind_Result := Fld_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11051
Scope_Result := Dyn_Var_Bind_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3365;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19157:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1256;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1256;
                     Finalizer_Scope_3365;
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Xref_Equation;
--# end
--# property-start DefiningName.xref_entry_point ada/nodes.lkt:19162
pragma Warnings (Off, "is not referenced");
 function Defining_Name_P_Xref_Entry_Point
  (Node : Bare_Defining_Name
  )
   return Boolean
is
   Self : Bare_Defining_Name  := Bare_Defining_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Name;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11053 '<IsA DottedName at nodes.lkt:19162:36>' Is_A ada/nodes.lkt:19162
--# expr-start 11052 '<FieldAccess for name at nodes.lkt:19162:36>' Fld ada/nodes.lkt:19162
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Defining_Name_F_Name;
--# expr-done 11052
Is_A := Fld /= null 
and then Fld.Kind in Ada_Dotted_Name_Range; 
--# expr-done 11053
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Defining_Name_P_Xref_Entry_Point;
--# end
   --
   --  Primitives for Bare_Synthetic_Defining_Name
   --
      procedure Initialize_Fields_For_Synthetic_Defining_Name
        (Self : Bare_Synthetic_Defining_Name
         ; Defining_Name_F_Name : Bare_Name
        ) is
      begin
            Initialize_Fields_For_Defining_Name
              (Self, Defining_Name_F_Name);
      end Initialize_Fields_For_Synthetic_Defining_Name;
--# property-start SyntheticDefiningName.name_symbol ada/nodes.lkt:19170
pragma Warnings (Off, "is not referenced");
 function Synthetic_Defining_Name_P_Name_Symbol
  (Node : Bare_Synthetic_Defining_Name
  )
   return Symbol_Type
is
   Self : Bare_Synthetic_Defining_Name  := Bare_Synthetic_Defining_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Fld : Bare_Name;
Fld_1 : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11055 '<FieldAccess for name_symbol at nodes.lkt:19170:33>' Fld_1 ada/nodes.lkt:19170
--# expr-start 11054 '<FieldAccess for name at nodes.lkt:19170:33>' Fld ada/nodes.lkt:19170
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Defining_Name_F_Name;
--# expr-done 11054
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld);
--# end
--# expr-done 11055
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Defining_Name_P_Name_Symbol;
--# end
--# property-start SyntheticDefiningName.as_symbol_array ada/nodes.lkt:19172
pragma Warnings (Off, "is not referenced");
 function Synthetic_Defining_Name_P_As_Symbol_Array
  (Node : Bare_Synthetic_Defining_Name
  )
   return Symbol_Type_Array_Access
is
   Self : Bare_Synthetic_Defining_Name  := Bare_Synthetic_Defining_Name (Node);
      --# bind self Self
   Property_Result : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1259 with Inline_Always;
      Fld : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
            procedure Finalizer_Scope_1259 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1259;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11057 '<ArrayLiteral at nodes.lkt:19172:44>' Array_Lit ada/nodes.lkt:19172
--# expr-start 11056 '<FieldAccess for name_symbol at nodes.lkt:19172:45>' Fld ada/nodes.lkt:19172
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Self);
--# end
--# expr-done 11056
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Fld)); 
--# expr-done 11057
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1259;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1259;
            raise;
      end;
   return Property_Result;
end Synthetic_Defining_Name_P_As_Symbol_Array;
--# end
   --
   --  Primitives for Bare_Discrete_Subtype_Name
   --
      procedure Initialize_Fields_For_Discrete_Subtype_Name
        (Self : Bare_Discrete_Subtype_Name
         ; Discrete_Subtype_Name_F_Subtype : Bare_Discrete_Subtype_Indication
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Discrete_Subtype_Name_F_Subtype := Discrete_Subtype_Name_F_Subtype;
      end Initialize_Fields_For_Discrete_Subtype_Name;
   function Discrete_Subtype_Name_F_Subtype
     (Node : Bare_Discrete_Subtype_Name) return Bare_Discrete_Subtype_Indication
   is
   begin
         return Node.Discrete_Subtype_Name_F_Subtype;
   end;
   --
   --  Primitives for Bare_Dotted_Name
   --
      procedure Initialize_Fields_For_Dotted_Name
        (Self : Bare_Dotted_Name
         ; Dotted_Name_F_Prefix : Bare_Name
         ; Dotted_Name_F_Suffix : Bare_Base_Id
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Dotted_Name_F_Prefix := Dotted_Name_F_Prefix;
            Self.Dotted_Name_F_Suffix := Dotted_Name_F_Suffix;
      end Initialize_Fields_For_Dotted_Name;
   function Dotted_Name_F_Prefix
     (Node : Bare_Dotted_Name) return Bare_Name
   is
   begin
         return Node.Dotted_Name_F_Prefix;
   end;
   function Dotted_Name_F_Suffix
     (Node : Bare_Dotted_Name) return Bare_Base_Id
   is
   begin
         return Node.Dotted_Name_F_Suffix;
   end;
--# property-start DottedName.ref_var ada/nodes.lkt:19188
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Ref_Var
  (Node : Bare_Dotted_Name
  )
   return Logic_Var
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Bare_Base_Id;
Fld_1 : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11059 '<FieldAccess for ref_var at nodes.lkt:19188:31>' Fld_1 ada/nodes.lkt:19188
--# expr-start 11058 '<FieldAccess for suffix at nodes.lkt:19188:31>' Fld ada/nodes.lkt:19188
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Dotted_Name_F_Suffix;
--# expr-done 11058
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld);
--# end
--# expr-done 11059
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Ref_Var;
--# end
--# property-start DottedName.subp_spec_var ada/nodes.lkt:19190
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Subp_Spec_Var
  (Node : Bare_Dotted_Name
  )
   return Logic_Var
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Bare_Base_Id;
Fld_1 : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11061 '<FieldAccess for subp_spec_var at nodes.lkt:19190:37>' Fld_1 ada/nodes.lkt:19190
--# expr-start 11060 '<FieldAccess for suffix at nodes.lkt:19190:37>' Fld ada/nodes.lkt:19190
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Dotted_Name_F_Suffix;
--# expr-done 11060
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Fld);
--# end
--# expr-done 11061
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Subp_Spec_Var;
--# end
--# property-start DottedName.defines_subp_spec_var ada/nodes.lkt:19192
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Defines_Subp_Spec_Var
  (Node : Bare_Dotted_Name
  )
   return Boolean
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Defines_Subp_Spec_Var;
--# end
--# property-start DottedName.has_context_free_type ada/nodes.lkt:19194
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Has_Context_Free_Type
  (Node : Bare_Dotted_Name
  )
   return Boolean
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Base_Id;
Is_A : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11064 '<Not at nodes.lkt:19194:41>' Not_Val ada/nodes.lkt:19194
--# expr-start 11063 '<IsA CharLiteral at nodes.lkt:19194:45>' Is_A ada/nodes.lkt:19194
--# expr-start 11062 '<FieldAccess for suffix at nodes.lkt:19194:45>' Fld ada/nodes.lkt:19194
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Dotted_Name_F_Suffix;
--# expr-done 11062
Is_A := Fld /= null 
and then Fld.Kind in Ada_Char_Literal_Range; 
--# expr-done 11063
Not_Val := not (Is_A); 
--# expr-done 11064
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Has_Context_Free_Type;
--# end
--# property-start DottedName.complete_items ada/nodes.lkt:19197
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Complete_Items
  (Node : Bare_Dotted_Name
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Completion_Item_Array_Access
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_1264 with Inline_Always;
            procedure Finalizer_Scope_3366 with Inline_Always;
      Local_Complete_Env : Lexical_Env := Empty_Env;
Local_Visible_Env : Lexical_Env := Empty_Env;
Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Bound_No_Visibility : Boolean;
Fld_2 : Internal_Entity_Name;
Fld_3 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Bound_No_Visibility_1 : Boolean;
Fld_4 : Internal_Entity_Name;
Fld_5 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result_1 : Lexical_Env := Empty_Env;
Fld_6 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_7 : Internal_Entity_Info;
Fld_8 : Internal_Metadata;
Fld_9 : Boolean;
Fld_10 : Internal_Entity_Info;
Fld_11 : Internal_Metadata;
Fld_12 : Boolean;
Fld_13 : Boolean;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_14 : Symbol_Type;
Fld_15 : Internal_Entity_Array_Access;
Is_Equiv : Boolean;
Quantifier_Result : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
Cast_Expr_2 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Fld_16 : Integer;
New_Struct : Internal_Completion_Item;
Is_A : Boolean;
Not_Val : Boolean;
Fld_17 : Analysis_Unit_Kind;
Is_Equal : Boolean;
Fld_18 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Map_Result : Internal_Completion_Item_Array_Access;
Let_Result : Internal_Completion_Item_Array_Access;
Let_Result_1 : Internal_Completion_Item_Array_Access;
Dyn_Var_Bind_Result_2 : Internal_Completion_Item_Array_Access;
Dyn_Var_Bind_Result_3 : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_1264 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Local_Complete_Env);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (Local_Visible_Env);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result_2);
                     Dec_Ref (Dyn_Var_Bind_Result_3);
            end Finalizer_Scope_1264;
            procedure Finalizer_Scope_3366 is
            begin
                     Dec_Ref (Fld_15);
            end Finalizer_Scope_3366;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11103 '<bind at nodes.lkt:19198:9>' Dyn_Var_Bind_Result_3 ada/nodes.lkt:19198
--# expr-start 11065 '<FieldAccess for origin_node at nodes.lkt:19198:23>' Fld ada/nodes.lkt:19198
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11065
Bound_Origin := Fld; 
--# expr-start 11102 '<bind at nodes.lkt:19199:9>' Dyn_Var_Bind_Result_2 ada/nodes.lkt:19199
--# expr-start 11066 '<FieldAccess for node_env at nodes.lkt:19199:20>' Fld_1 ada/nodes.lkt:19199
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Node_Env (Node => Self);
--# expr-done 11066
Bound_Env := Fld_1; Inc_Ref (Bound_Env);
--# expr-start 11101 '<Let at nodes.lkt:19200:9>' Let_Result_1 ada/nodes.lkt:19200
--# scope-start
--# expr-start 11069 '<bind at nodes.lkt:19201:13>' Dyn_Var_Bind_Result ada/nodes.lkt:19201
Bound_No_Visibility := True; 
--# expr-start 11068 '<FieldAccess for designated_env at nodes.lkt:19202:13>' Fld_3 ada/nodes.lkt:19202
--# expr-start 11067 '<FieldAccess for prefix at nodes.lkt:19202:13>' Fld_2 ada/nodes.lkt:19202
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11067
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_3 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld_2.Node, Env => Bound_Env, Origin => Bound_Origin, No_Visibility => Bound_No_Visibility, E_Info => Fld_2.Info);
--# end
--# expr-done 11068
Dyn_Var_Bind_Result := Fld_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11069
Local_Complete_Env := Dyn_Var_Bind_Result; Inc_Ref (Local_Complete_Env);
--# bind complete_env Local_Complete_Env
--# expr-start 11100 '<Let at nodes.lkt:19204:9>' Let_Result ada/nodes.lkt:19204
--# scope-start
--# expr-start 11072 '<bind at nodes.lkt:19205:13>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:19205
Bound_No_Visibility_1 := False; 
--# expr-start 11071 '<FieldAccess for designated_env at nodes.lkt:19206:13>' Fld_5 ada/nodes.lkt:19206
--# expr-start 11070 '<FieldAccess for prefix at nodes.lkt:19206:13>' Fld_4 ada/nodes.lkt:19206
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11070
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_5 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld_4.Node, Env => Bound_Env, Origin => Bound_Origin, No_Visibility => Bound_No_Visibility_1, E_Info => Fld_4.Info);
--# end
--# expr-done 11071
Dyn_Var_Bind_Result_1 := Fld_5; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 11072
Local_Visible_Env := Dyn_Var_Bind_Result_1; Inc_Ref (Local_Visible_Env);
--# bind visible_env Local_Visible_Env
--# expr-start 11099 '<Map at nodes.lkt:19212:9>' Map_Result ada/nodes.lkt:19212
   --# expr-start 11073 '<FieldAccess for env_get_public at nodes.lkt:19212:9>' Fld_6 ada/nodes.lkt:19212
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.env_get_public
Fld_6 := Libadalang.Implementation.Ada_Node_P_Env_Get_Public (Node => Self, Env => Local_Complete_Env, Symbol => No_Symbol, Lookup => Flat);
--# end
--# expr-done 11073
      declare
         Map_Result_Vec : Internal_Completion_Item_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_6;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
         --# expr-start 11080 '<BooleanBinaryOp And at nodes.lkt:19235:13>' If_Result_3 ada/nodes.lkt:19235
--# expr-start 11075 '<Not at nodes.lkt:19243:17>' Not_Val ada/nodes.lkt:19243
--# expr-start 11074 '<IsA PrivatePart at nodes.lkt:19243:21>' Is_A ada/nodes.lkt:19243
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Private_Part_Range; 
--# expr-done 11074
Not_Val := not (Is_A); 
--# expr-done 11075
if Not_Val then
   --# expr-start 11079 '<BooleanBinaryOp Or at nodes.lkt:19246:17>' If_Result_2 ada/nodes.lkt:19246
--# expr-start 11077 '<Eq at nodes.lkt:19246:17>' Is_Equal ada/nodes.lkt:19246
--# expr-start 11076 '<FieldAccess for owning_unit_kind at nodes.lkt:19246:17>' Fld_17 ada/nodes.lkt:19246
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.owning_unit_kind
Fld_17 := Libadalang.Implementation.Ada_Node_P_Owning_Unit_Kind (Node => Item_0.Node);
--# end
--# expr-done 11076
Is_Equal := Fld_17 = Unit_Specification; 
--# expr-done 11077
if Is_Equal then
   If_Result_2 := True;
else
   --# expr-start 11078 '<FieldAccess for has_visibility at nodes.lkt:19247:20>' Fld_18 ada/nodes.lkt:19247
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_18 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 11078
   If_Result_2 := Fld_18;
end if;
--# expr-done 11079
   If_Result_3 := If_Result_2;
else
   If_Result_3 := False;
end if;
--# expr-done 11080
         if If_Result_3 then
      --# expr-start 11098 '<New CompletionItem at nodes.lkt:19215:13>' New_Struct ada/nodes.lkt:19215
--# expr-start 11081 '<Cast to BasicDecl at nodes.lkt:19216:22>' Cast_Result ada/nodes.lkt:19216
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 11081
--# expr-start 11084 '<FieldAccess for dottable_subp at nodes.lkt:19217:29>' Fld_9 ada/nodes.lkt:19217
--# expr-start 11083 '<FieldAccess for md at nodes.lkt:19217:29>' Fld_8 ada/nodes.lkt:19217
--# expr-start 11082 '<FieldAccess for info at nodes.lkt:19217:29>' Fld_7 ada/nodes.lkt:19217
Fld_7 := Item_0.Info;
--# expr-done 11082
Fld_8 := Fld_7.Md;
--# expr-done 11083
Fld_9 := Fld_8.Dottable_Subp;
--# expr-done 11084
--# expr-start 11095 '<BooleanBinaryOp Or at nodes.lkt:19218:28>' If_Result_1 ada/nodes.lkt:19218
--# expr-start 11087 '<FieldAccess for dottable_subp at nodes.lkt:19220:21>' Fld_12 ada/nodes.lkt:19220
--# expr-start 11086 '<FieldAccess for md at nodes.lkt:19220:21>' Fld_11 ada/nodes.lkt:19220
--# expr-start 11085 '<FieldAccess for info at nodes.lkt:19220:21>' Fld_10 ada/nodes.lkt:19220
Fld_10 := Item_0.Info;
--# expr-done 11085
Fld_11 := Fld_10.Md;
--# expr-done 11086
Fld_12 := Fld_11.Dottable_Subp;
--# expr-done 11087
if Fld_12 then
   If_Result_1 := True;
else
   --# expr-start 11094 '<BooleanBinaryOp And at nodes.lkt:19224:21>' If_Result ada/nodes.lkt:19224
--# expr-start 11088 '<FieldAccess for has_visibility at nodes.lkt:19224:21>' Fld_13 ada/nodes.lkt:19224
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_13 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 11088
if Fld_13 then
   --# expr-start 11093 '<Contains at nodes.lkt:19225:25>' Quantifier_Result ada/nodes.lkt:19225
   --# expr-start 11091 '<FieldAccess for env_get_public at nodes.lkt:19225:25>' Fld_15 ada/nodes.lkt:19225
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11090 '<FieldAccess for name_symbol at nodes.lkt:19227:25>' Fld_14 ada/nodes.lkt:19227
--# expr-start 11089 '<Cast to BasicDecl at nodes.lkt:19227:25>' Cast_Result_1 ada/nodes.lkt:19227
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 11089
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_14 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Cast_Result_1.Node);
--# end
--# expr-done 11090
--# property-call-start AdaNode.env_get_public
Fld_15 := Libadalang.Implementation.Ada_Node_P_Env_Get_Public (Node => Self, Env => Local_Visible_Env, Symbol => Fld_14, Lookup => Flat);
--# end
--# expr-done 11091
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_15;
      begin
         for Item_17 of
               Collection.Items
         loop
   --# scope-start
               --# bind item Item_17
      --# expr-start 11092 '<Eq at ???>' Is_Equiv None
Is_Equiv := Equivalent (Item_17, Item_0); 
--# expr-done 11092
      Quantifier_Result := Is_Equiv;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 11093
   If_Result := Quantifier_Result;
else
   If_Result := False;
end if;
--# expr-done 11094
   If_Result_1 := If_Result;
end if;
--# expr-done 11095
--# expr-start 11097 '<FieldAccess for complete_item_weight at nodes.lkt:19232:24>' Fld_16 ada/nodes.lkt:19232
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11096 '<Cast to BasicDecl at nodes.lkt:19232:50>' Cast_Result_2 ada/nodes.lkt:19232
Cast_Expr_2 := Item_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_2 := No_Entity_Basic_Decl;
   end if;
--# expr-done 11096
--# property-call-start '[dispatcher]AdaNode.complete_item_weight'
Fld_16 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Complete_Item_Weight (Node => Ent.Node, Item => Cast_Result_2, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 11097
New_Struct := (Decl => Cast_Result, Is_Dot_Call => Fld_9, Is_Visible => If_Result_1, Weight => Fld_16); 
--# expr-done 11098
         declare
            Item_To_Append : constant Internal_Completion_Item := New_Struct;
         begin
            Internal_Completion_Item_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
      Finalizer_Scope_3366;
         end loop;
      end;
         Map_Result := Create_Internal_Completion_Item_Array
           (Items_Count => Natural (Internal_Completion_Item_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Completion_Item_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Completion_Item_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Completion_Item_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11099
Let_Result := Map_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 11100
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11101
Dyn_Var_Bind_Result_2 := Let_Result_1; Inc_Ref (Dyn_Var_Bind_Result_2);
--# expr-done 11102
Dyn_Var_Bind_Result_3 := Dyn_Var_Bind_Result_2; Inc_Ref (Dyn_Var_Bind_Result_3);
--# expr-done 11103
         Property_Result := Dyn_Var_Bind_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1264;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1264;
                     Finalizer_Scope_3366;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Complete_Items;
--# end
--# property-start DottedName.complete_item_weight ada/nodes.lkt:19253
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Complete_Item_Weight
  (Node : Bare_Dotted_Name
      ; Item : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind item Item
   --# bind origin Origin
   Property_Result : Integer;
      Fld : Integer;
Is_A : Boolean;
If_Result : Integer;
Is_A_1 : Boolean;
If_Result_1 : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11108 '<If at nodes.lkt:19255:9>' If_Result_1 ada/nodes.lkt:19255
--# expr-start 11104 '<IsA ComponentDecl, DiscriminantSpec at nodes.lkt:19255:12>' Is_A_1 ada/nodes.lkt:19255
Is_A_1 := Item.Node /= null 
and then Item.Node.Kind in Ada_Component_Decl_Range | Ada_Discriminant_Spec_Range; 
--# expr-done 11104
if Is_A_1 then
   If_Result_1 := 100;
else
   --# expr-start 11107 '<If at nodes.lkt:19255:9>' If_Result ada/nodes.lkt:19255
--# expr-start 11105 '<IsA BasicSubpDecl, BaseSubpBody at nodes.lkt:19258:14>' Is_A ada/nodes.lkt:19258
Is_A := Item.Node /= null 
and then Item.Node.Kind in Ada_Basic_Subp_Decl | Ada_Base_Subp_Body; 
--# expr-done 11105
if Is_A then
   If_Result := 75;
else
   --# expr-start 11106 '<Super at nodes.lkt:19260:14>' Fld ada/nodes.lkt:19260
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.complete_item_weight
Fld := Libadalang.Implementation.Ada_Node_P_Complete_Item_Weight (Node => Ent.Node, Item => Item, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 11106
   If_Result := Fld;
end if;
--# expr-done 11107
   If_Result_1 := If_Result;
end if;
--# expr-done 11108
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Complete_Item_Weight;
--# end
--# property-start DottedName.designated_env_no_overloading ada/nodes.lkt:19263
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Designated_Env_No_Overloading
  (Node : Bare_Dotted_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1266 with Inline_Always;
      Local_Pfx_Env : Lexical_Env := Empty_Env;
Fld : Internal_Entity_Name;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Base_Id;
Fld_3 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1266 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Pfx_Env);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1266;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11114 '<Let at nodes.lkt:19264:9>' Let_Result ada/nodes.lkt:19264
--# scope-start
--# expr-start 11110 '<FieldAccess for designated_env_no_overloading at nodes.lkt:19264:23>' Fld_1 ada/nodes.lkt:19264
--# expr-start 11109 '<FieldAccess for prefix at nodes.lkt:19264:23>' Fld ada/nodes.lkt:19264
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11109
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env_no_overloading'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env_No_Overloading (Node => Fld.Node, Env => Env, Origin => Origin, No_Visibility => No_Visibility, E_Info => Fld.Info);
--# end
--# expr-done 11110
Local_Pfx_Env := Fld_1; Inc_Ref (Local_Pfx_Env);
--# bind pfx_env Local_Pfx_Env
--# expr-start 11113 '<bind at nodes.lkt:19267:13>' Dyn_Var_Bind_Result ada/nodes.lkt:19267
Bound_Env := Local_Pfx_Env; Inc_Ref (Bound_Env);
--# expr-start 11112 '<FieldAccess for designated_env_no_overloading at nodes.lkt:19269:13>' Fld_3 ada/nodes.lkt:19269
--# expr-start 11111 '<FieldAccess for suffix at nodes.lkt:19269:13>' Fld_2 ada/nodes.lkt:19269
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Id (Node => Ent.Node.Dotted_Name_F_Suffix, Info => Ent.Info);
--# expr-done 11111
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env_no_overloading'
Fld_3 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env_No_Overloading (Node => Fld_2.Node, Env => Bound_Env, Origin => Origin, No_Visibility => No_Visibility, E_Info => Fld_2.Info);
--# end
--# expr-done 11112
Dyn_Var_Bind_Result := Fld_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11113
Let_Result := Dyn_Var_Bind_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 11114
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1266;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1266;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Designated_Env_No_Overloading;
--# end
--# property-start DottedName.designated_env ada/nodes.lkt:19274
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Designated_Env
  (Node : Bare_Dotted_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1267 with Inline_Always;
      Local_Pfx_Env : Lexical_Env := Empty_Env;
Fld : Internal_Entity_Name;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Base_Id;
Fld_3 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1267 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Pfx_Env);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1267;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11120 '<Let at nodes.lkt:19275:9>' Let_Result ada/nodes.lkt:19275
--# scope-start
--# expr-start 11116 '<FieldAccess for designated_env at nodes.lkt:19275:23>' Fld_1 ada/nodes.lkt:19275
--# expr-start 11115 '<FieldAccess for prefix at nodes.lkt:19275:23>' Fld ada/nodes.lkt:19275
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11115
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld.Node, Env => Env, Origin => Origin, No_Visibility => No_Visibility, E_Info => Fld.Info);
--# end
--# expr-done 11116
Local_Pfx_Env := Fld_1; Inc_Ref (Local_Pfx_Env);
--# bind pfx_env Local_Pfx_Env
--# expr-start 11119 '<bind at nodes.lkt:19278:13>' Dyn_Var_Bind_Result ada/nodes.lkt:19278
Bound_Env := Local_Pfx_Env; Inc_Ref (Bound_Env);
--# expr-start 11118 '<FieldAccess for designated_env at nodes.lkt:19280:13>' Fld_3 ada/nodes.lkt:19280
--# expr-start 11117 '<FieldAccess for suffix at nodes.lkt:19280:13>' Fld_2 ada/nodes.lkt:19280
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Id (Node => Ent.Node.Dotted_Name_F_Suffix, Info => Ent.Info);
--# expr-done 11117
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_3 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld_2.Node, Env => Bound_Env, Origin => Origin, No_Visibility => No_Visibility, E_Info => Fld_2.Info);
--# end
--# expr-done 11118
Dyn_Var_Bind_Result := Fld_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11119
Let_Result := Dyn_Var_Bind_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 11120
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1267;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1267;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Designated_Env;
--# end
--# property-start DottedName.all_env_els_impl ada/nodes.lkt:19285
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_All_Env_Els_Impl
  (Node : Bare_Dotted_Name
      ; Seq : Boolean
         := True
      ; Seq_From : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Categories : Ref_Categories
         := (Inherited_Primitives => True, Nocat => True)
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind seq Seq
   --# bind seq_from Seq_From
   --# bind categories Categories
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1268 with Inline_Always;
      Local_Pfx_Env : Lexical_Env := Empty_Env;
Fld : Internal_Entity_Name;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Base_Id;
Fld_3 : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Array_Access;
Let_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1268 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Pfx_Env);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1268;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11126 '<Let at nodes.lkt:19290:9>' Let_Result ada/nodes.lkt:19290
--# scope-start
--# expr-start 11122 '<FieldAccess for designated_env at nodes.lkt:19290:23>' Fld_1 ada/nodes.lkt:19290
--# expr-start 11121 '<FieldAccess for prefix at nodes.lkt:19290:23>' Fld ada/nodes.lkt:19290
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11121
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld.Node, Env => Env, Origin => Origin, No_Visibility => False, E_Info => Fld.Info);
--# end
--# expr-done 11122
Local_Pfx_Env := Fld_1; Inc_Ref (Local_Pfx_Env);
--# bind pfx_env Local_Pfx_Env
--# expr-start 11125 '<bind at nodes.lkt:19293:13>' Dyn_Var_Bind_Result ada/nodes.lkt:19293
Bound_Env := Local_Pfx_Env; Inc_Ref (Bound_Env);
--# expr-start 11124 '<FieldAccess for all_env_els_impl at nodes.lkt:19295:13>' Fld_3 ada/nodes.lkt:19295
--# expr-start 11123 '<FieldAccess for suffix at nodes.lkt:19295:13>' Fld_2 ada/nodes.lkt:19295
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Id (Node => Ent.Node.Dotted_Name_F_Suffix, Info => Ent.Info);
--# expr-done 11123
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.all_env_els_impl'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_All_Env_Els_Impl (Node => Fld_2.Node, Seq => Seq, Seq_From => Seq_From, Categories => Categories, Env => Bound_Env, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 11124
Dyn_Var_Bind_Result := Fld_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11125
Let_Result := Dyn_Var_Bind_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 11126
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1268;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1268;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_All_Env_Els_Impl;
--# end
--# property-start DottedName.scope ada/nodes.lkt:19300
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Scope
  (Node : Bare_Dotted_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1269 with Inline_Always;
            procedure Finalizer_Scope_3368 with Inline_Always;
      Var_Expr_0 : Bare_Base_Id;
Fld : Bare_Base_Id;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1269 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1269;
            procedure Finalizer_Scope_3368 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_3368;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 11127 '<FieldAccess for suffix at nodes.lkt:19301:9>' Fld ada/nodes.lkt:19301
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Dotted_Name_F_Suffix;
--# expr-done 11127
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind sfx Var_Expr_0
--# expr-start 11130 '<bind at nodes.lkt:19303:17>' Dyn_Var_Bind_Result ada/nodes.lkt:19303
--# expr-start 11128 '<FieldAccess for parent_scope at nodes.lkt:19303:28>' Fld_1 ada/nodes.lkt:19303
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.parent_scope'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Parent_Scope (Node => Self, Env => Env);
--# end
--# expr-done 11128
Bound_Env := Fld_1; Inc_Ref (Bound_Env);
--# expr-start 11129 '<FieldAccess for scope at nodes.lkt:19305:17>' Fld_2 ada/nodes.lkt:19305
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.scope'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Scope (Node => Var_Expr_0, Env => Bound_Env);
--# end
--# expr-done 11129
Dyn_Var_Bind_Result := Fld_2; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11130
Scope_Result := Dyn_Var_Bind_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3368;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_Env;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1269;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1269;
                     Finalizer_Scope_3368;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Scope;
--# end
--# property-start DottedName.parent_scope ada/nodes.lkt:19311
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Parent_Scope
  (Node : Bare_Dotted_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1270 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1270 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1270;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11132 '<FieldAccess for scope at nodes.lkt:19311:38>' Fld_1 ada/nodes.lkt:19311
--# expr-start 11131 '<FieldAccess for prefix at nodes.lkt:19311:38>' Fld ada/nodes.lkt:19311
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Dotted_Name_F_Prefix;
--# expr-done 11131
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.scope'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Scope (Node => Fld, Env => Env);
--# end
--# expr-done 11132
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1270;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1270;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Parent_Scope;
--# end
--# property-start DottedName.relative_name ada/nodes.lkt:19313
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Relative_Name
  (Node : Bare_Dotted_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Base_Id;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11134 '<FieldAccess for relative_name at nodes.lkt:19313:41>' Fld_1 ada/nodes.lkt:19313
--# expr-start 11133 '<FieldAccess for suffix at nodes.lkt:19313:41>' Fld ada/nodes.lkt:19313
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Base_Id (Node => Ent.Node.Dotted_Name_F_Suffix, Info => Ent.Info);
--# expr-done 11133
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11134
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Relative_Name;
--# end
--# property-start DottedName.env_elements_impl ada/nodes.lkt:19316
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Env_Elements_Impl
  (Node : Bare_Dotted_Name
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1272 with Inline_Always;
      Local_Pfx_Env : Lexical_Env := Empty_Env;
Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Name;
Fld_2 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_3 : Internal_Entity_Base_Id;
Fld_4 : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result_1 : Internal_Entity_Array_Access;
Let_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1272 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Local_Pfx_Env);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1272;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11142 '<Let at nodes.lkt:19317:9>' Let_Result ada/nodes.lkt:19317
--# scope-start
--# expr-start 11138 '<bind at nodes.lkt:19318:13>' Dyn_Var_Bind_Result ada/nodes.lkt:19318
--# expr-start 11135 '<FieldAccess for origin_node at nodes.lkt:19318:27>' Fld ada/nodes.lkt:19318
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11135
Bound_Origin := Fld; 
--# expr-start 11137 '<FieldAccess for designated_env at nodes.lkt:19320:13>' Fld_2 ada/nodes.lkt:19320
--# expr-start 11136 '<FieldAccess for prefix at nodes.lkt:19320:13>' Fld_1 ada/nodes.lkt:19320
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11136
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_2 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld_1.Node, Env => Env, Origin => Bound_Origin, No_Visibility => False, E_Info => Fld_1.Info);
--# end
--# expr-done 11137
Dyn_Var_Bind_Result := Fld_2; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11138
Local_Pfx_Env := Dyn_Var_Bind_Result; Inc_Ref (Local_Pfx_Env);
--# bind pfx_env Local_Pfx_Env
--# expr-start 11141 '<bind at nodes.lkt:19324:13>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:19324
Bound_Env := Local_Pfx_Env; Inc_Ref (Bound_Env);
--# expr-start 11140 '<FieldAccess for env_elements_impl at nodes.lkt:19326:13>' Fld_4 ada/nodes.lkt:19326
--# expr-start 11139 '<FieldAccess for suffix at nodes.lkt:19326:13>' Fld_3 ada/nodes.lkt:19326
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Base_Id (Node => Ent.Node.Dotted_Name_F_Suffix, Info => Ent.Info);
--# expr-done 11139
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.env_elements_impl'
Fld_4 := Libadalang.Implementation.Dispatcher_Expr_P_Env_Elements_Impl (Node => Fld_3.Node, Env => Bound_Env, E_Info => Fld_3.Info);
--# end
--# expr-done 11140
Dyn_Var_Bind_Result_1 := Fld_4; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 11141
Let_Result := Dyn_Var_Bind_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 11142
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1272;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1272;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Env_Elements_Impl;
--# end
--# property-start DottedName.designated_type_impl ada/nodes.lkt:19331
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Designated_Type_Impl
  (Node : Bare_Dotted_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1273 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Base_Id;
Fld_3 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1273 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_1273;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11147 '<bind at nodes.lkt:19332:9>' Dyn_Var_Bind_Result ada/nodes.lkt:19332
--# expr-start 11144 '<FieldAccess for designated_env_no_overloading at nodes.lkt:19332:20>' Fld_1 ada/nodes.lkt:19332
--# expr-start 11143 '<FieldAccess for prefix at nodes.lkt:19332:20>' Fld ada/nodes.lkt:19332
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11143
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env_no_overloading'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env_No_Overloading (Node => Fld.Node, Env => Env, Origin => Origin, No_Visibility => False, E_Info => Fld.Info);
--# end
--# expr-done 11144
Bound_Env := Fld_1; Inc_Ref (Bound_Env);
--# expr-start 11146 '<FieldAccess for designated_type_impl at nodes.lkt:19334:9>' Fld_3 ada/nodes.lkt:19334
--# expr-start 11145 '<FieldAccess for suffix at nodes.lkt:19334:9>' Fld_2 ada/nodes.lkt:19334
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Id (Node => Ent.Node.Dotted_Name_F_Suffix, Info => Ent.Info);
--# expr-done 11145
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Fld_2.Node, Env => Bound_Env, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 11146
Dyn_Var_Bind_Result := Fld_3; 
--# expr-done 11147
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      Finalizer_Scope_1273;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1273;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Designated_Type_Impl;
--# end
--# property-start DottedName.xref_equation ada/nodes.lkt:19338
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Xref_Equation
  (Node : Bare_Dotted_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1274 with Inline_Always;
            procedure Finalizer_Scope_3369 with Inline_Always;
            procedure Finalizer_Scope_3370 with Inline_Always;
      Local_Base : Logic_Equation;
Var_Expr_0 : Internal_Entity_Array_Access;
Local_Actual : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Name;
Fld_3 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_4 : Internal_Entity_Base_Id;
Fld_5 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Logic_Var;
Fld_7 : Bare_Base_Id;
Fld_8 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_9 : Logic_Var;
Fld_10 : Bare_Base_Id;
Fld_11 : Logic_Var;
Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_12 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_13 : Internal_Entity_Basic_Decl;
Fld_14 : Bare_Base_Id;
Fld_15 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
Fld_16 : Bare_Name;
Cast_Result_2 : Bare_Expr;
Fld_17 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Let_Result : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Scope_Result : Logic_Equation;
Fld_18 : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_19 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_1274 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Local_Base);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Fld_18);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1274;
            procedure Finalizer_Scope_3369 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_3369;
            procedure Finalizer_Scope_3370 is
            begin
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Fld_17);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_3370;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11184 '<Let at nodes.lkt:19339:9>' Let_Result_1 ada/nodes.lkt:19339
--# scope-start
--# expr-start 11155 '<LogicBinaryOp And at nodes.lkt:19340:13>' And_Pred ada/nodes.lkt:19340
--# expr-start 11149 '<FieldAccess for sub_equation at nodes.lkt:19340:13>' Fld_1 ada/nodes.lkt:19340
--# expr-start 11148 '<FieldAccess for prefix at nodes.lkt:19340:13>' Fld ada/nodes.lkt:19340
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11148
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 11149
--# expr-start 11154 '<bind at nodes.lkt:19342:17>' Dyn_Var_Bind_Result ada/nodes.lkt:19342
--# expr-start 11151 '<FieldAccess for designated_env at nodes.lkt:19342:28>' Fld_3 ada/nodes.lkt:19342
--# expr-start 11150 '<FieldAccess for prefix at nodes.lkt:19342:28>' Fld_2 ada/nodes.lkt:19342
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11150
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_3 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld_2.Node, Env => Env, Origin => Origin, No_Visibility => False, E_Info => Fld_2.Info);
--# end
--# expr-done 11151
Bound_Env := Fld_3; Inc_Ref (Bound_Env);
--# expr-start 11153 '<FieldAccess for sub_equation at nodes.lkt:19344:17>' Fld_5 ada/nodes.lkt:19344
--# expr-start 11152 '<FieldAccess for suffix at nodes.lkt:19344:17>' Fld_4 ada/nodes.lkt:19344
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Base_Id (Node => Ent.Node.Dotted_Name_F_Suffix, Info => Ent.Info);
--# expr-done 11152
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_4.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_4.Info);
--# end
--# expr-done 11153
Dyn_Var_Bind_Result := Fld_5; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11154
And_Pred := Create_And (Fld_1, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19340:13") else null)); 
--# expr-done 11155
Local_Base := And_Pred; Inc_Ref (Local_Base);
--# bind base Local_Base
--# expr-start 11183 '<If at nodes.lkt:19347:9>' If_Result ada/nodes.lkt:19347
--# expr-start 11158 '<Not at nodes.lkt:19347:12>' Not_Val ada/nodes.lkt:19347
--# expr-start 11157 '<IsNull at nodes.lkt:19347:16>' Is_Null ada/nodes.lkt:19347
--# expr-start 11156 '<FieldAccess for designated_type_impl at nodes.lkt:19347:16>' Fld_19 ada/nodes.lkt:19347
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_19 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Ent.Node, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 11156
Is_Null := Fld_19.Node = null; 
--# expr-done 11157
Not_Val := not (Is_Null); 
--# expr-done 11158
if Not_Val then
   If_Result := Local_Base;
else
   --# expr-start 11182 '<LogicBinaryOp And at nodes.lkt:19350:13>' And_Pred_4 ada/nodes.lkt:19350
--# expr-start 11168 '<LogicBinaryOp And at nodes.lkt:19350:13>' And_Pred_2 ada/nodes.lkt:19350
--# expr-start 11163 '<LogicBinaryOp And at nodes.lkt:19350:13>' And_Pred_1 ada/nodes.lkt:19350
--# expr-start 11162 '<Bind at nodes.lkt:19351:18>' Bind_Result ada/nodes.lkt:19351
--# expr-start 11159 '<FieldAccess for expected_type_var at nodes.lkt:19351:18>' Fld_6 ada/nodes.lkt:19351
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11159
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
--# expr-start 11161 '<FieldAccess for expected_type_var at nodes.lkt:19351:47>' Fld_8 ada/nodes.lkt:19351
--# expr-start 11160 '<FieldAccess for suffix at nodes.lkt:19351:47>' Fld_7 ada/nodes.lkt:19351
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Self.Dotted_Name_F_Suffix;
--# expr-done 11160
      if Fld_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_7);
--# expr-done 11161
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
Bind_Result := Solver.Create_Unify (Fld_6, Fld_8, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19351:18") else null)); 
--# expr-done 11162
And_Pred_1 := Create_And (Local_Base, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19350:13") else null)); 
--# expr-done 11163
--# expr-start 11167 '<Bind at nodes.lkt:19352:18>' Bind_Result_1 ada/nodes.lkt:19352
--# expr-start 11164 '<FieldAccess for type_var at nodes.lkt:19352:18>' Fld_9 ada/nodes.lkt:19352
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11164
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
--# expr-start 11166 '<FieldAccess for type_var at nodes.lkt:19352:38>' Fld_11 ada/nodes.lkt:19352
--# expr-start 11165 '<FieldAccess for suffix at nodes.lkt:19352:38>' Fld_10 ada/nodes.lkt:19352
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Self.Dotted_Name_F_Suffix;
--# expr-done 11165
      if Fld_10 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_10);
--# expr-done 11166
Fld_11.Value := No_Entity;
Entity_Vars.Reset (Fld_11);
Bind_Result_1 := Solver.Create_Unify (Fld_9, Fld_11, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19352:18") else null)); 
--# expr-done 11167
And_Pred_2 := Create_And (And_Pred_1, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19350:13") else null)); 
--# expr-done 11168
--# expr-start 11169 '<FieldAccess for env_elements at nodes.lkt:19353:18>' Fld_12 ada/nodes.lkt:19353
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.env_elements
Fld_12 := Libadalang.Implementation.Expr_P_Env_Elements (Node => Ent.Node, Env => Env, No_Visibility => False, E_Info => Ent.Info);
--# end
--# expr-done 11169
Var_Expr_0 := Fld_12;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= No_Internal_Entity_Array_Type then
   --# scope-start
   --# bind env_els Var_Expr_0
--# expr-start 11180 '<LogicAny at nodes.lkt:19354:30>' Logic_Boolean_Op ada/nodes.lkt:19354
--# expr-start 11179 '<Map at nodes.lkt:19354:30>' Map_Result ada/nodes.lkt:19354
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Var_Expr_0;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
      --# expr-start 11178 '<Let at nodes.lkt:19355:21>' Let_Result ada/nodes.lkt:19355
--# scope-start
--# expr-start 11171 '<FieldAccess for corresponding_actual at nodes.lkt:19355:34>' Fld_13 ada/nodes.lkt:19355
--# expr-start 11170 '<Cast to BasicDecl at nodes.lkt:19355:34>' Cast_Result ada/nodes.lkt:19355
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 11170
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.corresponding_actual'
Fld_13 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Corresponding_Actual (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 11171
Local_Actual := Fld_13; 
--# bind actual Local_Actual
--# expr-start 11177 '<LogicBinaryOp And at nodes.lkt:19356:21>' And_Pred_3 ada/nodes.lkt:19356
--# expr-start 11174 '<Bind at nodes.lkt:19356:21>' Bind_Result_2 ada/nodes.lkt:19356
--# expr-start 11173 '<FieldAccess for ref_var at nodes.lkt:19356:21>' Fld_15 ada/nodes.lkt:19356
--# expr-start 11172 '<FieldAccess for suffix at nodes.lkt:19356:21>' Fld_14 ada/nodes.lkt:19356
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Self.Dotted_Name_F_Suffix;
--# expr-done 11172
      if Fld_14 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_15 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_14);
--# end
--# expr-done 11173
Fld_15.Value := No_Entity;
Entity_Vars.Reset (Fld_15);
Cast_Expr_1 := Local_Actual; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_15, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19356:21") else null)); 
--# expr-done 11174
--# expr-start 11176 '<FieldAccess for constrain_prefix at nodes.lkt:19357:26>' Fld_17 ada/nodes.lkt:19357
      if Local_Actual.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11175 '<FieldAccess for prefix at nodes.lkt:19357:50>' Fld_16 ada/nodes.lkt:19357
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Self.Dotted_Name_F_Prefix;
--# expr-done 11175
      Cast_Result_2 := Fld_16;
--# property-call-start '[dispatcher]BasicDecl.constrain_prefix'
Fld_17 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Constrain_Prefix (Node => Local_Actual.Node, Prefix => Cast_Result_2, Origin => Origin, E_Info => Local_Actual.Info);
--# end
--# expr-done 11176
And_Pred_3 := Create_And (Bind_Result_2, Fld_17, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19356:21") else null)); 
--# expr-done 11177
Let_Result := And_Pred_3; Inc_Ref (Let_Result);
--# end
--# expr-done 11178
         declare
            Item_To_Append : constant Logic_Equation := Let_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3370;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11179
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19354:30") else null)); 
--# expr-done 11180
Scope_Result := Logic_Boolean_Op;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3369;
   Result_Var := Scope_Result;
else
   --# expr-start 11181 '<FieldAccess for undefined_reference_equation at nodes.lkt:19359:29>' Fld_18 ada/nodes.lkt:19359
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.undefined_reference_equation
Fld_18 := Libadalang.Implementation.Name_P_Undefined_Reference_Equation (Node => Ent.Node);
--# end
--# expr-done 11181
   Result_Var := Fld_18;
end if;
      Inc_Ref (Result_Var);
And_Pred_4 := Create_And (And_Pred_2, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19350:13") else null)); 
--# expr-done 11182
   If_Result := And_Pred_4;
end if;
      Inc_Ref (If_Result);
--# expr-done 11183
Let_Result_1 := If_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11184
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1274;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1274;
                     Finalizer_Scope_3369;
                     Finalizer_Scope_3370;
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Xref_Equation;
--# end
--# property-start DottedName.is_constant ada/nodes.lkt:19363
pragma Warnings (Off, "is not referenced");
 function Dotted_Name_P_Is_Constant
  (Node : Bare_Dotted_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Dotted_Name  := Bare_Dotted_Name (Node);
     Ent : Internal_Entity_Dotted_Name :=
       Internal_Entity_Dotted_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Name;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Base_Id;
Fld_3 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11189 '<BooleanBinaryOp Or at nodes.lkt:19366:9>' If_Result ada/nodes.lkt:19366
--# expr-start 11186 '<FieldAccess for is_constant at nodes.lkt:19366:9>' Fld_1 ada/nodes.lkt:19366
--# expr-start 11185 '<FieldAccess for prefix at nodes.lkt:19366:9>' Fld ada/nodes.lkt:19366
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Dotted_Name_F_Prefix, Info => Ent.Info);
--# expr-done 11185
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.is_constant'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Is_Constant (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11186
if Fld_1 then
   If_Result := True;
else
   --# expr-start 11188 '<FieldAccess for is_constant at nodes.lkt:19366:38>' Fld_3 ada/nodes.lkt:19366
--# expr-start 11187 '<FieldAccess for suffix at nodes.lkt:19366:38>' Fld_2 ada/nodes.lkt:19366
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Id (Node => Ent.Node.Dotted_Name_F_Suffix, Info => Ent.Info);
--# expr-done 11187
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.is_constant'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Is_Constant (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 11188
   If_Result := Fld_3;
end if;
--# expr-done 11189
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Dotted_Name_P_Is_Constant;
--# end
   --
   --  Primitives for Bare_End_Name
   --
      procedure Initialize_Fields_For_End_Name
        (Self : Bare_End_Name
         ; End_Name_F_Name : Bare_Name
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.End_Name_F_Name := End_Name_F_Name;
      end Initialize_Fields_For_End_Name;
   function End_Name_F_Name
     (Node : Bare_End_Name) return Bare_Name
   is
   begin
         return Node.End_Name_F_Name;
   end;
--# property-start EndName.parent_scope ada/nodes.lkt:19453
pragma Warnings (Off, "is not referenced");
 function End_Name_P_Parent_Scope
  (Node : Bare_End_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_End_Name  := Bare_End_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1283 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1283 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1283;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11191 '<FieldAccess for parent_scope at nodes.lkt:19453:38>' Fld_1 ada/nodes.lkt:19453
--# expr-start 11190 '<FieldAccess for name at nodes.lkt:19453:38>' Fld ada/nodes.lkt:19453
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.End_Name_F_Name;
--# expr-done 11190
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.parent_scope'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Parent_Scope (Node => Fld, Env => Env);
--# end
--# expr-done 11191
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1283;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1283;
            raise;
      end;
   return Property_Result;
end End_Name_P_Parent_Scope;
--# end
--# property-start EndName.scope ada/nodes.lkt:19456
pragma Warnings (Off, "is not referenced");
 function End_Name_P_Scope
  (Node : Bare_End_Name
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_End_Name  := Bare_End_Name (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1284 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1284 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1284;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11193 '<FieldAccess for scope at nodes.lkt:19456:31>' Fld_1 ada/nodes.lkt:19456
--# expr-start 11192 '<FieldAccess for name at nodes.lkt:19456:31>' Fld ada/nodes.lkt:19456
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.End_Name_F_Name;
--# expr-done 11192
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.scope'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Scope (Node => Fld, Env => Env);
--# end
--# expr-done 11193
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1284;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1284;
            raise;
      end;
   return Property_Result;
end End_Name_P_Scope;
--# end
--# property-start EndName.relative_name ada/nodes.lkt:19458
pragma Warnings (Off, "is not referenced");
 function End_Name_P_Relative_Name
  (Node : Bare_End_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_End_Name  := Bare_End_Name (Node);
     Ent : Internal_Entity_End_Name :=
       Internal_Entity_End_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11195 '<FieldAccess for relative_name at nodes.lkt:19458:41>' Fld_1 ada/nodes.lkt:19458
--# expr-start 11194 '<FieldAccess for name at nodes.lkt:19458:41>' Fld ada/nodes.lkt:19458
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.End_Name_F_Name, Info => Ent.Info);
--# expr-done 11194
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11195
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end End_Name_P_Relative_Name;
--# end
--# property-start EndName.ref_var ada/nodes.lkt:19460
pragma Warnings (Off, "is not referenced");
 function End_Name_P_Ref_Var
  (Node : Bare_End_Name
  )
   return Logic_Var
is
   Self : Bare_End_Name  := Bare_End_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Bare_Name;
Fld_1 : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11197 '<FieldAccess for ref_var at nodes.lkt:19460:31>' Fld_1 ada/nodes.lkt:19460
--# expr-start 11196 '<FieldAccess for name at nodes.lkt:19460:31>' Fld ada/nodes.lkt:19460
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.End_Name_F_Name;
--# expr-done 11196
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld);
--# end
--# expr-done 11197
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end End_Name_P_Ref_Var;
--# end
--# property-start EndName.env_elements_impl ada/nodes.lkt:19463
pragma Warnings (Off, "is not referenced");
 function End_Name_P_Env_Elements_Impl
  (Node : Bare_End_Name
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_End_Name  := Bare_End_Name (Node);
     Ent : Internal_Entity_End_Name :=
       Internal_Entity_End_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1287 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1287 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1287;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11199 '<FieldAccess for env_elements_impl at nodes.lkt:19464:9>' Fld_1 ada/nodes.lkt:19464
--# expr-start 11198 '<FieldAccess for name at nodes.lkt:19464:9>' Fld ada/nodes.lkt:19464
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.End_Name_F_Name, Info => Ent.Info);
--# expr-done 11198
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.env_elements_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Env_Elements_Impl (Node => Fld.Node, Env => Env, E_Info => Fld.Info);
--# end
--# expr-done 11199
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1287;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1287;
            raise;
      end;
   return Property_Result;
end End_Name_P_Env_Elements_Impl;
--# end
--# property-start EndName.basic_decl ada/nodes.lkt:19469
pragma Warnings (Off, "is not referenced");
 function End_Name_P_Basic_Decl
  (Node : Bare_End_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_End_Name  := Bare_End_Name (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_1288 with Inline_Always;
      Var_Expr_1 : Bare_Ada_Node;
Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Cast_Expr_1 : Bare_Ada_Node;
Cast_Result_1 : Bare_Named_Stmt;
Fld : Bare_Named_Stmt_Decl;
As_Entity_1 : Internal_Entity_Named_Stmt_Decl;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Named_Stmt_Decl;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Is_A_1 : Boolean;
If_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
            procedure Finalizer_Scope_1288 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_1288;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_End_Name_End_Name_P_Basic_Decl,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_End_Name,
                                As_Bare_End_Name => Self);
               Mmz_K.Items (2) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Basic_Decl;
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
--# expr-start 11202 '<Find at nodes.lkt:19470:9>' Find_Result ada/nodes.lkt:19470
   --# expr-start 11200 '<FieldAccess for parents at nodes.lkt:19470:9>' Node_Parents ada/nodes.lkt:19470
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 11200
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 11201 '<IsA BasicDecl, NamedStmt at nodes.lkt:19470:36>' Is_A ada/nodes.lkt:19470
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Basic_Decl | Ada_Named_Stmt_Range; 
--# expr-done 11201
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 11202
Var_Expr_1 := Find_Result;
if Var_Expr_1 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind p Var_Expr_1
--# expr-start 11209 '<If at nodes.lkt:19472:13>' If_Result_2 ada/nodes.lkt:19472
--# expr-start 11203 '<IsA BasicDecl at nodes.lkt:19472:16>' Is_A_1 ada/nodes.lkt:19472
Is_A_1 := Var_Expr_1 /= null 
and then Var_Expr_1.Kind in Ada_Basic_Decl; 
--# expr-done 11203
if Is_A_1 then
   --# expr-start 11205 '<as_entity at nodes.lkt:19472:36>' If_Result ada/nodes.lkt:19472
--# expr-start 11204 '<Cast to BasicDecl at nodes.lkt:19472:36>' Cast_Result ada/nodes.lkt:19472
Cast_Expr := Var_Expr_1; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Basic_Decl
   then
      Cast_Result := Cast_Expr;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 11204
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => E_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 11205
   If_Result_2 := If_Result;
else
--# expr-start 11208 '<as_entity at nodes.lkt:19473:18>' If_Result_1 ada/nodes.lkt:19473
--# expr-start 11207 '<FieldAccess for decl at nodes.lkt:19473:18>' Fld ada/nodes.lkt:19473
--# expr-start 11206 '<Cast to NamedStmt at nodes.lkt:19473:18>' Cast_Result_1 ada/nodes.lkt:19473
Cast_Expr_1 := Var_Expr_1; 
   if Cast_Expr_1 = null
      or else Cast_Expr_1.Kind in Ada_Named_Stmt_Range
   then
      Cast_Result_1 := Cast_Expr_1;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11206
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Cast_Result_1.Named_Stmt_F_Decl;
--# expr-done 11207
Is_Null_1 := Fld = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Named_Stmt_Decl;
else
As_Entity_1 := (Info => E_Info, Node => Fld); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 11208
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => If_Result_1.Node,
         Info => If_Result_1.Info);
   If_Result_2 := Cast_Result_2;
end if;
--# expr-done 11209
Scope_Result := If_Result_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Basic_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      Finalizer_Scope_1288;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1288;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Basic_Decl,
                        As_Internal_Entity_Basic_Decl => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
         end if;
      end if;
   return Property_Result;
end End_Name_P_Basic_Decl;
--# end
--# property-start EndName.xref_equation ada/nodes.lkt:19477
pragma Warnings (Off, "is not referenced");
 function End_Name_P_Xref_Equation
  (Node : Bare_End_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_End_Name  := Bare_End_Name (Node);
     Ent : Internal_Entity_End_Name :=
       Internal_Entity_End_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1289 with Inline_Always;
            procedure Finalizer_Scope_3373 with Inline_Always;
            procedure Finalizer_Scope_3374 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Accept_Stmt_With_Stmts;
Var_Expr_1 : Internal_Entity_Dotted_Name;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Accept_Stmt_With_Stmts;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Entry_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Fld_3 : Logic_Var;
Fld_4 : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Result_Var : Logic_Equation;
Fld_5 : Internal_Entity_Name;
Cast_Result_3 : Internal_Entity_Dotted_Name;
Fld_6 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_7 : Internal_Entity_Name;
Fld_8 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1289 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1289;
            procedure Finalizer_Scope_3373 is
            begin
                     Dec_Ref (Bind_Result);
            end Finalizer_Scope_3373;
            procedure Finalizer_Scope_3374 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_3374;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11224 '<LogicBinaryOp And at nodes.lkt:19478:9>' And_Pred ada/nodes.lkt:19478
--# expr-start 11211 '<Cast to AcceptStmtWithStmts at nodes.lkt:19478:9>' Cast_Result ada/nodes.lkt:19478
--# expr-start 11210 '<parent at nodes.lkt:19478:9>' Fld ada/nodes.lkt:19478
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 11210
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Accept_Stmt_With_Stmts_Range
   then
      Cast_Result := Create_Internal_Entity_Accept_Stmt_With_Stmts
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Accept_Stmt_With_Stmts;
   end if;
--# expr-done 11211
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Accept_Stmt_With_Stmts then
   --# scope-start
   --# bind stmt Var_Expr_0
--# expr-start 11214 '<Bind at nodes.lkt:19479:23>' Bind_Result ada/nodes.lkt:19479
--# expr-start 11212 '<FieldAccess for ref_var at nodes.lkt:19479:23>' Fld_1 ada/nodes.lkt:19479
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 11212
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 11213 '<FieldAccess for designated_entry at nodes.lkt:19479:41>' Fld_2 ada/nodes.lkt:19479
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AcceptStmt.designated_entry
Fld_2 := Libadalang.Implementation.Accept_Stmt_P_Designated_Entry (Node => Var_Expr_0.Node, Origin => Origin, Env => Env, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 11213
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19479:23") else null)); 
--# expr-done 11214
Scope_Result := Bind_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3373;
   Result_Var := Scope_Result;
else
   --# expr-start 11217 '<Bind at nodes.lkt:19480:25>' Bind_Result_1 ada/nodes.lkt:19480
--# expr-start 11215 '<FieldAccess for ref_var at nodes.lkt:19480:25>' Fld_3 ada/nodes.lkt:19480
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 11215
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 11216 '<FieldAccess for basic_decl at nodes.lkt:19480:43>' Fld_4 ada/nodes.lkt:19480
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EndName.basic_decl
Fld_4 := Libadalang.Implementation.End_Name_P_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 11216
      Cast_Result_2 := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_3, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19480:25") else null)); 
--# expr-done 11217
   Result_Var := Bind_Result_1;
end if;
      Inc_Ref (Result_Var);
--# expr-start 11219 '<Cast to DottedName at nodes.lkt:19482:14>' Cast_Result_3 ada/nodes.lkt:19482
--# expr-start 11218 '<FieldAccess for name at nodes.lkt:19482:14>' Fld_5 ada/nodes.lkt:19482
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Name (Node => Ent.Node.End_Name_F_Name, Info => Ent.Info);
--# expr-done 11218
   if Fld_5.Node = null
      or else Fld_5.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Dotted_Name
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
   else
         Cast_Result_3 := No_Entity_Dotted_Name;
   end if;
--# expr-done 11219
Var_Expr_1 := Cast_Result_3;
if Var_Expr_1 /= No_Entity_Dotted_Name then
   --# scope-start
   --# bind dn Var_Expr_1
--# expr-start 11223 '<bind at nodes.lkt:19487:17>' Dyn_Var_Bind_Result ada/nodes.lkt:19487
--# expr-start 11220 '<FieldAccess for std_env at nodes.lkt:19487:28>' Fld_6 ada/nodes.lkt:19487
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_env
Fld_6 := Libadalang.Implementation.Ada_Node_P_Std_Env (Node => Ent.Node);
--# end
--# expr-done 11220
Bound_Env := Fld_6; Inc_Ref (Bound_Env);
--# expr-start 11222 '<FieldAccess for xref_no_overloading at nodes.lkt:19489:17>' Fld_8 ada/nodes.lkt:19489
--# expr-start 11221 '<FieldAccess for prefix at nodes.lkt:19489:17>' Fld_7 ada/nodes.lkt:19489
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Name (Node => Var_Expr_1.Node.Dotted_Name_F_Prefix, Info => Var_Expr_1.Info);
--# expr-done 11221
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_8 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_7.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_7.Info);
--# end
--# expr-done 11222
Dyn_Var_Bind_Result := Fld_8; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11223
Scope_Result_1 := Dyn_Var_Bind_Result;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3374;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19491:25") else null)); 
   Result_Var_1 := True_Rel;
end if;
      Inc_Ref (Result_Var_1);
And_Pred := Create_And (Result_Var, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19478:9") else null)); 
--# expr-done 11224
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1289;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1289;
                     Finalizer_Scope_3373;
                     Finalizer_Scope_3374;
            raise;
      end;
   return Property_Result;
end End_Name_P_Xref_Equation;
--# end
--# property-start EndName.xref_entry_point ada/nodes.lkt:19494
pragma Warnings (Off, "is not referenced");
 function End_Name_P_Xref_Entry_Point
  (Node : Bare_End_Name
  )
   return Boolean
is
   Self : Bare_End_Name  := Bare_End_Name (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end End_Name_P_Xref_Entry_Point;
--# end
   --
   --  Primitives for Bare_Explicit_Deref
   --
      procedure Initialize_Fields_For_Explicit_Deref
        (Self : Bare_Explicit_Deref
         ; Explicit_Deref_F_Prefix : Bare_Name
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Explicit_Deref_F_Prefix := Explicit_Deref_F_Prefix;
      Self.Explicit_Deref_R_Called_Spec := Null_Var_Record;
      end Initialize_Fields_For_Explicit_Deref;
   function Explicit_Deref_F_Prefix
     (Node : Bare_Explicit_Deref) return Bare_Name
   is
   begin
         return Node.Explicit_Deref_F_Prefix;
   end;
--# property-start ExplicitDeref.ref_var ada/nodes.lkt:19503
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Ref_Var
  (Node : Bare_Explicit_Deref
  )
   return Logic_Var
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Bare_Name;
Fld_1 : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11226 '<FieldAccess for ref_var at nodes.lkt:19503:31>' Fld_1 ada/nodes.lkt:19503
--# expr-start 11225 '<FieldAccess for prefix at nodes.lkt:19503:31>' Fld ada/nodes.lkt:19503
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Explicit_Deref_F_Prefix;
--# expr-done 11225
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld);
--# end
--# expr-done 11226
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Ref_Var;
--# end
--# property-start ExplicitDeref.subp_spec_var ada/nodes.lkt:19505
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Subp_Spec_Var
  (Node : Bare_Explicit_Deref
  )
   return Logic_Var
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11227 '<FieldAccess for r_called_spec at nodes.lkt:19505:37>' Fld ada/nodes.lkt:19505
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Explicit_Deref_R_Called_Spec'Unrestricted_Access;
--# expr-done 11227
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Subp_Spec_Var;
--# end
--# property-start ExplicitDeref.defines_subp_spec_var ada/nodes.lkt:19507
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Defines_Subp_Spec_Var
  (Node : Bare_Explicit_Deref
  )
   return Boolean
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Defines_Subp_Spec_Var;
--# end
--# property-start ExplicitDeref.relative_name ada/nodes.lkt:19509
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Relative_Name
  (Node : Bare_Explicit_Deref
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
     Ent : Internal_Entity_Explicit_Deref :=
       Internal_Entity_Explicit_Deref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11229 '<FieldAccess for relative_name at nodes.lkt:19509:41>' Fld_1 ada/nodes.lkt:19509
--# expr-start 11228 '<FieldAccess for prefix at nodes.lkt:19509:41>' Fld ada/nodes.lkt:19509
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11228
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11229
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Relative_Name;
--# end
--# property-start ExplicitDeref.designated_env ada/nodes.lkt:19512
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Designated_Env
  (Node : Bare_Explicit_Deref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
     Ent : Internal_Entity_Explicit_Deref :=
       Internal_Entity_Explicit_Deref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1295 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1295 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1295;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11231 '<FieldAccess for designated_env at nodes.lkt:19515:9>' Fld_1 ada/nodes.lkt:19515
--# expr-start 11230 '<FieldAccess for prefix at nodes.lkt:19515:9>' Fld ada/nodes.lkt:19515
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11230
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld.Node, Env => Env, Origin => Origin, No_Visibility => No_Visibility, E_Info => Fld.Info);
--# end
--# expr-done 11231
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1295;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1295;
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Designated_Env;
--# end
--# property-start ExplicitDeref.env_elements_impl ada/nodes.lkt:19518
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Env_Elements_Impl
  (Node : Bare_Explicit_Deref
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
     Ent : Internal_Entity_Explicit_Deref :=
       Internal_Entity_Explicit_Deref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1296 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1296 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1296;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11233 '<FieldAccess for env_elements_impl at nodes.lkt:19519:9>' Fld_1 ada/nodes.lkt:19519
--# expr-start 11232 '<FieldAccess for prefix at nodes.lkt:19519:9>' Fld ada/nodes.lkt:19519
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11232
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.env_elements_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Env_Elements_Impl (Node => Fld.Node, Env => Env, E_Info => Fld.Info);
--# end
--# expr-done 11233
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1296;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1296;
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Env_Elements_Impl;
--# end
--# property-start ExplicitDeref.eq_for_type ada/nodes.lkt:19522
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Eq_For_Type
  (Node : Bare_Explicit_Deref
      ; Typ : Internal_Entity_Base_Type_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
     Ent : Internal_Entity_Explicit_Deref :=
       Internal_Entity_Explicit_Deref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind typ Typ
   --# bind env Env
   --# bind origin Origin
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1297 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_2 : Internal_Entity_Name;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Logic_Var;
Fld_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
False_Rel : Logic_Equation;
Fld_6 : Boolean;
If_Result : Logic_Equation;
            procedure Finalizer_Scope_1297 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_1297;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11245 '<If at nodes.lkt:19523:9>' If_Result ada/nodes.lkt:19523
--# expr-start 11234 '<FieldAccess for is_access_type at nodes.lkt:19523:12>' Fld_6 ada/nodes.lkt:19523
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_access_type'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Access_Type (Node => Typ.Node, Origin => Origin, E_Info => Typ.Info);
--# end
--# expr-done 11234
if Fld_6 then
   --# expr-start 11244 '<LogicBinaryOp And at nodes.lkt:19525:13>' And_Pred_1 ada/nodes.lkt:19525
--# expr-start 11240 '<LogicBinaryOp And at nodes.lkt:19526:17>' And_Pred ada/nodes.lkt:19526
--# expr-start 11237 '<Bind at nodes.lkt:19526:17>' Bind_Result ada/nodes.lkt:19526
--# expr-start 11236 '<FieldAccess for expected_type_var at nodes.lkt:19526:17>' Fld_1 ada/nodes.lkt:19526
--# expr-start 11235 '<FieldAccess for prefix at nodes.lkt:19526:17>' Fld ada/nodes.lkt:19526
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Explicit_Deref_F_Prefix;
--# expr-done 11235
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld);
--# expr-done 11236
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
Cast_Expr := Typ; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19526:17") else null)); 
--# expr-done 11237
--# expr-start 11239 '<FieldAccess for matches_expected_type at nodes.lkt:19527:22>' Fld_3 ada/nodes.lkt:19527
--# expr-start 11238 '<FieldAccess for prefix at nodes.lkt:19527:22>' Fld_2 ada/nodes.lkt:19527
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11238
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_3 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_2.Node, Origin => Origin);
--# end
--# expr-done 11239
And_Pred := Create_And (Bind_Result, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19526:17") else null)); 
--# expr-done 11240
--# expr-start 11243 '<Bind at nodes.lkt:19529:18>' Bind_Result_1 ada/nodes.lkt:19529
--# expr-start 11241 '<FieldAccess for type_var at nodes.lkt:19529:18>' Fld_4 ada/nodes.lkt:19529
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11241
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 11242 '<FieldAccess for accessed_type at nodes.lkt:19529:37>' Fld_5 ada/nodes.lkt:19529
      if Typ.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Typ.Node, Origin => Origin, E_Info => Typ.Info);
--# end
--# expr-done 11242
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_4, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19529:18") else null)); 
--# expr-done 11243
And_Pred_1 := Create_And (And_Pred, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19525:13") else null)); 
--# expr-done 11244
   If_Result := And_Pred_1;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19530:14") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 11245
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1297;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1297;
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Eq_For_Type;
--# end
--# property-start ExplicitDeref.xref_equation ada/nodes.lkt:19533
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Xref_Equation
  (Node : Bare_Explicit_Deref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
     Ent : Internal_Entity_Explicit_Deref :=
       Internal_Entity_Explicit_Deref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1298 with Inline_Always;
      Fld : Logic_Equation;
            procedure Finalizer_Scope_1298 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1298;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11246 '<FieldAccess for bottom_up_name_equation at nodes.lkt:19533:37>' Fld ada/nodes.lkt:19533
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.bottom_up_name_equation
Fld := Libadalang.Implementation.Name_P_Bottom_Up_Name_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 11246
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1298;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1298;
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Xref_Equation;
--# end
--# property-start ExplicitDeref.general_xref_equation ada/nodes.lkt:19536
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_General_Xref_Equation
  (Node : Bare_Explicit_Deref
      ; Root : Bare_Name
         := No_Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
     Ent : Internal_Entity_Explicit_Deref :=
       Internal_Entity_Explicit_Deref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind root Root
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1299 with Inline_Always;
            procedure Finalizer_Scope_3375 with Inline_Always;
            procedure Finalizer_Scope_3376 with Inline_Always;
            procedure Finalizer_Scope_3377 with Inline_Always;
      Local_Typ : Internal_Entity_Base_Type_Decl;
Var_Expr_1 : Boolean;
Var_Expr_2 : Internal_Entity_Base_Type_Decl;
Var_Expr_264 : Internal_Entity_Base_Type_Decl;
Fld : Logic_Equation;
Fld_1 : Internal_Entity_Name;
Fld_2 : Boolean;
Fld_3 : Internal_Entity_Name;
Fld_4 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_5 : Bare_Name;
Fld_6 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_7 : Bare_Name;
Fld_8 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_9 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Scope_Result_1 : Logic_Equation;
False_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
Fld_10 : Internal_Entity_Name;
Fld_11 : Logic_Equation;
Fld_12 : Internal_Entity_Array_Access;
Cast_Expr_2 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Fld_13 : Internal_Entity_Base_Type_Decl;
Fld_14 : Bare_Name;
Fld_15 : Logic_Var;
Bind_Result_2 : Logic_Equation;
Fld_16 : Logic_Equation;
And_Pred_2 : Logic_Equation;
False_Rel_2 : Logic_Equation;
Fld_17 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result : Logic_Equation;
Let_Result : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_18 : Internal_Entity_Name;
Is_A : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_4 : Logic_Equation;
            procedure Finalizer_Scope_1299 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (False_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_4);
            end Finalizer_Scope_1299;
            procedure Finalizer_Scope_3375 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_3375;
            procedure Finalizer_Scope_3376 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3376;
            procedure Finalizer_Scope_3377 is
            begin
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Fld_16);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (False_Rel_2);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_3377;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11281 '<LogicBinaryOp And at nodes.lkt:19540:9>' And_Pred_4 ada/nodes.lkt:19540
--# expr-start 11247 '<FieldAccess for all_args_xref_equation at nodes.lkt:19540:9>' Fld ada/nodes.lkt:19540
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_args_xref_equation
Fld := Libadalang.Implementation.Name_P_All_Args_Xref_Equation (Node => Ent.Node, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 11247
--# expr-start 11280 '<If at nodes.lkt:19541:14>' If_Result_1 ada/nodes.lkt:19541
--# expr-start 11249 '<IsA AttributeRef at nodes.lkt:19541:17>' Is_A ada/nodes.lkt:19541
--# expr-start 11248 '<FieldAccess for prefix at nodes.lkt:19541:17>' Fld_18 ada/nodes.lkt:19541
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11248
Is_A := Fld_18.Node /= null 
and then Fld_18.Node.Kind in Ada_Attribute_Ref_Range; 
--# expr-done 11249
if Is_A then
--# expr-start 11251 '<FieldAccess for resolve_names_internal at nodes.lkt:19543:13>' Fld_2 ada/nodes.lkt:19543
--# expr-start 11250 '<FieldAccess for prefix at nodes.lkt:19543:13>' Fld_1 ada/nodes.lkt:19543
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11250
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_internal
Fld_2 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal (Node => Fld_1.Node, Generate_Diagnostics => False, Env => Env, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 11251
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= False then
   --# scope-start
   --# bind _ Var_Expr_1
--# expr-start 11254 '<Cast to BaseTypeDecl at nodes.lkt:19545:17>' Cast_Result ada/nodes.lkt:19545
--# expr-start 11253 '<FieldAccess for type_val at nodes.lkt:19545:17>' Fld_4 ada/nodes.lkt:19545
--# expr-start 11252 '<FieldAccess for prefix at nodes.lkt:19545:17>' Fld_3 ada/nodes.lkt:19545
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11252
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_4 := Libadalang.Implementation.Expr_P_Type_Val (Node => Fld_3.Node);
--# end
--# expr-done 11253
   if Fld_4.Node = null
      or else Fld_4.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 11254
Var_Expr_2 := Cast_Result;
if Var_Expr_2 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_2
--# expr-start 11263 '<LogicBinaryOp And at nodes.lkt:19548:25>' And_Pred_1 ada/nodes.lkt:19548
--# expr-start 11261 '<LogicBinaryOp And at nodes.lkt:19548:25>' And_Pred ada/nodes.lkt:19548
--# expr-start 11257 '<Bind at nodes.lkt:19548:25>' Bind_Result ada/nodes.lkt:19548
--# expr-start 11256 '<FieldAccess for expected_type_var at nodes.lkt:19548:25>' Fld_6 ada/nodes.lkt:19548
--# expr-start 11255 '<FieldAccess for prefix at nodes.lkt:19548:25>' Fld_5 ada/nodes.lkt:19548
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Explicit_Deref_F_Prefix;
--# expr-done 11255
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_5);
--# expr-done 11256
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
Cast_Expr := Var_Expr_2; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_6, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19548:25") else null)); 
--# expr-done 11257
--# expr-start 11260 '<Bind at nodes.lkt:19549:30>' Bind_Result_1 ada/nodes.lkt:19549
--# expr-start 11259 '<FieldAccess for type_var at nodes.lkt:19549:30>' Fld_8 ada/nodes.lkt:19549
--# expr-start 11258 '<FieldAccess for prefix at nodes.lkt:19549:30>' Fld_7 ada/nodes.lkt:19549
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Self.Explicit_Deref_F_Prefix;
--# expr-done 11258
      if Fld_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_7);
--# expr-done 11259
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
Cast_Expr_1 := Var_Expr_2; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_8, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19549:30") else null)); 
--# expr-done 11260
And_Pred := Create_And (Bind_Result, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19548:25") else null)); 
--# expr-done 11261
--# expr-start 11262 '<FieldAccess for parent_name_equation at nodes.lkt:19550:30>' Fld_9 ada/nodes.lkt:19550
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_9 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Ent.Node, Typ => Var_Expr_2, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 11262
And_Pred_1 := Create_And (And_Pred, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19548:25") else null)); 
--# expr-done 11263
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3376;
   Result_Var := Scope_Result;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19552:33") else null)); 
   Result_Var := False_Rel;
end if;
      Inc_Ref (Result_Var);
Scope_Result_1 := Result_Var;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3375;
   Result_Var_1 := Scope_Result_1;
else
   False_Rel_1 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19554:29") else null)); 
   Result_Var_1 := False_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
   If_Result_1 := Result_Var_1;
else
   --# expr-start 11279 '<LogicBinaryOp And at nodes.lkt:19557:13>' And_Pred_3 ada/nodes.lkt:19557
--# expr-start 11265 '<FieldAccess for sub_equation at nodes.lkt:19557:13>' Fld_11 ada/nodes.lkt:19557
--# expr-start 11264 '<FieldAccess for prefix at nodes.lkt:19557:13>' Fld_10 ada/nodes.lkt:19557
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11264
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_11 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_10.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_10.Info);
--# end
--# expr-done 11265
--# expr-start 11278 '<LogicAny at nodes.lkt:19558:18>' Logic_Boolean_Op ada/nodes.lkt:19558
--# expr-start 11277 '<Map at nodes.lkt:19558:18>' Map_Result ada/nodes.lkt:19558
   --# expr-start 11266 '<FieldAccess for env_elements at nodes.lkt:19558:18>' Fld_12 ada/nodes.lkt:19558
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.env_elements
Fld_12 := Libadalang.Implementation.Expr_P_Env_Elements (Node => Ent.Node, Env => Env, No_Visibility => False, E_Info => Ent.Info);
--# end
--# expr-done 11266
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_12;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind el Item_0
      --# expr-start 11276 '<Let at nodes.lkt:19560:21>' Let_Result ada/nodes.lkt:19560
--# scope-start
--# expr-start 11268 '<FieldAccess for expr_type at nodes.lkt:19560:31>' Fld_13 ada/nodes.lkt:19560
--# expr-start 11267 '<Cast to BasicDecl at nodes.lkt:19560:31>' Cast_Result_3 ada/nodes.lkt:19560
Cast_Expr_2 := Item_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_3 := No_Entity_Basic_Decl;
   end if;
--# expr-done 11267
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_13 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Cast_Result_3.Node, Origin => Origin, E_Info => Cast_Result_3.Info);
--# end
--# expr-done 11268
Local_Typ := Fld_13; 
--# bind typ Local_Typ
--# expr-start 11275 '<If at nodes.lkt:19561:21>' If_Result ada/nodes.lkt:19561
Var_Expr_264 := Local_Typ;
if Var_Expr_264 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 11269 '<FieldAccess for is_access_type at nodes.lkt:19561:24>' Fld_17 ada/nodes.lkt:19561
      if Var_Expr_264.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_access_type'
Fld_17 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Access_Type (Node => Var_Expr_264.Node, Origin => Origin, E_Info => Var_Expr_264.Info);
--# end
--# expr-done 11269
Scope_Result_2 := Fld_17;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
if Result_Var_2 then
   --# expr-start 11274 '<LogicBinaryOp And at nodes.lkt:19563:25>' And_Pred_2 ada/nodes.lkt:19563
--# expr-start 11272 '<Bind at nodes.lkt:19563:25>' Bind_Result_2 ada/nodes.lkt:19563
--# expr-start 11271 '<FieldAccess for ref_var at nodes.lkt:19563:25>' Fld_15 ada/nodes.lkt:19563
--# expr-start 11270 '<FieldAccess for prefix at nodes.lkt:19563:25>' Fld_14 ada/nodes.lkt:19563
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Self.Explicit_Deref_F_Prefix;
--# expr-done 11270
      if Fld_14 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_15 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_14);
--# end
--# expr-done 11271
Fld_15.Value := No_Entity;
Entity_Vars.Reset (Fld_15);
Bind_Result_2 := Solver.Create_Assign (Fld_15, Item_0, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19563:25") else null)); 
--# expr-done 11272
--# expr-start 11273 '<FieldAccess for parent_name_equation at nodes.lkt:19564:30>' Fld_16 ada/nodes.lkt:19564
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name_equation
Fld_16 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Ent.Node, Typ => Local_Typ, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 11273
And_Pred_2 := Create_And (Bind_Result_2, Fld_16, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19563:25") else null)); 
--# expr-done 11274
   If_Result := And_Pred_2;
else
   False_Rel_2 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19565:26") else null)); 
   If_Result := False_Rel_2;
end if;
      Inc_Ref (If_Result);
--# expr-done 11275
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 11276
         declare
            Item_To_Append : constant Logic_Equation := Let_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3377;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11277
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19558:18") else null)); 
--# expr-done 11278
And_Pred_3 := Create_And (Fld_11, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19557:13") else null)); 
--# expr-done 11279
   If_Result_1 := And_Pred_3;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 11280
And_Pred_4 := Create_And (Fld, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19540:9") else null)); 
--# expr-done 11281
         Property_Result := And_Pred_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1299;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1299;
                     Finalizer_Scope_3375;
                     Finalizer_Scope_3376;
                     Finalizer_Scope_3377;
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_General_Xref_Equation;
--# end
--# property-start ExplicitDeref.is_constant ada/nodes.lkt:19569
pragma Warnings (Off, "is not referenced");
 function Explicit_Deref_P_Is_Constant
  (Node : Bare_Explicit_Deref
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Explicit_Deref  := Bare_Explicit_Deref (Node);
     Ent : Internal_Entity_Explicit_Deref :=
       Internal_Entity_Explicit_Deref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_265 : Internal_Entity_Base_Type_Decl;
Var_Expr_266 : Internal_Entity_Type_Access_Def;
Cast_Expr : Bare_Explicit_Deref;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Internal_Entity_Access_Def;
Scope_Result : Internal_Entity_Access_Def;
Result_Var : Internal_Entity_Access_Def;
Cast_Result_1 : Internal_Entity_Type_Access_Def;
Fld_3 : Internal_Entity_Constant_Node;
Fld_4 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Dyn_Var_Bind_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11288 '<bind at nodes.lkt:19573:9>' Dyn_Var_Bind_Result ada/nodes.lkt:19573
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 11285 '<Cast to TypeAccessDef at nodes.lkt:19575:9>' Cast_Result_1 ada/nodes.lkt:19575
--# expr-start 11283 '<FieldAccess for expression_type at nodes.lkt:19575:9>' Fld_1 ada/nodes.lkt:19575
--# expr-start 11282 '<FieldAccess for prefix at nodes.lkt:19575:9>' Fld ada/nodes.lkt:19575
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Explicit_Deref_F_Prefix, Info => Ent.Info);
--# expr-done 11282
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expression_type
Fld_1 := Libadalang.Implementation.Expr_P_Expression_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11283
Var_Expr_265 := Fld_1;
if Var_Expr_265 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 11284 '<FieldAccess for access_def at nodes.lkt:19575:9>' Fld_2 ada/nodes.lkt:19575
      if Var_Expr_265.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.access_def'
Fld_2 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Access_Def (Node => Var_Expr_265.Node, Origin => Bound_Origin, E_Info => Var_Expr_265.Info);
--# end
--# expr-done 11284
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Access_Def;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Type_Access_Def_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Type_Access_Def
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result_1 := No_Entity_Type_Access_Def;
   end if;
--# expr-done 11285
Var_Expr_266 := Cast_Result_1;
if Var_Expr_266 /= No_Entity_Type_Access_Def then
   --# scope-start
--# expr-start 11287 '<FieldAccess for as_bool at nodes.lkt:19575:9>' Fld_4 ada/nodes.lkt:19575
--# expr-start 11286 '<FieldAccess for has_constant at nodes.lkt:19575:9>' Fld_3 ada/nodes.lkt:19575
      if Var_Expr_266.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Constant_Node (Node => Var_Expr_266.Node.Type_Access_Def_F_Has_Constant, Info => Var_Expr_266.Info);
--# expr-done 11286
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Constant.as_bool'
Fld_4 := Libadalang.Implementation.Dispatcher_Constant_Node_P_As_Bool (Node => Fld_3.Node);
--# end
--# expr-done 11287
Scope_Result_1 := Fld_4;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
Dyn_Var_Bind_Result := Result_Var_1; 
--# expr-done 11288
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Explicit_Deref_P_Is_Constant;
--# end
   --
   --  Primitives for Bare_Qual_Expr
   --
      procedure Initialize_Fields_For_Qual_Expr
        (Self : Bare_Qual_Expr
         ; Qual_Expr_F_Prefix : Bare_Name
         ; Qual_Expr_F_Suffix : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Qual_Expr_F_Prefix := Qual_Expr_F_Prefix;
            Self.Qual_Expr_F_Suffix := Qual_Expr_F_Suffix;
      end Initialize_Fields_For_Qual_Expr;
   function Qual_Expr_F_Prefix
     (Node : Bare_Qual_Expr) return Bare_Name
   is
   begin
         return Node.Qual_Expr_F_Prefix;
   end;
   function Qual_Expr_F_Suffix
     (Node : Bare_Qual_Expr) return Bare_Expr
   is
   begin
         return Node.Qual_Expr_F_Suffix;
   end;
--# property-start QualExpr.ref_var ada/nodes.lkt:19589
pragma Warnings (Off, "is not referenced");
 function Qual_Expr_P_Ref_Var
  (Node : Bare_Qual_Expr
  )
   return Logic_Var
is
   Self : Bare_Qual_Expr  := Bare_Qual_Expr (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Bare_Name;
Fld_1 : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11290 '<FieldAccess for ref_var at nodes.lkt:19589:31>' Fld_1 ada/nodes.lkt:19589
--# expr-start 11289 '<FieldAccess for prefix at nodes.lkt:19589:31>' Fld ada/nodes.lkt:19589
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Qual_Expr_F_Prefix;
--# expr-done 11289
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld);
--# end
--# expr-done 11290
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Qual_Expr_P_Ref_Var;
--# end
--# property-start QualExpr.relative_name ada/nodes.lkt:19591
pragma Warnings (Off, "is not referenced");
 function Qual_Expr_P_Relative_Name
  (Node : Bare_Qual_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Qual_Expr  := Bare_Qual_Expr (Node);
     Ent : Internal_Entity_Qual_Expr :=
       Internal_Entity_Qual_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11292 '<FieldAccess for relative_name at nodes.lkt:19591:41>' Fld_1 ada/nodes.lkt:19591
--# expr-start 11291 '<FieldAccess for prefix at nodes.lkt:19591:41>' Fld ada/nodes.lkt:19591
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Qual_Expr_F_Prefix, Info => Ent.Info);
--# expr-done 11291
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11292
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Qual_Expr_P_Relative_Name;
--# end
--# property-start QualExpr.is_constant ada/nodes.lkt:19593
pragma Warnings (Off, "is not referenced");
 function Qual_Expr_P_Is_Constant
  (Node : Bare_Qual_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Qual_Expr  := Bare_Qual_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Qual_Expr_P_Is_Constant;
--# end
--# property-start QualExpr.general_xref_equation ada/nodes.lkt:19596
pragma Warnings (Off, "is not referenced");
 function Qual_Expr_P_General_Xref_Equation
  (Node : Bare_Qual_Expr
      ; Root : Bare_Name
         := No_Bare_Ada_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Qual_Expr  := Bare_Qual_Expr (Node);
     Ent : Internal_Entity_Qual_Expr :=
       Internal_Entity_Qual_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind root Root
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1304 with Inline_Always;
            procedure Finalizer_Scope_3381 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Fld : Logic_Equation;
Fld_1 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_2 : Internal_Entity_Name;
Fld_3 : Internal_Entity_Name;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1304 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1304;
            procedure Finalizer_Scope_3381 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_3381;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11300 '<LogicBinaryOp And at nodes.lkt:19597:9>' And_Pred_1 ada/nodes.lkt:19597
--# expr-start 11295 '<LogicBinaryOp And at nodes.lkt:19597:9>' And_Pred ada/nodes.lkt:19597
--# expr-start 11293 '<FieldAccess for xref_equation at nodes.lkt:19597:9>' Fld ada/nodes.lkt:19597
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 11293
--# expr-start 11294 '<FieldAccess for all_args_xref_equation at nodes.lkt:19597:35>' Fld_1 ada/nodes.lkt:19597
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_args_xref_equation
Fld_1 := Libadalang.Implementation.Name_P_All_Args_Xref_Equation (Node => Ent.Node, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 11294
And_Pred := Create_And (Fld, Fld_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19597:9") else null)); 
--# expr-done 11295
--# expr-start 11296 '<FieldAccess for parent_name at nodes.lkt:19598:14>' Fld_2 ada/nodes.lkt:19598
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_name
Fld_2 := Libadalang.Implementation.Name_P_Parent_Name (Node => Ent.Node, Stop_At => Root, E_Info => Ent.Info);
--# end
--# expr-done 11296
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind pn Var_Expr_0
--# expr-start 11299 '<FieldAccess for parent_name_equation at nodes.lkt:19600:13>' Fld_5 ada/nodes.lkt:19600
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11298 '<FieldAccess for designated_type_impl at nodes.lkt:19600:37>' Fld_4 ada/nodes.lkt:19600
--# expr-start 11297 '<FieldAccess for prefix at nodes.lkt:19600:37>' Fld_3 ada/nodes.lkt:19600
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Ent.Node.Qual_Expr_F_Prefix, Info => Ent.Info);
--# expr-done 11297
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Fld_3.Node, Env => Env, Origin => Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 11298
--# property-call-start Name.parent_name_equation
Fld_5 := Libadalang.Implementation.Name_P_Parent_Name_Equation (Node => Var_Expr_0.Node, Typ => Fld_4, Root => Root, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 11299
Scope_Result := Fld_5;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3381;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19601:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_1 := Create_And (And_Pred, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19597:9") else null)); 
--# expr-done 11300
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1304;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1304;
                     Finalizer_Scope_3381;
            raise;
      end;
   return Property_Result;
end Qual_Expr_P_General_Xref_Equation;
--# end
--# property-start QualExpr.xref_equation ada/nodes.lkt:19605
pragma Warnings (Off, "is not referenced");
 function Qual_Expr_P_Xref_Equation
  (Node : Bare_Qual_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Qual_Expr  := Bare_Qual_Expr (Node);
     Ent : Internal_Entity_Qual_Expr :=
       Internal_Entity_Qual_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1305 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Bare_Expr;
Fld_5 : Logic_Var;
Fld_6 : Bare_Name;
Fld_7 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Equation;
And_Pred_2 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_10 : Logic_Var;
Fld_11 : Bare_Name;
Fld_12 : Logic_Var;
Bind_Result_1 : Logic_Equation;
Fld_13 : Internal_Entity;
Is_A : Boolean;
If_Result : Logic_Equation;
And_Pred_3 : Logic_Equation;
            procedure Finalizer_Scope_1305 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_1305;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11322 '<LogicBinaryOp And at nodes.lkt:19606:9>' And_Pred_3 ada/nodes.lkt:19606
--# expr-start 11314 '<LogicBinaryOp And at nodes.lkt:19606:9>' And_Pred_2 ada/nodes.lkt:19606
--# expr-start 11311 '<LogicBinaryOp And at nodes.lkt:19606:9>' And_Pred_1 ada/nodes.lkt:19606
--# expr-start 11305 '<LogicBinaryOp And at nodes.lkt:19606:9>' And_Pred ada/nodes.lkt:19606
--# expr-start 11302 '<FieldAccess for xref_type_equation at nodes.lkt:19606:9>' Fld_1 ada/nodes.lkt:19606
--# expr-start 11301 '<FieldAccess for prefix at nodes.lkt:19606:9>' Fld ada/nodes.lkt:19606
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Qual_Expr_F_Prefix, Info => Ent.Info);
--# expr-done 11301
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_1 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 11302
--# expr-start 11304 '<FieldAccess for sub_equation at nodes.lkt:19606:47>' Fld_3 ada/nodes.lkt:19606
--# expr-start 11303 '<FieldAccess for suffix at nodes.lkt:19606:47>' Fld_2 ada/nodes.lkt:19606
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Qual_Expr_F_Suffix, Info => Ent.Info);
--# expr-done 11303
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 11304
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19606:9") else null)); 
--# expr-done 11305
--# expr-start 11310 '<Bind at nodes.lkt:19607:14>' Bind_Result ada/nodes.lkt:19607
--# expr-start 11307 '<FieldAccess for expected_type_var at nodes.lkt:19607:14>' Fld_5 ada/nodes.lkt:19607
--# expr-start 11306 '<FieldAccess for suffix at nodes.lkt:19607:14>' Fld_4 ada/nodes.lkt:19607
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Qual_Expr_F_Suffix;
--# expr-done 11306
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_4);
--# expr-done 11307
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 11309 '<FieldAccess for ref_var at nodes.lkt:19607:50>' Fld_7 ada/nodes.lkt:19607
--# expr-start 11308 '<FieldAccess for prefix at nodes.lkt:19607:50>' Fld_6 ada/nodes.lkt:19607
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Qual_Expr_F_Prefix;
--# expr-done 11308
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_7 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_6);
--# end
--# expr-done 11309
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
Bind_Result := Solver.Create_Unify (Fld_5, Fld_7, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19607:14") else null)); 
--# expr-done 11310
And_Pred_1 := Create_And (And_Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19606:9") else null)); 
--# expr-done 11311
--# expr-start 11313 '<FieldAccess for matches_expected_type at nodes.lkt:19608:14>' Fld_9 ada/nodes.lkt:19608
--# expr-start 11312 '<FieldAccess for suffix at nodes.lkt:19608:14>' Fld_8 ada/nodes.lkt:19608
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Expr (Node => Ent.Node.Qual_Expr_F_Suffix, Info => Ent.Info);
--# expr-done 11312
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_9 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_8.Node, Origin => Origin);
--# end
--# expr-done 11313
And_Pred_2 := Create_And (And_Pred_1, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19606:9") else null)); 
--# expr-done 11314
--# expr-start 11321 '<If at nodes.lkt:19615:14>' If_Result ada/nodes.lkt:19615
--# expr-start 11316 '<IsA CallStmt at nodes.lkt:19615:17>' Is_A ada/nodes.lkt:19615
--# expr-start 11315 '<parent at nodes.lkt:19615:17>' Fld_13 ada/nodes.lkt:19615
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 11315
Is_A := Fld_13.Node /= null 
and then Fld_13.Node.Kind in Ada_Call_Stmt_Range; 
--# expr-done 11316
if Is_A then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19615:46") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 11320 '<Bind at nodes.lkt:19616:14>' Bind_Result_1 ada/nodes.lkt:19616
--# expr-start 11317 '<FieldAccess for type_var at nodes.lkt:19616:14>' Fld_10 ada/nodes.lkt:19616
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11317
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
--# expr-start 11319 '<FieldAccess for ref_var at nodes.lkt:19616:34>' Fld_12 ada/nodes.lkt:19616
--# expr-start 11318 '<FieldAccess for prefix at nodes.lkt:19616:34>' Fld_11 ada/nodes.lkt:19616
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Qual_Expr_F_Prefix;
--# expr-done 11318
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_12 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_11);
--# end
--# expr-done 11319
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
Bind_Result_1 := Solver.Create_Unify (Fld_10, Fld_12, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19616:14") else null)); 
--# expr-done 11320
   If_Result := Bind_Result_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 11321
And_Pred_3 := Create_And (And_Pred_2, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19606:9") else null)); 
--# expr-done 11322
         Property_Result := And_Pred_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1305;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1305;
            raise;
      end;
   return Property_Result;
end Qual_Expr_P_Xref_Equation;
--# end
--# property-start QualExpr.designated_env ada/nodes.lkt:19619
pragma Warnings (Off, "is not referenced");
 function Qual_Expr_P_Designated_Env
  (Node : Bare_Qual_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Qual_Expr  := Bare_Qual_Expr (Node);
     Ent : Internal_Entity_Qual_Expr :=
       Internal_Entity_Qual_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1306 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1306 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1306;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11325 '<FieldAccess for defining_env at nodes.lkt:19620:9>' Fld_2 ada/nodes.lkt:19620
--# expr-start 11324 '<FieldAccess for name_designated_type at nodes.lkt:19620:9>' Fld_1 ada/nodes.lkt:19620
--# expr-start 11323 '<FieldAccess for prefix at nodes.lkt:19620:9>' Fld ada/nodes.lkt:19620
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Qual_Expr_F_Prefix, Info => Ent.Info);
--# expr-done 11323
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11324
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld_1.Node, Origin => Origin, Include_Ud_Indexing => False, Dottable_Type => No_Bare_Ada_Node, E_Info => Fld_1.Info);
--# end
--# expr-done 11325
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1306;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1306;
            raise;
      end;
   return Property_Result;
end Qual_Expr_P_Designated_Env;
--# end
--# property-start QualExpr.env_elements_impl ada/nodes.lkt:19623
pragma Warnings (Off, "is not referenced");
 function Qual_Expr_P_Env_Elements_Impl
  (Node : Bare_Qual_Expr
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Qual_Expr  := Bare_Qual_Expr (Node);
     Ent : Internal_Entity_Qual_Expr :=
       Internal_Entity_Qual_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1307 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1307 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1307;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11327 '<FieldAccess for env_elements_impl at nodes.lkt:19624:9>' Fld_1 ada/nodes.lkt:19624
--# expr-start 11326 '<FieldAccess for prefix at nodes.lkt:19624:9>' Fld ada/nodes.lkt:19624
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Qual_Expr_F_Prefix, Info => Ent.Info);
--# expr-done 11326
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.env_elements_impl'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Env_Elements_Impl (Node => Fld.Node, Env => Env, E_Info => Fld.Info);
--# end
--# expr-done 11327
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1307;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1307;
            raise;
      end;
   return Property_Result;
end Qual_Expr_P_Env_Elements_Impl;
--# end
   --
   --  Primitives for Bare_Reduce_Attribute_Ref
   --
      procedure Initialize_Fields_For_Reduce_Attribute_Ref
        (Self : Bare_Reduce_Attribute_Ref
         ; Reduce_Attribute_Ref_F_Prefix : Bare_Ada_Node
         ; Reduce_Attribute_Ref_F_Attribute : Bare_Identifier
         ; Reduce_Attribute_Ref_F_Args : Bare_Assoc_List
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Reduce_Attribute_Ref_F_Prefix := Reduce_Attribute_Ref_F_Prefix;
            Self.Reduce_Attribute_Ref_F_Attribute := Reduce_Attribute_Ref_F_Attribute;
            Self.Reduce_Attribute_Ref_F_Args := Reduce_Attribute_Ref_F_Args;
      Self.Reduce_Attribute_Ref_R_Ref_Var := Null_Var_Record;
      end Initialize_Fields_For_Reduce_Attribute_Ref;
   function Reduce_Attribute_Ref_F_Prefix
     (Node : Bare_Reduce_Attribute_Ref) return Bare_Ada_Node
   is
   begin
         return Node.Reduce_Attribute_Ref_F_Prefix;
   end;
   function Reduce_Attribute_Ref_F_Attribute
     (Node : Bare_Reduce_Attribute_Ref) return Bare_Identifier
   is
   begin
         return Node.Reduce_Attribute_Ref_F_Attribute;
   end;
   function Reduce_Attribute_Ref_F_Args
     (Node : Bare_Reduce_Attribute_Ref) return Bare_Assoc_List
   is
   begin
         return Node.Reduce_Attribute_Ref_F_Args;
   end;
--# property-start ReduceAttributeRef.ref_var ada/nodes.lkt:19637
pragma Warnings (Off, "is not referenced");
 function Reduce_Attribute_Ref_P_Ref_Var
  (Node : Bare_Reduce_Attribute_Ref
  )
   return Logic_Var
is
   Self : Bare_Reduce_Attribute_Ref  := Bare_Reduce_Attribute_Ref (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11328 '<FieldAccess for r_ref_var at nodes.lkt:19637:31>' Fld ada/nodes.lkt:19637
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Reduce_Attribute_Ref_R_Ref_Var'Unrestricted_Access;
--# expr-done 11328
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Reduce_Attribute_Ref_P_Ref_Var;
--# end
--# property-start ReduceAttributeRef.xref_equation ada/nodes.lkt:19646
pragma Warnings (Off, "is not referenced");
 function Reduce_Attribute_Ref_P_Xref_Equation
  (Node : Bare_Reduce_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Reduce_Attribute_Ref  := Bare_Reduce_Attribute_Ref (Node);
     Ent : Internal_Entity_Reduce_Attribute_Ref :=
       Internal_Entity_Reduce_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1309 with Inline_Always;
            procedure Finalizer_Scope_3382 with Inline_Always;
            procedure Finalizer_Scope_3383 with Inline_Always;
            procedure Finalizer_Scope_3384 with Inline_Always;
      Local_Reducer : Internal_Entity_Expr;
Var_Expr_1 : Internal_Entity_Basic_Decl;
Var_Expr_2 : Boolean;
Fld : Internal_Entity_Assoc_List;
Fld_1 : Bare_Assoc_List;
Fld_2 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_3 : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Base_Id;
Fld_4 : Symbol_Type;
Fld_5 : Bare_Ada_Node;
Fld_6 : Internal_Entity_Array_Access;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_7 : Boolean;
Cast_Expr_2 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Fld_8 : Logic_Equation;
Scope_Result : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Scope_Result_1 : Logic_Equation;
False_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1309 is
            begin
                     Dec_Ref (Fld_6);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1309;
            procedure Finalizer_Scope_3382 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (False_Rel_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_3382;
            procedure Finalizer_Scope_3383 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_3383;
            procedure Finalizer_Scope_3384 is
            begin
                     Dec_Ref (Fld_8);
            end Finalizer_Scope_3384;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11341 '<Let at nodes.lkt:19647:9>' Let_Result ada/nodes.lkt:19647
--# scope-start
--# expr-start 11330 '<FieldAccess for expr at nodes.lkt:19647:23>' Fld_3 ada/nodes.lkt:19647
--# expr-start 11329 '<FieldAccess for args at nodes.lkt:19647:23>' Fld ada/nodes.lkt:19647
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Reduce_Attribute_Ref_F_Args, Info => Ent.Info);
--# expr-done 11329
Fld_1 := Fld.Node;
Get_Result := Get (Self, Fld_1, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 11330
Local_Reducer := Fld_3; 
--# bind reducer Local_Reducer
--# expr-start 11340 '<LogicAny at nodes.lkt:19649:9>' Logic_Boolean_Op ada/nodes.lkt:19649
--# expr-start 11339 '<Map at nodes.lkt:19649:9>' Map_Result ada/nodes.lkt:19649
   --# expr-start 11334 '<FieldAccess for env_get at nodes.lkt:19649:9>' Fld_6 ada/nodes.lkt:19649
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11332 '<FieldAccess for sym at nodes.lkt:19651:20>' Fld_4 ada/nodes.lkt:19651
--# expr-start 11331 '<Cast to BaseId at nodes.lkt:19651:20>' Cast_Result ada/nodes.lkt:19651
Cast_Expr := Local_Reducer; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Id
   then
      Cast_Result := Create_Internal_Entity_Base_Id
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Id;
   end if;
--# expr-done 11331
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld_4 := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Cast_Result.Node);
--# end
--# expr-done 11332
--# expr-start 11333 '<FieldAccess for origin_node at nodes.lkt:19652:23>' Fld_5 ada/nodes.lkt:19652
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_5 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11333
--# property-call-start AdaNode.env_get
Fld_6 := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Env, Symbol => Fld_4, From_Node => Fld_5);
--# end
--# expr-done 11334
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_6;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind subp Item_0
--# expr-start 11335 '<Cast to BasicDecl at nodes.lkt:19656:13>' Cast_Result_1 ada/nodes.lkt:19656
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 11335
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind bd Var_Expr_1
--# expr-start 11336 '<FieldAccess for is_valid_reducer_candidate at nodes.lkt:19658:17>' Fld_7 ada/nodes.lkt:19658
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_valid_reducer_candidate
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Is_Valid_Reducer_Candidate (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 11336
Var_Expr_2 := Fld_7;
if Var_Expr_2 /= False then
   --# scope-start
   --# bind _ Var_Expr_2
--# expr-start 11338 '<FieldAccess for xref_equation_for_reducer_candidate at nodes.lkt:19660:21>' Fld_8 ada/nodes.lkt:19660
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11337 '<Cast to BasicDecl at nodes.lkt:19661:25>' Cast_Result_2 ada/nodes.lkt:19661
Cast_Expr_2 := Item_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_2 := No_Entity_Basic_Decl;
   end if;
--# expr-done 11337
--# property-call-start ReduceAttributeRef.xref_equation_for_reducer_candidate
Fld_8 := Libadalang.Implementation.Reduce_Attribute_Ref_P_Xref_Equation_For_Reducer_Candidate (Node => Ent.Node, Subp => Cast_Result_2, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 11338
Scope_Result := Fld_8;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3384;
   Result_Var := Scope_Result;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19663:33") else null)); 
   Result_Var := False_Rel;
end if;
      Inc_Ref (Result_Var);
Scope_Result_1 := Result_Var;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3383;
   Result_Var_1 := Scope_Result_1;
else
   False_Rel_1 := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19665:29") else null)); 
   Result_Var_1 := False_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
         declare
            Item_To_Append : constant Logic_Equation := Result_Var_1;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3382;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11339
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19649:9") else null)); 
--# expr-done 11340
Let_Result := Logic_Boolean_Op; Inc_Ref (Let_Result);
--# end
--# expr-done 11341
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1309;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1309;
                     Finalizer_Scope_3382;
                     Finalizer_Scope_3383;
                     Finalizer_Scope_3384;
            raise;
      end;
   return Property_Result;
end Reduce_Attribute_Ref_P_Xref_Equation;
--# end
--# property-start ReduceAttributeRef.xref_equation_for_reducer_candidate ada/nodes.lkt:19672
pragma Warnings (Off, "is not referenced");
 function Reduce_Attribute_Ref_P_Xref_Equation_For_Reducer_Candidate
  (Node : Bare_Reduce_Attribute_Ref
      ; Subp : Internal_Entity_Basic_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Reduce_Attribute_Ref  := Bare_Reduce_Attribute_Ref (Node);
     Ent : Internal_Entity_Reduce_Attribute_Ref :=
       Internal_Entity_Reduce_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind subp Subp
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1310 with Inline_Always;
            procedure Finalizer_Scope_3385 with Inline_Always;
      Local_Reducer : Internal_Entity_Base_Id;
Local_Initial_Value_Expression : Internal_Entity_Expr;
Local_Param_Types : Internal_Entity_Base_Type_Decl_Array_Access;
Local_Accum_Type : Internal_Entity_Base_Type_Decl;
Local_Value_Type : Internal_Entity_Base_Type_Decl;
Var_Expr_0 : Internal_Entity_Value_Sequence;
Fld : Internal_Entity_Assoc_List;
Fld_1 : Bare_Assoc_List;
Fld_2 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Assoc;
Fld_3 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Base_Id;
Fld_4 : Internal_Entity_Assoc_List;
Fld_5 : Bare_Assoc_List;
Fld_6 : Internal_Entity_Info;
Get_Result_1 : Bare_Basic_Assoc;
As_Entity_1 : Internal_Entity_Basic_Assoc;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Assoc;
Fld_7 : Internal_Entity_Expr;
Fld_8 : Internal_Entity_Base_Subp_Spec;
Fld_9 : Internal_Entity_Base_Type_Decl_Array_Access;
Get_Result_2 : Internal_Entity_Base_Type_Decl;
Get_Result_3 : Internal_Entity_Base_Type_Decl;
Fld_10 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Value_Sequence;
Fld_11 : Internal_Entity_Iterated_Assoc;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_14 : Internal_Entity_Iterated_Assoc;
Fld_15 : Internal_Entity_Expr;
Fld_16 : Logic_Equation;
And_Pred : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Fld_17 : Internal_Entity;
Fld_18 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_19 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_20 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_21 : Logic_Var;
Cast_Expr_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Bind_Result_3 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_22 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Fld_23 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
Let_Result_4 : Logic_Equation;
            procedure Finalizer_Scope_1310 is
            begin
                     Dec_Ref (Fld_9);
                     Dec_Ref (Local_Param_Types);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_18);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_22);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Fld_23);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_1310;
            procedure Finalizer_Scope_3385 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_16);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3385;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11381 '<Let at nodes.lkt:19675:9>' Let_Result_4 ada/nodes.lkt:19675
--# scope-start
--# expr-start 11344 '<Cast to BaseId at nodes.lkt:19675:23>' Cast_Result ada/nodes.lkt:19675
--# expr-start 11343 '<FieldAccess for expr at nodes.lkt:19675:23>' Fld_3 ada/nodes.lkt:19675
--# expr-start 11342 '<FieldAccess for args at nodes.lkt:19675:23>' Fld ada/nodes.lkt:19675
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Reduce_Attribute_Ref_F_Args, Info => Ent.Info);
--# expr-done 11342
Fld_1 := Fld.Node;
Get_Result := Get (Self, Fld_1, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 11343
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Base_Id
   then
      Cast_Result := Create_Internal_Entity_Base_Id
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result := No_Entity_Base_Id;
   end if;
--# expr-done 11344
Local_Reducer := Cast_Result; 
--# bind reducer Local_Reducer
--# expr-start 11380 '<Let at nodes.lkt:19676:9>' Let_Result_3 ada/nodes.lkt:19676
--# scope-start
--# expr-start 11346 '<FieldAccess for expr at nodes.lkt:19676:40>' Fld_7 ada/nodes.lkt:19676
--# expr-start 11345 '<FieldAccess for args at nodes.lkt:19676:40>' Fld_4 ada/nodes.lkt:19676
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Assoc_List (Node => Ent.Node.Reduce_Attribute_Ref_F_Args, Info => Ent.Info);
--# expr-done 11345
Fld_5 := Fld_4.Node;
Get_Result_1 := Get (Self, Fld_5, 1, True); 
Is_Null_1 := Get_Result_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Basic_Assoc;
else
Fld_6 := Fld_4.Info;
As_Entity_1 := (Info => Fld_6, Node => Get_Result_1); 
   If_Result_1 := As_Entity_1;
end if;
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => If_Result_1.Node, E_Info => If_Result_1.Info);
--# end
--# expr-done 11346
Local_Initial_Value_Expression := Fld_7; 
--# bind initial_value_expression Local_Initial_Value_Expression
--# expr-start 11379 '<Let at nodes.lkt:19680:9>' Let_Result_2 ada/nodes.lkt:19680
--# scope-start
--# expr-start 11348 '<FieldAccess for param_types at nodes.lkt:19680:27>' Fld_9 ada/nodes.lkt:19680
--# expr-start 11347 '<FieldAccess for subp_spec_or_null at nodes.lkt:19680:27>' Fld_8 ada/nodes.lkt:19680
      if Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Subp.Node, E_Info => Subp.Info);
--# end
--# expr-done 11347
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.param_types
Fld_9 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Param_Types (Node => Fld_8.Node, Origin => Origin, E_Info => Fld_8.Info);
--# end
--# expr-done 11348
Local_Param_Types := Fld_9; Inc_Ref (Local_Param_Types);
--# bind param_types Local_Param_Types
--# expr-start 11378 '<Let at nodes.lkt:19681:9>' Let_Result_1 ada/nodes.lkt:19681
--# scope-start
--# expr-start 11349 '<at at nodes.lkt:19681:26>' Get_Result_2 ada/nodes.lkt:19681
Get_Result_2 := Get (Self, Local_Param_Types, 0, True); 
--# expr-done 11349
Local_Accum_Type := Get_Result_2; 
--# bind accum_type Local_Accum_Type
--# expr-start 11377 '<Let at nodes.lkt:19682:9>' Let_Result ada/nodes.lkt:19682
--# scope-start
--# expr-start 11350 '<at at nodes.lkt:19682:26>' Get_Result_3 ada/nodes.lkt:19682
Get_Result_3 := Get (Self, Local_Param_Types, 1, True); 
--# expr-done 11350
Local_Value_Type := Get_Result_3; 
--# bind value_type Local_Value_Type
--# expr-start 11376 '<LogicBinaryOp And at nodes.lkt:19684:9>' And_Pred_6 ada/nodes.lkt:19684
--# expr-start 11374 '<LogicBinaryOp And at nodes.lkt:19684:9>' And_Pred_5 ada/nodes.lkt:19684
--# expr-start 11372 '<LogicBinaryOp And at nodes.lkt:19684:9>' And_Pred_4 ada/nodes.lkt:19684
--# expr-start 11369 '<LogicBinaryOp And at nodes.lkt:19684:9>' And_Pred_3 ada/nodes.lkt:19684
--# expr-start 11366 '<LogicBinaryOp And at nodes.lkt:19684:9>' And_Pred_2 ada/nodes.lkt:19684
--# expr-start 11363 '<LogicBinaryOp And at nodes.lkt:19684:9>' And_Pred_1 ada/nodes.lkt:19684
--# expr-start 11352 '<Cast to ValueSequence at nodes.lkt:19684:9>' Cast_Result_1 ada/nodes.lkt:19684
--# expr-start 11351 '<FieldAccess for prefix at nodes.lkt:19684:9>' Fld_10 ada/nodes.lkt:19684
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity (Node => Ent.Node.Reduce_Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 11351
   if Fld_10.Node = null
      or else Fld_10.Node.Kind in Ada_Value_Sequence_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Value_Sequence
        (Node => Fld_10.Node,
         Info => Fld_10.Info);
   else
         Cast_Result_1 := No_Entity_Value_Sequence;
   end if;
--# expr-done 11352
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Entity_Value_Sequence then
   --# scope-start
   --# bind vs Var_Expr_0
--# expr-start 11360 '<LogicBinaryOp And at nodes.lkt:19686:13>' And_Pred ada/nodes.lkt:19686
--# expr-start 11356 '<Bind at nodes.lkt:19686:13>' Bind_Result ada/nodes.lkt:19686
--# expr-start 11355 '<FieldAccess for expected_type_var at nodes.lkt:19686:13>' Fld_13 ada/nodes.lkt:19686
--# expr-start 11354 '<FieldAccess for expr at nodes.lkt:19686:13>' Fld_12 ada/nodes.lkt:19686
--# expr-start 11353 '<FieldAccess for iter_assoc at nodes.lkt:19686:13>' Fld_11 ada/nodes.lkt:19686
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Iterated_Assoc (Node => Var_Expr_0.Node.Value_Sequence_F_Iter_Assoc, Info => Var_Expr_0.Info);
--# expr-done 11353
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_12 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_11.Node, E_Info => Fld_11.Info);
--# end
--# expr-done 11354
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_12.Node);
--# expr-done 11355
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
Cast_Expr := Local_Value_Type; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_13, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19686:13") else null)); 
--# expr-done 11356
--# expr-start 11359 '<FieldAccess for matches_expected_type at nodes.lkt:19687:18>' Fld_16 ada/nodes.lkt:19687
--# expr-start 11358 '<FieldAccess for expr at nodes.lkt:19687:18>' Fld_15 ada/nodes.lkt:19687
--# expr-start 11357 '<FieldAccess for iter_assoc at nodes.lkt:19687:18>' Fld_14 ada/nodes.lkt:19687
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Iterated_Assoc (Node => Var_Expr_0.Node.Value_Sequence_F_Iter_Assoc, Info => Var_Expr_0.Info);
--# expr-done 11357
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_15 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_14.Node, E_Info => Fld_14.Info);
--# end
--# expr-done 11358
      if Fld_15.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_16 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_15.Node, Origin => Origin);
--# end
--# expr-done 11359
And_Pred := Create_And (Bind_Result, Fld_16, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19686:13") else null)); 
--# expr-done 11360
Scope_Result := And_Pred;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3385;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19688:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
--# expr-start 11362 '<FieldAccess for sub_equation at nodes.lkt:19690:14>' Fld_18 ada/nodes.lkt:19690
--# expr-start 11361 '<FieldAccess for prefix at nodes.lkt:19690:14>' Fld_17 ada/nodes.lkt:19690
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Create_Internal_Entity (Node => Ent.Node.Reduce_Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 11361
      if Fld_17.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_18 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_17.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_17.Info);
--# end
--# expr-done 11362
And_Pred_1 := Create_And (Result_Var, Fld_18, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19684:9") else null)); 
--# expr-done 11363
--# expr-start 11365 '<Bind at nodes.lkt:19691:14>' Bind_Result_1 ada/nodes.lkt:19691
--# expr-start 11364 '<FieldAccess for type_var at nodes.lkt:19691:14>' Fld_19 ada/nodes.lkt:19691
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11364
Fld_19.Value := No_Entity;
Entity_Vars.Reset (Fld_19);
Cast_Expr_1 := Local_Accum_Type; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_19, Cast_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19691:14") else null)); 
--# expr-done 11365
And_Pred_2 := Create_And (And_Pred_1, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19684:9") else null)); 
--# expr-done 11366
--# expr-start 11368 '<Bind at nodes.lkt:19692:14>' Bind_Result_2 ada/nodes.lkt:19692
--# expr-start 11367 '<FieldAccess for ref_var at nodes.lkt:19692:14>' Fld_20 ada/nodes.lkt:19692
      if Local_Reducer.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_20 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Local_Reducer.Node);
--# end
--# expr-done 11367
Fld_20.Value := No_Entity;
Entity_Vars.Reset (Fld_20);
Cast_Expr_2 := Subp; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_20, Cast_Result_4, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19692:14") else null)); 
--# expr-done 11368
And_Pred_3 := Create_And (And_Pred_2, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19684:9") else null)); 
--# expr-done 11369
--# expr-start 11371 '<Bind at nodes.lkt:19693:14>' Bind_Result_3 ada/nodes.lkt:19693
--# expr-start 11370 '<FieldAccess for expected_type_var at nodes.lkt:19693:14>' Fld_21 ada/nodes.lkt:19693
      if Local_Initial_Value_Expression.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Local_Initial_Value_Expression.Node);
--# expr-done 11370
Fld_21.Value := No_Entity;
Entity_Vars.Reset (Fld_21);
Cast_Expr_3 := Local_Accum_Type; 
      Cast_Result_5 := Create_Internal_Entity
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
Bind_Result_3 := Solver.Create_Assign (Fld_21, Cast_Result_5, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19693:14") else null)); 
--# expr-done 11371
And_Pred_4 := Create_And (And_Pred_3, Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19684:9") else null)); 
--# expr-done 11372
--# expr-start 11373 '<FieldAccess for sub_equation at nodes.lkt:19694:14>' Fld_22 ada/nodes.lkt:19694
      if Local_Initial_Value_Expression.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_22 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Initial_Value_Expression.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Initial_Value_Expression.Info);
--# end
--# expr-done 11373
And_Pred_5 := Create_And (And_Pred_4, Fld_22, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19684:9") else null)); 
--# expr-done 11374
--# expr-start 11375 '<FieldAccess for matches_expected_formal_type at nodes.lkt:19695:14>' Fld_23 ada/nodes.lkt:19695
      if Local_Initial_Value_Expression.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_23 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Local_Initial_Value_Expression.Node, Origin => Origin);
--# end
--# expr-done 11375
And_Pred_6 := Create_And (And_Pred_5, Fld_23, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:19684:9") else null)); 
--# expr-done 11376
Let_Result := And_Pred_6; Inc_Ref (Let_Result);
--# end
--# expr-done 11377
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11378
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 11379
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 11380
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 11381
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1310;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1310;
                     Finalizer_Scope_3385;
            raise;
      end;
   return Property_Result;
end Reduce_Attribute_Ref_P_Xref_Equation_For_Reducer_Candidate;
--# end
   --
   --  Primitives for Bare_Single_Tok_Node
   --
      procedure Initialize_Fields_For_Single_Tok_Node
        (Self : Bare_Single_Tok_Node
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
      end Initialize_Fields_For_Single_Tok_Node;
--# property-start SingleTokNode.relative_name ada/nodes.lkt:19702
pragma Warnings (Off, "is not referenced");
 function Single_Tok_Node_P_Relative_Name
  (Node : Bare_Single_Tok_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Single_Tok_Node  := Bare_Single_Tok_Node (Node);
     Ent : Internal_Entity_Single_Tok_Node :=
       Internal_Entity_Single_Tok_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Cast_Expr : Internal_Entity_Single_Tok_Node;
Cast_Result : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Single_Tok_Node_P_Relative_Name;
--# end
--# property-start SingleTokNode.defines_subp_spec_var ada/nodes.lkt:19710
pragma Warnings (Off, "is not referenced");
 function Single_Tok_Node_P_Defines_Subp_Spec_Var
  (Node : Bare_Single_Tok_Node
  )
   return Boolean
is
   Self : Bare_Single_Tok_Node  := Bare_Single_Tok_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Single_Tok_Node_P_Defines_Subp_Spec_Var;
--# end
--# property-start SingleTokNode.sym ada/nodes.lkt:19715
pragma Warnings (Off, "is not referenced");
 function Single_Tok_Node_P_Sym
  (Node : Bare_Single_Tok_Node
  )
   return Symbol_Type
is
   Self : Bare_Single_Tok_Node  := Bare_Single_Tok_Node (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Sym : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11382 '<GetSymbol at nodes.lkt:19715:25>' Sym ada/nodes.lkt:19715
Sym := Get_Symbol (Self); 
--# expr-done 11382
         Property_Result := Sym;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Single_Tok_Node_P_Sym;
--# end
--# property-start SingleTokNode.name_symbol ada/nodes.lkt:19717
pragma Warnings (Off, "is not referenced");
 function Single_Tok_Node_P_Name_Symbol
  (Node : Bare_Single_Tok_Node
  )
   return Symbol_Type
is
   Self : Bare_Single_Tok_Node  := Bare_Single_Tok_Node (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Sym : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11383 '<GetSymbol at nodes.lkt:19717:33>' Sym ada/nodes.lkt:19717
Sym := Get_Symbol (Self); 
--# expr-done 11383
         Property_Result := Sym;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Single_Tok_Node_P_Name_Symbol;
--# end
--# property-start SingleTokNode.canonical_text ada/nodes.lkt:19719
pragma Warnings (Off, "is not referenced");
 function Single_Tok_Node_P_Canonical_Text
  (Node : Bare_Single_Tok_Node
  )
   return Symbol_Type
is
   Self : Bare_Single_Tok_Node  := Bare_Single_Tok_Node (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Fld : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11384 '<FieldAccess for sym at nodes.lkt:19719:36>' Fld ada/nodes.lkt:19719
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Self);
--# end
--# expr-done 11384
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Single_Tok_Node_P_Canonical_Text;
--# end
--# property-start SingleTokNode.env_get_first_visible ada/nodes.lkt:19726
pragma Warnings (Off, "is not referenced");
 function Single_Tok_Node_P_Env_Get_First_Visible
  (Node : Bare_Single_Tok_Node
      ; Lex_Env : Lexical_Env
      ; Lookup_Type : Lookup_Kind
      ; From_Node : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
  )
   return Internal_Entity
is
   Self : Bare_Single_Tok_Node  := Bare_Single_Tok_Node (Node);
      --# bind self Self
   --# bind lex_env Lex_Env
   --# bind lookup_type Lookup_Type
   --# bind from_node From_Node
   --# bind no_visibility No_Visibility
   Property_Result : Internal_Entity;
            procedure Finalizer_Scope_262 with Inline_Always;
      Sym : Symbol_Type;
Fld : Internal_Entity_Array_Access;
Fld_1 : Boolean;
If_Result : Boolean;
Find_Result : Internal_Entity;
            procedure Finalizer_Scope_262 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_262;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11389 '<Find at nodes.lkt:19731:9>' Find_Result ada/nodes.lkt:19731
   --# expr-start 11386 '<FieldAccess for env_get at nodes.lkt:19731:9>' Fld ada/nodes.lkt:19731
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11385 '<GetSymbol at nodes.lkt:19733:13>' Sym ada/nodes.lkt:19733
Sym := Get_Symbol (Self); 
--# expr-done 11385
--# property-call-start AdaNode.env_get
Fld := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Lex_Env, Symbol => Sym, Lookup => Lookup_Type, From_Node => From_Node, Categories => (Inherited_Primitives => False, Nocat => True));
--# end
--# expr-done 11386
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind el Item_0
      --# expr-start 11388 '<BooleanBinaryOp Or at nodes.lkt:19740:13>' If_Result ada/nodes.lkt:19740
if No_Visibility then
   If_Result := True;
else
   --# expr-start 11387 '<FieldAccess for has_visibility at nodes.lkt:19745:16>' Fld_1 ada/nodes.lkt:19745
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_1 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 11387
   If_Result := Fld_1;
end if;
--# expr-done 11388
      if If_Result then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when If_Result;
         end loop;
      end;
--# expr-done 11389
         Property_Result := Find_Result;
   --# end
      Finalizer_Scope_262;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_262;
            raise;
      end;
   return Property_Result;
end Single_Tok_Node_P_Env_Get_First_Visible;
--# end
   --
   --  Primitives for Bare_Base_Id
   --
      procedure Initialize_Fields_For_Base_Id
        (Self : Bare_Base_Id
        ) is
      begin
            Initialize_Fields_For_Single_Tok_Node
              (Self);
      end Initialize_Fields_For_Base_Id;
--# property-start BaseId.scope ada/nodes.lkt:19755
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Scope
  (Node : Bare_Base_Id
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_263 with Inline_Always;
            procedure Finalizer_Scope_3387 with Inline_Always;
      Local_Elt : Internal_Entity;
Local_Ret : Lexical_Env := Empty_Env;
Var_Expr_0 : Bare_Generic_Package_Decl;
Sym : Symbol_Type;
Fld : Boolean;
If_Result : Lookup_Kind;
Env_Get_Result : Internal_Entity;
Fld_1 : Lexical_Env := Empty_Env;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_2 : Bare_Ada_Node;
Is_A : Boolean;
If_Result_1 : Boolean;
If_Result_2 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Cast_Result : Bare_Generic_Package_Decl;
Fld_3 : Bare_Generic_Package_Internal;
Fld_4 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
Let_Result_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_263 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Local_Ret);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_263;
            procedure Finalizer_Scope_3387 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3387;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Id_Base_Id_P_Scope,
            Items    => new Mmz_Key_Array (1 ..  2))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Id,
                                As_Bare_Base_Id => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Lexical_Env,
                                      As_Lexical_Env => Env);
                  Inc_Ref (Mmz_K.Items (2).As_Lexical_Env);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Lexical_Env;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 11406 '<Let at nodes.lkt:19756:9>' Let_Result_1 ada/nodes.lkt:19756
--# scope-start
--# expr-start 11393 '<EnvGet at nodes.lkt:19757:13>' Env_Get_Result ada/nodes.lkt:19757
--# expr-start 11390 '<GetSymbol at nodes.lkt:19758:17>' Sym ada/nodes.lkt:19758
Sym := Get_Symbol (Self); 
--# expr-done 11390
--# expr-start 11392 '<If at nodes.lkt:19759:24>' If_Result ada/nodes.lkt:19759
--# expr-start 11391 '<FieldAccess for is_prefix at nodes.lkt:19759:27>' Fld ada/nodes.lkt:19759
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 11391
if Fld then
   If_Result := Recursive;
else
   If_Result := Flat;
end if;
--# expr-done 11392
Env_Get_Result := AST_Envs.Get_First (Self => Env, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (If_Result), Categories => (Inherited_Primitives => False, Nocat => True)); 
--# expr-done 11393
Local_Elt := Env_Get_Result; 
--# bind elt Local_Elt
--# expr-start 11405 '<Let at nodes.lkt:19763:9>' Let_Result ada/nodes.lkt:19763
--# scope-start
--# expr-start 11400 '<If at nodes.lkt:19764:13>' If_Result_2 ada/nodes.lkt:19764
--# expr-start 11398 '<BooleanBinaryOp And at nodes.lkt:19764:16>' If_Result_1 ada/nodes.lkt:19764
--# expr-start 11395 '<Not at nodes.lkt:19764:16>' Not_Val ada/nodes.lkt:19764
--# expr-start 11394 '<IsNull at nodes.lkt:19764:20>' Is_Null ada/nodes.lkt:19764
Is_Null := Local_Elt.Node = null; 
--# expr-done 11394
Not_Val := not (Is_Null); 
--# expr-done 11395
if Not_Val then
   --# expr-start 11397 '<IsA BasicDecl at nodes.lkt:19764:36>' Is_A ada/nodes.lkt:19764
--# expr-start 11396 '<FieldAccess for node at nodes.lkt:19764:36>' Fld_2 ada/nodes.lkt:19764
Fld_2 := Local_Elt.Node;
--# expr-done 11396
Is_A := Fld_2 /= null 
and then Fld_2.Kind in Ada_Basic_Decl; 
--# expr-done 11397
   If_Result_1 := Is_A;
else
   If_Result_1 := False;
end if;
--# expr-done 11398
if If_Result_1 then
   --# expr-start 11399 '<FieldAccess for children_env at nodes.lkt:19764:63>' Fld_1 ada/nodes.lkt:19764
      if Local_Elt.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Local_Elt.Node, E_Info => Local_Elt.Info);
--# expr-done 11399
   If_Result_2 := Fld_1;
else
   If_Result_2 := Empty_Env;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 11400
Local_Ret := If_Result_2; Inc_Ref (Local_Ret);
--# bind ret Local_Ret
--# expr-start 11402 '<Cast to GenericPackageDecl at nodes.lkt:19769:9>' Cast_Result ada/nodes.lkt:19769
--# expr-start 11401 '<env_node at nodes.lkt:19769:9>' Env_Node ada/nodes.lkt:19769
Env_Node := AST_Envs.Env_Node (Local_Ret); 
--# expr-done 11401
   if Env_Node = null
      or else Env_Node.Kind in Ada_Generic_Package_Decl_Range
   then
      Cast_Result := Env_Node;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 11402
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind gen_pkg_decl Var_Expr_0
--# expr-start 11404 '<FieldAccess for children_env at nodes.lkt:19770:31>' Fld_4 ada/nodes.lkt:19770
--# expr-start 11403 '<FieldAccess for package_decl at nodes.lkt:19770:31>' Fld_3 ada/nodes.lkt:19770
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Var_Expr_0.Generic_Package_Decl_F_Package_Decl;
--# expr-done 11403
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Children_Env (Node => Fld_3);
--# expr-done 11404
Scope_Result := Fld_4;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3387;
   Result_Var := Scope_Result;
else
   Result_Var := Local_Ret;
end if;
      Inc_Ref (Result_Var);
Let_Result := Result_Var; Inc_Ref (Let_Result);
--# end
--# expr-done 11405
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11406
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_263;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_263;
                     Finalizer_Scope_3387;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Lexical_Env,
                        As_Lexical_Env => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Id_P_Scope;
--# end
--# property-start BaseId.designated_env_no_overloading ada/nodes.lkt:19776
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Designated_Env_No_Overloading
  (Node : Bare_Base_Id
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
     Ent : Internal_Entity_Base_Id :=
       Internal_Entity_Base_Id'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_264 with Inline_Always;
            procedure Finalizer_Scope_3388 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Var_Expr_267 : Internal_Entity_Basic_Decl;
Fld : Boolean;
If_Result : Lookup_Kind;
Fld_1 : Bare_Ada_Node;
Fld_2 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Lexical_Env := Empty_Env;
Fld_5 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_6 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Fld_7 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result_1 : Lexical_Env := Empty_Env;
Is_A : Boolean;
If_Result_2 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_264 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_264;
            procedure Finalizer_Scope_3388 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_2);
            end Finalizer_Scope_3388;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 11411 '<Cast to BasicDecl at nodes.lkt:19777:9>' Cast_Result ada/nodes.lkt:19777
--# expr-start 11410 '<FieldAccess for env_get_first_visible at nodes.lkt:19777:9>' Fld_2 ada/nodes.lkt:19777
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11408 '<If at nodes.lkt:19779:25>' If_Result ada/nodes.lkt:19779
--# expr-start 11407 '<FieldAccess for is_prefix at nodes.lkt:19779:28>' Fld ada/nodes.lkt:19779
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 11407
if Fld then
   If_Result := Recursive;
else
   If_Result := Flat;
end if;
--# expr-done 11408
--# expr-start 11409 '<FieldAccess for origin_node at nodes.lkt:19781:23>' Fld_1 ada/nodes.lkt:19781
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11409
--# property-call-start SingleTokNode.env_get_first_visible
Fld_2 := Libadalang.Implementation.Single_Tok_Node_P_Env_Get_First_Visible (Node => Self, Lex_Env => Env, Lookup_Type => If_Result, From_Node => Fld_1, No_Visibility => No_Visibility);
--# end
--# expr-done 11410
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 11411
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind bd Var_Expr_0
--# expr-start 11420 '<If at nodes.lkt:19792:13>' If_Result_2 ada/nodes.lkt:19792
--# expr-start 11412 '<IsA ObjectDecl at nodes.lkt:19792:16>' Is_A ada/nodes.lkt:19792
Is_A := Var_Expr_0.Node /= null 
and then Var_Expr_0.Node.Kind in Ada_Object_Decl_Range; 
--# expr-done 11412
if Is_A then
   --# expr-start 11413 '<FieldAccess for empty_env at nodes.lkt:19792:38>' Fld_3 ada/nodes.lkt:19792
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.empty_env
Fld_3 := Libadalang.Implementation.Ada_Node_P_Empty_Env (Node => Self);
--# end
--# expr-done 11413
   If_Result_2 := Fld_3;
else
   --# expr-start 11419 '<If at nodes.lkt:19792:13>' If_Result_1 ada/nodes.lkt:19792
Var_Expr_267 := Var_Expr_0;
if Var_Expr_267 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 11414 '<FieldAccess for is_package at nodes.lkt:19793:18>' Fld_7 ada/nodes.lkt:19793
      if Var_Expr_267.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.is_package
Fld_7 := Libadalang.Implementation.Ada_Node_P_Is_Package (Node => Var_Expr_267.Node);
--# end
--# expr-done 11414
Scope_Result := Fld_7;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   --# expr-start 11415 '<FieldAccess for pkg_env at nodes.lkt:19793:40>' Fld_4 ada/nodes.lkt:19793
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseId.pkg_env
Fld_4 := Libadalang.Implementation.Base_Id_P_Pkg_Env (Node => Ent.Node, From_Pkg => Var_Expr_0, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 11415
   If_Result_1 := Fld_4;
else
   --# expr-start 11418 '<bind at nodes.lkt:19795:17>' Dyn_Var_Bind_Result ada/nodes.lkt:19795
--# expr-start 11416 '<FieldAccess for origin_node at nodes.lkt:19795:31>' Fld_5 ada/nodes.lkt:19795
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_5 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11416
Bound_Origin := Fld_5; 
--# expr-start 11417 '<FieldAccess for defining_env at nodes.lkt:19797:17>' Fld_6 ada/nodes.lkt:19797
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Var_Expr_0.Node, Origin => Bound_Origin, Include_Ud_Indexing => False, Dottable_Type => No_Bare_Ada_Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 11417
Dyn_Var_Bind_Result := Fld_6; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11418
   If_Result_1 := Dyn_Var_Bind_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 11419
   If_Result_2 := If_Result_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 11420
Scope_Result_1 := If_Result_2;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3388;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Empty_Env;
end if;
      Inc_Ref (Result_Var_1);
         Property_Result := Result_Var_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_264;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_264;
                     Finalizer_Scope_3388;
            raise;
      end;
   return Property_Result;
end Base_Id_P_Designated_Env_No_Overloading;
--# end
--# property-start BaseId.designated_env ada/nodes.lkt:19804
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Designated_Env
  (Node : Bare_Base_Id
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
     Ent : Internal_Entity_Base_Id :=
       Internal_Entity_Base_Id'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_265 with Inline_Always;
            procedure Finalizer_Scope_3391 with Inline_Always;
            procedure Finalizer_Scope_3393 with Inline_Always;
      Local_Bd : Bare_Ada_Node;
Local_Env_El : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Entity_Array_Access;
Var_Expr_268 : Internal_Entity_Basic_Decl;
Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Fld : Boolean;
If_Result : Lookup_Kind;
Fld_1 : Bare_Ada_Node;
Fld_2 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Internal_Entity_Array_Access;
Fld_5 : Bare_Ada_Node;
Cast_Result_1 : Bare_Ada_Node;
Is_Equal : Boolean;
Not_Val : Boolean;
Fld_6 : Boolean;
If_Result_1 : Boolean;
Map_Result : Internal_Entity_Array_Access;
Scope_Result : Internal_Entity_Array_Access;
Result_Var : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Fld_7 : Lexical_Env := Empty_Env;
Map_Result_1 : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Fld_8 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Fld_9 : Bare_Basic_Decl;
Cast_Result_3 : Bare_Ada_Node;
Is_Equal_1 : Boolean;
Not_Val_1 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
Let_Result_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_265 is
            begin
                     Dec_Ref (Node_Parents);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Group_Env);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_265;
            procedure Finalizer_Scope_3391 is
            begin
                     Dec_Ref (Var_Expr_1);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3391;
            procedure Finalizer_Scope_3393 is
            begin
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_3393;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11448 '<Let at nodes.lkt:19805:9>' Let_Result_1 ada/nodes.lkt:19805
--# scope-start
--# expr-start 11423 '<Find at nodes.lkt:19805:18>' Find_Result ada/nodes.lkt:19805
   --# expr-start 11421 '<FieldAccess for parents at nodes.lkt:19805:18>' Node_Parents ada/nodes.lkt:19805
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 11421
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 11422 '<IsA GenericPackageInstantiation at nodes.lkt:19805:45>' Is_A ada/nodes.lkt:19805
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Generic_Package_Instantiation_Range; 
--# expr-done 11422
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 11423
Local_Bd := Find_Result; 
--# bind bd Local_Bd
--# expr-start 11447 '<Let at nodes.lkt:19806:9>' Let_Result ada/nodes.lkt:19806
--# scope-start
--# expr-start 11428 '<Cast to BasicDecl at nodes.lkt:19807:13>' Cast_Result ada/nodes.lkt:19807
--# expr-start 11427 '<FieldAccess for env_get_first_visible at nodes.lkt:19807:13>' Fld_2 ada/nodes.lkt:19807
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11425 '<If at nodes.lkt:19809:29>' If_Result ada/nodes.lkt:19809
--# expr-start 11424 '<FieldAccess for is_prefix at nodes.lkt:19809:32>' Fld ada/nodes.lkt:19809
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 11424
if Fld then
   If_Result := Recursive;
else
   If_Result := Flat;
end if;
--# expr-done 11425
--# expr-start 11426 '<FieldAccess for origin_node at nodes.lkt:19811:27>' Fld_1 ada/nodes.lkt:19811
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11426
--# property-call-start SingleTokNode.env_get_first_visible
Fld_2 := Libadalang.Implementation.Single_Tok_Node_P_Env_Get_First_Visible (Node => Self, Lex_Env => Env, Lookup_Type => If_Result, From_Node => Fld_1, No_Visibility => No_Visibility);
--# end
--# expr-done 11427
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 11428
Local_Env_El := Cast_Result; 
--# bind env_el Local_Env_El
--# expr-start 11446 '<If at nodes.lkt:19816:9>' If_Result_3 ada/nodes.lkt:19816
--# expr-start 11433 '<BooleanBinaryOp And at nodes.lkt:19816:12>' If_Result_2 ada/nodes.lkt:19816
Var_Expr_268 := Local_Env_El;
if Var_Expr_268 /= No_Entity_Basic_Decl then
   --# scope-start
--# expr-start 11429 '<FieldAccess for is_package at nodes.lkt:19816:12>' Fld_8 ada/nodes.lkt:19816
      if Var_Expr_268.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.is_package
Fld_8 := Libadalang.Implementation.Ada_Node_P_Is_Package (Node => Var_Expr_268.Node);
--# end
--# expr-done 11429
Scope_Result_1 := Fld_8;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
if Result_Var_1 then
   --# expr-start 11432 '<Not at nodes.lkt:19816:37>' Not_Val_1 ada/nodes.lkt:19816
--# expr-start 11431 '<Eq at nodes.lkt:19816:37>' Is_Equal_1 ada/nodes.lkt:19816
--# expr-start 11430 '<FieldAccess for node at nodes.lkt:19816:37>' Fld_9 ada/nodes.lkt:19816
Fld_9 := Local_Env_El.Node;
--# expr-done 11430
      Cast_Result_3 := Fld_9;
Is_Equal_1 := Cast_Result_3 = Local_Bd; 
--# expr-done 11431
Not_Val_1 := not (Is_Equal_1); 
--# expr-done 11432
   If_Result_2 := Not_Val_1;
else
   If_Result_2 := False;
end if;
--# expr-done 11433
if If_Result_2 then
   --# expr-start 11434 '<FieldAccess for pkg_env at nodes.lkt:19816:60>' Fld_3 ada/nodes.lkt:19816
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseId.pkg_env
Fld_3 := Libadalang.Implementation.Base_Id_P_Pkg_Env (Node => Ent.Node, From_Pkg => Local_Env_El, Env => Env, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 11434
   If_Result_3 := Fld_3;
else
   --# expr-start 11445 '<env_group at nodes.lkt:19818:13>' Group_Env ada/nodes.lkt:19818
--# expr-start 11444 '<Map at nodes.lkt:19818:13>' Map_Result_1 ada/nodes.lkt:19818
--# expr-start 11435 '<FieldAccess for env_elements_impl at nodes.lkt:19818:13>' Fld_4 ada/nodes.lkt:19818
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.env_elements_impl'
Fld_4 := Libadalang.Implementation.Dispatcher_Expr_P_Env_Elements_Impl (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 11435
Var_Expr_1 := Fld_4;
      Inc_Ref (Var_Expr_1);
if Var_Expr_1 /= No_Internal_Entity_Array_Type then
   --# scope-start
   --# bind all_env_els Var_Expr_1
--# expr-start 11441 '<Map at nodes.lkt:19820:17>' Map_Result ada/nodes.lkt:19820
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Var_Expr_1;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_2
         --# expr-start 11440 '<BooleanBinaryOp And at nodes.lkt:19822:21>' If_Result_1 ada/nodes.lkt:19822
--# expr-start 11438 '<Not at nodes.lkt:19825:25>' Not_Val ada/nodes.lkt:19825
--# expr-start 11437 '<Eq at nodes.lkt:19825:25>' Is_Equal ada/nodes.lkt:19825
--# expr-start 11436 '<FieldAccess for node at nodes.lkt:19825:25>' Fld_5 ada/nodes.lkt:19825
Fld_5 := Item_2.Node;
--# expr-done 11436
      Cast_Result_1 := Fld_5;
Is_Equal := Cast_Result_1 = Local_Bd; 
--# expr-done 11437
Not_Val := not (Is_Equal); 
--# expr-done 11438
if Not_Val then
   --# expr-start 11439 '<FieldAccess for has_visibility at nodes.lkt:19827:25>' Fld_6 ada/nodes.lkt:19827
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_6 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_2);
--# end
--# expr-done 11439
   If_Result_1 := Fld_6;
else
   If_Result_1 := False;
end if;
--# expr-done 11440
         if If_Result_1 then
         declare
            Item_To_Append : constant Internal_Entity := Item_2;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11441
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3391;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var);
      declare
         Map_Result_1_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Result_Var;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_3
      --# expr-start 11443 '<FieldAccess for defining_env at nodes.lkt:19830:25>' Fld_7 ada/nodes.lkt:19830
--# expr-start 11442 '<Cast to BasicDecl at nodes.lkt:19830:25>' Cast_Result_2 ada/nodes.lkt:19830
Cast_Expr := Item_3; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_2 := No_Entity_Basic_Decl;
   end if;
--# expr-done 11442
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Cast_Result_2.Node, Origin => Origin, Include_Ud_Indexing => False, Dottable_Type => No_Bare_Ada_Node, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 11443
         declare
            Item_To_Append : constant Lexical_Env := Fld_7;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3393;
         end loop;
      end;
         Map_Result_1 := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_1_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 11444
Group_Env := Group (Map_Result_1, No_Metadata); 
--# expr-done 11445
   If_Result_3 := Group_Env;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 11446
Let_Result := If_Result_3; Inc_Ref (Let_Result);
--# end
--# expr-done 11447
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11448
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_265;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_265;
                     Finalizer_Scope_3391;
                     Finalizer_Scope_3393;
            raise;
      end;
   return Property_Result;
end Base_Id_P_Designated_Env;
--# end
--# property-start BaseId.pkg_env ada/nodes.lkt:19843
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Pkg_Env
  (Node : Bare_Base_Id
      ; From_Pkg : Internal_Entity_Basic_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
     Ent : Internal_Entity_Base_Id :=
       Internal_Entity_Base_Id'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind from_pkg From_Pkg
   --# bind env Env
   --# bind origin Origin
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_266 with Inline_Always;
            procedure Finalizer_Scope_3396 with Inline_Always;
            procedure Finalizer_Scope_3397 with Inline_Always;
            procedure Finalizer_Scope_3398 with Inline_Always;
            procedure Finalizer_Scope_3399 with Inline_Always;
            procedure Finalizer_Scope_3400 with Inline_Always;
            procedure Finalizer_Scope_3402 with Inline_Always;
      Local_Pkg : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Package_Renaming_Decl;
Local_Bd : Internal_Entity_Basic_Decl;
Local_Is_Inst_From_Formal : Boolean;
Local_Env : Lexical_Env := Empty_Env;
Local_Private_Part_Env : Lexical_Env := Empty_Env;
Var_Expr_1 : Internal_Entity;
Local_Package_Body_Env : Lexical_Env := Empty_Env;
Var_Expr_2 : Internal_Entity;
Var_Expr_3 : Internal_Entity;
Local_Formals_Env : Lexical_Env := Empty_Env;
Var_Expr_4 : Internal_Entity_Generic_Package_Decl;
Var_Expr_269 : Bare_Ada_Node;
Var_Expr : Bare_Ada_Node;
Var_Expr_270 : Bare_Ada_Node;
Var_Expr_5 : Bare_Ada_Node;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity_Package_Renaming_Decl;
Fld : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Result_Var : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Info;
Fld_2 : Env_Rebindings;
Fld_3 : Internal_Entity_Basic_Decl;
Is_A : Boolean;
Fld_4 : Internal_Entity_Info;
Fld_5 : Boolean;
Fld_6 : Internal_Entity_Info;
Fld_7 : Boolean;
If_Result : Boolean;
If_Result_1 : Boolean;
Cast_Expr_1 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity_Generic_Package_Instantiation;
Fld_8 : Lexical_Env := Empty_Env;
Fld_9 : Lexical_Env := Empty_Env;
Is_A_1 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Lexical_Env := Empty_Env;
Sym : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Get_Result : Internal_Entity;
Fld_10 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
Sym_1 : Symbol_Type;
Env_Get_Result_1 : Internal_Entity_Array_Access;
Get_Result_1 : Internal_Entity;
Fld_11 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result_2 : Internal_Entity_Array_Access;
Get_Result_2 : Internal_Entity;
Fld_12 : Lexical_Env := Empty_Env;
Scope_Result_2 : Lexical_Env := Empty_Env;
Result_Var_2 : Lexical_Env := Empty_Env;
Fld_13 : Lexical_Env := Empty_Env;
Is_A_2 : Boolean;
If_Result_4 : Lexical_Env := Empty_Env;
Scope_Result_3 : Lexical_Env := Empty_Env;
Result_Var_3 : Lexical_Env := Empty_Env;
Cast_Expr_2 : Internal_Entity_Basic_Decl;
Cast_Result_2 : Internal_Entity_Generic_Package_Decl;
Fld_14 : Internal_Entity_Generic_Formal_Part;
Fld_15 : Lexical_Env := Empty_Env;
Scope_Result_4 : Lexical_Env := Empty_Env;
Result_Var_4 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Array_Lit_1 : Lexical_Env_Array_Access;
Group_Env_1 : Lexical_Env := Empty_Env;
Array_Lit_2 : Lexical_Env_Array_Access;
Group_Env_2 : Lexical_Env := Empty_Env;
Is_A_3 : Boolean;
If_Result_5 : Lexical_Env := Empty_Env;
Env_Node : Bare_Ada_Node;
Fld_16 : Lexical_Env := Empty_Env;
Scope_Result_5 : Lexical_Env := Empty_Env;
Result_Var_5 : Lexical_Env := Empty_Env;
Scope_Result_6 : Bare_Ada_Node;
Cast_Expr_3 : Bare_Base_Id;
Cast_Result_3 : Bare_Ada_Node;
Result_Var_6 : Bare_Ada_Node;
Fld_17 : Lexical_Env := Empty_Env;
Fld_18 : Boolean;
If_Result_6 : Lexical_Env := Empty_Env;
Is_Equal : Boolean;
Not_Val : Boolean;
Env_Node_1 : Bare_Ada_Node;
Fld_19 : Lexical_Env := Empty_Env;
Scope_Result_7 : Lexical_Env := Empty_Env;
Result_Var_7 : Lexical_Env := Empty_Env;
Scope_Result_8 : Bare_Ada_Node;
Cast_Expr_4 : Bare_Base_Id;
Cast_Result_4 : Bare_Ada_Node;
Result_Var_8 : Bare_Ada_Node;
Fld_20 : Lexical_Env := Empty_Env;
Fld_21 : Boolean;
If_Result_7 : Boolean;
If_Result_8 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
Let_Result_1 : Lexical_Env := Empty_Env;
Let_Result_2 : Lexical_Env := Empty_Env;
Let_Result_3 : Lexical_Env := Empty_Env;
Let_Result_4 : Lexical_Env := Empty_Env;
Let_Result_5 : Lexical_Env := Empty_Env;
Let_Result_6 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_266 is
            begin
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (Local_Env);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Local_Private_Part_Env);
                     Dec_Ref (Env_Get_Result_1);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Local_Package_Body_Env);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Result_Var_4);
                     Dec_Ref (Local_Formals_Env);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Group_Env_1);
                     Dec_Ref (Array_Lit_2);
                     Dec_Ref (Group_Env_2);
                     Dec_Ref (If_Result_5);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_5);
                     Dec_Ref (Fld_17);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Result_Var_7);
                     Dec_Ref (Fld_20);
                     Dec_Ref (If_Result_8);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
            end Finalizer_Scope_266;
            procedure Finalizer_Scope_3396 is
            begin
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_3396;
            procedure Finalizer_Scope_3397 is
            begin
                     Dec_Ref (Fld_11);
                     Dec_Ref (Env_Get_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Fld_13);
                     Dec_Ref (If_Result_4);
            end Finalizer_Scope_3397;
            procedure Finalizer_Scope_3398 is
            begin
                     Dec_Ref (Fld_12);
            end Finalizer_Scope_3398;
            procedure Finalizer_Scope_3399 is
            begin
                     Dec_Ref (Fld_15);
            end Finalizer_Scope_3399;
            procedure Finalizer_Scope_3400 is
            begin
                     Dec_Ref (Fld_16);
            end Finalizer_Scope_3400;
            procedure Finalizer_Scope_3402 is
            begin
                     Dec_Ref (Fld_19);
            end Finalizer_Scope_3402;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11512 '<Let at nodes.lkt:19847:9>' Let_Result_6 ada/nodes.lkt:19847
--# scope-start
--# expr-start 11449 '<Cast to PackageRenamingDecl at nodes.lkt:19848:13>' Cast_Result ada/nodes.lkt:19848
Cast_Expr := From_Pkg; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Package_Renaming_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Package_Renaming_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Package_Renaming_Decl;
   end if;
--# expr-done 11449
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Package_Renaming_Decl then
   --# scope-start
   --# bind r Var_Expr_0
--# expr-start 11450 '<FieldAccess for final_renamed_package at nodes.lkt:19849:24>' Fld ada/nodes.lkt:19849
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start PackageRenamingDecl.final_renamed_package
Fld := Libadalang.Implementation.Package_Renaming_Decl_P_Final_Renamed_Package (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 11450
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := From_Pkg;
end if;
Local_Pkg := Result_Var; 
--# bind pkg Local_Pkg
--# expr-start 11511 '<Let at nodes.lkt:19858:9>' Let_Result_5 ada/nodes.lkt:19858
--# scope-start
--# expr-start 11453 '<FieldAccess for unshed_rebindings at nodes.lkt:19858:18>' Fld_3 ada/nodes.lkt:19858
      if Local_Pkg.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11452 '<FieldAccess for rebindings at nodes.lkt:19858:40>' Fld_2 ada/nodes.lkt:19858
--# expr-start 11451 '<FieldAccess for info at nodes.lkt:19858:40>' Fld_1 ada/nodes.lkt:19858
Fld_1 := Ent.Info;
--# expr-done 11451
Fld_2 := Fld_1.Rebindings;
--# expr-done 11452
--# property-call-start BasicDecl.unshed_rebindings
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Unshed_Rebindings (Node => Local_Pkg.Node, Rebindings => Fld_2, E_Info => Local_Pkg.Info);
--# end
--# expr-done 11453
Local_Bd := Fld_3; 
--# bind bd Local_Bd
--# expr-start 11510 '<Let at nodes.lkt:19865:9>' Let_Result_4 ada/nodes.lkt:19865
--# scope-start
--# expr-start 11460 '<BooleanBinaryOp And at nodes.lkt:19866:13>' If_Result_1 ada/nodes.lkt:19866
--# expr-start 11454 '<IsA GenericPackageInstantiation at nodes.lkt:19866:13>' Is_A ada/nodes.lkt:19866
Is_A := Local_Pkg.Node /= null 
and then Local_Pkg.Node.Kind in Ada_Generic_Package_Instantiation_Range; 
--# expr-done 11454
if Is_A then
   --# expr-start 11459 '<BooleanBinaryOp Or at nodes.lkt:19867:18>' If_Result ada/nodes.lkt:19867
--# expr-start 11456 '<FieldAccess for from_rebound at nodes.lkt:19867:18>' Fld_5 ada/nodes.lkt:19867
--# expr-start 11455 '<FieldAccess for info at nodes.lkt:19867:18>' Fld_4 ada/nodes.lkt:19867
Fld_4 := From_Pkg.Info;
--# expr-done 11455
Fld_5 := Fld_4.From_Rebound;
--# expr-done 11456
if Fld_5 then
   If_Result := True;
else
   --# expr-start 11458 '<FieldAccess for from_rebound at nodes.lkt:19867:48>' Fld_7 ada/nodes.lkt:19867
--# expr-start 11457 '<FieldAccess for info at nodes.lkt:19867:48>' Fld_6 ada/nodes.lkt:19867
Fld_6 := Local_Pkg.Info;
--# expr-done 11457
Fld_7 := Fld_6.From_Rebound;
--# expr-done 11458
   If_Result := Fld_7;
end if;
--# expr-done 11459
   If_Result_1 := If_Result;
else
   If_Result_1 := False;
end if;
--# expr-done 11460
Local_Is_Inst_From_Formal := If_Result_1; 
--# bind is_inst_from_formal Local_Is_Inst_From_Formal
--# expr-start 11509 '<Let at nodes.lkt:19868:9>' Let_Result_3 ada/nodes.lkt:19868
--# scope-start
--# expr-start 11466 '<If at nodes.lkt:19869:13>' If_Result_3 ada/nodes.lkt:19869
--# expr-start 11462 '<BooleanBinaryOp And at nodes.lkt:19869:16>' If_Result_2 ada/nodes.lkt:19869
--# expr-start 11461 '<IsA GenericPackageInstantiation at nodes.lkt:19869:16>' Is_A_1 ada/nodes.lkt:19869
Is_A_1 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Generic_Package_Instantiation_Range; 
--# expr-done 11461
if Is_A_1 then
   If_Result_2 := Local_Is_Inst_From_Formal;
else
   If_Result_2 := False;
end if;
--# expr-done 11462
if If_Result_2 then
   --# expr-start 11464 '<FieldAccess for defining_env_impl at nodes.lkt:19870:18>' Fld_8 ada/nodes.lkt:19870
--# expr-start 11463 '<Cast to GenericPackageInstantiation at nodes.lkt:19870:18>' Cast_Result_1 ada/nodes.lkt:19870
Cast_Expr_1 := Local_Bd; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Generic_Package_Instantiation_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Generic_Package_Instantiation
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Generic_Package_Instantiation;
   end if;
--# expr-done 11463
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericPackageInstantiation.defining_env_impl
Fld_8 := Libadalang.Implementation.Generic_Package_Instantiation_P_Defining_Env_Impl (Node => Cast_Result_1.Node, Inst_From_Formal => True, Origin => Origin, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 11464
   If_Result_3 := Fld_8;
else
   --# expr-start 11465 '<FieldAccess for defining_env at nodes.lkt:19871:18>' Fld_9 ada/nodes.lkt:19871
      if Local_Bd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Local_Bd.Node, Origin => Origin, Include_Ud_Indexing => False, Dottable_Type => No_Bare_Ada_Node, E_Info => Local_Bd.Info);
--# end
--# expr-done 11465
   If_Result_3 := Fld_9;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 11466
Local_Env := If_Result_3; Inc_Ref (Local_Env);
--# bind env Local_Env
--# expr-start 11508 '<Let at nodes.lkt:19874:9>' Let_Result_2 ada/nodes.lkt:19874
--# scope-start
--# expr-start 11469 '<at at nodes.lkt:19875:13>' Get_Result ada/nodes.lkt:19875
--# expr-start 11468 '<EnvGet at nodes.lkt:19875:13>' Env_Get_Result ada/nodes.lkt:19875
--# expr-start 11467 '<Symbol __privatepart at nodes.lkt:19876:17>' Sym ada/nodes.lkt:19876
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Privatepart); 
--# expr-done 11467
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Local_Env, Key => Thin (Sym), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 11468
Get_Result := Get (Self, Env_Get_Result, 0, True); 
--# expr-done 11469
Var_Expr_1 := Get_Result;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind pp Var_Expr_1
--# expr-start 11470 '<FieldAccess for children_env at nodes.lkt:19882:25>' Fld_10 ada/nodes.lkt:19882
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Children_Env (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# expr-done 11470
Scope_Result_1 := Fld_10;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3396;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Local_Env;
end if;
      Inc_Ref (Result_Var_1);
Local_Private_Part_Env := Result_Var_1; Inc_Ref (Local_Private_Part_Env);
--# bind private_part_env Local_Private_Part_Env
--# expr-start 11507 '<Let at nodes.lkt:19883:9>' Let_Result_1 ada/nodes.lkt:19883
--# scope-start
--# expr-start 11473 '<at at nodes.lkt:19884:13>' Get_Result_1 ada/nodes.lkt:19884
--# expr-start 11472 '<EnvGet at nodes.lkt:19884:13>' Env_Get_Result_1 ada/nodes.lkt:19884
--# expr-start 11471 '<Symbol __nextpart at nodes.lkt:19885:17>' Sym_1 ada/nodes.lkt:19885
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Nextpart); 
--# expr-done 11471
Env_Get_Result_1 := Construct_Entity_Array (AST_Envs.Get (Self => Local_Private_Part_Env, Key => Thin (Sym_1), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 11472
Get_Result_1 := Get (Self, Env_Get_Result_1, 0, True); 
--# expr-done 11473
Var_Expr_2 := Get_Result_1;
if Var_Expr_2 /= No_Entity then
   --# scope-start
   --# bind pb Var_Expr_2
--# expr-start 11481 '<If at nodes.lkt:19895:17>' If_Result_4 ada/nodes.lkt:19895
--# expr-start 11474 '<IsA PackageBodyStub at nodes.lkt:19895:20>' Is_A_2 ada/nodes.lkt:19895
Is_A_2 := Var_Expr_2.Node /= null 
and then Var_Expr_2.Node.Kind in Ada_Package_Body_Stub_Range; 
--# expr-done 11474
if Is_A_2 then
--# expr-start 11478 '<at at nodes.lkt:19897:21>' Get_Result_2 ada/nodes.lkt:19897
--# expr-start 11477 '<EnvGet at nodes.lkt:19897:21>' Env_Get_Result_2 ada/nodes.lkt:19897
--# expr-start 11475 '<FieldAccess for children_env at nodes.lkt:19897:21>' Fld_11 ada/nodes.lkt:19897
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Libadalang.Implementation.Children_Env (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# expr-done 11475
--# expr-start 11476 '<Symbol __nextpart at nodes.lkt:19898:25>' Sym_2 ada/nodes.lkt:19898
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Nextpart); 
--# expr-done 11476
Env_Get_Result_2 := Construct_Entity_Array (AST_Envs.Get (Self => Fld_11, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 11477
Get_Result_2 := Get (Self, Env_Get_Result_2, 0, True); 
--# expr-done 11478
Var_Expr_3 := Get_Result_2;
if Var_Expr_3 /= No_Entity then
   --# scope-start
   --# bind pb Var_Expr_3
--# expr-start 11479 '<FieldAccess for children_env at nodes.lkt:19907:33>' Fld_12 ada/nodes.lkt:19907
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Children_Env (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# expr-done 11479
Scope_Result_2 := Fld_12;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3398;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Empty_Env;
end if;
      Inc_Ref (Result_Var_2);
   If_Result_4 := Result_Var_2;
else
   --# expr-start 11480 '<FieldAccess for children_env at nodes.lkt:19908:22>' Fld_13 ada/nodes.lkt:19908
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Children_Env (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# expr-done 11480
   If_Result_4 := Fld_13;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 11481
Scope_Result_3 := If_Result_4;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3397;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := Empty_Env;
end if;
      Inc_Ref (Result_Var_3);
Local_Package_Body_Env := Result_Var_3; Inc_Ref (Local_Package_Body_Env);
--# bind package_body_env Local_Package_Body_Env
--# expr-start 11506 '<Let at nodes.lkt:19911:9>' Let_Result ada/nodes.lkt:19911
--# scope-start
--# expr-start 11482 '<Cast to GenericPackageDecl at nodes.lkt:19912:13>' Cast_Result_2 ada/nodes.lkt:19912
Cast_Expr_2 := Local_Bd; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Generic_Package_Decl_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Generic_Package_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_2 := No_Entity_Generic_Package_Decl;
   end if;
--# expr-done 11482
Var_Expr_4 := Cast_Result_2;
if Var_Expr_4 /= No_Entity_Generic_Package_Decl then
   --# scope-start
   --# bind pkg_g Var_Expr_4
--# expr-start 11484 '<FieldAccess for children_env at nodes.lkt:19913:28>' Fld_15 ada/nodes.lkt:19913
--# expr-start 11483 '<FieldAccess for formal_part at nodes.lkt:19913:28>' Fld_14 ada/nodes.lkt:19913
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Generic_Formal_Part (Node => Var_Expr_4.Node.Generic_Decl_F_Formal_Part, Info => Var_Expr_4.Info);
--# expr-done 11483
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Libadalang.Implementation.Children_Env (Node => Fld_14.Node, E_Info => Fld_14.Info);
--# expr-done 11484
Scope_Result_4 := Fld_15;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_3399;
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := Empty_Env;
end if;
      Inc_Ref (Result_Var_4);
Local_Formals_Env := Result_Var_4; Inc_Ref (Local_Formals_Env);
--# bind formals_env Local_Formals_Env
--# expr-start 11505 '<If at nodes.lkt:19919:9>' If_Result_8 ada/nodes.lkt:19919
--# expr-start 11491 '<BooleanBinaryOp And at nodes.lkt:19920:13>' If_Result_7 ada/nodes.lkt:19920
--# expr-start 11486 '<Not at nodes.lkt:19920:13>' Not_Val ada/nodes.lkt:19920
--# expr-start 11485 '<Eq at nodes.lkt:19920:13>' Is_Equal ada/nodes.lkt:19920
Is_Equal := Equivalent (Local_Package_Body_Env, Empty_Env); 
--# expr-done 11485
Not_Val := not (Is_Equal); 
--# expr-done 11486
if Not_Val then
   --# expr-start 11490 '<FieldAccess for is_children_env at nodes.lkt:19929:17>' Fld_21 ada/nodes.lkt:19929
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11487 '<env_node at nodes.lkt:19930:21>' Env_Node_1 ada/nodes.lkt:19930
Env_Node_1 := AST_Envs.Env_Node (Local_Package_Body_Env); 
--# expr-done 11487
Var_Expr_269 := Env_Node_1;
if Var_Expr_269 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 11488 '<FieldAccess for children_env at nodes.lkt:19930:21>' Fld_19 ada/nodes.lkt:19930
      if Var_Expr_269 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Libadalang.Implementation.Children_Env (Node => Var_Expr_269);
--# expr-done 11488
Scope_Result_7 := Fld_19;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3402;
   Result_Var_7 := Scope_Result_7;
else
   Result_Var_7 := Empty_Env;
end if;
      Inc_Ref (Result_Var_7);
--# expr-start 11489 '<FieldAccess for node_env at nodes.lkt:19931:21>' Fld_20 ada/nodes.lkt:19931
Var_Expr := Origin;
if Var_Expr /= No_Bare_Ada_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_8 := Var_Expr;
   --# end
   Result_Var_8 := Scope_Result_8;
else
Cast_Expr_4 := Self; 
      Cast_Result_4 := Cast_Expr_4;
   Result_Var_8 := Cast_Result_4;
end if;
      if Result_Var_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Libadalang.Implementation.Node_Env (Node => Result_Var_8);
--# expr-done 11489
--# property-call-start AdaNode.is_children_env
Fld_21 := Libadalang.Implementation.Ada_Node_P_Is_Children_Env (Node => Self, Parent => Result_Var_7, Current_Env => Fld_20);
--# end
--# expr-done 11490
   If_Result_7 := Fld_21;
else
   If_Result_7 := False;
end if;
--# expr-done 11491
if If_Result_7 then
   --# expr-start 11493 '<env_group at nodes.lkt:19934:14>' Group_Env ada/nodes.lkt:19934
--# expr-start 11492 '<ArrayLiteral at nodes.lkt:19934:14>' Array_Lit ada/nodes.lkt:19934
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Local_Package_Body_Env, 2 => Local_Private_Part_Env, 3 => Local_Env, 4 => Local_Formals_Env)); 
--# expr-done 11492
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 11493
   If_Result_8 := Group_Env;
else
   --# expr-start 11504 '<If at nodes.lkt:19919:9>' If_Result_6 ada/nodes.lkt:19919
--# expr-start 11497 '<FieldAccess for is_children_env at nodes.lkt:19941:13>' Fld_18 ada/nodes.lkt:19941
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11494 '<env_node at nodes.lkt:19942:17>' Env_Node ada/nodes.lkt:19942
Env_Node := AST_Envs.Env_Node (Local_Private_Part_Env); 
--# expr-done 11494
Var_Expr_270 := Env_Node;
if Var_Expr_270 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 11495 '<FieldAccess for children_env at nodes.lkt:19942:17>' Fld_16 ada/nodes.lkt:19942
      if Var_Expr_270 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Libadalang.Implementation.Children_Env (Node => Var_Expr_270);
--# expr-done 11495
Scope_Result_5 := Fld_16;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_3400;
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := Empty_Env;
end if;
      Inc_Ref (Result_Var_5);
--# expr-start 11496 '<FieldAccess for node_env at nodes.lkt:19943:17>' Fld_17 ada/nodes.lkt:19943
Var_Expr_5 := Origin;
if Var_Expr_5 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind e Var_Expr_5
Scope_Result_6 := Var_Expr_5;
   --# end
   Result_Var_6 := Scope_Result_6;
else
Cast_Expr_3 := Self; 
      Cast_Result_3 := Cast_Expr_3;
   Result_Var_6 := Cast_Result_3;
end if;
      if Result_Var_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Libadalang.Implementation.Node_Env (Node => Result_Var_6);
--# expr-done 11496
--# property-call-start AdaNode.is_children_env
Fld_18 := Libadalang.Implementation.Ada_Node_P_Is_Children_Env (Node => Self, Parent => Result_Var_5, Current_Env => Fld_17);
--# end
--# expr-done 11497
if Fld_18 then
   --# expr-start 11499 '<env_group at nodes.lkt:19944:20>' Group_Env_1 ada/nodes.lkt:19944
--# expr-start 11498 '<ArrayLiteral at nodes.lkt:19944:20>' Array_Lit_1 ada/nodes.lkt:19944
Array_Lit_1 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Local_Private_Part_Env, 2 => Local_Env, 3 => Local_Formals_Env)); 
--# expr-done 11498
Group_Env_1 := Group (Array_Lit_1, No_Metadata); 
--# expr-done 11499
   If_Result_6 := Group_Env_1;
else
   --# expr-start 11503 '<If at nodes.lkt:19919:9>' If_Result_5 ada/nodes.lkt:19919
--# expr-start 11500 '<IsA GenericPackageDecl at nodes.lkt:19950:14>' Is_A_3 ada/nodes.lkt:19950
Is_A_3 := Local_Bd.Node /= null 
and then Local_Bd.Node.Kind in Ada_Generic_Package_Decl_Range; 
--# expr-done 11500
if Is_A_3 then
   --# expr-start 11502 '<env_group at nodes.lkt:19950:44>' Group_Env_2 ada/nodes.lkt:19950
--# expr-start 11501 '<ArrayLiteral at nodes.lkt:19950:44>' Array_Lit_2 ada/nodes.lkt:19950
Array_Lit_2 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Local_Env, 2 => Local_Formals_Env)); 
--# expr-done 11501
Group_Env_2 := Group (Array_Lit_2, No_Metadata); 
--# expr-done 11502
   If_Result_5 := Group_Env_2;
else
   If_Result_5 := Local_Env;
end if;
      Inc_Ref (If_Result_5);
--# expr-done 11503
   If_Result_6 := If_Result_5;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 11504
   If_Result_8 := If_Result_6;
end if;
      Inc_Ref (If_Result_8);
--# expr-done 11505
Let_Result := If_Result_8; Inc_Ref (Let_Result);
--# end
--# expr-done 11506
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11507
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 11508
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 11509
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 11510
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 11511
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 11512
         Property_Result := Let_Result_6;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_266;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_266;
                     Finalizer_Scope_3396;
                     Finalizer_Scope_3397;
                     Finalizer_Scope_3398;
                     Finalizer_Scope_3399;
                     Finalizer_Scope_3400;
                     Finalizer_Scope_3402;
            raise;
      end;
   return Property_Result;
end Base_Id_P_Pkg_Env;
--# end
--# property-start BaseId.parent_scope ada/nodes.lkt:19958
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Parent_Scope
  (Node : Bare_Base_Id
      ; Env : Lexical_Env
  )
   return Lexical_Env
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
      --# bind self Self
   --# bind env Env
   Property_Result : Lexical_Env;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := Env;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Id_P_Parent_Scope;
--# end
--# property-start BaseId.designated_type_impl ada/nodes.lkt:19961
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Designated_Type_Impl
  (Node : Bare_Base_Id
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
     Ent : Internal_Entity_Base_Id :=
       Internal_Entity_Base_Id'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_3414 with Inline_Always;
      Var_Expr_0 : Internal_Entity;
Var_Expr_1 : Internal_Entity_Base_Type_Decl;
Var_Expr_2 : Internal_Entity;
Match_0 : Internal_Entity_Base_Type_Decl;
Match_1 : Internal_Entity_Task_Body;
Match_2 : Internal_Entity_Protected_Body;
Match_3 : Internal_Entity_Task_Body_Stub;
Match_4 : Internal_Entity_Protected_Body_Stub;
Match_5 : Internal_Entity;
Var_Expr_3 : Internal_Entity_Base_Type_Decl;
Var_Expr_4 : Internal_Entity_Generic_Formal_Type_Decl;
Var_Expr : Internal_Entity_Base_Type_Decl;
Var_Expr_5 : Internal_Entity_Base_Type_Decl;
Fld : Boolean;
If_Result : Lookup_Kind;
Fld_1 : Bare_Ada_Node;
Fld_2 : Internal_Entity;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_3 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_4 : Symbol_Type;
Fld_5 : Internal_Entity_Basic_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Basic_Decl;
Fld_6 : Symbol_Type;
Fld_7 : Internal_Entity_Basic_Decl;
Fld_8 : Internal_Entity_Basic_Decl;
Fld_9 : Internal_Entity_Info;
Fld_10 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result_2 : Internal_Entity_Basic_Decl;
Scope_Result : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Result_Var : Internal_Entity;
Fld_11 : Internal_Entity_Task_Type_Decl;
Fld_12 : Internal_Entity_Protected_Type_Decl;
Fld_13 : Internal_Entity_Body_Node;
Cast_Result_2 : Internal_Entity_Task_Body;
Fld_14 : Internal_Entity_Task_Type_Decl;
Fld_15 : Internal_Entity_Body_Node;
Cast_Result_3 : Internal_Entity_Protected_Body;
Fld_16 : Internal_Entity_Protected_Type_Decl;
Match_Prefix : Internal_Entity;
Cast_Result_4 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity_Task_Body;
Cast_Result_6 : Internal_Entity_Base_Type_Decl;
Let_Result_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_7 : Internal_Entity_Protected_Body;
Cast_Result_8 : Internal_Entity_Base_Type_Decl;
Let_Result_2 : Internal_Entity_Base_Type_Decl;
Scope_Result_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_9 : Internal_Entity_Task_Body_Stub;
Cast_Result_10 : Internal_Entity_Base_Type_Decl;
Let_Result_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_11 : Internal_Entity_Protected_Body_Stub;
Cast_Result_12 : Internal_Entity_Base_Type_Decl;
Let_Result_4 : Internal_Entity_Base_Type_Decl;
Scope_Result_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_13 : Internal_Entity;
Let_Result_5 : Internal_Entity_Base_Type_Decl;
Scope_Result_6 : Internal_Entity_Base_Type_Decl;
Match_Result : Internal_Entity_Base_Type_Decl;
Scope_Result_7 : Internal_Entity_Base_Type_Decl;
Result_Var_1 : Internal_Entity_Base_Type_Decl;
Scope_Result_8 : Internal_Entity_Base_Type_Decl;
Result_Var_2 : Internal_Entity_Base_Type_Decl;
Fld_17 : Internal_Entity;
Cast_Result_14 : Internal_Entity_Generic_Formal_Type_Decl;
Fld_18 : Internal_Entity_Base_Type_Decl;
Scope_Result_9 : Internal_Entity_Base_Type_Decl;
Result_Var_3 : Internal_Entity_Base_Type_Decl;
Fld_19 : Internal_Entity_Generic_Instantiation_Array_Access;
Fld_20 : Internal_Entity_Generic_Decl;
Fld_21 : Bare_Generic_Decl;
Fld_22 : Internal_Entity_Basic_Decl;
Fld_23 : Bare_Basic_Decl;
Cast_Result_15 : Bare_Basic_Decl;
Is_Equal : Boolean;
Quantifier_Result : Boolean;
If_Result_3 : Internal_Entity_Base_Type_Decl;
Scope_Result_10 : Internal_Entity_Base_Type_Decl;
Result_Var_4 : Internal_Entity_Base_Type_Decl;
Scope_Result_11 : Internal_Entity_Base_Type_Decl;
Result_Var_5 : Internal_Entity_Base_Type_Decl;
Scope_Result_12 : Internal_Entity_Base_Type_Decl;
Result_Var_6 : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_3414 is
            begin
                     Dec_Ref (Fld_19);
            end Finalizer_Scope_3414;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 11516 '<FieldAccess for env_get_first_visible at nodes.lkt:19962:9>' Fld_2 ada/nodes.lkt:19962
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11514 '<If at nodes.lkt:19965:25>' If_Result ada/nodes.lkt:19965
--# expr-start 11513 '<FieldAccess for is_prefix at nodes.lkt:19965:28>' Fld ada/nodes.lkt:19965
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 11513
if Fld then
   If_Result := Recursive;
else
   If_Result := Minimal;
end if;
--# expr-done 11514
--# expr-start 11515 '<FieldAccess for origin_node at nodes.lkt:19964:23>' Fld_1 ada/nodes.lkt:19964
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11515
--# property-call-start SingleTokNode.env_get_first_visible
Fld_2 := Libadalang.Implementation.Single_Tok_Node_P_Env_Get_First_Visible (Node => Self, Lex_Env => Env, Lookup_Type => If_Result, From_Node => Fld_1, No_Visibility => False);
--# end
--# expr-done 11516
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity then
   --# scope-start
   --# bind env_el Var_Expr_0
--# expr-start 11517 '<Cast to BaseTypeDecl at nodes.lkt:19970:13>' Cast_Result ada/nodes.lkt:19970
Cast_Expr := Var_Expr_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 11517
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind t Var_Expr_1
--# expr-start 11529 '<If at nodes.lkt:19972:17>' If_Result_2 ada/nodes.lkt:19972
--# expr-start 11518 '<IsNull at nodes.lkt:19972:20>' Is_Null ada/nodes.lkt:19972
Is_Null := Origin = null; 
--# expr-done 11518
if Is_Null then
   --# expr-start 11522 '<bind at nodes.lkt:19977:21>' Dyn_Var_Bind_Result ada/nodes.lkt:19977
--# expr-start 11519 '<FieldAccess for origin_node at nodes.lkt:19977:35>' Fld_3 ada/nodes.lkt:19977
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_3 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11519
Bound_Origin := Fld_3; 
--# expr-start 11521 '<FieldAccess for most_visible_forward_part_for_name at nodes.lkt:19979:21>' Fld_5 ada/nodes.lkt:19979
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11520 '<FieldAccess for name_symbol at nodes.lkt:19980:25>' Fld_4 ada/nodes.lkt:19980
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Var_Expr_1.Node);
--# end
--# expr-done 11520
--# property-call-start BasicDecl.most_visible_forward_part_for_name
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Forward_Part_For_Name (Node => Var_Expr_1.Node, Sym => Fld_4, Seq => False, Origin => Bound_Origin, Imprecise_Fallback => False, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 11521
Dyn_Var_Bind_Result := Fld_5; 
--# expr-done 11522
   If_Result_2 := Dyn_Var_Bind_Result;
else
   --# expr-start 11528 '<If at nodes.lkt:19985:21>' If_Result_1 ada/nodes.lkt:19985
--# expr-start 11524 '<FieldAccess for from_rebound at nodes.lkt:19985:24>' Fld_10 ada/nodes.lkt:19985
--# expr-start 11523 '<FieldAccess for info at nodes.lkt:19985:24>' Fld_9 ada/nodes.lkt:19985
Fld_9 := Ent.Info;
--# expr-done 11523
Fld_10 := Fld_9.From_Rebound;
--# expr-done 11524
if Fld_10 then
   --# expr-start 11526 '<FieldAccess for most_visible_forward_part_for_name at nodes.lkt:19991:25>' Fld_7 ada/nodes.lkt:19991
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11525 '<FieldAccess for name_symbol at nodes.lkt:19993:29>' Fld_6 ada/nodes.lkt:19993
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_6 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Var_Expr_1.Node);
--# end
--# expr-done 11525
--# property-call-start BasicDecl.most_visible_forward_part_for_name
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Forward_Part_For_Name (Node => Var_Expr_1.Node, Sym => Fld_6, Seq => False, Origin => Origin, Imprecise_Fallback => False, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 11526
   If_Result_1 := Fld_7;
else
   --# expr-start 11527 '<FieldAccess for most_visible_part at nodes.lkt:20002:25>' Fld_8 ada/nodes.lkt:20002
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.most_visible_part
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Most_Visible_Part (Node => Var_Expr_1.Node, Origin => Origin, Imprecise_Fallback => False, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 11527
   If_Result_1 := Fld_8;
end if;
--# expr-done 11528
   If_Result_2 := If_Result_1;
end if;
--# expr-done 11529
Scope_Result := If_Result_2;
   --# end
      Cast_Result_1 := Create_Internal_Entity
        (Node => Scope_Result.Node,
         Info => Scope_Result.Info);
   Result_Var := Cast_Result_1;
else
   Result_Var := Var_Expr_0;
end if;
Var_Expr_2 := Result_Var;
if Var_Expr_2 /= No_Entity then
   --# scope-start
   --# bind v1 Var_Expr_2
--# expr-start 11538 '<Match at nodes.lkt:20008:17>' Match_Result ada/nodes.lkt:20008
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Var_Expr_2; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_4; 
--# bind t Match_0
Let_Result := Match_0; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Task_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_5; 
--# bind tb Match_1
--# expr-start 11530 '<FieldAccess for task_type at nodes.lkt:20010:42>' Fld_11 ada/nodes.lkt:20010
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TaskBody.task_type
Fld_11 := Libadalang.Implementation.Task_Body_P_Task_Type (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 11530
      Cast_Result_6 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_11.Node,
         Info => Fld_11.Info);
Let_Result_1 := Cast_Result_6; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Protected_Body =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity_Protected_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_7; 
--# bind pb Match_2
--# expr-start 11531 '<FieldAccess for protected_type at nodes.lkt:20011:47>' Fld_12 ada/nodes.lkt:20011
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ProtectedBody.protected_type
Fld_12 := Libadalang.Implementation.Protected_Body_P_Protected_Type (Node => Match_2.Node, E_Info => Match_2.Info);
--# end
--# expr-done 11531
      Cast_Result_8 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_12.Node,
         Info => Fld_12.Info);
Let_Result_2 := Cast_Result_8; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Task_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Create_Internal_Entity_Task_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_9; 
--# bind tbs Match_3
--# expr-start 11534 '<FieldAccess for task_type at nodes.lkt:20013:25>' Fld_14 ada/nodes.lkt:20013
--# expr-start 11533 '<Cast to TaskBody at nodes.lkt:20013:25>' Cast_Result_2 ada/nodes.lkt:20013
--# expr-start 11532 '<FieldAccess for body_part_for_decl at nodes.lkt:20013:25>' Fld_13 ada/nodes.lkt:20013
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.body_part_for_decl
Fld_13 := Libadalang.Implementation.Basic_Decl_P_Body_Part_For_Decl (Node => Match_3.Node, Imprecise_Fallback => False, E_Info => Match_3.Info);
--# end
--# expr-done 11532
   if Fld_13.Node = null
      or else Fld_13.Node.Kind in Ada_Task_Body_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Task_Body
        (Node => Fld_13.Node,
         Info => Fld_13.Info);
   else
         Cast_Result_2 := No_Entity_Task_Body;
   end if;
--# expr-done 11533
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TaskBody.task_type
Fld_14 := Libadalang.Implementation.Task_Body_P_Task_Type (Node => Cast_Result_2.Node, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 11534
      Cast_Result_10 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_14.Node,
         Info => Fld_14.Info);
Let_Result_3 := Cast_Result_10; 
--# end
Scope_Result_4 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Protected_Body_Stub =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Create_Internal_Entity_Protected_Body_Stub
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_11; 
--# bind pbs Match_4
--# expr-start 11537 '<FieldAccess for protected_type at nodes.lkt:20015:25>' Fld_16 ada/nodes.lkt:20015
--# expr-start 11536 '<Cast to ProtectedBody at nodes.lkt:20015:25>' Cast_Result_3 ada/nodes.lkt:20015
--# expr-start 11535 '<FieldAccess for body_part_for_decl at nodes.lkt:20015:25>' Fld_15 ada/nodes.lkt:20015
      if Match_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.body_part_for_decl
Fld_15 := Libadalang.Implementation.Basic_Decl_P_Body_Part_For_Decl (Node => Match_4.Node, Imprecise_Fallback => False, E_Info => Match_4.Info);
--# end
--# expr-done 11535
   if Fld_15.Node = null
      or else Fld_15.Node.Kind in Ada_Protected_Body_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Protected_Body
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
   else
         Cast_Result_3 := No_Entity_Protected_Body;
   end if;
--# expr-done 11536
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ProtectedBody.protected_type
Fld_16 := Libadalang.Implementation.Protected_Body_P_Protected_Type (Node => Cast_Result_3.Node, E_Info => Cast_Result_3.Info);
--# end
--# expr-done 11537
      Cast_Result_12 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
Let_Result_4 := Cast_Result_12; 
--# end
Scope_Result_5 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Abort_Absent .. Ada_Package_Decl | Ada_Abstract_Subp_Decl .. Ada_Package_Body_Stub | Ada_Subp_Body_Stub | Ada_Entry_Body .. Ada_Package_Body | Ada_Entry_Index_Spec .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_13 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_5 := Cast_Result_13; 
--# bind _ Match_5
Let_Result_5 := No_Entity_Base_Type_Decl; 
--# end
Scope_Result_6 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_6; 
end case;
--# expr-done 11538
Scope_Result_7 := Match_Result;
   --# end
   Result_Var_1 := Scope_Result_7;
else
   Result_Var_1 := No_Entity_Base_Type_Decl;
end if;
Scope_Result_8 := Result_Var_1;
   --# end
   Result_Var_2 := Scope_Result_8;
else
   Result_Var_2 := No_Entity_Base_Type_Decl;
end if;
Var_Expr_3 := Result_Var_2;
if Var_Expr_3 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind type Var_Expr_3
--# expr-start 11540 '<Cast to GenericFormalTypeDecl at nodes.lkt:20031:13>' Cast_Result_14 ada/nodes.lkt:20031
--# expr-start 11539 '<parent at nodes.lkt:20031:13>' Fld_17 ada/nodes.lkt:20031
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Libadalang.Implementation.Parent (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# expr-done 11539
   if Fld_17.Node = null
      or else Fld_17.Node.Kind in Ada_Generic_Formal_Type_Decl_Range
   then
      Cast_Result_14 := Create_Internal_Entity_Generic_Formal_Type_Decl
        (Node => Fld_17.Node,
         Info => Fld_17.Info);
   else
         Cast_Result_14 := No_Entity_Generic_Formal_Type_Decl;
   end if;
--# expr-done 11540
Var_Expr_4 := Cast_Result_14;
if Var_Expr_4 /= No_Entity_Generic_Formal_Type_Decl then
   --# scope-start
   --# bind formal_decl Var_Expr_4
--# expr-start 11549 '<If at nodes.lkt:20033:17>' If_Result_3 ada/nodes.lkt:20033
--# expr-start 11547 '<AnyQuantifier at nodes.lkt:20034:21>' Quantifier_Result ada/nodes.lkt:20034
   --# expr-start 11541 '<FieldAccess for generic_instantiations at nodes.lkt:20034:21>' Fld_19 ada/nodes.lkt:20034
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.generic_instantiations
Fld_19 := Libadalang.Implementation.Ada_Node_P_Generic_Instantiations (Node => Var_Expr_4.Node, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 11541
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Generic_Instantiation_Array_Access := Fld_19;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind inst Item_5
      --# expr-start 11546 '<Eq at nodes.lkt:20036:25>' Is_Equal ada/nodes.lkt:20036
--# expr-start 11543 '<FieldAccess for node at nodes.lkt:20036:25>' Fld_21 ada/nodes.lkt:20036
--# expr-start 11542 '<FieldAccess for designated_generic_decl at nodes.lkt:20036:25>' Fld_20 ada/nodes.lkt:20036
      if Item_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]GenericInstantiation.designated_generic_decl'
Fld_20 := Libadalang.Implementation.Dispatcher_Generic_Instantiation_P_Designated_Generic_Decl (Node => Item_5.Node, E_Info => Item_5.Info);
--# end
--# expr-done 11542
Fld_21 := Fld_20.Node;
--# expr-done 11543
      Cast_Result_15 := Fld_21;
--# expr-start 11545 '<FieldAccess for node at nodes.lkt:20037:28>' Fld_23 ada/nodes.lkt:20037
--# expr-start 11544 '<FieldAccess for parent_decl at nodes.lkt:20037:28>' Fld_22 ada/nodes.lkt:20037
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamDecl.parent_decl
Fld_22 := Libadalang.Implementation.Base_Formal_Param_Decl_P_Parent_Decl (Node => Var_Expr_4.Node, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 11544
Fld_23 := Fld_22.Node;
--# expr-done 11545
Is_Equal := Cast_Result_15 = Fld_23; 
--# expr-done 11546
      Quantifier_Result := Is_Equal;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 11547
if Quantifier_Result then
--# expr-start 11548 '<FieldAccess for default_type at nodes.lkt:20039:22>' Fld_18 ada/nodes.lkt:20039
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start GenericFormalTypeDecl.default_type
Fld_18 := Libadalang.Implementation.Generic_Formal_Type_Decl_P_Default_Type (Node => Var_Expr_4.Node, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 11548
Var_Expr_5 := Fld_18;
if Var_Expr_5 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr_5
Scope_Result_9 := Var_Expr_5;
   --# end
   Result_Var_3 := Scope_Result_9;
else
   Result_Var_3 := Var_Expr_3;
end if;
   If_Result_3 := Result_Var_3;
else
   If_Result_3 := Var_Expr_3;
end if;
--# expr-done 11549
Scope_Result_10 := If_Result_3;
   --# end
      Finalizer_Scope_3414;
   Result_Var_4 := Scope_Result_10;
else
   Result_Var_4 := No_Entity_Base_Type_Decl;
end if;
Var_Expr := Result_Var_4;
if Var_Expr /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_11 := Var_Expr;
   --# end
   Result_Var_5 := Scope_Result_11;
else
   Result_Var_5 := Var_Expr_3;
end if;
Scope_Result_12 := Result_Var_5;
   --# end
   Result_Var_6 := Scope_Result_12;
else
   Result_Var_6 := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var_6;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3414;
            raise;
      end;
   return Property_Result;
end Base_Id_P_Designated_Type_Impl;
--# end
--# property-start BaseId.all_env_els_impl ada/nodes.lkt:20046
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_All_Env_Els_Impl
  (Node : Bare_Base_Id
      ; Seq : Boolean
         := True
      ; Seq_From : Bare_Ada_Node
         := No_Bare_Ada_Node
      ; Categories : Ref_Categories
         := (Inherited_Primitives => True, Nocat => True)
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
      --# bind self Self
   --# bind seq Seq
   --# bind seq_from Seq_From
   --# bind categories Categories
   --# bind env Env
   --# bind origin Origin
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_269 with Inline_Always;
      Fld : Symbol_Type;
Fld_1 : Boolean;
If_Result : Lookup_Kind;
Cast_Expr : Bare_Base_Id;
Cast_Result : Bare_Ada_Node;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result_1 : Bare_Ada_Node;
If_Result_2 : Bare_Ada_Node;
Fld_2 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_269 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_269;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11557 '<FieldAccess for env_get at nodes.lkt:20051:9>' Fld_2 ada/nodes.lkt:20051
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11550 '<FieldAccess for name_symbol at nodes.lkt:20053:13>' Fld ada/nodes.lkt:20053
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Self);
--# end
--# expr-done 11550
--# expr-start 11552 '<If at nodes.lkt:20054:20>' If_Result ada/nodes.lkt:20054
--# expr-start 11551 '<FieldAccess for is_prefix at nodes.lkt:20054:23>' Fld_1 ada/nodes.lkt:20054
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld_1 := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 11551
if Fld_1 then
   If_Result := Recursive;
else
   If_Result := Flat;
end if;
--# expr-done 11552
--# expr-start 11556 '<If at nodes.lkt:20056:23>' If_Result_2 ada/nodes.lkt:20056
if Seq then
   --# expr-start 11555 '<If at nodes.lkt:20057:18>' If_Result_1 ada/nodes.lkt:20057
--# expr-start 11554 '<Not at nodes.lkt:20057:21>' Not_Val ada/nodes.lkt:20057
--# expr-start 11553 '<IsNull at nodes.lkt:20057:25>' Is_Null ada/nodes.lkt:20057
Is_Null := Seq_From = null; 
--# expr-done 11553
Not_Val := not (Is_Null); 
--# expr-done 11554
if Not_Val then
   If_Result_1 := Seq_From;
else
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
   If_Result_1 := Cast_Result;
end if;
--# expr-done 11555
   If_Result_2 := If_Result_1;
else
   If_Result_2 := No_Bare_Ada_Node;
end if;
--# expr-done 11556
--# property-call-start AdaNode.env_get
Fld_2 := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Env, Symbol => Fld, Lookup => If_Result, From_Node => If_Result_2, Categories => Categories);
--# end
--# expr-done 11557
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_269;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_269;
            raise;
      end;
   return Property_Result;
end Base_Id_P_All_Env_Els_Impl;
--# end
--# property-start BaseId.env_elements_impl ada/nodes.lkt:20064
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Env_Elements_Impl
  (Node : Bare_Base_Id
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
     Ent : Internal_Entity_Base_Id :=
       Internal_Entity_Base_Id'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_270 with Inline_Always;
            procedure Finalizer_Scope_3419 with Inline_Always;
            procedure Finalizer_Scope_3425 with Inline_Always;
            procedure Finalizer_Scope_3426 with Inline_Always;
      Local_Items : Internal_Entity_Array_Access;
Var_Expr_1 : Internal_Entity_Anonymous_Expr_Decl;
Var_Expr_3 : Internal_Entity;
Local_Pc : Internal_Entity_Call_Expr;
Local_Is_Prefix : Boolean;
Var_Expr_4 : Internal_Entity_Assoc_List;
Match_0 : Internal_Entity_Base_Type_Decl;
Match_1 : Internal_Entity_Basic_Decl;
Var_Expr_6 : Internal_Entity_Base_Subp_Spec;
Match_2 : Internal_Entity;
Var_Expr_10 : Boolean;
Var_Expr_11 : Internal_Entity;
Sym : Symbol_Type;
Fld : Boolean;
If_Result : Lookup_Kind;
Fld_1 : Bare_Ada_Node;
Fld_2 : Boolean;
If_Result_1 : Ref_Categories;
Fld_3 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Anonymous_Expr_Decl;
Fld_4 : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Fld_5 : Internal_Entity_Defining_Name;
Fld_6 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Expr_1 : Internal_Entity_Base_Id;
Cast_Result_1 : Internal_Entity;
Fld_7 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Map_Result : Internal_Entity_Array_Access;
Fld_8 : Internal_Entity_Call_Expr;
Fld_9 : Boolean;
Not_Val : Boolean;
Fld_10 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Cast_Expr_2 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Fld_11 : Boolean;
Map_Result_1 : Internal_Entity_Array_Access;
Fld_12 : Internal_Entity_Array_Access;
Is_A_1 : Boolean;
Cast_Expr_3 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Fld_13 : Internal_Entity_Defining_Name;
Fld_14 : Internal_Entity_Name;
Sym_1 : Symbol_Type;
Fld_15 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Find_Result_1 : Internal_Entity;
Array_Lit : Internal_Entity_Array_Access;
Scope_Result_3 : Internal_Entity_Array_Access;
Result_Var_3 : Internal_Entity_Array_Access;
If_Result_2 : Internal_Entity_Array_Access;
Concat_Result : Internal_Entity_Array_Access;
Fld_16 : Internal_Entity;
Cast_Result_4 : Internal_Entity_Assoc_List;
Fld_17 : Bare_Assoc_List;
Len : Integer;
Is_Equal : Boolean;
Fld_18 : Internal_Entity_Base_Subp_Spec;
Fld_19 : Boolean;
Scope_Result_4 : Boolean;
Fld_20 : Internal_Entity_Base_Type_Decl;
Fld_21 : Boolean;
Result_Var_4 : Boolean;
Match_Prefix : Internal_Entity;
Cast_Result_5 : Internal_Entity_Base_Type_Decl;
Let_Result : Boolean;
Scope_Result_5 : Boolean;
Cast_Result_6 : Internal_Entity_Basic_Decl;
Let_Result_1 : Boolean;
Scope_Result_6 : Boolean;
Cast_Result_7 : Internal_Entity;
Let_Result_2 : Boolean;
Scope_Result_7 : Boolean;
Match_Result : Boolean;
Map_Result_2 : Internal_Entity_Array_Access;
Scope_Result_8 : Internal_Entity_Array_Access;
Is_A_2 : Boolean;
Not_Val_1 : Boolean;
Map_Result_3 : Internal_Entity_Array_Access;
Result_Var_5 : Internal_Entity_Array_Access;
Is_Null : Boolean;
If_Result_3 : Internal_Entity_Array_Access;
Dyn_Var_Bind_Result : Internal_Entity_Array_Access;
Let_Result_3 : Internal_Entity_Array_Access;
Let_Result_4 : Internal_Entity_Array_Access;
Let_Result_5 : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_270 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Local_Items);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Scope_Result_8);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Result_Var_5);
                     Dec_Ref (If_Result_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
            end Finalizer_Scope_270;
            procedure Finalizer_Scope_3419 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3419;
            procedure Finalizer_Scope_3425 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_3425;
            procedure Finalizer_Scope_3426 is
            begin
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_3426;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Base_Id_Base_Id_P_Env_Elements_Impl,
            Items    => new Mmz_Key_Array (1 ..  3))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Base_Id,
                                As_Bare_Base_Id => Self);
               Mmz_K.Items (2) := (Kind => Mmz_Lexical_Env,
                                      As_Lexical_Env => Env);
                  Inc_Ref (Mmz_K.Items (2).As_Lexical_Env);
               Mmz_K.Items (3) :=
                 (Kind => Mmz_Internal_Entity_Info,
                  As_Internal_Entity_Info => E_Info);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Entity_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 11608 '<Let at nodes.lkt:20065:9>' Let_Result_5 ada/nodes.lkt:20065
--# scope-start
--# expr-start 11572 '<Map at nodes.lkt:20066:13>' Map_Result ada/nodes.lkt:20066
   --# expr-start 11564 '<FieldAccess for env_get at nodes.lkt:20066:13>' Fld_3 ada/nodes.lkt:20066
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11558 '<GetSymbol at nodes.lkt:20068:17>' Sym ada/nodes.lkt:20068
Sym := Get_Symbol (Self); 
--# expr-done 11558
--# expr-start 11560 '<If at nodes.lkt:20069:24>' If_Result ada/nodes.lkt:20069
--# expr-start 11559 '<FieldAccess for is_prefix at nodes.lkt:20069:27>' Fld ada/nodes.lkt:20069
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_prefix
Fld := Libadalang.Implementation.Name_P_Is_Prefix (Node => Self);
--# end
--# expr-done 11559
if Fld then
   If_Result := Recursive;
else
   If_Result := Flat;
end if;
--# expr-done 11560
--# expr-start 11561 '<FieldAccess for origin_node at nodes.lkt:20072:27>' Fld_1 ada/nodes.lkt:20072
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11561
--# expr-start 11563 '<If at nodes.lkt:20073:28>' If_Result_1 ada/nodes.lkt:20073
--# expr-start 11562 '<FieldAccess for can_designate_primitive at nodes.lkt:20073:31>' Fld_2 ada/nodes.lkt:20073
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.can_designate_primitive
Fld_2 := Libadalang.Implementation.Name_P_Can_Designate_Primitive (Node => Self);
--# end
--# expr-done 11562
if Fld_2 then
   If_Result_1 := (Inherited_Primitives => True, Nocat => True);
else
   If_Result_1 := (Inherited_Primitives => False, Nocat => True);
end if;
--# expr-done 11563
--# property-call-start AdaNode.env_get
Fld_3 := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Env, Symbol => Sym, Lookup => If_Result, From_Node => Fld_1, Categories => If_Result_1);
--# end
--# expr-done 11564
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_3;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
--# expr-start 11565 '<Cast to AnonymousExprDecl at nodes.lkt:20079:17>' Cast_Result ada/nodes.lkt:20079
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Anonymous_Expr_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Anonymous_Expr_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Anonymous_Expr_Decl;
   end if;
--# expr-done 11565
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Anonymous_Expr_Decl then
   --# scope-start
   --# bind aed Var_Expr_1
--# expr-start 11568 '<Find at nodes.lkt:20081:21>' Find_Result ada/nodes.lkt:20081
   --# expr-start 11566 '<FieldAccess for parents at nodes.lkt:20081:21>' Fld_4 ada/nodes.lkt:20081
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 11566
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_4;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_2
      --# expr-start 11567 '<IsA GenericFormal at nodes.lkt:20081:48>' Is_A ada/nodes.lkt:20081
Is_A := Item_2.Node /= null 
and then Item_2.Node.Kind in Ada_Generic_Formal; 
--# expr-done 11567
      if Is_A then
         Find_Result := Item_2; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 11568
Var_Expr_3 := Find_Result;
if Var_Expr_3 /= No_Entity then
   --# scope-start
   --# bind _ Var_Expr_3
--# expr-start 11571 '<FieldAccess for is_directly_reachable at nodes.lkt:20086:25>' Fld_7 ada/nodes.lkt:20086
--# expr-start 11570 '<FieldAccess for formal_decl at nodes.lkt:20086:25>' Fld_6 ada/nodes.lkt:20086
--# expr-start 11569 '<FieldAccess for get_formal at nodes.lkt:20086:25>' Fld_5 ada/nodes.lkt:20086
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AnonymousExprDecl.get_formal
Fld_5 := Libadalang.Implementation.Anonymous_Expr_Decl_P_Get_Formal (Node => Var_Expr_1.Node, Imprecise_Fallback => False, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 11569
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_6 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 11570
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Cast_Expr_1 := Ent; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
--# property-call-start BasicDecl.is_directly_reachable
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Is_Directly_Reachable (Node => Fld_6.Node, Origin => Cast_Result_1);
--# end
--# expr-done 11571
Scope_Result := Fld_7;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := True;
end if;
Scope_Result_1 := Result_Var;
   --# end
      Finalizer_Scope_3419;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := True;
end if;
         if Result_Var_1 then
         declare
            Item_To_Append : constant Internal_Entity := Item_0;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11572
Local_Items := Map_Result; Inc_Ref (Local_Items);
--# bind items Local_Items
--# expr-start 11607 '<Let at nodes.lkt:20096:9>' Let_Result_4 ada/nodes.lkt:20096
--# scope-start
--# expr-start 11573 '<FieldAccess for parent_callexpr at nodes.lkt:20096:18>' Fld_8 ada/nodes.lkt:20096
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.parent_callexpr
Fld_8 := Libadalang.Implementation.Name_P_Parent_Callexpr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 11573
Local_Pc := Fld_8; 
--# bind pc Local_Pc
--# expr-start 11606 '<Let at nodes.lkt:20097:9>' Let_Result_3 ada/nodes.lkt:20097
--# scope-start
--# expr-start 11575 '<Not at nodes.lkt:20097:25>' Not_Val ada/nodes.lkt:20097
--# expr-start 11574 '<FieldAccess for is_suffix at nodes.lkt:20097:29>' Fld_9 ada/nodes.lkt:20097
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_suffix
Fld_9 := Libadalang.Implementation.Name_P_Is_Suffix (Node => Self);
--# end
--# expr-done 11574
Not_Val := not (Fld_9); 
--# expr-done 11575
Local_Is_Prefix := Not_Val; 
--# bind is_prefix Local_Is_Prefix
--# expr-start 11605 '<bind at nodes.lkt:20100:13>' Dyn_Var_Bind_Result ada/nodes.lkt:20100
--# expr-start 11576 '<FieldAccess for origin_node at nodes.lkt:20100:27>' Fld_10 ada/nodes.lkt:20100
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_10 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 11576
Bound_Origin := Fld_10; 
--# expr-start 11604 '<If at nodes.lkt:20102:13>' If_Result_3 ada/nodes.lkt:20102
--# expr-start 11577 '<IsNull at nodes.lkt:20102:16>' Is_Null ada/nodes.lkt:20102
Is_Null := Local_Pc.Node = null; 
--# expr-done 11577
if Is_Null then
   --# expr-start 11580 '<Map at nodes.lkt:20108:17>' Map_Result_1 ada/nodes.lkt:20108
      declare
         Map_Result_1_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Items;
      begin
         for Item_8 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_8
         --# expr-start 11579 '<FieldAccess for can_be_paramless at nodes.lkt:20108:37>' Fld_11 ada/nodes.lkt:20108
--# expr-start 11578 '<Cast to BasicDecl at nodes.lkt:20108:37>' Cast_Result_2 ada/nodes.lkt:20108
Cast_Expr_2 := Item_8; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11578
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.can_be_paramless
Fld_11 := Libadalang.Implementation.Basic_Decl_P_Can_Be_Paramless (Node => Cast_Result_2.Node, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 11579
         if Fld_11 then
         declare
            Item_To_Append : constant Internal_Entity := Item_8;
         begin
            Internal_Entity_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 11580
--# expr-start 11590 '<If at nodes.lkt:20116:21>' If_Result_2 ada/nodes.lkt:20116
if Local_Is_Prefix then
--# expr-start 11588 '<Find at nodes.lkt:20118:25>' Find_Result_1 ada/nodes.lkt:20118
   --# expr-start 11581 '<FieldAccess for semantic_parents at nodes.lkt:20118:25>' Fld_12 ada/nodes.lkt:20118
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parents
Fld_12 := Libadalang.Implementation.Ada_Node_P_Semantic_Parents (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 11581
      Find_Result_1 := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_12;
      begin
         for Item_9 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_9
--# expr-start 11582 '<IsA TaskBody, BaseSubpBody at nodes.lkt:20120:30>' Is_A_1 ada/nodes.lkt:20120
Is_A_1 := Item_9.Node /= null 
and then Item_9.Node.Kind in Ada_Task_Body_Range | Ada_Base_Subp_Body; 
--# expr-done 11582
Var_Expr_10 := Is_A_1;
if Var_Expr_10 /= False then
   --# scope-start
   --# bind _ Var_Expr_10
--# expr-start 11587 '<FieldAccess for name_is at nodes.lkt:20122:33>' Fld_15 ada/nodes.lkt:20122
--# expr-start 11585 '<FieldAccess for name at nodes.lkt:20122:33>' Fld_14 ada/nodes.lkt:20122
--# expr-start 11584 '<FieldAccess for defining_name at nodes.lkt:20122:33>' Fld_13 ada/nodes.lkt:20122
--# expr-start 11583 '<Cast to BasicDecl at nodes.lkt:20122:33>' Cast_Result_3 ada/nodes.lkt:20122
Cast_Expr_3 := Item_9; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_3 := No_Entity_Basic_Decl;
   end if;
--# expr-done 11583
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_13 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Cast_Result_3.Node, E_Info => Cast_Result_3.Info);
--# end
--# expr-done 11584
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Name (Node => Fld_13.Node.Defining_Name_F_Name, Info => Fld_13.Info);
--# expr-done 11585
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11586 '<GetSymbol at nodes.lkt:20123:37>' Sym_1 ada/nodes.lkt:20123
Sym_1 := Get_Symbol (Self); 
--# expr-done 11586
--# property-call-start Name.name_is
Fld_15 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_14.Node, Sym => Sym_1);
--# end
--# expr-done 11587
Scope_Result_2 := Fld_15;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
      if Result_Var_2 then
         Find_Result_1 := Item_9; 
      end if;
   --# end
               exit when Result_Var_2;
         end loop;
      end;
--# expr-done 11588
Var_Expr_11 := Find_Result_1;
if Var_Expr_11 /= No_Entity then
   --# scope-start
   --# bind b Var_Expr_11
--# expr-start 11589 '<ArrayLiteral at nodes.lkt:20128:36>' Array_Lit ada/nodes.lkt:20128
Array_Lit := Create_Internal_Entity_Array (Internal_Internal_Entity_Array'(1 => Var_Expr_11)); 
--# expr-done 11589
Scope_Result_3 := Array_Lit;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3425;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
   If_Result_2 := Result_Var_3;
else
   If_Result_2 := No_Internal_Entity_Array_Type;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 11590
Concat_Result := Concat (Map_Result_1, If_Result_2); 
   If_Result_3 := Concat_Result;
else
--# expr-start 11592 '<Cast to AssocList at nodes.lkt:20141:17>' Cast_Result_4 ada/nodes.lkt:20141
--# expr-start 11591 '<FieldAccess for suffix at nodes.lkt:20141:17>' Fld_16 ada/nodes.lkt:20141
      if Local_Pc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Create_Internal_Entity (Node => Local_Pc.Node.Call_Expr_F_Suffix, Info => Local_Pc.Info);
--# expr-done 11591
   if Fld_16.Node = null
      or else Fld_16.Node.Kind in Ada_Assoc_List_Range
   then
      Cast_Result_4 := Create_Internal_Entity_Assoc_List
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
   else
         Cast_Result_4 := No_Entity_Assoc_List;
   end if;
--# expr-done 11592
Var_Expr_4 := Cast_Result_4;
if Var_Expr_4 /= No_Entity_Assoc_List then
   --# scope-start
   --# bind params Var_Expr_4
--# expr-start 11600 '<Map at nodes.lkt:20143:21>' Map_Result_2 ada/nodes.lkt:20143
      declare
         Map_Result_2_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Items;
      begin
         for Item_5 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_5
         --# expr-start 11599 '<Match at nodes.lkt:20145:25>' Match_Result ada/nodes.lkt:20145
      if Item_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_5; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_5; 
--# bind _ Match_0
--# expr-start 11594 '<Eq at nodes.lkt:20147:53>' Is_Equal ada/nodes.lkt:20147
--# expr-start 11593 '<length at nodes.lkt:20147:53>' Len ada/nodes.lkt:20147
Fld_17 := Var_Expr_4.Node; 
Len := Length (Fld_17); 
--# expr-done 11593
Is_Equal := Len = 1; 
--# expr-done 11594
Let_Result := Is_Equal; 
--# end
Scope_Result_5 := Let_Result;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Abstract_State_Decl .. Ada_Package_Decl | Ada_Abstract_Subp_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_6; 
--# bind b Match_1
--# expr-start 11595 '<FieldAccess for subp_spec_or_null at nodes.lkt:20149:33>' Fld_18 ada/nodes.lkt:20149
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_18 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Match_1.Node, E_Info => Match_1.Info);
--# end
--# expr-done 11595
Var_Expr_6 := Fld_18;
if Var_Expr_6 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind spec Var_Expr_6
--# expr-start 11596 '<FieldAccess for call_matches_spec at nodes.lkt:20151:37>' Fld_19 ada/nodes.lkt:20151
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseId.call_matches_spec
Fld_19 := Libadalang.Implementation.Base_Id_P_Call_Matches_Spec (Node => Ent.Node, Spec => Var_Expr_6, Pc => Local_Pc, Params => Var_Expr_4, B => Match_1, Env => Env, Origin => Bound_Origin);
--# end
--# expr-done 11596
Scope_Result_4 := Fld_19;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   --# expr-start 11598 '<FieldAccess for check_for_type at nodes.lkt:20160:49>' Fld_21 ada/nodes.lkt:20160
      if Local_Pc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11597 '<FieldAccess for expr_type at nodes.lkt:20161:41>' Fld_20 ada/nodes.lkt:20161
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_20 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => Match_1.Node, Origin => Bound_Origin, E_Info => Match_1.Info);
--# end
--# expr-done 11597
--# property-call-start CallExpr.check_for_type
Fld_21 := Libadalang.Implementation.Call_Expr_P_Check_For_Type (Node => Local_Pc.Node, Typ => Fld_20, Env => Env, Origin => Bound_Origin, E_Info => Local_Pc.Info);
--# end
--# expr-done 11598
   Result_Var_4 := Fld_21;
end if;
Let_Result_1 := Result_Var_4; 
--# end
Scope_Result_6 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Abort_Absent .. Ada_Param_Assoc | Ada_Case_Stmt_Alternative .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_7; 
--# bind _ Match_2
Let_Result_2 := False; 
--# end
Scope_Result_7 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_7; 
end case;
--# expr-done 11599
         if Match_Result then
         declare
            Item_To_Append : constant Internal_Entity := Item_5;
         begin
            Internal_Entity_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_2 := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 11600
Scope_Result_8 := Map_Result_2;
   Inc_Ref (Scope_Result_8);
   --# end
      Finalizer_Scope_3426;
   Result_Var_5 := Scope_Result_8;
else
   --# expr-start 11603 '<Map at nodes.lkt:20170:33>' Map_Result_3 ada/nodes.lkt:20170
      declare
         Map_Result_3_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Items;
      begin
         for Item_7 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_7
         --# expr-start 11602 '<Not at nodes.lkt:20170:53>' Not_Val_1 ada/nodes.lkt:20170
--# expr-start 11601 '<IsA BaseTypeDecl at nodes.lkt:20170:57>' Is_A_2 ada/nodes.lkt:20170
Is_A_2 := Item_7.Node /= null 
and then Item_7.Node.Kind in Ada_Base_Type_Decl; 
--# expr-done 11601
Not_Val_1 := not (Is_A_2); 
--# expr-done 11602
         if Not_Val_1 then
         declare
            Item_To_Append : constant Internal_Entity := Item_7;
         begin
            Internal_Entity_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_3 := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 11603
   Result_Var_5 := Map_Result_3;
end if;
      Inc_Ref (Result_Var_5);
   If_Result_3 := Result_Var_5;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 11604
Dyn_Var_Bind_Result := If_Result_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11605
Let_Result_3 := Dyn_Var_Bind_Result; Inc_Ref (Let_Result_3);
--# end
--# expr-done 11606
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 11607
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 11608
         Property_Result := Let_Result_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_270;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_270;
                     Finalizer_Scope_3419;
                     Finalizer_Scope_3425;
                     Finalizer_Scope_3426;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Entity_Array_Access,
                        As_Internal_Entity_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Base_Id_P_Env_Elements_Impl;
--# end
--# property-start BaseId.call_matches_spec ada/nodes.lkt:20179
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Call_Matches_Spec
  (Node : Bare_Base_Id
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Pc : Internal_Entity_Call_Expr
      ; Params : Internal_Entity_Assoc_List
      ; B : Internal_Entity_Basic_Decl
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
      --# bind self Self
   --# bind spec Spec
   --# bind pc Pc
   --# bind params Params
   --# bind b B
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
      Local_Family_Type : Internal_Entity;
Local_Real_Pc : Internal_Entity_Call_Expr;
Local_Real_Params : Internal_Entity_Assoc_List;
Var_Expr_0 : Internal_Entity_Call_Expr;
Var_Expr_1 : Internal_Entity_Call_Expr;
Var_Expr_271 : Internal_Entity_Entry_Spec;
Cast_Expr : Internal_Entity_Base_Subp_Spec;
Cast_Result : Internal_Entity_Entry_Spec;
Fld : Internal_Entity;
Scope_Result : Internal_Entity;
Result_Var : Internal_Entity;
Fld_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Call_Expr;
Is_Null : Boolean;
If_Result : Internal_Entity_Call_Expr;
Fld_2 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Call_Expr;
Fld_3 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Assoc_List;
Scope_Result_1 : Internal_Entity_Assoc_List;
Result_Var_1 : Internal_Entity_Assoc_List;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Assoc_List;
Is_Null_2 : Boolean;
Fld_4 : Internal_Entity_Info;
Fld_5 : Internal_Metadata;
Fld_6 : Boolean;
Fld_7 : Boolean;
Fld_8 : Internal_Entity;
Cast_Result_4 : Internal_Entity_Call_Expr;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Fld_11 : Internal_Entity_Base_Type_Decl;
Fld_12 : Boolean;
Fld_13 : Internal_Entity_Info;
Fld_14 : Internal_Metadata;
Fld_15 : Boolean;
Fld_16 : Boolean;
If_Result_4 : Boolean;
If_Result_5 : Boolean;
Let_Result : Boolean;
Let_Result_1 : Boolean;
Let_Result_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11642 '<Let at nodes.lkt:20185:9>' Let_Result_2 ada/nodes.lkt:20185
--# scope-start
--# expr-start 11609 '<Cast to EntrySpec at nodes.lkt:20185:27>' Cast_Result ada/nodes.lkt:20185
Cast_Expr := Spec; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Entry_Spec_Range
   then
      Cast_Result := Create_Internal_Entity_Entry_Spec
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Entry_Spec;
   end if;
--# expr-done 11609
Var_Expr_271 := Cast_Result;
if Var_Expr_271 /= No_Entity_Entry_Spec then
   --# scope-start
--# expr-start 11610 '<FieldAccess for family_type at nodes.lkt:20185:27>' Fld ada/nodes.lkt:20185
      if Var_Expr_271.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity (Node => Var_Expr_271.Node.Entry_Spec_F_Family_Type, Info => Var_Expr_271.Info);
--# expr-done 11610
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity;
end if;
Local_Family_Type := Result_Var; 
--# bind family_type Local_Family_Type
--# expr-start 11641 '<Let at nodes.lkt:20190:9>' Let_Result_1 ada/nodes.lkt:20190
--# scope-start
--# expr-start 11614 '<If at nodes.lkt:20191:13>' If_Result ada/nodes.lkt:20191
--# expr-start 11611 '<IsNull at nodes.lkt:20191:16>' Is_Null ada/nodes.lkt:20191
Is_Null := Local_Family_Type.Node = null; 
--# expr-done 11611
if Is_Null then
   If_Result := Pc;
else
   --# expr-start 11613 '<Cast to CallExpr at nodes.lkt:20191:49>' Cast_Result_1 ada/nodes.lkt:20191
--# expr-start 11612 '<parent at nodes.lkt:20191:49>' Fld_1 ada/nodes.lkt:20191
      if Pc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parent (Node => Pc.Node, E_Info => Pc.Info);
--# expr-done 11612
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Call_Expr
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result_1 := No_Entity_Call_Expr;
   end if;
--# expr-done 11613
   If_Result := Cast_Result_1;
end if;
--# expr-done 11614
Local_Real_Pc := If_Result; 
--# bind real_pc Local_Real_Pc
--# expr-start 11640 '<Let at nodes.lkt:20192:9>' Let_Result ada/nodes.lkt:20192
--# scope-start
--# expr-start 11620 '<If at nodes.lkt:20193:13>' If_Result_1 ada/nodes.lkt:20193
--# expr-start 11615 '<IsNull at nodes.lkt:20193:16>' Is_Null_1 ada/nodes.lkt:20193
Is_Null_1 := Local_Family_Type.Node = null; 
--# expr-done 11615
if Is_Null_1 then
   If_Result_1 := Params;
else
--# expr-start 11617 '<Cast to CallExpr at nodes.lkt:20194:18>' Cast_Result_2 ada/nodes.lkt:20194
--# expr-start 11616 '<parent at nodes.lkt:20194:18>' Fld_2 ada/nodes.lkt:20194
      if Pc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Pc.Node, E_Info => Pc.Info);
--# expr-done 11616
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Call_Expr
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result_2 := No_Entity_Call_Expr;
   end if;
--# expr-done 11617
Var_Expr_0 := Cast_Result_2;
if Var_Expr_0 /= No_Entity_Call_Expr then
   --# scope-start
   --# bind ce Var_Expr_0
--# expr-start 11619 '<Cast to AssocList at nodes.lkt:20194:52>' Cast_Result_3 ada/nodes.lkt:20194
--# expr-start 11618 '<FieldAccess for suffix at nodes.lkt:20194:52>' Fld_3 ada/nodes.lkt:20194
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity (Node => Var_Expr_0.Node.Call_Expr_F_Suffix, Info => Var_Expr_0.Info);
--# expr-done 11618
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Assoc_List_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Assoc_List
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11619
Scope_Result_1 := Cast_Result_3;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Assoc_List;
end if;
   If_Result_1 := Result_Var_1;
end if;
--# expr-done 11620
Local_Real_Params := If_Result_1; 
--# bind real_params Local_Real_Params
--# expr-start 11639 '<BooleanBinaryOp Or at nodes.lkt:20196:9>' If_Result_5 ada/nodes.lkt:20196
--# expr-start 11631 '<BooleanBinaryOp Or at nodes.lkt:20200:13>' If_Result_3 ada/nodes.lkt:20200
--# expr-start 11621 '<IsNull at nodes.lkt:20200:13>' Is_Null_2 ada/nodes.lkt:20200
Is_Null_2 := Local_Real_Pc.Node = null; 
--# expr-done 11621
if Is_Null_2 then
   If_Result_3 := True;
else
   --# expr-start 11630 '<BooleanBinaryOp And at nodes.lkt:20204:17>' If_Result_2 ada/nodes.lkt:20204
--# expr-start 11625 '<FieldAccess for is_matching_param_list at nodes.lkt:20204:17>' Fld_7 ada/nodes.lkt:20204
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11624 '<FieldAccess for dottable_subp at nodes.lkt:20206:21>' Fld_6 ada/nodes.lkt:20206
--# expr-start 11623 '<FieldAccess for md at nodes.lkt:20206:21>' Fld_5 ada/nodes.lkt:20206
--# expr-start 11622 '<FieldAccess for info at nodes.lkt:20206:21>' Fld_4 ada/nodes.lkt:20206
Fld_4 := B.Info;
--# expr-done 11622
Fld_5 := Fld_4.Md;
--# expr-done 11623
Fld_6 := Fld_5.Dottable_Subp;
--# expr-done 11624
--# property-call-start BaseFormalParamHolder.is_matching_param_list
Fld_7 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Is_Matching_Param_List (Node => Spec.Node, Params => Local_Real_Params, Is_Dottable_Subp => Fld_6, Env => Env);
--# end
--# expr-done 11625
if Fld_7 then
--# expr-start 11627 '<Cast to CallExpr at nodes.lkt:20208:21>' Cast_Result_4 ada/nodes.lkt:20208
--# expr-start 11626 '<parent at nodes.lkt:20208:21>' Fld_8 ada/nodes.lkt:20208
      if Local_Real_Pc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Parent (Node => Local_Real_Pc.Node, E_Info => Local_Real_Pc.Info);
--# expr-done 11626
   if Fld_8.Node = null
      or else Fld_8.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result_4 := Create_Internal_Entity_Call_Expr
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
   else
         Cast_Result_4 := No_Entity_Call_Expr;
   end if;
--# expr-done 11627
Var_Expr_1 := Cast_Result_4;
if Var_Expr_1 /= No_Entity_Call_Expr then
   --# scope-start
   --# bind ce Var_Expr_1
--# expr-start 11629 '<FieldAccess for check_for_type at nodes.lkt:20209:29>' Fld_10 ada/nodes.lkt:20209
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11628 '<FieldAccess for expr_type at nodes.lkt:20209:47>' Fld_9 ada/nodes.lkt:20209
      if B.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => B.Node, Origin => Origin, E_Info => B.Info);
--# end
--# expr-done 11628
--# property-call-start CallExpr.check_for_type
Fld_10 := Libadalang.Implementation.Call_Expr_P_Check_For_Type (Node => Var_Expr_1.Node, Typ => Fld_9, Env => Env, Origin => Origin, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 11629
Scope_Result_2 := Fld_10;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := True;
end if;
   If_Result_2 := Result_Var_2;
else
   If_Result_2 := False;
end if;
--# expr-done 11630
   If_Result_3 := If_Result_2;
end if;
--# expr-done 11631
if If_Result_3 then
   If_Result_5 := True;
else
   --# expr-start 11638 '<BooleanBinaryOp And at nodes.lkt:20217:13>' If_Result_4 ada/nodes.lkt:20217
--# expr-start 11633 '<FieldAccess for check_for_type at nodes.lkt:20217:13>' Fld_12 ada/nodes.lkt:20217
      if Local_Real_Pc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11632 '<FieldAccess for expr_type at nodes.lkt:20217:36>' Fld_11 ada/nodes.lkt:20217
      if B.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.expr_type'
Fld_11 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Expr_Type (Node => B.Node, Origin => Origin, E_Info => B.Info);
--# end
--# expr-done 11632
--# property-call-start CallExpr.check_for_type
Fld_12 := Libadalang.Implementation.Call_Expr_P_Check_For_Type (Node => Local_Real_Pc.Node, Typ => Fld_11, Env => Env, Origin => Origin, E_Info => Local_Real_Pc.Info);
--# end
--# expr-done 11633
if Fld_12 then
   --# expr-start 11637 '<FieldAccess for paramless at nodes.lkt:20218:17>' Fld_16 ada/nodes.lkt:20218
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11636 '<FieldAccess for dottable_subp at nodes.lkt:20218:32>' Fld_15 ada/nodes.lkt:20218
--# expr-start 11635 '<FieldAccess for md at nodes.lkt:20218:32>' Fld_14 ada/nodes.lkt:20218
--# expr-start 11634 '<FieldAccess for info at nodes.lkt:20218:32>' Fld_13 ada/nodes.lkt:20218
Fld_13 := B.Info;
--# expr-done 11634
Fld_14 := Fld_13.Md;
--# expr-done 11635
Fld_15 := Fld_14.Dottable_Subp;
--# expr-done 11636
--# property-call-start BaseFormalParamHolder.paramless
Fld_16 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Paramless (Node => Spec.Node, Dottable_Subp => Fld_15);
--# end
--# expr-done 11637
   If_Result_4 := Fld_16;
else
   If_Result_4 := False;
end if;
--# expr-done 11638
   If_Result_5 := If_Result_4;
end if;
--# expr-done 11639
Let_Result := If_Result_5; 
--# end
--# expr-done 11640
Let_Result_1 := Let_Result; 
--# end
--# expr-done 11641
Let_Result_2 := Let_Result_1; 
--# end
--# expr-done 11642
         Property_Result := Let_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Base_Id_P_Call_Matches_Spec;
--# end
--# property-start BaseId.denotes_the_property_function ada/nodes.lkt:20222
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Denotes_The_Property_Function
  (Node : Bare_Base_Id
      ; Subp_Spec : Internal_Entity_Base_Subp_Spec
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
     Ent : Internal_Entity_Base_Id :=
       Internal_Entity_Base_Id'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind subp_spec Subp_Spec
   Property_Result : Boolean;
            procedure Finalizer_Scope_272 with Inline_Always;
            procedure Finalizer_Scope_3438 with Inline_Always;
      Local_Primitive_Types : Internal_Entity_Base_Type_Decl_Array_Access;
Match_0 : Internal_Entity_Type_Decl;
Match_1 : Internal_Entity_Subp_Decl;
Match_2 : Internal_Entity_Basic_Decl;
Fld : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_1 : Internal_Entity_Param_Spec_Array_Access;
Len : Integer;
Is_Equal : Boolean;
Fld_2 : Internal_Entity_Basic_Decl;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Type_Decl;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
Find_Result : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_3 : Internal_Entity_Subp_Spec;
Fld_4 : Internal_Entity_Base_Type_Decl_Array_Access;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Cast_Expr_3 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Is_Equiv_1 : Boolean;
Find_Result_1 : Internal_Entity_Base_Type_Decl;
Is_Null_1 : Boolean;
Not_Val_1 : Boolean;
Map_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Is_Equal_1 : Boolean;
Not_Val_2 : Boolean;
Match_Prefix : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity_Type_Decl;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_5 : Internal_Entity_Subp_Decl;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Cast_Result_6 : Internal_Entity_Basic_Decl;
Let_Result_2 : Boolean;
Scope_Result_2 : Boolean;
Match_Result : Boolean;
If_Result : Boolean;
Let_Result_3 : Boolean;
            procedure Finalizer_Scope_272 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Local_Primitive_Types);
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_272;
            procedure Finalizer_Scope_3438 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3438;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11663 '<Let at nodes.lkt:20229:9>' Let_Result_3 ada/nodes.lkt:20229
--# scope-start
--# expr-start 11643 '<FieldAccess for primitive_subp_types at nodes.lkt:20229:31>' Fld ada/nodes.lkt:20229
      if Subp_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.primitive_subp_types
Fld := Libadalang.Implementation.Base_Subp_Spec_P_Primitive_Subp_Types (Node => Subp_Spec.Node, Imprecise_Fallback => False, E_Info => Subp_Spec.Info);
--# end
--# expr-done 11643
Local_Primitive_Types := Fld; Inc_Ref (Local_Primitive_Types);
--# bind primitive_types Local_Primitive_Types
--# expr-start 11662 '<BooleanBinaryOp And at nodes.lkt:20233:9>' If_Result ada/nodes.lkt:20233
--# expr-start 11646 '<Eq at nodes.lkt:20235:13>' Is_Equal ada/nodes.lkt:20235
--# expr-start 11645 '<length at nodes.lkt:20235:13>' Len ada/nodes.lkt:20235
--# expr-start 11644 '<FieldAccess for params at nodes.lkt:20235:13>' Fld_1 ada/nodes.lkt:20235
      if Subp_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.params'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Params (Node => Subp_Spec.Node, E_Info => Subp_Spec.Info);
--# end
--# expr-done 11644
Len := Length (Fld_1); 
--# expr-done 11645
Is_Equal := Len = 1; 
--# expr-done 11646
if Is_Equal then
   --# expr-start 11661 '<Match at nodes.lkt:20240:13>' Match_Result ada/nodes.lkt:20240
--# expr-start 11647 '<FieldAccess for parent_basic_decl at nodes.lkt:20240:19>' Fld_2 ada/nodes.lkt:20240
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld_2 := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 11647
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_2; 
case Ada_Basic_Decl (Match_Prefix.Node.Kind) is
         when Ada_Anonymous_Type_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_4; 
--# bind td Match_0
--# expr-start 11651 '<Not at nodes.lkt:20244:21>' Not_Val ada/nodes.lkt:20244
--# expr-start 11650 '<IsNull at nodes.lkt:20244:25>' Is_Null ada/nodes.lkt:20244
--# expr-start 11649 '<Find at nodes.lkt:20244:25>' Find_Result ada/nodes.lkt:20244
      Find_Result := No_Entity_Base_Type_Decl;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Local_Primitive_Types;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind t Item_0
      --# expr-start 11648 '<Eq at nodes.lkt:20244:53>' Is_Equiv ada/nodes.lkt:20244
Cast_Expr := Item_0; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Cast_Expr_1 := Match_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Cast_Result, Cast_Result_1); 
--# expr-done 11648
      if Is_Equiv then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_Equiv;
         end loop;
      end;
--# expr-done 11649
Is_Null := Find_Result.Node = null; 
--# expr-done 11650
Not_Val := not (Is_Null); 
--# expr-done 11651
Let_Result := Not_Val; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Subp_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Subp_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_5; 
--# bind sd Match_1
--# expr-start 11660 '<Not at nodes.lkt:20248:21>' Not_Val_2 ada/nodes.lkt:20248
--# expr-start 11659 '<IsNull at nodes.lkt:20248:25>' Is_Equal_1 ada/nodes.lkt:20248
--# expr-start 11658 '<Map at nodes.lkt:20248:25>' Map_Result ada/nodes.lkt:20248
   --# expr-start 11653 '<FieldAccess for primitive_subp_types at nodes.lkt:20248:25>' Fld_4 ada/nodes.lkt:20248
--# expr-start 11652 '<FieldAccess for subp_spec at nodes.lkt:20248:25>' Fld_3 ada/nodes.lkt:20248
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Subp_Spec (Node => Match_1.Node.Classic_Subp_Decl_F_Subp_Spec, Info => Match_1.Info);
--# expr-done 11652
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.primitive_subp_types
Fld_4 := Libadalang.Implementation.Base_Subp_Spec_P_Primitive_Subp_Types (Node => Fld_3.Node, Imprecise_Fallback => False, E_Info => Fld_3.Info);
--# end
--# expr-done 11653
      declare
         Map_Result_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld_4;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind t1 Item_1
         --# expr-start 11657 '<Not at nodes.lkt:20250:25>' Not_Val_1 ada/nodes.lkt:20250
--# expr-start 11656 '<IsNull at nodes.lkt:20250:29>' Is_Null_1 ada/nodes.lkt:20250
--# expr-start 11655 '<Find at nodes.lkt:20250:29>' Find_Result_1 ada/nodes.lkt:20250
      Find_Result_1 := No_Entity_Base_Type_Decl;
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Local_Primitive_Types;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind t2 Item_2
      --# expr-start 11654 '<Eq at nodes.lkt:20250:58>' Is_Equiv_1 ada/nodes.lkt:20250
Cast_Expr_2 := Item_1; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Cast_Expr_3 := Item_2; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
Is_Equiv_1 := Equivalent (Cast_Result_2, Cast_Result_3); 
--# expr-done 11654
      if Is_Equiv_1 then
         Find_Result_1 := Item_2; 
      end if;
   --# end
               exit when Is_Equiv_1;
         end loop;
      end;
--# expr-done 11655
Is_Null_1 := Find_Result_1.Node = null; 
--# expr-done 11656
Not_Val_1 := not (Is_Null_1); 
--# expr-done 11657
         if Not_Val_1 then
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Item_1;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11658
Is_Equal_1 := Equivalent (Map_Result, No_Internal_Entity_Base_Type_Decl_Array_Type); 
--# expr-done 11659
Not_Val_2 := not (Is_Equal_1); 
--# expr-done 11660
Let_Result_1 := Not_Val_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
      Finalizer_Scope_3438;
            Match_Result := Scope_Result_1; 
         when Ada_Abstract_State_Decl .. Ada_Single_Task_Type_Decl | Ada_Abstract_Subp_Decl .. Ada_Concrete_Formal_Subp_Decl | Ada_Entry_Decl .. Ada_Synthetic_Object_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity_Basic_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_6; 
--# bind _ Match_2
Let_Result_2 := False; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 11661
   If_Result := Match_Result;
else
   If_Result := False;
end if;
--# expr-done 11662
Let_Result_3 := If_Result; 
--# end
--# expr-done 11663
         Property_Result := Let_Result_3;
   --# end
      Finalizer_Scope_272;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_272;
                     Finalizer_Scope_3438;
            raise;
      end;
   return Property_Result;
end Base_Id_P_Denotes_The_Property_Function;
--# end
--# property-start BaseId.xref_equation ada/nodes.lkt:20259
pragma Warnings (Off, "is not referenced");
 function Base_Id_P_Xref_Equation
  (Node : Bare_Base_Id
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Base_Id  := Bare_Base_Id (Node);
     Ent : Internal_Entity_Base_Id :=
       Internal_Entity_Base_Id'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_273 with Inline_Always;
            procedure Finalizer_Scope_3442 with Inline_Always;
            procedure Finalizer_Scope_3443 with Inline_Always;
      Local_Is_Prefix : Boolean;
Var_Expr_0 : Internal_Entity_Array_Access;
Var_Expr_272 : Internal_Entity_Base_Subp_Body;
Fld : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity_Array_Access;
Fld_2 : Logic_Var;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_3 : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_4 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_5 : Logic_Var;
Fld_6 : Logic_Var;
Bind_Result_2 : Logic_Equation;
Fld_7 : Logic_Var;
Cast_Expr_2 : Internal_Entity;
Cast_Result_3 : Internal_Entity_Basic_Decl;
Fld_8 : Internal_Entity_Base_Subp_Spec;
Cast_Result_4 : Internal_Entity;
Bind_Result_3 : Logic_Equation;
And_Pred : Logic_Equation;
Cast_Expr_3 : Internal_Entity;
Cast_Result_5 : Internal_Entity_Base_Subp_Body;
Fld_9 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Fld_10 : Logic_Equation;
Result_Var_1 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_273 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_273;
            procedure Finalizer_Scope_3442 is
            begin
                     Dec_Ref (Var_Expr_0);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_3442;
            procedure Finalizer_Scope_3443 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (And_Pred);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3443;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11689 '<Let at nodes.lkt:20260:9>' Let_Result ada/nodes.lkt:20260
--# scope-start
--# expr-start 11665 '<Not at nodes.lkt:20260:25>' Not_Val ada/nodes.lkt:20260
--# expr-start 11664 '<FieldAccess for is_suffix at nodes.lkt:20260:29>' Fld ada/nodes.lkt:20260
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_suffix
Fld := Libadalang.Implementation.Name_P_Is_Suffix (Node => Self);
--# end
--# expr-done 11664
Not_Val := not (Fld); 
--# expr-done 11665
Local_Is_Prefix := Not_Val; 
--# bind is_prefix Local_Is_Prefix
--# expr-start 11666 '<FieldAccess for env_elements at nodes.lkt:20262:9>' Fld_1 ada/nodes.lkt:20262
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.env_elements
Fld_1 := Libadalang.Implementation.Expr_P_Env_Elements (Node => Ent.Node, Env => Env, No_Visibility => False, E_Info => Ent.Info);
--# end
--# expr-done 11666
Var_Expr_0 := Fld_1;
      Inc_Ref (Var_Expr_0);
if Var_Expr_0 /= No_Internal_Entity_Array_Type then
   --# scope-start
   --# bind env_els Var_Expr_0
--# expr-start 11687 '<LogicAny at nodes.lkt:20264:13>' Logic_Boolean_Op ada/nodes.lkt:20264
--# expr-start 11686 '<Map at nodes.lkt:20264:13>' Map_Result ada/nodes.lkt:20264
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Var_Expr_0;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_1
      --# expr-start 11685 '<LogicBinaryOp And at nodes.lkt:20266:17>' And_Pred_1 ada/nodes.lkt:20266
--# expr-start 11670 '<Bind at nodes.lkt:20266:17>' Bind_Result ada/nodes.lkt:20266
--# expr-start 11667 '<FieldAccess for ref_var at nodes.lkt:20266:17>' Fld_2 ada/nodes.lkt:20266
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 11667
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 11669 '<FieldAccess for corresponding_actual at nodes.lkt:20266:35>' Fld_3 ada/nodes.lkt:20266
--# expr-start 11668 '<Cast to BasicDecl at nodes.lkt:20266:35>' Cast_Result ada/nodes.lkt:20266
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 11668
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.corresponding_actual'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Corresponding_Actual (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 11669
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Bind_Result := Solver.Create_Assign (Fld_2, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20266:17") else null)); 
--# expr-done 11670
--# expr-start 11684 '<If at nodes.lkt:20270:21>' If_Result_1 ada/nodes.lkt:20270
--# expr-start 11673 '<BooleanBinaryOp And at nodes.lkt:20270:24>' If_Result ada/nodes.lkt:20270
if Local_Is_Prefix then
--# expr-start 11671 '<Cast to BaseSubpBody at nodes.lkt:20270:38>' Cast_Result_5 ada/nodes.lkt:20270
Cast_Expr_3 := Item_1; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Base_Subp_Body
   then
      Cast_Result_5 := Create_Internal_Entity_Base_Subp_Body
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_5 := No_Entity_Base_Subp_Body;
   end if;
--# expr-done 11671
Var_Expr_272 := Cast_Result_5;
if Var_Expr_272 /= No_Entity_Base_Subp_Body then
   --# scope-start
--# expr-start 11672 '<FieldAccess for in_scope at nodes.lkt:20270:38>' Fld_9 ada/nodes.lkt:20270
      if Var_Expr_272.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Body.in_scope
Fld_9 := Libadalang.Implementation.Body_Node_P_In_Scope (Node => Var_Expr_272.Node, Origin => Origin);
--# end
--# expr-done 11672
Scope_Result := Fld_9;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
   If_Result := Result_Var;
else
   If_Result := False;
end if;
--# expr-done 11673
if If_Result then
   --# expr-start 11675 '<Bind at nodes.lkt:20271:26>' Bind_Result_1 ada/nodes.lkt:20271
--# expr-start 11674 '<FieldAccess for type_var at nodes.lkt:20271:26>' Fld_4 ada/nodes.lkt:20271
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11674
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Cast_Expr_1 := No_Entity_Base_Type_Decl; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_4, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20271:26") else null)); 
--# expr-done 11675
   If_Result_1 := Bind_Result_1;
else
   --# expr-start 11683 '<LogicBinaryOp And at nodes.lkt:20280:25>' And_Pred ada/nodes.lkt:20280
--# expr-start 11678 '<NPropagate at nodes.lkt:20280:25>' Bind_Result_2 ada/nodes.lkt:20280
--# expr-start 11676 '<FieldAccess for ref_var at nodes.lkt:20280:65>' Fld_6 ada/nodes.lkt:20280
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 11676
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
--# expr-start 11677 '<FieldAccess for type_var at nodes.lkt:20280:25>' Fld_5 ada/nodes.lkt:20280
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11677
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Bind_Result_2 := Solver.Create_Propagate (Fld_6, Fld_5, Logic_Functor_722'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20280:25") else null)); 
--# expr-done 11678
--# expr-start 11682 '<Bind at nodes.lkt:20281:30>' Bind_Result_3 ada/nodes.lkt:20281
--# expr-start 11679 '<FieldAccess for subp_spec_var at nodes.lkt:20281:30>' Fld_7 ada/nodes.lkt:20281
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld_7 := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Self);
--# end
--# expr-done 11679
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
--# expr-start 11681 '<FieldAccess for subp_spec_or_null at nodes.lkt:20282:28>' Fld_8 ada/nodes.lkt:20282
--# expr-start 11680 '<Cast to BasicDecl at nodes.lkt:20282:28>' Cast_Result_3 ada/nodes.lkt:20282
Cast_Expr_2 := Item_1; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_3 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_3 := No_Entity_Basic_Decl;
   end if;
--# expr-done 11680
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_8 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Cast_Result_3.Node, E_Info => Cast_Result_3.Info);
--# end
--# expr-done 11681
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
Bind_Result_3 := Solver.Create_Assign (Fld_7, Cast_Result_4, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20281:30") else null)); 
--# expr-done 11682
And_Pred := Create_And (Bind_Result_2, Bind_Result_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20280:25") else null)); 
--# expr-done 11683
   If_Result_1 := And_Pred;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 11684
And_Pred_1 := Create_And (Bind_Result, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20266:17") else null)); 
--# expr-done 11685
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_1;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3443;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11686
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20264:13") else null)); 
--# expr-done 11687
Scope_Result_1 := Logic_Boolean_Op;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3442;
   Result_Var_1 := Scope_Result_1;
else
   --# expr-start 11688 '<FieldAccess for undefined_reference_equation at nodes.lkt:20286:25>' Fld_10 ada/nodes.lkt:20286
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.undefined_reference_equation
Fld_10 := Libadalang.Implementation.Name_P_Undefined_Reference_Equation (Node => Ent.Node);
--# end
--# expr-done 11688
   Result_Var_1 := Fld_10;
end if;
      Inc_Ref (Result_Var_1);
Let_Result := Result_Var_1; Inc_Ref (Let_Result);
--# end
--# expr-done 11689
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_273;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_273;
                     Finalizer_Scope_3442;
                     Finalizer_Scope_3443;
            raise;
      end;
   return Property_Result;
end Base_Id_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Char_Literal
   --
      procedure Initialize_Fields_For_Char_Literal
        (Self : Bare_Char_Literal
        ) is
      begin
            Initialize_Fields_For_Base_Id
              (Self);
      end Initialize_Fields_For_Char_Literal;
--# property-start CharLiteral.has_context_free_type ada/nodes.lkt:20299
pragma Warnings (Off, "is not referenced");
 function Char_Literal_P_Has_Context_Free_Type
  (Node : Bare_Char_Literal
  )
   return Boolean
is
   Self : Bare_Char_Literal  := Bare_Char_Literal (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Char_Literal_P_Has_Context_Free_Type;
--# end
--# property-start CharLiteral.xref_equation ada/nodes.lkt:20302
pragma Warnings (Off, "is not referenced");
 function Char_Literal_P_Xref_Equation
  (Node : Bare_Char_Literal
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Char_Literal  := Bare_Char_Literal (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1313 with Inline_Always;
      Fld : Logic_Var;
Pred : Logic_Equation;
Fld_1 : Logic_Var;
Fld_2 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Cast_Expr : Bare_Char_Literal;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_3 : Logic_Var;
Fld_4 : Logic_Var;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1313 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1313;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11700 '<LogicBinaryOp And at nodes.lkt:20303:9>' And_Pred_1 ada/nodes.lkt:20303
--# expr-start 11695 '<LogicBinaryOp And at nodes.lkt:20303:9>' And_Pred ada/nodes.lkt:20303
--# expr-start 11691 '<Predicate on BaseTypeDecl.is_non_null_char_type at nodes.lkt:20303:9>' Pred ada/nodes.lkt:20303
--# expr-start 11690 '<FieldAccess for expected_type_var at nodes.lkt:20303:45>' Fld ada/nodes.lkt:20303
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11690
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
Pred := Solver.Create_Predicate (Fld, Create_Base_Type_Decl_P_Is_Non_Null_Char_Type_0_Predicate (Origin)); 
--# expr-done 11691
--# expr-start 11694 '<Bind at nodes.lkt:20304:14>' Bind_Result ada/nodes.lkt:20304
--# expr-start 11692 '<FieldAccess for expected_type_var at nodes.lkt:20304:14>' Fld_1 ada/nodes.lkt:20304
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11692
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 11693 '<FieldAccess for type_var at nodes.lkt:20305:13>' Fld_2 ada/nodes.lkt:20305
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11693
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result := Solver.Create_Unify (Fld_1, Fld_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20304:14") else null)); 
--# expr-done 11694
And_Pred := Create_And (Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20303:9") else null)); 
--# expr-done 11695
--# expr-start 11699 '<bind at nodes.lkt:20315:13>' Dyn_Var_Bind_Result ada/nodes.lkt:20315
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 11698 '<NPropagate at nodes.lkt:20317:13>' Bind_Result_1 ada/nodes.lkt:20317
--# expr-start 11696 '<FieldAccess for type_var at nodes.lkt:20318:57>' Fld_4 ada/nodes.lkt:20318
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11696
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 11697 '<FieldAccess for ref_var at nodes.lkt:20317:13>' Fld_3 ada/nodes.lkt:20317
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 11697
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Bind_Result_1 := Solver.Create_Propagate (Fld_4, Fld_3, Logic_Functor_921'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Bound_Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20317:13") else null)); 
--# expr-done 11698
Dyn_Var_Bind_Result := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11699
And_Pred_1 := Create_And (And_Pred, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20303:9") else null)); 
--# expr-done 11700
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1313;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1313;
            raise;
      end;
   return Property_Result;
end Char_Literal_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Identifier
   --
      procedure Initialize_Fields_For_Identifier
        (Self : Bare_Identifier
        ) is
      begin
            Initialize_Fields_For_Base_Id
              (Self);
      end Initialize_Fields_For_Identifier;
--# property-start Identifier.is_attr_with_args ada/nodes.lkt:20339
pragma Warnings (Off, "is not referenced");
 function Identifier_P_Is_Attr_With_Args
  (Node : Bare_Identifier
  )
   return Boolean
is
   Self : Bare_Identifier  := Bare_Identifier (Node);
      --# bind self Self
   Property_Result : Boolean;
      Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
Is_Equal_4 : Boolean;
If_Result_3 : Boolean;
Is_Equal_5 : Boolean;
If_Result_4 : Boolean;
Is_Equal_6 : Boolean;
If_Result_5 : Boolean;
Is_Equal_7 : Boolean;
If_Result_6 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11701 '<GetSymbol at nodes.lkt:20340:9>' Sym ada/nodes.lkt:20340
Sym := Get_Symbol (Self); 
--# expr-done 11701
--# expr-start 11702 '<Symbol First at nodes.lkt:20340:24>' Sym_1 ada/nodes.lkt:20340
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_First); 
--# expr-done 11702
Is_Equal_7 := Sym = Sym_1; 
if Is_Equal_7 then
   If_Result_6 := True;
else
--# expr-start 11703 '<Symbol Last at nodes.lkt:20341:15>' Sym_2 ada/nodes.lkt:20341
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Last); 
--# expr-done 11703
Is_Equal_6 := Sym = Sym_2; 
if Is_Equal_6 then
   If_Result_5 := True;
else
--# expr-start 11704 '<Symbol Range at nodes.lkt:20342:15>' Sym_3 ada/nodes.lkt:20342
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Range); 
--# expr-done 11704
Is_Equal_5 := Sym = Sym_3; 
if Is_Equal_5 then
   If_Result_4 := True;
else
--# expr-start 11705 '<Symbol Length at nodes.lkt:20343:15>' Sym_4 ada/nodes.lkt:20343
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Length); 
--# expr-done 11705
Is_Equal_4 := Sym = Sym_4; 
if Is_Equal_4 then
   If_Result_3 := True;
else
--# expr-start 11706 '<Symbol Has_Same_Storage at nodes.lkt:20344:15>' Sym_5 ada/nodes.lkt:20344
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Has_Same_Storage); 
--# expr-done 11706
Is_Equal_3 := Sym = Sym_5; 
if Is_Equal_3 then
   If_Result_2 := True;
else
--# expr-start 11707 '<Symbol Overlaps_Storage at nodes.lkt:20345:15>' Sym_6 ada/nodes.lkt:20345
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Overlaps_Storage); 
--# expr-done 11707
Is_Equal_2 := Sym = Sym_6; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 11708 '<Symbol Deref at nodes.lkt:20346:15>' Sym_7 ada/nodes.lkt:20346
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Deref); 
--# expr-done 11708
Is_Equal_1 := Sym = Sym_7; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 11709 '<Symbol Mechanism_Code at nodes.lkt:20347:15>' Sym_8 ada/nodes.lkt:20347
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mechanism_Code); 
--# expr-done 11709
Is_Equal := Sym = Sym_8; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
   If_Result_2 := If_Result_1;
end if;
   If_Result_3 := If_Result_2;
end if;
   If_Result_4 := If_Result_3;
end if;
   If_Result_5 := If_Result_4;
end if;
   If_Result_6 := If_Result_5;
end if;
         Property_Result := If_Result_6;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Identifier_P_Is_Attr_With_Args;
--# end
--# property-start Identifier.complete_items ada/nodes.lkt:20350
pragma Warnings (Off, "is not referenced");
 function Identifier_P_Complete_Items
  (Node : Bare_Identifier
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Completion_Item_Array_Access
is
   Self : Bare_Identifier  := Bare_Identifier (Node);
     Ent : Internal_Entity_Identifier :=
       Internal_Entity_Identifier'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_275 with Inline_Always;
      Fld : Internal_Entity;
Fld_1 : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_275 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_275;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11711 '<FieldAccess for complete_items at nodes.lkt:20350:51>' Fld_1 ada/nodes.lkt:20350
--# expr-start 11710 '<parent at nodes.lkt:20350:51>' Fld ada/nodes.lkt:20350
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 11710
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.complete_items'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Complete_Items (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 11711
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_275;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_275;
            raise;
      end;
   return Property_Result;
end Identifier_P_Complete_Items;
--# end
--# property-start Identifier.is_constant ada/nodes.lkt:20352
pragma Warnings (Off, "is not referenced");
 function Identifier_P_Is_Constant
  (Node : Bare_Identifier
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Identifier  := Bare_Identifier (Node);
     Ent : Internal_Entity_Identifier :=
       Internal_Entity_Identifier'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
            procedure Finalizer_Scope_276 with Inline_Always;
            procedure Finalizer_Scope_3447 with Inline_Always;
      Local_Rd : Internal_Entity_Basic_Decl;
Var_Expr_1 : Internal_Entity_Base_Subp_Body;
Var_Expr_2 : Internal_Entity;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Defining_Name;
Fld_2 : Internal_Entity_Basic_Decl;
Fld_3 : Boolean;
Fld_4 : Boolean;
Is_A : Boolean;
If_Result : Boolean;
Fld_5 : Boolean;
If_Result_1 : Boolean;
Fld_6 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Base_Subp_Body;
Fld_7 : Internal_Entity_Subp_Spec;
Fld_8 : Internal_Entity_Subp_Kind;
Is_A_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Find_Result : Internal_Entity;
Fld_9 : Boolean;
Fld_10 : Internal_Entity_Array_Access;
Is_A_2 : Boolean;
Find_Result_1 : Internal_Entity;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result_2 : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result_3 : Boolean;
Let_Result : Boolean;
            procedure Finalizer_Scope_276 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_276;
            procedure Finalizer_Scope_3447 is
            begin
                     Dec_Ref (Fld_10);
            end Finalizer_Scope_3447;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11735 '<Let at nodes.lkt:20353:9>' Let_Result ada/nodes.lkt:20353
--# scope-start
--# expr-start 11712 '<FieldAccess for referenced_decl at nodes.lkt:20353:18>' Fld ada/nodes.lkt:20353
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Ent.Node, Imprecise_Fallback => False, E_Info => Ent.Info);
--# end
--# expr-done 11712
Local_Rd := Fld; 
--# bind rd Local_Rd
--# expr-start 11734 '<BooleanBinaryOp Or at nodes.lkt:20355:9>' If_Result_3 ada/nodes.lkt:20355
--# expr-start 11720 '<If at nodes.lkt:20358:13>' If_Result_1 ada/nodes.lkt:20358
--# expr-start 11713 '<FieldAccess for is_defining at nodes.lkt:20358:16>' Fld_5 ada/nodes.lkt:20358
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.is_defining
Fld_5 := Libadalang.Implementation.Name_P_Is_Defining (Node => Ent.Node);
--# end
--# expr-done 11713
if Fld_5 then
   --# expr-start 11716 '<FieldAccess for is_constant_object at nodes.lkt:20360:17>' Fld_3 ada/nodes.lkt:20360
--# expr-start 11715 '<FieldAccess for basic_decl at nodes.lkt:20360:17>' Fld_2 ada/nodes.lkt:20360
--# expr-start 11714 '<FieldAccess for enclosing_defining_name at nodes.lkt:20360:17>' Fld_1 ada/nodes.lkt:20360
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.enclosing_defining_name
Fld_1 := Libadalang.Implementation.Name_P_Enclosing_Defining_Name (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 11714
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.basic_decl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Basic_Decl (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 11715
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_constant_object'
Fld_3 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Constant_Object (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 11716
   If_Result_1 := Fld_3;
else
   --# expr-start 11719 '<If at nodes.lkt:20358:13>' If_Result ada/nodes.lkt:20358
--# expr-start 11717 '<IsA ObjectDecl, ComponentDecl, EnumLiteralDecl, ParamSpec, NumberDecl at nodes.lkt:20367:17>' Is_A ada/nodes.lkt:20367
Is_A := Local_Rd.Node /= null 
and then Local_Rd.Node.Kind in Ada_Object_Decl_Range | Ada_Component_Decl_Range | Ada_Enum_Literal_Decl_Range | Ada_Param_Spec_Range | Ada_Number_Decl_Range; 
--# expr-done 11717
if Is_A then
   --# expr-start 11718 '<FieldAccess for is_constant_object at nodes.lkt:20371:35>' Fld_4 ada/nodes.lkt:20371
      if Local_Rd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_constant_object'
Fld_4 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Constant_Object (Node => Local_Rd.Node, E_Info => Local_Rd.Info);
--# end
--# expr-done 11718
   If_Result := Fld_4;
else
   If_Result := False;
end if;
--# expr-done 11719
   If_Result_1 := If_Result;
end if;
--# expr-done 11720
if If_Result_1 then
   If_Result_3 := True;
else
--# expr-start 11726 '<Find at nodes.lkt:20377:13>' Find_Result ada/nodes.lkt:20377
   --# expr-start 11721 '<FieldAccess for parents at nodes.lkt:20377:13>' Fld_6 ada/nodes.lkt:20377
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 11721
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_6;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
--# expr-start 11722 '<Cast to BaseSubpBody at nodes.lkt:20379:17>' Cast_Result ada/nodes.lkt:20379
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Base_Subp_Body
   then
      Cast_Result := Create_Internal_Entity_Base_Subp_Body
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Base_Subp_Body;
   end if;
--# expr-done 11722
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Base_Subp_Body then
   --# scope-start
   --# bind v1 Var_Expr_1
--# expr-start 11725 '<IsA SubpKind.Function at nodes.lkt:20380:29>' Is_A_1 ada/nodes.lkt:20380
--# expr-start 11724 '<FieldAccess for subp_kind at nodes.lkt:20380:29>' Fld_8 ada/nodes.lkt:20380
--# expr-start 11723 '<FieldAccess for subp_spec at nodes.lkt:20380:29>' Fld_7 ada/nodes.lkt:20380
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Subp_Spec (Node => Var_Expr_1.Node.Base_Subp_Body_F_Subp_Spec, Info => Var_Expr_1.Info);
--# expr-done 11723
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Subp_Kind (Node => Fld_7.Node.Subp_Spec_F_Subp_Kind, Info => Fld_7.Info);
--# expr-done 11724
Is_A_1 := Fld_8.Node /= null 
and then Fld_8.Node.Kind in Ada_Subp_Kind_Function_Range; 
--# expr-done 11725
Scope_Result := Is_A_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
--# expr-done 11726
Var_Expr_2 := Find_Result;
if Var_Expr_2 /= No_Entity then
   --# scope-start
   --# bind _ Var_Expr_2
--# expr-start 11733 '<BooleanBinaryOp And at nodes.lkt:20385:17>' If_Result_2 ada/nodes.lkt:20385
--# expr-start 11727 '<FieldAccess for is_in_private_part at nodes.lkt:20390:21>' Fld_9 ada/nodes.lkt:20390
      if Local_Rd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_in_private_part'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_In_Private_Part (Node => Local_Rd.Node, E_Info => Local_Rd.Info);
--# end
--# expr-done 11727
if Fld_9 then
   --# expr-start 11732 '<Not at nodes.lkt:20392:21>' Not_Val ada/nodes.lkt:20392
--# expr-start 11731 '<IsNull at nodes.lkt:20392:25>' Is_Null ada/nodes.lkt:20392
--# expr-start 11730 '<Find at nodes.lkt:20392:25>' Find_Result_1 ada/nodes.lkt:20392
   --# expr-start 11728 '<FieldAccess for parents at nodes.lkt:20392:25>' Fld_10 ada/nodes.lkt:20392
      if Local_Rd.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Parents (Node => Local_Rd.Node, With_Self => True, E_Info => Local_Rd.Info);
--# expr-done 11728
      Find_Result_1 := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_10;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_3
      --# expr-start 11729 '<IsA ProtectedTypeDecl at nodes.lkt:20392:50>' Is_A_2 ada/nodes.lkt:20392
Is_A_2 := Item_3.Node /= null 
and then Item_3.Node.Kind in Ada_Protected_Type_Decl_Range; 
--# expr-done 11729
      if Is_A_2 then
         Find_Result_1 := Item_3; 
      end if;
   --# end
               exit when Is_A_2;
         end loop;
      end;
--# expr-done 11730
Is_Null := Find_Result_1.Node = null; 
--# expr-done 11731
Not_Val := not (Is_Null); 
--# expr-done 11732
   If_Result_2 := Not_Val;
else
   If_Result_2 := False;
end if;
--# expr-done 11733
Scope_Result_1 := If_Result_2;
   --# end
      Finalizer_Scope_3447;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result_3 := Result_Var_1;
end if;
--# expr-done 11734
Let_Result := If_Result_3; 
--# end
--# expr-done 11735
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_276;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_276;
                     Finalizer_Scope_3447;
            raise;
      end;
   return Property_Result;
end Identifier_P_Is_Constant;
--# end
   --
   --  Primitives for Bare_Op
   --
      procedure Initialize_Fields_For_Op
        (Self : Bare_Op
        ) is
      begin
            Initialize_Fields_For_Base_Id
              (Self);
      end Initialize_Fields_For_Op;
--# property-start Op.subprogram_symbol ada/nodes.lkt:20432
pragma Warnings (Off, "is not referenced");
 function Op_P_Subprogram_Symbol
  (Node : Bare_Op
  )
   return Symbol_Type
is
   Self : Bare_Op  := Bare_Op (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Match_0 : Bare_Op_And;
Match_1 : Bare_Op_Or;
Match_2 : Bare_Op_Xor;
Match_3 : Bare_Op_Abs;
Match_4 : Bare_Op_Not;
Match_5 : Bare_Op_Pow;
Match_6 : Bare_Op_Mult;
Match_7 : Bare_Op_Div;
Match_8 : Bare_Op_Mod;
Match_9 : Bare_Op_Rem;
Match_10 : Bare_Op_Plus;
Match_11 : Bare_Op_Minus;
Match_12 : Bare_Op_Concat;
Match_13 : Bare_Op_Eq;
Match_14 : Bare_Op_Neq;
Match_15 : Bare_Op_Lt;
Match_16 : Bare_Op_Lte;
Match_17 : Bare_Op_Gt;
Match_18 : Bare_Op_Gte;
Match_19 : Bare_Op;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Sym_10 : Symbol_Type;
Sym_11 : Symbol_Type;
Sym_12 : Symbol_Type;
Sym_13 : Symbol_Type;
Sym_14 : Symbol_Type;
Sym_15 : Symbol_Type;
Sym_16 : Symbol_Type;
Sym_17 : Symbol_Type;
Sym_18 : Symbol_Type;
Sym_19 : Symbol_Type;
Match_Prefix : Bare_Op;
Cast_Result : Bare_Op_And;
Let_Result : Symbol_Type;
Scope_Result : Symbol_Type;
Cast_Result_1 : Bare_Op_Or;
Let_Result_1 : Symbol_Type;
Scope_Result_1 : Symbol_Type;
Cast_Result_2 : Bare_Op_Xor;
Let_Result_2 : Symbol_Type;
Scope_Result_2 : Symbol_Type;
Cast_Result_3 : Bare_Op_Abs;
Let_Result_3 : Symbol_Type;
Scope_Result_3 : Symbol_Type;
Cast_Result_4 : Bare_Op_Not;
Let_Result_4 : Symbol_Type;
Scope_Result_4 : Symbol_Type;
Cast_Result_5 : Bare_Op_Pow;
Let_Result_5 : Symbol_Type;
Scope_Result_5 : Symbol_Type;
Cast_Result_6 : Bare_Op_Mult;
Let_Result_6 : Symbol_Type;
Scope_Result_6 : Symbol_Type;
Cast_Result_7 : Bare_Op_Div;
Let_Result_7 : Symbol_Type;
Scope_Result_7 : Symbol_Type;
Cast_Result_8 : Bare_Op_Mod;
Let_Result_8 : Symbol_Type;
Scope_Result_8 : Symbol_Type;
Cast_Result_9 : Bare_Op_Rem;
Let_Result_9 : Symbol_Type;
Scope_Result_9 : Symbol_Type;
Cast_Result_10 : Bare_Op_Plus;
Let_Result_10 : Symbol_Type;
Scope_Result_10 : Symbol_Type;
Cast_Result_11 : Bare_Op_Minus;
Let_Result_11 : Symbol_Type;
Scope_Result_11 : Symbol_Type;
Cast_Result_12 : Bare_Op_Concat;
Let_Result_12 : Symbol_Type;
Scope_Result_12 : Symbol_Type;
Cast_Result_13 : Bare_Op_Eq;
Let_Result_13 : Symbol_Type;
Scope_Result_13 : Symbol_Type;
Cast_Result_14 : Bare_Op_Neq;
Let_Result_14 : Symbol_Type;
Scope_Result_14 : Symbol_Type;
Cast_Result_15 : Bare_Op_Lt;
Let_Result_15 : Symbol_Type;
Scope_Result_15 : Symbol_Type;
Cast_Result_16 : Bare_Op_Lte;
Let_Result_16 : Symbol_Type;
Scope_Result_16 : Symbol_Type;
Cast_Result_17 : Bare_Op_Gt;
Let_Result_17 : Symbol_Type;
Scope_Result_17 : Symbol_Type;
Cast_Result_18 : Bare_Op_Gte;
Let_Result_18 : Symbol_Type;
Scope_Result_18 : Symbol_Type;
Cast_Result_19 : Bare_Op;
Let_Result_19 : Symbol_Type;
Scope_Result_19 : Symbol_Type;
Match_Result : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11756 '<Match at nodes.lkt:20432:39>' Match_Result ada/nodes.lkt:20432
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Self; 
case Ada_Op (Match_Prefix.Kind) is
         when Ada_Op_And =>
   --# scope-start
--# scope-start
      Cast_Result := Match_Prefix;
Match_0 := Cast_Result; 
--# bind _ Match_0
--# expr-start 11736 '<Symbol "and" at nodes.lkt:20433:27>' Sym ada/nodes.lkt:20433
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_And); 
--# expr-done 11736
Let_Result := Sym; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Op_Or =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_1 := Cast_Result_1; 
--# bind _ Match_1
--# expr-start 11737 '<Symbol "or" at nodes.lkt:20434:26>' Sym_1 ada/nodes.lkt:20434
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Or); 
--# expr-done 11737
Let_Result_1 := Sym_1; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Op_Xor =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_2 := Cast_Result_2; 
--# bind _ Match_2
--# expr-start 11738 '<Symbol "xor" at nodes.lkt:20435:27>' Sym_2 ada/nodes.lkt:20435
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Xor); 
--# expr-done 11738
Let_Result_2 := Sym_2; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Op_Abs =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_3 := Cast_Result_3; 
--# bind _ Match_3
--# expr-start 11739 '<Symbol "abs" at nodes.lkt:20436:27>' Sym_3 ada/nodes.lkt:20436
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs); 
--# expr-done 11739
Let_Result_3 := Sym_3; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result := Scope_Result_3; 
         when Ada_Op_Not =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix;
Match_4 := Cast_Result_4; 
--# bind _ Match_4
--# expr-start 11740 '<Symbol "not" at nodes.lkt:20437:27>' Sym_4 ada/nodes.lkt:20437
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Not); 
--# expr-done 11740
Let_Result_4 := Sym_4; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result := Scope_Result_4; 
         when Ada_Op_Pow =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Match_Prefix;
Match_5 := Cast_Result_5; 
--# bind _ Match_5
--# expr-start 11741 '<Symbol "**" at nodes.lkt:20438:27>' Sym_5 ada/nodes.lkt:20438
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_3); 
--# expr-done 11741
Let_Result_5 := Sym_5; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result := Scope_Result_5; 
         when Ada_Op_Mult =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Match_Prefix;
Match_6 := Cast_Result_6; 
--# bind _ Match_6
--# expr-start 11742 '<Symbol "*" at nodes.lkt:20439:28>' Sym_6 ada/nodes.lkt:20439
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 11742
Let_Result_6 := Sym_6; 
--# end
Scope_Result_6 := Let_Result_6;
   --# end
            Match_Result := Scope_Result_6; 
         when Ada_Op_Div =>
   --# scope-start
--# scope-start
      Cast_Result_7 := Match_Prefix;
Match_7 := Cast_Result_7; 
--# bind _ Match_7
--# expr-start 11743 '<Symbol "/" at nodes.lkt:20440:27>' Sym_7 ada/nodes.lkt:20440
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 11743
Let_Result_7 := Sym_7; 
--# end
Scope_Result_7 := Let_Result_7;
   --# end
            Match_Result := Scope_Result_7; 
         when Ada_Op_Mod =>
   --# scope-start
--# scope-start
      Cast_Result_8 := Match_Prefix;
Match_8 := Cast_Result_8; 
--# bind _ Match_8
--# expr-start 11744 '<Symbol "mod" at nodes.lkt:20441:27>' Sym_8 ada/nodes.lkt:20441
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mod); 
--# expr-done 11744
Let_Result_8 := Sym_8; 
--# end
Scope_Result_8 := Let_Result_8;
   --# end
            Match_Result := Scope_Result_8; 
         when Ada_Op_Rem =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Match_Prefix;
Match_9 := Cast_Result_9; 
--# bind _ Match_9
--# expr-start 11745 '<Symbol "rem" at nodes.lkt:20442:27>' Sym_9 ada/nodes.lkt:20442
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Rem); 
--# expr-done 11745
Let_Result_9 := Sym_9; 
--# end
Scope_Result_9 := Let_Result_9;
   --# end
            Match_Result := Scope_Result_9; 
         when Ada_Op_Plus =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Match_Prefix;
Match_10 := Cast_Result_10; 
--# bind _ Match_10
--# expr-start 11746 '<Symbol "+" at nodes.lkt:20443:28>' Sym_10 ada/nodes.lkt:20443
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 11746
Let_Result_10 := Sym_10; 
--# end
Scope_Result_10 := Let_Result_10;
   --# end
            Match_Result := Scope_Result_10; 
         when Ada_Op_Minus =>
   --# scope-start
--# scope-start
      Cast_Result_11 := Match_Prefix;
Match_11 := Cast_Result_11; 
--# bind _ Match_11
--# expr-start 11747 '<Symbol "-" at nodes.lkt:20444:29>' Sym_11 ada/nodes.lkt:20444
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 11747
Let_Result_11 := Sym_11; 
--# end
Scope_Result_11 := Let_Result_11;
   --# end
            Match_Result := Scope_Result_11; 
         when Ada_Op_Concat =>
   --# scope-start
--# scope-start
      Cast_Result_12 := Match_Prefix;
Match_12 := Cast_Result_12; 
--# bind _ Match_12
--# expr-start 11748 '<Symbol "&" at nodes.lkt:20445:30>' Sym_12 ada/nodes.lkt:20445
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym); 
--# expr-done 11748
Let_Result_12 := Sym_12; 
--# end
Scope_Result_12 := Let_Result_12;
   --# end
            Match_Result := Scope_Result_12; 
         when Ada_Op_Eq =>
   --# scope-start
--# scope-start
      Cast_Result_13 := Match_Prefix;
Match_13 := Cast_Result_13; 
--# bind _ Match_13
--# expr-start 11749 '<Symbol "=" at nodes.lkt:20446:26>' Sym_13 ada/nodes.lkt:20446
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 11749
Let_Result_13 := Sym_13; 
--# end
Scope_Result_13 := Let_Result_13;
   --# end
            Match_Result := Scope_Result_13; 
         when Ada_Op_Neq =>
   --# scope-start
--# scope-start
      Cast_Result_14 := Match_Prefix;
Match_14 := Cast_Result_14; 
--# bind _ Match_14
--# expr-start 11750 '<Symbol "/=" at nodes.lkt:20447:27>' Sym_14 ada/nodes.lkt:20447
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 11750
Let_Result_14 := Sym_14; 
--# end
Scope_Result_14 := Let_Result_14;
   --# end
            Match_Result := Scope_Result_14; 
         when Ada_Op_Lt =>
   --# scope-start
--# scope-start
      Cast_Result_15 := Match_Prefix;
Match_15 := Cast_Result_15; 
--# bind _ Match_15
--# expr-start 11751 '<Symbol "<" at nodes.lkt:20448:26>' Sym_15 ada/nodes.lkt:20448
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 11751
Let_Result_15 := Sym_15; 
--# end
Scope_Result_15 := Let_Result_15;
   --# end
            Match_Result := Scope_Result_15; 
         when Ada_Op_Lte =>
   --# scope-start
--# scope-start
      Cast_Result_16 := Match_Prefix;
Match_16 := Cast_Result_16; 
--# bind _ Match_16
--# expr-start 11752 '<Symbol "<=" at nodes.lkt:20449:27>' Sym_16 ada/nodes.lkt:20449
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 11752
Let_Result_16 := Sym_16; 
--# end
Scope_Result_16 := Let_Result_16;
   --# end
            Match_Result := Scope_Result_16; 
         when Ada_Op_Gt =>
   --# scope-start
--# scope-start
      Cast_Result_17 := Match_Prefix;
Match_17 := Cast_Result_17; 
--# bind _ Match_17
--# expr-start 11753 '<Symbol ">" at nodes.lkt:20450:26>' Sym_17 ada/nodes.lkt:20450
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 11753
Let_Result_17 := Sym_17; 
--# end
Scope_Result_17 := Let_Result_17;
   --# end
            Match_Result := Scope_Result_17; 
         when Ada_Op_Gte =>
   --# scope-start
--# scope-start
      Cast_Result_18 := Match_Prefix;
Match_18 := Cast_Result_18; 
--# bind _ Match_18
--# expr-start 11754 '<Symbol ">=" at nodes.lkt:20451:27>' Sym_18 ada/nodes.lkt:20451
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 11754
Let_Result_18 := Sym_18; 
--# end
Scope_Result_18 := Let_Result_18;
   --# end
            Match_Result := Scope_Result_18; 
         when Ada_Op_And_Then | Ada_Op_Double_Dot | Ada_Op_In | Ada_Op_Not_In | Ada_Op_Or_Else =>
   --# scope-start
--# scope-start
      Cast_Result_19 := Match_Prefix;
Match_19 := Cast_Result_19; 
--# bind _ Match_19
--# expr-start 11755 '<Symbol <<>> at nodes.lkt:20452:19>' Sym_19 ada/nodes.lkt:20452
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_20); 
--# expr-done 11755
Let_Result_19 := Sym_19; 
--# end
Scope_Result_19 := Let_Result_19;
   --# end
            Match_Result := Scope_Result_19; 
end case;
--# expr-done 11756
         Property_Result := Match_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Op_P_Subprogram_Symbol;
--# end
--# property-start Op.subprograms_for_symbol ada/nodes.lkt:20459
pragma Warnings (Off, "is not referenced");
 function Op_P_Subprograms_For_Symbol
  (Node : Bare_Op
      ; Sym : Symbol_Type
      ; From_Node : Internal_Entity
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Op  := Bare_Op (Node);
      --# bind self Self
   --# bind sym Sym
   --# bind from_node From_Node
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_1315 with Inline_Always;
      Fld : Internal_Entity_Basic_Decl_Array_Access;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Bare_Ada_Node;
Fld_3 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_4 : Boolean;
Cast_Expr_2 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Basic_Decl;
Fld_5 : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
Map_Result : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_1315 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_1315;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11757 '<FieldAccess for root_type_ops at nodes.lkt:20463:9>' Fld ada/nodes.lkt:20463
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_type_ops
Fld := Libadalang.Implementation.Ada_Node_P_Root_Type_Ops (Node => Self, Sym => Sym);
--# end
--# expr-done 11757
--# expr-start 11768 '<Map at nodes.lkt:20464:11>' Map_Result ada/nodes.lkt:20464
   --# expr-start 11760 '<FieldAccess for env_get at nodes.lkt:20464:11>' Fld_3 ada/nodes.lkt:20464
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11758 '<FieldAccess for node_env at nodes.lkt:20464:24>' Fld_1 ada/nodes.lkt:20464
      if From_Node.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Node_Env (Node => From_Node.Node, E_Info => From_Node.Info);
--# expr-done 11758
--# expr-start 11759 '<FieldAccess for node at nodes.lkt:20464:59>' Fld_2 ada/nodes.lkt:20464
Fld_2 := From_Node.Node;
--# expr-done 11759
--# property-call-start AdaNode.env_get
Fld_3 := Libadalang.Implementation.Ada_Node_P_Env_Get (Node => Self, Env => Fld_1, Symbol => Sym, From_Node => Fld_2);
--# end
--# expr-done 11760
      declare
         Map_Result_Vec : Internal_Entity_Basic_Decl_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_3;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
         --# expr-start 11766 '<BooleanBinaryOp And at nodes.lkt:20468:13>' If_Result ada/nodes.lkt:20468
--# expr-start 11762 '<FieldAccess for is_subprogram at nodes.lkt:20468:13>' Fld_4 ada/nodes.lkt:20468
--# expr-start 11761 '<Cast to BasicDecl at nodes.lkt:20468:13>' Cast_Result_1 ada/nodes.lkt:20468
Cast_Expr_1 := Item_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11761
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_subprogram
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Is_Subprogram (Node => Cast_Result_1.Node);
--# end
--# expr-done 11762
if Fld_4 then
   --# expr-start 11765 '<Not at nodes.lkt:20479:17>' Not_Val ada/nodes.lkt:20479
--# expr-start 11764 '<FieldAccess for is_predefined_operator at nodes.lkt:20479:21>' Fld_5 ada/nodes.lkt:20479
--# expr-start 11763 '<Cast to BasicDecl at nodes.lkt:20479:21>' Cast_Result_2 ada/nodes.lkt:20479
Cast_Expr_2 := Item_0; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11763
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_predefined_operator
Fld_5 := Libadalang.Implementation.Basic_Decl_P_Is_Predefined_Operator (Node => Cast_Result_2.Node);
--# end
--# expr-done 11764
Not_Val := not (Fld_5); 
--# expr-done 11765
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 11766
         if If_Result then
      --# expr-start 11767 '<Cast to BasicDecl at nodes.lkt:20466:20>' Cast_Result ada/nodes.lkt:20466
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11767
         declare
            Item_To_Append : constant Internal_Entity_Basic_Decl := Cast_Result;
         begin
            Internal_Entity_Basic_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Basic_Decl_Array
           (Items_Count => Natural (Internal_Entity_Basic_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Basic_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Basic_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Basic_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11768
Concat_Result := Concat (Fld, Map_Result); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1315;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1315;
            raise;
      end;
   return Property_Result;
end Op_P_Subprograms_For_Symbol;
--# end
--# property-start Op.subprograms ada/nodes.lkt:20485
pragma Warnings (Off, "is not referenced");
 function Op_P_Subprograms
  (Node : Bare_Op
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Op  := Bare_Op (Node);
     Ent : Internal_Entity_Op :=
       Internal_Entity_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_1316 with Inline_Always;
      Fld : Symbol_Type;
Cast_Expr : Internal_Entity_Op;
Cast_Result : Internal_Entity;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_1316 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1316;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11770 '<FieldAccess for subprograms_for_symbol at nodes.lkt:20486:9>' Fld_1 ada/nodes.lkt:20486
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11769 '<FieldAccess for subprogram_symbol at nodes.lkt:20486:37>' Fld ada/nodes.lkt:20486
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Op.subprogram_symbol
Fld := Libadalang.Implementation.Op_P_Subprogram_Symbol (Node => Self);
--# end
--# expr-done 11769
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# property-call-start Op.subprograms_for_symbol
Fld_1 := Libadalang.Implementation.Op_P_Subprograms_For_Symbol (Node => Self, Sym => Fld, From_Node => Cast_Result);
--# end
--# expr-done 11770
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1316;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1316;
            raise;
      end;
   return Property_Result;
end Op_P_Subprograms;
--# end
--# property-start Op.name_symbol ada/nodes.lkt:20488
pragma Warnings (Off, "is not referenced");
 function Op_P_Name_Symbol
  (Node : Bare_Op
  )
   return Symbol_Type
is
   Self : Bare_Op  := Bare_Op (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Fld : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11771 '<FieldAccess for subprogram_symbol at nodes.lkt:20488:33>' Fld ada/nodes.lkt:20488
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Op.subprogram_symbol
Fld := Libadalang.Implementation.Op_P_Subprogram_Symbol (Node => Self);
--# end
--# expr-done 11771
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Op_P_Name_Symbol;
--# end
--# property-start Op.xref_equation ada/nodes.lkt:20491
pragma Warnings (Off, "is not referenced");
 function Op_P_Xref_Equation
  (Node : Bare_Op
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Op  := Bare_Op (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1318 with Inline_Always;
      False_Rel : Logic_Equation;
            procedure Finalizer_Scope_1318 is
            begin
                     Dec_Ref (False_Rel);
            end Finalizer_Scope_1318;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20494:9") else null)); 
         Property_Result := False_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1318;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1318;
            raise;
      end;
   return Property_Result;
end Op_P_Xref_Equation;
--# end
--# property-start Op.is_dispatching_call ada/nodes.lkt:20497
pragma Warnings (Off, "is not referenced");
 function Op_P_Is_Dispatching_Call
  (Node : Bare_Op
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Op  := Bare_Op (Node);
     Ent : Internal_Entity_Op :=
       Internal_Entity_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
            procedure Finalizer_Scope_3470 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Match_0 : Internal_Entity_Concat_Op;
Match_1 : Internal_Entity_Expr;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Cast_Result : Internal_Entity_Expr;
Fld_2 : Boolean;
Match_Prefix : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Concat_Op;
Let_Result : Boolean;
Scope_Result : Boolean;
Cast_Result_2 : Internal_Entity_Expr;
Let_Result_1 : Boolean;
Scope_Result_1 : Boolean;
Match_Result : Boolean;
Scope_Result_2 : Boolean;
Result_Var : Boolean;
            procedure Finalizer_Scope_3470 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3470;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 11772 '<FieldAccess for referenced_decl at nodes.lkt:20498:9>' Fld ada/nodes.lkt:20498
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Ent.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Ent.Info);
--# end
--# expr-done 11772
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind decl Var_Expr_0
--# expr-start 11778 '<Match at nodes.lkt:20502:13>' Match_Result ada/nodes.lkt:20502
--# expr-start 11776 '<Cast to Expr at nodes.lkt:20503:17>' Cast_Result ada/nodes.lkt:20503
--# expr-start 11775 '<Find at nodes.lkt:20503:17>' Find_Result ada/nodes.lkt:20503
   --# expr-start 11773 '<FieldAccess for parents at nodes.lkt:20503:17>' Fld_1 ada/nodes.lkt:20503
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 11773
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_1;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_1
      --# expr-start 11774 '<IsA BinOp, ConcatOp, UnOp at nodes.lkt:20503:44>' Is_A ada/nodes.lkt:20503
Is_A := Item_1.Node /= null 
and then Item_1.Node.Kind in Ada_Bin_Op_Range | Ada_Concat_Op_Range | Ada_Un_Op_Range; 
--# expr-done 11774
      if Is_A then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 11775
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Expr
   then
      Cast_Result := Create_Internal_Entity_Expr
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11776
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Cast_Result; 
case Ada_Expr (Match_Prefix.Node.Kind) is
         when Ada_Concat_Op =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Concat_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_1; 
--# bind _ Match_0
Let_Result := False; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Abstract_State_Decl_Expr .. Ada_Case_Expr_Alternative | Ada_Concat_Operand .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_2; 
--# bind e Match_1
--# expr-start 11777 '<FieldAccess for is_dispatching_call_impl at nodes.lkt:20509:27>' Fld_2 ada/nodes.lkt:20509
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_dispatching_call_impl
Fld_2 := Libadalang.Implementation.Expr_P_Is_Dispatching_Call_Impl (Node => Match_1.Node, Decl => Var_Expr_0, Imprecise_Fallback => Imprecise_Fallback, E_Info => Match_1.Info);
--# end
--# expr-done 11777
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
end case;
--# expr-done 11778
Scope_Result_2 := Match_Result;
   --# end
      Finalizer_Scope_3470;
   Result_Var := Scope_Result_2;
else
   Result_Var := False;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_3470;
            raise;
      end;
   return Property_Result;
end Op_P_Is_Dispatching_Call;
--# end
   --
   --  Primitives for Bare_Op_Abs
   --
      procedure Initialize_Fields_For_Op_Abs
        (Self : Bare_Op_Abs
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Abs;
   --
   --  Primitives for Bare_Op_And
   --
      procedure Initialize_Fields_For_Op_And
        (Self : Bare_Op_And
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_And;
   --
   --  Primitives for Bare_Op_And_Then
   --
      procedure Initialize_Fields_For_Op_And_Then
        (Self : Bare_Op_And_Then
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_And_Then;
   --
   --  Primitives for Bare_Op_Concat
   --
      procedure Initialize_Fields_For_Op_Concat
        (Self : Bare_Op_Concat
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Concat;
   --
   --  Primitives for Bare_Op_Div
   --
      procedure Initialize_Fields_For_Op_Div
        (Self : Bare_Op_Div
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Div;
   --
   --  Primitives for Bare_Op_Double_Dot
   --
      procedure Initialize_Fields_For_Op_Double_Dot
        (Self : Bare_Op_Double_Dot
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Double_Dot;
   --
   --  Primitives for Bare_Op_Eq
   --
      procedure Initialize_Fields_For_Op_Eq
        (Self : Bare_Op_Eq
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Eq;
   --
   --  Primitives for Bare_Op_Gt
   --
      procedure Initialize_Fields_For_Op_Gt
        (Self : Bare_Op_Gt
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Gt;
   --
   --  Primitives for Bare_Op_Gte
   --
      procedure Initialize_Fields_For_Op_Gte
        (Self : Bare_Op_Gte
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Gte;
   --
   --  Primitives for Bare_Op_In
   --
      procedure Initialize_Fields_For_Op_In
        (Self : Bare_Op_In
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_In;
   --
   --  Primitives for Bare_Op_Lt
   --
      procedure Initialize_Fields_For_Op_Lt
        (Self : Bare_Op_Lt
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Lt;
   --
   --  Primitives for Bare_Op_Lte
   --
      procedure Initialize_Fields_For_Op_Lte
        (Self : Bare_Op_Lte
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Lte;
   --
   --  Primitives for Bare_Op_Minus
   --
      procedure Initialize_Fields_For_Op_Minus
        (Self : Bare_Op_Minus
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Minus;
   --
   --  Primitives for Bare_Op_Mod
   --
      procedure Initialize_Fields_For_Op_Mod
        (Self : Bare_Op_Mod
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Mod;
   --
   --  Primitives for Bare_Op_Mult
   --
      procedure Initialize_Fields_For_Op_Mult
        (Self : Bare_Op_Mult
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Mult;
   --
   --  Primitives for Bare_Op_Neq
   --
      procedure Initialize_Fields_For_Op_Neq
        (Self : Bare_Op_Neq
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Neq;
   --
   --  Primitives for Bare_Op_Not
   --
      procedure Initialize_Fields_For_Op_Not
        (Self : Bare_Op_Not
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Not;
   --
   --  Primitives for Bare_Op_Not_In
   --
      procedure Initialize_Fields_For_Op_Not_In
        (Self : Bare_Op_Not_In
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Not_In;
   --
   --  Primitives for Bare_Op_Or
   --
      procedure Initialize_Fields_For_Op_Or
        (Self : Bare_Op_Or
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Or;
   --
   --  Primitives for Bare_Op_Or_Else
   --
      procedure Initialize_Fields_For_Op_Or_Else
        (Self : Bare_Op_Or_Else
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Or_Else;
   --
   --  Primitives for Bare_Op_Plus
   --
      procedure Initialize_Fields_For_Op_Plus
        (Self : Bare_Op_Plus
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Plus;
   --
   --  Primitives for Bare_Op_Pow
   --
      procedure Initialize_Fields_For_Op_Pow
        (Self : Bare_Op_Pow
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Pow;
   --
   --  Primitives for Bare_Op_Rem
   --
      procedure Initialize_Fields_For_Op_Rem
        (Self : Bare_Op_Rem
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Rem;
   --
   --  Primitives for Bare_Op_Xor
   --
      procedure Initialize_Fields_For_Op_Xor
        (Self : Bare_Op_Xor
        ) is
      begin
            Initialize_Fields_For_Op
              (Self);
      end Initialize_Fields_For_Op_Xor;
   --
   --  Primitives for Bare_String_Literal
   --
      procedure Initialize_Fields_For_String_Literal
        (Self : Bare_String_Literal
        ) is
      begin
            Initialize_Fields_For_Base_Id
              (Self);
      end Initialize_Fields_For_String_Literal;
--# property-start StringLiteral.has_context_free_type ada/nodes.lkt:20522
pragma Warnings (Off, "is not referenced");
 function String_Literal_P_Has_Context_Free_Type
  (Node : Bare_String_Literal
  )
   return Boolean
is
   Self : Bare_String_Literal  := Bare_String_Literal (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end String_Literal_P_Has_Context_Free_Type;
--# end
--# property-start StringLiteral.env_elements_impl ada/nodes.lkt:20528
pragma Warnings (Off, "is not referenced");
 function String_Literal_P_Env_Elements_Impl
  (Node : Bare_String_Literal
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Array_Access
is
   Self : Bare_String_Literal  := Bare_String_Literal (Node);
     Ent : Internal_Entity_String_Literal :=
       Internal_Entity_String_Literal'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   Property_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1322 with Inline_Always;
      Sym : Symbol_Type;
Fld : Internal_Entity_Basic_Decl_Array_Access;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Map_Result : Internal_Entity_Array_Access;
Fld_1 : Internal_Entity_Array_Access;
Concat_Result : Internal_Entity_Array_Access;
            procedure Finalizer_Scope_1322 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_1322;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11782 '<Map at nodes.lkt:20529:9>' Map_Result ada/nodes.lkt:20529
   --# expr-start 11780 '<FieldAccess for root_type_ops at nodes.lkt:20529:9>' Fld ada/nodes.lkt:20529
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11779 '<GetSymbol at nodes.lkt:20529:28>' Sym ada/nodes.lkt:20529
Sym := Get_Symbol (Self); 
--# expr-done 11779
--# property-call-start AdaNode.root_type_ops
Fld := Libadalang.Implementation.Ada_Node_P_Root_Type_Ops (Node => Self, Sym => Sym);
--# end
--# expr-done 11780
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind bd Item_0
      --# expr-start 11781 '<Cast to AdaNode at nodes.lkt:20529:53>' Cast_Result ada/nodes.lkt:20529
Cast_Expr := Item_0; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-done 11781
         declare
            Item_To_Append : constant Internal_Entity := Cast_Result;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11782
--# expr-start 11783 '<Super at nodes.lkt:20530:11>' Fld_1 ada/nodes.lkt:20530
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseId.env_elements_impl
Fld_1 := Libadalang.Implementation.Base_Id_P_Env_Elements_Impl (Node => Ent.Node, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 11783
Concat_Result := Concat (Map_Result, Fld_1); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1322;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1322;
            raise;
      end;
   return Property_Result;
end String_Literal_P_Env_Elements_Impl;
--# end
--# property-start StringLiteral.xref_equation ada/nodes.lkt:20533
pragma Warnings (Off, "is not referenced");
 function String_Literal_P_Xref_Equation
  (Node : Bare_String_Literal
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_String_Literal  := Bare_String_Literal (Node);
     Ent : Internal_Entity_String_Literal :=
       Internal_Entity_String_Literal'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1323 with Inline_Always;
      Fld : Logic_Equation;
Fld_1 : Logic_Var;
Fld_2 : Logic_Var;
Bind_Result : Logic_Equation;
Cast_Expr : Bare_String_Literal;
Cast_Result : Bare_Ada_Node;
Bound_Error_Location : Bare_Ada_Node;
Fld_3 : Logic_Var;
Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Cast_Expr_1 : Bare_String_Literal;
Cast_Result_1 : Bare_Ada_Node;
Bound_Error_Location_1 : Bare_Ada_Node;
Fld_4 : Logic_Var;
Pred_1 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_5 : Bare_Ada_Node;
Is_A : Boolean;
If_Result : Logic_Equation;
            procedure Finalizer_Scope_1323 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Pred_1);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_1323;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11798 '<If at nodes.lkt:20536:9>' If_Result ada/nodes.lkt:20536
--# expr-start 11785 '<IsA Name at nodes.lkt:20536:12>' Is_A ada/nodes.lkt:20536
--# expr-start 11784 '<parent at nodes.lkt:20536:12>' Fld_5 ada/nodes.lkt:20536
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Parent; 
--# expr-done 11784
Is_A := Fld_5 /= null 
and then Fld_5.Kind in Ada_Name; 
--# expr-done 11785
if Is_A then
   --# expr-start 11786 '<Super at nodes.lkt:20536:37>' Fld ada/nodes.lkt:20536
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseId.xref_equation
Fld := Libadalang.Implementation.Base_Id_P_Xref_Equation (Node => Ent.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Ent.Info);
--# end
--# expr-done 11786
   If_Result := Fld;
else
   --# expr-start 11797 '<LogicBinaryOp And at nodes.lkt:20538:13>' And_Pred_1 ada/nodes.lkt:20538
--# expr-start 11793 '<LogicBinaryOp And at nodes.lkt:20539:17>' And_Pred ada/nodes.lkt:20539
--# expr-start 11789 '<Bind at nodes.lkt:20539:17>' Bind_Result ada/nodes.lkt:20539
--# expr-start 11787 '<FieldAccess for expected_type_var at nodes.lkt:20539:17>' Fld_1 ada/nodes.lkt:20539
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11787
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 11788 '<FieldAccess for type_var at nodes.lkt:20539:46>' Fld_2 ada/nodes.lkt:20539
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11788
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result := Solver.Create_Unify (Fld_1, Fld_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20539:17") else null)); 
--# expr-done 11789
--# expr-start 11792 '<bind at nodes.lkt:20541:21>' Dyn_Var_Bind_Result ada/nodes.lkt:20541
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Error_Location := Cast_Result; 
--# expr-start 11791 '<Predicate on BaseTypeDecl.is_not_any_type at nodes.lkt:20542:21>' Pred ada/nodes.lkt:20542
--# expr-start 11790 '<FieldAccess for expected_type_var at nodes.lkt:20542:51>' Fld_3 ada/nodes.lkt:20542
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11790
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Pred := Solver.Create_Predicate (Fld_3, Create_Base_Type_Decl_P_Is_Not_Any_Type_0_Predicate (Bound_Error_Location)); 
--# expr-done 11791
Dyn_Var_Bind_Result := Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11792
And_Pred := Create_And (Bind_Result, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20539:17") else null)); 
--# expr-done 11793
--# expr-start 11796 '<bind at nodes.lkt:20546:17>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:20546
Cast_Expr_1 := Self; 
      Cast_Result_1 := Cast_Expr_1;
Bound_Error_Location_1 := Cast_Result_1; 
--# expr-start 11795 '<Predicate on BaseTypeDecl.allows_string_literal at nodes.lkt:20547:17>' Pred_1 ada/nodes.lkt:20547
--# expr-start 11794 '<FieldAccess for expected_type_var at nodes.lkt:20547:53>' Fld_4 ada/nodes.lkt:20547
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11794
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Pred_1 := Solver.Create_Predicate (Fld_4, Create_Base_Type_Decl_P_Allows_String_Literal_0_Predicate (Origin, Bound_Error_Location_1)); 
--# expr-done 11795
Dyn_Var_Bind_Result_1 := Pred_1; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 11796
And_Pred_1 := Create_And (And_Pred, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20538:13") else null)); 
--# expr-done 11797
   If_Result := And_Pred_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 11798
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1323;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1323;
            raise;
      end;
   return Property_Result;
end String_Literal_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Null_Literal
   --
      procedure Initialize_Fields_For_Null_Literal
        (Self : Bare_Null_Literal
        ) is
      begin
            Initialize_Fields_For_Single_Tok_Node
              (Self);
      end Initialize_Fields_For_Null_Literal;
--# property-start NullLiteral.has_context_free_type ada/nodes.lkt:20554
pragma Warnings (Off, "is not referenced");
 function Null_Literal_P_Has_Context_Free_Type
  (Node : Bare_Null_Literal
  )
   return Boolean
is
   Self : Bare_Null_Literal  := Bare_Null_Literal (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Null_Literal_P_Has_Context_Free_Type;
--# end
--# property-start NullLiteral.xref_equation ada/nodes.lkt:20557
pragma Warnings (Off, "is not referenced");
 function Null_Literal_P_Xref_Equation
  (Node : Bare_Null_Literal
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Null_Literal  := Bare_Null_Literal (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1325 with Inline_Always;
      Fld : Logic_Var;
Pred : Logic_Equation;
Fld_1 : Logic_Var;
Fld_2 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1325 is
            begin
                     Dec_Ref (Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1325;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11804 '<LogicBinaryOp And at nodes.lkt:20558:9>' And_Pred ada/nodes.lkt:20558
--# expr-start 11800 '<Predicate on BaseTypeDecl.is_access_type_predicate at nodes.lkt:20558:9>' Pred ada/nodes.lkt:20558
--# expr-start 11799 '<FieldAccess for expected_type_var at nodes.lkt:20558:48>' Fld ada/nodes.lkt:20558
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11799
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
Pred := Solver.Create_Predicate (Fld, Create_Base_Type_Decl_P_Is_Access_Type_Predicate_0_Predicate (Origin)); 
--# expr-done 11800
--# expr-start 11803 '<Bind at nodes.lkt:20559:14>' Bind_Result ada/nodes.lkt:20559
--# expr-start 11801 '<FieldAccess for expected_type_var at nodes.lkt:20559:14>' Fld_1 ada/nodes.lkt:20559
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11801
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 11802 '<FieldAccess for type_var at nodes.lkt:20559:43>' Fld_2 ada/nodes.lkt:20559
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11802
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
Bind_Result := Solver.Create_Unify (Fld_1, Fld_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20559:14") else null)); 
--# expr-done 11803
And_Pred := Create_And (Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20558:9") else null)); 
--# expr-done 11804
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1325;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1325;
            raise;
      end;
   return Property_Result;
end Null_Literal_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Num_Literal
   --
      procedure Initialize_Fields_For_Num_Literal
        (Self : Bare_Num_Literal
        ) is
      begin
            Initialize_Fields_For_Single_Tok_Node
              (Self);
      end Initialize_Fields_For_Num_Literal;
--# property-start NumLiteral.is_constant ada/nodes.lkt:20566
pragma Warnings (Off, "is not referenced");
 function Num_Literal_P_Is_Constant
  (Node : Bare_Num_Literal
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Num_Literal  := Bare_Num_Literal (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Num_Literal_P_Is_Constant;
--# end
   --
   --  Primitives for Bare_Int_Literal
   --
      procedure Initialize_Fields_For_Int_Literal
        (Self : Bare_Int_Literal
        ) is
      begin
            Initialize_Fields_For_Num_Literal
              (Self);
      end Initialize_Fields_For_Int_Literal;
--# property-start IntLiteral.xref_equation ada/nodes.lkt:20573
pragma Warnings (Off, "is not referenced");
 function Int_Literal_P_Xref_Equation
  (Node : Bare_Int_Literal
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Int_Literal  := Bare_Int_Literal (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1327 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1327 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1327;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11806 '<FieldAccess for universal_int_bind at nodes.lkt:20573:37>' Fld_1 ada/nodes.lkt:20573
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11805 '<FieldAccess for type_var at nodes.lkt:20573:61>' Fld ada/nodes.lkt:20573
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11805
--# property-call-start AdaNode.universal_int_bind
Fld_1 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld, Origin => Origin);
--# end
--# expr-done 11806
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1327;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1327;
            raise;
      end;
   return Property_Result;
end Int_Literal_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Real_Literal
   --
      procedure Initialize_Fields_For_Real_Literal
        (Self : Bare_Real_Literal
        ) is
      begin
            Initialize_Fields_For_Num_Literal
              (Self);
      end Initialize_Fields_For_Real_Literal;
--# property-start RealLiteral.xref_equation ada/nodes.lkt:20585
pragma Warnings (Off, "is not referenced");
 function Real_Literal_P_Xref_Equation
  (Node : Bare_Real_Literal
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Real_Literal  := Bare_Real_Literal (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1329 with Inline_Always;
      Fld : Logic_Var;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1329 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1329;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11808 '<FieldAccess for universal_real_bind at nodes.lkt:20585:37>' Fld_1 ada/nodes.lkt:20585
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11807 '<FieldAccess for type_var at nodes.lkt:20585:62>' Fld ada/nodes.lkt:20585
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11807
--# property-call-start AdaNode.universal_real_bind
Fld_1 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Bind (Node => Self, Type_Var => Fld, Origin => Origin);
--# end
--# expr-done 11808
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1329;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1329;
            raise;
      end;
   return Property_Result;
end Real_Literal_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Synthetic_Identifier
   --
      procedure Initialize_Fields_For_Synthetic_Identifier
        (Self : Bare_Synthetic_Identifier
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
      Self.Synthetic_Identifier_Sym := No_Symbol;
      end Initialize_Fields_For_Synthetic_Identifier;
--# property-start SyntheticIdentifier.name_symbol ada/nodes.lkt:20593
pragma Warnings (Off, "is not referenced");
 function Synthetic_Identifier_P_Name_Symbol
  (Node : Bare_Synthetic_Identifier
  )
   return Symbol_Type
is
   Self : Bare_Synthetic_Identifier  := Bare_Synthetic_Identifier (Node);
      --# bind self Self
   Property_Result : Symbol_Type;
      Fld : Symbol_Type;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11809 '<FieldAccess for sym at nodes.lkt:20593:33>' Fld ada/nodes.lkt:20593
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Synthetic_Identifier_Sym;
--# expr-done 11809
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Identifier_P_Name_Symbol;
--# end
--# property-start SyntheticIdentifier.relative_name ada/nodes.lkt:20595
pragma Warnings (Off, "is not referenced");
 function Synthetic_Identifier_P_Relative_Name
  (Node : Bare_Synthetic_Identifier
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Synthetic_Identifier  := Bare_Synthetic_Identifier (Node);
     Ent : Internal_Entity_Synthetic_Identifier :=
       Internal_Entity_Synthetic_Identifier'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Cast_Expr : Internal_Entity_Synthetic_Identifier;
Cast_Result : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synthetic_Identifier_P_Relative_Name;
--# end
   --
   --  Primitives for Bare_Target_Name
   --
      procedure Initialize_Fields_For_Target_Name
        (Self : Bare_Target_Name
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
      Self.Target_Name_R_Ref_Var := Null_Var_Record;
      end Initialize_Fields_For_Target_Name;
--# property-start TargetName.ref_var ada/nodes.lkt:20602
pragma Warnings (Off, "is not referenced");
 function Target_Name_P_Ref_Var
  (Node : Bare_Target_Name
  )
   return Logic_Var
is
   Self : Bare_Target_Name  := Bare_Target_Name (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11810 '<FieldAccess for r_ref_var at nodes.lkt:20602:31>' Fld ada/nodes.lkt:20602
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Target_Name_R_Ref_Var'Unrestricted_Access;
--# expr-done 11810
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Target_Name_P_Ref_Var;
--# end
--# property-start TargetName.assign_statement ada/nodes.lkt:20604
pragma Warnings (Off, "is not referenced");
 function Target_Name_P_Assign_Statement
  (Node : Bare_Target_Name
  )
   return Bare_Assign_Stmt
is
   Self : Bare_Target_Name  := Bare_Target_Name (Node);
      --# bind self Self
   Property_Result : Bare_Assign_Stmt;
            procedure Finalizer_Scope_1333 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result : Bare_Assign_Stmt;
            procedure Finalizer_Scope_1333 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_1333;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11814 '<Cast to AssignStmt at nodes.lkt:20605:9>' Cast_Result ada/nodes.lkt:20605
--# expr-start 11813 '<Find at nodes.lkt:20605:9>' Find_Result ada/nodes.lkt:20605
   --# expr-start 11811 '<FieldAccess for parents at nodes.lkt:20605:9>' Node_Parents ada/nodes.lkt:20605
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 11811
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 11812 '<IsA AssignStmt at nodes.lkt:20605:36>' Is_A ada/nodes.lkt:20605
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Assign_Stmt_Range; 
--# expr-done 11812
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 11813
   if Find_Result = null
      or else Find_Result.Kind in Ada_Assign_Stmt_Range
   then
      Cast_Result := Find_Result;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11814
         Property_Result := Cast_Result;
   --# end
      Finalizer_Scope_1333;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1333;
            raise;
      end;
   return Property_Result;
end Target_Name_P_Assign_Statement;
--# end
--# property-start TargetName.relative_name ada/nodes.lkt:20607
pragma Warnings (Off, "is not referenced");
 function Target_Name_P_Relative_Name
  (Node : Bare_Target_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Target_Name  := Bare_Target_Name (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Name;
      Fld : Bare_Assign_Stmt;
Fld_1 : Bare_Name;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld_2 : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11818 '<FieldAccess for relative_name at nodes.lkt:20608:9>' Fld_2 ada/nodes.lkt:20608
--# expr-start 11817 '<as_entity at nodes.lkt:20608:9>' If_Result ada/nodes.lkt:20608
--# expr-start 11816 '<FieldAccess for dest at nodes.lkt:20608:9>' Fld_1 ada/nodes.lkt:20608
--# expr-start 11815 '<FieldAccess for assign_statement at nodes.lkt:20608:9>' Fld ada/nodes.lkt:20608
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TargetName.assign_statement
Fld := Libadalang.Implementation.Target_Name_P_Assign_Statement (Node => Self);
--# end
--# expr-done 11815
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Assign_Stmt_F_Dest;
--# expr-done 11816
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 11817
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 11818
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Target_Name_P_Relative_Name;
--# end
--# property-start TargetName.designated_env ada/nodes.lkt:20611
pragma Warnings (Off, "is not referenced");
 function Target_Name_P_Designated_Env
  (Node : Bare_Target_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; No_Visibility : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Target_Name  := Bare_Target_Name (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind no_visibility No_Visibility
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1335 with Inline_Always;
      Fld : Bare_Assign_Stmt;
Fld_1 : Bare_Name;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld_2 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1335 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1335;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11822 '<FieldAccess for designated_env at nodes.lkt:20612:9>' Fld_2 ada/nodes.lkt:20612
--# expr-start 11821 '<as_entity at nodes.lkt:20612:9>' If_Result ada/nodes.lkt:20612
--# expr-start 11820 '<FieldAccess for dest at nodes.lkt:20612:9>' Fld_1 ada/nodes.lkt:20612
--# expr-start 11819 '<FieldAccess for assign_statement at nodes.lkt:20612:9>' Fld ada/nodes.lkt:20612
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TargetName.assign_statement
Fld := Libadalang.Implementation.Target_Name_P_Assign_Statement (Node => Self);
--# end
--# expr-done 11819
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Assign_Stmt_F_Dest;
--# expr-done 11820
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
As_Entity := (Info => E_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 11821
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_2 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => If_Result.Node, Env => Env, Origin => Origin, No_Visibility => No_Visibility, E_Info => If_Result.Info);
--# end
--# expr-done 11822
         Property_Result := Fld_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1335;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1335;
            raise;
      end;
   return Property_Result;
end Target_Name_P_Designated_Env;
--# end
--# property-start TargetName.xref_equation ada/nodes.lkt:20615
pragma Warnings (Off, "is not referenced");
 function Target_Name_P_Xref_Equation
  (Node : Bare_Target_Name
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Target_Name  := Bare_Target_Name (Node);
     Ent : Internal_Entity_Target_Name :=
       Internal_Entity_Target_Name'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1336 with Inline_Always;
      Local_Dest : Bare_Name;
Fld : Bare_Assign_Stmt;
Fld_1 : Bare_Name;
Fld_2 : Logic_Var;
Cast_Expr : Bare_Name;
Cast_Result : Bare_Ada_Node;
Fld_3 : Logic_Var;
Fld_4 : Logic_Equation;
Fld_5 : Logic_Var;
Cast_Expr_1 : Bare_Name;
Cast_Result_1 : Bare_Ada_Node;
Fld_6 : Logic_Var;
Fld_7 : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1336 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1336;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11832 '<Let at nodes.lkt:20620:9>' Let_Result ada/nodes.lkt:20620
--# scope-start
--# expr-start 11824 '<FieldAccess for dest at nodes.lkt:20620:20>' Fld_1 ada/nodes.lkt:20620
--# expr-start 11823 '<FieldAccess for assign_statement at nodes.lkt:20620:20>' Fld ada/nodes.lkt:20620
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TargetName.assign_statement
Fld := Libadalang.Implementation.Target_Name_P_Assign_Statement (Node => Ent.Node);
--# end
--# expr-done 11823
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Assign_Stmt_F_Dest;
--# expr-done 11824
Local_Dest := Fld_1; 
--# bind dest Local_Dest
--# expr-start 11831 '<LogicBinaryOp And at nodes.lkt:20622:9>' And_Pred ada/nodes.lkt:20622
--# expr-start 11827 '<FieldAccess for bind_to_non_local at nodes.lkt:20622:9>' Fld_4 ada/nodes.lkt:20622
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11825 '<FieldAccess for type_var at nodes.lkt:20622:32>' Fld_2 ada/nodes.lkt:20622
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11825
Cast_Expr := Local_Dest; 
      Cast_Result := Cast_Expr;
--# expr-start 11826 '<FieldAccess for type_var at nodes.lkt:20622:55>' Fld_3 ada/nodes.lkt:20622
      if Local_Dest = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Local_Dest);
--# expr-done 11826
--# property-call-start AdaNode.bind_to_non_local
Fld_4 := Libadalang.Implementation.Ada_Node_P_Bind_To_Non_Local (Node => Self, Dest => Fld_2, Outer_Node => Cast_Result, Node_Var => Fld_3, Entry_Point => Entry_Point);
--# end
--# expr-done 11827
--# expr-start 11830 '<FieldAccess for bind_to_non_local at nodes.lkt:20623:14>' Fld_7 ada/nodes.lkt:20623
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11828 '<FieldAccess for ref_var at nodes.lkt:20623:37>' Fld_5 ada/nodes.lkt:20623
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_5 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Self);
--# end
--# expr-done 11828
Cast_Expr_1 := Local_Dest; 
      Cast_Result_1 := Cast_Expr_1;
--# expr-start 11829 '<FieldAccess for ref_var at nodes.lkt:20623:59>' Fld_6 ada/nodes.lkt:20623
      if Local_Dest = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Local_Dest);
--# end
--# expr-done 11829
--# property-call-start AdaNode.bind_to_non_local
Fld_7 := Libadalang.Implementation.Ada_Node_P_Bind_To_Non_Local (Node => Self, Dest => Fld_5, Outer_Node => Cast_Result_1, Node_Var => Fld_6, Entry_Point => Entry_Point);
--# end
--# expr-done 11830
And_Pred := Create_And (Fld_4, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20622:9") else null)); 
--# expr-done 11831
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 11832
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1336;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1336;
            raise;
      end;
   return Property_Result;
end Target_Name_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Update_Attribute_Ref
   --
      procedure Initialize_Fields_For_Update_Attribute_Ref
        (Self : Bare_Update_Attribute_Ref
         ; Update_Attribute_Ref_F_Prefix : Bare_Name
         ; Update_Attribute_Ref_F_Attribute : Bare_Identifier
         ; Update_Attribute_Ref_F_Values : Bare_Base_Aggregate
        ) is
      begin
            Initialize_Fields_For_Name
              (Self);
            Self.Update_Attribute_Ref_F_Prefix := Update_Attribute_Ref_F_Prefix;
            Self.Update_Attribute_Ref_F_Attribute := Update_Attribute_Ref_F_Attribute;
            Self.Update_Attribute_Ref_F_Values := Update_Attribute_Ref_F_Values;
      Self.Update_Attribute_Ref_R_Ref_Var := Null_Var_Record;
      end Initialize_Fields_For_Update_Attribute_Ref;
   function Update_Attribute_Ref_F_Prefix
     (Node : Bare_Update_Attribute_Ref) return Bare_Name
   is
   begin
         return Node.Update_Attribute_Ref_F_Prefix;
   end;
   function Update_Attribute_Ref_F_Attribute
     (Node : Bare_Update_Attribute_Ref) return Bare_Identifier
   is
   begin
         return Node.Update_Attribute_Ref_F_Attribute;
   end;
   function Update_Attribute_Ref_F_Values
     (Node : Bare_Update_Attribute_Ref) return Bare_Base_Aggregate
   is
   begin
         return Node.Update_Attribute_Ref_F_Values;
   end;
--# property-start UpdateAttributeRef.ref_var ada/nodes.lkt:20638
pragma Warnings (Off, "is not referenced");
 function Update_Attribute_Ref_P_Ref_Var
  (Node : Bare_Update_Attribute_Ref
  )
   return Logic_Var
is
   Self : Bare_Update_Attribute_Ref  := Bare_Update_Attribute_Ref (Node);
      --# bind self Self
   Property_Result : Logic_Var;
      Fld : Logic_Var;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11833 '<FieldAccess for r_ref_var at nodes.lkt:20638:31>' Fld ada/nodes.lkt:20638
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Update_Attribute_Ref_R_Ref_Var'Unrestricted_Access;
--# expr-done 11833
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Update_Attribute_Ref_P_Ref_Var;
--# end
--# property-start UpdateAttributeRef.xref_equation ada/nodes.lkt:20641
pragma Warnings (Off, "is not referenced");
 function Update_Attribute_Ref_P_Xref_Equation
  (Node : Bare_Update_Attribute_Ref
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Update_Attribute_Ref  := Bare_Update_Attribute_Ref (Node);
     Ent : Internal_Entity_Update_Attribute_Ref :=
       Internal_Entity_Update_Attribute_Ref'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1338 with Inline_Always;
      Ignored : Boolean;
Local_Prefix_Type : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Name;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Name;
Fld_3 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_4 : Internal_Entity_Base_Aggregate;
Cast_Result_1 : Internal_Entity_Aggregate;
Fld_5 : Logic_Var;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result_2 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_6 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_3 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_1338 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1338;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11847 '<Let at nodes.lkt:20646:9>' Let_Result_1 ada/nodes.lkt:20646
--# scope-start
--# expr-start 11835 '<FieldAccess for resolve_names_internal at nodes.lkt:20646:17>' Fld_1 ada/nodes.lkt:20646
--# expr-start 11834 '<FieldAccess for prefix at nodes.lkt:20646:17>' Fld ada/nodes.lkt:20646
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Update_Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 11834
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_internal
Fld_1 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal (Node => Fld.Node, Generate_Diagnostics => False, Env => Env, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 11835
Ignored := Fld_1; 
--# bind _ Ignored
--# expr-start 11846 '<Let at nodes.lkt:20647:9>' Let_Result ada/nodes.lkt:20647
--# scope-start
--# expr-start 11838 '<Cast to BaseTypeDecl at nodes.lkt:20647:27>' Cast_Result ada/nodes.lkt:20647
--# expr-start 11837 '<FieldAccess for type_val at nodes.lkt:20647:27>' Fld_3 ada/nodes.lkt:20647
--# expr-start 11836 '<FieldAccess for prefix at nodes.lkt:20647:27>' Fld_2 ada/nodes.lkt:20647
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Update_Attribute_Ref_F_Prefix, Info => Ent.Info);
--# expr-done 11836
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_3 := Libadalang.Implementation.Expr_P_Type_Val (Node => Fld_2.Node);
--# end
--# expr-done 11837
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 11838
Local_Prefix_Type := Cast_Result; 
--# bind prefix_type Local_Prefix_Type
--# expr-start 11845 '<LogicBinaryOp And at nodes.lkt:20649:9>' And_Pred ada/nodes.lkt:20649
--# expr-start 11842 '<Bind at nodes.lkt:20649:9>' Bind_Result ada/nodes.lkt:20649
--# expr-start 11841 '<FieldAccess for type_var at nodes.lkt:20649:9>' Fld_5 ada/nodes.lkt:20649
--# expr-start 11840 '<Cast to Aggregate at nodes.lkt:20649:9>' Cast_Result_1 ada/nodes.lkt:20649
--# expr-start 11839 '<FieldAccess for values at nodes.lkt:20649:9>' Fld_4 ada/nodes.lkt:20649
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Base_Aggregate (Node => Ent.Node.Update_Attribute_Ref_F_Values, Info => Ent.Info);
--# expr-done 11839
   if Fld_4.Node = null
      or else Fld_4.Node.Kind in Ada_Aggregate_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Aggregate
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 11840
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Cast_Result_1.Node);
--# expr-done 11841
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Cast_Expr := Local_Prefix_Type; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result_2, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20649:9") else null)); 
--# expr-done 11842
--# expr-start 11844 '<Bind at nodes.lkt:20650:14>' Bind_Result_1 ada/nodes.lkt:20650
--# expr-start 11843 '<FieldAccess for type_var at nodes.lkt:20650:14>' Fld_6 ada/nodes.lkt:20650
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11843
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
Cast_Expr_1 := Local_Prefix_Type; 
      Cast_Result_3 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_6, Cast_Result_3, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20650:14") else null)); 
--# expr-done 11844
And_Pred := Create_And (Bind_Result, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20649:9") else null)); 
--# expr-done 11845
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 11846
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11847
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1338;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1338;
            raise;
      end;
   return Property_Result;
end Update_Attribute_Ref_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Paren_Expr
   --
      procedure Initialize_Fields_For_Paren_Expr
        (Self : Bare_Paren_Expr
         ; Paren_Expr_F_Expr : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Paren_Expr_F_Expr := Paren_Expr_F_Expr;
      end Initialize_Fields_For_Paren_Expr;
   function Paren_Expr_F_Expr
     (Node : Bare_Paren_Expr) return Bare_Expr
   is
   begin
         return Node.Paren_Expr_F_Expr;
   end;
--# property-start ParenExpr.has_context_free_type ada/nodes.lkt:20659
pragma Warnings (Off, "is not referenced");
 function Paren_Expr_P_Has_Context_Free_Type
  (Node : Bare_Paren_Expr
  )
   return Boolean
is
   Self : Bare_Paren_Expr  := Bare_Paren_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Expr;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 11849 '<FieldAccess for has_context_free_type at nodes.lkt:20659:41>' Fld_1 ada/nodes.lkt:20659
--# expr-start 11848 '<FieldAccess for expr at nodes.lkt:20659:41>' Fld ada/nodes.lkt:20659
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Paren_Expr_F_Expr;
--# expr-done 11848
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.has_context_free_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Has_Context_Free_Type (Node => Fld);
--# end
--# expr-done 11849
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Paren_Expr_P_Has_Context_Free_Type;
--# end
--# property-start ParenExpr.xref_equation ada/nodes.lkt:20662
pragma Warnings (Off, "is not referenced");
 function Paren_Expr_P_Xref_Equation
  (Node : Bare_Paren_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Paren_Expr  := Bare_Paren_Expr (Node);
     Ent : Internal_Entity_Paren_Expr :=
       Internal_Entity_Paren_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1340 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Fld_4 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Bare_Expr;
Fld_6 : Logic_Var;
Fld_7 : Logic_Var;
Bind_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1340 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1340;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11861 '<LogicBinaryOp And at nodes.lkt:20663:9>' And_Pred_1 ada/nodes.lkt:20663
--# expr-start 11856 '<LogicBinaryOp And at nodes.lkt:20664:13>' And_Pred ada/nodes.lkt:20664
--# expr-start 11851 '<FieldAccess for sub_equation at nodes.lkt:20664:13>' Fld_1 ada/nodes.lkt:20664
--# expr-start 11850 '<FieldAccess for expr at nodes.lkt:20664:13>' Fld ada/nodes.lkt:20664
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Paren_Expr_F_Expr, Info => Ent.Info);
--# expr-done 11850
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 11851
--# expr-start 11855 '<Bind at nodes.lkt:20665:18>' Bind_Result ada/nodes.lkt:20665
--# expr-start 11853 '<FieldAccess for expected_type_var at nodes.lkt:20665:18>' Fld_3 ada/nodes.lkt:20665
--# expr-start 11852 '<FieldAccess for expr at nodes.lkt:20665:18>' Fld_2 ada/nodes.lkt:20665
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Paren_Expr_F_Expr;
--# expr-done 11852
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2);
--# expr-done 11853
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 11854 '<FieldAccess for expected_type_var at nodes.lkt:20665:52>' Fld_4 ada/nodes.lkt:20665
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11854
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Bind_Result := Solver.Create_Unify (Fld_3, Fld_4, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20665:18") else null)); 
--# expr-done 11855
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20664:13") else null)); 
--# expr-done 11856
--# expr-start 11860 '<Bind at nodes.lkt:20667:14>' Bind_Result_1 ada/nodes.lkt:20667
--# expr-start 11858 '<FieldAccess for type_var at nodes.lkt:20667:14>' Fld_6 ada/nodes.lkt:20667
--# expr-start 11857 '<FieldAccess for expr at nodes.lkt:20667:14>' Fld_5 ada/nodes.lkt:20667
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Paren_Expr_F_Expr;
--# expr-done 11857
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_5);
--# expr-done 11858
Fld_6.Value := No_Entity;
Entity_Vars.Reset (Fld_6);
--# expr-start 11859 '<FieldAccess for type_var at nodes.lkt:20667:39>' Fld_7 ada/nodes.lkt:20667
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11859
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
Bind_Result_1 := Solver.Create_Unify (Fld_6, Fld_7, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20667:14") else null)); 
--# expr-done 11860
And_Pred_1 := Create_And (And_Pred, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20663:9") else null)); 
--# expr-done 11861
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1340;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1340;
            raise;
      end;
   return Property_Result;
end Paren_Expr_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Quantified_Expr
   --
      procedure Quantified_Expr_Pre_Env_Actions
        (Self            : Bare_Quantified_Expr;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_216 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Quantified_Expr
        (Self : Bare_Quantified_Expr
         ; Quantified_Expr_F_Quantifier : Bare_Quantifier
         ; Quantified_Expr_F_Loop_Spec : Bare_For_Loop_Spec
         ; Quantified_Expr_F_Expr : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Quantified_Expr_F_Quantifier := Quantified_Expr_F_Quantifier;
            Self.Quantified_Expr_F_Loop_Spec := Quantified_Expr_F_Loop_Spec;
            Self.Quantified_Expr_F_Expr := Quantified_Expr_F_Expr;
      end Initialize_Fields_For_Quantified_Expr;
   function Quantified_Expr_F_Quantifier
     (Node : Bare_Quantified_Expr) return Bare_Quantifier
   is
   begin
         return Node.Quantified_Expr_F_Quantifier;
   end;
   function Quantified_Expr_F_Loop_Spec
     (Node : Bare_Quantified_Expr) return Bare_For_Loop_Spec
   is
   begin
         return Node.Quantified_Expr_F_Loop_Spec;
   end;
   function Quantified_Expr_F_Expr
     (Node : Bare_Quantified_Expr) return Bare_Expr
   is
   begin
         return Node.Quantified_Expr_F_Expr;
   end;
--# property-start QuantifiedExpr.xref_equation ada/nodes.lkt:20680
pragma Warnings (Off, "is not referenced");
 function Quantified_Expr_P_Xref_Equation
  (Node : Bare_Quantified_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Quantified_Expr  := Bare_Quantified_Expr (Node);
     Ent : Internal_Entity_Quantified_Expr :=
       Internal_Entity_Quantified_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1341 with Inline_Always;
      Local_Spec_Success : Boolean;
Fld : Internal_Entity_For_Loop_Spec;
Fld_1 : Boolean;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_6 : Internal_Entity_Expr;
Fld_7 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_10 : Logic_Var;
Fld_11 : Bare_Expr;
Fld_12 : Logic_Var;
Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
False_Rel : Logic_Equation;
If_Result : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1341 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1341;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11882 '<Let at nodes.lkt:20683:9>' Let_Result ada/nodes.lkt:20683
--# scope-start
--# expr-start 11863 '<FieldAccess for resolve_names at nodes.lkt:20683:28>' Fld_1 ada/nodes.lkt:20683
--# expr-start 11862 '<FieldAccess for loop_spec at nodes.lkt:20683:28>' Fld ada/nodes.lkt:20683
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_For_Loop_Spec (Node => Ent.Node.Quantified_Expr_F_Loop_Spec, Info => Ent.Info);
--# expr-done 11862
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names
Fld_1 := Libadalang.Implementation.Ada_Node_P_Resolve_Names (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11863
Local_Spec_Success := Fld_1; 
--# bind spec_success Local_Spec_Success
--# expr-start 11881 '<If at nodes.lkt:20685:9>' If_Result ada/nodes.lkt:20685
if Local_Spec_Success then
   --# expr-start 11880 '<LogicBinaryOp And at nodes.lkt:20687:13>' And_Pred_2 ada/nodes.lkt:20687
--# expr-start 11875 '<LogicBinaryOp And at nodes.lkt:20688:17>' And_Pred_1 ada/nodes.lkt:20688
--# expr-start 11872 '<LogicBinaryOp And at nodes.lkt:20689:21>' And_Pred ada/nodes.lkt:20689
--# expr-start 11867 '<Bind at nodes.lkt:20689:21>' Bind_Result ada/nodes.lkt:20689
--# expr-start 11865 '<FieldAccess for expected_type_var at nodes.lkt:20689:21>' Fld_3 ada/nodes.lkt:20689
--# expr-start 11864 '<FieldAccess for expr at nodes.lkt:20689:21>' Fld_2 ada/nodes.lkt:20689
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Quantified_Expr_F_Expr;
--# expr-done 11864
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2);
--# expr-done 11865
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 11866 '<FieldAccess for bool_type at nodes.lkt:20689:54>' Fld_4 ada/nodes.lkt:20689
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_4 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 11866
      Cast_Result := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Bind_Result := Solver.Create_Assign (Fld_3, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20689:21") else null)); 
--# expr-done 11867
--# expr-start 11871 '<bind at nodes.lkt:20691:25>' Dyn_Var_Bind_Result ada/nodes.lkt:20691
--# expr-start 11868 '<FieldAccess for children_env at nodes.lkt:20691:36>' Fld_5 ada/nodes.lkt:20691
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 11868
Bound_Env := Fld_5; Inc_Ref (Bound_Env);
--# expr-start 11870 '<FieldAccess for sub_equation at nodes.lkt:20693:25>' Fld_7 ada/nodes.lkt:20693
--# expr-start 11869 '<FieldAccess for expr at nodes.lkt:20693:25>' Fld_6 ada/nodes.lkt:20693
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Ent.Node.Quantified_Expr_F_Expr, Info => Ent.Info);
--# expr-done 11869
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_6.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_6.Info);
--# end
--# expr-done 11870
Dyn_Var_Bind_Result := Fld_7; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11871
And_Pred := Create_And (Bind_Result, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20689:21") else null)); 
--# expr-done 11872
--# expr-start 11874 '<FieldAccess for matches_expected_formal_type at nodes.lkt:20696:22>' Fld_9 ada/nodes.lkt:20696
--# expr-start 11873 '<FieldAccess for expr at nodes.lkt:20696:22>' Fld_8 ada/nodes.lkt:20696
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Expr (Node => Ent.Node.Quantified_Expr_F_Expr, Info => Ent.Info);
--# expr-done 11873
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_9 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_8.Node, Origin => Origin);
--# end
--# expr-done 11874
And_Pred_1 := Create_And (And_Pred, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20688:17") else null)); 
--# expr-done 11875
--# expr-start 11879 '<Bind at nodes.lkt:20698:18>' Bind_Result_1 ada/nodes.lkt:20698
--# expr-start 11876 '<FieldAccess for type_var at nodes.lkt:20698:18>' Fld_10 ada/nodes.lkt:20698
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11876
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
--# expr-start 11878 '<FieldAccess for type_var at nodes.lkt:20698:38>' Fld_12 ada/nodes.lkt:20698
--# expr-start 11877 '<FieldAccess for expr at nodes.lkt:20698:38>' Fld_11 ada/nodes.lkt:20698
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Quantified_Expr_F_Expr;
--# expr-done 11877
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_11);
--# expr-done 11878
Fld_12.Value := No_Entity;
Entity_Vars.Reset (Fld_12);
Bind_Result_1 := Solver.Create_Unify (Fld_10, Fld_12, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20698:18") else null)); 
--# expr-done 11879
And_Pred_2 := Create_And (And_Pred_1, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20687:13") else null)); 
--# expr-done 11880
   If_Result := And_Pred_2;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20699:14") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 11881
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 11882
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1341;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1341;
            raise;
      end;
   return Property_Result;
end Quantified_Expr_P_Xref_Equation;
--# end
--# property-start QuantifiedExpr._env_trans_parent_216 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_216
  (Node : Bare_Quantified_Expr
  )
   return Boolean
is
   Self : Bare_Quantified_Expr  := Bare_Quantified_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_216;
--# end
   --
   --  Primitives for Bare_Raise_Expr
   --
      procedure Initialize_Fields_For_Raise_Expr
        (Self : Bare_Raise_Expr
         ; Raise_Expr_F_Exception_Name : Bare_Name
         ; Raise_Expr_F_Error_Message : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Raise_Expr_F_Exception_Name := Raise_Expr_F_Exception_Name;
            Self.Raise_Expr_F_Error_Message := Raise_Expr_F_Error_Message;
      end Initialize_Fields_For_Raise_Expr;
   function Raise_Expr_F_Exception_Name
     (Node : Bare_Raise_Expr) return Bare_Name
   is
   begin
         return Node.Raise_Expr_F_Exception_Name;
   end;
   function Raise_Expr_F_Error_Message
     (Node : Bare_Raise_Expr) return Bare_Expr
   is
   begin
         return Node.Raise_Expr_F_Error_Message;
   end;
--# property-start RaiseExpr.has_context_free_type ada/nodes.lkt:20716
pragma Warnings (Off, "is not referenced");
 function Raise_Expr_P_Has_Context_Free_Type
  (Node : Bare_Raise_Expr
  )
   return Boolean
is
   Self : Bare_Raise_Expr  := Bare_Raise_Expr (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Raise_Expr_P_Has_Context_Free_Type;
--# end
--# property-start RaiseExpr.xref_equation ada/nodes.lkt:20719
pragma Warnings (Off, "is not referenced");
 function Raise_Expr_P_Xref_Equation
  (Node : Bare_Raise_Expr
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Raise_Expr  := Bare_Raise_Expr (Node);
     Ent : Internal_Entity_Raise_Expr :=
       Internal_Entity_Raise_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1343 with Inline_Always;
            procedure Finalizer_Scope_3476 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Var;
Fld_3 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Logic_Var;
Fld_6 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_7 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_1343 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_1343;
            procedure Finalizer_Scope_3476 is
            begin
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3476;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11895 '<LogicBinaryOp And at nodes.lkt:20720:9>' And_Pred_2 ada/nodes.lkt:20720
--# expr-start 11888 '<LogicBinaryOp And at nodes.lkt:20720:9>' And_Pred ada/nodes.lkt:20720
--# expr-start 11884 '<FieldAccess for sub_equation at nodes.lkt:20720:9>' Fld_1 ada/nodes.lkt:20720
--# expr-start 11883 '<FieldAccess for exception_name at nodes.lkt:20720:9>' Fld ada/nodes.lkt:20720
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Raise_Expr_F_Exception_Name, Info => Ent.Info);
--# expr-done 11883
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 11884
--# expr-start 11887 '<Bind at nodes.lkt:20721:14>' Bind_Result ada/nodes.lkt:20721
--# expr-start 11885 '<FieldAccess for expected_type_var at nodes.lkt:20721:14>' Fld_2 ada/nodes.lkt:20721
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11885
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 11886 '<FieldAccess for type_var at nodes.lkt:20721:43>' Fld_3 ada/nodes.lkt:20721
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11886
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Bind_Result := Solver.Create_Unify (Fld_2, Fld_3, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20721:14") else null)); 
--# expr-done 11887
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20720:9") else null)); 
--# expr-done 11888
--# expr-start 11889 '<FieldAccess for error_message at nodes.lkt:20722:14>' Fld_4 ada/nodes.lkt:20722
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Ent.Node.Raise_Expr_F_Error_Message, Info => Ent.Info);
--# expr-done 11889
Var_Expr_0 := Fld_4;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind er Var_Expr_0
--# expr-start 11894 '<LogicBinaryOp And at nodes.lkt:20724:13>' And_Pred_1 ada/nodes.lkt:20724
--# expr-start 11892 '<Bind at nodes.lkt:20727:17>' Bind_Result_1 ada/nodes.lkt:20727
--# expr-start 11890 '<FieldAccess for expected_type_var at nodes.lkt:20727:17>' Fld_5 ada/nodes.lkt:20727
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_0.Node);
--# expr-done 11890
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 11891 '<FieldAccess for std_string_type at nodes.lkt:20727:43>' Fld_6 ada/nodes.lkt:20727
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_6 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 11891
      Cast_Result := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_5, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20727:17") else null)); 
--# expr-done 11892
--# expr-start 11893 '<FieldAccess for sub_equation at nodes.lkt:20729:18>' Fld_7 ada/nodes.lkt:20729
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 11893
And_Pred_1 := Create_And (Bind_Result_1, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20724:13") else null)); 
--# expr-done 11894
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3476;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20730:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_2 := Create_And (And_Pred, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20720:9") else null)); 
--# expr-done 11895
         Property_Result := And_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1343;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1343;
                     Finalizer_Scope_3476;
            raise;
      end;
   return Property_Result;
end Raise_Expr_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Un_Op
   --
      procedure Initialize_Fields_For_Un_Op
        (Self : Bare_Un_Op
         ; Un_Op_F_Op : Bare_Op
         ; Un_Op_F_Expr : Bare_Expr
        ) is
      begin
            Initialize_Fields_For_Expr
              (Self);
            Self.Un_Op_F_Op := Un_Op_F_Op;
            Self.Un_Op_F_Expr := Un_Op_F_Expr;
      end Initialize_Fields_For_Un_Op;
   function Un_Op_F_Op
     (Node : Bare_Un_Op) return Bare_Op
   is
   begin
         return Node.Un_Op_F_Op;
   end;
   function Un_Op_F_Expr
     (Node : Bare_Un_Op) return Bare_Expr
   is
   begin
         return Node.Un_Op_F_Expr;
   end;
--# property-start UnOp.has_context_free_type ada/nodes.lkt:20745
pragma Warnings (Off, "is not referenced");
 function Un_Op_P_Has_Context_Free_Type
  (Node : Bare_Un_Op
  )
   return Boolean
is
   Self : Bare_Un_Op  := Bare_Un_Op (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Un_Op_P_Has_Context_Free_Type;
--# end
--# property-start UnOp.xref_equation ada/nodes.lkt:20748
pragma Warnings (Off, "is not referenced");
 function Un_Op_P_Xref_Equation
  (Node : Bare_Un_Op
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Un_Op  := Bare_Un_Op (Node);
     Ent : Internal_Entity_Un_Op :=
       Internal_Entity_Un_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1345 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_2 : Logic_Equation;
Fld_3 : Logic_Var;
Fld_4 : Bare_Expr;
Fld_5 : Logic_Var;
Bind_Result : Logic_Equation;
Fld_6 : Internal_Entity_Op;
Cast_Result : Internal_Entity;
New_Struct : Internal_Logic_Context;
Bound_Logic_Context : Internal_Logic_Context;
Fld_7 : Logic_Var;
Fld_8 : Bare_Expr;
Fld_9 : Logic_Var;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Or_Pred : Logic_Equation;
Sym : Symbol_Type;
Fld_10 : Boolean;
Sym_1 : Symbol_Type;
Fld_11 : Boolean;
If_Result : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1345 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Or_Pred);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1345;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11918 '<LogicBinaryOp And at nodes.lkt:20749:9>' And_Pred_1 ada/nodes.lkt:20749
--# expr-start 11897 '<FieldAccess for sub_equation at nodes.lkt:20749:9>' Fld_1 ada/nodes.lkt:20749
--# expr-start 11896 '<FieldAccess for expr at nodes.lkt:20749:9>' Fld ada/nodes.lkt:20749
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Un_Op_F_Expr, Info => Ent.Info);
--# expr-done 11896
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 11897
--# expr-start 11917 '<If at nodes.lkt:20750:14>' If_Result_1 ada/nodes.lkt:20750
--# expr-start 11902 '<BooleanBinaryOp Or at nodes.lkt:20751:13>' If_Result ada/nodes.lkt:20751
--# expr-start 11899 '<FieldAccess for in_aspect at nodes.lkt:20751:13>' Fld_10 ada/nodes.lkt:20751
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11898 '<Symbol Depends at nodes.lkt:20751:28>' Sym ada/nodes.lkt:20751
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Depends); 
--# expr-done 11898
--# property-call-start AdaNode.in_aspect
Fld_10 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym);
--# end
--# expr-done 11899
if Fld_10 then
   If_Result := True;
else
   --# expr-start 11901 '<FieldAccess for in_aspect at nodes.lkt:20751:43>' Fld_11 ada/nodes.lkt:20751
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11900 '<Symbol Refined_Depends at nodes.lkt:20751:58>' Sym_1 ada/nodes.lkt:20751
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Refined_Depends); 
--# expr-done 11900
--# property-call-start AdaNode.in_aspect
Fld_11 := Libadalang.Implementation.Ada_Node_P_In_Aspect (Node => Self, Name => Sym_1);
--# end
--# expr-done 11901
   If_Result := Fld_11;
end if;
--# expr-done 11902
if If_Result then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20752:14") else null)); 
   If_Result_1 := True_Rel;
else
   --# expr-start 11916 '<LogicBinaryOp Or at nodes.lkt:20754:13>' Or_Pred ada/nodes.lkt:20754
--# expr-start 11903 '<FieldAccess for overload_equation at nodes.lkt:20754:13>' Fld_2 ada/nodes.lkt:20754
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UnOp.overload_equation
Fld_2 := Libadalang.Implementation.Un_Op_P_Overload_Equation (Node => Ent.Node, Origin => Origin, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 11903
--# expr-start 11915 '<LogicBinaryOp And at nodes.lkt:20756:17>' And_Pred ada/nodes.lkt:20756
--# expr-start 11907 '<Bind at nodes.lkt:20756:17>' Bind_Result ada/nodes.lkt:20756
--# expr-start 11904 '<FieldAccess for expected_type_var at nodes.lkt:20756:17>' Fld_3 ada/nodes.lkt:20756
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Self);
--# expr-done 11904
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 11906 '<FieldAccess for expected_type_var at nodes.lkt:20756:46>' Fld_5 ada/nodes.lkt:20756
--# expr-start 11905 '<FieldAccess for expr at nodes.lkt:20756:46>' Fld_4 ada/nodes.lkt:20756
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Un_Op_F_Expr;
--# expr-done 11905
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_4);
--# expr-done 11906
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Bind_Result := Solver.Create_Unify (Fld_3, Fld_5, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20756:17") else null)); 
--# expr-done 11907
--# expr-start 11914 '<bind at nodes.lkt:20758:21>' Dyn_Var_Bind_Result ada/nodes.lkt:20758
--# expr-start 11909 '<New LogicContext at nodes.lkt:20759:25>' New_Struct ada/nodes.lkt:20759
--# expr-start 11908 '<FieldAccess for op at nodes.lkt:20760:38>' Fld_6 ada/nodes.lkt:20760
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Op (Node => Ent.Node.Un_Op_F_Op, Info => Ent.Info);
--# expr-done 11908
      Cast_Result := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
New_Struct := (Decl_Node => No_Entity, Ref_Node => Cast_Result); 
--# expr-done 11909
Bound_Logic_Context := New_Struct; 
--# expr-start 11913 '<Bind at nodes.lkt:20763:21>' Bind_Result_1 ada/nodes.lkt:20763
--# expr-start 11910 '<FieldAccess for type_var at nodes.lkt:20763:21>' Fld_7 ada/nodes.lkt:20763
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11910
Fld_7.Value := No_Entity;
Entity_Vars.Reset (Fld_7);
--# expr-start 11912 '<FieldAccess for type_var at nodes.lkt:20763:41>' Fld_9 ada/nodes.lkt:20763
--# expr-start 11911 '<FieldAccess for expr at nodes.lkt:20763:41>' Fld_8 ada/nodes.lkt:20763
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.Un_Op_F_Expr;
--# expr-done 11911
      if Fld_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_8);
--# expr-done 11912
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
Logic_Ctx := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result_1 := Solver.Create_Unify (Fld_7, Fld_9, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20763:21") else null)); 
--# expr-done 11913
Dyn_Var_Bind_Result := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11914
And_Pred := Create_And (Bind_Result, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20756:17") else null)); 
--# expr-done 11915
Or_Pred := Create_Or (Fld_2, And_Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20754:13") else null)); 
--# expr-done 11916
   If_Result_1 := Or_Pred;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 11917
And_Pred_1 := Create_And (Fld_1, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20749:9") else null)); 
--# expr-done 11918
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1345;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1345;
            raise;
      end;
   return Property_Result;
end Un_Op_P_Xref_Equation;
--# end
--# property-start UnOp.overload_equation ada/nodes.lkt:20768
pragma Warnings (Off, "is not referenced");
 function Un_Op_P_Overload_Equation
  (Node : Bare_Un_Op
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Un_Op  := Bare_Un_Op (Node);
     Ent : Internal_Entity_Un_Op :=
       Internal_Entity_Un_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind env Env
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1346 with Inline_Always;
            procedure Finalizer_Scope_3477 with Inline_Always;
      Fld : Internal_Entity_Op;
Fld_1 : Internal_Entity_Basic_Decl_Array_Access;
Fld_2 : Internal_Entity_Op;
Cast_Result : Internal_Entity;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
New_Struct : Internal_Logic_Context;
Bound_Logic_Context : Internal_Logic_Context;
Fld_3 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1346 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1346;
            procedure Finalizer_Scope_3477 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_3477;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11926 '<LogicAny at nodes.lkt:20769:9>' Logic_Boolean_Op ada/nodes.lkt:20769
--# expr-start 11925 '<Map at nodes.lkt:20769:9>' Map_Result ada/nodes.lkt:20769
   --# expr-start 11920 '<FieldAccess for subprograms at nodes.lkt:20769:9>' Fld_1 ada/nodes.lkt:20769
--# expr-start 11919 '<FieldAccess for op at nodes.lkt:20769:9>' Fld ada/nodes.lkt:20769
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Op (Node => Ent.Node.Un_Op_F_Op, Info => Ent.Info);
--# expr-done 11919
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Op.subprograms
Fld_1 := Libadalang.Implementation.Op_P_Subprograms (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 11920
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := Fld_1;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind subp Item_0
      --# expr-start 11924 '<bind at nodes.lkt:20771:17>' Dyn_Var_Bind_Result ada/nodes.lkt:20771
--# expr-start 11922 '<New LogicContext at nodes.lkt:20772:21>' New_Struct ada/nodes.lkt:20772
Cast_Expr := Item_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 11921 '<FieldAccess for op at nodes.lkt:20772:43>' Fld_2 ada/nodes.lkt:20772
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Op (Node => Ent.Node.Un_Op_F_Op, Info => Ent.Info);
--# expr-done 11921
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
New_Struct := (Decl_Node => Cast_Result_1, Ref_Node => Cast_Result); 
--# expr-done 11922
Bound_Logic_Context := New_Struct; 
--# expr-start 11923 '<FieldAccess for entity_eq at nodes.lkt:20774:17>' Fld_3 ada/nodes.lkt:20774
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UnOp.entity_eq
Fld_3 := Libadalang.Implementation.Un_Op_P_Entity_Eq (Node => Ent.Node, Subp => Item_0, Origin => Origin, Env => Env, Logic_Context => Bound_Logic_Context, E_Info => Ent.Info);
--# end
--# expr-done 11923
Dyn_Var_Bind_Result := Fld_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11924
         declare
            Item_To_Append : constant Logic_Equation := Dyn_Var_Bind_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3477;
         end loop;
      end;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11925
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20769:9") else null)); 
--# expr-done 11926
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1346;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1346;
                     Finalizer_Scope_3477;
            raise;
      end;
   return Property_Result;
end Un_Op_P_Overload_Equation;
--# end
--# property-start UnOp.entity_eq ada/nodes.lkt:20779
pragma Warnings (Off, "is not referenced");
 function Un_Op_P_Entity_Eq
  (Node : Bare_Un_Op
      ; Subp : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
      ; Logic_Context : Internal_Logic_Context
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Un_Op  := Bare_Un_Op (Node);
     Ent : Internal_Entity_Un_Op :=
       Internal_Entity_Un_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind subp Subp
   --# bind origin Origin
   --# bind env Env
   --# bind logic_context Logic_Context
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1347 with Inline_Always;
      Local_Spec : Internal_Entity_Base_Subp_Spec;
Local_Ps : Internal_Entity_Defining_Name_Array_Access;
Fld : Internal_Entity_Base_Subp_Spec;
Fld_1 : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_2 : Internal_Entity_Base_Formal_Param_Decl;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
Fld_5 : Logic_Var;
Fld_6 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Logic_Ctx : Internal_Logic_Context_Access;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Bound_Logic_Context : Internal_Logic_Context;
Fld_7 : Bare_Op;
Fld_8 : Logic_Var;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result_1 : Internal_Entity;
Logic_Ctx_1 : Internal_Logic_Context_Access;
Bind_Result_1 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
Bound_Logic_Context_1 : Internal_Logic_Context;
Fld_9 : Bare_Op;
Fld_10 : Logic_Var;
Cast_Expr_1 : Internal_Entity_Base_Subp_Spec;
Cast_Result_2 : Internal_Entity;
Logic_Ctx_2 : Internal_Logic_Context_Access;
Bind_Result_2 : Logic_Equation;
Dyn_Var_Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
False_Rel : Logic_Equation;
Len : Integer;
Is_Equal : Boolean;
If_Result : Logic_Equation;
Let_Result : Logic_Equation;
Let_Result_1 : Logic_Equation;
            procedure Finalizer_Scope_1347 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Ps);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (False_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1347;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11951 '<Let at nodes.lkt:20780:9>' Let_Result_1 ada/nodes.lkt:20780
--# scope-start
--# expr-start 11927 '<FieldAccess for subp_spec_or_null at nodes.lkt:20780:20>' Fld ada/nodes.lkt:20780
      if Subp.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Subp.Node, E_Info => Subp.Info);
--# end
--# expr-done 11927
Local_Spec := Fld; 
--# bind spec Local_Spec
--# expr-start 11950 '<Let at nodes.lkt:20781:9>' Let_Result ada/nodes.lkt:20781
--# scope-start
--# expr-start 11928 '<FieldAccess for unpacked_formal_params at nodes.lkt:20781:18>' Fld_1 ada/nodes.lkt:20781
      if Local_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.unpacked_formal_params
Fld_1 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Unpacked_Formal_Params (Node => Local_Spec.Node, E_Info => Local_Spec.Info);
--# end
--# expr-done 11928
Local_Ps := Fld_1; Inc_Ref (Local_Ps);
--# bind ps Local_Ps
--# expr-start 11949 '<If at nodes.lkt:20783:9>' If_Result ada/nodes.lkt:20783
--# expr-start 11930 '<Eq at nodes.lkt:20783:12>' Is_Equal ada/nodes.lkt:20783
--# expr-start 11929 '<length at nodes.lkt:20783:12>' Len ada/nodes.lkt:20783
Len := Length (Local_Ps); 
--# expr-done 11929
Is_Equal := Len = 1; 
--# expr-done 11930
if Is_Equal then
   --# expr-start 11948 '<LogicBinaryOp And at nodes.lkt:20787:13>' And_Pred_2 ada/nodes.lkt:20787
--# expr-start 11943 '<LogicBinaryOp And at nodes.lkt:20788:17>' And_Pred_1 ada/nodes.lkt:20788
--# expr-start 11938 '<LogicBinaryOp And at nodes.lkt:20789:21>' And_Pred ada/nodes.lkt:20789
--# expr-start 11934 '<FieldAccess for call_argument_equation at nodes.lkt:20789:21>' Fld_4 ada/nodes.lkt:20789
      if Local_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11932 '<FieldAccess for formal_decl at nodes.lkt:20790:25>' Fld_2 ada/nodes.lkt:20790
--# expr-start 11931 '<at at nodes.lkt:20790:25>' Get_Result ada/nodes.lkt:20790
Get_Result := Get (Self, Local_Ps, 0, True); 
--# expr-done 11931
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.formal_decl
Fld_2 := Libadalang.Implementation.Defining_Name_P_Formal_Decl (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 11932
--# expr-start 11933 '<FieldAccess for expr at nodes.lkt:20791:25>' Fld_3 ada/nodes.lkt:20791
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Un_Op_F_Expr, Info => Ent.Info);
--# expr-done 11933
--# property-call-start BaseFormalParamHolder.call_argument_equation
Fld_4 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Call_Argument_Equation (Node => Local_Spec.Node, Param => Fld_2, Arg => Fld_3, Origin => Origin, Logic_Context => Logic_Context, E_Info => Local_Spec.Info);
--# end
--# expr-done 11934
--# expr-start 11937 '<Bind at nodes.lkt:20795:25>' Bind_Result ada/nodes.lkt:20795
--# expr-start 11935 '<FieldAccess for type_var at nodes.lkt:20795:25>' Fld_5 ada/nodes.lkt:20795
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Self);
--# expr-done 11935
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 11936 '<FieldAccess for return_type at nodes.lkt:20795:44>' Fld_6 ada/nodes.lkt:20795
      if Local_Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_6 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Local_Spec.Node, Origin => Origin, E_Info => Local_Spec.Info);
--# end
--# expr-done 11936
      Cast_Result := Create_Internal_Entity
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
Logic_Ctx := Allocate_Logic_Context (Logic_Context); 
Bind_Result := Solver.Create_Assign (Fld_5, Cast_Result, Solver_Ifc.No_Converter, Logic_Ctx, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20795:25") else null)); 
--# expr-done 11937
And_Pred := Create_And (Fld_4, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20789:21") else null)); 
--# expr-done 11938
--# expr-start 11942 '<bind at nodes.lkt:20801:25>' Dyn_Var_Bind_Result ada/nodes.lkt:20801
Bound_Logic_Context := No_Logic_Context; 
--# expr-start 11941 '<Bind at nodes.lkt:20802:25>' Bind_Result_1 ada/nodes.lkt:20802
--# expr-start 11940 '<FieldAccess for ref_var at nodes.lkt:20802:25>' Fld_8 ada/nodes.lkt:20802
--# expr-start 11939 '<FieldAccess for op at nodes.lkt:20802:25>' Fld_7 ada/nodes.lkt:20802
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Self.Un_Op_F_Op;
--# expr-done 11939
      if Fld_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_8 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_7);
--# end
--# expr-done 11940
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
Cast_Expr := Subp; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Logic_Ctx_1 := Allocate_Logic_Context (Bound_Logic_Context); 
Bind_Result_1 := Solver.Create_Assign (Fld_8, Cast_Result_1, Solver_Ifc.No_Converter, Logic_Ctx_1, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20802:25") else null)); 
--# expr-done 11941
Dyn_Var_Bind_Result := Bind_Result_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 11942
And_Pred_1 := Create_And (And_Pred, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20788:17") else null)); 
--# expr-done 11943
--# expr-start 11947 '<bind at nodes.lkt:20807:17>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:20807
Bound_Logic_Context_1 := No_Logic_Context; 
--# expr-start 11946 '<Bind at nodes.lkt:20808:17>' Bind_Result_2 ada/nodes.lkt:20808
--# expr-start 11945 '<FieldAccess for subp_spec_var at nodes.lkt:20808:17>' Fld_10 ada/nodes.lkt:20808
--# expr-start 11944 '<FieldAccess for op at nodes.lkt:20808:17>' Fld_9 ada/nodes.lkt:20808
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.Un_Op_F_Op;
--# expr-done 11944
      if Fld_9 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.subp_spec_var'
Fld_10 := Libadalang.Implementation.Dispatcher_Name_P_Subp_Spec_Var (Node => Fld_9);
--# end
--# expr-done 11945
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
Cast_Expr_1 := Local_Spec; 
      Cast_Result_2 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Logic_Ctx_2 := Allocate_Logic_Context (Bound_Logic_Context_1); 
Bind_Result_2 := Solver.Create_Assign (Fld_10, Cast_Result_2, Solver_Ifc.No_Converter, Logic_Ctx_2, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20808:17") else null)); 
--# expr-done 11946
Dyn_Var_Bind_Result_1 := Bind_Result_2; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 11947
And_Pred_2 := Create_And (And_Pred_1, Dyn_Var_Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20787:13") else null)); 
--# expr-done 11948
   If_Result := And_Pred_2;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20811:14") else null)); 
   If_Result := False_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 11949
Let_Result := If_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 11950
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 11951
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1347;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1347;
            raise;
      end;
   return Property_Result;
end Un_Op_P_Entity_Eq;
--# end
--# property-start UnOp.potential_actuals_for_dispatch ada/nodes.lkt:20815
pragma Warnings (Off, "is not referenced");
 function Un_Op_P_Potential_Actuals_For_Dispatch
  (Node : Bare_Un_Op
      ; Spec : Internal_Entity_Base_Subp_Spec
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Expected_Type_For_Expr_Array_Access
is
   Self : Bare_Un_Op  := Bare_Un_Op (Node);
     Ent : Internal_Entity_Un_Op :=
       Internal_Entity_Un_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind spec Spec
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Internal_Expected_Type_For_Expr_Array_Access;
            procedure Finalizer_Scope_1348 with Inline_Always;
      Fld : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Get_Result : Internal_Entity_Base_Formal_Param_Decl;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Internal_Entity_Expr;
New_Struct : Internal_Expected_Type_For_Expr;
Array_Lit : Internal_Expected_Type_For_Expr_Array_Access;
            procedure Finalizer_Scope_1348 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1348;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11957 '<ArrayLiteral at nodes.lkt:20818:9>' Array_Lit ada/nodes.lkt:20818
--# expr-start 11956 '<New ExpectedTypeForExpr at nodes.lkt:20819:13>' New_Struct ada/nodes.lkt:20819
--# expr-start 11954 '<FieldAccess for type_expression at nodes.lkt:20820:31>' Fld_1 ada/nodes.lkt:20820
--# expr-start 11953 '<at at nodes.lkt:20820:31>' Get_Result ada/nodes.lkt:20820
--# expr-start 11952 '<FieldAccess for abstract_formal_params at nodes.lkt:20820:31>' Fld ada/nodes.lkt:20820
      if Spec.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Spec.Node, E_Info => Spec.Info);
--# end
--# expr-done 11952
Get_Result := Get (Self, Fld, 0, True); 
--# expr-done 11953
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.type_expression'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Type_Expression (Node => Get_Result.Node, E_Info => Get_Result.Info);
--# end
--# expr-done 11954
--# expr-start 11955 '<FieldAccess for expr at nodes.lkt:20822:22>' Fld_2 ada/nodes.lkt:20822
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Un_Op_F_Expr, Info => Ent.Info);
--# expr-done 11955
New_Struct := (Expected_Type => Fld_1, Expr => Fld_2); 
--# expr-done 11956
Array_Lit := Create_Internal_Expected_Type_For_Expr_Array (Internal_Internal_Expected_Type_For_Expr_Array'(1 => New_Struct)); 
--# expr-done 11957
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1348;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1348;
            raise;
      end;
   return Property_Result;
end Un_Op_P_Potential_Actuals_For_Dispatch;
--# end
--# property-start UnOp.is_dispatching_call ada/nodes.lkt:20827
pragma Warnings (Off, "is not referenced");
 function Un_Op_P_Is_Dispatching_Call
  (Node : Bare_Un_Op
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Un_Op  := Bare_Un_Op (Node);
     Ent : Internal_Entity_Un_Op :=
       Internal_Entity_Un_Op'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Op;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11959 '<FieldAccess for is_dispatching_call at nodes.lkt:20827:39>' Fld_1 ada/nodes.lkt:20827
--# expr-start 11958 '<FieldAccess for op at nodes.lkt:20827:39>' Fld ada/nodes.lkt:20827
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Op (Node => Ent.Node.Un_Op_F_Op, Info => Ent.Info);
--# expr-done 11958
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.is_dispatching_call'
Fld_1 := Libadalang.Implementation.Dispatcher_Expr_P_Is_Dispatching_Call (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 11959
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Un_Op_P_Is_Dispatching_Call;
--# end
   --
   --  Primitives for Bare_For_Loop_Iter_Filter
   --
      procedure Initialize_Fields_For_For_Loop_Iter_Filter
        (Self : Bare_For_Loop_Iter_Filter
         ; For_Loop_Iter_Filter_F_Expr : Bare_Expr
        ) is
      begin
            Self.For_Loop_Iter_Filter_F_Expr := For_Loop_Iter_Filter_F_Expr;
      end Initialize_Fields_For_For_Loop_Iter_Filter;
   function For_Loop_Iter_Filter_F_Expr
     (Node : Bare_For_Loop_Iter_Filter) return Bare_Expr
   is
   begin
         return Node.For_Loop_Iter_Filter_F_Expr;
   end;
--# property-start ForLoopIterFilter.xref_equation ada/nodes.lkt:20840
pragma Warnings (Off, "is not referenced");
 function For_Loop_Iter_Filter_P_Xref_Equation
  (Node : Bare_For_Loop_Iter_Filter
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_For_Loop_Iter_Filter  := Bare_For_Loop_Iter_Filter (Node);
     Ent : Internal_Entity_For_Loop_Iter_Filter :=
       Internal_Entity_For_Loop_Iter_Filter'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1350 with Inline_Always;
      Ignored : Boolean;
Var_Expr_0 : Internal_Entity_For_Loop_Spec;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_For_Loop_Spec;
Fld_1 : Boolean;
Fld_2 : Boolean;
If_Result : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Fld_3 : Bare_Expr;
Fld_4 : Logic_Var;
Fld_5 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_6 : Internal_Entity_Expr;
Fld_7 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1350 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1350;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11975 '<Let at nodes.lkt:20841:9>' Let_Result ada/nodes.lkt:20841
--# scope-start
--# expr-start 11961 '<Cast to ForLoopSpec at nodes.lkt:20842:13>' Cast_Result ada/nodes.lkt:20842
--# expr-start 11960 '<parent at nodes.lkt:20842:13>' Fld ada/nodes.lkt:20842
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 11960
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_For_Loop_Spec_Range
   then
      Cast_Result := Create_Internal_Entity_For_Loop_Spec
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_For_Loop_Spec;
   end if;
--# expr-done 11961
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_For_Loop_Spec then
   --# scope-start
   --# bind spec Var_Expr_0
--# expr-start 11964 '<If at nodes.lkt:20844:17>' If_Result ada/nodes.lkt:20844
--# expr-start 11962 '<FieldAccess for is_iterated_assoc_spec at nodes.lkt:20844:20>' Fld_2 ada/nodes.lkt:20844
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ForLoopSpec.is_iterated_assoc_spec
Fld_2 := Libadalang.Implementation.For_Loop_Spec_P_Is_Iterated_Assoc_Spec (Node => Var_Expr_0.Node);
--# end
--# expr-done 11962
if Fld_2 then
   --# expr-start 11963 '<FieldAccess for resolve_names_from_closest_entry_point at nodes.lkt:20845:22>' Fld_1 ada/nodes.lkt:20845
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_from_closest_entry_point
Fld_1 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_From_Closest_Entry_Point (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 11963
   If_Result := Fld_1;
else
   If_Result := True;
end if;
--# expr-done 11964
Scope_Result := If_Result;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Ignored := Result_Var; 
--# bind _ Ignored
--# expr-start 11974 '<LogicBinaryOp And at nodes.lkt:20849:9>' And_Pred_1 ada/nodes.lkt:20849
--# expr-start 11971 '<LogicBinaryOp And at nodes.lkt:20849:9>' And_Pred ada/nodes.lkt:20849
--# expr-start 11968 '<Bind at nodes.lkt:20849:9>' Bind_Result ada/nodes.lkt:20849
--# expr-start 11966 '<FieldAccess for expected_type_var at nodes.lkt:20849:9>' Fld_4 ada/nodes.lkt:20849
--# expr-start 11965 '<FieldAccess for expr at nodes.lkt:20849:9>' Fld_3 ada/nodes.lkt:20849
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.For_Loop_Iter_Filter_F_Expr;
--# expr-done 11965
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_3);
--# expr-done 11966
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
--# expr-start 11967 '<FieldAccess for bool_type at nodes.lkt:20849:42>' Fld_5 ada/nodes.lkt:20849
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_5 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 11967
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Bind_Result := Solver.Create_Assign (Fld_4, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20849:9") else null)); 
--# expr-done 11968
--# expr-start 11970 '<FieldAccess for sub_equation at nodes.lkt:20850:14>' Fld_7 ada/nodes.lkt:20850
--# expr-start 11969 '<FieldAccess for expr at nodes.lkt:20850:14>' Fld_6 ada/nodes.lkt:20850
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Ent.Node.For_Loop_Iter_Filter_F_Expr, Info => Ent.Info);
--# expr-done 11969
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_6.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_6.Info);
--# end
--# expr-done 11970
And_Pred := Create_And (Bind_Result, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20849:9") else null)); 
--# expr-done 11971
--# expr-start 11973 '<FieldAccess for matches_expected_formal_type at nodes.lkt:20851:14>' Fld_9 ada/nodes.lkt:20851
--# expr-start 11972 '<FieldAccess for expr at nodes.lkt:20851:14>' Fld_8 ada/nodes.lkt:20851
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Expr (Node => Ent.Node.For_Loop_Iter_Filter_F_Expr, Info => Ent.Info);
--# expr-done 11972
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_9 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_8.Node, Origin => Origin);
--# end
--# expr-done 11973
And_Pred_1 := Create_And (And_Pred, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20849:9") else null)); 
--# expr-done 11974
Let_Result := And_Pred_1; Inc_Ref (Let_Result);
--# end
--# expr-done 11975
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1350;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1350;
            raise;
      end;
   return Property_Result;
end For_Loop_Iter_Filter_P_Xref_Equation;
--# end
--# property-start ForLoopIterFilter.xref_entry_point ada/nodes.lkt:20854
pragma Warnings (Off, "is not referenced");
 function For_Loop_Iter_Filter_P_Xref_Entry_Point
  (Node : Bare_For_Loop_Iter_Filter
  )
   return Boolean
is
   Self : Bare_For_Loop_Iter_Filter  := Bare_For_Loop_Iter_Filter (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end For_Loop_Iter_Filter_P_Xref_Entry_Point;
--# end
   --
   --  Primitives for Bare_Format_String_Chunk
   --
      procedure Initialize_Fields_For_Format_String_Chunk
        (Self : Bare_Format_String_Chunk
         ; Format_String_Chunk_F_Expr : Bare_Expr
         ; Format_String_Chunk_F_String_Tok : Bare_Format_String_Tok_Node
        ) is
      begin
            Self.Format_String_Chunk_F_Expr := Format_String_Chunk_F_Expr;
            Self.Format_String_Chunk_F_String_Tok := Format_String_Chunk_F_String_Tok;
      end Initialize_Fields_For_Format_String_Chunk;
   function Format_String_Chunk_F_Expr
     (Node : Bare_Format_String_Chunk) return Bare_Expr
   is
   begin
         return Node.Format_String_Chunk_F_Expr;
   end;
   function Format_String_Chunk_F_String_Tok
     (Node : Bare_Format_String_Chunk) return Bare_Format_String_Tok_Node
   is
   begin
         return Node.Format_String_Chunk_F_String_Tok;
   end;
--# property-start FormatStringChunk.xref_equation ada/nodes.lkt:20865
pragma Warnings (Off, "is not referenced");
 function Format_String_Chunk_P_Xref_Equation
  (Node : Bare_Format_String_Chunk
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Format_String_Chunk  := Bare_Format_String_Chunk (Node);
     Ent : Internal_Entity_Format_String_Chunk :=
       Internal_Entity_Format_String_Chunk'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1352 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Node_For_Entity : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1352 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1352;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 11982 '<LogicBinaryOp And at nodes.lkt:20866:9>' And_Pred ada/nodes.lkt:20866
--# expr-start 11977 '<FieldAccess for sub_equation at nodes.lkt:20866:9>' Fld_1 ada/nodes.lkt:20866
--# expr-start 11976 '<FieldAccess for expr at nodes.lkt:20866:9>' Fld ada/nodes.lkt:20866
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Format_String_Chunk_F_Expr, Info => Ent.Info);
--# expr-done 11976
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 11977
--# expr-start 11981 '<Bind at nodes.lkt:20869:14>' Bind_Result ada/nodes.lkt:20869
--# expr-start 11979 '<FieldAccess for expected_type_var at nodes.lkt:20869:14>' Fld_3 ada/nodes.lkt:20869
--# expr-start 11978 '<FieldAccess for expr at nodes.lkt:20869:14>' Fld_2 ada/nodes.lkt:20869
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Format_String_Chunk_F_Expr;
--# expr-done 11978
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2);
--# expr-done 11979
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 11980 '<No AdaNode at nodes.lkt:20869:47>' Node_For_Entity ada/nodes.lkt:20869
Node_For_Entity := No_Bare_Ada_Node;
--# expr-done 11980
Is_Null := Node_For_Entity = null; 
if Is_Null then
   If_Result := No_Entity;
else
As_Entity := (Info => E_Info, Node => Node_For_Entity); 
   If_Result := As_Entity;
end if;
Bind_Result := Solver.Create_Assign (Fld_3, If_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20869:14") else null)); 
--# expr-done 11981
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20866:9") else null)); 
--# expr-done 11982
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1352;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1352;
            raise;
      end;
   return Property_Result;
end Format_String_Chunk_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Format_String_Tok_Node
   --
   --
   --  Primitives for Bare_Format_String_Tok_End
   --
   --
   --  Primitives for Bare_Format_String_Tok_Mid
   --
   --
   --  Primitives for Bare_Format_String_Tok_Start
   --
   --
   --  Primitives for Bare_Format_String_Tok_String
   --
   --
   --  Primitives for Bare_Handled_Stmts
   --
      procedure Initialize_Fields_For_Handled_Stmts
        (Self : Bare_Handled_Stmts
         ; Handled_Stmts_F_Stmts : Bare_Stmt_List
         ; Handled_Stmts_F_Exceptions : Bare_Ada_Node_List
        ) is
      begin
            Self.Handled_Stmts_F_Stmts := Handled_Stmts_F_Stmts;
            Self.Handled_Stmts_F_Exceptions := Handled_Stmts_F_Exceptions;
      end Initialize_Fields_For_Handled_Stmts;
   function Handled_Stmts_F_Stmts
     (Node : Bare_Handled_Stmts) return Bare_Stmt_List
   is
   begin
         return Node.Handled_Stmts_F_Stmts;
   end;
   function Handled_Stmts_F_Exceptions
     (Node : Bare_Handled_Stmts) return Bare_Ada_Node_List
   is
   begin
         return Node.Handled_Stmts_F_Exceptions;
   end;
--# property-start HandledStmts.spark_mode_aspect ada/nodes.lkt:20905
pragma Warnings (Off, "is not referenced");
 function Handled_Stmts_P_Spark_Mode_Aspect
  (Node : Bare_Handled_Stmts
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Handled_Stmts  := Bare_Handled_Stmts (Node);
     Ent : Internal_Entity_Handled_Stmts :=
       Internal_Entity_Handled_Stmts'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Aspect;
            procedure Finalizer_Scope_1353 with Inline_Always;
      Var_Expr_2 : Internal_Entity;
Var_Expr_3 : Internal_Entity_Package_Body;
Fld : Internal_Entity_Stmt_List;
Fld_1 : Bare_Stmt_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result : Internal_Entity;
Is_A : Boolean;
Map_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Pragma_Node;
Fld_3 : Internal_Entity_Identifier;
Sym : Symbol_Type;
Fld_4 : Boolean;
Find_Result : Internal_Entity;
Cast_Expr_1 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Pragma_Node;
Fld_5 : Internal_Aspect;
Scope_Result : Internal_Aspect;
Fld_6 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Package_Body;
Fld_7 : Internal_Entity_Declarative_Part;
Fld_8 : Internal_Aspect;
Scope_Result_1 : Internal_Aspect;
Fld_9 : Internal_Entity;
Fld_10 : Internal_Aspect;
Result_Var : Internal_Aspect;
Result_Var_1 : Internal_Aspect;
            procedure Finalizer_Scope_1353 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1353;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 11990 '<Find at nodes.lkt:20906:9>' Find_Result ada/nodes.lkt:20906
   --# expr-start 11985 '<Map at nodes.lkt:20906:9>' Map_Result ada/nodes.lkt:20906
   --# expr-start 11983 '<FieldAccess for stmts at nodes.lkt:20906:9>' Fld ada/nodes.lkt:20906
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Stmt_List (Node => Ent.Node.Handled_Stmts_F_Stmts, Info => Ent.Info);
--# expr-done 11983
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
            Take_While_Ok : Boolean := False;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Array (0);
      else
      declare
         Collection : constant Bare_Stmt_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind stmt Item_0
         --# expr-start 11984 '<IsA Pragma at nodes.lkt:20906:41>' Is_A ada/nodes.lkt:20906
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Pragma_Node_Range; 
--# expr-done 11984
         Take_While_Ok := Is_A;
         if Take_While_Ok then
         declare
            Item_To_Append : constant Internal_Entity := Item_0;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
               exit when not Take_While_Ok;
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 11985
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Map_Result;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind stmt Item_1
      --# expr-start 11989 '<FieldAccess for name_is at nodes.lkt:20907:23>' Fld_4 ada/nodes.lkt:20907
--# expr-start 11987 '<FieldAccess for id at nodes.lkt:20907:23>' Fld_3 ada/nodes.lkt:20907
--# expr-start 11986 '<Cast to Pragma at nodes.lkt:20907:23>' Cast_Result ada/nodes.lkt:20907
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result := Create_Internal_Entity_Pragma_Node
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Pragma_Node;
   end if;
--# expr-done 11986
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Identifier (Node => Cast_Result.Node.Pragma_Node_F_Id, Info => Cast_Result.Info);
--# expr-done 11987
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 11988 '<Symbol SPARK_Mode at nodes.lkt:20907:50>' Sym ada/nodes.lkt:20907
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 11988
--# property-call-start Name.name_is
Fld_4 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_3.Node, Sym => Sym);
--# end
--# expr-done 11989
      if Fld_4 then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Fld_4;
         end loop;
      end;
--# expr-done 11990
Var_Expr_2 := Find_Result;
if Var_Expr_2 /= No_Entity then
   --# scope-start
   --# bind spark_mode Var_Expr_2
--# expr-start 11992 '<FieldAccess for as_aspect at nodes.lkt:20910:29>' Fld_5 ada/nodes.lkt:20910
--# expr-start 11991 '<Cast to Pragma at nodes.lkt:20910:29>' Cast_Result_1 ada/nodes.lkt:20910
Cast_Expr_1 := Var_Expr_2; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Pragma_Node_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Pragma_Node
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Pragma_Node;
   end if;
--# expr-done 11991
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.as_aspect
Fld_5 := Libadalang.Implementation.Pragma_Node_P_As_Aspect (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 11992
Scope_Result := Fld_5;
   --# end
   Result_Var_1 := Scope_Result;
else
--# expr-start 11994 '<Cast to PackageBody at nodes.lkt:20912:25>' Cast_Result_2 ada/nodes.lkt:20912
--# expr-start 11993 '<parent at nodes.lkt:20912:25>' Fld_6 ada/nodes.lkt:20912
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 11993
   if Fld_6.Node = null
      or else Fld_6.Node.Kind in Ada_Package_Body_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Package_Body
        (Node => Fld_6.Node,
         Info => Fld_6.Info);
   else
         Cast_Result_2 := No_Entity_Package_Body;
   end if;
--# expr-done 11994
Var_Expr_3 := Cast_Result_2;
if Var_Expr_3 /= No_Entity_Package_Body then
   --# scope-start
   --# bind body Var_Expr_3
--# expr-start 11996 '<FieldAccess for spark_mode_aspect at nodes.lkt:20913:27>' Fld_8 ada/nodes.lkt:20913
--# expr-start 11995 '<FieldAccess for decls at nodes.lkt:20913:27>' Fld_7 ada/nodes.lkt:20913
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Declarative_Part (Node => Var_Expr_3.Node.Package_Body_F_Decls, Info => Var_Expr_3.Info);
--# expr-done 11995
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.spark_mode_aspect'
Fld_8 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Spark_Mode_Aspect (Node => Fld_7.Node, E_Info => Fld_7.Info);
--# end
--# expr-done 11996
Scope_Result_1 := Fld_8;
   --# end
   Result_Var := Scope_Result_1;
else
   --# expr-start 11998 '<FieldAccess for spark_mode_aspect at nodes.lkt:20914:29>' Fld_10 ada/nodes.lkt:20914
--# expr-start 11997 '<FieldAccess for semantic_parent at nodes.lkt:20914:29>' Fld_9 ada/nodes.lkt:20914
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_9 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 11997
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.spark_mode_aspect'
Fld_10 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Spark_Mode_Aspect (Node => Fld_9.Node, E_Info => Fld_9.Info);
--# end
--# expr-done 11998
   Result_Var := Fld_10;
end if;
   Result_Var_1 := Result_Var;
end if;
         Property_Result := Result_Var_1;
   --# end
      Finalizer_Scope_1353;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1353;
            raise;
      end;
   return Property_Result;
end Handled_Stmts_P_Spark_Mode_Aspect;
--# end
   --
   --  Primitives for Bare_Interface_Kind
   --
   --
   --  Primitives for Bare_Interface_Kind_Limited
   --
   --
   --  Primitives for Bare_Interface_Kind_Protected
   --
   --
   --  Primitives for Bare_Interface_Kind_Synchronized
   --
   --
   --  Primitives for Bare_Interface_Kind_Task
   --
   --
   --  Primitives for Bare_Iter_Type
   --
   --
   --  Primitives for Bare_Iter_Type_In
   --
   --
   --  Primitives for Bare_Iter_Type_Of
   --
   --
   --  Primitives for Bare_Library_Item
   --
      procedure Initialize_Fields_For_Library_Item
        (Self : Bare_Library_Item
         ; Library_Item_F_Has_Private : Bare_Private_Node
         ; Library_Item_F_Item : Bare_Basic_Decl
        ) is
      begin
            Self.Library_Item_F_Has_Private := Library_Item_F_Has_Private;
            Self.Library_Item_F_Item := Library_Item_F_Item;
      end Initialize_Fields_For_Library_Item;
   function Library_Item_F_Has_Private
     (Node : Bare_Library_Item) return Bare_Private_Node
   is
   begin
         return Node.Library_Item_F_Has_Private;
   end;
   function Library_Item_F_Item
     (Node : Bare_Library_Item) return Bare_Basic_Decl
   is
   begin
         return Node.Library_Item_F_Item;
   end;
   --
   --  Primitives for Bare_Limited_Node
   --
--# property-start '[dispatcher]Limited.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Limited_Node_P_As_Bool
  (Node : Bare_Limited_Node
  )
   return Boolean
is
   Self : Bare_Limited_Node  := Bare_Limited_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Limited_Node (Self.Kind) is
               when Ada_Limited_Absent =>
                  --# property-call-start Limited.Absent.as_bool
                  Property_Result := Limited_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Limited_Present =>
                  --# property-call-start Limited.Present.as_bool
                  Property_Result := Limited_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Limited_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Limited_Absent
   --
--# property-start Limited.Absent.as_bool ada/nodes.lkt:20939
pragma Warnings (Off, "is not referenced");
 function Limited_Absent_P_As_Bool
  (Node : Bare_Limited_Absent
  )
   return Boolean
is
   Self : Bare_Limited_Absent  := Bare_Limited_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Limited_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Limited_Present
   --
--# property-start Limited.Present.as_bool ada/nodes.lkt:20939
pragma Warnings (Off, "is not referenced");
 function Limited_Present_P_As_Bool
  (Node : Bare_Limited_Present
  )
   return Boolean
is
   Self : Bare_Limited_Present  := Bare_Limited_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Limited_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Loop_Spec
   --
   --
   --  Primitives for Bare_For_Loop_Spec
   --
      procedure Initialize_Fields_For_For_Loop_Spec
        (Self : Bare_For_Loop_Spec
         ; For_Loop_Spec_F_Var_Decl : Bare_For_Loop_Var_Decl
         ; For_Loop_Spec_F_Loop_Type : Bare_Iter_Type
         ; For_Loop_Spec_F_Has_Reverse : Bare_Reverse_Node
         ; For_Loop_Spec_F_Iter_Expr : Bare_Ada_Node
         ; For_Loop_Spec_F_Iter_Filter : Bare_For_Loop_Iter_Filter
        ) is
      begin
            Self.For_Loop_Spec_F_Var_Decl := For_Loop_Spec_F_Var_Decl;
            Self.For_Loop_Spec_F_Loop_Type := For_Loop_Spec_F_Loop_Type;
            Self.For_Loop_Spec_F_Has_Reverse := For_Loop_Spec_F_Has_Reverse;
            Self.For_Loop_Spec_F_Iter_Expr := For_Loop_Spec_F_Iter_Expr;
            Self.For_Loop_Spec_F_Iter_Filter := For_Loop_Spec_F_Iter_Filter;
      end Initialize_Fields_For_For_Loop_Spec;
   function For_Loop_Spec_F_Var_Decl
     (Node : Bare_For_Loop_Spec) return Bare_For_Loop_Var_Decl
   is
   begin
         return Node.For_Loop_Spec_F_Var_Decl;
   end;
   function For_Loop_Spec_F_Loop_Type
     (Node : Bare_For_Loop_Spec) return Bare_Iter_Type
   is
   begin
         return Node.For_Loop_Spec_F_Loop_Type;
   end;
   function For_Loop_Spec_F_Has_Reverse
     (Node : Bare_For_Loop_Spec) return Bare_Reverse_Node
   is
   begin
         return Node.For_Loop_Spec_F_Has_Reverse;
   end;
   function For_Loop_Spec_F_Iter_Expr
     (Node : Bare_For_Loop_Spec) return Bare_Ada_Node
   is
   begin
         return Node.For_Loop_Spec_F_Iter_Expr;
   end;
   function For_Loop_Spec_F_Iter_Filter
     (Node : Bare_For_Loop_Spec) return Bare_For_Loop_Iter_Filter
   is
   begin
         return Node.For_Loop_Spec_F_Iter_Filter;
   end;
--# property-start ForLoopSpec.is_iterated_assoc_spec ada/nodes.lkt:20963
pragma Warnings (Off, "is not referenced");
 function For_Loop_Spec_P_Is_Iterated_Assoc_Spec
  (Node : Bare_For_Loop_Spec
  )
   return Boolean
is
   Self : Bare_For_Loop_Spec  := Bare_For_Loop_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12000 '<IsA IteratedAssoc at nodes.lkt:20963:42>' Is_A ada/nodes.lkt:20963
--# expr-start 11999 '<parent at nodes.lkt:20963:42>' Fld ada/nodes.lkt:20963
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 11999
Is_A := Fld /= null 
and then Fld.Kind in Ada_Iterated_Assoc_Range; 
--# expr-done 12000
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end For_Loop_Spec_P_Is_Iterated_Assoc_Spec;
--# end
--# property-start ForLoopSpec.xref_equation ada/nodes.lkt:20966
pragma Warnings (Off, "is not referenced");
 function For_Loop_Spec_P_Xref_Equation
  (Node : Bare_For_Loop_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_For_Loop_Spec  := Bare_For_Loop_Spec (Node);
     Ent : Internal_Entity_For_Loop_Spec :=
       Internal_Entity_For_Loop_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1358 with Inline_Always;
            procedure Finalizer_Scope_3483 with Inline_Always;
            procedure Finalizer_Scope_3484 with Inline_Always;
            procedure Finalizer_Scope_3485 with Inline_Always;
            procedure Finalizer_Scope_3486 with Inline_Always;
            procedure Finalizer_Scope_3487 with Inline_Always;
            procedure Finalizer_Scope_3488 with Inline_Always;
            procedure Finalizer_Scope_3489 with Inline_Always;
            procedure Finalizer_Scope_3490 with Inline_Always;
            procedure Finalizer_Scope_3491 with Inline_Always;
            procedure Finalizer_Scope_3492 with Inline_Always;
      Match_0 : Bare_Iter_Type_In;
Match_0_1 : Internal_Entity_Bin_Op;
Match_1 : Internal_Entity_Subtype_Indication;
Match_2 : Internal_Entity_Attribute_Ref;
Match_3 : Internal_Entity_Name;
Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Match_4 : Internal_Entity;
Match_1_1 : Bare_Iter_Type_Of;
Var_Expr_1 : Internal_Entity_Expr;
Var_Expr_2 : Internal_Entity_Type_Expr;
Fld : Internal_Entity_For_Loop_Var_Decl;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Iter_Type;
Fld_3 : Internal_Entity;
Fld_4 : Logic_Equation;
Fld_5 : Logic_Var;
Pred : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Bare_For_Loop_Var_Decl;
Fld_7 : Bare_Defining_Name;
Fld_8 : Logic_Var;
Fld_9 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_10 : Logic_Equation;
Fld_11 : Bare_For_Loop_Var_Decl;
Fld_12 : Bare_Defining_Name;
Fld_13 : Logic_Var;
Fld_14 : Internal_Entity_Base_Type_Decl;
Fld_15 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_16 : Logic_Equation;
Fld_17 : Bare_For_Loop_Var_Decl;
Fld_18 : Bare_Defining_Name;
Fld_19 : Logic_Var;
Fld_20 : Logic_Var;
Bind_Result_2 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_21 : Logic_Equation;
Fld_22 : Internal_Entity_Base_Type_Decl;
Fld_23 : Bare_For_Loop_Var_Decl;
Fld_24 : Bare_Defining_Name;
Fld_25 : Logic_Var;
Fld_26 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_3 : Logic_Equation;
Scope_Result : Logic_Equation;
Fld_27 : Logic_Var;
Pred_1 : Logic_Equation;
Fld_28 : Logic_Var;
Pred_2 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_29 : Bare_For_Loop_Var_Decl;
Fld_30 : Bare_Defining_Name;
Fld_31 : Logic_Var;
Fld_32 : Logic_Var;
Bind_Result_4 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_6 : Logic_Equation;
True_Rel : Logic_Equation;
Match_Prefix : Internal_Entity;
Cast_Result_2 : Internal_Entity_Bin_Op;
Let_Result : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_3 : Internal_Entity_Subtype_Indication;
Let_Result_1 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Cast_Result_4 : Internal_Entity_Attribute_Ref;
Let_Result_2 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
Cast_Result_5 : Internal_Entity_Name;
Let_Result_3 : Logic_Equation;
Scope_Result_4 : Logic_Equation;
Cast_Result_6 : Internal_Entity;
Let_Result_4 : Logic_Equation;
Scope_Result_5 : Logic_Equation;
Match_Result : Logic_Equation;
Fld_33 : Internal_Entity;
Cast_Result_7 : Internal_Entity_Expr;
Fld_34 : Internal_Entity_For_Loop_Var_Decl;
Fld_35 : Internal_Entity_Type_Expr;
Fld_36 : Logic_Var;
Fld_37 : Internal_Entity_Base_Type_Decl;
Cast_Result_8 : Internal_Entity;
Bind_Result_5 : Logic_Equation;
Scope_Result_6 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
Fld_38 : Logic_Equation;
And_Pred_7 : Logic_Equation;
Fld_39 : Logic_Var;
Pred_3 : Logic_Equation;
And_Pred_8 : Logic_Equation;
Fld_40 : Bare_For_Loop_Var_Decl;
Fld_41 : Bare_Defining_Name;
Fld_42 : Logic_Var;
Fld_43 : Logic_Var;
Bind_Result_6 : Logic_Equation;
And_Pred_9 : Logic_Equation;
Scope_Result_7 : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var_2 : Logic_Equation;
Match_Prefix_1 : Bare_Iter_Type;
Cast_Result_9 : Bare_Iter_Type_In;
Let_Result_5 : Logic_Equation;
Scope_Result_8 : Logic_Equation;
Cast_Result_10 : Bare_Iter_Type_Of;
Let_Result_6 : Logic_Equation;
Scope_Result_9 : Logic_Equation;
Match_Result_1 : Logic_Equation;
And_Pred_10 : Logic_Equation;
            procedure Finalizer_Scope_1358 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Scope_Result_8);
                     Dec_Ref (Let_Result_6);
                     Dec_Ref (Scope_Result_9);
                     Dec_Ref (Match_Result_1);
                     Dec_Ref (And_Pred_10);
            end Finalizer_Scope_1358;
            procedure Finalizer_Scope_3483 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_4);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_3483;
            procedure Finalizer_Scope_3484 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3484;
            procedure Finalizer_Scope_3485 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_3485;
            procedure Finalizer_Scope_3486 is
            begin
                     Dec_Ref (Fld_16);
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_3486;
            procedure Finalizer_Scope_3487 is
            begin
                     Dec_Ref (Fld_21);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Pred_1);
                     Dec_Ref (Pred_2);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_6);
            end Finalizer_Scope_3487;
            procedure Finalizer_Scope_3488 is
            begin
                     Dec_Ref (Bind_Result_3);
            end Finalizer_Scope_3488;
            procedure Finalizer_Scope_3489 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_3489;
            procedure Finalizer_Scope_3490 is
            begin
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var_2);
            end Finalizer_Scope_3490;
            procedure Finalizer_Scope_3491 is
            begin
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Fld_38);
                     Dec_Ref (And_Pred_7);
                     Dec_Ref (Pred_3);
                     Dec_Ref (And_Pred_8);
                     Dec_Ref (Bind_Result_6);
                     Dec_Ref (And_Pred_9);
            end Finalizer_Scope_3491;
            procedure Finalizer_Scope_3492 is
            begin
                     Dec_Ref (Bind_Result_5);
            end Finalizer_Scope_3492;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12069 '<LogicBinaryOp And at nodes.lkt:20967:9>' And_Pred_10 ada/nodes.lkt:20967
--# expr-start 12002 '<FieldAccess for sub_equation at nodes.lkt:20967:9>' Fld_1 ada/nodes.lkt:20967
--# expr-start 12001 '<FieldAccess for var_decl at nodes.lkt:20967:9>' Fld ada/nodes.lkt:20967
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_For_Loop_Var_Decl (Node => Ent.Node.For_Loop_Spec_F_Var_Decl, Info => Ent.Info);
--# expr-done 12001
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12002
--# expr-start 12068 '<Match at nodes.lkt:20968:14>' Match_Result_1 ada/nodes.lkt:20968
--# expr-start 12003 '<FieldAccess for loop_type at nodes.lkt:20968:20>' Fld_2 ada/nodes.lkt:20968
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.For_Loop_Spec_F_Loop_Type;
--# expr-done 12003
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Fld_2; 
case Ada_Iter_Type (Match_Prefix_1.Kind) is
         when Ada_Iter_Type_In =>
   --# scope-start
--# scope-start
      Cast_Result_9 := Match_Prefix_1;
Match_0 := Cast_Result_9; 
--# bind _ Match_0
--# expr-start 12049 '<Match at nodes.lkt:20972:17>' Match_Result ada/nodes.lkt:20972
--# expr-start 12004 '<FieldAccess for iter_expr at nodes.lkt:20972:23>' Fld_3 ada/nodes.lkt:20972
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity (Node => Ent.Node.For_Loop_Spec_F_Iter_Expr, Info => Ent.Info);
--# expr-done 12004
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_3; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Bin_Op .. Ada_Relation_Op =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Bin_Op
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0_1 := Cast_Result_2; 
--# bind binop Match_0_1
--# expr-start 12014 '<LogicBinaryOp And at nodes.lkt:20975:25>' And_Pred_1 ada/nodes.lkt:20975
--# expr-start 12008 '<LogicBinaryOp And at nodes.lkt:20976:29>' And_Pred ada/nodes.lkt:20976
--# expr-start 12005 '<FieldAccess for sub_equation at nodes.lkt:20976:29>' Fld_4 ada/nodes.lkt:20976
      if Match_0_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_0_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_0_1.Info);
--# end
--# expr-done 12005
--# expr-start 12007 '<Predicate on BaseTypeDecl.is_not_root_int_type at nodes.lkt:20980:33>' Pred ada/nodes.lkt:20980
--# expr-start 12006 '<FieldAccess for type_var at nodes.lkt:20980:68>' Fld_5 ada/nodes.lkt:20980
      if Match_0_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Match_0_1.Node);
--# expr-done 12006
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Pred := Solver.Create_Predicate (Fld_5, Create_Base_Type_Decl_P_Is_Not_Root_Int_Type_0_Predicate); 
--# expr-done 12007
And_Pred := Create_And (Fld_4, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20976:29") else null)); 
--# expr-done 12008
--# expr-start 12013 '<Bind at nodes.lkt:20984:30>' Bind_Result ada/nodes.lkt:20984
--# expr-start 12011 '<FieldAccess for type_var at nodes.lkt:20984:30>' Fld_8 ada/nodes.lkt:20984
--# expr-start 12010 '<FieldAccess for id at nodes.lkt:20984:30>' Fld_7 ada/nodes.lkt:20984
--# expr-start 12009 '<FieldAccess for var_decl at nodes.lkt:20984:30>' Fld_6 ada/nodes.lkt:20984
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.For_Loop_Spec_F_Var_Decl;
--# expr-done 12009
      if Fld_6 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Fld_6.For_Loop_Var_Decl_F_Id;
--# expr-done 12010
      if Fld_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_7);
--# expr-done 12011
Fld_8.Value := No_Entity;
Entity_Vars.Reset (Fld_8);
--# expr-start 12012 '<FieldAccess for type_var at nodes.lkt:20984:62>' Fld_9 ada/nodes.lkt:20984
      if Match_0_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Match_0_1.Node);
--# expr-done 12012
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
Bind_Result := Solver.Create_Unify (Fld_8, Fld_9, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20984:30") else null)); 
--# expr-done 12013
And_Pred_1 := Create_And (And_Pred, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20975:25") else null)); 
--# expr-done 12014
Let_Result := And_Pred_1; Inc_Ref (Let_Result);
--# end
Scope_Result_1 := Let_Result;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3484;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind t Match_1
--# expr-start 12022 '<LogicBinaryOp And at nodes.lkt:20989:25>' And_Pred_2 ada/nodes.lkt:20989
--# expr-start 12015 '<FieldAccess for sub_equation at nodes.lkt:20989:25>' Fld_10 ada/nodes.lkt:20989
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_10 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_1.Info);
--# end
--# expr-done 12015
--# expr-start 12021 '<Bind at nodes.lkt:20990:30>' Bind_Result_1 ada/nodes.lkt:20990
--# expr-start 12018 '<FieldAccess for type_var at nodes.lkt:20990:30>' Fld_13 ada/nodes.lkt:20990
--# expr-start 12017 '<FieldAccess for id at nodes.lkt:20990:30>' Fld_12 ada/nodes.lkt:20990
--# expr-start 12016 '<FieldAccess for var_decl at nodes.lkt:20990:30>' Fld_11 ada/nodes.lkt:20990
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.For_Loop_Spec_F_Var_Decl;
--# expr-done 12016
      if Fld_11 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Fld_11.For_Loop_Var_Decl_F_Id;
--# expr-done 12017
      if Fld_12 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_12);
--# expr-done 12018
Fld_13.Value := No_Entity;
Entity_Vars.Reset (Fld_13);
--# expr-start 12020 '<FieldAccess for canonical_type at nodes.lkt:20991:28>' Fld_15 ada/nodes.lkt:20991
--# expr-start 12019 '<FieldAccess for designated_type at nodes.lkt:20991:28>' Fld_14 ada/nodes.lkt:20991
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_14 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Match_1.Node, Origin => Origin, E_Info => Match_1.Info);
--# end
--# expr-done 12019
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_15 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Fld_14.Node, Origin => Origin, E_Info => Fld_14.Info);
--# end
--# expr-done 12020
      Cast_Result := Create_Internal_Entity
        (Node => Fld_15.Node,
         Info => Fld_15.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_13, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20990:30") else null)); 
--# expr-done 12021
And_Pred_2 := Create_And (Fld_10, Bind_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20989:25") else null)); 
--# expr-done 12022
Let_Result_1 := And_Pred_2; Inc_Ref (Let_Result_1);
--# end
Scope_Result_2 := Let_Result_1;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3485;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Attribute_Ref
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind r Match_2
--# expr-start 12029 '<LogicBinaryOp And at nodes.lkt:20993:25>' And_Pred_3 ada/nodes.lkt:20993
--# expr-start 12023 '<FieldAccess for sub_equation at nodes.lkt:20993:25>' Fld_16 ada/nodes.lkt:20993
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_16 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_2.Info);
--# end
--# expr-done 12023
--# expr-start 12028 '<Bind at nodes.lkt:20994:30>' Bind_Result_2 ada/nodes.lkt:20994
--# expr-start 12026 '<FieldAccess for type_var at nodes.lkt:20994:30>' Fld_19 ada/nodes.lkt:20994
--# expr-start 12025 '<FieldAccess for id at nodes.lkt:20994:30>' Fld_18 ada/nodes.lkt:20994
--# expr-start 12024 '<FieldAccess for var_decl at nodes.lkt:20994:30>' Fld_17 ada/nodes.lkt:20994
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_17 := Self.For_Loop_Spec_F_Var_Decl;
--# expr-done 12024
      if Fld_17 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Fld_17.For_Loop_Var_Decl_F_Id;
--# expr-done 12025
      if Fld_18 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_18);
--# expr-done 12026
Fld_19.Value := No_Entity;
Entity_Vars.Reset (Fld_19);
--# expr-start 12027 '<FieldAccess for type_var at nodes.lkt:20994:62>' Fld_20 ada/nodes.lkt:20994
      if Match_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Match_2.Node);
--# expr-done 12027
Fld_20.Value := No_Entity;
Entity_Vars.Reset (Fld_20);
Bind_Result_2 := Solver.Create_Unify (Fld_19, Fld_20, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20994:30") else null)); 
--# expr-done 12028
And_Pred_3 := Create_And (Fld_16, Bind_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20993:25") else null)); 
--# expr-done 12029
Let_Result_2 := And_Pred_3; Inc_Ref (Let_Result_2);
--# end
Scope_Result_3 := Let_Result_2;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3486;
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name | Ada_Call_Expr .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_5; 
--# bind t Match_3
--# expr-start 12048 '<LogicBinaryOp And at nodes.lkt:21001:25>' And_Pred_6 ada/nodes.lkt:21001
--# expr-start 12030 '<FieldAccess for sub_equation at nodes.lkt:21001:25>' Fld_21 ada/nodes.lkt:21001
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_21 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_3.Info);
--# end
--# expr-done 12030
--# expr-start 12031 '<FieldAccess for name_designated_type at nodes.lkt:21002:30>' Fld_22 ada/nodes.lkt:21002
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_22 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Match_3.Node, E_Info => Match_3.Info);
--# end
--# expr-done 12031
Var_Expr_0 := Fld_22;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind typ Var_Expr_0
--# expr-start 12036 '<Bind at nodes.lkt:21004:29>' Bind_Result_3 ada/nodes.lkt:21004
--# expr-start 12034 '<FieldAccess for type_var at nodes.lkt:21004:29>' Fld_25 ada/nodes.lkt:21004
--# expr-start 12033 '<FieldAccess for id at nodes.lkt:21004:29>' Fld_24 ada/nodes.lkt:21004
--# expr-start 12032 '<FieldAccess for var_decl at nodes.lkt:21004:29>' Fld_23 ada/nodes.lkt:21004
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Self.For_Loop_Spec_F_Var_Decl;
--# expr-done 12032
      if Fld_23 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Fld_23.For_Loop_Var_Decl_F_Id;
--# expr-done 12033
      if Fld_24 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_24);
--# expr-done 12034
Fld_25.Value := No_Entity;
Entity_Vars.Reset (Fld_25);
--# expr-start 12035 '<FieldAccess for canonical_type at nodes.lkt:21005:32>' Fld_26 ada/nodes.lkt:21005
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_26 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 12035
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_26.Node,
         Info => Fld_26.Info);
Bind_Result_3 := Solver.Create_Assign (Fld_25, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21004:29") else null)); 
--# expr-done 12036
Scope_Result := Bind_Result_3;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3488;
   Result_Var := Scope_Result;
else
   --# expr-start 12047 '<LogicBinaryOp And at nodes.lkt:21006:41>' And_Pred_5 ada/nodes.lkt:21006
--# expr-start 12041 '<LogicBinaryOp And at nodes.lkt:21006:41>' And_Pred_4 ada/nodes.lkt:21006
--# expr-start 12038 '<Predicate on AdaNode.is_not_null at nodes.lkt:21010:33>' Pred_1 ada/nodes.lkt:21010
--# expr-start 12037 '<FieldAccess for type_var at nodes.lkt:21010:54>' Fld_27 ada/nodes.lkt:21010
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Match_3.Node);
--# expr-done 12037
Fld_27.Value := No_Entity;
Entity_Vars.Reset (Fld_27);
Pred_1 := Solver.Create_Predicate (Fld_27, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 12038
--# expr-start 12040 '<Predicate on BaseTypeDecl.is_iterator_type at nodes.lkt:21012:34>' Pred_2 ada/nodes.lkt:21012
--# expr-start 12039 '<FieldAccess for type_var at nodes.lkt:21012:65>' Fld_28 ada/nodes.lkt:21012
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Match_3.Node);
--# expr-done 12039
Fld_28.Value := No_Entity;
Entity_Vars.Reset (Fld_28);
Pred_2 := Solver.Create_Predicate (Fld_28, Create_Base_Type_Decl_P_Is_Iterator_Type_0_Predicate (Origin)); 
--# expr-done 12040
And_Pred_4 := Create_And (Pred_1, Pred_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21006:41") else null)); 
--# expr-done 12041
--# expr-start 12046 '<NPropagate at nodes.lkt:21013:34>' Bind_Result_4 ada/nodes.lkt:21013
--# expr-start 12042 '<FieldAccess for type_var at nodes.lkt:21014:58>' Fld_32 ada/nodes.lkt:21014
      if Match_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_32 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Match_3.Node);
--# expr-done 12042
Fld_32.Value := No_Entity;
Entity_Vars.Reset (Fld_32);
--# expr-start 12045 '<FieldAccess for type_var at nodes.lkt:21013:34>' Fld_31 ada/nodes.lkt:21013
--# expr-start 12044 '<FieldAccess for id at nodes.lkt:21013:34>' Fld_30 ada/nodes.lkt:21013
--# expr-start 12043 '<FieldAccess for var_decl at nodes.lkt:21013:34>' Fld_29 ada/nodes.lkt:21013
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_29 := Self.For_Loop_Spec_F_Var_Decl;
--# expr-done 12043
      if Fld_29 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Fld_29.For_Loop_Var_Decl_F_Id;
--# expr-done 12044
      if Fld_30 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_30);
--# expr-done 12045
Fld_31.Value := No_Entity;
Entity_Vars.Reset (Fld_31);
Bind_Result_4 := Solver.Create_Propagate (Fld_32, Fld_31, Logic_Functor_880'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21013:34") else null)); 
--# expr-done 12046
And_Pred_5 := Create_And (And_Pred_4, Bind_Result_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21006:41") else null)); 
--# expr-done 12047
   Result_Var := And_Pred_5;
end if;
      Inc_Ref (Result_Var);
And_Pred_6 := Create_And (Fld_21, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21001:25") else null)); 
--# expr-done 12048
Let_Result_3 := And_Pred_6; Inc_Ref (Let_Result_3);
--# end
Scope_Result_4 := Let_Result_3;
   Inc_Ref (Scope_Result_4);
   --# end
      Finalizer_Scope_3487;
            Match_Result := Scope_Result_4; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Null_Record_Aggregate | Ada_Box_Expr .. Ada_Membership_Expr | Ada_Paren_Expr .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_4 := Cast_Result_6; 
--# bind _ Match_4
True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21016:31") else null)); 
Let_Result_4 := True_Rel; Inc_Ref (Let_Result_4);
--# end
Scope_Result_5 := Let_Result_4;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_3489;
            Match_Result := Scope_Result_5; Inc_Ref (Match_Result);
end case;
--# expr-done 12049
Let_Result_5 := Match_Result; Inc_Ref (Let_Result_5);
--# end
Scope_Result_8 := Let_Result_5;
   Inc_Ref (Scope_Result_8);
   --# end
      Finalizer_Scope_3483;
            Match_Result_1 := Scope_Result_8; Inc_Ref (Match_Result_1);
         when Ada_Iter_Type_Of =>
   --# scope-start
--# scope-start
      Cast_Result_10 := Match_Prefix_1;
Match_1_1 := Cast_Result_10; 
--# bind _ Match_1_1
--# expr-start 12051 '<Cast to Expr at nodes.lkt:21021:17>' Cast_Result_7 ada/nodes.lkt:21021
--# expr-start 12050 '<FieldAccess for iter_expr at nodes.lkt:21021:17>' Fld_33 ada/nodes.lkt:21021
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_33 := Create_Internal_Entity (Node => Ent.Node.For_Loop_Spec_F_Iter_Expr, Info => Ent.Info);
--# expr-done 12050
   if Fld_33.Node = null
      or else Fld_33.Node.Kind in Ada_Expr
   then
      Cast_Result_7 := Create_Internal_Entity_Expr
        (Node => Fld_33.Node,
         Info => Fld_33.Info);
   else
         Cast_Result_7 := No_Entity_Expr;
   end if;
--# expr-done 12051
Var_Expr_1 := Cast_Result_7;
if Var_Expr_1 /= No_Entity_Expr then
   --# scope-start
   --# bind iter_expr Var_Expr_1
--# expr-start 12067 '<LogicBinaryOp And at nodes.lkt:21023:21>' And_Pred_9 ada/nodes.lkt:21023
--# expr-start 12061 '<LogicBinaryOp And at nodes.lkt:21024:25>' And_Pred_8 ada/nodes.lkt:21024
--# expr-start 12058 '<LogicBinaryOp And at nodes.lkt:21025:29>' And_Pred_7 ada/nodes.lkt:21025
--# expr-start 12053 '<FieldAccess for id_type at nodes.lkt:21025:29>' Fld_35 ada/nodes.lkt:21025
--# expr-start 12052 '<FieldAccess for var_decl at nodes.lkt:21025:29>' Fld_34 ada/nodes.lkt:21025
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_34 := Create_Internal_Entity_For_Loop_Var_Decl (Node => Ent.Node.For_Loop_Spec_F_Var_Decl, Info => Ent.Info);
--# expr-done 12052
      if Fld_34.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_35 := Create_Internal_Entity_Type_Expr (Node => Fld_34.Node.For_Loop_Var_Decl_F_Id_Type, Info => Fld_34.Info);
--# expr-done 12053
Var_Expr_2 := Fld_35;
if Var_Expr_2 /= No_Entity_Type_Expr then
   --# scope-start
   --# bind typ Var_Expr_2
--# expr-start 12056 '<Bind at nodes.lkt:21027:33>' Bind_Result_5 ada/nodes.lkt:21027
--# expr-start 12054 '<FieldAccess for expected_type_var at nodes.lkt:21027:33>' Fld_36 ada/nodes.lkt:21027
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_36 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 12054
Fld_36.Value := No_Entity;
Entity_Vars.Reset (Fld_36);
--# expr-start 12055 '<FieldAccess for designated_type at nodes.lkt:21028:36>' Fld_37 ada/nodes.lkt:21028
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_37 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Var_Expr_2.Node, Origin => Origin, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 12055
      Cast_Result_8 := Create_Internal_Entity
        (Node => Fld_37.Node,
         Info => Fld_37.Info);
Bind_Result_5 := Solver.Create_Assign (Fld_36, Cast_Result_8, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21027:33") else null)); 
--# expr-done 12056
Scope_Result_6 := Bind_Result_5;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_3492;
   Result_Var_1 := Scope_Result_6;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21029:45") else null)); 
   Result_Var_1 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
--# expr-start 12057 '<FieldAccess for sub_equation at nodes.lkt:21031:34>' Fld_38 ada/nodes.lkt:21031
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_38 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 12057
And_Pred_7 := Create_And (Result_Var_1, Fld_38, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21025:29") else null)); 
--# expr-done 12058
--# expr-start 12060 '<Predicate on AdaNode.is_not_null at nodes.lkt:21033:30>' Pred_3 ada/nodes.lkt:21033
--# expr-start 12059 '<FieldAccess for type_var at nodes.lkt:21033:51>' Fld_39 ada/nodes.lkt:21033
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_39 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 12059
Fld_39.Value := No_Entity;
Entity_Vars.Reset (Fld_39);
Pred_3 := Solver.Create_Predicate (Fld_39, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 12060
And_Pred_8 := Create_And (And_Pred_7, Pred_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21024:25") else null)); 
--# expr-done 12061
--# expr-start 12066 '<NPropagate at nodes.lkt:21035:26>' Bind_Result_6 ada/nodes.lkt:21035
--# expr-start 12062 '<FieldAccess for type_var at nodes.lkt:21037:25>' Fld_43 ada/nodes.lkt:21037
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_43 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 12062
Fld_43.Value := No_Entity;
Entity_Vars.Reset (Fld_43);
--# expr-start 12065 '<FieldAccess for type_var at nodes.lkt:21035:26>' Fld_42 ada/nodes.lkt:21035
--# expr-start 12064 '<FieldAccess for id at nodes.lkt:21035:26>' Fld_41 ada/nodes.lkt:21035
--# expr-start 12063 '<FieldAccess for var_decl at nodes.lkt:21035:26>' Fld_40 ada/nodes.lkt:21035
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_40 := Self.For_Loop_Spec_F_Var_Decl;
--# expr-done 12063
      if Fld_40 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_41 := Fld_40.For_Loop_Var_Decl_F_Id;
--# expr-done 12064
      if Fld_41 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_42 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_41);
--# expr-done 12065
Fld_42.Value := No_Entity;
Entity_Vars.Reset (Fld_42);
Bind_Result_6 := Solver.Create_Propagate (Fld_43, Fld_42, Logic_Functor_902'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21035:26") else null)); 
--# expr-done 12066
And_Pred_9 := Create_And (And_Pred_8, Bind_Result_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21023:21") else null)); 
--# expr-done 12067
Scope_Result_7 := And_Pred_9;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3491;
   Result_Var_2 := Scope_Result_7;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21039:33") else null)); 
   Result_Var_2 := False_Rel;
end if;
      Inc_Ref (Result_Var_2);
Let_Result_6 := Result_Var_2; Inc_Ref (Let_Result_6);
--# end
Scope_Result_9 := Let_Result_6;
   Inc_Ref (Scope_Result_9);
   --# end
      Finalizer_Scope_3490;
            Match_Result_1 := Scope_Result_9; Inc_Ref (Match_Result_1);
end case;
--# expr-done 12068
And_Pred_10 := Create_And (Fld_1, Match_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:20967:9") else null)); 
--# expr-done 12069
         Property_Result := And_Pred_10;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1358;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1358;
                     Finalizer_Scope_3483;
                     Finalizer_Scope_3484;
                     Finalizer_Scope_3485;
                     Finalizer_Scope_3486;
                     Finalizer_Scope_3487;
                     Finalizer_Scope_3488;
                     Finalizer_Scope_3489;
                     Finalizer_Scope_3490;
                     Finalizer_Scope_3491;
                     Finalizer_Scope_3492;
            raise;
      end;
   return Property_Result;
end For_Loop_Spec_P_Xref_Equation;
--# end
--# property-start ForLoopSpec.xref_entry_point ada/nodes.lkt:21046
pragma Warnings (Off, "is not referenced");
 function For_Loop_Spec_P_Xref_Entry_Point
  (Node : Bare_For_Loop_Spec
  )
   return Boolean
is
   Self : Bare_For_Loop_Spec  := Bare_For_Loop_Spec (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12071 '<Not at nodes.lkt:21046:36>' Not_Val ada/nodes.lkt:21046
--# expr-start 12070 '<FieldAccess for is_iterated_assoc_spec at nodes.lkt:21046:40>' Fld ada/nodes.lkt:21046
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ForLoopSpec.is_iterated_assoc_spec
Fld := Libadalang.Implementation.For_Loop_Spec_P_Is_Iterated_Assoc_Spec (Node => Self);
--# end
--# expr-done 12070
Not_Val := not (Fld); 
--# expr-done 12071
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end For_Loop_Spec_P_Xref_Entry_Point;
--# end
   --
   --  Primitives for Bare_While_Loop_Spec
   --
      procedure Initialize_Fields_For_While_Loop_Spec
        (Self : Bare_While_Loop_Spec
         ; While_Loop_Spec_F_Expr : Bare_Expr
        ) is
      begin
            Self.While_Loop_Spec_F_Expr := While_Loop_Spec_F_Expr;
      end Initialize_Fields_For_While_Loop_Spec;
   function While_Loop_Spec_F_Expr
     (Node : Bare_While_Loop_Spec) return Bare_Expr
   is
   begin
         return Node.While_Loop_Spec_F_Expr;
   end;
--# property-start WhileLoopSpec.xref_equation ada/nodes.lkt:21055
pragma Warnings (Off, "is not referenced");
 function While_Loop_Spec_P_Xref_Equation
  (Node : Bare_While_Loop_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_While_Loop_Spec  := Bare_While_Loop_Spec (Node);
     Ent : Internal_Entity_While_Loop_Spec :=
       Internal_Entity_While_Loop_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1360 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1360 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1360;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12076 '<LogicBinaryOp And at nodes.lkt:21056:9>' And_Pred ada/nodes.lkt:21056
--# expr-start 12073 '<FieldAccess for sub_equation at nodes.lkt:21056:9>' Fld_1 ada/nodes.lkt:21056
--# expr-start 12072 '<FieldAccess for expr at nodes.lkt:21056:9>' Fld ada/nodes.lkt:21056
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.While_Loop_Spec_F_Expr, Info => Ent.Info);
--# expr-done 12072
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12073
--# expr-start 12075 '<FieldAccess for expect_bool_derived_type at nodes.lkt:21056:39>' Fld_3 ada/nodes.lkt:21056
--# expr-start 12074 '<FieldAccess for expr at nodes.lkt:21056:39>' Fld_2 ada/nodes.lkt:21056
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.While_Loop_Spec_F_Expr, Info => Ent.Info);
--# expr-done 12074
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_3 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Fld_2.Node, Origin => Origin);
--# end
--# expr-done 12075
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21056:9") else null)); 
--# expr-done 12076
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1360;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1360;
            raise;
      end;
   return Property_Result;
end While_Loop_Spec_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Mode
   --
--# property-start Mode.is_writable ada/nodes.lkt:21065
pragma Warnings (Off, "is not referenced");
 function Mode_P_Is_Writable
  (Node : Bare_Mode
  )
   return Boolean
is
   Self : Bare_Mode  := Bare_Mode (Node);
      --# bind self Self
   Property_Result : Boolean;
      Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12077 '<IsA Mode.Out, Mode.InOut at nodes.lkt:21065:31>' Is_A ada/nodes.lkt:21065
Is_A := Self /= null 
and then Self.Kind in Ada_Mode_Out_Range | Ada_Mode_In_Out_Range; 
--# expr-done 12077
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Mode_P_Is_Writable;
--# end
   --
   --  Primitives for Bare_Mode_Default
   --
   --
   --  Primitives for Bare_Mode_In
   --
   --
   --  Primitives for Bare_Mode_In_Out
   --
   --
   --  Primitives for Bare_Mode_Out
   --
   --
   --  Primitives for Bare_Multi_Abstract_State_Decl
   --
      procedure Initialize_Fields_For_Multi_Abstract_State_Decl
        (Self : Bare_Multi_Abstract_State_Decl
         ; Multi_Abstract_State_Decl_F_Decls : Bare_Abstract_State_Decl_List
        ) is
      begin
            Self.Multi_Abstract_State_Decl_F_Decls := Multi_Abstract_State_Decl_F_Decls;
      end Initialize_Fields_For_Multi_Abstract_State_Decl;
   function Multi_Abstract_State_Decl_F_Decls
     (Node : Bare_Multi_Abstract_State_Decl) return Bare_Abstract_State_Decl_List
   is
   begin
         return Node.Multi_Abstract_State_Decl_F_Decls;
   end;
   --
   --  Primitives for Bare_Not_Null
   --
--# property-start '[dispatcher]NotNull.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Not_Null_P_As_Bool
  (Node : Bare_Not_Null
  )
   return Boolean
is
   Self : Bare_Not_Null  := Bare_Not_Null (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Not_Null (Self.Kind) is
               when Ada_Not_Null_Absent =>
                  --# property-call-start NotNull.Absent.as_bool
                  Property_Result := Not_Null_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Not_Null_Present =>
                  --# property-call-start NotNull.Present.as_bool
                  Property_Result := Not_Null_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Not_Null_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Not_Null_Absent
   --
--# property-start NotNull.Absent.as_bool ada/nodes.lkt:21078
pragma Warnings (Off, "is not referenced");
 function Not_Null_Absent_P_As_Bool
  (Node : Bare_Not_Null_Absent
  )
   return Boolean
is
   Self : Bare_Not_Null_Absent  := Bare_Not_Null_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Not_Null_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Not_Null_Present
   --
--# property-start NotNull.Present.as_bool ada/nodes.lkt:21078
pragma Warnings (Off, "is not referenced");
 function Not_Null_Present_P_As_Bool
  (Node : Bare_Not_Null_Present
  )
   return Boolean
is
   Self : Bare_Not_Null_Present  := Bare_Not_Null_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Not_Null_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Null_Component_Decl
   --
   --
   --  Primitives for Bare_Others_Designator
   --
--# property-start OthersDesignator.xref_equation ada/nodes.lkt:21088
pragma Warnings (Off, "is not referenced");
 function Others_Designator_P_Xref_Equation
  (Node : Bare_Others_Designator
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Others_Designator  := Bare_Others_Designator (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1365 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1365 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1365;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21088:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1365;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1365;
            raise;
      end;
   return Property_Result;
end Others_Designator_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Overriding_Node
   --
   --
   --  Primitives for Bare_Overriding_Not_Overriding
   --
   --
   --  Primitives for Bare_Overriding_Overriding
   --
   --
   --  Primitives for Bare_Overriding_Unspecified
   --
   --
   --  Primitives for Bare_Params
   --
      procedure Initialize_Fields_For_Params
        (Self : Bare_Params
         ; Params_F_Params : Bare_Param_Spec_List
        ) is
      begin
            Self.Params_F_Params := Params_F_Params;
      end Initialize_Fields_For_Params;
   function Params_F_Params
     (Node : Bare_Params) return Bare_Param_Spec_List
   is
   begin
         return Node.Params_F_Params;
   end;
   --
   --  Primitives for Bare_Paren_Abstract_State_Decl
   --
      procedure Initialize_Fields_For_Paren_Abstract_State_Decl
        (Self : Bare_Paren_Abstract_State_Decl
         ; Paren_Abstract_State_Decl_F_Decl : Bare_Ada_Node
        ) is
      begin
            Self.Paren_Abstract_State_Decl_F_Decl := Paren_Abstract_State_Decl_F_Decl;
      end Initialize_Fields_For_Paren_Abstract_State_Decl;
   function Paren_Abstract_State_Decl_F_Decl
     (Node : Bare_Paren_Abstract_State_Decl) return Bare_Ada_Node
   is
   begin
         return Node.Paren_Abstract_State_Decl_F_Decl;
   end;
   --
   --  Primitives for Bare_Pp_Directive
   --
   --
   --  Primitives for Bare_Pp_Else_Directive
   --
   --
   --  Primitives for Bare_Pp_Elsif_Directive
   --
      procedure Initialize_Fields_For_Pp_Elsif_Directive
        (Self : Bare_Pp_Elsif_Directive
         ; Pp_Elsif_Directive_F_Expr : Bare_Expr
         ; Pp_Elsif_Directive_F_Then_Kw : Bare_Pp_Then_Kw
        ) is
      begin
            Self.Pp_Elsif_Directive_F_Expr := Pp_Elsif_Directive_F_Expr;
            Self.Pp_Elsif_Directive_F_Then_Kw := Pp_Elsif_Directive_F_Then_Kw;
      end Initialize_Fields_For_Pp_Elsif_Directive;
   function Pp_Elsif_Directive_F_Expr
     (Node : Bare_Pp_Elsif_Directive) return Bare_Expr
   is
   begin
         return Node.Pp_Elsif_Directive_F_Expr;
   end;
   function Pp_Elsif_Directive_F_Then_Kw
     (Node : Bare_Pp_Elsif_Directive) return Bare_Pp_Then_Kw
   is
   begin
         return Node.Pp_Elsif_Directive_F_Then_Kw;
   end;
   --
   --  Primitives for Bare_Pp_End_If_Directive
   --
   --
   --  Primitives for Bare_Pp_If_Directive
   --
      procedure Initialize_Fields_For_Pp_If_Directive
        (Self : Bare_Pp_If_Directive
         ; Pp_If_Directive_F_Expr : Bare_Expr
         ; Pp_If_Directive_F_Then_Kw : Bare_Pp_Then_Kw
        ) is
      begin
            Self.Pp_If_Directive_F_Expr := Pp_If_Directive_F_Expr;
            Self.Pp_If_Directive_F_Then_Kw := Pp_If_Directive_F_Then_Kw;
      end Initialize_Fields_For_Pp_If_Directive;
   function Pp_If_Directive_F_Expr
     (Node : Bare_Pp_If_Directive) return Bare_Expr
   is
   begin
         return Node.Pp_If_Directive_F_Expr;
   end;
   function Pp_If_Directive_F_Then_Kw
     (Node : Bare_Pp_If_Directive) return Bare_Pp_Then_Kw
   is
   begin
         return Node.Pp_If_Directive_F_Then_Kw;
   end;
   --
   --  Primitives for Bare_Pp_Then_Kw
   --
   --
   --  Primitives for Bare_Pragma_Node
   --
      procedure Pragma_Pre_Env_Actions
        (Self            : Bare_Pragma_Node;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_217 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:21595:9");
      end;
      end;
      procedure Initialize_Fields_For_Pragma_Node
        (Self : Bare_Pragma_Node
         ; Pragma_Node_F_Id : Bare_Identifier
         ; Pragma_Node_F_Args : Bare_Base_Assoc_List
        ) is
      begin
            Self.Pragma_Node_F_Id := Pragma_Node_F_Id;
            Self.Pragma_Node_F_Args := Pragma_Node_F_Args;
      end Initialize_Fields_For_Pragma_Node;
   function Pragma_Node_F_Id
     (Node : Bare_Pragma_Node) return Bare_Identifier
   is
   begin
         return Node.Pragma_Node_F_Id;
   end;
   function Pragma_Node_F_Args
     (Node : Bare_Pragma_Node) return Bare_Base_Assoc_List
   is
   begin
         return Node.Pragma_Node_F_Args;
   end;
--# property-start Pragma.xref_entry_point ada/nodes.lkt:21161
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_Xref_Entry_Point
  (Node : Bare_Pragma_Node
  )
   return Boolean
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_Xref_Entry_Point;
--# end
--# property-start Pragma.is_ghost_code ada/nodes.lkt:21165
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_Is_Ghost_Code
  (Node : Bare_Pragma_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
     Ent : Internal_Entity_Pragma_Node :=
       Internal_Entity_Pragma_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Identifier;
Fld_1 : Symbol_Type;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Is_Equal_3 : Boolean;
If_Result_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12079 '<FieldAccess for sym at nodes.lkt:21168:9>' Fld_1 ada/nodes.lkt:21168
--# expr-start 12078 '<FieldAccess for id at nodes.lkt:21168:9>' Fld ada/nodes.lkt:21168
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12078
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SingleTokNode.sym
Fld_1 := Libadalang.Implementation.Single_Tok_Node_P_Sym (Node => Fld.Node);
--# end
--# expr-done 12079
--# expr-start 12080 '<Symbol Assert at nodes.lkt:21168:26>' Sym ada/nodes.lkt:21168
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Assert); 
--# expr-done 12080
Is_Equal_3 := Fld_1 = Sym; 
if Is_Equal_3 then
   If_Result_2 := True;
else
--# expr-start 12081 '<Symbol Assert_And_Cut at nodes.lkt:21169:15>' Sym_1 ada/nodes.lkt:21169
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Assert_And_Cut); 
--# expr-done 12081
Is_Equal_2 := Fld_1 = Sym_1; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 12082 '<Symbol Assume at nodes.lkt:21170:15>' Sym_2 ada/nodes.lkt:21170
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Assume); 
--# expr-done 12082
Is_Equal_1 := Fld_1 = Sym_2; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 12083 '<Symbol Loop_Invariant at nodes.lkt:21171:15>' Sym_3 ada/nodes.lkt:21171
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Loop_Invariant); 
--# expr-done 12083
Is_Equal := Fld_1 = Sym_3; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
   If_Result_2 := If_Result_1;
end if;
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_Is_Ghost_Code;
--# end
--# property-start Pragma.xref_equation ada/nodes.lkt:21174
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_Xref_Equation
  (Node : Bare_Pragma_Node
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
     Ent : Internal_Entity_Pragma_Node :=
       Internal_Entity_Pragma_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1368 with Inline_Always;
            procedure Finalizer_Scope_3493 with Inline_Always;
            procedure Finalizer_Scope_3494 with Inline_Always;
            procedure Finalizer_Scope_3495 with Inline_Always;
            procedure Finalizer_Scope_3496 with Inline_Always;
            procedure Finalizer_Scope_3497 with Inline_Always;
            procedure Finalizer_Scope_3498 with Inline_Always;
            procedure Finalizer_Scope_3499 with Inline_Always;
            procedure Finalizer_Scope_3503 with Inline_Always;
            procedure Finalizer_Scope_3504 with Inline_Always;
            procedure Finalizer_Scope_3506 with Inline_Always;
            procedure Finalizer_Scope_3509 with Inline_Always;
      Local_Expr : Internal_Entity_Expr;
Local_Proc : Internal_Entity_Expr;
Var_Expr_5 : Internal_Entity_Pragma_Argument_Assoc;
Var_Expr_7 : Internal_Entity_Expr;
Var_Expr_9 : Internal_Entity_Expr;
Local_Expr_1 : Internal_Entity_Expr;
Var_Expr_12 : Internal_Entity_Base_Assoc;
Var_Expr_13 : Internal_Entity_Expr;
Var_Expr_273 : Internal_Entity_Base_Assoc;
Var_Expr_274 : Internal_Entity_Pragma_Argument_Assoc;
Var_Expr_275 : Internal_Entity_Name;
Fld : Internal_Entity_Base_Assoc_List;
Fld_1 : Bare_Base_Assoc_List;
Fld_2 : Internal_Entity_Info;
Get_Result : Bare_Base_Assoc;
As_Entity : Internal_Entity_Base_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Assoc;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
Fld_6 : Internal_Entity_Base_Assoc_List;
Fld_7 : Bare_Base_Assoc_List;
Fld_8 : Internal_Entity_Info;
Get_Result_1 : Bare_Base_Assoc;
As_Entity_1 : Internal_Entity_Base_Assoc;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Assoc;
Fld_9 : Internal_Entity_Expr;
Fld_10 : Logic_Var;
Fld_11 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_12 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_13 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_14 : Internal_Entity_Base_Assoc_List;
Fld_15 : Bare_Base_Assoc_List;
Fld_16 : Internal_Entity_Info;
Item_11 : Internal_Entity_Base_Assoc;
Bare_Item_11 : Bare_Base_Assoc;
Fld_17 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_18 : Logic_Equation;
As_Entity_2 : Internal_Entity_Base_Assoc;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Base_Assoc;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
Fld_19 : Internal_Entity_Name_Array_Access;
Fld_20 : Logic_Equation;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
Fld_21 : Internal_Entity_Base_Assoc_List;
Fld_22 : Bare_Base_Assoc_List;
Fld_23 : Internal_Entity_Info;
Item_8 : Internal_Entity_Base_Assoc;
Bare_Item_8 : Bare_Base_Assoc;
Fld_24 : Internal_Entity_Expr;
True_Rel_2 : Logic_Equation;
Cast_Expr : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Identifier;
Fld_25 : Logic_Equation;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Identifier;
Fld_26 : Symbol_Type;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result_3 : Boolean;
Is_Equal_2 : Boolean;
If_Result_4 : Boolean;
Is_Equal_3 : Boolean;
If_Result_5 : Boolean;
If_Result_6 : Logic_Equation;
Fld_27 : Logic_Var;
Fld_28 : Internal_Entity_Base_Type_Decl;
Cast_Result_4 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_29 : Logic_Equation;
And_Pred_4 : Logic_Equation;
Fld_30 : Logic_Equation;
And_Pred_5 : Logic_Equation;
Is_A : Boolean;
If_Result_7 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
True_Rel_3 : Logic_Equation;
Result_Var_2 : Logic_Equation;
As_Entity_3 : Internal_Entity_Base_Assoc;
Is_Null_3 : Boolean;
If_Result_8 : Internal_Entity_Base_Assoc;
Map_Result_2 : Logic_Equation_Array_Access;
Logic_Boolean_Op_2 : Logic_Equation;
True_Rel_4 : Logic_Equation;
Fld_31 : Internal_Entity_Base_Assoc_List;
Fld_32 : Bare_Base_Assoc_List;
Fld_33 : Internal_Entity_Info;
Get_Result_2 : Bare_Base_Assoc;
As_Entity_4 : Internal_Entity_Base_Assoc;
Is_Null_4 : Boolean;
If_Result_9 : Internal_Entity_Base_Assoc;
Fld_34 : Internal_Entity_Expr;
Fld_35 : Logic_Var;
Fld_36 : Internal_Entity_Base_Type_Decl;
Cast_Result_5 : Internal_Entity;
Bind_Result_2 : Logic_Equation;
Fld_37 : Logic_Equation;
And_Pred_6 : Logic_Equation;
Fld_38 : Logic_Equation;
And_Pred_7 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
False_Rel : Logic_Equation;
Result_Var_3 : Logic_Equation;
Fld_39 : Internal_Entity_Base_Assoc_List;
Fld_40 : Bare_Base_Assoc_List;
Fld_41 : Internal_Entity_Info;
Item_4 : Internal_Entity_Base_Assoc;
Bare_Item_4 : Bare_Base_Assoc;
As_Entity_5 : Internal_Entity_Base_Assoc;
Is_Null_5 : Boolean;
If_Result_10 : Internal_Entity_Base_Assoc;
Cast_Expr_2 : Internal_Entity_Base_Assoc;
Cast_Result_6 : Internal_Entity_Pragma_Argument_Assoc;
Fld_42 : Internal_Entity_Name;
Fld_43 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Is_Equal_4 : Boolean;
Is_Equal_5 : Boolean;
If_Result_11 : Boolean;
Scope_Result_4 : Boolean;
Result_Var_4 : Boolean;
Map_Result_3 : Internal_Entity_Base_Assoc_Array_Access;
Fld_44 : Internal_Entity_Expr;
Fld_45 : Logic_Var;
Fld_46 : Internal_Entity_Base_Type_Decl;
Cast_Result_7 : Internal_Entity;
Bind_Result_3 : Logic_Equation;
Fld_47 : Internal_Entity_Expr;
Fld_48 : Logic_Equation;
And_Pred_8 : Logic_Equation;
Fld_49 : Internal_Entity_Expr;
Fld_50 : Logic_Equation;
And_Pred_9 : Logic_Equation;
Map_Result_4 : Logic_Equation_Array_Access;
Logic_Boolean_Op_3 : Logic_Equation;
Fld_51 : Internal_Entity_Base_Assoc_List;
Fld_52 : Bare_Base_Assoc_List;
Fld_53 : Internal_Entity_Info;
Get_Result_3 : Bare_Base_Assoc;
As_Entity_6 : Internal_Entity_Base_Assoc;
Is_Null_6 : Boolean;
If_Result_12 : Internal_Entity_Base_Assoc;
Fld_54 : Internal_Entity_Expr;
Cast_Result_8 : Internal_Entity_Base_Aggregate;
Fld_55 : Internal_Entity_Assoc_List;
Fld_56 : Bare_Assoc_List;
Fld_57 : Internal_Entity_Info;
Item_3 : Internal_Entity_Basic_Assoc;
Bare_Item_3 : Bare_Basic_Assoc;
Cast_Expr_3 : Internal_Entity_Basic_Assoc;
Cast_Result_9 : Internal_Entity_Aggregate_Assoc;
Fld_58 : Logic_Equation;
As_Entity_7 : Internal_Entity_Basic_Assoc;
Is_Null_7 : Boolean;
If_Result_13 : Internal_Entity_Basic_Assoc;
Map_Result_5 : Logic_Equation_Array_Access;
Logic_Boolean_Op_4 : Logic_Equation;
Fld_59 : Internal_Entity_Base_Assoc_List;
Fld_60 : Bare_Base_Assoc_List;
Fld_61 : Internal_Entity_Info;
Get_Result_4 : Bare_Base_Assoc;
As_Entity_8 : Internal_Entity_Base_Assoc;
Is_Null_8 : Boolean;
If_Result_14 : Internal_Entity_Base_Assoc;
Fld_62 : Internal_Entity_Expr;
Fld_63 : Logic_Var;
Fld_64 : Internal_Entity_Base_Type_Decl;
Cast_Result_10 : Internal_Entity;
Bind_Result_4 : Logic_Equation;
Fld_65 : Logic_Equation;
And_Pred_10 : Logic_Equation;
Fld_66 : Logic_Equation;
And_Pred_11 : Logic_Equation;
Let_Result_1 : Logic_Equation;
True_Rel_5 : Logic_Equation;
Fld_67 : Internal_Entity_Base_Assoc_List;
Fld_68 : Bare_Base_Assoc_List;
Len : Integer;
Is_Equal_6 : Boolean;
If_Result_15 : Logic_Equation;
Fld_69 : Internal_Entity_Base_Assoc_List;
Fld_70 : Bare_Base_Assoc_List;
Len_1 : Integer;
Arith_Result : Integer;
Fld_71 : Internal_Entity_Base_Assoc_List;
Fld_72 : Bare_Base_Assoc_List;
Fld_73 : Internal_Entity_Info;
Get_Result_5 : Bare_Base_Assoc;
As_Entity_9 : Internal_Entity_Base_Assoc;
Is_Null_9 : Boolean;
If_Result_16 : Internal_Entity_Base_Assoc;
Fld_74 : Internal_Entity_Expr;
Scope_Result_5 : Internal_Entity_Expr;
Result_Var_5 : Internal_Entity_Expr;
Fld_75 : Logic_Var;
Cast_Expr_4 : Internal_Entity_Base_Type_Decl;
Cast_Result_11 : Internal_Entity;
Bind_Result_5 : Logic_Equation;
Fld_76 : Logic_Equation;
And_Pred_12 : Logic_Equation;
Let_Result_2 : Logic_Equation;
And_Pred_13 : Logic_Equation;
Fld_77 : Internal_Entity_Base_Assoc_List;
Fld_78 : Bare_Base_Assoc_List;
Fld_79 : Internal_Entity_Info;
Item_1 : Internal_Entity_Base_Assoc;
Bare_Item_1 : Bare_Base_Assoc;
Index_2 : Integer;
True_Rel_6 : Logic_Equation;
Fld_80 : Internal_Entity_Expr;
Cast_Result_12 : Internal_Entity_Name;
Fld_81 : Logic_Equation;
Fld_82 : Internal_Entity_Expr;
Fld_83 : Logic_Equation;
Cast_Expr_5 : Internal_Entity_Base_Assoc;
Cast_Result_13 : Internal_Entity_Pragma_Argument_Assoc;
Fld_84 : Internal_Entity_Name;
Sym_6 : Symbol_Type;
Fld_85 : Boolean;
Scope_Result_6 : Boolean;
Result_Var_6 : Boolean;
Scope_Result_7 : Boolean;
Result_Var_7 : Boolean;
If_Result_17 : Logic_Equation;
Comp_Result : Boolean;
If_Result_18 : Logic_Equation;
As_Entity_10 : Internal_Entity_Base_Assoc;
Is_Null_10 : Boolean;
If_Result_19 : Internal_Entity_Base_Assoc;
Map_Result_6 : Logic_Equation_Array_Access;
Logic_Boolean_Op_5 : Logic_Equation;
Fld_86 : Internal_Entity_Base_Assoc_List;
Fld_87 : Bare_Base_Assoc_List;
Fld_88 : Internal_Entity_Info;
Item_0 : Internal_Entity_Base_Assoc;
Bare_Item_0 : Bare_Base_Assoc;
Fld_89 : Internal_Entity_Expr;
Fld_90 : Logic_Equation;
True_Rel_7 : Logic_Equation;
Or_Pred : Logic_Equation;
As_Entity_11 : Internal_Entity_Base_Assoc;
Is_Null_11 : Boolean;
If_Result_20 : Internal_Entity_Base_Assoc;
Map_Result_7 : Logic_Equation_Array_Access;
Logic_Boolean_Op_6 : Logic_Equation;
Fld_91 : Internal_Entity_Identifier;
Sym_7 : Symbol_Type;
Fld_92 : Boolean;
If_Result_21 : Logic_Equation;
Fld_93 : Internal_Entity_Identifier;
Sym_8 : Symbol_Type;
Fld_94 : Boolean;
If_Result_22 : Logic_Equation;
Fld_95 : Internal_Entity_Identifier;
Sym_9 : Symbol_Type;
Fld_96 : Boolean;
If_Result_23 : Logic_Equation;
Fld_97 : Internal_Entity_Identifier;
Sym_10 : Symbol_Type;
Fld_98 : Boolean;
If_Result_24 : Logic_Equation;
Fld_99 : Internal_Entity_Identifier;
Fld_100 : Symbol_Type;
Sym_11 : Symbol_Type;
Sym_12 : Symbol_Type;
Sym_13 : Symbol_Type;
Sym_14 : Symbol_Type;
Sym_15 : Symbol_Type;
Sym_16 : Symbol_Type;
Sym_17 : Symbol_Type;
Sym_18 : Symbol_Type;
Sym_19 : Symbol_Type;
Is_Equal_7 : Boolean;
Is_Equal_8 : Boolean;
If_Result_25 : Boolean;
Is_Equal_9 : Boolean;
If_Result_26 : Boolean;
Is_Equal_10 : Boolean;
If_Result_27 : Boolean;
Is_Equal_11 : Boolean;
If_Result_28 : Boolean;
Is_Equal_12 : Boolean;
If_Result_29 : Boolean;
Is_Equal_13 : Boolean;
If_Result_30 : Boolean;
Is_Equal_14 : Boolean;
If_Result_31 : Boolean;
Is_Equal_15 : Boolean;
If_Result_32 : Boolean;
If_Result_33 : Logic_Equation;
Fld_101 : Internal_Entity_Identifier;
Fld_102 : Symbol_Type;
Sym_20 : Symbol_Type;
Sym_21 : Symbol_Type;
Sym_22 : Symbol_Type;
Is_Equal_16 : Boolean;
Is_Equal_17 : Boolean;
If_Result_34 : Boolean;
Is_Equal_18 : Boolean;
If_Result_35 : Boolean;
If_Result_36 : Logic_Equation;
Fld_103 : Internal_Entity_Identifier;
Sym_23 : Symbol_Type;
Fld_104 : Boolean;
If_Result_37 : Logic_Equation;
Fld_105 : Internal_Entity_Identifier;
Fld_106 : Symbol_Type;
Sym_24 : Symbol_Type;
Sym_25 : Symbol_Type;
Sym_26 : Symbol_Type;
Sym_27 : Symbol_Type;
Sym_28 : Symbol_Type;
Sym_29 : Symbol_Type;
Sym_30 : Symbol_Type;
Sym_31 : Symbol_Type;
Sym_32 : Symbol_Type;
Sym_33 : Symbol_Type;
Is_Equal_19 : Boolean;
Is_Equal_20 : Boolean;
If_Result_38 : Boolean;
Is_Equal_21 : Boolean;
If_Result_39 : Boolean;
Is_Equal_22 : Boolean;
If_Result_40 : Boolean;
Is_Equal_23 : Boolean;
If_Result_41 : Boolean;
Is_Equal_24 : Boolean;
If_Result_42 : Boolean;
Is_Equal_25 : Boolean;
If_Result_43 : Boolean;
Is_Equal_26 : Boolean;
If_Result_44 : Boolean;
Is_Equal_27 : Boolean;
If_Result_45 : Boolean;
Is_Equal_28 : Boolean;
If_Result_46 : Boolean;
If_Result_47 : Logic_Equation;
Fld_107 : Internal_Entity_Identifier;
Sym_34 : Symbol_Type;
Fld_108 : Boolean;
If_Result_48 : Logic_Equation;
Fld_109 : Internal_Entity_Identifier;
Sym_35 : Symbol_Type;
Fld_110 : Boolean;
Fld_111 : Internal_Entity_Identifier;
Sym_36 : Symbol_Type;
Fld_112 : Boolean;
If_Result_49 : Boolean;
Fld_113 : Internal_Entity_Identifier;
Sym_37 : Symbol_Type;
Fld_114 : Boolean;
If_Result_50 : Boolean;
Fld_115 : Internal_Entity_Identifier;
Sym_38 : Symbol_Type;
Fld_116 : Boolean;
If_Result_51 : Boolean;
If_Result_52 : Logic_Equation;
            procedure Finalizer_Scope_1368 is
            begin
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (Map_Result_2);
                     Dec_Ref (Logic_Boolean_Op_2);
                     Dec_Ref (True_Rel_4);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (False_Rel);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Map_Result_3);
                     Dec_Ref (Map_Result_4);
                     Dec_Ref (Logic_Boolean_Op_3);
                     Dec_Ref (Map_Result_5);
                     Dec_Ref (Logic_Boolean_Op_4);
                     Dec_Ref (Bind_Result_4);
                     Dec_Ref (Fld_65);
                     Dec_Ref (And_Pred_10);
                     Dec_Ref (Fld_66);
                     Dec_Ref (And_Pred_11);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (True_Rel_5);
                     Dec_Ref (If_Result_15);
                     Dec_Ref (Bind_Result_5);
                     Dec_Ref (Fld_76);
                     Dec_Ref (And_Pred_12);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (And_Pred_13);
                     Dec_Ref (Map_Result_6);
                     Dec_Ref (Logic_Boolean_Op_5);
                     Dec_Ref (Map_Result_7);
                     Dec_Ref (Logic_Boolean_Op_6);
                     Dec_Ref (If_Result_21);
                     Dec_Ref (If_Result_22);
                     Dec_Ref (If_Result_23);
                     Dec_Ref (If_Result_24);
                     Dec_Ref (If_Result_33);
                     Dec_Ref (If_Result_36);
                     Dec_Ref (If_Result_37);
                     Dec_Ref (If_Result_47);
                     Dec_Ref (If_Result_48);
                     Dec_Ref (If_Result_52);
            end Finalizer_Scope_1368;
            procedure Finalizer_Scope_3493 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_3493;
            procedure Finalizer_Scope_3494 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_12);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_13);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_3494;
            procedure Finalizer_Scope_3495 is
            begin
                     Dec_Ref (Fld_18);
            end Finalizer_Scope_3495;
            procedure Finalizer_Scope_3496 is
            begin
                     Dec_Ref (Fld_20);
            end Finalizer_Scope_3496;
            procedure Finalizer_Scope_3497 is
            begin
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (True_Rel_3);
                     Dec_Ref (Result_Var_2);
            end Finalizer_Scope_3497;
            procedure Finalizer_Scope_3498 is
            begin
                     Dec_Ref (True_Rel_2);
                     Dec_Ref (Fld_25);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_29);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (Fld_30);
                     Dec_Ref (And_Pred_5);
                     Dec_Ref (If_Result_7);
            end Finalizer_Scope_3498;
            procedure Finalizer_Scope_3499 is
            begin
                     Dec_Ref (Bind_Result_2);
                     Dec_Ref (Fld_37);
                     Dec_Ref (And_Pred_6);
                     Dec_Ref (Fld_38);
                     Dec_Ref (And_Pred_7);
            end Finalizer_Scope_3499;
            procedure Finalizer_Scope_3503 is
            begin
                     Dec_Ref (Bind_Result_3);
                     Dec_Ref (Fld_48);
                     Dec_Ref (And_Pred_8);
                     Dec_Ref (Fld_50);
                     Dec_Ref (And_Pred_9);
            end Finalizer_Scope_3503;
            procedure Finalizer_Scope_3504 is
            begin
                     Dec_Ref (Fld_58);
            end Finalizer_Scope_3504;
            procedure Finalizer_Scope_3506 is
            begin
                     Dec_Ref (True_Rel_6);
                     Dec_Ref (Fld_81);
                     Dec_Ref (Fld_83);
                     Dec_Ref (If_Result_17);
                     Dec_Ref (If_Result_18);
            end Finalizer_Scope_3506;
            procedure Finalizer_Scope_3509 is
            begin
                     Dec_Ref (Fld_90);
                     Dec_Ref (True_Rel_7);
                     Dec_Ref (Or_Pred);
            end Finalizer_Scope_3509;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12283 '<If at nodes.lkt:21175:9>' If_Result_52 ada/nodes.lkt:21175
--# expr-start 12098 '<BooleanBinaryOp Or at nodes.lkt:21176:13>' If_Result_51 ada/nodes.lkt:21176
--# expr-start 12094 '<BooleanBinaryOp Or at nodes.lkt:21176:13>' If_Result_50 ada/nodes.lkt:21176
--# expr-start 12090 '<BooleanBinaryOp Or at nodes.lkt:21176:13>' If_Result_49 ada/nodes.lkt:21176
--# expr-start 12086 '<FieldAccess for name_is at nodes.lkt:21176:13>' Fld_110 ada/nodes.lkt:21176
--# expr-start 12084 '<FieldAccess for id at nodes.lkt:21176:13>' Fld_109 ada/nodes.lkt:21176
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_109 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12084
      if Fld_109.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12085 '<Symbol Assert at nodes.lkt:21176:29>' Sym_35 ada/nodes.lkt:21176
Sym_35 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Assert); 
--# expr-done 12085
--# property-call-start Name.name_is
Fld_110 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_109.Node, Sym => Sym_35);
--# end
--# expr-done 12086
if Fld_110 then
   If_Result_49 := True;
else
   --# expr-start 12089 '<FieldAccess for name_is at nodes.lkt:21176:43>' Fld_112 ada/nodes.lkt:21176
--# expr-start 12087 '<FieldAccess for id at nodes.lkt:21176:43>' Fld_111 ada/nodes.lkt:21176
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_111 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12087
      if Fld_111.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12088 '<Symbol Loop_Invariant at nodes.lkt:21176:59>' Sym_36 ada/nodes.lkt:21176
Sym_36 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Loop_Invariant); 
--# expr-done 12088
--# property-call-start Name.name_is
Fld_112 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_111.Node, Sym => Sym_36);
--# end
--# expr-done 12089
   If_Result_49 := Fld_112;
end if;
--# expr-done 12090
if If_Result_49 then
   If_Result_50 := True;
else
   --# expr-start 12093 '<FieldAccess for name_is at nodes.lkt:21177:16>' Fld_114 ada/nodes.lkt:21177
--# expr-start 12091 '<FieldAccess for id at nodes.lkt:21177:16>' Fld_113 ada/nodes.lkt:21177
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_113 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12091
      if Fld_113.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12092 '<Symbol Compile_Time_Warning at nodes.lkt:21177:32>' Sym_37 ada/nodes.lkt:21177
Sym_37 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Compile_Time_Warning); 
--# expr-done 12092
--# property-call-start Name.name_is
Fld_114 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_113.Node, Sym => Sym_37);
--# end
--# expr-done 12093
   If_Result_50 := Fld_114;
end if;
--# expr-done 12094
if If_Result_50 then
   If_Result_51 := True;
else
   --# expr-start 12097 '<FieldAccess for name_is at nodes.lkt:21178:16>' Fld_116 ada/nodes.lkt:21178
--# expr-start 12095 '<FieldAccess for id at nodes.lkt:21178:16>' Fld_115 ada/nodes.lkt:21178
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_115 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12095
      if Fld_115.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12096 '<Symbol Compile_Time_Error at nodes.lkt:21178:32>' Sym_38 ada/nodes.lkt:21178
Sym_38 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Compile_Time_Error); 
--# expr-done 12096
--# property-call-start Name.name_is
Fld_116 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_115.Node, Sym => Sym_38);
--# end
--# expr-done 12097
   If_Result_51 := Fld_116;
end if;
--# expr-done 12098
if If_Result_51 then
   --# expr-start 12114 '<LogicBinaryOp And at nodes.lkt:21180:13>' And_Pred_3 ada/nodes.lkt:21180
--# expr-start 12104 '<Let at nodes.lkt:21181:17>' Let_Result ada/nodes.lkt:21181
--# scope-start
--# expr-start 12100 '<FieldAccess for assoc_expr at nodes.lkt:21181:28>' Fld_3 ada/nodes.lkt:21181
--# expr-start 12099 '<FieldAccess for args at nodes.lkt:21181:28>' Fld ada/nodes.lkt:21181
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12099
Fld_1 := Fld.Node;
Get_Result := Get (Self, Fld_1, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Base_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 12100
Local_Expr_1 := Fld_3; 
--# bind expr Local_Expr_1
--# expr-start 12103 '<LogicBinaryOp And at nodes.lkt:21183:17>' And_Pred ada/nodes.lkt:21183
--# expr-start 12101 '<FieldAccess for sub_equation at nodes.lkt:21183:17>' Fld_4 ada/nodes.lkt:21183
      if Local_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Expr_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Expr_1.Info);
--# end
--# expr-done 12101
--# expr-start 12102 '<FieldAccess for expect_bool_derived_type at nodes.lkt:21183:42>' Fld_5 ada/nodes.lkt:21183
      if Local_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_5 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Local_Expr_1.Node, Origin => Origin);
--# end
--# expr-done 12102
And_Pred := Create_And (Fld_4, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21183:17") else null)); 
--# expr-done 12103
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 12104
--# expr-start 12105 '<FieldAccess for args at nodes.lkt:21185:18>' Fld_6 ada/nodes.lkt:21185
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12105
Fld_7 := Fld_6.Node;
Get_Result_1 := Get (Self, Fld_7, 1, True); 
Is_Null_1 := Get_Result_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Base_Assoc;
else
Fld_8 := Fld_6.Info;
As_Entity_1 := (Info => Fld_8, Node => Get_Result_1); 
   If_Result_1 := As_Entity_1;
end if;
Var_Expr_12 := If_Result_1;
if Var_Expr_12 /= No_Entity_Base_Assoc then
   --# scope-start
   --# bind arg Var_Expr_12
--# expr-start 12106 '<FieldAccess for assoc_expr at nodes.lkt:21187:17>' Fld_9 ada/nodes.lkt:21187
      if Var_Expr_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_9 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Var_Expr_12.Node, E_Info => Var_Expr_12.Info);
--# end
--# expr-done 12106
Var_Expr_13 := Fld_9;
if Var_Expr_13 /= No_Entity_Expr then
   --# scope-start
   --# bind msg Var_Expr_13
--# expr-start 12113 '<LogicBinaryOp And at nodes.lkt:21189:21>' And_Pred_2 ada/nodes.lkt:21189
--# expr-start 12111 '<LogicBinaryOp And at nodes.lkt:21190:25>' And_Pred_1 ada/nodes.lkt:21190
--# expr-start 12109 '<Bind at nodes.lkt:21190:25>' Bind_Result ada/nodes.lkt:21190
--# expr-start 12107 '<FieldAccess for expected_type_var at nodes.lkt:21190:25>' Fld_10 ada/nodes.lkt:21190
      if Var_Expr_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_13.Node);
--# expr-done 12107
Fld_10.Value := No_Entity;
Entity_Vars.Reset (Fld_10);
--# expr-start 12108 '<FieldAccess for std_string_type at nodes.lkt:21190:52>' Fld_11 ada/nodes.lkt:21190
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_11 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 12108
      Cast_Result := Create_Internal_Entity
        (Node => Fld_11.Node,
         Info => Fld_11.Info);
Bind_Result := Solver.Create_Assign (Fld_10, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21190:25") else null)); 
--# expr-done 12109
--# expr-start 12110 '<FieldAccess for sub_equation at nodes.lkt:21191:30>' Fld_12 ada/nodes.lkt:21191
      if Var_Expr_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_12 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_13.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_13.Info);
--# end
--# expr-done 12110
And_Pred_1 := Create_And (Bind_Result, Fld_12, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21190:25") else null)); 
--# expr-done 12111
--# expr-start 12112 '<FieldAccess for matches_expected_type at nodes.lkt:21193:26>' Fld_13 ada/nodes.lkt:21193
      if Var_Expr_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_13 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Var_Expr_13.Node, Origin => Origin);
--# end
--# expr-done 12112
And_Pred_2 := Create_And (And_Pred_1, Fld_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21189:21") else null)); 
--# expr-done 12113
Scope_Result := And_Pred_2;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3494;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21194:33") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
Scope_Result_1 := Result_Var;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3493;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21196:29") else null)); 
   Result_Var_1 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
And_Pred_3 := Create_And (Let_Result, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21180:13") else null)); 
--# expr-done 12114
   If_Result_52 := And_Pred_3;
else
   --# expr-start 12282 '<If at nodes.lkt:21175:9>' If_Result_48 ada/nodes.lkt:21175
--# expr-start 12117 '<FieldAccess for name_is at nodes.lkt:21198:14>' Fld_108 ada/nodes.lkt:21198
--# expr-start 12115 '<FieldAccess for id at nodes.lkt:21198:14>' Fld_107 ada/nodes.lkt:21198
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_107 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12115
      if Fld_107.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12116 '<Symbol Unreferenced at nodes.lkt:21198:30>' Sym_34 ada/nodes.lkt:21198
Sym_34 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unreferenced); 
--# expr-done 12116
--# property-call-start Name.name_is
Fld_108 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_107.Node, Sym => Sym_34);
--# end
--# expr-done 12117
if Fld_108 then
   --# expr-start 12123 '<LogicAll at nodes.lkt:21200:13>' Logic_Boolean_Op ada/nodes.lkt:21200
--# expr-start 12122 '<Map at nodes.lkt:21200:13>' Map_Result ada/nodes.lkt:21200
   --# expr-start 12118 '<FieldAccess for args at nodes.lkt:21200:13>' Fld_14 ada/nodes.lkt:21200
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12118
Fld_15 := Fld_14.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_15 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Base_Assoc_List := Fld_15;
      begin
         for Untyped_Item_11 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_11 := Untyped_Item_11; 
Is_Null_2 := Bare_Item_11 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Base_Assoc;
else
Fld_16 := Fld_14.Info;
As_Entity_2 := (Info => Fld_16, Node => Bare_Item_11); 
   If_Result_2 := As_Entity_2;
end if;
                  Item_11 := If_Result_2; 
   --# scope-start
               --# bind assoc Item_11
      --# expr-start 12121 '<FieldAccess for xref_no_overloading at nodes.lkt:21201:28>' Fld_18 ada/nodes.lkt:21201
--# expr-start 12120 '<Cast to Name at nodes.lkt:21201:28>' Cast_Result_1 ada/nodes.lkt:21201
--# expr-start 12119 '<FieldAccess for assoc_expr at nodes.lkt:21201:28>' Fld_17 ada/nodes.lkt:21201
      if Item_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_17 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_11.Node, E_Info => Item_11.Info);
--# end
--# expr-done 12119
   if Fld_17.Node = null
      or else Fld_17.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Fld_17.Node,
         Info => Fld_17.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 12120
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_18 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Cast_Result_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 12121
         declare
            Item_To_Append : constant Logic_Equation := Fld_18;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3495;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 12122
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21200:13") else null)); 
--# expr-done 12123
   If_Result_48 := Logic_Boolean_Op;
else
   --# expr-start 12281 '<If at nodes.lkt:21175:9>' If_Result_47 ada/nodes.lkt:21175
--# expr-start 12125 '<FieldAccess for name_symbol at nodes.lkt:21204:13>' Fld_106 ada/nodes.lkt:21204
--# expr-start 12124 '<FieldAccess for id at nodes.lkt:21204:13>' Fld_105 ada/nodes.lkt:21204
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_105 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12124
      if Fld_105.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_106 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_105.Node);
--# end
--# expr-done 12125
--# expr-start 12126 '<Symbol Import at nodes.lkt:21204:38>' Sym_24 ada/nodes.lkt:21204
Sym_24 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Import); 
--# expr-done 12126
Is_Equal_28 := Fld_106 = Sym_24; 
if Is_Equal_28 then
   If_Result_46 := True;
else
--# expr-start 12127 '<Symbol Export at nodes.lkt:21205:19>' Sym_25 ada/nodes.lkt:21205
Sym_25 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Export); 
--# expr-done 12127
Is_Equal_27 := Fld_106 = Sym_25; 
if Is_Equal_27 then
   If_Result_45 := True;
else
--# expr-start 12128 '<Symbol Interface at nodes.lkt:21206:19>' Sym_26 ada/nodes.lkt:21206
Sym_26 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Interface); 
--# expr-done 12128
Is_Equal_26 := Fld_106 = Sym_26; 
if Is_Equal_26 then
   If_Result_44 := True;
else
--# expr-start 12129 '<Symbol Convention at nodes.lkt:21207:19>' Sym_27 ada/nodes.lkt:21207
Sym_27 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Convention); 
--# expr-done 12129
Is_Equal_25 := Fld_106 = Sym_27; 
if Is_Equal_25 then
   If_Result_43 := True;
else
--# expr-start 12130 '<Symbol Pack at nodes.lkt:21208:19>' Sym_28 ada/nodes.lkt:21208
Sym_28 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pack); 
--# expr-done 12130
Is_Equal_24 := Fld_106 = Sym_28; 
if Is_Equal_24 then
   If_Result_42 := True;
else
--# expr-start 12131 '<Symbol Pure at nodes.lkt:21209:19>' Sym_29 ada/nodes.lkt:21209
Sym_29 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pure); 
--# expr-done 12131
Is_Equal_23 := Fld_106 = Sym_29; 
if Is_Equal_23 then
   If_Result_41 := True;
else
--# expr-start 12132 '<Symbol Preelaborate at nodes.lkt:21210:19>' Sym_30 ada/nodes.lkt:21210
Sym_30 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Preelaborate); 
--# expr-done 12132
Is_Equal_22 := Fld_106 = Sym_30; 
if Is_Equal_22 then
   If_Result_40 := True;
else
--# expr-start 12133 '<Symbol Elaborate_Body at nodes.lkt:21211:19>' Sym_31 ada/nodes.lkt:21211
Sym_31 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Elaborate_Body); 
--# expr-done 12133
Is_Equal_21 := Fld_106 = Sym_31; 
if Is_Equal_21 then
   If_Result_39 := True;
else
--# expr-start 12134 '<Symbol Inline at nodes.lkt:21212:19>' Sym_32 ada/nodes.lkt:21212
Sym_32 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Inline); 
--# expr-done 12134
Is_Equal_20 := Fld_106 = Sym_32; 
if Is_Equal_20 then
   If_Result_38 := True;
else
--# expr-start 12135 '<Symbol Volatile at nodes.lkt:21213:19>' Sym_33 ada/nodes.lkt:21213
Sym_33 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Volatile); 
--# expr-done 12135
Is_Equal_19 := Fld_106 = Sym_33; 
   If_Result_38 := Is_Equal_19;
end if;
   If_Result_39 := If_Result_38;
end if;
   If_Result_40 := If_Result_39;
end if;
   If_Result_41 := If_Result_40;
end if;
   If_Result_42 := If_Result_41;
end if;
   If_Result_43 := If_Result_42;
end if;
   If_Result_44 := If_Result_43;
end if;
   If_Result_45 := If_Result_44;
end if;
   If_Result_46 := If_Result_45;
end if;
if If_Result_46 then
   --# expr-start 12139 '<LogicAll at nodes.lkt:21215:13>' Logic_Boolean_Op_1 ada/nodes.lkt:21215
--# expr-start 12138 '<Map at nodes.lkt:21215:13>' Map_Result_1 ada/nodes.lkt:21215
   --# expr-start 12136 '<FieldAccess for associated_entity_names at nodes.lkt:21215:13>' Fld_19 ada/nodes.lkt:21215
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.associated_entity_names
Fld_19 := Libadalang.Implementation.Pragma_Node_P_Associated_Entity_Names (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12136
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Name_Array_Access := Fld_19;
      begin
         for Item_10 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_10
      --# expr-start 12137 '<FieldAccess for xref_no_overloading at nodes.lkt:21216:24>' Fld_20 ada/nodes.lkt:21216
      if Item_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_20 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Item_10.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_10.Info);
--# end
--# expr-done 12137
         declare
            Item_To_Append : constant Logic_Equation := Fld_20;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3496;
         end loop;
      end;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 12138
Logic_Boolean_Op_1 := Solver.Create_All (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21215:13") else null)); 
--# expr-done 12139
   If_Result_47 := Logic_Boolean_Op_1;
else
   --# expr-start 12280 '<If at nodes.lkt:21175:9>' If_Result_37 ada/nodes.lkt:21175
--# expr-start 12142 '<FieldAccess for name_is at nodes.lkt:21218:14>' Fld_104 ada/nodes.lkt:21218
--# expr-start 12140 '<FieldAccess for id at nodes.lkt:21218:14>' Fld_103 ada/nodes.lkt:21218
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_103 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12140
      if Fld_103.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12141 '<Symbol Warnings at nodes.lkt:21218:30>' Sym_23 ada/nodes.lkt:21218
Sym_23 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Warnings); 
--# expr-done 12141
--# property-call-start Name.name_is
Fld_104 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_103.Node, Sym => Sym_23);
--# end
--# expr-done 12142
if Fld_104 then
   --# expr-start 12164 '<LogicAll at nodes.lkt:21220:13>' Logic_Boolean_Op_2 ada/nodes.lkt:21220
--# expr-start 12163 '<Map at nodes.lkt:21220:13>' Map_Result_2 ada/nodes.lkt:21220
   --# expr-start 12143 '<FieldAccess for args at nodes.lkt:21220:13>' Fld_21 ada/nodes.lkt:21220
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12143
Fld_22 := Fld_21.Node;
      declare
         Map_Result_2_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_22 = null then
      Map_Result_2 := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Base_Assoc_List := Fld_22;
      begin
         for Untyped_Item_8 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_8 := Untyped_Item_8; 
Is_Null_3 := Bare_Item_8 = null; 
if Is_Null_3 then
   If_Result_8 := No_Entity_Base_Assoc;
else
Fld_23 := Fld_21.Info;
As_Entity_3 := (Info => Fld_23, Node => Bare_Item_8); 
   If_Result_8 := As_Entity_3;
end if;
                  Item_8 := If_Result_8; 
   --# scope-start
               --# bind arg Item_8
--# expr-start 12144 '<FieldAccess for assoc_expr at nodes.lkt:21222:17>' Fld_24 ada/nodes.lkt:21222
      if Item_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_24 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_8.Node, E_Info => Item_8.Info);
--# end
--# expr-done 12144
Var_Expr_9 := Fld_24;
if Var_Expr_9 /= No_Entity_Expr then
   --# scope-start
   --# bind expr Var_Expr_9
--# expr-start 12162 '<If at nodes.lkt:21224:21>' If_Result_7 ada/nodes.lkt:21224
--# expr-start 12145 '<IsA Identifier at nodes.lkt:21224:24>' Is_A ada/nodes.lkt:21224
Is_A := Var_Expr_9.Node /= null 
and then Var_Expr_9.Node.Kind in Ada_Identifier_Range; 
--# expr-done 12145
if Is_A then
   --# expr-start 12154 '<If at nodes.lkt:21226:25>' If_Result_6 ada/nodes.lkt:21226
--# expr-start 12147 '<FieldAccess for name_symbol at nodes.lkt:21227:29>' Fld_26 ada/nodes.lkt:21227
--# expr-start 12146 '<Cast to Identifier at nodes.lkt:21227:29>' Cast_Result_3 ada/nodes.lkt:21227
Cast_Expr_1 := Var_Expr_9; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Identifier_Range
   then
      Cast_Result_3 := Create_Internal_Entity_Identifier
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_3 := No_Entity_Identifier;
   end if;
--# expr-done 12146
      if Cast_Result_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_26 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Cast_Result_3.Node);
--# end
--# expr-done 12147
--# expr-start 12148 '<Symbol On at nodes.lkt:21227:66>' Sym ada/nodes.lkt:21227
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_On); 
--# expr-done 12148
Is_Equal_3 := Fld_26 = Sym; 
if Is_Equal_3 then
   If_Result_5 := True;
else
--# expr-start 12149 '<Symbol Off at nodes.lkt:21228:35>' Sym_1 ada/nodes.lkt:21228
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Off); 
--# expr-done 12149
Is_Equal_2 := Fld_26 = Sym_1; 
if Is_Equal_2 then
   If_Result_4 := True;
else
--# expr-start 12150 '<Symbol GNAT at nodes.lkt:21229:35>' Sym_2 ada/nodes.lkt:21229
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Gnat); 
--# expr-done 12150
Is_Equal_1 := Fld_26 = Sym_2; 
if Is_Equal_1 then
   If_Result_3 := True;
else
--# expr-start 12151 '<Symbol GNATprove at nodes.lkt:21230:35>' Sym_3 ada/nodes.lkt:21230
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Gnatprove); 
--# expr-done 12151
Is_Equal := Fld_26 = Sym_3; 
   If_Result_3 := Is_Equal;
end if;
   If_Result_4 := If_Result_3;
end if;
   If_Result_5 := If_Result_4;
end if;
if If_Result_5 then
   True_Rel_2 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21231:30") else null)); 
   If_Result_6 := True_Rel_2;
else
   --# expr-start 12153 '<FieldAccess for xref_no_overloading at nodes.lkt:21232:30>' Fld_25 ada/nodes.lkt:21232
--# expr-start 12152 '<Cast to Identifier at nodes.lkt:21232:30>' Cast_Result_2 ada/nodes.lkt:21232
Cast_Expr := Var_Expr_9; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Identifier_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Identifier
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_2 := No_Entity_Identifier;
   end if;
--# expr-done 12152
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_25 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Cast_Result_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_2.Info);
--# end
--# expr-done 12153
   If_Result_6 := Fld_25;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 12154
   If_Result_7 := If_Result_6;
else
   --# expr-start 12161 '<LogicBinaryOp And at nodes.lkt:21235:25>' And_Pred_5 ada/nodes.lkt:21235
--# expr-start 12159 '<LogicBinaryOp And at nodes.lkt:21235:25>' And_Pred_4 ada/nodes.lkt:21235
--# expr-start 12157 '<Bind at nodes.lkt:21235:25>' Bind_Result_1 ada/nodes.lkt:21235
--# expr-start 12155 '<FieldAccess for expected_type_var at nodes.lkt:21235:25>' Fld_27 ada/nodes.lkt:21235
      if Var_Expr_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_27 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_9.Node);
--# expr-done 12155
Fld_27.Value := No_Entity;
Entity_Vars.Reset (Fld_27);
--# expr-start 12156 '<FieldAccess for std_string_type at nodes.lkt:21235:53>' Fld_28 ada/nodes.lkt:21235
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_28 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 12156
      Cast_Result_4 := Create_Internal_Entity
        (Node => Fld_28.Node,
         Info => Fld_28.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_27, Cast_Result_4, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21235:25") else null)); 
--# expr-done 12157
--# expr-start 12158 '<FieldAccess for sub_equation at nodes.lkt:21236:30>' Fld_29 ada/nodes.lkt:21236
      if Var_Expr_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_29 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_9.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_9.Info);
--# end
--# expr-done 12158
And_Pred_4 := Create_And (Bind_Result_1, Fld_29, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21235:25") else null)); 
--# expr-done 12159
--# expr-start 12160 '<FieldAccess for matches_expected_type at nodes.lkt:21237:30>' Fld_30 ada/nodes.lkt:21237
      if Var_Expr_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_30 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Var_Expr_9.Node, Origin => Origin);
--# end
--# expr-done 12160
And_Pred_5 := Create_And (And_Pred_4, Fld_30, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21235:25") else null)); 
--# expr-done 12161
   If_Result_7 := And_Pred_5;
end if;
      Inc_Ref (If_Result_7);
--# expr-done 12162
Scope_Result_2 := If_Result_7;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3498;
   Result_Var_2 := Scope_Result_2;
else
   True_Rel_3 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21239:33") else null)); 
   Result_Var_2 := True_Rel_3;
end if;
      Inc_Ref (Result_Var_2);
         declare
            Item_To_Append : constant Logic_Equation := Result_Var_2;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3497;
         end loop;
      end;
      end if;
         Map_Result_2 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_2_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 12163
Logic_Boolean_Op_2 := Solver.Create_All (Relation_Array (Map_Result_2.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21220:13") else null)); 
--# expr-done 12164
   If_Result_37 := Logic_Boolean_Op_2;
else
   --# expr-start 12279 '<If at nodes.lkt:21175:9>' If_Result_36 ada/nodes.lkt:21175
--# expr-start 12166 '<FieldAccess for name_symbol at nodes.lkt:21249:13>' Fld_102 ada/nodes.lkt:21249
--# expr-start 12165 '<FieldAccess for id at nodes.lkt:21249:13>' Fld_101 ada/nodes.lkt:21249
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_101 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12165
      if Fld_101.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_102 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_101.Node);
--# end
--# expr-done 12166
--# expr-start 12167 '<Symbol Style_Checks at nodes.lkt:21249:38>' Sym_20 ada/nodes.lkt:21249
Sym_20 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Style_Checks); 
--# expr-done 12167
Is_Equal_18 := Fld_102 = Sym_20; 
if Is_Equal_18 then
   If_Result_35 := True;
else
--# expr-start 12168 '<Symbol Import_Function at nodes.lkt:21250:19>' Sym_21 ada/nodes.lkt:21250
Sym_21 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Import_Function); 
--# expr-done 12168
Is_Equal_17 := Fld_102 = Sym_21; 
if Is_Equal_17 then
   If_Result_34 := True;
else
--# expr-start 12169 '<Symbol Import_Procedure at nodes.lkt:21251:19>' Sym_22 ada/nodes.lkt:21251
Sym_22 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Import_Procedure); 
--# expr-done 12169
Is_Equal_16 := Fld_102 = Sym_22; 
   If_Result_34 := Is_Equal_16;
end if;
   If_Result_35 := If_Result_34;
end if;
if If_Result_35 then
   True_Rel_4 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21251:44") else null)); 
   If_Result_36 := True_Rel_4;
else
   --# expr-start 12278 '<If at nodes.lkt:21175:9>' If_Result_33 ada/nodes.lkt:21175
--# expr-start 12171 '<FieldAccess for name_symbol at nodes.lkt:21253:13>' Fld_100 ada/nodes.lkt:21253
--# expr-start 12170 '<FieldAccess for id at nodes.lkt:21253:13>' Fld_99 ada/nodes.lkt:21253
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_99 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12170
      if Fld_99.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_100 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_99.Node);
--# end
--# expr-done 12171
--# expr-start 12172 '<Symbol Pre at nodes.lkt:21253:38>' Sym_11 ada/nodes.lkt:21253
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre); 
--# expr-done 12172
Is_Equal_15 := Fld_100 = Sym_11; 
if Is_Equal_15 then
   If_Result_32 := True;
else
--# expr-start 12173 '<Symbol Post at nodes.lkt:21254:19>' Sym_12 ada/nodes.lkt:21254
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post); 
--# expr-done 12173
Is_Equal_14 := Fld_100 = Sym_12; 
if Is_Equal_14 then
   If_Result_31 := True;
else
--# expr-start 12174 '<Symbol Pre'"'"'Class at nodes.lkt:21255:19>' Sym_13 ada/nodes.lkt:21255
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre_Class); 
--# expr-done 12174
Is_Equal_13 := Fld_100 = Sym_13; 
if Is_Equal_13 then
   If_Result_30 := True;
else
--# expr-start 12175 '<Symbol Post'"'"'Class at nodes.lkt:21256:19>' Sym_14 ada/nodes.lkt:21256
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post_Class); 
--# expr-done 12175
Is_Equal_12 := Fld_100 = Sym_14; 
if Is_Equal_12 then
   If_Result_29 := True;
else
--# expr-start 12176 '<Symbol Precondition at nodes.lkt:21257:19>' Sym_15 ada/nodes.lkt:21257
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Precondition); 
--# expr-done 12176
Is_Equal_11 := Fld_100 = Sym_15; 
if Is_Equal_11 then
   If_Result_28 := True;
else
--# expr-start 12177 '<Symbol Postcondition at nodes.lkt:21258:19>' Sym_16 ada/nodes.lkt:21258
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Postcondition); 
--# expr-done 12177
Is_Equal_10 := Fld_100 = Sym_16; 
if Is_Equal_10 then
   If_Result_27 := True;
else
--# expr-start 12178 '<Symbol Precondition'"'"'Class at nodes.lkt:21259:19>' Sym_17 ada/nodes.lkt:21259
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Precondition_Class); 
--# expr-done 12178
Is_Equal_9 := Fld_100 = Sym_17; 
if Is_Equal_9 then
   If_Result_26 := True;
else
--# expr-start 12179 '<Symbol Postcondition'"'"'Class at nodes.lkt:21260:19>' Sym_18 ada/nodes.lkt:21260
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Postcondition_Class); 
--# expr-done 12179
Is_Equal_8 := Fld_100 = Sym_18; 
if Is_Equal_8 then
   If_Result_25 := True;
else
--# expr-start 12180 '<Symbol Initial_Condition at nodes.lkt:21261:19>' Sym_19 ada/nodes.lkt:21261
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Initial_Condition); 
--# expr-done 12180
Is_Equal_7 := Fld_100 = Sym_19; 
   If_Result_25 := Is_Equal_7;
end if;
   If_Result_26 := If_Result_25;
end if;
   If_Result_27 := If_Result_26;
end if;
   If_Result_28 := If_Result_27;
end if;
   If_Result_29 := If_Result_28;
end if;
   If_Result_30 := If_Result_29;
end if;
   If_Result_31 := If_Result_30;
end if;
   If_Result_32 := If_Result_31;
end if;
if If_Result_32 then
--# expr-start 12182 '<FieldAccess for assoc_expr at nodes.lkt:21263:13>' Fld_34 ada/nodes.lkt:21263
--# expr-start 12181 '<FieldAccess for args at nodes.lkt:21263:13>' Fld_31 ada/nodes.lkt:21263
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_31 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12181
Fld_32 := Fld_31.Node;
Get_Result_2 := Get (Self, Fld_32, 0, True); 
Is_Null_4 := Get_Result_2 = null; 
if Is_Null_4 then
   If_Result_9 := No_Entity_Base_Assoc;
else
Fld_33 := Fld_31.Info;
As_Entity_4 := (Info => Fld_33, Node => Get_Result_2); 
   If_Result_9 := As_Entity_4;
end if;
      if If_Result_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_34 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result_9.Node, E_Info => If_Result_9.Info);
--# end
--# expr-done 12182
Var_Expr_7 := Fld_34;
if Var_Expr_7 /= No_Entity_Expr then
   --# scope-start
   --# bind expr Var_Expr_7
--# expr-start 12189 '<LogicBinaryOp And at nodes.lkt:21265:17>' And_Pred_7 ada/nodes.lkt:21265
--# expr-start 12187 '<LogicBinaryOp And at nodes.lkt:21266:21>' And_Pred_6 ada/nodes.lkt:21266
--# expr-start 12185 '<Bind at nodes.lkt:21266:21>' Bind_Result_2 ada/nodes.lkt:21266
--# expr-start 12183 '<FieldAccess for expected_type_var at nodes.lkt:21266:21>' Fld_35 ada/nodes.lkt:21266
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_35 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_7.Node);
--# expr-done 12183
Fld_35.Value := No_Entity;
Entity_Vars.Reset (Fld_35);
--# expr-start 12184 '<FieldAccess for bool_type at nodes.lkt:21266:49>' Fld_36 ada/nodes.lkt:21266
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_36 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 12184
      Cast_Result_5 := Create_Internal_Entity
        (Node => Fld_36.Node,
         Info => Fld_36.Info);
Bind_Result_2 := Solver.Create_Assign (Fld_35, Cast_Result_5, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21266:21") else null)); 
--# expr-done 12185
--# expr-start 12186 '<FieldAccess for sub_equation at nodes.lkt:21267:26>' Fld_37 ada/nodes.lkt:21267
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_37 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_7.Info);
--# end
--# expr-done 12186
And_Pred_6 := Create_And (Bind_Result_2, Fld_37, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21266:21") else null)); 
--# expr-done 12187
--# expr-start 12188 '<FieldAccess for matches_expected_formal_type at nodes.lkt:21269:22>' Fld_38 ada/nodes.lkt:21269
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_38 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Var_Expr_7.Node, Origin => Origin);
--# end
--# expr-done 12188
And_Pred_7 := Create_And (And_Pred_6, Fld_38, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21265:17") else null)); 
--# expr-done 12189
Scope_Result_3 := And_Pred_7;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3499;
   Result_Var_3 := Scope_Result_3;
else
   False_Rel := Solver.Create_False ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21270:29") else null)); 
   Result_Var_3 := False_Rel;
end if;
      Inc_Ref (Result_Var_3);
   If_Result_33 := Result_Var_3;
else
   --# expr-start 12277 '<If at nodes.lkt:21175:9>' If_Result_24 ada/nodes.lkt:21175
--# expr-start 12192 '<FieldAccess for name_is at nodes.lkt:21272:14>' Fld_98 ada/nodes.lkt:21272
--# expr-start 12190 '<FieldAccess for id at nodes.lkt:21272:14>' Fld_97 ada/nodes.lkt:21272
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_97 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12190
      if Fld_97.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12191 '<Symbol Test_Case at nodes.lkt:21272:30>' Sym_10 ada/nodes.lkt:21272
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Test_Case); 
--# expr-done 12191
--# property-call-start Name.name_is
Fld_98 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_97.Node, Sym => Sym_10);
--# end
--# expr-done 12192
if Fld_98 then
   --# expr-start 12211 '<LogicAll at nodes.lkt:21274:13>' Logic_Boolean_Op_3 ada/nodes.lkt:21274
--# expr-start 12210 '<Map at nodes.lkt:21274:13>' Map_Result_4 ada/nodes.lkt:21274
   --# expr-start 12199 '<Map at nodes.lkt:21274:13>' Map_Result_3 ada/nodes.lkt:21274
   --# expr-start 12193 '<FieldAccess for args at nodes.lkt:21274:13>' Fld_39 ada/nodes.lkt:21274
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_39 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12193
Fld_40 := Fld_39.Node;
      declare
         Map_Result_3_Vec : Internal_Entity_Base_Assoc_Vectors.Vector;
      begin
      if Fld_40 = null then
      Map_Result_3 := Create_Internal_Entity_Base_Assoc_Array (0);
      else
      declare
         Collection : constant Bare_Base_Assoc_List := Fld_40;
      begin
         for Untyped_Item_4 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_4 := Untyped_Item_4; 
Is_Null_5 := Bare_Item_4 = null; 
if Is_Null_5 then
   If_Result_10 := No_Entity_Base_Assoc;
else
Fld_41 := Fld_39.Info;
As_Entity_5 := (Info => Fld_41, Node => Bare_Item_4); 
   If_Result_10 := As_Entity_5;
end if;
                  Item_4 := If_Result_10; 
   --# scope-start
               --# bind arg Item_4
--# expr-start 12194 '<Cast to PragmaArgumentAssoc at nodes.lkt:21276:17>' Cast_Result_6 ada/nodes.lkt:21276
Cast_Expr_2 := Item_4; 
   if Cast_Expr_2.Node = null
      or else Cast_Expr_2.Node.Kind in Ada_Pragma_Argument_Assoc_Range
   then
      Cast_Result_6 := Create_Internal_Entity_Pragma_Argument_Assoc
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
   else
         Cast_Result_6 := No_Entity_Pragma_Argument_Assoc;
   end if;
--# expr-done 12194
Var_Expr_5 := Cast_Result_6;
if Var_Expr_5 /= No_Entity_Pragma_Argument_Assoc then
   --# scope-start
   --# bind parg Var_Expr_5
--# expr-start 12196 '<FieldAccess for name_symbol at nodes.lkt:21278:21>' Fld_43 ada/nodes.lkt:21278
--# expr-start 12195 '<FieldAccess for name at nodes.lkt:21278:21>' Fld_42 ada/nodes.lkt:21278
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_42 := Create_Internal_Entity_Name (Node => Var_Expr_5.Node.Pragma_Argument_Assoc_F_Name, Info => Var_Expr_5.Info);
--# expr-done 12195
      if Fld_42.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_43 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_42.Node);
--# end
--# expr-done 12196
--# expr-start 12197 '<Symbol Requires at nodes.lkt:21278:48>' Sym_4 ada/nodes.lkt:21278
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Requires); 
--# expr-done 12197
Is_Equal_5 := Fld_43 = Sym_4; 
if Is_Equal_5 then
   If_Result_11 := True;
else
--# expr-start 12198 '<Symbol Ensures at nodes.lkt:21278:62>' Sym_5 ada/nodes.lkt:21278
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ensures); 
--# expr-done 12198
Is_Equal_4 := Fld_43 = Sym_5; 
   If_Result_11 := Is_Equal_4;
end if;
Scope_Result_4 := If_Result_11;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := False;
end if;
         if Result_Var_4 then
         declare
            Item_To_Append : constant Internal_Entity_Base_Assoc := Item_4;
         begin
            Internal_Entity_Base_Assoc_Vectors.Append (Map_Result_3_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result_3 := Create_Internal_Entity_Base_Assoc_Array
           (Items_Count => Natural (Internal_Entity_Base_Assoc_Vectors.Length (Map_Result_3_Vec)));
         for I in Map_Result_3.Items'Range loop
            Map_Result_3.Items (I) := Internal_Entity_Base_Assoc_Vectors.Get
              (Map_Result_3_Vec,
               I + Internal_Entity_Base_Assoc_Vectors.Index_Type'First - Map_Result_3.Items'First);
         end loop;
         Internal_Entity_Base_Assoc_Vectors.Destroy (Map_Result_3_Vec);
      end;
--# expr-done 12199
      declare
         Map_Result_4_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Assoc_Array_Access := Map_Result_3;
      begin
         for Item_6 of
               Collection.Items
         loop
   --# scope-start
               --# bind arg Item_6
      --# expr-start 12209 '<LogicBinaryOp And at nodes.lkt:21283:17>' And_Pred_9 ada/nodes.lkt:21283
--# expr-start 12206 '<LogicBinaryOp And at nodes.lkt:21284:21>' And_Pred_8 ada/nodes.lkt:21284
--# expr-start 12203 '<Bind at nodes.lkt:21284:21>' Bind_Result_3 ada/nodes.lkt:21284
--# expr-start 12201 '<FieldAccess for expected_type_var at nodes.lkt:21284:21>' Fld_45 ada/nodes.lkt:21284
--# expr-start 12200 '<FieldAccess for assoc_expr at nodes.lkt:21284:21>' Fld_44 ada/nodes.lkt:21284
      if Item_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_44 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_6.Node, E_Info => Item_6.Info);
--# end
--# expr-done 12200
      if Fld_44.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_45 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_44.Node);
--# expr-done 12201
Fld_45.Value := No_Entity;
Entity_Vars.Reset (Fld_45);
--# expr-start 12202 '<FieldAccess for bool_type at nodes.lkt:21284:61>' Fld_46 ada/nodes.lkt:21284
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_46 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 12202
      Cast_Result_7 := Create_Internal_Entity
        (Node => Fld_46.Node,
         Info => Fld_46.Info);
Bind_Result_3 := Solver.Create_Assign (Fld_45, Cast_Result_7, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21284:21") else null)); 
--# expr-done 12203
--# expr-start 12205 '<FieldAccess for sub_equation at nodes.lkt:21285:26>' Fld_48 ada/nodes.lkt:21285
--# expr-start 12204 '<FieldAccess for assoc_expr at nodes.lkt:21285:26>' Fld_47 ada/nodes.lkt:21285
      if Item_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_47 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_6.Node, E_Info => Item_6.Info);
--# end
--# expr-done 12204
      if Fld_47.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_48 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_47.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_47.Info);
--# end
--# expr-done 12205
And_Pred_8 := Create_And (Bind_Result_3, Fld_48, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21284:21") else null)); 
--# expr-done 12206
--# expr-start 12208 '<FieldAccess for matches_expected_formal_type at nodes.lkt:21287:22>' Fld_50 ada/nodes.lkt:21287
--# expr-start 12207 '<FieldAccess for assoc_expr at nodes.lkt:21287:22>' Fld_49 ada/nodes.lkt:21287
      if Item_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_49 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_6.Node, E_Info => Item_6.Info);
--# end
--# expr-done 12207
      if Fld_49.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_50 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Fld_49.Node, Origin => Origin);
--# end
--# expr-done 12208
And_Pred_9 := Create_And (And_Pred_8, Fld_50, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21283:17") else null)); 
--# expr-done 12209
         declare
            Item_To_Append : constant Logic_Equation := And_Pred_9;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_4_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3503;
         end loop;
      end;
         Map_Result_4 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_4_Vec)));
         for I in Map_Result_4.Items'Range loop
            Map_Result_4.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_4_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_4.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_4_Vec);
      end;
--# expr-done 12210
Logic_Boolean_Op_3 := Solver.Create_All (Relation_Array (Map_Result_4.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21274:13") else null)); 
--# expr-done 12211
   If_Result_24 := Logic_Boolean_Op_3;
else
   --# expr-start 12276 '<If at nodes.lkt:21175:9>' If_Result_23 ada/nodes.lkt:21175
--# expr-start 12214 '<FieldAccess for name_is at nodes.lkt:21289:14>' Fld_96 ada/nodes.lkt:21289
--# expr-start 12212 '<FieldAccess for id at nodes.lkt:21289:14>' Fld_95 ada/nodes.lkt:21289
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_95 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12212
      if Fld_95.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12213 '<Symbol Contract_Cases at nodes.lkt:21289:30>' Sym_9 ada/nodes.lkt:21289
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Contract_Cases); 
--# expr-done 12213
--# property-call-start Name.name_is
Fld_96 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_95.Node, Sym => Sym_9);
--# end
--# expr-done 12214
if Fld_96 then
   --# expr-start 12222 '<LogicAll at nodes.lkt:21291:13>' Logic_Boolean_Op_4 ada/nodes.lkt:21291
--# expr-start 12221 '<Map at nodes.lkt:21291:13>' Map_Result_5 ada/nodes.lkt:21291
   --# expr-start 12218 '<FieldAccess for assocs at nodes.lkt:21291:13>' Fld_55 ada/nodes.lkt:21291
--# expr-start 12217 '<Cast to BaseAggregate at nodes.lkt:21291:13>' Cast_Result_8 ada/nodes.lkt:21291
--# expr-start 12216 '<FieldAccess for assoc_expr at nodes.lkt:21291:13>' Fld_54 ada/nodes.lkt:21291
--# expr-start 12215 '<FieldAccess for args at nodes.lkt:21291:13>' Fld_51 ada/nodes.lkt:21291
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_51 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12215
Fld_52 := Fld_51.Node;
Get_Result_3 := Get (Self, Fld_52, 0, True); 
Is_Null_6 := Get_Result_3 = null; 
if Is_Null_6 then
   If_Result_12 := No_Entity_Base_Assoc;
else
Fld_53 := Fld_51.Info;
As_Entity_6 := (Info => Fld_53, Node => Get_Result_3); 
   If_Result_12 := As_Entity_6;
end if;
      if If_Result_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_54 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result_12.Node, E_Info => If_Result_12.Info);
--# end
--# expr-done 12216
   if Fld_54.Node = null
      or else Fld_54.Node.Kind in Ada_Base_Aggregate
   then
      Cast_Result_8 := Create_Internal_Entity_Base_Aggregate
        (Node => Fld_54.Node,
         Info => Fld_54.Info);
   else
         Cast_Result_8 := No_Entity_Base_Aggregate;
   end if;
--# expr-done 12217
      if Cast_Result_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_55 := Create_Internal_Entity_Assoc_List (Node => Cast_Result_8.Node.Base_Aggregate_F_Assocs, Info => Cast_Result_8.Info);
--# expr-done 12218
Fld_56 := Fld_55.Node;
      declare
         Map_Result_5_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_56 = null then
      Map_Result_5 := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Assoc_List := Fld_56;
      begin
         for Untyped_Item_3 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_3 := Untyped_Item_3; 
Is_Null_7 := Bare_Item_3 = null; 
if Is_Null_7 then
   If_Result_13 := No_Entity_Basic_Assoc;
else
Fld_57 := Fld_55.Info;
As_Entity_7 := (Info => Fld_57, Node => Bare_Item_3); 
   If_Result_13 := As_Entity_7;
end if;
                  Item_3 := If_Result_13; 
   --# scope-start
               --# bind assoc Item_3
      --# expr-start 12220 '<FieldAccess for contract_cases_assoc_equation at nodes.lkt:21293:17>' Fld_58 ada/nodes.lkt:21293
--# expr-start 12219 '<Cast to AggregateAssoc at nodes.lkt:21293:17>' Cast_Result_9 ada/nodes.lkt:21293
Cast_Expr_3 := Item_3; 
   if Cast_Expr_3.Node = null
      or else Cast_Expr_3.Node.Kind in Ada_Aggregate_Assoc_Range
   then
      Cast_Result_9 := Create_Internal_Entity_Aggregate_Assoc
        (Node => Cast_Expr_3.Node,
         Info => Cast_Expr_3.Info);
   else
         Cast_Result_9 := No_Entity_Aggregate_Assoc;
   end if;
--# expr-done 12219
      if Cast_Result_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AggregateAssoc.contract_cases_assoc_equation
Fld_58 := Libadalang.Implementation.Aggregate_Assoc_P_Contract_Cases_Assoc_Equation (Node => Cast_Result_9.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_9.Info);
--# end
--# expr-done 12220
         declare
            Item_To_Append : constant Logic_Equation := Fld_58;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_5_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3504;
         end loop;
      end;
      end if;
         Map_Result_5 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_5_Vec)));
         for I in Map_Result_5.Items'Range loop
            Map_Result_5.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_5_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_5.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_5_Vec);
      end;
--# expr-done 12221
Logic_Boolean_Op_4 := Solver.Create_All (Relation_Array (Map_Result_5.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21291:13") else null)); 
--# expr-done 12222
   If_Result_23 := Logic_Boolean_Op_4;
else
   --# expr-start 12275 '<If at nodes.lkt:21175:9>' If_Result_22 ada/nodes.lkt:21175
--# expr-start 12225 '<FieldAccess for name_is at nodes.lkt:21295:14>' Fld_94 ada/nodes.lkt:21295
--# expr-start 12223 '<FieldAccess for id at nodes.lkt:21295:14>' Fld_93 ada/nodes.lkt:21295
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_93 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12223
      if Fld_93.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12224 '<Symbol Debug at nodes.lkt:21295:30>' Sym_8 ada/nodes.lkt:21295
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Debug); 
--# expr-done 12224
--# property-call-start Name.name_is
Fld_94 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_93.Node, Sym => Sym_8);
--# end
--# expr-done 12225
if Fld_94 then
   --# expr-start 12250 '<LogicBinaryOp And at nodes.lkt:21297:13>' And_Pred_13 ada/nodes.lkt:21297
--# expr-start 12239 '<If at nodes.lkt:21300:17>' If_Result_15 ada/nodes.lkt:21300
--# expr-start 12228 '<Eq at nodes.lkt:21300:20>' Is_Equal_6 ada/nodes.lkt:21300
--# expr-start 12227 '<length at nodes.lkt:21300:20>' Len ada/nodes.lkt:21300
--# expr-start 12226 '<FieldAccess for args at nodes.lkt:21300:20>' Fld_67 ada/nodes.lkt:21300
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_67 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12226
Fld_68 := Fld_67.Node; 
Len := Length (Fld_68); 
--# expr-done 12227
Is_Equal_6 := Len = 2; 
--# expr-done 12228
if Is_Equal_6 then
   --# expr-start 12238 '<Let at nodes.lkt:21302:21>' Let_Result_1 ada/nodes.lkt:21302
--# scope-start
--# expr-start 12230 '<FieldAccess for assoc_expr at nodes.lkt:21302:32>' Fld_62 ada/nodes.lkt:21302
--# expr-start 12229 '<FieldAccess for args at nodes.lkt:21302:32>' Fld_59 ada/nodes.lkt:21302
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_59 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12229
Fld_60 := Fld_59.Node;
Get_Result_4 := Get (Self, Fld_60, 0, True); 
Is_Null_8 := Get_Result_4 = null; 
if Is_Null_8 then
   If_Result_14 := No_Entity_Base_Assoc;
else
Fld_61 := Fld_59.Info;
As_Entity_8 := (Info => Fld_61, Node => Get_Result_4); 
   If_Result_14 := As_Entity_8;
end if;
      if If_Result_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_62 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result_14.Node, E_Info => If_Result_14.Info);
--# end
--# expr-done 12230
Local_Expr := Fld_62; 
--# bind expr Local_Expr
--# expr-start 12237 '<LogicBinaryOp And at nodes.lkt:21304:21>' And_Pred_11 ada/nodes.lkt:21304
--# expr-start 12235 '<LogicBinaryOp And at nodes.lkt:21305:25>' And_Pred_10 ada/nodes.lkt:21305
--# expr-start 12233 '<Bind at nodes.lkt:21305:25>' Bind_Result_4 ada/nodes.lkt:21305
--# expr-start 12231 '<FieldAccess for expected_type_var at nodes.lkt:21305:25>' Fld_63 ada/nodes.lkt:21305
      if Local_Expr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_63 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Local_Expr.Node);
--# expr-done 12231
Fld_63.Value := No_Entity;
Entity_Vars.Reset (Fld_63);
--# expr-start 12232 '<FieldAccess for bool_type at nodes.lkt:21305:53>' Fld_64 ada/nodes.lkt:21305
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_64 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 12232
      Cast_Result_10 := Create_Internal_Entity
        (Node => Fld_64.Node,
         Info => Fld_64.Info);
Bind_Result_4 := Solver.Create_Assign (Fld_63, Cast_Result_10, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21305:25") else null)); 
--# expr-done 12233
--# expr-start 12234 '<FieldAccess for sub_equation at nodes.lkt:21306:30>' Fld_65 ada/nodes.lkt:21306
      if Local_Expr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_65 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Expr.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Expr.Info);
--# end
--# expr-done 12234
And_Pred_10 := Create_And (Bind_Result_4, Fld_65, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21305:25") else null)); 
--# expr-done 12235
--# expr-start 12236 '<FieldAccess for matches_expected_formal_type at nodes.lkt:21308:26>' Fld_66 ada/nodes.lkt:21308
      if Local_Expr.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_formal_type
Fld_66 := Libadalang.Implementation.Expr_P_Matches_Expected_Formal_Type (Node => Local_Expr.Node, Origin => Origin);
--# end
--# expr-done 12236
And_Pred_11 := Create_And (And_Pred_10, Fld_66, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21304:21") else null)); 
--# expr-done 12237
Let_Result_1 := And_Pred_11; Inc_Ref (Let_Result_1);
--# end
--# expr-done 12238
   If_Result_15 := Let_Result_1;
else
   True_Rel_5 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21310:22") else null)); 
   If_Result_15 := True_Rel_5;
end if;
      Inc_Ref (If_Result_15);
--# expr-done 12239
--# expr-start 12249 '<Let at nodes.lkt:21313:17>' Let_Result_2 ada/nodes.lkt:21313
--# scope-start
--# expr-start 12240 '<FieldAccess for args at nodes.lkt:21313:28>' Fld_71 ada/nodes.lkt:21313
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_71 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12240
Fld_72 := Fld_71.Node;
--# expr-start 12243 '<Arithmetic - at nodes.lkt:21313:39>' Arith_Result ada/nodes.lkt:21313
--# expr-start 12242 '<length at nodes.lkt:21313:39>' Len_1 ada/nodes.lkt:21313
--# expr-start 12241 '<FieldAccess for args at nodes.lkt:21313:39>' Fld_69 ada/nodes.lkt:21313
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_69 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12241
Fld_70 := Fld_69.Node; 
Len_1 := Length (Fld_70); 
--# expr-done 12242
Arith_Result := (Len_1 - 1); 
--# expr-done 12243
Get_Result_5 := Get (Self, Fld_72, Arith_Result, True); 
Is_Null_9 := Get_Result_5 = null; 
if Is_Null_9 then
   If_Result_16 := No_Entity_Base_Assoc;
else
Fld_73 := Fld_71.Info;
As_Entity_9 := (Info => Fld_73, Node => Get_Result_5); 
   If_Result_16 := As_Entity_9;
end if;
Var_Expr_273 := If_Result_16;
if Var_Expr_273 /= No_Entity_Base_Assoc then
   --# scope-start
--# expr-start 12244 '<FieldAccess for assoc_expr at nodes.lkt:21313:28>' Fld_74 ada/nodes.lkt:21313
      if Var_Expr_273.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_74 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Var_Expr_273.Node, E_Info => Var_Expr_273.Info);
--# end
--# expr-done 12244
Scope_Result_5 := Fld_74;
   --# end
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := No_Entity_Expr;
end if;
Local_Proc := Result_Var_5; 
--# bind proc Local_Proc
--# expr-start 12248 '<LogicBinaryOp And at nodes.lkt:21315:17>' And_Pred_12 ada/nodes.lkt:21315
--# expr-start 12246 '<Bind at nodes.lkt:21315:17>' Bind_Result_5 ada/nodes.lkt:21315
--# expr-start 12245 '<FieldAccess for type_var at nodes.lkt:21315:17>' Fld_75 ada/nodes.lkt:21315
      if Local_Proc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_75 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Local_Proc.Node);
--# expr-done 12245
Fld_75.Value := No_Entity;
Entity_Vars.Reset (Fld_75);
Cast_Expr_4 := No_Entity_Base_Type_Decl; 
      Cast_Result_11 := Create_Internal_Entity
        (Node => Cast_Expr_4.Node,
         Info => Cast_Expr_4.Info);
Bind_Result_5 := Solver.Create_Assign (Fld_75, Cast_Result_11, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21315:17") else null)); 
--# expr-done 12246
--# expr-start 12247 '<FieldAccess for sub_equation at nodes.lkt:21316:22>' Fld_76 ada/nodes.lkt:21316
      if Local_Proc.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_76 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Local_Proc.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Local_Proc.Info);
--# end
--# expr-done 12247
And_Pred_12 := Create_And (Bind_Result_5, Fld_76, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21315:17") else null)); 
--# expr-done 12248
Let_Result_2 := And_Pred_12; Inc_Ref (Let_Result_2);
--# end
--# expr-done 12249
And_Pred_13 := Create_And (If_Result_15, Let_Result_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21297:13") else null)); 
--# expr-done 12250
   If_Result_22 := And_Pred_13;
else
   --# expr-start 12274 '<If at nodes.lkt:21175:9>' If_Result_21 ada/nodes.lkt:21175
--# expr-start 12253 '<FieldAccess for name_is at nodes.lkt:21318:14>' Fld_92 ada/nodes.lkt:21318
--# expr-start 12251 '<FieldAccess for id at nodes.lkt:21318:14>' Fld_91 ada/nodes.lkt:21318
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_91 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12251
      if Fld_91.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12252 '<Symbol Annotate at nodes.lkt:21318:30>' Sym_7 ada/nodes.lkt:21318
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Annotate); 
--# expr-done 12252
--# property-call-start Name.name_is
Fld_92 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_91.Node, Sym => Sym_7);
--# end
--# expr-done 12253
if Fld_92 then
   --# expr-start 12267 '<LogicAll at nodes.lkt:21325:13>' Logic_Boolean_Op_5 ada/nodes.lkt:21325
--# expr-start 12266 '<Map at nodes.lkt:21325:13>' Map_Result_6 ada/nodes.lkt:21325
   --# expr-start 12254 '<FieldAccess for args at nodes.lkt:21325:13>' Fld_77 ada/nodes.lkt:21325
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_77 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12254
Fld_78 := Fld_77.Node;
      declare
         Map_Result_6_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_78 = null then
      Map_Result_6 := Create_Logic_Equation_Array (0);
      else
         Index_2 := 0;
      declare
         Collection : constant Bare_Base_Assoc_List := Fld_78;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_10 := Bare_Item_1 = null; 
if Is_Null_10 then
   If_Result_19 := No_Entity_Base_Assoc;
else
Fld_79 := Fld_77.Info;
As_Entity_10 := (Info => Fld_79, Node => Bare_Item_1); 
   If_Result_19 := As_Entity_10;
end if;
                  Item_1 := If_Result_19; 
   --# scope-start
               --# bind arg Item_1
               --# bind i Index_2
      --# expr-start 12265 '<If at nodes.lkt:21327:17>' If_Result_18 ada/nodes.lkt:21327
Comp_Result := Index_2 < 2; 
if Comp_Result then
   True_Rel_6 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21327:31") else null)); 
   If_Result_18 := True_Rel_6;
else
   --# expr-start 12264 '<If at nodes.lkt:21327:17>' If_Result_17 ada/nodes.lkt:21327
--# expr-start 12255 '<Cast to PragmaArgumentAssoc at nodes.lkt:21328:22>' Cast_Result_13 ada/nodes.lkt:21328
Cast_Expr_5 := Item_1; 
   if Cast_Expr_5.Node = null
      or else Cast_Expr_5.Node.Kind in Ada_Pragma_Argument_Assoc_Range
   then
      Cast_Result_13 := Create_Internal_Entity_Pragma_Argument_Assoc
        (Node => Cast_Expr_5.Node,
         Info => Cast_Expr_5.Info);
   else
         Cast_Result_13 := No_Entity_Pragma_Argument_Assoc;
   end if;
--# expr-done 12255
Var_Expr_274 := Cast_Result_13;
if Var_Expr_274 /= No_Entity_Pragma_Argument_Assoc then
   --# scope-start
--# expr-start 12256 '<FieldAccess for name at nodes.lkt:21328:22>' Fld_84 ada/nodes.lkt:21328
      if Var_Expr_274.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_84 := Create_Internal_Entity_Name (Node => Var_Expr_274.Node.Pragma_Argument_Assoc_F_Name, Info => Var_Expr_274.Info);
--# expr-done 12256
Var_Expr_275 := Fld_84;
if Var_Expr_275 /= No_Entity_Name then
   --# scope-start
--# expr-start 12258 '<FieldAccess for name_is at nodes.lkt:21328:22>' Fld_85 ada/nodes.lkt:21328
      if Var_Expr_275.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12257 '<Symbol Entity at nodes.lkt:21328:65>' Sym_6 ada/nodes.lkt:21328
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Entity); 
--# expr-done 12257
--# property-call-start Name.name_is
Fld_85 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_275.Node, Sym => Sym_6);
--# end
--# expr-done 12258
Scope_Result_6 := Fld_85;
   --# end
   Result_Var_6 := Scope_Result_6;
else
   Result_Var_6 := False;
end if;
Scope_Result_7 := Result_Var_6;
   --# end
   Result_Var_7 := Scope_Result_7;
else
   Result_Var_7 := False;
end if;
if Result_Var_7 then
   --# expr-start 12261 '<FieldAccess for xref_no_overloading at nodes.lkt:21329:22>' Fld_81 ada/nodes.lkt:21329
--# expr-start 12260 '<Cast to Name at nodes.lkt:21329:22>' Cast_Result_12 ada/nodes.lkt:21329
--# expr-start 12259 '<FieldAccess for assoc_expr at nodes.lkt:21329:22>' Fld_80 ada/nodes.lkt:21329
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_80 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 12259
   if Fld_80.Node = null
      or else Fld_80.Node.Kind in Ada_Name
   then
      Cast_Result_12 := Create_Internal_Entity_Name
        (Node => Fld_80.Node,
         Info => Fld_80.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 12260
      if Cast_Result_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_81 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Cast_Result_12.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result_12.Info);
--# end
--# expr-done 12261
   If_Result_17 := Fld_81;
else
   --# expr-start 12263 '<FieldAccess for annotate_argument_equation at nodes.lkt:21330:22>' Fld_83 ada/nodes.lkt:21330
--# expr-start 12262 '<FieldAccess for assoc_expr at nodes.lkt:21330:22>' Fld_82 ada/nodes.lkt:21330
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_82 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 12262
      if Fld_82.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.annotate_argument_equation
Fld_83 := Libadalang.Implementation.Expr_P_Annotate_Argument_Equation (Node => Fld_82.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_82.Info);
--# end
--# expr-done 12263
   If_Result_17 := Fld_83;
end if;
      Inc_Ref (If_Result_17);
--# expr-done 12264
   If_Result_18 := If_Result_17;
end if;
      Inc_Ref (If_Result_18);
--# expr-done 12265
         declare
            Item_To_Append : constant Logic_Equation := If_Result_18;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_6_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3506;
               Index_2 := Index_2 + 1;
         end loop;
      end;
      end if;
         Map_Result_6 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_6_Vec)));
         for I in Map_Result_6.Items'Range loop
            Map_Result_6.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_6_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_6.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_6_Vec);
      end;
--# expr-done 12266
Logic_Boolean_Op_5 := Solver.Create_All (Relation_Array (Map_Result_6.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21325:13") else null)); 
--# expr-done 12267
   If_Result_21 := Logic_Boolean_Op_5;
else
   --# expr-start 12273 '<LogicAll at nodes.lkt:21334:13>' Logic_Boolean_Op_6 ada/nodes.lkt:21334
--# expr-start 12272 '<Map at nodes.lkt:21334:13>' Map_Result_7 ada/nodes.lkt:21334
   --# expr-start 12268 '<FieldAccess for args at nodes.lkt:21334:13>' Fld_86 ada/nodes.lkt:21334
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_86 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12268
Fld_87 := Fld_86.Node;
      declare
         Map_Result_7_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_87 = null then
      Map_Result_7 := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Base_Assoc_List := Fld_87;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_11 := Bare_Item_0 = null; 
if Is_Null_11 then
   If_Result_20 := No_Entity_Base_Assoc;
else
Fld_88 := Fld_86.Info;
As_Entity_11 := (Info => Fld_88, Node => Bare_Item_0); 
   If_Result_20 := As_Entity_11;
end if;
                  Item_0 := If_Result_20; 
   --# scope-start
               --# bind a Item_0
      --# expr-start 12271 '<LogicBinaryOp Or at nodes.lkt:21336:17>' Or_Pred ada/nodes.lkt:21336
--# expr-start 12270 '<FieldAccess for sub_equation at nodes.lkt:21340:21>' Fld_90 ada/nodes.lkt:21340
--# expr-start 12269 '<FieldAccess for assoc_expr at nodes.lkt:21340:21>' Fld_89 ada/nodes.lkt:21340
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_89 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 12269
      if Fld_89.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_90 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_89.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_89.Info);
--# end
--# expr-done 12270
True_Rel_7 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21342:21") else null)); 
Or_Pred := Create_Or (Fld_90, True_Rel_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21336:17") else null)); 
--# expr-done 12271
         declare
            Item_To_Append : constant Logic_Equation := Or_Pred;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_7_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3509;
         end loop;
      end;
      end if;
         Map_Result_7 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_7_Vec)));
         for I in Map_Result_7.Items'Range loop
            Map_Result_7.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_7_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_7.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_7_Vec);
      end;
--# expr-done 12272
Logic_Boolean_Op_6 := Solver.Create_All (Relation_Array (Map_Result_7.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21334:13") else null)); 
--# expr-done 12273
   If_Result_21 := Logic_Boolean_Op_6;
end if;
      Inc_Ref (If_Result_21);
--# expr-done 12274
   If_Result_22 := If_Result_21;
end if;
      Inc_Ref (If_Result_22);
--# expr-done 12275
   If_Result_23 := If_Result_22;
end if;
      Inc_Ref (If_Result_23);
--# expr-done 12276
   If_Result_24 := If_Result_23;
end if;
      Inc_Ref (If_Result_24);
--# expr-done 12277
   If_Result_33 := If_Result_24;
end if;
      Inc_Ref (If_Result_33);
--# expr-done 12278
   If_Result_36 := If_Result_33;
end if;
      Inc_Ref (If_Result_36);
--# expr-done 12279
   If_Result_37 := If_Result_36;
end if;
      Inc_Ref (If_Result_37);
--# expr-done 12280
   If_Result_47 := If_Result_37;
end if;
      Inc_Ref (If_Result_47);
--# expr-done 12281
   If_Result_48 := If_Result_47;
end if;
      Inc_Ref (If_Result_48);
--# expr-done 12282
   If_Result_52 := If_Result_48;
end if;
      Inc_Ref (If_Result_52);
--# expr-done 12283
         Property_Result := If_Result_52;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1368;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1368;
                     Finalizer_Scope_3493;
                     Finalizer_Scope_3494;
                     Finalizer_Scope_3495;
                     Finalizer_Scope_3496;
                     Finalizer_Scope_3497;
                     Finalizer_Scope_3498;
                     Finalizer_Scope_3499;
                     Finalizer_Scope_3503;
                     Finalizer_Scope_3504;
                     Finalizer_Scope_3506;
                     Finalizer_Scope_3509;
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_Xref_Equation;
--# end
--# property-start Pragma.value_expr ada/nodes.lkt:21353
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_Value_Expr
  (Node : Bare_Pragma_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
     Ent : Internal_Entity_Pragma_Node :=
       Internal_Entity_Pragma_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
      Var_Expr_276 : Internal_Entity_Base_Assoc;
Var_Expr_277 : Internal_Entity_Base_Assoc;
Fld : Internal_Entity_Base_Assoc_List;
Fld_1 : Bare_Base_Assoc_List;
Fld_2 : Internal_Entity_Info;
Get_Result : Bare_Base_Assoc;
As_Entity : Internal_Entity_Base_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Assoc;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Internal_Entity_Base_Assoc_List;
Fld_5 : Bare_Base_Assoc_List;
Fld_6 : Internal_Entity_Info;
Get_Result_1 : Bare_Base_Assoc;
As_Entity_1 : Internal_Entity_Base_Assoc;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Assoc;
Fld_7 : Internal_Entity_Expr;
Scope_Result : Internal_Entity_Expr;
Result_Var : Internal_Entity_Expr;
Fld_8 : Internal_Entity_Base_Assoc_List;
Fld_9 : Bare_Base_Assoc_List;
Fld_10 : Internal_Entity_Info;
Get_Result_2 : Bare_Base_Assoc;
As_Entity_2 : Internal_Entity_Base_Assoc;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Base_Assoc;
Fld_11 : Internal_Entity_Expr;
Scope_Result_1 : Internal_Entity_Expr;
Result_Var_1 : Internal_Entity_Expr;
Fld_12 : Internal_Entity_Identifier;
Sym : Symbol_Type;
Fld_13 : Boolean;
If_Result_3 : Internal_Entity_Expr;
Fld_14 : Internal_Entity_Identifier;
Fld_15 : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result_4 : Boolean;
Is_Equal_2 : Boolean;
If_Result_5 : Boolean;
Is_Equal_3 : Boolean;
If_Result_6 : Boolean;
If_Result_7 : Internal_Entity_Expr;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12300 '<If at nodes.lkt:21354:9>' If_Result_7 ada/nodes.lkt:21354
--# expr-start 12285 '<FieldAccess for name_symbol at nodes.lkt:21355:13>' Fld_15 ada/nodes.lkt:21355
--# expr-start 12284 '<FieldAccess for id at nodes.lkt:21355:13>' Fld_14 ada/nodes.lkt:21355
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12284
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_15 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_14.Node);
--# end
--# expr-done 12285
--# expr-start 12286 '<Symbol Import at nodes.lkt:21355:38>' Sym_1 ada/nodes.lkt:21355
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Import); 
--# expr-done 12286
Is_Equal_3 := Fld_15 = Sym_1; 
if Is_Equal_3 then
   If_Result_6 := True;
else
--# expr-start 12287 '<Symbol Export at nodes.lkt:21356:19>' Sym_2 ada/nodes.lkt:21356
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Export); 
--# expr-done 12287
Is_Equal_2 := Fld_15 = Sym_2; 
if Is_Equal_2 then
   If_Result_5 := True;
else
--# expr-start 12288 '<Symbol Interface at nodes.lkt:21357:19>' Sym_3 ada/nodes.lkt:21357
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Interface); 
--# expr-done 12288
Is_Equal_1 := Fld_15 = Sym_3; 
if Is_Equal_1 then
   If_Result_4 := True;
else
--# expr-start 12289 '<Symbol Convention at nodes.lkt:21358:19>' Sym_4 ada/nodes.lkt:21358
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Convention); 
--# expr-done 12289
Is_Equal := Fld_15 = Sym_4; 
   If_Result_4 := Is_Equal;
end if;
   If_Result_5 := If_Result_4;
end if;
   If_Result_6 := If_Result_5;
end if;
if If_Result_6 then
   --# expr-start 12291 '<FieldAccess for assoc_expr at nodes.lkt:21359:14>' Fld_3 ada/nodes.lkt:21359
--# expr-start 12290 '<FieldAccess for args at nodes.lkt:21359:14>' Fld ada/nodes.lkt:21359
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12290
Fld_1 := Fld.Node;
Get_Result := Get (Self, Fld_1, 0, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Base_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 12291
   If_Result_7 := Fld_3;
else
   --# expr-start 12299 '<If at nodes.lkt:21354:9>' If_Result_3 ada/nodes.lkt:21354
--# expr-start 12294 '<FieldAccess for name_is at nodes.lkt:21364:14>' Fld_13 ada/nodes.lkt:21364
--# expr-start 12292 '<FieldAccess for id at nodes.lkt:21364:14>' Fld_12 ada/nodes.lkt:21364
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12292
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12293 '<Symbol SPARK_Mode at nodes.lkt:21364:30>' Sym ada/nodes.lkt:21364
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Spark_Mode); 
--# expr-done 12293
--# property-call-start Name.name_is
Fld_13 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_12.Node, Sym => Sym);
--# end
--# expr-done 12294
if Fld_13 then
--# expr-start 12295 '<FieldAccess for args at nodes.lkt:21364:50>' Fld_4 ada/nodes.lkt:21364
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12295
Fld_5 := Fld_4.Node;
Get_Result_1 := Get (Self, Fld_5, 0, True); 
Is_Null_1 := Get_Result_1 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Base_Assoc;
else
Fld_6 := Fld_4.Info;
As_Entity_1 := (Info => Fld_6, Node => Get_Result_1); 
   If_Result_1 := As_Entity_1;
end if;
Var_Expr_276 := If_Result_1;
if Var_Expr_276 /= No_Entity_Base_Assoc then
   --# scope-start
--# expr-start 12296 '<FieldAccess for assoc_expr at nodes.lkt:21364:50>' Fld_7 ada/nodes.lkt:21364
      if Var_Expr_276.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Var_Expr_276.Node, E_Info => Var_Expr_276.Info);
--# end
--# expr-done 12296
Scope_Result := Fld_7;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Expr;
end if;
   If_Result_3 := Result_Var;
else
--# expr-start 12297 '<FieldAccess for args at nodes.lkt:21365:14>' Fld_8 ada/nodes.lkt:21365
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12297
Fld_9 := Fld_8.Node;
Get_Result_2 := Get (Self, Fld_9, 1, True); 
Is_Null_2 := Get_Result_2 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Base_Assoc;
else
Fld_10 := Fld_8.Info;
As_Entity_2 := (Info => Fld_10, Node => Get_Result_2); 
   If_Result_2 := As_Entity_2;
end if;
Var_Expr_277 := If_Result_2;
if Var_Expr_277 /= No_Entity_Base_Assoc then
   --# scope-start
--# expr-start 12298 '<FieldAccess for assoc_expr at nodes.lkt:21365:14>' Fld_11 ada/nodes.lkt:21365
      if Var_Expr_277.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_11 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Var_Expr_277.Node, E_Info => Var_Expr_277.Info);
--# end
--# expr-done 12298
Scope_Result_1 := Fld_11;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Entity_Expr;
end if;
   If_Result_3 := Result_Var_1;
end if;
--# expr-done 12299
   If_Result_7 := If_Result_3;
end if;
--# expr-done 12300
         Property_Result := If_Result_7;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_Value_Expr;
--# end
--# property-start Pragma.associated_entity_names ada/nodes.lkt:21367
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_Associated_Entity_Names
  (Node : Bare_Pragma_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name_Array_Access
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
     Ent : Internal_Entity_Pragma_Node :=
       Internal_Entity_Pragma_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name_Array_Access;
            procedure Finalizer_Scope_1370 with Inline_Always;
            procedure Finalizer_Scope_3514 with Inline_Always;
            procedure Finalizer_Scope_3516 with Inline_Always;
            procedure Finalizer_Scope_3520 with Inline_Always;
            procedure Finalizer_Scope_3521 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Base_Assoc;
Var_Expr_2 : Internal_Entity_Name;
Var_Expr_3 : Internal_Entity_Name;
Var_Expr_4 : Internal_Entity_Name;
Var_Expr_278 : Internal_Entity_Base_Assoc;
Var_Expr_279 : Internal_Entity_Base_Assoc;
Var_Expr_280 : Internal_Entity_Pragma_Argument_Assoc;
Var_Expr_281 : Internal_Entity_Name;
Fld : Internal_Entity_Base_Assoc_List;
Fld_1 : Bare_Base_Assoc_List;
Fld_2 : Internal_Entity_Info;
Get_Result : Bare_Base_Assoc;
As_Entity : Internal_Entity_Base_Assoc;
Is_Null : Boolean;
If_Result : Internal_Entity_Base_Assoc;
Fld_3 : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Array_Lit : Internal_Entity_Name_Array_Access;
Fld_4 : Internal_Entity_Base_Assoc_List;
Fld_5 : Bare_Base_Assoc_List;
Fld_6 : Internal_Entity_Info;
Item_5 : Internal_Entity_Base_Assoc;
Bare_Item_5 : Bare_Base_Assoc;
Fld_7 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
As_Entity_1 : Internal_Entity_Base_Assoc;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Base_Assoc;
Map_Result : Internal_Entity_Name_Array_Access;
Fld_8 : Internal_Entity_Base_Assoc_List;
Fld_9 : Bare_Base_Assoc_List;
Fld_10 : Internal_Entity_Info;
Get_Result_1 : Bare_Base_Assoc;
As_Entity_2 : Internal_Entity_Base_Assoc;
Is_Null_2 : Boolean;
If_Result_2 : Internal_Entity_Base_Assoc;
Fld_11 : Internal_Entity_Expr;
Scope_Result : Internal_Entity_Expr;
Result_Var : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Array_Lit_1 : Internal_Entity_Name_Array_Access;
Scope_Result_1 : Internal_Entity_Name_Array_Access;
Result_Var_1 : Internal_Entity_Name_Array_Access;
Fld_12 : Internal_Entity_Base_Assoc_List;
Fld_13 : Bare_Base_Assoc_List;
Fld_14 : Internal_Entity_Info;
Get_Result_2 : Bare_Base_Assoc;
As_Entity_3 : Internal_Entity_Base_Assoc;
Is_Null_3 : Boolean;
If_Result_3 : Internal_Entity_Base_Assoc;
Fld_15 : Internal_Entity_Expr;
Scope_Result_2 : Internal_Entity_Expr;
Result_Var_2 : Internal_Entity_Expr;
Cast_Result_3 : Internal_Entity_Name;
Array_Lit_2 : Internal_Entity_Name_Array_Access;
Is_A : Boolean;
Not_Val : Boolean;
If_Result_4 : Internal_Entity_Name_Array_Access;
Scope_Result_3 : Internal_Entity_Name_Array_Access;
Result_Var_3 : Internal_Entity_Name_Array_Access;
Fld_16 : Internal_Entity_Base_Assoc_List;
Fld_17 : Bare_Base_Assoc_List;
Fld_18 : Internal_Entity_Info;
Item_0 : Internal_Entity_Base_Assoc;
Bare_Item_0 : Bare_Base_Assoc;
Cast_Expr : Internal_Entity_Base_Assoc;
Cast_Result_4 : Internal_Entity_Pragma_Argument_Assoc;
Fld_19 : Internal_Entity_Name;
Sym : Symbol_Type;
Fld_20 : Boolean;
Scope_Result_4 : Boolean;
Result_Var_4 : Boolean;
Scope_Result_5 : Boolean;
Result_Var_5 : Boolean;
As_Entity_4 : Internal_Entity_Base_Assoc;
Is_Null_4 : Boolean;
If_Result_5 : Internal_Entity_Base_Assoc;
Find_Result : Internal_Entity_Base_Assoc;
Cast_Expr_1 : Internal_Entity_Base_Assoc;
Cast_Result_5 : Internal_Entity_Pragma_Argument_Assoc;
Fld_21 : Internal_Entity_Expr;
Cast_Result_6 : Internal_Entity_Name;
Array_Lit_3 : Internal_Entity_Name_Array_Access;
Scope_Result_6 : Internal_Entity_Name_Array_Access;
Result_Var_6 : Internal_Entity_Name_Array_Access;
Scope_Result_7 : Internal_Entity_Name_Array_Access;
Result_Var_7 : Internal_Entity_Name_Array_Access;
Fld_22 : Internal_Entity_Identifier;
Sym_1 : Symbol_Type;
Fld_23 : Boolean;
If_Result_6 : Internal_Entity_Name_Array_Access;
Fld_24 : Internal_Entity_Identifier;
Sym_2 : Symbol_Type;
Fld_25 : Boolean;
If_Result_7 : Internal_Entity_Name_Array_Access;
Fld_26 : Internal_Entity_Identifier;
Fld_27 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Sym_10 : Symbol_Type;
Sym_11 : Symbol_Type;
Sym_12 : Symbol_Type;
Sym_13 : Symbol_Type;
Sym_14 : Symbol_Type;
Sym_15 : Symbol_Type;
Sym_16 : Symbol_Type;
Sym_17 : Symbol_Type;
Sym_18 : Symbol_Type;
Sym_19 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result_8 : Boolean;
Is_Equal_2 : Boolean;
If_Result_9 : Boolean;
Is_Equal_3 : Boolean;
If_Result_10 : Boolean;
Is_Equal_4 : Boolean;
If_Result_11 : Boolean;
Is_Equal_5 : Boolean;
If_Result_12 : Boolean;
Is_Equal_6 : Boolean;
If_Result_13 : Boolean;
Is_Equal_7 : Boolean;
If_Result_14 : Boolean;
Is_Equal_8 : Boolean;
If_Result_15 : Boolean;
Is_Equal_9 : Boolean;
If_Result_16 : Boolean;
Is_Equal_10 : Boolean;
If_Result_17 : Boolean;
Is_Equal_11 : Boolean;
If_Result_18 : Boolean;
Is_Equal_12 : Boolean;
If_Result_19 : Boolean;
Is_Equal_13 : Boolean;
If_Result_20 : Boolean;
Is_Equal_14 : Boolean;
If_Result_21 : Boolean;
Is_Equal_15 : Boolean;
If_Result_22 : Boolean;
Is_Equal_16 : Boolean;
If_Result_23 : Boolean;
If_Result_24 : Internal_Entity_Name_Array_Access;
Fld_28 : Internal_Entity_Identifier;
Sym_20 : Symbol_Type;
Fld_29 : Boolean;
If_Result_25 : Internal_Entity_Name_Array_Access;
Fld_30 : Internal_Entity_Identifier;
Fld_31 : Symbol_Type;
Sym_21 : Symbol_Type;
Sym_22 : Symbol_Type;
Sym_23 : Symbol_Type;
Sym_24 : Symbol_Type;
Is_Equal_17 : Boolean;
Is_Equal_18 : Boolean;
If_Result_26 : Boolean;
Is_Equal_19 : Boolean;
If_Result_27 : Boolean;
Is_Equal_20 : Boolean;
If_Result_28 : Boolean;
If_Result_29 : Internal_Entity_Name_Array_Access;
            procedure Finalizer_Scope_1370 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Result_Var_3);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Result_Var_7);
                     Dec_Ref (If_Result_6);
                     Dec_Ref (If_Result_7);
                     Dec_Ref (If_Result_24);
                     Dec_Ref (If_Result_25);
                     Dec_Ref (If_Result_29);
            end Finalizer_Scope_1370;
            procedure Finalizer_Scope_3514 is
            begin
                     Dec_Ref (Array_Lit_1);
            end Finalizer_Scope_3514;
            procedure Finalizer_Scope_3516 is
            begin
                     Dec_Ref (Array_Lit_2);
                     Dec_Ref (If_Result_4);
            end Finalizer_Scope_3516;
            procedure Finalizer_Scope_3520 is
            begin
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Result_Var_6);
            end Finalizer_Scope_3520;
            procedure Finalizer_Scope_3521 is
            begin
                     Dec_Ref (Array_Lit_3);
            end Finalizer_Scope_3521;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12368 '<If at nodes.lkt:21368:9>' If_Result_29 ada/nodes.lkt:21368
--# expr-start 12302 '<FieldAccess for name_symbol at nodes.lkt:21369:13>' Fld_31 ada/nodes.lkt:21369
--# expr-start 12301 '<FieldAccess for id at nodes.lkt:21369:13>' Fld_30 ada/nodes.lkt:21369
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_30 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12301
      if Fld_30.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_31 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_30.Node);
--# end
--# expr-done 12302
--# expr-start 12303 '<Symbol Import at nodes.lkt:21369:38>' Sym_21 ada/nodes.lkt:21369
Sym_21 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Import); 
--# expr-done 12303
Is_Equal_20 := Fld_31 = Sym_21; 
if Is_Equal_20 then
   If_Result_28 := True;
else
--# expr-start 12304 '<Symbol Export at nodes.lkt:21370:19>' Sym_22 ada/nodes.lkt:21370
Sym_22 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Export); 
--# expr-done 12304
Is_Equal_19 := Fld_31 = Sym_22; 
if Is_Equal_19 then
   If_Result_27 := True;
else
--# expr-start 12305 '<Symbol Interface at nodes.lkt:21371:19>' Sym_23 ada/nodes.lkt:21371
Sym_23 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Interface); 
--# expr-done 12305
Is_Equal_18 := Fld_31 = Sym_23; 
if Is_Equal_18 then
   If_Result_26 := True;
else
--# expr-start 12306 '<Symbol Convention at nodes.lkt:21372:19>' Sym_24 ada/nodes.lkt:21372
Sym_24 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Convention); 
--# expr-done 12306
Is_Equal_17 := Fld_31 = Sym_24; 
   If_Result_26 := Is_Equal_17;
end if;
   If_Result_27 := If_Result_26;
end if;
   If_Result_28 := If_Result_27;
end if;
if If_Result_28 then
   --# expr-start 12310 '<ArrayLiteral at nodes.lkt:21373:14>' Array_Lit ada/nodes.lkt:21373
--# expr-start 12309 '<Cast to Name at nodes.lkt:21373:15>' Cast_Result ada/nodes.lkt:21373
--# expr-start 12308 '<FieldAccess for assoc_expr at nodes.lkt:21373:15>' Fld_3 ada/nodes.lkt:21373
--# expr-start 12307 '<FieldAccess for args at nodes.lkt:21373:15>' Fld ada/nodes.lkt:21373
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12307
Fld_1 := Fld.Node;
Get_Result := Get (Self, Fld_1, 1, True); 
Is_Null := Get_Result = null; 
if Is_Null then
   If_Result := No_Entity_Base_Assoc;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Get_Result); 
   If_Result := As_Entity;
end if;
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_3 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 12308
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 12309
Array_Lit := Create_Internal_Entity_Name_Array (Internal_Internal_Entity_Name_Array'(1 => Cast_Result)); 
--# expr-done 12310
   If_Result_29 := Array_Lit;
else
   --# expr-start 12367 '<If at nodes.lkt:21368:9>' If_Result_25 ada/nodes.lkt:21368
--# expr-start 12313 '<FieldAccess for name_is at nodes.lkt:21374:14>' Fld_29 ada/nodes.lkt:21374
--# expr-start 12311 '<FieldAccess for id at nodes.lkt:21374:14>' Fld_28 ada/nodes.lkt:21374
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12311
      if Fld_28.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12312 '<Symbol Inline at nodes.lkt:21374:30>' Sym_20 ada/nodes.lkt:21374
Sym_20 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Inline); 
--# expr-done 12312
--# property-call-start Name.name_is
Fld_29 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_28.Node, Sym => Sym_20);
--# end
--# expr-done 12313
if Fld_29 then
   --# expr-start 12317 '<Map at nodes.lkt:21375:14>' Map_Result ada/nodes.lkt:21375
   --# expr-start 12314 '<FieldAccess for args at nodes.lkt:21375:14>' Fld_4 ada/nodes.lkt:21375
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12314
Fld_5 := Fld_4.Node;
      declare
         Map_Result_Vec : Internal_Entity_Name_Vectors.Vector;
      begin
      if Fld_5 = null then
      Map_Result := Create_Internal_Entity_Name_Array (0);
      else
      declare
         Collection : constant Bare_Base_Assoc_List := Fld_5;
      begin
         for Untyped_Item_5 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_5 := Untyped_Item_5; 
Is_Null_1 := Bare_Item_5 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Base_Assoc;
else
Fld_6 := Fld_4.Info;
As_Entity_1 := (Info => Fld_6, Node => Bare_Item_5); 
   If_Result_1 := As_Entity_1;
end if;
                  Item_5 := If_Result_1; 
   --# scope-start
               --# bind a Item_5
      --# expr-start 12316 '<Cast to Name at nodes.lkt:21375:35>' Cast_Result_1 ada/nodes.lkt:21375
--# expr-start 12315 '<FieldAccess for assoc_expr at nodes.lkt:21375:35>' Fld_7 ada/nodes.lkt:21375
      if Item_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_7 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Item_5.Node, E_Info => Item_5.Info);
--# end
--# expr-done 12315
   if Fld_7.Node = null
      or else Fld_7.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
   else
         Cast_Result_1 := No_Entity_Name;
   end if;
--# expr-done 12316
         declare
            Item_To_Append : constant Internal_Entity_Name := Cast_Result_1;
         begin
            Internal_Entity_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Name_Array
           (Items_Count => Natural (Internal_Entity_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 12317
   If_Result_25 := Map_Result;
else
   --# expr-start 12366 '<If at nodes.lkt:21368:9>' If_Result_24 ada/nodes.lkt:21368
--# expr-start 12319 '<FieldAccess for name_symbol at nodes.lkt:21377:13>' Fld_27 ada/nodes.lkt:21377
--# expr-start 12318 '<FieldAccess for id at nodes.lkt:21377:13>' Fld_26 ada/nodes.lkt:21377
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_26 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12318
      if Fld_26.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_27 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_26.Node);
--# end
--# expr-done 12319
--# expr-start 12320 '<Symbol Pack at nodes.lkt:21377:38>' Sym_3 ada/nodes.lkt:21377
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pack); 
--# expr-done 12320
Is_Equal_16 := Fld_27 = Sym_3; 
if Is_Equal_16 then
   If_Result_23 := True;
else
--# expr-start 12321 '<Symbol Pure at nodes.lkt:21378:19>' Sym_4 ada/nodes.lkt:21378
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pure); 
--# expr-done 12321
Is_Equal_15 := Fld_27 = Sym_4; 
if Is_Equal_15 then
   If_Result_22 := True;
else
--# expr-start 12322 '<Symbol Preelaborate at nodes.lkt:21379:19>' Sym_5 ada/nodes.lkt:21379
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Preelaborate); 
--# expr-done 12322
Is_Equal_14 := Fld_27 = Sym_5; 
if Is_Equal_14 then
   If_Result_21 := True;
else
--# expr-start 12323 '<Symbol Elaborate_Body at nodes.lkt:21380:19>' Sym_6 ada/nodes.lkt:21380
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Elaborate_Body); 
--# expr-done 12323
Is_Equal_13 := Fld_27 = Sym_6; 
if Is_Equal_13 then
   If_Result_20 := True;
else
--# expr-start 12324 '<Symbol Volatile at nodes.lkt:21381:19>' Sym_7 ada/nodes.lkt:21381
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Volatile); 
--# expr-done 12324
Is_Equal_12 := Fld_27 = Sym_7; 
if Is_Equal_12 then
   If_Result_19 := True;
else
--# expr-start 12325 '<Symbol Volatile_Components at nodes.lkt:21382:19>' Sym_8 ada/nodes.lkt:21382
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Volatile_Components); 
--# expr-done 12325
Is_Equal_11 := Fld_27 = Sym_8; 
if Is_Equal_11 then
   If_Result_18 := True;
else
--# expr-start 12326 '<Symbol Unchecked_Union at nodes.lkt:21383:19>' Sym_9 ada/nodes.lkt:21383
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unchecked_Union); 
--# expr-done 12326
Is_Equal_10 := Fld_27 = Sym_9; 
if Is_Equal_10 then
   If_Result_17 := True;
else
--# expr-start 12327 '<Symbol Atomic at nodes.lkt:21384:19>' Sym_10 ada/nodes.lkt:21384
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Atomic); 
--# expr-done 12327
Is_Equal_9 := Fld_27 = Sym_10; 
if Is_Equal_9 then
   If_Result_16 := True;
else
--# expr-start 12328 '<Symbol Atomic_Components at nodes.lkt:21385:19>' Sym_11 ada/nodes.lkt:21385
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Atomic_Components); 
--# expr-done 12328
Is_Equal_8 := Fld_27 = Sym_11; 
if Is_Equal_8 then
   If_Result_15 := True;
else
--# expr-start 12329 '<Symbol No_Return at nodes.lkt:21386:19>' Sym_12 ada/nodes.lkt:21386
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_No_Return); 
--# expr-done 12329
Is_Equal_7 := Fld_27 = Sym_12; 
if Is_Equal_7 then
   If_Result_14 := True;
else
--# expr-start 12330 '<Symbol Discard_Names at nodes.lkt:21387:19>' Sym_13 ada/nodes.lkt:21387
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Discard_Names); 
--# expr-done 12330
Is_Equal_6 := Fld_27 = Sym_13; 
if Is_Equal_6 then
   If_Result_13 := True;
else
--# expr-start 12331 '<Symbol Independent at nodes.lkt:21388:19>' Sym_14 ada/nodes.lkt:21388
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Independent); 
--# expr-done 12331
Is_Equal_5 := Fld_27 = Sym_14; 
if Is_Equal_5 then
   If_Result_12 := True;
else
--# expr-start 12332 '<Symbol Independent_Components at nodes.lkt:21389:19>' Sym_15 ada/nodes.lkt:21389
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Independent_Components); 
--# expr-done 12332
Is_Equal_4 := Fld_27 = Sym_15; 
if Is_Equal_4 then
   If_Result_11 := True;
else
--# expr-start 12333 '<Symbol Asynchronous at nodes.lkt:21390:19>' Sym_16 ada/nodes.lkt:21390
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asynchronous); 
--# expr-done 12333
Is_Equal_3 := Fld_27 = Sym_16; 
if Is_Equal_3 then
   If_Result_10 := True;
else
--# expr-start 12334 '<Symbol Interrupt_Handler at nodes.lkt:21391:19>' Sym_17 ada/nodes.lkt:21391
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Interrupt_Handler); 
--# expr-done 12334
Is_Equal_2 := Fld_27 = Sym_17; 
if Is_Equal_2 then
   If_Result_9 := True;
else
--# expr-start 12335 '<Symbol Attach_Handler at nodes.lkt:21392:19>' Sym_18 ada/nodes.lkt:21392
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Attach_Handler); 
--# expr-done 12335
Is_Equal_1 := Fld_27 = Sym_18; 
if Is_Equal_1 then
   If_Result_8 := True;
else
--# expr-start 12336 '<Symbol Predicate at nodes.lkt:21393:19>' Sym_19 ada/nodes.lkt:21393
Sym_19 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Predicate); 
--# expr-done 12336
Is_Equal := Fld_27 = Sym_19; 
   If_Result_8 := Is_Equal;
end if;
   If_Result_9 := If_Result_8;
end if;
   If_Result_10 := If_Result_9;
end if;
   If_Result_11 := If_Result_10;
end if;
   If_Result_12 := If_Result_11;
end if;
   If_Result_13 := If_Result_12;
end if;
   If_Result_14 := If_Result_13;
end if;
   If_Result_15 := If_Result_14;
end if;
   If_Result_16 := If_Result_15;
end if;
   If_Result_17 := If_Result_16;
end if;
   If_Result_18 := If_Result_17;
end if;
   If_Result_19 := If_Result_18;
end if;
   If_Result_20 := If_Result_19;
end if;
   If_Result_21 := If_Result_20;
end if;
   If_Result_22 := If_Result_21;
end if;
   If_Result_23 := If_Result_22;
end if;
if If_Result_23 then
--# expr-start 12339 '<Cast to Name at nodes.lkt:21394:14>' Cast_Result_2 ada/nodes.lkt:21394
--# expr-start 12337 '<FieldAccess for args at nodes.lkt:21394:14>' Fld_8 ada/nodes.lkt:21394
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12337
Fld_9 := Fld_8.Node;
Get_Result_1 := Get (Self, Fld_9, 0, True); 
Is_Null_2 := Get_Result_1 = null; 
if Is_Null_2 then
   If_Result_2 := No_Entity_Base_Assoc;
else
Fld_10 := Fld_8.Info;
As_Entity_2 := (Info => Fld_10, Node => Get_Result_1); 
   If_Result_2 := As_Entity_2;
end if;
Var_Expr_278 := If_Result_2;
if Var_Expr_278 /= No_Entity_Base_Assoc then
   --# scope-start
--# expr-start 12338 '<FieldAccess for assoc_expr at nodes.lkt:21394:14>' Fld_11 ada/nodes.lkt:21394
      if Var_Expr_278.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_11 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Var_Expr_278.Node, E_Info => Var_Expr_278.Info);
--# end
--# expr-done 12338
Scope_Result := Fld_11;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Expr;
end if;
   if Result_Var.Node = null
      or else Result_Var.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Result_Var.Node,
         Info => Result_Var.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 12339
Var_Expr_4 := Cast_Result_2;
if Var_Expr_4 /= No_Entity_Name then
   --# scope-start
   --# bind v1 Var_Expr_4
--# expr-start 12340 '<ArrayLiteral at nodes.lkt:21394:62>' Array_Lit_1 ada/nodes.lkt:21394
Array_Lit_1 := Create_Internal_Entity_Name_Array (Internal_Internal_Entity_Name_Array'(1 => Var_Expr_4)); 
--# expr-done 12340
Scope_Result_1 := Array_Lit_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3514;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := No_Internal_Entity_Name_Array_Type;
end if;
      Inc_Ref (Result_Var_1);
   If_Result_24 := Result_Var_1;
else
   --# expr-start 12365 '<If at nodes.lkt:21368:9>' If_Result_7 ada/nodes.lkt:21368
--# expr-start 12343 '<FieldAccess for name_is at nodes.lkt:21395:14>' Fld_25 ada/nodes.lkt:21395
--# expr-start 12341 '<FieldAccess for id at nodes.lkt:21395:14>' Fld_24 ada/nodes.lkt:21395
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_24 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12341
      if Fld_24.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12342 '<Symbol Obsolescent at nodes.lkt:21395:30>' Sym_2 ada/nodes.lkt:21395
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Obsolescent); 
--# expr-done 12342
--# property-call-start Name.name_is
Fld_25 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_24.Node, Sym => Sym_2);
--# end
--# expr-done 12343
if Fld_25 then
--# expr-start 12346 '<Cast to Name at nodes.lkt:21397:13>' Cast_Result_3 ada/nodes.lkt:21397
--# expr-start 12344 '<FieldAccess for args at nodes.lkt:21397:13>' Fld_12 ada/nodes.lkt:21397
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12344
Fld_13 := Fld_12.Node;
Get_Result_2 := Get (Self, Fld_13, 0, True); 
Is_Null_3 := Get_Result_2 = null; 
if Is_Null_3 then
   If_Result_3 := No_Entity_Base_Assoc;
else
Fld_14 := Fld_12.Info;
As_Entity_3 := (Info => Fld_14, Node => Get_Result_2); 
   If_Result_3 := As_Entity_3;
end if;
Var_Expr_279 := If_Result_3;
if Var_Expr_279 /= No_Entity_Base_Assoc then
   --# scope-start
--# expr-start 12345 '<FieldAccess for assoc_expr at nodes.lkt:21397:13>' Fld_15 ada/nodes.lkt:21397
      if Var_Expr_279.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseAssoc.assoc_expr'
Fld_15 := Libadalang.Implementation.Dispatcher_Base_Assoc_P_Assoc_Expr (Node => Var_Expr_279.Node, E_Info => Var_Expr_279.Info);
--# end
--# expr-done 12345
Scope_Result_2 := Fld_15;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := No_Entity_Expr;
end if;
   if Result_Var_2.Node = null
      or else Result_Var_2.Node.Kind in Ada_Name
   then
      Cast_Result_3 := Create_Internal_Entity_Name
        (Node => Result_Var_2.Node,
         Info => Result_Var_2.Info);
   else
         Cast_Result_3 := No_Entity_Name;
   end if;
--# expr-done 12346
Var_Expr_3 := Cast_Result_3;
if Var_Expr_3 /= No_Entity_Name then
   --# scope-start
   --# bind name Var_Expr_3
--# expr-start 12350 '<If at nodes.lkt:21402:17>' If_Result_4 ada/nodes.lkt:21402
--# expr-start 12348 '<Not at nodes.lkt:21402:20>' Not_Val ada/nodes.lkt:21402
--# expr-start 12347 '<IsA StringLiteral at nodes.lkt:21402:24>' Is_A ada/nodes.lkt:21402
Is_A := Var_Expr_3.Node /= null 
and then Var_Expr_3.Node.Kind in Ada_String_Literal_Range; 
--# expr-done 12347
Not_Val := not (Is_A); 
--# expr-done 12348
if Not_Val then
   --# expr-start 12349 '<ArrayLiteral at nodes.lkt:21402:51>' Array_Lit_2 ada/nodes.lkt:21402
Array_Lit_2 := Create_Internal_Entity_Name_Array (Internal_Internal_Entity_Name_Array'(1 => Var_Expr_3)); 
--# expr-done 12349
   If_Result_4 := Array_Lit_2;
else
   If_Result_4 := No_Internal_Entity_Name_Array_Type;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 12350
Scope_Result_3 := If_Result_4;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3516;
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := No_Internal_Entity_Name_Array_Type;
end if;
      Inc_Ref (Result_Var_3);
   If_Result_7 := Result_Var_3;
else
   --# expr-start 12364 '<If at nodes.lkt:21368:9>' If_Result_6 ada/nodes.lkt:21368
--# expr-start 12353 '<FieldAccess for name_is at nodes.lkt:21405:14>' Fld_23 ada/nodes.lkt:21405
--# expr-start 12351 '<FieldAccess for id at nodes.lkt:21405:14>' Fld_22 ada/nodes.lkt:21405
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12351
      if Fld_22.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12352 '<Symbol Annotate at nodes.lkt:21405:30>' Sym_1 ada/nodes.lkt:21405
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Annotate); 
--# expr-done 12352
--# property-call-start Name.name_is
Fld_23 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_22.Node, Sym => Sym_1);
--# end
--# expr-done 12353
if Fld_23 then
--# expr-start 12359 '<Find at nodes.lkt:21409:13>' Find_Result ada/nodes.lkt:21409
   --# expr-start 12354 '<FieldAccess for args at nodes.lkt:21409:13>' Fld_16 ada/nodes.lkt:21409
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Create_Internal_Entity_Base_Assoc_List (Node => Ent.Node.Pragma_Node_F_Args, Info => Ent.Info);
--# expr-done 12354
Fld_17 := Fld_16.Node;
      Find_Result := No_Entity_Base_Assoc;
      if Fld_17 = null then
      Find_Result := No_Entity_Base_Assoc;
      else
      declare
         Collection : constant Bare_Base_Assoc_List := Fld_17;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_4 := Bare_Item_0 = null; 
if Is_Null_4 then
   If_Result_5 := No_Entity_Base_Assoc;
else
Fld_18 := Fld_16.Info;
As_Entity_4 := (Info => Fld_18, Node => Bare_Item_0); 
   If_Result_5 := As_Entity_4;
end if;
                  Item_0 := If_Result_5; 
   --# scope-start
               --# bind a Item_0
--# expr-start 12355 '<Cast to PragmaArgumentAssoc at nodes.lkt:21410:24>' Cast_Result_4 ada/nodes.lkt:21410
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Pragma_Argument_Assoc_Range
   then
      Cast_Result_4 := Create_Internal_Entity_Pragma_Argument_Assoc
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_4 := No_Entity_Pragma_Argument_Assoc;
   end if;
--# expr-done 12355
Var_Expr_280 := Cast_Result_4;
if Var_Expr_280 /= No_Entity_Pragma_Argument_Assoc then
   --# scope-start
--# expr-start 12356 '<FieldAccess for name at nodes.lkt:21410:24>' Fld_19 ada/nodes.lkt:21410
      if Var_Expr_280.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Name (Node => Var_Expr_280.Node.Pragma_Argument_Assoc_F_Name, Info => Var_Expr_280.Info);
--# expr-done 12356
Var_Expr_281 := Fld_19;
if Var_Expr_281 /= No_Entity_Name then
   --# scope-start
--# expr-start 12358 '<FieldAccess for name_is at nodes.lkt:21410:24>' Fld_20 ada/nodes.lkt:21410
      if Var_Expr_281.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12357 '<Symbol Entity at nodes.lkt:21410:65>' Sym ada/nodes.lkt:21410
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Entity); 
--# expr-done 12357
--# property-call-start Name.name_is
Fld_20 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_281.Node, Sym => Sym);
--# end
--# expr-done 12358
Scope_Result_4 := Fld_20;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := False;
end if;
Scope_Result_5 := Result_Var_4;
   --# end
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := False;
end if;
      if Result_Var_5 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var_5;
         end loop;
      end;
      end if;
--# expr-done 12359
Var_Expr_1 := Find_Result;
if Var_Expr_1 /= No_Entity_Base_Assoc then
   --# scope-start
   --# bind a Var_Expr_1
--# expr-start 12362 '<Cast to Name at nodes.lkt:21413:24>' Cast_Result_6 ada/nodes.lkt:21413
--# expr-start 12361 '<FieldAccess for expr at nodes.lkt:21413:24>' Fld_21 ada/nodes.lkt:21413
--# expr-start 12360 '<Cast to PragmaArgumentAssoc at nodes.lkt:21413:24>' Cast_Result_5 ada/nodes.lkt:21413
Cast_Expr_1 := Var_Expr_1; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Pragma_Argument_Assoc_Range
   then
      Cast_Result_5 := Create_Internal_Entity_Pragma_Argument_Assoc
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_5 := No_Entity_Pragma_Argument_Assoc;
   end if;
--# expr-done 12360
      if Cast_Result_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_21 := Create_Internal_Entity_Expr (Node => Cast_Result_5.Node.Pragma_Argument_Assoc_F_Expr, Info => Cast_Result_5.Info);
--# expr-done 12361
   if Fld_21.Node = null
      or else Fld_21.Node.Kind in Ada_Name
   then
      Cast_Result_6 := Create_Internal_Entity_Name
        (Node => Fld_21.Node,
         Info => Fld_21.Info);
   else
         Cast_Result_6 := No_Entity_Name;
   end if;
--# expr-done 12362
Var_Expr_2 := Cast_Result_6;
if Var_Expr_2 /= No_Entity_Name then
   --# scope-start
   --# bind v2 Var_Expr_2
--# expr-start 12363 '<ArrayLiteral at nodes.lkt:21413:75>' Array_Lit_3 ada/nodes.lkt:21413
Array_Lit_3 := Create_Internal_Entity_Name_Array (Internal_Internal_Entity_Name_Array'(1 => Var_Expr_2)); 
--# expr-done 12363
Scope_Result_6 := Array_Lit_3;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_3521;
   Result_Var_6 := Scope_Result_6;
else
   Result_Var_6 := No_Internal_Entity_Name_Array_Type;
end if;
      Inc_Ref (Result_Var_6);
Scope_Result_7 := Result_Var_6;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3520;
   Result_Var_7 := Scope_Result_7;
else
   Result_Var_7 := No_Internal_Entity_Name_Array_Type;
end if;
      Inc_Ref (Result_Var_7);
   If_Result_6 := Result_Var_7;
else
   If_Result_6 := No_Internal_Entity_Name_Array_Type;
end if;
      Inc_Ref (If_Result_6);
--# expr-done 12364
   If_Result_7 := If_Result_6;
end if;
      Inc_Ref (If_Result_7);
--# expr-done 12365
   If_Result_24 := If_Result_7;
end if;
      Inc_Ref (If_Result_24);
--# expr-done 12366
   If_Result_25 := If_Result_24;
end if;
      Inc_Ref (If_Result_25);
--# expr-done 12367
   If_Result_29 := If_Result_25;
end if;
      Inc_Ref (If_Result_29);
--# expr-done 12368
         Property_Result := If_Result_29;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1370;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1370;
                     Finalizer_Scope_3514;
                     Finalizer_Scope_3516;
                     Finalizer_Scope_3520;
                     Finalizer_Scope_3521;
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_Associated_Entity_Names;
--# end
--# property-start Pragma.associated_entities_helper ada/nodes.lkt:21418
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_Associated_Entities_Helper
  (Node : Bare_Pragma_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
     Ent : Internal_Entity_Pragma_Node :=
       Internal_Entity_Pragma_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1371 with Inline_Always;
            procedure Finalizer_Scope_3522 with Inline_Always;
            procedure Finalizer_Scope_3523 with Inline_Always;
            procedure Finalizer_Scope_3524 with Inline_Always;
      Var_Expr_1 : Internal_Entity;
Fld : Internal_Entity_Name_Array_Access;
Fld_1 : Internal_Entity;
Fld_2 : Lexical_Env := Empty_Env;
Fld_3 : Symbol_Type;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Basic_Decl;
Fld_5 : Internal_Entity_Defining_Name_Array_Access;
Fld_6 : Symbol_Type;
Fld_7 : Boolean;
Find_Result : Internal_Entity_Defining_Name;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
Scope_Result : Internal_Entity_Defining_Name_Array_Access;
Result_Var : Internal_Entity_Defining_Name_Array_Access;
Fld_8 : Internal_Unit;
Fld_9 : Internal_Unit;
Is_Equal : Boolean;
Fld_10 : Bare_Defining_Name;
Node_Comp : Boolean;
If_Result : Boolean;
Map_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Map_Result_2 : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1371 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Map_Result_2);
            end Finalizer_Scope_1371;
            procedure Finalizer_Scope_3522 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Map_Result_1);
            end Finalizer_Scope_3522;
            procedure Finalizer_Scope_3523 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3523;
            procedure Finalizer_Scope_3524 is
            begin
                     Dec_Ref (Fld_5);
            end Finalizer_Scope_3524;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12388 '<Mapcat at nodes.lkt:21419:9>' Map_Result_2 ada/nodes.lkt:21419
   --# expr-start 12369 '<FieldAccess for associated_entity_names at nodes.lkt:21419:9>' Fld ada/nodes.lkt:21419
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.associated_entity_names
Fld := Libadalang.Implementation.Pragma_Node_P_Associated_Entity_Names (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12369
      declare
         Map_Result_2_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Name_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind name Item_0
      --# expr-start 12387 '<Map at nodes.lkt:21421:13>' Map_Result_1 ada/nodes.lkt:21421
--# expr-start 12370 '<FieldAccess for semantic_parent at nodes.lkt:21421:13>' Fld_1 ada/nodes.lkt:21421
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_1 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12370
Var_Expr_1 := Fld_1;
if Var_Expr_1 /= No_Entity then
   --# scope-start
   --# bind parent Var_Expr_1
--# expr-start 12380 '<Map at nodes.lkt:21423:17>' Map_Result ada/nodes.lkt:21423
   --# expr-start 12373 '<EnvGet at nodes.lkt:21423:17>' Env_Get_Result ada/nodes.lkt:21423
--# expr-start 12371 '<FieldAccess for children_env at nodes.lkt:21423:17>' Fld_2 ada/nodes.lkt:21423
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Var_Expr_1.Node, E_Info => Var_Expr_1.Info);
--# expr-done 12371
--# expr-start 12372 '<FieldAccess for name_symbol at nodes.lkt:21424:21>' Fld_3 ada/nodes.lkt:21424
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Item_0.Node);
--# end
--# expr-done 12372
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld_2, Key => Thin (Fld_3), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => False, Nocat => True))); 
--# expr-done 12373
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind decl Item_2
      --# expr-start 12379 '<Find at nodes.lkt:21433:21>' Find_Result ada/nodes.lkt:21433
   --# expr-start 12376 '<FieldAccess for defining_names at nodes.lkt:21433:21>' Fld_5 ada/nodes.lkt:21433
--# expr-start 12375 '<FieldAccess for wrap_public_reference at nodes.lkt:21433:21>' Fld_4 ada/nodes.lkt:21433
--# expr-start 12374 '<Cast to BasicDecl at nodes.lkt:21433:21>' Cast_Result ada/nodes.lkt:21433
Cast_Expr := Item_2; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 12374
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.wrap_public_reference
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Wrap_Public_Reference (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 12375
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_5 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 12376
      Find_Result := No_Entity_Defining_Name;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_5;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind dn Item_3
      --# expr-start 12378 '<FieldAccess for name_is at nodes.lkt:21443:25>' Fld_7 ada/nodes.lkt:21443
      if Item_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12377 '<FieldAccess for name_symbol at nodes.lkt:21443:36>' Fld_6 ada/nodes.lkt:21443
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_6 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Item_0.Node);
--# end
--# expr-done 12377
--# property-call-start Name.name_is
Fld_7 := Libadalang.Implementation.Name_P_Name_Is (Node => Item_3.Node, Sym => Fld_6);
--# end
--# expr-done 12378
      if Fld_7 then
         Find_Result := Item_3; 
      end if;
   --# end
               exit when Fld_7;
         end loop;
      end;
--# expr-done 12379
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Find_Result;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3524;
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 12380
Scope_Result := Map_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3523;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var);
      declare
         Map_Result_1_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Result_Var;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind ent Item_4
         --# expr-start 12386 '<BooleanBinaryOp And at nodes.lkt:21451:17>' If_Result ada/nodes.lkt:21451
--# expr-start 12383 '<Eq at nodes.lkt:21451:17>' Is_Equal ada/nodes.lkt:21451
--# expr-start 12381 '<FieldAccess for unit at nodes.lkt:21451:17>' Fld_8 ada/nodes.lkt:21451
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Unit (Node => Item_4.Node);
--# expr-done 12381
--# expr-start 12382 '<FieldAccess for unit at nodes.lkt:21451:29>' Fld_9 ada/nodes.lkt:21451
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Unit (Node => Self);
--# expr-done 12382
Is_Equal := Fld_8 = Fld_9; 
--# expr-done 12383
if Is_Equal then
   --# expr-start 12385 '<OrderingTest '"'"'lt'"'"' at nodes.lkt:21451:43>' Node_Comp ada/nodes.lkt:21451
--# expr-start 12384 '<FieldAccess for node at nodes.lkt:21451:43>' Fld_10 ada/nodes.lkt:21451
Fld_10 := Item_4.Node;
--# expr-done 12384
Node_Comp := Compare (Self, Fld_10, Self, Less_Than); 
--# expr-done 12385
   If_Result := Node_Comp;
else
   If_Result := False;
end if;
--# expr-done 12386
         if If_Result then
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_4;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 12387
         for Item_To_Append of
               Map_Result_1.Items
         loop
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_2_Vec, Item_To_Append);
         end loop;
   --# end
      Finalizer_Scope_3522;
         end loop;
      end;
         Map_Result_2 := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_2_Vec)));
         for I in Map_Result_2.Items'Range loop
            Map_Result_2.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_2_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result_2.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_2_Vec);
      end;
--# expr-done 12388
         Property_Result := Map_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1371;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1371;
                     Finalizer_Scope_3522;
                     Finalizer_Scope_3523;
                     Finalizer_Scope_3524;
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_Associated_Entities_Helper;
--# end
--# property-start Pragma.associated_entities ada/nodes.lkt:21458
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_Associated_Entities
  (Node : Bare_Pragma_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Defining_Name_Array_Access
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
     Ent : Internal_Entity_Pragma_Node :=
       Internal_Entity_Pragma_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1372 with Inline_Always;
            procedure Finalizer_Scope_3527 with Inline_Always;
            procedure Finalizer_Scope_3529 with Inline_Always;
            procedure Finalizer_Scope_3530 with Inline_Always;
            procedure Finalizer_Scope_3531 with Inline_Always;
            procedure Finalizer_Scope_3532 with Inline_Always;
            procedure Finalizer_Scope_3534 with Inline_Always;
            procedure Finalizer_Scope_3535 with Inline_Always;
            procedure Finalizer_Scope_3536 with Inline_Always;
      Local_Top_Level_Decl : Internal_Entity_Defining_Name_Array_Access;
Var_Expr_0 : Bare_Compilation_Unit;
Local_Enclosing_Program_Unit : Internal_Entity_Basic_Decl;
Var_Expr_2 : Internal_Entity_Name_Array_Access;
Local_P : Internal_Entity_Defining_Name_Array_Access;
Var_Expr_3 : Internal_Entity_Basic_Decl;
Var_Expr_4 : Bare_Ada_Node_List;
Var_Expr_6 : Bare_Ada_Node_Array_Access;
Var_Expr_7 : Internal_Entity_Basic_Decl;
Var_Expr : Internal_Entity_Basic_Decl_Array_Access;
Var_Expr_1 : Internal_Entity_Defining_Name_Array_Access;
Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Cast_Result : Bare_Compilation_Unit;
Fld_2 : Bare_Ada_Node;
Cast_Result_1 : Bare_Library_Item;
Fld_3 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Defining_Name;
Array_Lit : Internal_Entity_Defining_Name_Array_Access;
Scope_Result : Internal_Entity_Defining_Name_Array_Access;
Result_Var : Internal_Entity_Defining_Name_Array_Access;
Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result_2 : Bare_Basic_Decl;
As_Entity_1 : Internal_Entity_Basic_Decl;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Basic_Decl;
Fld_5 : Internal_Entity_Name_Array_Access;
Fld_6 : Internal_Entity_Defining_Name_Array_Access;
Scope_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Result_Var_1 : Internal_Entity_Defining_Name_Array_Access;
Fld_7 : Internal_Entity_Defining_Name;
Array_Lit_1 : Internal_Entity_Defining_Name_Array_Access;
Len : Integer;
Is_Equal : Boolean;
Get_Result : Internal_Entity_Name;
Fld_8 : Internal_Entity_Basic_Decl;
Cast_Result_3 : Internal_Entity;
Cast_Expr : Internal_Entity_Basic_Decl;
Cast_Result_4 : Internal_Entity;
Is_Equiv : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Internal_Entity_Defining_Name_Array_Access;
Scope_Result_2 : Internal_Entity_Defining_Name_Array_Access;
Result_Var_2 : Internal_Entity_Defining_Name_Array_Access;
Is_Equal_1 : Boolean;
Not_Val : Boolean;
If_Result_4 : Internal_Entity_Defining_Name_Array_Access;
Let_Result : Internal_Entity_Defining_Name_Array_Access;
Scope_Result_3 : Internal_Entity_Defining_Name_Array_Access;
Fld_9 : Bare_Ada_Node;
Cast_Result_5 : Bare_Ada_Node_List;
Item_5 : Bare_Ada_Node;
Is_A_1 : Boolean;
Node_Comp : Boolean;
If_Result_5 : Boolean;
Map_Result : Bare_Ada_Node_Array_Access;
Len_1 : Integer;
Arith_Result : Integer;
Get_Result_1 : Bare_Ada_Node;
Scope_Result_4 : Bare_Ada_Node;
Result_Var_3 : Bare_Ada_Node;
Cast_Result_6 : Bare_Basic_Decl;
As_Entity_2 : Internal_Entity_Basic_Decl;
Is_Null_2 : Boolean;
If_Result_6 : Internal_Entity_Basic_Decl;
Array_Lit_2 : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result_5 : Internal_Entity_Basic_Decl_Array_Access;
Result_Var_4 : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result_6 : Internal_Entity_Basic_Decl_Array_Access;
Result_Var_5 : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result_7 : Internal_Entity_Basic_Decl_Array_Access;
Array_Lit_3 : Internal_Entity_Basic_Decl_Array_Access;
Result_Var_6 : Internal_Entity_Basic_Decl_Array_Access;
Array_Lit_4 : Internal_Entity_Basic_Decl_Array_Access;
Fld_10 : Internal_Entity_Identifier;
Fld_11 : Symbol_Type;
Fld_12 : Boolean;
Fld_13 : Internal_Entity_Identifier;
Sym : Symbol_Type;
Fld_14 : Boolean;
If_Result_7 : Boolean;
If_Result_8 : Internal_Entity_Basic_Decl_Array_Access;
Fld_15 : Internal_Entity_Defining_Name;
Map_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Result_Var_7 : Internal_Entity_Defining_Name_Array_Access;
Let_Result_1 : Internal_Entity_Defining_Name_Array_Access;
Let_Result_2 : Internal_Entity_Defining_Name_Array_Access;
            procedure Finalizer_Scope_1372 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Local_Top_Level_Decl);
                     Dec_Ref (Node_Parents);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Result_Var_5);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Array_Lit_3);
                     Dec_Ref (Result_Var_6);
                     Dec_Ref (Array_Lit_4);
                     Dec_Ref (If_Result_8);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Result_Var_7);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1372;
            procedure Finalizer_Scope_3527 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_3527;
            procedure Finalizer_Scope_3529 is
            begin
                     Dec_Ref (Var_Expr_2);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (Local_P);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_3529;
            procedure Finalizer_Scope_3530 is
            begin
                     Dec_Ref (Var_Expr_1);
            end Finalizer_Scope_3530;
            procedure Finalizer_Scope_3531 is
            begin
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (If_Result_3);
            end Finalizer_Scope_3531;
            procedure Finalizer_Scope_3532 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Scope_Result_5);
                     Dec_Ref (Result_Var_4);
            end Finalizer_Scope_3532;
            procedure Finalizer_Scope_3534 is
            begin
                     Dec_Ref (Var_Expr_6);
            end Finalizer_Scope_3534;
            procedure Finalizer_Scope_3535 is
            begin
                     Dec_Ref (Array_Lit_2);
            end Finalizer_Scope_3535;
            procedure Finalizer_Scope_3536 is
            begin
                     Dec_Ref (Var_Expr);
            end Finalizer_Scope_3536;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 12443 '<Let at nodes.lkt:21459:9>' Let_Result_2 ada/nodes.lkt:21459
--# scope-start
--# expr-start 12391 '<Cast to CompilationUnit at nodes.lkt:21460:13>' Cast_Result ada/nodes.lkt:21460
--# expr-start 12390 '<parent at nodes.lkt:21460:13>' Fld_1 ada/nodes.lkt:21460
--# expr-start 12389 '<parent at nodes.lkt:21460:13>' Fld ada/nodes.lkt:21460
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 12389
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 12390
   if Fld_1 = null
      or else Fld_1.Kind in Ada_Compilation_Unit_Range
   then
      Cast_Result := Fld_1;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 12391
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind cu Var_Expr_0
--# expr-start 12397 '<ArrayLiteral at nodes.lkt:21462:17>' Array_Lit ada/nodes.lkt:21462
--# expr-start 12396 '<FieldAccess for defining_name at nodes.lkt:21462:18>' Fld_4 ada/nodes.lkt:21462
--# expr-start 12395 '<as_entity at nodes.lkt:21462:18>' If_Result ada/nodes.lkt:21462
--# expr-start 12394 '<FieldAccess for item at nodes.lkt:21462:18>' Fld_3 ada/nodes.lkt:21462
--# expr-start 12393 '<Cast to LibraryItem at nodes.lkt:21462:18>' Cast_Result_1 ada/nodes.lkt:21462
--# expr-start 12392 '<FieldAccess for body at nodes.lkt:21462:18>' Fld_2 ada/nodes.lkt:21462
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Var_Expr_0.Compilation_Unit_F_Body;
--# expr-done 12392
   if Fld_2 = null
      or else Fld_2.Kind in Ada_Library_Item_Range
   then
      Cast_Result_1 := Fld_2;
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 12393
      if Cast_Result_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Cast_Result_1.Library_Item_F_Item;
--# expr-done 12394
Is_Null := Fld_3 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => E_Info, Node => Fld_3); 
   If_Result := As_Entity;
end if;
--# expr-done 12395
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 12396
Array_Lit := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld_4)); 
--# expr-done 12397
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3527;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (Result_Var);
Local_Top_Level_Decl := Result_Var; Inc_Ref (Local_Top_Level_Decl);
--# bind top_level_decl Local_Top_Level_Decl
--# expr-start 12442 '<Let at nodes.lkt:21465:9>' Let_Result_1 ada/nodes.lkt:21465
--# scope-start
--# expr-start 12402 '<as_entity at nodes.lkt:21466:13>' If_Result_1 ada/nodes.lkt:21466
--# expr-start 12401 '<Cast to BasicDecl at nodes.lkt:21466:13>' Cast_Result_2 ada/nodes.lkt:21466
--# expr-start 12400 '<Find at nodes.lkt:21466:13>' Find_Result ada/nodes.lkt:21466
   --# expr-start 12398 '<FieldAccess for parents at nodes.lkt:21466:13>' Node_Parents ada/nodes.lkt:21466
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, False); 
--# expr-done 12398
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_1
      --# expr-start 12399 '<IsA BasicDecl at nodes.lkt:21466:55>' Is_A ada/nodes.lkt:21466
Is_A := Item_1 /= null 
and then Item_1.Kind in Ada_Basic_Decl; 
--# expr-done 12399
      if Is_A then
         Find_Result := Item_1; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 12400
   if Find_Result = null
      or else Find_Result.Kind in Ada_Basic_Decl
   then
      Cast_Result_2 := Find_Result;
   else
         Cast_Result_2 := No_Bare_Ada_Node;
   end if;
--# expr-done 12401
Is_Null_1 := Cast_Result_2 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Basic_Decl;
else
As_Entity_1 := (Info => E_Info, Node => Cast_Result_2); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 12402
Local_Enclosing_Program_Unit := If_Result_1; 
--# bind enclosing_program_unit Local_Enclosing_Program_Unit
--# expr-start 12403 '<FieldAccess for associated_entity_names at nodes.lkt:21480:9>' Fld_5 ada/nodes.lkt:21480
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.associated_entity_names
Fld_5 := Libadalang.Implementation.Pragma_Node_P_Associated_Entity_Names (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12403
Var_Expr_2 := Fld_5;
      Inc_Ref (Var_Expr_2);
if Var_Expr_2 /= No_Internal_Entity_Name_Array_Type then
   --# scope-start
   --# bind names Var_Expr_2
--# expr-start 12417 '<Let at nodes.lkt:21482:17>' Let_Result ada/nodes.lkt:21482
--# scope-start
--# expr-start 12404 '<FieldAccess for associated_entities_helper at nodes.lkt:21482:25>' Fld_6 ada/nodes.lkt:21482
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.associated_entities_helper
Fld_6 := Libadalang.Implementation.Pragma_Node_P_Associated_Entities_Helper (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12404
Var_Expr_1 := Fld_6;
      Inc_Ref (Var_Expr_1);
if Var_Expr_1 /= No_Internal_Entity_Defining_Name_Array_Type then
   --# scope-start
   --# bind e Var_Expr_1
Scope_Result_1 := Var_Expr_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3530;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Local_Top_Level_Decl;
end if;
      Inc_Ref (Result_Var_1);
Local_P := Result_Var_1; Inc_Ref (Local_P);
--# bind p Local_P
--# expr-start 12416 '<If at nodes.lkt:21484:17>' If_Result_4 ada/nodes.lkt:21484
--# expr-start 12406 '<Not at nodes.lkt:21484:20>' Not_Val ada/nodes.lkt:21484
--# expr-start 12405 '<Eq at nodes.lkt:21484:20>' Is_Equal_1 ada/nodes.lkt:21484
Is_Equal_1 := Equivalent (Local_P, No_Internal_Entity_Defining_Name_Array_Type); 
--# expr-done 12405
Not_Val := not (Is_Equal_1); 
--# expr-done 12406
if Not_Val then
   If_Result_4 := Local_P;
else
Var_Expr_3 := Local_Enclosing_Program_Unit;
if Var_Expr_3 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind epu Var_Expr_3
--# expr-start 12415 '<If at nodes.lkt:21488:25>' If_Result_3 ada/nodes.lkt:21488
--# expr-start 12412 '<BooleanBinaryOp And at nodes.lkt:21489:29>' If_Result_2 ada/nodes.lkt:21489
--# expr-start 12408 '<Eq at nodes.lkt:21489:29>' Is_Equal ada/nodes.lkt:21489
--# expr-start 12407 '<length at nodes.lkt:21489:29>' Len ada/nodes.lkt:21489
Len := Length (Var_Expr_2); 
--# expr-done 12407
Is_Equal := Len = 1; 
--# expr-done 12408
if Is_Equal then
   --# expr-start 12411 '<Eq at nodes.lkt:21490:33>' Is_Equiv ada/nodes.lkt:21490
--# expr-start 12410 '<FieldAccess for referenced_decl at nodes.lkt:21490:33>' Fld_8 ada/nodes.lkt:21490
--# expr-start 12409 '<at at nodes.lkt:21490:33>' Get_Result ada/nodes.lkt:21490
Get_Result := Get (Self, Var_Expr_2, 0, True); 
--# expr-done 12409
      if Get_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.referenced_decl
Fld_8 := Libadalang.Implementation.Name_P_Referenced_Decl (Node => Get_Result.Node, Imprecise_Fallback => False, E_Info => Get_Result.Info);
--# end
--# expr-done 12410
      Cast_Result_3 := Create_Internal_Entity
        (Node => Fld_8.Node,
         Info => Fld_8.Info);
Cast_Expr := Var_Expr_3; 
      Cast_Result_4 := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
Is_Equiv := Equivalent (Cast_Result_3, Cast_Result_4); 
--# expr-done 12411
   If_Result_2 := Is_Equiv;
else
   If_Result_2 := False;
end if;
--# expr-done 12412
if If_Result_2 then
   --# expr-start 12414 '<ArrayLiteral at nodes.lkt:21491:30>' Array_Lit_1 ada/nodes.lkt:21491
--# expr-start 12413 '<FieldAccess for defining_name at nodes.lkt:21491:31>' Fld_7 ada/nodes.lkt:21491
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 12413
Array_Lit_1 := Create_Internal_Entity_Defining_Name_Array (Internal_Internal_Entity_Defining_Name_Array'(1 => Fld_7)); 
--# expr-done 12414
   If_Result_3 := Array_Lit_1;
else
   If_Result_3 := No_Internal_Entity_Defining_Name_Array_Type;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 12415
Scope_Result_2 := If_Result_3;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3531;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Local_Top_Level_Decl;
end if;
      Inc_Ref (Result_Var_2);
   If_Result_4 := Result_Var_2;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 12416
Let_Result := If_Result_4; Inc_Ref (Let_Result);
--# end
--# expr-done 12417
Scope_Result_3 := Let_Result;
   Inc_Ref (Scope_Result_3);
   --# end
      Finalizer_Scope_3529;
   Result_Var_7 := Scope_Result_3;
else
   --# expr-start 12441 '<Map at nodes.lkt:21496:25>' Map_Result_1 ada/nodes.lkt:21496
   --# expr-start 12439 '<If at nodes.lkt:21498:17>' If_Result_8 ada/nodes.lkt:21498
--# expr-start 12424 '<BooleanBinaryOp Or at nodes.lkt:21499:21>' If_Result_7 ada/nodes.lkt:21499
--# expr-start 12420 '<FieldAccess for is_contract_aspect at nodes.lkt:21501:25>' Fld_12 ada/nodes.lkt:21501
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12419 '<FieldAccess for name_symbol at nodes.lkt:21501:49>' Fld_11 ada/nodes.lkt:21501
--# expr-start 12418 '<FieldAccess for id at nodes.lkt:21501:49>' Fld_10 ada/nodes.lkt:21501
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12418
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_11 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_10.Node);
--# end
--# expr-done 12419
--# property-call-start AdaNode.is_contract_aspect
Fld_12 := Libadalang.Implementation.Ada_Node_P_Is_Contract_Aspect (Node => Self, Name => Fld_11);
--# end
--# expr-done 12420
if Fld_12 then
   If_Result_7 := True;
else
   --# expr-start 12423 '<FieldAccess for name_is at nodes.lkt:21505:25>' Fld_14 ada/nodes.lkt:21505
--# expr-start 12421 '<FieldAccess for id at nodes.lkt:21505:25>' Fld_13 ada/nodes.lkt:21505
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Identifier (Node => Ent.Node.Pragma_Node_F_Id, Info => Ent.Info);
--# expr-done 12421
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12422 '<Symbol Obsolescent at nodes.lkt:21505:41>' Sym ada/nodes.lkt:21505
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Obsolescent); 
--# expr-done 12422
--# property-call-start Name.name_is
Fld_14 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_13.Node, Sym => Sym);
--# end
--# expr-done 12423
   If_Result_7 := Fld_14;
end if;
--# expr-done 12424
if If_Result_7 then
--# expr-start 12426 '<Cast to AdaNode.list at nodes.lkt:21517:21>' Cast_Result_5 ada/nodes.lkt:21517
--# expr-start 12425 '<parent at nodes.lkt:21517:21>' Fld_9 ada/nodes.lkt:21517
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.Parent; 
--# expr-done 12425
   if Fld_9 = null
      or else Fld_9.Kind in Ada_Ada_Node_List_Range
   then
      Cast_Result_5 := Fld_9;
   else
         Cast_Result_5 := No_Bare_Ada_Node;
   end if;
--# expr-done 12426
Var_Expr_4 := Cast_Result_5;
if Var_Expr_4 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind decls Var_Expr_4
--# expr-start 12435 '<as_entity at nodes.lkt:21519:25>' If_Result_6 ada/nodes.lkt:21519
--# expr-start 12434 '<Cast to BasicDecl at nodes.lkt:21519:25>' Cast_Result_6 ada/nodes.lkt:21519
--# expr-start 12430 '<Map at nodes.lkt:21519:25>' Map_Result ada/nodes.lkt:21519
      declare
         Map_Result_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Var_Expr_4 = null then
      Map_Result := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Ada_Node_List := Var_Expr_4;
      begin
         for Untyped_Item_5 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_5 := Untyped_Item_5; 
   --# scope-start
               --# bind decl Item_5
         --# expr-start 12429 '<BooleanBinaryOp And at nodes.lkt:21520:39>' If_Result_5 ada/nodes.lkt:21520
--# expr-start 12427 '<IsA BasicDecl at nodes.lkt:21520:39>' Is_A_1 ada/nodes.lkt:21520
Is_A_1 := Item_5 /= null 
and then Item_5.Kind in Ada_Basic_Decl; 
--# expr-done 12427
if Is_A_1 then
   --# expr-start 12428 '<OrderingTest '"'"'gt'"'"' at nodes.lkt:21520:61>' Node_Comp ada/nodes.lkt:21520
Node_Comp := Compare (Self, Self, Item_5, Greater_Than); 
--# expr-done 12428
   If_Result_5 := Node_Comp;
else
   If_Result_5 := False;
end if;
--# expr-done 12429
         if If_Result_5 then
         declare
            Item_To_Append : constant Bare_Ada_Node := Item_5;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 12430
Var_Expr_6 := Map_Result;
      Inc_Ref (Var_Expr_6);
if Var_Expr_6 /= No_Bare_Ada_Node_Array_Type then
   --# scope-start
   --# bind decls Var_Expr_6
--# expr-start 12433 '<at at nodes.lkt:21522:40>' Get_Result_1 ada/nodes.lkt:21522
--# expr-start 12432 '<Arithmetic - at nodes.lkt:21522:47>' Arith_Result ada/nodes.lkt:21522
--# expr-start 12431 '<length at nodes.lkt:21522:47>' Len_1 ada/nodes.lkt:21522
Len_1 := Length (Var_Expr_6); 
--# expr-done 12431
Arith_Result := (Len_1 - 1); 
--# expr-done 12432
Get_Result_1 := Get (Self, Var_Expr_6, Arith_Result, True); 
--# expr-done 12433
Scope_Result_4 := Get_Result_1;
   --# end
      Finalizer_Scope_3534;
   Result_Var_3 := Scope_Result_4;
else
   Result_Var_3 := No_Bare_Ada_Node;
end if;
   if Result_Var_3 = null
      or else Result_Var_3.Kind in Ada_Basic_Decl
   then
      Cast_Result_6 := Result_Var_3;
   else
         Cast_Result_6 := No_Bare_Ada_Node;
   end if;
--# expr-done 12434
Is_Null_2 := Cast_Result_6 = null; 
if Is_Null_2 then
   If_Result_6 := No_Entity_Basic_Decl;
else
As_Entity_2 := (Info => E_Info, Node => Cast_Result_6); 
   If_Result_6 := As_Entity_2;
end if;
--# expr-done 12435
Var_Expr_7 := If_Result_6;
if Var_Expr_7 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind v1 Var_Expr_7
--# expr-start 12436 '<ArrayLiteral at nodes.lkt:21525:37>' Array_Lit_2 ada/nodes.lkt:21525
Array_Lit_2 := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Var_Expr_7)); 
--# expr-done 12436
Scope_Result_5 := Array_Lit_2;
   Inc_Ref (Scope_Result_5);
   --# end
      Finalizer_Scope_3535;
   Result_Var_4 := Scope_Result_5;
else
   Result_Var_4 := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_4);
Scope_Result_6 := Result_Var_4;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_3532;
   Result_Var_5 := Scope_Result_6;
else
   Result_Var_5 := No_Internal_Entity_Basic_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var_5);
Var_Expr := Result_Var_5;
      Inc_Ref (Var_Expr);
if Var_Expr /= No_Internal_Entity_Basic_Decl_Array_Type then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_7 := Var_Expr;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3536;
   Result_Var_6 := Scope_Result_7;
else
   --# expr-start 12437 '<ArrayLiteral at nodes.lkt:21527:25>' Array_Lit_3 ada/nodes.lkt:21527
Array_Lit_3 := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Local_Enclosing_Program_Unit)); 
--# expr-done 12437
   Result_Var_6 := Array_Lit_3;
end if;
      Inc_Ref (Result_Var_6);
   If_Result_8 := Result_Var_6;
else
   --# expr-start 12438 '<ArrayLiteral at nodes.lkt:21532:21>' Array_Lit_4 ada/nodes.lkt:21532
Array_Lit_4 := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Local_Enclosing_Program_Unit)); 
--# expr-done 12438
   If_Result_8 := Array_Lit_4;
end if;
      Inc_Ref (If_Result_8);
--# expr-done 12439
      declare
         Map_Result_1_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Basic_Decl_Array_Access := If_Result_8;
      begin
         for Item_8 of
               Collection.Items
         loop
   --# scope-start
               --# bind bd Item_8
      --# expr-start 12440 '<FieldAccess for defining_name at nodes.lkt:21535:26>' Fld_15 ada/nodes.lkt:21535
      if Item_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_15 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Item_8.Node, E_Info => Item_8.Info);
--# end
--# expr-done 12440
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Fld_15;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result_1 := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_1_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 12441
   Result_Var_7 := Map_Result_1;
end if;
      Inc_Ref (Result_Var_7);
Let_Result_1 := Result_Var_7; Inc_Ref (Let_Result_1);
--# end
--# expr-done 12442
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 12443
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1372;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1372;
                     Finalizer_Scope_3527;
                     Finalizer_Scope_3529;
                     Finalizer_Scope_3530;
                     Finalizer_Scope_3531;
                     Finalizer_Scope_3532;
                     Finalizer_Scope_3534;
                     Finalizer_Scope_3535;
                     Finalizer_Scope_3536;
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_Associated_Entities;
--# end
--# property-start Pragma.initial_env ada/nodes.lkt:21544
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_Initial_Env
  (Node : Bare_Pragma_Node
  )
   return Internal_Designated_Env
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1373 with Inline_Always;
            procedure Finalizer_Scope_3538 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Defining_Name;
Sym : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
As_Entity : Internal_Entity_Pragma_Node;
Is_Null : Boolean;
If_Result : Internal_Entity_Pragma_Node;
Fld : Internal_Entity_Defining_Name_Array_Access;
Get_Result : Internal_Entity_Defining_Name;
Fld_1 : Lexical_Env := Empty_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Scope_Result : Internal_Designated_Env := No_Designated_Env;
New_Struct_2 : Internal_Designated_Env := No_Designated_Env;
Result_Var : Internal_Designated_Env := No_Designated_Env;
New_Struct_3 : Internal_Designated_Env := No_Designated_Env;
As_Entity_1 : Internal_Entity_Pragma_Node;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Pragma_Node;
Fld_2 : Internal_Entity_Identifier;
Fld_3 : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Sym_6 : Symbol_Type;
Sym_7 : Symbol_Type;
Sym_8 : Symbol_Type;
Sym_9 : Symbol_Type;
Sym_10 : Symbol_Type;
Sym_11 : Symbol_Type;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result_2 : Boolean;
Is_Equal_2 : Boolean;
If_Result_3 : Boolean;
Is_Equal_3 : Boolean;
If_Result_4 : Boolean;
Is_Equal_4 : Boolean;
If_Result_5 : Boolean;
Is_Equal_5 : Boolean;
If_Result_6 : Boolean;
Is_Equal_6 : Boolean;
If_Result_7 : Boolean;
Is_Equal_7 : Boolean;
If_Result_8 : Boolean;
Is_Equal_8 : Boolean;
If_Result_9 : Boolean;
Is_Equal_9 : Boolean;
If_Result_10 : Boolean;
Is_Equal_10 : Boolean;
If_Result_11 : Boolean;
If_Result_12 : Internal_Designated_Env := No_Designated_Env;
Fld_4 : Bare_Ada_Node;
Fld_5 : Bare_Ada_Node;
Is_A : Boolean;
If_Result_13 : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1373 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (Fld);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (New_Struct_2);
                     Dec_Ref (Result_Var);
                     Dec_Ref (New_Struct_3);
                     Dec_Ref (If_Result_12);
                     Dec_Ref (If_Result_13);
            end Finalizer_Scope_1373;
            procedure Finalizer_Scope_3538 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_3538;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12471 '<If at nodes.lkt:21545:9>' If_Result_13 ada/nodes.lkt:21545
--# expr-start 12446 '<IsA CompilationUnit at nodes.lkt:21545:12>' Is_A ada/nodes.lkt:21545
--# expr-start 12445 '<parent at nodes.lkt:21545:12>' Fld_5 ada/nodes.lkt:21545
--# expr-start 12444 '<parent at nodes.lkt:21545:12>' Fld_4 ada/nodes.lkt:21545
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Parent; 
--# expr-done 12444
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Fld_4.Parent; 
--# expr-done 12445
Is_A := Fld_5 /= null 
and then Fld_5.Kind in Ada_Compilation_Unit_Range; 
--# expr-done 12446
if Is_A then
   --# expr-start 12448 '<New DesignatedEnv at nodes.lkt:21547:13>' New_Struct ada/nodes.lkt:21547
--# expr-start 12447 '<Symbol Standard at nodes.lkt:21549:26>' Sym ada/nodes.lkt:21549
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Standard); 
--# expr-done 12447
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Sym, Kind => Named_Env); 
--# expr-done 12448
   If_Result_13 := New_Struct;
else
   --# expr-start 12470 '<If at nodes.lkt:21545:9>' If_Result_12 ada/nodes.lkt:21545
--# expr-start 12451 '<FieldAccess for name_symbol at nodes.lkt:21553:13>' Fld_3 ada/nodes.lkt:21553
--# expr-start 12450 '<FieldAccess for id at nodes.lkt:21553:13>' Fld_2 ada/nodes.lkt:21553
--# expr-start 12449 '<as_bare_entity at nodes.lkt:21553:13>' If_Result_1 ada/nodes.lkt:21553
Is_Null_1 := Self = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Pragma_Node;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Self); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 12449
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Identifier (Node => If_Result_1.Node.Pragma_Node_F_Id, Info => If_Result_1.Info);
--# expr-done 12450
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_2.Node);
--# end
--# expr-done 12451
--# expr-start 12452 '<Symbol Pre at nodes.lkt:21553:53>' Sym_1 ada/nodes.lkt:21553
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre); 
--# expr-done 12452
Is_Equal_10 := Fld_3 = Sym_1; 
if Is_Equal_10 then
   If_Result_11 := True;
else
--# expr-start 12453 '<Symbol Post at nodes.lkt:21554:19>' Sym_2 ada/nodes.lkt:21554
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post); 
--# expr-done 12453
Is_Equal_9 := Fld_3 = Sym_2; 
if Is_Equal_9 then
   If_Result_10 := True;
else
--# expr-start 12454 '<Symbol Pre'"'"'Class at nodes.lkt:21555:19>' Sym_3 ada/nodes.lkt:21555
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pre_Class); 
--# expr-done 12454
Is_Equal_8 := Fld_3 = Sym_3; 
if Is_Equal_8 then
   If_Result_9 := True;
else
--# expr-start 12455 '<Symbol Post'"'"'Class at nodes.lkt:21556:19>' Sym_4 ada/nodes.lkt:21556
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Post_Class); 
--# expr-done 12455
Is_Equal_7 := Fld_3 = Sym_4; 
if Is_Equal_7 then
   If_Result_8 := True;
else
--# expr-start 12456 '<Symbol Precondition at nodes.lkt:21557:19>' Sym_5 ada/nodes.lkt:21557
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Precondition); 
--# expr-done 12456
Is_Equal_6 := Fld_3 = Sym_5; 
if Is_Equal_6 then
   If_Result_7 := True;
else
--# expr-start 12457 '<Symbol Postcondition at nodes.lkt:21558:19>' Sym_6 ada/nodes.lkt:21558
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Postcondition); 
--# expr-done 12457
Is_Equal_5 := Fld_3 = Sym_6; 
if Is_Equal_5 then
   If_Result_6 := True;
else
--# expr-start 12458 '<Symbol Precondition'"'"'Class at nodes.lkt:21559:19>' Sym_7 ada/nodes.lkt:21559
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Precondition_Class); 
--# expr-done 12458
Is_Equal_4 := Fld_3 = Sym_7; 
if Is_Equal_4 then
   If_Result_5 := True;
else
--# expr-start 12459 '<Symbol Postcondition'"'"'Class at nodes.lkt:21560:19>' Sym_8 ada/nodes.lkt:21560
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Postcondition_Class); 
--# expr-done 12459
Is_Equal_3 := Fld_3 = Sym_8; 
if Is_Equal_3 then
   If_Result_4 := True;
else
--# expr-start 12460 '<Symbol Test_Case at nodes.lkt:21561:19>' Sym_9 ada/nodes.lkt:21561
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Test_Case); 
--# expr-done 12460
Is_Equal_2 := Fld_3 = Sym_9; 
if Is_Equal_2 then
   If_Result_3 := True;
else
--# expr-start 12461 '<Symbol Contract_Cases at nodes.lkt:21562:19>' Sym_10 ada/nodes.lkt:21562
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Contract_Cases); 
--# expr-done 12461
Is_Equal_1 := Fld_3 = Sym_10; 
if Is_Equal_1 then
   If_Result_2 := True;
else
--# expr-start 12462 '<Symbol Predicate at nodes.lkt:21563:19>' Sym_11 ada/nodes.lkt:21563
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Predicate); 
--# expr-done 12462
Is_Equal := Fld_3 = Sym_11; 
   If_Result_2 := Is_Equal;
end if;
   If_Result_3 := If_Result_2;
end if;
   If_Result_4 := If_Result_3;
end if;
   If_Result_5 := If_Result_4;
end if;
   If_Result_6 := If_Result_5;
end if;
   If_Result_7 := If_Result_6;
end if;
   If_Result_8 := If_Result_7;
end if;
   If_Result_9 := If_Result_8;
end if;
   If_Result_10 := If_Result_9;
end if;
   If_Result_11 := If_Result_10;
end if;
if If_Result_11 then
--# expr-start 12465 '<at at nodes.lkt:21565:13>' Get_Result ada/nodes.lkt:21565
--# expr-start 12464 '<FieldAccess for associated_entities at nodes.lkt:21565:13>' Fld ada/nodes.lkt:21565
--# expr-start 12463 '<as_bare_entity at nodes.lkt:21565:13>' If_Result ada/nodes.lkt:21565
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Pragma_Node;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 12463
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.associated_entities
Fld := Libadalang.Implementation.Pragma_Node_P_Associated_Entities (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 12464
Get_Result := Get (Self, Fld, 0, True); 
--# expr-done 12465
Var_Expr_0 := Get_Result;
if Var_Expr_0 /= No_Entity_Defining_Name then
   --# scope-start
   --# bind ent Var_Expr_0
--# expr-start 12467 '<New DesignatedEnv at nodes.lkt:21567:17>' New_Struct_1 ada/nodes.lkt:21567
--# expr-start 12466 '<FieldAccess for children_env at nodes.lkt:21570:32>' Fld_1 ada/nodes.lkt:21570
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# expr-done 12466
Inc_Ref (Fld_1);
New_Struct_1 := (Direct_Env => Fld_1, Env_Name => No_Symbol, Kind => Direct_Env); 
--# expr-done 12467
Scope_Result := New_Struct_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3538;
   Result_Var := Scope_Result;
else
   --# expr-start 12468 '<New DesignatedEnv at nodes.lkt:21572:29>' New_Struct_2 ada/nodes.lkt:21572
Inc_Ref (Empty_Env);
New_Struct_2 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 12468
   Result_Var := New_Struct_2;
end if;
      Inc_Ref (Result_Var);
   If_Result_12 := Result_Var;
else
   --# expr-start 12469 '<New DesignatedEnv at nodes.lkt:21579:13>' New_Struct_3 ada/nodes.lkt:21579
Inc_Ref (Empty_Env);
New_Struct_3 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 12469
   If_Result_12 := New_Struct_3;
end if;
      Inc_Ref (If_Result_12);
--# expr-done 12470
   If_Result_13 := If_Result_12;
end if;
      Inc_Ref (If_Result_13);
--# expr-done 12471
         Property_Result := If_Result_13;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1373;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1373;
                     Finalizer_Scope_3538;
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_Initial_Env;
--# end
--# property-start Pragma.as_aspect ada/nodes.lkt:21586
pragma Warnings (Off, "is not referenced");
 function Pragma_Node_P_As_Aspect
  (Node : Bare_Pragma_Node
      ; Inherited : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Aspect
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
     Ent : Internal_Entity_Pragma_Node :=
       Internal_Entity_Pragma_Node'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind inherited Inherited
   Property_Result : Internal_Aspect;
      Fld : Internal_Entity_Expr;
Cast_Expr : Internal_Entity_Pragma_Node;
Cast_Result : Internal_Entity;
New_Struct : Internal_Aspect;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12473 '<New Aspect at nodes.lkt:21587:9>' New_Struct ada/nodes.lkt:21587
Cast_Expr := Ent; 
      Cast_Result := Create_Internal_Entity
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
--# expr-start 12472 '<FieldAccess for value_expr at nodes.lkt:21590:19>' Fld ada/nodes.lkt:21590
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.value_expr
Fld := Libadalang.Implementation.Pragma_Node_P_Value_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12472
New_Struct := (Exists => True, Inherited => Inherited, Node => Cast_Result, Value => Fld); 
--# expr-done 12473
         Property_Result := New_Struct;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Pragma_Node_P_As_Aspect;
--# end
--# property-start Pragma._env_init_217 ada/nodes.lkt:21595
pragma Warnings (Off, "is not referenced");
 function Env_Init_217
  (Node : Bare_Pragma_Node
  )
   return Internal_Designated_Env
is
   Self : Bare_Pragma_Node  := Bare_Pragma_Node (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1881 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1881 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1881;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12474 '<FieldAccess for initial_env at nodes.lkt:21595:25>' Fld ada/nodes.lkt:21595
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Pragma.initial_env
Fld := Libadalang.Implementation.Pragma_Node_P_Initial_Env (Node => Self);
--# end
--# expr-done 12474
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1881;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1881;
            raise;
      end;
   return Property_Result;
end Env_Init_217;
--# end
   --
   --  Primitives for Bare_Private_Node
   --
--# property-start '[dispatcher]Private.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Private_Node_P_As_Bool
  (Node : Bare_Private_Node
  )
   return Boolean
is
   Self : Bare_Private_Node  := Bare_Private_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Private_Node (Self.Kind) is
               when Ada_Private_Absent =>
                  --# property-call-start Private.Absent.as_bool
                  Property_Result := Private_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Private_Present =>
                  --# property-call-start Private.Present.as_bool
                  Property_Result := Private_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Private_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Private_Absent
   --
--# property-start Private.Absent.as_bool ada/nodes.lkt:21601
pragma Warnings (Off, "is not referenced");
 function Private_Absent_P_As_Bool
  (Node : Bare_Private_Absent
  )
   return Boolean
is
   Self : Bare_Private_Absent  := Bare_Private_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Private_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Private_Present
   --
--# property-start Private.Present.as_bool ada/nodes.lkt:21601
pragma Warnings (Off, "is not referenced");
 function Private_Present_P_As_Bool
  (Node : Bare_Private_Present
  )
   return Boolean
is
   Self : Bare_Private_Present  := Bare_Private_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Private_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Protected_Def
   --
      procedure Initialize_Fields_For_Protected_Def
        (Self : Bare_Protected_Def
         ; Protected_Def_F_Public_Part : Bare_Public_Part
         ; Protected_Def_F_Private_Part : Bare_Private_Part
         ; Protected_Def_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Protected_Def_F_Public_Part := Protected_Def_F_Public_Part;
            Self.Protected_Def_F_Private_Part := Protected_Def_F_Private_Part;
            Self.Protected_Def_F_End_Name := Protected_Def_F_End_Name;
      end Initialize_Fields_For_Protected_Def;
   function Protected_Def_F_Public_Part
     (Node : Bare_Protected_Def) return Bare_Public_Part
   is
   begin
         return Node.Protected_Def_F_Public_Part;
   end;
   function Protected_Def_F_Private_Part
     (Node : Bare_Protected_Def) return Bare_Private_Part
   is
   begin
         return Node.Protected_Def_F_Private_Part;
   end;
   function Protected_Def_F_End_Name
     (Node : Bare_Protected_Def) return Bare_End_Name
   is
   begin
         return Node.Protected_Def_F_End_Name;
   end;
   --
   --  Primitives for Bare_Protected_Node
   --
--# property-start '[dispatcher]Protected.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Protected_Node_P_As_Bool
  (Node : Bare_Protected_Node
  )
   return Boolean
is
   Self : Bare_Protected_Node  := Bare_Protected_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Protected_Node (Self.Kind) is
               when Ada_Protected_Absent =>
                  --# property-call-start Protected.Absent.as_bool
                  Property_Result := Protected_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Protected_Present =>
                  --# property-call-start Protected.Present.as_bool
                  Property_Result := Protected_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Protected_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Protected_Absent
   --
--# property-start Protected.Absent.as_bool ada/nodes.lkt:21618
pragma Warnings (Off, "is not referenced");
 function Protected_Absent_P_As_Bool
  (Node : Bare_Protected_Absent
  )
   return Boolean
is
   Self : Bare_Protected_Absent  := Bare_Protected_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Protected_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Protected_Present
   --
--# property-start Protected.Present.as_bool ada/nodes.lkt:21618
pragma Warnings (Off, "is not referenced");
 function Protected_Present_P_As_Bool
  (Node : Bare_Protected_Present
  )
   return Boolean
is
   Self : Bare_Protected_Present  := Bare_Protected_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Protected_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Quantifier
   --
   --
   --  Primitives for Bare_Quantifier_All
   --
   --
   --  Primitives for Bare_Quantifier_Some
   --
   --
   --  Primitives for Bare_Range_Spec
   --
      procedure Initialize_Fields_For_Range_Spec
        (Self : Bare_Range_Spec
         ; Range_Spec_F_Range : Bare_Expr
        ) is
      begin
            Self.Range_Spec_F_Range := Range_Spec_F_Range;
      end Initialize_Fields_For_Range_Spec;
   function Range_Spec_F_Range
     (Node : Bare_Range_Spec) return Bare_Expr
   is
   begin
         return Node.Range_Spec_F_Range;
   end;
--# property-start RangeSpec.xref_stop_resolution ada/nodes.lkt:21632
pragma Warnings (Off, "is not referenced");
 function Range_Spec_P_Xref_Stop_Resolution
  (Node : Bare_Range_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Range_Spec  := Bare_Range_Spec (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12476 '<IsA ComponentClause at nodes.lkt:21632:40>' Is_A ada/nodes.lkt:21632
--# expr-start 12475 '<parent at nodes.lkt:21632:40>' Fld ada/nodes.lkt:21632
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 12475
Is_A := Fld /= null 
and then Fld.Kind in Ada_Component_Clause_Range; 
--# expr-done 12476
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Range_Spec_P_Xref_Stop_Resolution;
--# end
--# property-start RangeSpec.xref_equation ada/nodes.lkt:21635
pragma Warnings (Off, "is not referenced");
 function Range_Spec_P_Xref_Equation
  (Node : Bare_Range_Spec
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Range_Spec  := Bare_Range_Spec (Node);
     Ent : Internal_Entity_Range_Spec :=
       Internal_Entity_Range_Spec'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1382 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Fld_4 : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_7 : Bare_Expr;
Fld_8 : Logic_Var;
Fld_9 : Logic_Equation;
Fld_10 : Internal_Entity_Expr;
Fld_11 : Logic_Equation;
And_Pred_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_12 : Bare_Ada_Node;
Is_A : Boolean;
If_Result : Logic_Equation;
Fld_13 : Bare_Ada_Node;
Is_A_1 : Boolean;
If_Result_1 : Logic_Equation;
And_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_1382 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_11);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_1382;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12497 '<LogicBinaryOp And at nodes.lkt:21636:9>' And_Pred_2 ada/nodes.lkt:21636
--# expr-start 12478 '<FieldAccess for xref_equation at nodes.lkt:21636:9>' Fld_1 ada/nodes.lkt:21636
--# expr-start 12477 '<FieldAccess for range at nodes.lkt:21636:9>' Fld ada/nodes.lkt:21636
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Range_Spec_F_Range, Info => Ent.Info);
--# expr-done 12477
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12478
--# expr-start 12496 '<If at nodes.lkt:21639:14>' If_Result_1 ada/nodes.lkt:21639
--# expr-start 12480 '<IsA ComponentClause, SignedIntTypeDef at nodes.lkt:21639:17>' Is_A_1 ada/nodes.lkt:21639
--# expr-start 12479 '<parent at nodes.lkt:21639:17>' Fld_13 ada/nodes.lkt:21639
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Self.Parent; 
--# expr-done 12479
Is_A_1 := Fld_13 /= null 
and then Fld_13.Kind in Ada_Component_Clause_Range | Ada_Signed_Int_Type_Def_Range; 
--# expr-done 12480
if Is_A_1 then
   --# expr-start 12486 '<LogicBinaryOp And at nodes.lkt:21641:13>' And_Pred ada/nodes.lkt:21641
--# expr-start 12483 '<FieldAccess for universal_int_bind at nodes.lkt:21641:13>' Fld_4 ada/nodes.lkt:21641
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12482 '<FieldAccess for expected_type_var at nodes.lkt:21641:37>' Fld_3 ada/nodes.lkt:21641
--# expr-start 12481 '<FieldAccess for range at nodes.lkt:21641:37>' Fld_2 ada/nodes.lkt:21641
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Range_Spec_F_Range;
--# expr-done 12481
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2);
--# expr-done 12482
--# property-call-start AdaNode.universal_int_bind
Fld_4 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Self, Type_Var => Fld_3, Origin => Origin);
--# end
--# expr-done 12483
--# expr-start 12485 '<FieldAccess for matches_expected_type at nodes.lkt:21642:18>' Fld_6 ada/nodes.lkt:21642
--# expr-start 12484 '<FieldAccess for range at nodes.lkt:21642:18>' Fld_5 ada/nodes.lkt:21642
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Range_Spec_F_Range, Info => Ent.Info);
--# expr-done 12484
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 12485
And_Pred := Create_And (Fld_4, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21641:13") else null)); 
--# expr-done 12486
   If_Result_1 := And_Pred;
else
   --# expr-start 12495 '<If at nodes.lkt:21639:14>' If_Result ada/nodes.lkt:21639
--# expr-start 12488 '<IsA DeltaConstraint, DigitsConstraint, OrdinaryFixedPointDef, DecimalFixedPointDef at nodes.lkt:21647:13>' Is_A ada/nodes.lkt:21647
--# expr-start 12487 '<parent at nodes.lkt:21647:13>' Fld_12 ada/nodes.lkt:21647
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Self.Parent; 
--# expr-done 12487
Is_A := Fld_12 /= null 
and then Fld_12.Kind in Ada_Delta_Constraint_Range | Ada_Digits_Constraint_Range | Ada_Ordinary_Fixed_Point_Def_Range | Ada_Decimal_Fixed_Point_Def_Range; 
--# expr-done 12488
if Is_A then
   --# expr-start 12494 '<LogicBinaryOp And at nodes.lkt:21652:13>' And_Pred_1 ada/nodes.lkt:21652
--# expr-start 12491 '<FieldAccess for universal_real_bind at nodes.lkt:21652:13>' Fld_9 ada/nodes.lkt:21652
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12490 '<FieldAccess for expected_type_var at nodes.lkt:21652:38>' Fld_8 ada/nodes.lkt:21652
--# expr-start 12489 '<FieldAccess for range at nodes.lkt:21652:38>' Fld_7 ada/nodes.lkt:21652
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Self.Range_Spec_F_Range;
--# expr-done 12489
      if Fld_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_7);
--# expr-done 12490
--# property-call-start AdaNode.universal_real_bind
Fld_9 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Bind (Node => Self, Type_Var => Fld_8, Origin => Origin);
--# end
--# expr-done 12491
--# expr-start 12493 '<FieldAccess for matches_expected_type at nodes.lkt:21653:18>' Fld_11 ada/nodes.lkt:21653
--# expr-start 12492 '<FieldAccess for range at nodes.lkt:21653:18>' Fld_10 ada/nodes.lkt:21653
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Expr (Node => Ent.Node.Range_Spec_F_Range, Info => Ent.Info);
--# expr-done 12492
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_11 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_10.Node, Origin => Origin);
--# end
--# expr-done 12493
And_Pred_1 := Create_And (Fld_9, Fld_11, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21652:13") else null)); 
--# expr-done 12494
   If_Result := And_Pred_1;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21655:14") else null)); 
   If_Result := True_Rel;
end if;
      Inc_Ref (If_Result);
--# expr-done 12495
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 12496
And_Pred_2 := Create_And (Fld_1, If_Result_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21636:9") else null)); 
--# expr-done 12497
         Property_Result := And_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1382;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1382;
            raise;
      end;
   return Property_Result;
end Range_Spec_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Renaming_Clause
   --
      procedure Initialize_Fields_For_Renaming_Clause
        (Self : Bare_Renaming_Clause
         ; Renaming_Clause_F_Renamed_Object : Bare_Name
        ) is
      begin
            Self.Renaming_Clause_F_Renamed_Object := Renaming_Clause_F_Renamed_Object;
      end Initialize_Fields_For_Renaming_Clause;
   function Renaming_Clause_F_Renamed_Object
     (Node : Bare_Renaming_Clause) return Bare_Name
   is
   begin
         return Node.Renaming_Clause_F_Renamed_Object;
   end;
   --
   --  Primitives for Bare_Synthetic_Renaming_Clause
   --
      procedure Initialize_Fields_For_Synthetic_Renaming_Clause
        (Self : Bare_Synthetic_Renaming_Clause
         ; Renaming_Clause_F_Renamed_Object : Bare_Name
        ) is
      begin
            Initialize_Fields_For_Renaming_Clause
              (Self, Renaming_Clause_F_Renamed_Object);
      end Initialize_Fields_For_Synthetic_Renaming_Clause;
   --
   --  Primitives for Bare_Reverse_Node
   --
--# property-start '[dispatcher]Reverse.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Reverse_Node_P_As_Bool
  (Node : Bare_Reverse_Node
  )
   return Boolean
is
   Self : Bare_Reverse_Node  := Bare_Reverse_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Reverse_Node (Self.Kind) is
               when Ada_Reverse_Absent =>
                  --# property-call-start Reverse.Absent.as_bool
                  Property_Result := Reverse_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Reverse_Present =>
                  --# property-call-start Reverse.Present.as_bool
                  Property_Result := Reverse_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Reverse_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Reverse_Absent
   --
--# property-start Reverse.Absent.as_bool ada/nodes.lkt:21672
pragma Warnings (Off, "is not referenced");
 function Reverse_Absent_P_As_Bool
  (Node : Bare_Reverse_Absent
  )
   return Boolean
is
   Self : Bare_Reverse_Absent  := Bare_Reverse_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Reverse_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Reverse_Present
   --
--# property-start Reverse.Present.as_bool ada/nodes.lkt:21672
pragma Warnings (Off, "is not referenced");
 function Reverse_Present_P_As_Bool
  (Node : Bare_Reverse_Present
  )
   return Boolean
is
   Self : Bare_Reverse_Present  := Bare_Reverse_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Reverse_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Select_When_Part
   --
      procedure Initialize_Fields_For_Select_When_Part
        (Self : Bare_Select_When_Part
         ; Select_When_Part_F_Cond_Expr : Bare_Expr
         ; Select_When_Part_F_Stmts : Bare_Stmt_List
        ) is
      begin
            Self.Select_When_Part_F_Cond_Expr := Select_When_Part_F_Cond_Expr;
            Self.Select_When_Part_F_Stmts := Select_When_Part_F_Stmts;
      end Initialize_Fields_For_Select_When_Part;
   function Select_When_Part_F_Cond_Expr
     (Node : Bare_Select_When_Part) return Bare_Expr
   is
   begin
         return Node.Select_When_Part_F_Cond_Expr;
   end;
   function Select_When_Part_F_Stmts
     (Node : Bare_Select_When_Part) return Bare_Stmt_List
   is
   begin
         return Node.Select_When_Part_F_Stmts;
   end;
--# property-start SelectWhenPart.xref_equation ada/nodes.lkt:21684
pragma Warnings (Off, "is not referenced");
 function Select_When_Part_P_Xref_Equation
  (Node : Bare_Select_When_Part
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Select_When_Part  := Bare_Select_When_Part (Node);
     Ent : Internal_Entity_Select_When_Part :=
       Internal_Entity_Select_When_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1386 with Inline_Always;
            procedure Finalizer_Scope_3539 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Equation;
And_Pred : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_1386 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1386;
            procedure Finalizer_Scope_3539 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3539;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12498 '<FieldAccess for cond_expr at nodes.lkt:21685:9>' Fld ada/nodes.lkt:21685
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Select_When_Part_F_Cond_Expr, Info => Ent.Info);
--# expr-done 12498
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind c Var_Expr_0
--# expr-start 12501 '<LogicBinaryOp And at nodes.lkt:21686:20>' And_Pred ada/nodes.lkt:21686
--# expr-start 12499 '<FieldAccess for sub_equation at nodes.lkt:21686:20>' Fld_1 ada/nodes.lkt:21686
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 12499
--# expr-start 12500 '<FieldAccess for expect_bool_derived_type at nodes.lkt:21686:42>' Fld_2 ada/nodes.lkt:21686
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_2 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Var_Expr_0.Node, Origin => Origin);
--# end
--# expr-done 12500
And_Pred := Create_And (Fld_1, Fld_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21686:20") else null)); 
--# expr-done 12501
Scope_Result := And_Pred;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3539;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21687:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1386;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1386;
                     Finalizer_Scope_3539;
            raise;
      end;
   return Property_Result;
end Select_When_Part_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Stmt
   --
--# property-start Stmt.xref_entry_point ada/nodes.lkt:21694
pragma Warnings (Off, "is not referenced");
 function Stmt_P_Xref_Entry_Point
  (Node : Bare_Stmt
  )
   return Boolean
is
   Self : Bare_Stmt  := Bare_Stmt (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Stmt_P_Xref_Entry_Point;
--# end
--# property-start Stmt.is_ghost_code ada/nodes.lkt:21698
pragma Warnings (Off, "is not referenced");
 function Stmt_P_Is_Ghost_Code
  (Node : Bare_Stmt
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Stmt  := Bare_Stmt (Node);
     Ent : Internal_Entity_Stmt :=
       Internal_Entity_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Basic_Decl;
Match_0 : Internal_Entity_Assign_Stmt;
Match_1 : Internal_Entity_Call_Stmt;
Match_2 : Internal_Entity_Stmt;
Var_Expr_1 : Internal_Refd_Def;
Var_Expr_282 : Internal_Entity_Defining_Name;
Fld : Internal_Entity_Basic_Decl;
Fld_1 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Fld_2 : Internal_Entity_Name;
Fld_3 : Internal_Refd_Def;
Fld_4 : Internal_Entity_Name;
Fld_5 : Internal_Refd_Def;
Match_Prefix : Internal_Entity_Stmt;
Cast_Result : Internal_Entity_Assign_Stmt;
Let_Result : Internal_Refd_Def;
Scope_Result_1 : Internal_Refd_Def;
Cast_Result_1 : Internal_Entity_Call_Stmt;
Let_Result_1 : Internal_Refd_Def;
Scope_Result_2 : Internal_Refd_Def;
Cast_Result_2 : Internal_Entity_Stmt;
Let_Result_2 : Internal_Refd_Def;
Scope_Result_3 : Internal_Refd_Def;
Match_Result : Internal_Refd_Def;
Fld_6 : Internal_Entity_Defining_Name;
Fld_7 : Boolean;
Scope_Result_4 : Boolean;
Result_Var_1 : Boolean;
Fld_8 : Ref_Result_Kind;
Is_Equal : Boolean;
If_Result : Boolean;
Scope_Result_5 : Boolean;
Result_Var_2 : Boolean;
If_Result_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 12514 '<BooleanBinaryOp Or at nodes.lkt:21701:9>' If_Result_1 ada/nodes.lkt:21701
--# expr-start 12502 '<FieldAccess for parent_basic_decl at nodes.lkt:21701:9>' Fld ada/nodes.lkt:21701
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.parent_basic_decl
Fld := Libadalang.Implementation.Ada_Node_P_Parent_Basic_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12502
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind bd Var_Expr_0
--# expr-start 12503 '<FieldAccess for is_ghost_code at nodes.lkt:21701:45>' Fld_1 ada/nodes.lkt:21701
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.is_ghost_code
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Is_Ghost_Code (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 12503
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
if Result_Var then
   If_Result_1 := True;
else
--# expr-start 12508 '<Match at nodes.lkt:21705:12>' Match_Result ada/nodes.lkt:21705
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Stmt (Match_Prefix.Node.Kind) is
         when Ada_Assign_Stmt =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Assign_Stmt
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind ass Match_0
--# expr-start 12505 '<FieldAccess for failsafe_referenced_def_name at nodes.lkt:21706:37>' Fld_3 ada/nodes.lkt:21706
--# expr-start 12504 '<FieldAccess for dest at nodes.lkt:21706:37>' Fld_2 ada/nodes.lkt:21706
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Match_0.Node.Assign_Stmt_F_Dest, Info => Match_0.Info);
--# expr-done 12504
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.failsafe_referenced_def_name
Fld_3 := Libadalang.Implementation.Name_P_Failsafe_Referenced_Def_Name (Node => Fld_2.Node, Imprecise_Fallback => False, E_Info => Fld_2.Info);
--# end
--# expr-done 12505
Let_Result := Fld_3; 
--# end
Scope_Result_1 := Let_Result;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Call_Stmt =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Call_Stmt
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind call Match_1
--# expr-start 12507 '<FieldAccess for failsafe_referenced_def_name at nodes.lkt:21707:36>' Fld_5 ada/nodes.lkt:21707
--# expr-start 12506 '<FieldAccess for call at nodes.lkt:21707:36>' Fld_4 ada/nodes.lkt:21707
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Name (Node => Match_1.Node.Call_Stmt_F_Call, Info => Match_1.Info);
--# expr-done 12506
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.failsafe_referenced_def_name
Fld_5 := Libadalang.Implementation.Name_P_Failsafe_Referenced_Def_Name (Node => Fld_4.Node, Imprecise_Fallback => False, E_Info => Fld_4.Info);
--# end
--# expr-done 12507
Let_Result_1 := Fld_5; 
--# end
Scope_Result_2 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_2; 
         when Ada_Accept_Stmt .. Ada_Abort_Stmt | Ada_Delay_Stmt .. Ada_Terminate_Alternative =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Stmt
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Refd_Def; 
--# end
Scope_Result_3 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_3; 
end case;
--# expr-done 12508
Var_Expr_1 := Match_Result;
if Var_Expr_1 /= No_Refd_Def then
   --# scope-start
   --# bind res Var_Expr_1
--# expr-start 12513 '<If at nodes.lkt:21718:13>' If_Result ada/nodes.lkt:21718
--# expr-start 12510 '<Eq at nodes.lkt:21718:16>' Is_Equal ada/nodes.lkt:21718
--# expr-start 12509 '<FieldAccess for kind at nodes.lkt:21718:16>' Fld_8 ada/nodes.lkt:21718
Fld_8 := Var_Expr_1.Kind;
--# expr-done 12509
Is_Equal := Fld_8 = Error; 
--# expr-done 12510
if Is_Equal then
   If_Result := raise Property_Error with "Name resolution error";
else
--# expr-start 12511 '<FieldAccess for def_name at nodes.lkt:21720:18>' Fld_6 ada/nodes.lkt:21720
Fld_6 := Var_Expr_1.Def_Name;
--# expr-done 12511
Var_Expr_282 := Fld_6;
if Var_Expr_282 /= No_Entity_Defining_Name then
   --# scope-start
--# expr-start 12512 '<FieldAccess for is_ghost_code at nodes.lkt:21720:18>' Fld_7 ada/nodes.lkt:21720
      if Var_Expr_282.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start DefiningName.is_ghost_code
Fld_7 := Libadalang.Implementation.Defining_Name_P_Is_Ghost_Code (Node => Var_Expr_282.Node, E_Info => Var_Expr_282.Info);
--# end
--# expr-done 12512
Scope_Result_4 := Fld_7;
   --# end
   Result_Var_1 := Scope_Result_4;
else
   Result_Var_1 := False;
end if;
   If_Result := Result_Var_1;
end if;
--# expr-done 12513
Scope_Result_5 := If_Result;
   --# end
   Result_Var_2 := Scope_Result_5;
else
   Result_Var_2 := False;
end if;
   If_Result_1 := Result_Var_2;
end if;
--# expr-done 12514
         Property_Result := If_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Stmt_P_Is_Ghost_Code;
--# end
   --
   --  Primitives for Bare_Composite_Stmt
   --
   --
   --  Primitives for Bare_Accept_Stmt
   --
      procedure Accept_Stmt_Pre_Env_Actions
        (Self            : Bare_Accept_Stmt;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mappings : Internal_Env_Assoc_Array_Access :=
            Libadalang.Implementation.Env_Mappings_218 (Node => 
Self);
      begin
         for Mapping of Mappings.Items loop
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:21772:9");
         end loop;
         Dec_Ref (Mappings);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_219 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Accept_Stmt
        (Self : Bare_Accept_Stmt
         ; Accept_Stmt_F_Body_Decl : Bare_Accept_Stmt_Body
         ; Accept_Stmt_F_Entry_Index_Expr : Bare_Expr
         ; Accept_Stmt_F_Params : Bare_Entry_Completion_Formal_Params
        ) is
      begin
            Self.Accept_Stmt_F_Body_Decl := Accept_Stmt_F_Body_Decl;
            Self.Accept_Stmt_F_Entry_Index_Expr := Accept_Stmt_F_Entry_Index_Expr;
            Self.Accept_Stmt_F_Params := Accept_Stmt_F_Params;
      end Initialize_Fields_For_Accept_Stmt;
   function Accept_Stmt_F_Body_Decl
     (Node : Bare_Accept_Stmt) return Bare_Accept_Stmt_Body
   is
   begin
         return Node.Accept_Stmt_F_Body_Decl;
   end;
   function Accept_Stmt_F_Entry_Index_Expr
     (Node : Bare_Accept_Stmt) return Bare_Expr
   is
   begin
         return Node.Accept_Stmt_F_Entry_Index_Expr;
   end;
   function Accept_Stmt_F_Params
     (Node : Bare_Accept_Stmt) return Bare_Entry_Completion_Formal_Params
   is
   begin
         return Node.Accept_Stmt_F_Params;
   end;
--# property-start AcceptStmt.designated_entry ada/nodes.lkt:21740
pragma Warnings (Off, "is not referenced");
 function Accept_Stmt_P_Designated_Entry
  (Node : Bare_Accept_Stmt
      ; Origin : Bare_Ada_Node
      ; Env : Lexical_Env
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Entry_Decl
is
   Self : Bare_Accept_Stmt  := Bare_Accept_Stmt (Node);
     Ent : Internal_Entity_Accept_Stmt :=
       Internal_Entity_Accept_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind env Env
   Property_Result : Internal_Entity_Entry_Decl;
            procedure Finalizer_Scope_1389 with Inline_Always;
      Var_Expr_1 : Internal_Entity_Entry_Decl;
Fld : Internal_Entity_Accept_Stmt_Body;
Fld_1 : Internal_Entity_Defining_Name;
Fld_2 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Entry_Decl;
Fld_3 : Internal_Entity_Entry_Spec;
Fld_4 : Internal_Entity_Entry_Completion_Formal_Params;
Cast_Result_1 : Internal_Entity_Base_Formal_Param_Holder;
Fld_5 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Find_Result : Internal_Entity;
Cast_Result_2 : Internal_Entity_Entry_Decl;
            procedure Finalizer_Scope_1389 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1389;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12523 '<Cast to EntryDecl at nodes.lkt:21741:9>' Cast_Result_2 ada/nodes.lkt:21741
--# expr-start 12522 '<Find at nodes.lkt:21741:9>' Find_Result ada/nodes.lkt:21741
   --# expr-start 12517 '<FieldAccess for all_env_els_impl at nodes.lkt:21741:9>' Fld_2 ada/nodes.lkt:21741
--# expr-start 12516 '<FieldAccess for name at nodes.lkt:21741:9>' Fld_1 ada/nodes.lkt:21741
--# expr-start 12515 '<FieldAccess for body_decl at nodes.lkt:21741:9>' Fld ada/nodes.lkt:21741
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Accept_Stmt_Body (Node => Ent.Node.Accept_Stmt_F_Body_Decl, Info => Ent.Info);
--# expr-done 12515
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Defining_Name (Node => Fld.Node.Accept_Stmt_Body_F_Name, Info => Fld.Info);
--# expr-done 12516
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.all_env_els_impl'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_All_Env_Els_Impl (Node => Fld_1.Node, Env => Env, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 12517
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_2;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_0
--# expr-start 12518 '<Cast to EntryDecl at nodes.lkt:21743:13>' Cast_Result ada/nodes.lkt:21743
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Entry_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Entry_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Entry_Decl;
   end if;
--# expr-done 12518
Var_Expr_1 := Cast_Result;
if Var_Expr_1 /= No_Entity_Entry_Decl then
   --# scope-start
   --# bind d Var_Expr_1
--# expr-start 12521 '<FieldAccess for match_formal_params at nodes.lkt:21743:39>' Fld_5 ada/nodes.lkt:21743
--# expr-start 12519 '<FieldAccess for spec at nodes.lkt:21743:39>' Fld_3 ada/nodes.lkt:21743
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Entry_Spec (Node => Var_Expr_1.Node.Entry_Decl_F_Spec, Info => Var_Expr_1.Info);
--# expr-done 12519
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12520 '<FieldAccess for params at nodes.lkt:21743:66>' Fld_4 ada/nodes.lkt:21743
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Entry_Completion_Formal_Params (Node => Ent.Node.Accept_Stmt_F_Params, Info => Ent.Info);
--# expr-done 12520
      Cast_Result_1 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
--# property-call-start BaseFormalParamHolder.match_formal_params
Fld_5 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Formal_Params (Node => Fld_3.Node, Other => Cast_Result_1, Origin => Origin, E_Info => Fld_3.Info);
--# end
--# expr-done 12521
Scope_Result := Fld_5;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
      if Result_Var then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Result_Var;
         end loop;
      end;
--# expr-done 12522
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Entry_Decl_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Entry_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Cast_Result_2 := No_Entity_Entry_Decl;
   end if;
--# expr-done 12523
         Property_Result := Cast_Result_2;
   --# end
      Finalizer_Scope_1389;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1389;
            raise;
      end;
   return Property_Result;
end Accept_Stmt_P_Designated_Entry;
--# end
--# property-start AcceptStmt.corresponding_entry ada/nodes.lkt:21750
pragma Warnings (Off, "is not referenced");
 function Accept_Stmt_P_Corresponding_Entry
  (Node : Bare_Accept_Stmt
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Entry_Decl
is
   Self : Bare_Accept_Stmt  := Bare_Accept_Stmt (Node);
     Ent : Internal_Entity_Accept_Stmt :=
       Internal_Entity_Accept_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Entry_Decl;
            procedure Finalizer_Scope_1390 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Entry_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Entry_Decl;
            procedure Finalizer_Scope_1390 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_1390;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 12526 '<bind at nodes.lkt:21751:9>' Dyn_Var_Bind_Result ada/nodes.lkt:21751
--# expr-start 12524 '<FieldAccess for node_env at nodes.lkt:21751:20>' Fld ada/nodes.lkt:21751
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 12524
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 12525 '<FieldAccess for designated_entry at nodes.lkt:21753:9>' Fld_1 ada/nodes.lkt:21753
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AcceptStmt.designated_entry
Fld_1 := Libadalang.Implementation.Accept_Stmt_P_Designated_Entry (Node => Ent.Node, Origin => Origin, Env => Bound_Env, E_Info => Ent.Info);
--# end
--# expr-done 12525
Dyn_Var_Bind_Result := Fld_1; 
--# expr-done 12526
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      Finalizer_Scope_1390;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1390;
            raise;
      end;
   return Property_Result;
end Accept_Stmt_P_Corresponding_Entry;
--# end
--# property-start AcceptStmt.xref_equation ada/nodes.lkt:21757
pragma Warnings (Off, "is not referenced");
 function Accept_Stmt_P_Xref_Equation
  (Node : Bare_Accept_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Accept_Stmt  := Bare_Accept_Stmt (Node);
     Ent : Internal_Entity_Accept_Stmt :=
       Internal_Entity_Accept_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1391 with Inline_Always;
            procedure Finalizer_Scope_3548 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Fld : Bare_Accept_Stmt_Body;
Fld_1 : Bare_Defining_Name;
Fld_2 : Logic_Var;
Fld_3 : Internal_Entity_Entry_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_4 : Internal_Entity_Expr;
Fld_5 : Logic_Var;
Fld_6 : Internal_Entity_Entry_Decl;
Fld_7 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Bind_Result_1 : Logic_Equation;
Fld_8 : Logic_Equation;
And_Pred : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1391 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1391;
            procedure Finalizer_Scope_3548 is
            begin
                     Dec_Ref (Bind_Result_1);
                     Dec_Ref (Fld_8);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3548;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12539 '<LogicBinaryOp And at nodes.lkt:21758:9>' And_Pred_1 ada/nodes.lkt:21758
--# expr-start 12531 '<Bind at nodes.lkt:21758:9>' Bind_Result ada/nodes.lkt:21758
--# expr-start 12529 '<FieldAccess for ref_var at nodes.lkt:21758:9>' Fld_2 ada/nodes.lkt:21758
--# expr-start 12528 '<FieldAccess for name at nodes.lkt:21758:9>' Fld_1 ada/nodes.lkt:21758
--# expr-start 12527 '<FieldAccess for body_decl at nodes.lkt:21758:9>' Fld ada/nodes.lkt:21758
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Accept_Stmt_F_Body_Decl;
--# expr-done 12527
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Accept_Stmt_Body_F_Name;
--# expr-done 12528
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld_1);
--# end
--# expr-done 12529
Fld_2.Value := No_Entity;
Entity_Vars.Reset (Fld_2);
--# expr-start 12530 '<FieldAccess for designated_entry at nodes.lkt:21758:42>' Fld_3 ada/nodes.lkt:21758
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AcceptStmt.designated_entry
Fld_3 := Libadalang.Implementation.Accept_Stmt_P_Designated_Entry (Node => Ent.Node, Origin => Origin, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 12530
      Cast_Result := Create_Internal_Entity
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
Bind_Result := Solver.Create_Assign (Fld_2, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21758:9") else null)); 
--# expr-done 12531
--# expr-start 12532 '<FieldAccess for entry_index_expr at nodes.lkt:21759:14>' Fld_4 ada/nodes.lkt:21759
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Create_Internal_Entity_Expr (Node => Ent.Node.Accept_Stmt_F_Entry_Index_Expr, Info => Ent.Info);
--# expr-done 12532
Var_Expr_0 := Fld_4;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind e Var_Expr_0
--# expr-start 12538 '<LogicBinaryOp And at nodes.lkt:21761:13>' And_Pred ada/nodes.lkt:21761
--# expr-start 12536 '<Bind at nodes.lkt:21765:17>' Bind_Result_1 ada/nodes.lkt:21765
--# expr-start 12533 '<FieldAccess for expected_type_var at nodes.lkt:21765:17>' Fld_5 ada/nodes.lkt:21765
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_0.Node);
--# expr-done 12533
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 12535 '<FieldAccess for family_type at nodes.lkt:21765:42>' Fld_7 ada/nodes.lkt:21765
--# expr-start 12534 '<FieldAccess for designated_entry at nodes.lkt:21765:42>' Fld_6 ada/nodes.lkt:21765
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AcceptStmt.designated_entry
Fld_6 := Libadalang.Implementation.Accept_Stmt_P_Designated_Entry (Node => Ent.Node, Origin => Origin, Env => Env, E_Info => Ent.Info);
--# end
--# expr-done 12534
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start EntryDecl.family_type
Fld_7 := Libadalang.Implementation.Entry_Decl_P_Family_Type (Node => Fld_6.Node, Origin => Origin, E_Info => Fld_6.Info);
--# end
--# expr-done 12535
      Cast_Result_1 := Create_Internal_Entity
        (Node => Fld_7.Node,
         Info => Fld_7.Info);
Bind_Result_1 := Solver.Create_Assign (Fld_5, Cast_Result_1, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21765:17") else null)); 
--# expr-done 12536
--# expr-start 12537 '<FieldAccess for sub_equation at nodes.lkt:21767:18>' Fld_8 ada/nodes.lkt:21767
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 12537
And_Pred := Create_And (Bind_Result_1, Fld_8, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21761:13") else null)); 
--# expr-done 12538
Scope_Result := And_Pred;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3548;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21768:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_1 := Create_And (Bind_Result, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21758:9") else null)); 
--# expr-done 12539
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1391;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1391;
                     Finalizer_Scope_3548;
            raise;
      end;
   return Property_Result;
end Accept_Stmt_P_Xref_Equation;
--# end
--# property-start AcceptStmt._env_mappings_218 ada/nodes.lkt:21773
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_218
  (Node : Bare_Accept_Stmt
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Accept_Stmt  := Bare_Accept_Stmt (Node);
     Ent : Internal_Entity_Accept_Stmt :=
       Internal_Entity_Accept_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1882 with Inline_Always;
      Fld : Internal_Entity_Accept_Stmt_Body;
Fld_1 : Internal_Entity_Defining_Name;
Fld_2 : Internal_Entity_Name;
Fld_3 : Symbol_Type;
Fld_4 : Bare_Accept_Stmt_Body;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1882 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_1882;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12547 '<ArrayLiteral at nodes.lkt:21773:13>' Array_Lit ada/nodes.lkt:21773
--# expr-start 12546 '<New EnvAssoc at nodes.lkt:21774:17>' New_Struct_1 ada/nodes.lkt:21774
--# expr-start 12540 '<New DesignatedEnv at nodes.lkt:21777:30>' New_Struct ada/nodes.lkt:21777
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 12540
--# expr-start 12544 '<FieldAccess for name_symbol at nodes.lkt:21775:25>' Fld_3 ada/nodes.lkt:21775
--# expr-start 12543 '<FieldAccess for relative_name at nodes.lkt:21775:25>' Fld_2 ada/nodes.lkt:21775
--# expr-start 12542 '<FieldAccess for name at nodes.lkt:21775:25>' Fld_1 ada/nodes.lkt:21775
--# expr-start 12541 '<FieldAccess for body_decl at nodes.lkt:21775:25>' Fld ada/nodes.lkt:21775
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Accept_Stmt_Body (Node => Ent.Node.Accept_Stmt_F_Body_Decl, Info => Ent.Info);
--# expr-done 12541
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Defining_Name (Node => Fld.Node.Accept_Stmt_Body_F_Name, Info => Fld.Info);
--# expr-done 12542
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.relative_name'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Relative_Name (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 12543
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_3 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Fld_2.Node);
--# end
--# expr-done 12544
--# expr-start 12545 '<FieldAccess for body_decl at nodes.lkt:21776:27>' Fld_4 ada/nodes.lkt:21776
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Accept_Stmt_F_Body_Decl;
--# expr-done 12545
      Cast_Result := Fld_4;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld_3, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 12546
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => New_Struct_1)); 
--# expr-done 12547
         Property_Result := Array_Lit;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1882;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1882;
            raise;
      end;
   return Property_Result;
end Env_Mappings_218;
--# end
--# property-start AcceptStmt._env_trans_parent_219 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_219
  (Node : Bare_Accept_Stmt
  )
   return Boolean
is
   Self : Bare_Accept_Stmt  := Bare_Accept_Stmt (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_219;
--# end
   --
   --  Primitives for Bare_Accept_Stmt_With_Stmts
   --
      procedure Initialize_Fields_For_Accept_Stmt_With_Stmts
        (Self : Bare_Accept_Stmt_With_Stmts
         ; Accept_Stmt_F_Body_Decl : Bare_Accept_Stmt_Body
         ; Accept_Stmt_F_Entry_Index_Expr : Bare_Expr
         ; Accept_Stmt_F_Params : Bare_Entry_Completion_Formal_Params
         ; Accept_Stmt_With_Stmts_F_Stmts : Bare_Handled_Stmts
         ; Accept_Stmt_With_Stmts_F_End_Name : Bare_End_Name
        ) is
      begin
            Initialize_Fields_For_Accept_Stmt
              (Self, Accept_Stmt_F_Body_Decl, Accept_Stmt_F_Entry_Index_Expr, Accept_Stmt_F_Params);
            Self.Accept_Stmt_With_Stmts_F_Stmts := Accept_Stmt_With_Stmts_F_Stmts;
            Self.Accept_Stmt_With_Stmts_F_End_Name := Accept_Stmt_With_Stmts_F_End_Name;
      end Initialize_Fields_For_Accept_Stmt_With_Stmts;
   function Accept_Stmt_With_Stmts_F_Stmts
     (Node : Bare_Accept_Stmt_With_Stmts) return Bare_Handled_Stmts
   is
   begin
         return Node.Accept_Stmt_With_Stmts_F_Stmts;
   end;
   function Accept_Stmt_With_Stmts_F_End_Name
     (Node : Bare_Accept_Stmt_With_Stmts) return Bare_End_Name
   is
   begin
         return Node.Accept_Stmt_With_Stmts_F_End_Name;
   end;
   --
   --  Primitives for Bare_Base_Loop_Stmt
   --
      procedure Initialize_Fields_For_Base_Loop_Stmt
        (Self : Bare_Base_Loop_Stmt
         ; Base_Loop_Stmt_F_Spec : Bare_Loop_Spec
         ; Base_Loop_Stmt_F_Stmts : Bare_Stmt_List
         ; Base_Loop_Stmt_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Base_Loop_Stmt_F_Spec := Base_Loop_Stmt_F_Spec;
            Self.Base_Loop_Stmt_F_Stmts := Base_Loop_Stmt_F_Stmts;
            Self.Base_Loop_Stmt_F_End_Name := Base_Loop_Stmt_F_End_Name;
      end Initialize_Fields_For_Base_Loop_Stmt;
   function Base_Loop_Stmt_F_Spec
     (Node : Bare_Base_Loop_Stmt) return Bare_Loop_Spec
   is
   begin
         return Node.Base_Loop_Stmt_F_Spec;
   end;
   function Base_Loop_Stmt_F_Stmts
     (Node : Bare_Base_Loop_Stmt) return Bare_Stmt_List
   is
   begin
         return Node.Base_Loop_Stmt_F_Stmts;
   end;
   function Base_Loop_Stmt_F_End_Name
     (Node : Bare_Base_Loop_Stmt) return Bare_End_Name
   is
   begin
         return Node.Base_Loop_Stmt_F_End_Name;
   end;
--# property-start BaseLoopStmt.xref_equation ada/nodes.lkt:21812
pragma Warnings (Off, "is not referenced");
 function Base_Loop_Stmt_P_Xref_Equation
  (Node : Bare_Base_Loop_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Base_Loop_Stmt  := Bare_Base_Loop_Stmt (Node);
     Ent : Internal_Entity_Base_Loop_Stmt :=
       Internal_Entity_Base_Loop_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1392 with Inline_Always;
            procedure Finalizer_Scope_3549 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Loop_Spec;
Fld : Internal_Entity_Loop_Spec;
Fld_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_1392 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1392;
            procedure Finalizer_Scope_3549 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3549;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12548 '<FieldAccess for spec at nodes.lkt:21813:9>' Fld ada/nodes.lkt:21813
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Loop_Spec (Node => Ent.Node.Base_Loop_Stmt_F_Spec, Info => Ent.Info);
--# expr-done 12548
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Loop_Spec then
   --# scope-start
   --# bind s Var_Expr_0
--# expr-start 12549 '<FieldAccess for xref_equation at nodes.lkt:21813:29>' Fld_1 ada/nodes.lkt:21813
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 12549
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3549;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21813:60") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1392;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1392;
                     Finalizer_Scope_3549;
            raise;
      end;
   return Property_Result;
end Base_Loop_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_For_Loop_Stmt
   --
      procedure For_Loop_Stmt_Pre_Env_Actions
        (Self            : Bare_For_Loop_Stmt;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_220 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_For_Loop_Stmt
        (Self : Bare_For_Loop_Stmt
         ; Base_Loop_Stmt_F_Spec : Bare_Loop_Spec
         ; Base_Loop_Stmt_F_Stmts : Bare_Stmt_List
         ; Base_Loop_Stmt_F_End_Name : Bare_End_Name
        ) is
      begin
            Initialize_Fields_For_Base_Loop_Stmt
              (Self, Base_Loop_Stmt_F_Spec, Base_Loop_Stmt_F_Stmts, Base_Loop_Stmt_F_End_Name);
      end Initialize_Fields_For_For_Loop_Stmt;
--# property-start ForLoopStmt._env_trans_parent_220 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_220
  (Node : Bare_For_Loop_Stmt
  )
   return Boolean
is
   Self : Bare_For_Loop_Stmt  := Bare_For_Loop_Stmt (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_220;
--# end
   --
   --  Primitives for Bare_Loop_Stmt
   --
      procedure Initialize_Fields_For_Loop_Stmt
        (Self : Bare_Loop_Stmt
         ; Base_Loop_Stmt_F_Spec : Bare_Loop_Spec
         ; Base_Loop_Stmt_F_Stmts : Bare_Stmt_List
         ; Base_Loop_Stmt_F_End_Name : Bare_End_Name
        ) is
      begin
            Initialize_Fields_For_Base_Loop_Stmt
              (Self, Base_Loop_Stmt_F_Spec, Base_Loop_Stmt_F_Stmts, Base_Loop_Stmt_F_End_Name);
      end Initialize_Fields_For_Loop_Stmt;
   --
   --  Primitives for Bare_While_Loop_Stmt
   --
      procedure Initialize_Fields_For_While_Loop_Stmt
        (Self : Bare_While_Loop_Stmt
         ; Base_Loop_Stmt_F_Spec : Bare_Loop_Spec
         ; Base_Loop_Stmt_F_Stmts : Bare_Stmt_List
         ; Base_Loop_Stmt_F_End_Name : Bare_End_Name
        ) is
      begin
            Initialize_Fields_For_Base_Loop_Stmt
              (Self, Base_Loop_Stmt_F_Spec, Base_Loop_Stmt_F_Stmts, Base_Loop_Stmt_F_End_Name);
      end Initialize_Fields_For_While_Loop_Stmt;
   --
   --  Primitives for Bare_Block_Stmt
   --
      procedure Block_Stmt_Pre_Env_Actions
        (Self            : Bare_Block_Stmt;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_221 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
--# property-start BlockStmt.xref_equation ada/nodes.lkt:21837
pragma Warnings (Off, "is not referenced");
 function Block_Stmt_P_Xref_Equation
  (Node : Bare_Block_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Block_Stmt  := Bare_Block_Stmt (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1393 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1393 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1393;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21837:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1393;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1393;
            raise;
      end;
   return Property_Result;
end Block_Stmt_P_Xref_Equation;
--# end
--# property-start BlockStmt._env_trans_parent_221 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_221
  (Node : Bare_Block_Stmt
  )
   return Boolean
is
   Self : Bare_Block_Stmt  := Bare_Block_Stmt (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_221;
--# end
   --
   --  Primitives for Bare_Begin_Block
   --
      procedure Initialize_Fields_For_Begin_Block
        (Self : Bare_Begin_Block
         ; Begin_Block_F_Stmts : Bare_Handled_Stmts
         ; Begin_Block_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Begin_Block_F_Stmts := Begin_Block_F_Stmts;
            Self.Begin_Block_F_End_Name := Begin_Block_F_End_Name;
      end Initialize_Fields_For_Begin_Block;
   function Begin_Block_F_Stmts
     (Node : Bare_Begin_Block) return Bare_Handled_Stmts
   is
   begin
         return Node.Begin_Block_F_Stmts;
   end;
   function Begin_Block_F_End_Name
     (Node : Bare_Begin_Block) return Bare_End_Name
   is
   begin
         return Node.Begin_Block_F_End_Name;
   end;
   --
   --  Primitives for Bare_Decl_Block
   --
      procedure Initialize_Fields_For_Decl_Block
        (Self : Bare_Decl_Block
         ; Decl_Block_F_Decls : Bare_Declarative_Part
         ; Decl_Block_F_Stmts : Bare_Handled_Stmts
         ; Decl_Block_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Decl_Block_F_Decls := Decl_Block_F_Decls;
            Self.Decl_Block_F_Stmts := Decl_Block_F_Stmts;
            Self.Decl_Block_F_End_Name := Decl_Block_F_End_Name;
      end Initialize_Fields_For_Decl_Block;
   function Decl_Block_F_Decls
     (Node : Bare_Decl_Block) return Bare_Declarative_Part
   is
   begin
         return Node.Decl_Block_F_Decls;
   end;
   function Decl_Block_F_Stmts
     (Node : Bare_Decl_Block) return Bare_Handled_Stmts
   is
   begin
         return Node.Decl_Block_F_Stmts;
   end;
   function Decl_Block_F_End_Name
     (Node : Bare_Decl_Block) return Bare_End_Name
   is
   begin
         return Node.Decl_Block_F_End_Name;
   end;
--# property-start DeclBlock.immediate_declarative_region ada/nodes.lkt:21863
pragma Warnings (Off, "is not referenced");
 function Decl_Block_P_Immediate_Declarative_Region
  (Node : Bare_Decl_Block
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Decl_Block  := Bare_Decl_Block (Node);
     Ent : Internal_Entity_Decl_Block :=
       Internal_Entity_Decl_Block'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1394 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1394 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1394;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12550 '<FieldAccess for children_env at nodes.lkt:21863:54>' Fld ada/nodes.lkt:21863
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 12550
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1394;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1394;
            raise;
      end;
   return Property_Result;
end Decl_Block_P_Immediate_Declarative_Region;
--# end
   --
   --  Primitives for Bare_Case_Stmt
   --
      procedure Initialize_Fields_For_Case_Stmt
        (Self : Bare_Case_Stmt
         ; Case_Stmt_F_Expr : Bare_Expr
         ; Case_Stmt_F_Pragmas : Bare_Pragma_Node_List
         ; Case_Stmt_F_Alternatives : Bare_Case_Stmt_Alternative_List
        ) is
      begin
            Self.Case_Stmt_F_Expr := Case_Stmt_F_Expr;
            Self.Case_Stmt_F_Pragmas := Case_Stmt_F_Pragmas;
            Self.Case_Stmt_F_Alternatives := Case_Stmt_F_Alternatives;
      end Initialize_Fields_For_Case_Stmt;
   function Case_Stmt_F_Expr
     (Node : Bare_Case_Stmt) return Bare_Expr
   is
   begin
         return Node.Case_Stmt_F_Expr;
   end;
   function Case_Stmt_F_Pragmas
     (Node : Bare_Case_Stmt) return Bare_Pragma_Node_List
   is
   begin
         return Node.Case_Stmt_F_Pragmas;
   end;
   function Case_Stmt_F_Alternatives
     (Node : Bare_Case_Stmt) return Bare_Case_Stmt_Alternative_List
   is
   begin
         return Node.Case_Stmt_F_Alternatives;
   end;
--# property-start CaseStmt.xref_equation ada/nodes.lkt:21876
pragma Warnings (Off, "is not referenced");
 function Case_Stmt_P_Xref_Equation
  (Node : Bare_Case_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Case_Stmt  := Bare_Case_Stmt (Node);
     Ent : Internal_Entity_Case_Stmt :=
       Internal_Entity_Case_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1395 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Pred : Logic_Equation;
Fld_4 : Bare_Expr;
Fld_5 : Logic_Var;
Pred_1 : Logic_Equation;
And_Pred : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1395 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Pred);
                     Dec_Ref (Pred_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1395;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12560 '<LogicBinaryOp And at nodes.lkt:21877:9>' And_Pred_1 ada/nodes.lkt:21877
--# expr-start 12552 '<FieldAccess for sub_equation at nodes.lkt:21877:9>' Fld_1 ada/nodes.lkt:21877
--# expr-start 12551 '<FieldAccess for expr at nodes.lkt:21877:9>' Fld ada/nodes.lkt:21877
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Case_Stmt_F_Expr, Info => Ent.Info);
--# expr-done 12551
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12552
--# expr-start 12559 '<LogicBinaryOp And at nodes.lkt:21879:13>' And_Pred ada/nodes.lkt:21879
--# expr-start 12555 '<Predicate on AdaNode.is_not_null at nodes.lkt:21883:17>' Pred ada/nodes.lkt:21883
--# expr-start 12554 '<FieldAccess for type_var at nodes.lkt:21883:38>' Fld_3 ada/nodes.lkt:21883
--# expr-start 12553 '<FieldAccess for expr at nodes.lkt:21883:38>' Fld_2 ada/nodes.lkt:21883
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Case_Stmt_F_Expr;
--# expr-done 12553
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_2);
--# expr-done 12554
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Pred := Solver.Create_Predicate (Fld_3, Create_Ada_Node_P_Is_Not_Null_0_Predicate); 
--# expr-done 12555
--# expr-start 12558 '<Predicate on BaseTypeDecl.is_discrete_type at nodes.lkt:21887:17>' Pred_1 ada/nodes.lkt:21887
--# expr-start 12557 '<FieldAccess for type_var at nodes.lkt:21887:48>' Fld_5 ada/nodes.lkt:21887
--# expr-start 12556 '<FieldAccess for expr at nodes.lkt:21887:48>' Fld_4 ada/nodes.lkt:21887
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Case_Stmt_F_Expr;
--# expr-done 12556
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_4);
--# expr-done 12557
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
Pred_1 := Solver.Create_Predicate (Fld_5, Create_Base_Type_Decl_P_Is_Discrete_Type_0_Predicate (Origin)); 
--# expr-done 12558
And_Pred := Create_And (Pred, Pred_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21879:13") else null)); 
--# expr-done 12559
And_Pred_1 := Create_And (Fld_1, And_Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21877:9") else null)); 
--# expr-done 12560
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1395;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1395;
            raise;
      end;
   return Property_Result;
end Case_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Extended_Return_Stmt
   --
      procedure Extended_Return_Stmt_Pre_Env_Actions
        (Self            : Bare_Extended_Return_Stmt;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_222 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Extended_Return_Stmt
        (Self : Bare_Extended_Return_Stmt
         ; Extended_Return_Stmt_F_Decl : Bare_Extended_Return_Stmt_Object_Decl
         ; Extended_Return_Stmt_F_Stmts : Bare_Handled_Stmts
        ) is
      begin
            Self.Extended_Return_Stmt_F_Decl := Extended_Return_Stmt_F_Decl;
            Self.Extended_Return_Stmt_F_Stmts := Extended_Return_Stmt_F_Stmts;
      end Initialize_Fields_For_Extended_Return_Stmt;
   function Extended_Return_Stmt_F_Decl
     (Node : Bare_Extended_Return_Stmt) return Bare_Extended_Return_Stmt_Object_Decl
   is
   begin
         return Node.Extended_Return_Stmt_F_Decl;
   end;
   function Extended_Return_Stmt_F_Stmts
     (Node : Bare_Extended_Return_Stmt) return Bare_Handled_Stmts
   is
   begin
         return Node.Extended_Return_Stmt_F_Stmts;
   end;
--# property-start ExtendedReturnStmt.xref_equation ada/nodes.lkt:21901
pragma Warnings (Off, "is not referenced");
 function Extended_Return_Stmt_P_Xref_Equation
  (Node : Bare_Extended_Return_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Extended_Return_Stmt  := Bare_Extended_Return_Stmt (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1396 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1396 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1396;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21901:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1396;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1396;
            raise;
      end;
   return Property_Result;
end Extended_Return_Stmt_P_Xref_Equation;
--# end
--# property-start ExtendedReturnStmt._env_trans_parent_222 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_222
  (Node : Bare_Extended_Return_Stmt
  )
   return Boolean
is
   Self : Bare_Extended_Return_Stmt  := Bare_Extended_Return_Stmt (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_222;
--# end
   --
   --  Primitives for Bare_If_Stmt
   --
      procedure Initialize_Fields_For_If_Stmt
        (Self : Bare_If_Stmt
         ; If_Stmt_F_Cond_Expr : Bare_Expr
         ; If_Stmt_F_Then_Stmts : Bare_Stmt_List
         ; If_Stmt_F_Alternatives : Bare_Elsif_Stmt_Part_List
         ; If_Stmt_F_Else_Stmts : Bare_Stmt_List
        ) is
      begin
            Self.If_Stmt_F_Cond_Expr := If_Stmt_F_Cond_Expr;
            Self.If_Stmt_F_Then_Stmts := If_Stmt_F_Then_Stmts;
            Self.If_Stmt_F_Alternatives := If_Stmt_F_Alternatives;
            Self.If_Stmt_F_Else_Stmts := If_Stmt_F_Else_Stmts;
      end Initialize_Fields_For_If_Stmt;
   function If_Stmt_F_Cond_Expr
     (Node : Bare_If_Stmt) return Bare_Expr
   is
   begin
         return Node.If_Stmt_F_Cond_Expr;
   end;
   function If_Stmt_F_Then_Stmts
     (Node : Bare_If_Stmt) return Bare_Stmt_List
   is
   begin
         return Node.If_Stmt_F_Then_Stmts;
   end;
   function If_Stmt_F_Alternatives
     (Node : Bare_If_Stmt) return Bare_Elsif_Stmt_Part_List
   is
   begin
         return Node.If_Stmt_F_Alternatives;
   end;
   function If_Stmt_F_Else_Stmts
     (Node : Bare_If_Stmt) return Bare_Stmt_List
   is
   begin
         return Node.If_Stmt_F_Else_Stmts;
   end;
--# property-start IfStmt.xref_equation ada/nodes.lkt:21920
pragma Warnings (Off, "is not referenced");
 function If_Stmt_P_Xref_Equation
  (Node : Bare_If_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_If_Stmt  := Bare_If_Stmt (Node);
     Ent : Internal_Entity_If_Stmt :=
       Internal_Entity_If_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1397 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1397 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1397;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12565 '<LogicBinaryOp And at nodes.lkt:21921:9>' And_Pred ada/nodes.lkt:21921
--# expr-start 12562 '<FieldAccess for sub_equation at nodes.lkt:21921:9>' Fld_1 ada/nodes.lkt:21921
--# expr-start 12561 '<FieldAccess for cond_expr at nodes.lkt:21921:9>' Fld ada/nodes.lkt:21921
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.If_Stmt_F_Cond_Expr, Info => Ent.Info);
--# expr-done 12561
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12562
--# expr-start 12564 '<FieldAccess for expect_bool_derived_type at nodes.lkt:21922:14>' Fld_3 ada/nodes.lkt:21922
--# expr-start 12563 '<FieldAccess for cond_expr at nodes.lkt:21922:14>' Fld_2 ada/nodes.lkt:21922
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.If_Stmt_F_Cond_Expr;
--# expr-done 12563
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_3 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Fld_2, Origin => Origin);
--# end
--# expr-done 12564
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21921:9") else null)); 
--# expr-done 12565
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1397;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1397;
            raise;
      end;
   return Property_Result;
end If_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Named_Stmt
   --
      procedure Named_Stmt_Pre_Env_Actions
        (Self            : Bare_Named_Stmt;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Resolver : constant Entity_Resolver :=
            null;
         Mapping : Internal_Env_Assoc :=
            Libadalang.Implementation.Env_Mappings_223 (Node => 
Self);
      begin
         Add_To_Env
           (Self,
            State,
            Mapping.Key,
            Mapping.Value,
            Mapping.Metadata,
            Resolver,
            Mapping.Dest_Env,
            DSL_Location => "nodes.lkt:21938:9");
         Dec_Ref (Mapping.Dest_Env);
      end;
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_224 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Named_Stmt
        (Self : Bare_Named_Stmt
         ; Named_Stmt_F_Decl : Bare_Named_Stmt_Decl
         ; Named_Stmt_F_Stmt : Bare_Composite_Stmt
        ) is
      begin
            Self.Named_Stmt_F_Decl := Named_Stmt_F_Decl;
            Self.Named_Stmt_F_Stmt := Named_Stmt_F_Stmt;
      end Initialize_Fields_For_Named_Stmt;
   function Named_Stmt_F_Decl
     (Node : Bare_Named_Stmt) return Bare_Named_Stmt_Decl
   is
   begin
         return Node.Named_Stmt_F_Decl;
   end;
   function Named_Stmt_F_Stmt
     (Node : Bare_Named_Stmt) return Bare_Composite_Stmt
   is
   begin
         return Node.Named_Stmt_F_Stmt;
   end;
--# property-start NamedStmt.xref_equation ada/nodes.lkt:21935
pragma Warnings (Off, "is not referenced");
 function Named_Stmt_P_Xref_Equation
  (Node : Bare_Named_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Named_Stmt  := Bare_Named_Stmt (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1398 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1398 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1398;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21935:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1398;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1398;
            raise;
      end;
   return Property_Result;
end Named_Stmt_P_Xref_Equation;
--# end
--# property-start NamedStmt._env_mappings_223 ada/nodes.lkt:21938
pragma Warnings (Off, "is not referenced");
 function Env_Mappings_223
  (Node : Bare_Named_Stmt
  )
   return Internal_Env_Assoc
is
   Self : Bare_Named_Stmt  := Bare_Named_Stmt (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc;
            procedure Finalizer_Scope_1887 with Inline_Always;
      Fld : Bare_Named_Stmt_Decl;
Fld_1 : Symbol_Type;
Fld_2 : Bare_Named_Stmt_Decl;
New_Struct : Internal_Designated_Env := No_Designated_Env;
Cast_Result : Bare_Ada_Node;
New_Struct_1 : Internal_Env_Assoc := No_Env_Assoc;
            procedure Finalizer_Scope_1887 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
            end Finalizer_Scope_1887;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12570 '<New EnvAssoc at ???>' New_Struct_1 None
--# expr-start 12566 '<New DesignatedEnv at ???>' New_Struct None
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 12566
--# expr-start 12568 '<FieldAccess for name_symbol at nodes.lkt:21938:23>' Fld_1 ada/nodes.lkt:21938
--# expr-start 12567 '<FieldAccess for decl at nodes.lkt:21938:23>' Fld ada/nodes.lkt:21938
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Named_Stmt_F_Decl;
--# expr-done 12567
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.name_symbol
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Name_Symbol (Node => Fld);
--# end
--# expr-done 12568
--# expr-start 12569 '<FieldAccess for decl at nodes.lkt:21938:48>' Fld_2 ada/nodes.lkt:21938
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Named_Stmt_F_Decl;
--# expr-done 12569
      Cast_Result := Fld_2;
Inc_Ref (New_Struct);
New_Struct_1 := (Dest_Env => New_Struct, Key => Fld_1, Metadata => No_Metadata, Value => Cast_Result); 
--# expr-done 12570
         Property_Result := New_Struct_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1887;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1887;
            raise;
      end;
   return Property_Result;
end Env_Mappings_223;
--# end
--# property-start NamedStmt._env_trans_parent_224 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_224
  (Node : Bare_Named_Stmt
  )
   return Boolean
is
   Self : Bare_Named_Stmt  := Bare_Named_Stmt (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_224;
--# end
   --
   --  Primitives for Bare_Select_Stmt
   --
      procedure Initialize_Fields_For_Select_Stmt
        (Self : Bare_Select_Stmt
         ; Select_Stmt_F_Guards : Bare_Select_When_Part_List
         ; Select_Stmt_F_Else_Stmts : Bare_Stmt_List
         ; Select_Stmt_F_Abort_Stmts : Bare_Stmt_List
        ) is
      begin
            Self.Select_Stmt_F_Guards := Select_Stmt_F_Guards;
            Self.Select_Stmt_F_Else_Stmts := Select_Stmt_F_Else_Stmts;
            Self.Select_Stmt_F_Abort_Stmts := Select_Stmt_F_Abort_Stmts;
      end Initialize_Fields_For_Select_Stmt;
   function Select_Stmt_F_Guards
     (Node : Bare_Select_Stmt) return Bare_Select_When_Part_List
   is
   begin
         return Node.Select_Stmt_F_Guards;
   end;
   function Select_Stmt_F_Else_Stmts
     (Node : Bare_Select_Stmt) return Bare_Stmt_List
   is
   begin
         return Node.Select_Stmt_F_Else_Stmts;
   end;
   function Select_Stmt_F_Abort_Stmts
     (Node : Bare_Select_Stmt) return Bare_Stmt_List
   is
   begin
         return Node.Select_Stmt_F_Abort_Stmts;
   end;
--# property-start SelectStmt.xref_equation ada/nodes.lkt:21953
pragma Warnings (Off, "is not referenced");
 function Select_Stmt_P_Xref_Equation
  (Node : Bare_Select_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Select_Stmt  := Bare_Select_Stmt (Node);
     Ent : Internal_Entity_Select_Stmt :=
       Internal_Entity_Select_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1399 with Inline_Always;
            procedure Finalizer_Scope_3550 with Inline_Always;
      Fld : Internal_Entity_Select_When_Part_List;
Fld_1 : Bare_Select_When_Part_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Select_When_Part;
Bare_Item_0 : Bare_Select_When_Part;
Fld_3 : Logic_Equation;
As_Entity : Internal_Entity_Select_When_Part;
Is_Null : Boolean;
If_Result : Internal_Entity_Select_When_Part;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1399 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1399;
            procedure Finalizer_Scope_3550 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3550;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12574 '<LogicAll at nodes.lkt:21954:9>' Logic_Boolean_Op ada/nodes.lkt:21954
--# expr-start 12573 '<Map at nodes.lkt:21954:9>' Map_Result ada/nodes.lkt:21954
   --# expr-start 12571 '<FieldAccess for guards at nodes.lkt:21954:9>' Fld ada/nodes.lkt:21954
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Select_When_Part_List (Node => Ent.Node.Select_Stmt_F_Guards, Info => Ent.Info);
--# expr-done 12571
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Select_When_Part_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Select_When_Part;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind wp Item_0
      --# expr-start 12572 '<FieldAccess for sub_equation at nodes.lkt:21954:39>' Fld_3 ada/nodes.lkt:21954
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 12572
         declare
            Item_To_Append : constant Logic_Equation := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3550;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 12573
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21954:9") else null)); 
--# expr-done 12574
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1399;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1399;
                     Finalizer_Scope_3550;
            raise;
      end;
   return Property_Result;
end Select_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Error_Stmt
   --
   --
   --  Primitives for Bare_Simple_Stmt
   --
   --
   --  Primitives for Bare_Abort_Stmt
   --
      procedure Initialize_Fields_For_Abort_Stmt
        (Self : Bare_Abort_Stmt
         ; Abort_Stmt_F_Names : Bare_Name_List
        ) is
      begin
            Self.Abort_Stmt_F_Names := Abort_Stmt_F_Names;
      end Initialize_Fields_For_Abort_Stmt;
   function Abort_Stmt_F_Names
     (Node : Bare_Abort_Stmt) return Bare_Name_List
   is
   begin
         return Node.Abort_Stmt_F_Names;
   end;
--# property-start AbortStmt.xref_equation ada/nodes.lkt:21972
pragma Warnings (Off, "is not referenced");
 function Abort_Stmt_P_Xref_Equation
  (Node : Bare_Abort_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Abort_Stmt  := Bare_Abort_Stmt (Node);
     Ent : Internal_Entity_Abort_Stmt :=
       Internal_Entity_Abort_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1400 with Inline_Always;
            procedure Finalizer_Scope_3551 with Inline_Always;
      Fld : Internal_Entity_Name_List;
Fld_1 : Bare_Name_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Logic_Equation;
Fld_4 : Logic_Var;
Pred : Logic_Equation;
And_Pred : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1400 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1400;
            procedure Finalizer_Scope_3551 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Pred);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3551;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12581 '<LogicAll at nodes.lkt:21973:9>' Logic_Boolean_Op ada/nodes.lkt:21973
--# expr-start 12580 '<Map at nodes.lkt:21973:9>' Map_Result ada/nodes.lkt:21973
   --# expr-start 12575 '<FieldAccess for names at nodes.lkt:21973:9>' Fld ada/nodes.lkt:21973
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name_List (Node => Ent.Node.Abort_Stmt_F_Names, Info => Ent.Info);
--# expr-done 12575
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind name Item_0
      --# expr-start 12579 '<LogicBinaryOp And at nodes.lkt:21975:13>' And_Pred ada/nodes.lkt:21975
--# expr-start 12576 '<FieldAccess for sub_equation at nodes.lkt:21975:13>' Fld_3 ada/nodes.lkt:21975
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 12576
--# expr-start 12578 '<Predicate on BaseTypeDecl.is_task_type at nodes.lkt:21976:18>' Pred ada/nodes.lkt:21976
--# expr-start 12577 '<FieldAccess for type_var at nodes.lkt:21976:45>' Fld_4 ada/nodes.lkt:21976
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Item_0.Node);
--# expr-done 12577
Fld_4.Value := No_Entity;
Entity_Vars.Reset (Fld_4);
Pred := Solver.Create_Predicate (Fld_4, Create_Base_Type_Decl_P_Is_Task_Type_0_Predicate); 
--# expr-done 12578
And_Pred := Create_And (Fld_3, Pred, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21975:13") else null)); 
--# expr-done 12579
         declare
            Item_To_Append : constant Logic_Equation := And_Pred;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3551;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 12580
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21973:9") else null)); 
--# expr-done 12581
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1400;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1400;
                     Finalizer_Scope_3551;
            raise;
      end;
   return Property_Result;
end Abort_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Assign_Stmt
   --
      procedure Initialize_Fields_For_Assign_Stmt
        (Self : Bare_Assign_Stmt
         ; Assign_Stmt_F_Dest : Bare_Name
         ; Assign_Stmt_F_Expr : Bare_Expr
        ) is
      begin
            Self.Assign_Stmt_F_Dest := Assign_Stmt_F_Dest;
            Self.Assign_Stmt_F_Expr := Assign_Stmt_F_Expr;
      end Initialize_Fields_For_Assign_Stmt;
   function Assign_Stmt_F_Dest
     (Node : Bare_Assign_Stmt) return Bare_Name
   is
   begin
         return Node.Assign_Stmt_F_Dest;
   end;
   function Assign_Stmt_F_Expr
     (Node : Bare_Assign_Stmt) return Bare_Expr
   is
   begin
         return Node.Assign_Stmt_F_Expr;
   end;
--# property-start AssignStmt.complete_item_weight ada/nodes.lkt:21988
pragma Warnings (Off, "is not referenced");
 function Assign_Stmt_P_Complete_Item_Weight
  (Node : Bare_Assign_Stmt
      ; Item : Internal_Entity_Basic_Decl
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Assign_Stmt  := Bare_Assign_Stmt (Node);
     Ent : Internal_Entity_Assign_Stmt :=
       Internal_Entity_Assign_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind item Item
   --# bind origin Origin
   Property_Result : Integer;
      Fld : Internal_Entity_Name;
Fld_1 : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12583 '<FieldAccess for complete_item_weight_matching_type at nodes.lkt:21989:9>' Fld_1 ada/nodes.lkt:21989
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12582 '<FieldAccess for dest at nodes.lkt:21989:55>' Fld ada/nodes.lkt:21989
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Assign_Stmt_F_Dest, Info => Ent.Info);
--# expr-done 12582
--# property-call-start AdaNode.complete_item_weight_matching_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Complete_Item_Weight_Matching_Type (Node => Self, Item => Item, Name => Fld, Origin => Origin);
--# end
--# expr-done 12583
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Assign_Stmt_P_Complete_Item_Weight;
--# end
--# property-start AssignStmt.xref_equation ada/nodes.lkt:21992
pragma Warnings (Off, "is not referenced");
 function Assign_Stmt_P_Xref_Equation
  (Node : Bare_Assign_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Assign_Stmt  := Bare_Assign_Stmt (Node);
     Ent : Internal_Entity_Assign_Stmt :=
       Internal_Entity_Assign_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1402 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Fld_4 : Bare_Name;
Fld_5 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_6 : Internal_Entity_Expr;
Fld_7 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_8 : Bare_Expr;
Fld_9 : Logic_Equation;
And_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_1402 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_1402;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12597 '<LogicBinaryOp And at nodes.lkt:21993:9>' And_Pred_2 ada/nodes.lkt:21993
--# expr-start 12594 '<LogicBinaryOp And at nodes.lkt:21994:13>' And_Pred_1 ada/nodes.lkt:21994
--# expr-start 12591 '<LogicBinaryOp And at nodes.lkt:21995:17>' And_Pred ada/nodes.lkt:21995
--# expr-start 12585 '<FieldAccess for sub_equation at nodes.lkt:21995:17>' Fld_1 ada/nodes.lkt:21995
--# expr-start 12584 '<FieldAccess for dest at nodes.lkt:21995:17>' Fld ada/nodes.lkt:21995
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Assign_Stmt_F_Dest, Info => Ent.Info);
--# expr-done 12584
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12585
--# expr-start 12590 '<NPropagate at nodes.lkt:21996:22>' Bind_Result ada/nodes.lkt:21996
--# expr-start 12587 '<FieldAccess for type_var at nodes.lkt:21997:47>' Fld_5 ada/nodes.lkt:21997
--# expr-start 12586 '<FieldAccess for dest at nodes.lkt:21997:47>' Fld_4 ada/nodes.lkt:21997
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Assign_Stmt_F_Dest;
--# expr-done 12586
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_4);
--# expr-done 12587
Fld_5.Value := No_Entity;
Entity_Vars.Reset (Fld_5);
--# expr-start 12589 '<FieldAccess for expected_type_var at nodes.lkt:21996:22>' Fld_3 ada/nodes.lkt:21996
--# expr-start 12588 '<FieldAccess for expr at nodes.lkt:21996:22>' Fld_2 ada/nodes.lkt:21996
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Assign_Stmt_F_Expr;
--# expr-done 12588
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2);
--# expr-done 12589
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Bind_Result := Solver.Create_Propagate (Fld_5, Fld_3, Logic_Functor_867'(Ref_Count => 1, Cache_Set => False, Cache_Key => <>, Cache_Value => <>, Origin => Origin), Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21996:22") else null)); 
--# expr-done 12590
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21995:17") else null)); 
--# expr-done 12591
--# expr-start 12593 '<FieldAccess for sub_equation at nodes.lkt:21999:18>' Fld_7 ada/nodes.lkt:21999
--# expr-start 12592 '<FieldAccess for expr at nodes.lkt:21999:18>' Fld_6 ada/nodes.lkt:21999
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Expr (Node => Ent.Node.Assign_Stmt_F_Expr, Info => Ent.Info);
--# expr-done 12592
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_7 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_6.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_6.Info);
--# end
--# expr-done 12593
And_Pred_1 := Create_And (And_Pred, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21994:13") else null)); 
--# expr-done 12594
--# expr-start 12596 '<FieldAccess for matches_expected_assign_type at nodes.lkt:22001:14>' Fld_9 ada/nodes.lkt:22001
--# expr-start 12595 '<FieldAccess for expr at nodes.lkt:22001:14>' Fld_8 ada/nodes.lkt:22001
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Self.Assign_Stmt_F_Expr;
--# expr-done 12595
      if Fld_8 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_9 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Fld_8, Origin => Origin);
--# end
--# expr-done 12596
And_Pred_2 := Create_And (And_Pred_1, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:21993:9") else null)); 
--# expr-done 12597
         Property_Result := And_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1402;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1402;
            raise;
      end;
   return Property_Result;
end Assign_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Call_Stmt
   --
      procedure Initialize_Fields_For_Call_Stmt
        (Self : Bare_Call_Stmt
         ; Call_Stmt_F_Call : Bare_Name
        ) is
      begin
            Self.Call_Stmt_F_Call := Call_Stmt_F_Call;
      end Initialize_Fields_For_Call_Stmt;
   function Call_Stmt_F_Call
     (Node : Bare_Call_Stmt) return Bare_Name
   is
   begin
         return Node.Call_Stmt_F_Call;
   end;
--# property-start CallStmt.xref_equation ada/nodes.lkt:22010
pragma Warnings (Off, "is not referenced");
 function Call_Stmt_P_Xref_Equation
  (Node : Bare_Call_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Call_Stmt  := Bare_Call_Stmt (Node);
     Ent : Internal_Entity_Call_Stmt :=
       Internal_Entity_Call_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1403 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Bare_Name;
Fld_3 : Logic_Var;
Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1403 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1403;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12603 '<LogicBinaryOp And at nodes.lkt:22011:9>' And_Pred ada/nodes.lkt:22011
--# expr-start 12599 '<FieldAccess for sub_equation at nodes.lkt:22011:9>' Fld_1 ada/nodes.lkt:22011
--# expr-start 12598 '<FieldAccess for call at nodes.lkt:22011:9>' Fld ada/nodes.lkt:22011
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Call_Stmt_F_Call, Info => Ent.Info);
--# expr-done 12598
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12599
--# expr-start 12602 '<Bind at nodes.lkt:22013:14>' Bind_Result ada/nodes.lkt:22013
--# expr-start 12601 '<FieldAccess for type_var at nodes.lkt:22013:14>' Fld_3 ada/nodes.lkt:22013
--# expr-start 12600 '<FieldAccess for call at nodes.lkt:22013:14>' Fld_2 ada/nodes.lkt:22013
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Call_Stmt_F_Call;
--# expr-done 12600
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Type_Var (Node => Fld_2);
--# expr-done 12601
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
Bind_Result := Solver.Create_Assign (Fld_3, No_Entity, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22013:14") else null)); 
--# expr-done 12602
And_Pred := Create_And (Fld_1, Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22011:9") else null)); 
--# expr-done 12603
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1403;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1403;
            raise;
      end;
   return Property_Result;
end Call_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Delay_Stmt
   --
      procedure Initialize_Fields_For_Delay_Stmt
        (Self : Bare_Delay_Stmt
         ; Delay_Stmt_F_Has_Until : Bare_Until_Node
         ; Delay_Stmt_F_Expr : Bare_Expr
        ) is
      begin
            Self.Delay_Stmt_F_Has_Until := Delay_Stmt_F_Has_Until;
            Self.Delay_Stmt_F_Expr := Delay_Stmt_F_Expr;
      end Initialize_Fields_For_Delay_Stmt;
   function Delay_Stmt_F_Has_Until
     (Node : Bare_Delay_Stmt) return Bare_Until_Node
   is
   begin
         return Node.Delay_Stmt_F_Has_Until;
   end;
   function Delay_Stmt_F_Expr
     (Node : Bare_Delay_Stmt) return Bare_Expr
   is
   begin
         return Node.Delay_Stmt_F_Expr;
   end;
--# property-start DelayStmt.xref_equation ada/nodes.lkt:22024
pragma Warnings (Off, "is not referenced");
 function Delay_Stmt_P_Xref_Equation
  (Node : Bare_Delay_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Delay_Stmt  := Bare_Delay_Stmt (Node);
     Ent : Internal_Entity_Delay_Stmt :=
       Internal_Entity_Delay_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1404 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_2 : Bare_Expr;
Fld_3 : Logic_Var;
Sym : Symbol_Type;
Fld_4 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_7 : Bare_Until_Node;
Fld_8 : Boolean;
If_Result : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1404 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1404;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12617 '<LogicBinaryOp And at nodes.lkt:22025:9>' And_Pred_1 ada/nodes.lkt:22025
--# expr-start 12605 '<FieldAccess for sub_equation at nodes.lkt:22025:9>' Fld_1 ada/nodes.lkt:22025
--# expr-start 12604 '<FieldAccess for expr at nodes.lkt:22025:9>' Fld ada/nodes.lkt:22025
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Delay_Stmt_F_Expr, Info => Ent.Info);
--# expr-done 12604
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12605
--# expr-start 12616 '<If at nodes.lkt:22026:14>' If_Result ada/nodes.lkt:22026
--# expr-start 12607 '<FieldAccess for as_bool at nodes.lkt:22026:17>' Fld_8 ada/nodes.lkt:22026
--# expr-start 12606 '<FieldAccess for has_until at nodes.lkt:22026:17>' Fld_7 ada/nodes.lkt:22026
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Self.Delay_Stmt_F_Has_Until;
--# expr-done 12606
      if Fld_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Until.as_bool'
Fld_8 := Libadalang.Implementation.Dispatcher_Until_Node_P_As_Bool (Node => Fld_7);
--# end
--# expr-done 12607
if Fld_8 then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22026:47") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 12615 '<LogicBinaryOp And at nodes.lkt:22028:13>' And_Pred ada/nodes.lkt:22028
--# expr-start 12612 '<Bind at nodes.lkt:22028:13>' Bind_Result ada/nodes.lkt:22028
--# expr-start 12609 '<FieldAccess for expected_type_var at nodes.lkt:22028:13>' Fld_3 ada/nodes.lkt:22028
--# expr-start 12608 '<FieldAccess for expr at nodes.lkt:22028:13>' Fld_2 ada/nodes.lkt:22028
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Delay_Stmt_F_Expr;
--# expr-done 12608
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_2);
--# expr-done 12609
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 12611 '<FieldAccess for std_entity at nodes.lkt:22028:46>' Fld_4 ada/nodes.lkt:22028
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12610 '<Symbol Duration at nodes.lkt:22028:62>' Sym ada/nodes.lkt:22028
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Duration); 
--# expr-done 12610
--# property-call-start AdaNode.std_entity
Fld_4 := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym);
--# end
--# expr-done 12611
Bind_Result := Solver.Create_Assign (Fld_3, Fld_4, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22028:13") else null)); 
--# expr-done 12612
--# expr-start 12614 '<FieldAccess for matches_expected_type at nodes.lkt:22029:18>' Fld_6 ada/nodes.lkt:22029
--# expr-start 12613 '<FieldAccess for expr at nodes.lkt:22029:18>' Fld_5 ada/nodes.lkt:22029
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Delay_Stmt_F_Expr, Info => Ent.Info);
--# expr-done 12613
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 12614
And_Pred := Create_And (Bind_Result, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22028:13") else null)); 
--# expr-done 12615
   If_Result := And_Pred;
end if;
      Inc_Ref (If_Result);
--# expr-done 12616
And_Pred_1 := Create_And (Fld_1, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22025:9") else null)); 
--# expr-done 12617
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1404;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1404;
            raise;
      end;
   return Property_Result;
end Delay_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Exit_Stmt
   --
      procedure Initialize_Fields_For_Exit_Stmt
        (Self : Bare_Exit_Stmt
         ; Exit_Stmt_F_Loop_Name : Bare_Name
         ; Exit_Stmt_F_Cond_Expr : Bare_Expr
        ) is
      begin
            Self.Exit_Stmt_F_Loop_Name := Exit_Stmt_F_Loop_Name;
            Self.Exit_Stmt_F_Cond_Expr := Exit_Stmt_F_Cond_Expr;
      end Initialize_Fields_For_Exit_Stmt;
   function Exit_Stmt_F_Loop_Name
     (Node : Bare_Exit_Stmt) return Bare_Name
   is
   begin
         return Node.Exit_Stmt_F_Loop_Name;
   end;
   function Exit_Stmt_F_Cond_Expr
     (Node : Bare_Exit_Stmt) return Bare_Expr
   is
   begin
         return Node.Exit_Stmt_F_Cond_Expr;
   end;
--# property-start ExitStmt.xref_equation ada/nodes.lkt:22042
pragma Warnings (Off, "is not referenced");
 function Exit_Stmt_P_Xref_Equation
  (Node : Bare_Exit_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Exit_Stmt  := Bare_Exit_Stmt (Node);
     Ent : Internal_Entity_Exit_Stmt :=
       Internal_Entity_Exit_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1405 with Inline_Always;
            procedure Finalizer_Scope_3552 with Inline_Always;
            procedure Finalizer_Scope_3553 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Var_Expr_1 : Internal_Entity_Name;
Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
Fld_2 : Logic_Equation;
And_Pred : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Fld_3 : Internal_Entity_Name;
Fld_4 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1405 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1405;
            procedure Finalizer_Scope_3552 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3552;
            procedure Finalizer_Scope_3553 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3553;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12624 '<LogicBinaryOp And at nodes.lkt:22043:9>' And_Pred_1 ada/nodes.lkt:22043
--# expr-start 12618 '<FieldAccess for cond_expr at nodes.lkt:22043:9>' Fld ada/nodes.lkt:22043
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Exit_Stmt_F_Cond_Expr, Info => Ent.Info);
--# expr-done 12618
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind cond Var_Expr_0
--# expr-start 12621 '<LogicBinaryOp And at nodes.lkt:22044:23>' And_Pred ada/nodes.lkt:22044
--# expr-start 12619 '<FieldAccess for sub_equation at nodes.lkt:22044:23>' Fld_1 ada/nodes.lkt:22044
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 12619
--# expr-start 12620 '<FieldAccess for expect_bool_derived_type at nodes.lkt:22044:48>' Fld_2 ada/nodes.lkt:22044
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.expect_bool_derived_type
Fld_2 := Libadalang.Implementation.Expr_P_Expect_Bool_Derived_Type (Node => Var_Expr_0.Node, Origin => Origin);
--# end
--# expr-done 12620
And_Pred := Create_And (Fld_1, Fld_2, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22044:23") else null)); 
--# expr-done 12621
Scope_Result := And_Pred;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3552;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22045:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
--# expr-start 12622 '<FieldAccess for loop_name at nodes.lkt:22047:14>' Fld_3 ada/nodes.lkt:22047
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Ent.Node.Exit_Stmt_F_Loop_Name, Info => Ent.Info);
--# expr-done 12622
Var_Expr_1 := Fld_3;
if Var_Expr_1 /= No_Entity_Name then
   --# scope-start
   --# bind ln Var_Expr_1
--# expr-start 12623 '<FieldAccess for xref_no_overloading at nodes.lkt:22048:21>' Fld_4 ada/nodes.lkt:22048
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_4 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Var_Expr_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 12623
Scope_Result_1 := Fld_4;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3553;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22049:25") else null)); 
   Result_Var_1 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
And_Pred_1 := Create_And (Result_Var, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22043:9") else null)); 
--# expr-done 12624
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1405;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1405;
                     Finalizer_Scope_3552;
                     Finalizer_Scope_3553;
            raise;
      end;
   return Property_Result;
end Exit_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Goto_Stmt
   --
      procedure Initialize_Fields_For_Goto_Stmt
        (Self : Bare_Goto_Stmt
         ; Goto_Stmt_F_Label_Name : Bare_Name
        ) is
      begin
            Self.Goto_Stmt_F_Label_Name := Goto_Stmt_F_Label_Name;
      end Initialize_Fields_For_Goto_Stmt;
   function Goto_Stmt_F_Label_Name
     (Node : Bare_Goto_Stmt) return Bare_Name
   is
   begin
         return Node.Goto_Stmt_F_Label_Name;
   end;
--# property-start GotoStmt.xref_equation ada/nodes.lkt:22059
pragma Warnings (Off, "is not referenced");
 function Goto_Stmt_P_Xref_Equation
  (Node : Bare_Goto_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Goto_Stmt  := Bare_Goto_Stmt (Node);
     Ent : Internal_Entity_Goto_Stmt :=
       Internal_Entity_Goto_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1406 with Inline_Always;
      Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1406 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1406;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12626 '<FieldAccess for xref_no_overloading at nodes.lkt:22060:9>' Fld_1 ada/nodes.lkt:22060
--# expr-start 12625 '<FieldAccess for label_name at nodes.lkt:22060:9>' Fld ada/nodes.lkt:22060
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Goto_Stmt_F_Label_Name, Info => Ent.Info);
--# expr-done 12625
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_1 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld.Node, Sequential => False, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 12626
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1406;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1406;
            raise;
      end;
   return Property_Result;
end Goto_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Label
   --
      procedure Initialize_Fields_For_Label
        (Self : Bare_Label
         ; Label_F_Decl : Bare_Label_Decl
        ) is
      begin
            Self.Label_F_Decl := Label_F_Decl;
      end Initialize_Fields_For_Label;
   function Label_F_Decl
     (Node : Bare_Label) return Bare_Label_Decl
   is
   begin
         return Node.Label_F_Decl;
   end;
--# property-start Label.xref_equation ada/nodes.lkt:22069
pragma Warnings (Off, "is not referenced");
 function Label_P_Xref_Equation
  (Node : Bare_Label
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Label  := Bare_Label (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1407 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1407 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1407;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22069:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1407;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1407;
            raise;
      end;
   return Property_Result;
end Label_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Null_Stmt
   --
--# property-start NullStmt.xref_equation ada/nodes.lkt:22075
pragma Warnings (Off, "is not referenced");
 function Null_Stmt_P_Xref_Equation
  (Node : Bare_Null_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Null_Stmt  := Bare_Null_Stmt (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1408 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1408 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1408;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22075:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1408;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1408;
            raise;
      end;
   return Property_Result;
end Null_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Raise_Stmt
   --
      procedure Initialize_Fields_For_Raise_Stmt
        (Self : Bare_Raise_Stmt
         ; Raise_Stmt_F_Exception_Name : Bare_Name
         ; Raise_Stmt_F_Error_Message : Bare_Expr
        ) is
      begin
            Self.Raise_Stmt_F_Exception_Name := Raise_Stmt_F_Exception_Name;
            Self.Raise_Stmt_F_Error_Message := Raise_Stmt_F_Error_Message;
      end Initialize_Fields_For_Raise_Stmt;
   function Raise_Stmt_F_Exception_Name
     (Node : Bare_Raise_Stmt) return Bare_Name
   is
   begin
         return Node.Raise_Stmt_F_Exception_Name;
   end;
   function Raise_Stmt_F_Error_Message
     (Node : Bare_Raise_Stmt) return Bare_Expr
   is
   begin
         return Node.Raise_Stmt_F_Error_Message;
   end;
--# property-start RaiseStmt.xref_equation ada/nodes.lkt:22088
pragma Warnings (Off, "is not referenced");
 function Raise_Stmt_P_Xref_Equation
  (Node : Bare_Raise_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Raise_Stmt  := Bare_Raise_Stmt (Node);
     Ent : Internal_Entity_Raise_Stmt :=
       Internal_Entity_Raise_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1409 with Inline_Always;
            procedure Finalizer_Scope_3554 with Inline_Always;
            procedure Finalizer_Scope_3555 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Name;
Var_Expr_1 : Internal_Entity_Expr;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Logic_Var;
Fld_4 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_5 : Logic_Equation;
And_Pred : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred_1 : Logic_Equation;
            procedure Finalizer_Scope_1409 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_1409;
            procedure Finalizer_Scope_3554 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3554;
            procedure Finalizer_Scope_3555 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_5);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3555;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12635 '<LogicBinaryOp And at nodes.lkt:22089:9>' And_Pred_1 ada/nodes.lkt:22089
--# expr-start 12627 '<FieldAccess for exception_name at nodes.lkt:22089:9>' Fld ada/nodes.lkt:22089
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Raise_Stmt_F_Exception_Name, Info => Ent.Info);
--# expr-done 12627
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Name then
   --# scope-start
   --# bind en Var_Expr_0
--# expr-start 12628 '<FieldAccess for sub_equation at nodes.lkt:22089:40>' Fld_1 ada/nodes.lkt:22089
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 12628
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3554;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22089:71") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
--# expr-start 12629 '<FieldAccess for error_message at nodes.lkt:22090:14>' Fld_2 ada/nodes.lkt:22090
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Ent.Node.Raise_Stmt_F_Error_Message, Info => Ent.Info);
--# expr-done 12629
Var_Expr_1 := Fld_2;
if Var_Expr_1 /= No_Entity_Expr then
   --# scope-start
   --# bind er Var_Expr_1
--# expr-start 12634 '<LogicBinaryOp And at nodes.lkt:22092:13>' And_Pred ada/nodes.lkt:22092
--# expr-start 12632 '<Bind at nodes.lkt:22095:17>' Bind_Result ada/nodes.lkt:22095
--# expr-start 12630 '<FieldAccess for expected_type_var at nodes.lkt:22095:17>' Fld_3 ada/nodes.lkt:22095
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_1.Node);
--# expr-done 12630
Fld_3.Value := No_Entity;
Entity_Vars.Reset (Fld_3);
--# expr-start 12631 '<FieldAccess for std_string_type at nodes.lkt:22095:43>' Fld_4 ada/nodes.lkt:22095
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_string_type
Fld_4 := Libadalang.Implementation.Ada_Node_P_Std_String_Type (Node => Self);
--# end
--# expr-done 12631
      Cast_Result := Create_Internal_Entity
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
Bind_Result := Solver.Create_Assign (Fld_3, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22095:17") else null)); 
--# expr-done 12632
--# expr-start 12633 '<FieldAccess for sub_equation at nodes.lkt:22097:18>' Fld_5 ada/nodes.lkt:22097
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_1.Info);
--# end
--# expr-done 12633
And_Pred := Create_And (Bind_Result, Fld_5, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22092:13") else null)); 
--# expr-done 12634
Scope_Result_1 := And_Pred;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3555;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22098:25") else null)); 
   Result_Var_1 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_1);
And_Pred_1 := Create_And (Result_Var, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22089:9") else null)); 
--# expr-done 12635
         Property_Result := And_Pred_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1409;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1409;
                     Finalizer_Scope_3554;
                     Finalizer_Scope_3555;
            raise;
      end;
   return Property_Result;
end Raise_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Requeue_Stmt
   --
      procedure Initialize_Fields_For_Requeue_Stmt
        (Self : Bare_Requeue_Stmt
         ; Requeue_Stmt_F_Call_Name : Bare_Name
         ; Requeue_Stmt_F_Has_Abort : Bare_Abort_Node
        ) is
      begin
            Self.Requeue_Stmt_F_Call_Name := Requeue_Stmt_F_Call_Name;
            Self.Requeue_Stmt_F_Has_Abort := Requeue_Stmt_F_Has_Abort;
      end Initialize_Fields_For_Requeue_Stmt;
   function Requeue_Stmt_F_Call_Name
     (Node : Bare_Requeue_Stmt) return Bare_Name
   is
   begin
         return Node.Requeue_Stmt_F_Call_Name;
   end;
   function Requeue_Stmt_F_Has_Abort
     (Node : Bare_Requeue_Stmt) return Bare_Abort_Node
   is
   begin
         return Node.Requeue_Stmt_F_Has_Abort;
   end;
--# property-start RequeueStmt.innermost_entry_or_accept_stmt_params ada/nodes.lkt:22109
pragma Warnings (Off, "is not referenced");
 function Requeue_Stmt_P_Innermost_Entry_Or_Accept_Stmt_Params
  (Node : Bare_Requeue_Stmt
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Holder
is
   Self : Bare_Requeue_Stmt  := Bare_Requeue_Stmt (Node);
     Ent : Internal_Entity_Requeue_Stmt :=
       Internal_Entity_Requeue_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Formal_Param_Holder;
            procedure Finalizer_Scope_1410 with Inline_Always;
      Match_0 : Internal_Entity_Accept_Stmt_With_Stmts;
Match_1 : Internal_Entity_Entry_Body;
Match_2 : Internal_Entity;
Fld : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Fld_1 : Internal_Entity_Entry_Completion_Formal_Params;
Fld_2 : Internal_Entity_Entry_Completion_Formal_Params;
Match_Prefix : Internal_Entity;
Cast_Result : Internal_Entity_Accept_Stmt_With_Stmts;
Let_Result : Internal_Entity_Entry_Completion_Formal_Params;
Scope_Result : Internal_Entity_Entry_Completion_Formal_Params;
Cast_Result_1 : Internal_Entity_Entry_Body;
Let_Result_1 : Internal_Entity_Entry_Completion_Formal_Params;
Scope_Result_1 : Internal_Entity_Entry_Completion_Formal_Params;
Cast_Result_2 : Internal_Entity;
Let_Result_2 : Internal_Entity_Entry_Completion_Formal_Params;
Scope_Result_2 : Internal_Entity_Entry_Completion_Formal_Params;
Match_Result : Internal_Entity_Entry_Completion_Formal_Params;
Cast_Result_3 : Internal_Entity_Base_Formal_Param_Holder;
            procedure Finalizer_Scope_1410 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1410;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12642 '<Cast to BaseFormalParamHolder at nodes.lkt:22112:9>' Cast_Result_3 ada/nodes.lkt:22112
--# expr-start 12641 '<Match at nodes.lkt:22112:9>' Match_Result ada/nodes.lkt:22112
--# expr-start 12638 '<Find at nodes.lkt:22113:13>' Find_Result ada/nodes.lkt:22113
   --# expr-start 12636 '<FieldAccess for parents at nodes.lkt:22113:13>' Fld ada/nodes.lkt:22113
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 12636
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 12637 '<IsA AcceptStmtWithStmts, EntryBody at nodes.lkt:22113:40>' Is_A ada/nodes.lkt:22113
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Accept_Stmt_With_Stmts_Range | Ada_Entry_Body_Range; 
--# expr-done 12637
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 12638
      if Find_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Find_Result; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Accept_Stmt_With_Stmts =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Accept_Stmt_With_Stmts
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind a Match_0
--# expr-start 12639 '<FieldAccess for params at nodes.lkt:22115:44>' Fld_1 ada/nodes.lkt:22115
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Entry_Completion_Formal_Params (Node => Match_0.Node.Accept_Stmt_F_Params, Info => Match_0.Info);
--# expr-done 12639
Let_Result := Fld_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Entry_Body =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Entry_Body
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind b Match_1
--# expr-start 12640 '<FieldAccess for params at nodes.lkt:22116:34>' Fld_2 ada/nodes.lkt:22116
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Entry_Completion_Formal_Params (Node => Match_1.Node.Entry_Body_F_Params, Info => Match_1.Info);
--# expr-done 12640
Let_Result_1 := Fld_2; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Task_Body_Stub | Ada_Package_Body .. Ada_Accept_Stmt | Ada_For_Loop_Stmt .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_2; 
--# bind _ Match_2
Let_Result_2 := No_Entity_Entry_Completion_Formal_Params; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 12641
      Cast_Result_3 := Create_Internal_Entity_Base_Formal_Param_Holder
        (Node => Match_Result.Node,
         Info => Match_Result.Info);
--# expr-done 12642
         Property_Result := Cast_Result_3;
   --# end
      Finalizer_Scope_1410;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1410;
            raise;
      end;
   return Property_Result;
end Requeue_Stmt_P_Innermost_Entry_Or_Accept_Stmt_Params;
--# end
--# property-start RequeueStmt.xref_equation ada/nodes.lkt:22122
pragma Warnings (Off, "is not referenced");
 function Requeue_Stmt_P_Xref_Equation
  (Node : Bare_Requeue_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Requeue_Stmt  := Bare_Requeue_Stmt (Node);
     Ent : Internal_Entity_Requeue_Stmt :=
       Internal_Entity_Requeue_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1411 with Inline_Always;
            procedure Finalizer_Scope_3567 with Inline_Always;
            procedure Finalizer_Scope_3568 with Inline_Always;
            procedure Finalizer_Scope_3569 with Inline_Always;
            procedure Finalizer_Scope_3574 with Inline_Always;
            procedure Finalizer_Scope_3575 with Inline_Always;
      Local_Ce : Internal_Entity_Call_Expr;
Local_Name : Internal_Entity_Name;
Var_Expr_0 : Internal_Entity_Call_Expr;
Local_Targets : Internal_Entity_Array_Access;
Var_Expr_2 : Internal_Entity_Basic_Decl;
Var_Expr_3 : Internal_Entity_Base_Subp_Spec;
Var_Expr_4 : Internal_Entity_Base_Subp_Spec;
Var_Expr_5 : Internal_Entity_Base_Subp_Spec;
Match_0 : Internal_Entity_Dotted_Name;
Match_1 : Internal_Entity_Name;
Local_Fam_Type : Internal_Entity_Base_Type_Decl;
Local_First_Param : Internal_Entity_Expr;
Var_Expr_7 : Internal_Entity_Expr;
Var_Expr_8 : Internal_Entity_Base_Type_Decl;
Var_Expr_283 : Internal_Entity_Name;
Var_Expr_284 : Internal_Entity_Entry_Decl;
Var_Expr_285 : Internal_Entity_Subtype_Indication;
Var_Expr_286 : Internal_Entity_Call_Expr;
Var_Expr_287 : Internal_Entity_Basic_Assoc;
Fld : Internal_Entity_Name;
Cast_Result : Internal_Entity_Call_Expr;
Fld_1 : Internal_Entity_Name;
Scope_Result : Internal_Entity_Name;
Fld_2 : Internal_Entity_Name;
Result_Var : Internal_Entity_Name;
Fld_3 : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result_1 : Internal_Entity_Basic_Decl;
Fld_4 : Internal_Entity_Base_Subp_Spec;
Fld_5 : Integer;
Is_Equal : Boolean;
Fld_6 : Internal_Entity_Type_Expr;
Is_Null : Boolean;
If_Result : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
Fld_7 : Internal_Entity_Base_Subp_Spec;
Fld_8 : Internal_Entity_Base_Formal_Param_Holder;
Is_A : Boolean;
Not_Val : Boolean;
Fld_9 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
If_Result_1 : Boolean;
Fld_10 : Internal_Entity_Base_Subp_Spec;
Fld_11 : Internal_Entity_Base_Formal_Param_Holder;
Fld_12 : Internal_Entity_Info;
Fld_13 : Internal_Metadata;
Fld_14 : Boolean;
Fld_15 : Boolean;
Scope_Result_3 : Boolean;
Result_Var_3 : Boolean;
Sym : Symbol_Type;
Fld_16 : Internal_Entity_Expr;
Cast_Result_2 : Internal_Entity_Name;
Sym_1 : Symbol_Type;
Fld_17 : Boolean;
Scope_Result_4 : Boolean;
Result_Var_4 : Boolean;
If_Result_2 : Boolean;
If_Result_3 : Boolean;
Scope_Result_5 : Boolean;
Result_Var_5 : Boolean;
Map_Result : Internal_Entity_Array_Access;
Fld_18 : Internal_Entity_Name;
Fld_19 : Logic_Equation;
Fld_20 : Internal_Entity_Name;
Fld_21 : Logic_Equation;
Fld_22 : Internal_Entity_Name;
Is_A_1 : Boolean;
If_Result_4 : Logic_Equation;
Fld_23 : Internal_Entity_Name;
Fld_24 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_25 : Internal_Entity_Base_Id;
Fld_26 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
And_Pred : Logic_Equation;
Fld_27 : Logic_Equation;
Match_Prefix : Internal_Entity_Name;
Cast_Result_3 : Internal_Entity_Dotted_Name;
Let_Result : Logic_Equation;
Scope_Result_6 : Logic_Equation;
Cast_Result_4 : Internal_Entity_Name;
Let_Result_1 : Logic_Equation;
Scope_Result_7 : Logic_Equation;
Match_Result : Logic_Equation;
Cast_Expr_1 : Internal_Entity;
Cast_Result_5 : Internal_Entity_Entry_Decl;
Fld_28 : Internal_Entity_Entry_Spec;
Fld_29 : Internal_Entity;
Scope_Result_8 : Internal_Entity;
Result_Var_6 : Internal_Entity;
Cast_Result_6 : Internal_Entity_Subtype_Indication;
Fld_30 : Internal_Entity_Base_Type_Decl;
Scope_Result_9 : Internal_Entity_Base_Type_Decl;
Result_Var_7 : Internal_Entity_Base_Type_Decl;
Fld_31 : Internal_Entity_Assoc_List;
Fld_32 : Bare_Assoc_List;
Fld_33 : Internal_Entity_Info;
Get_Result : Bare_Basic_Assoc;
As_Entity : Internal_Entity_Basic_Assoc;
Is_Null_1 : Boolean;
If_Result_5 : Internal_Entity_Basic_Assoc;
Fld_34 : Internal_Entity_Expr;
Scope_Result_10 : Internal_Entity_Expr;
Result_Var_8 : Internal_Entity_Expr;
Scope_Result_11 : Internal_Entity_Expr;
Result_Var_9 : Internal_Entity_Expr;
Fld_35 : Logic_Equation;
Fld_36 : Logic_Var;
Cast_Expr_2 : Internal_Entity_Base_Type_Decl;
Cast_Result_7 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_37 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result_12 : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var_10 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Scope_Result_13 : Logic_Equation;
True_Rel_1 : Logic_Equation;
Result_Var_11 : Logic_Equation;
Let_Result_2 : Logic_Equation;
Let_Result_3 : Logic_Equation;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred_3 : Logic_Equation;
Let_Result_4 : Logic_Equation;
Let_Result_5 : Logic_Equation;
Let_Result_6 : Logic_Equation;
            procedure Finalizer_Scope_1411 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Local_Targets);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result_6);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_7);
                     Dec_Ref (Match_Result);
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
                     Dec_Ref (Let_Result_6);
            end Finalizer_Scope_1411;
            procedure Finalizer_Scope_3567 is
            begin
                     Dec_Ref (Fld_19);
                     Dec_Ref (Fld_21);
                     Dec_Ref (If_Result_4);
                     Dec_Ref (Fld_24);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_26);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_3567;
            procedure Finalizer_Scope_3568 is
            begin
                     Dec_Ref (Fld_27);
            end Finalizer_Scope_3568;
            procedure Finalizer_Scope_3569 is
            begin
                     Dec_Ref (Scope_Result_13);
                     Dec_Ref (True_Rel_1);
                     Dec_Ref (Result_Var_11);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_3569;
            procedure Finalizer_Scope_3574 is
            begin
                     Dec_Ref (Fld_35);
                     Dec_Ref (Scope_Result_12);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var_10);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_3574;
            procedure Finalizer_Scope_3575 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_37);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3575;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12710 '<Let at nodes.lkt:22123:9>' Let_Result_6 ada/nodes.lkt:22123
--# scope-start
--# expr-start 12644 '<Cast to CallExpr at nodes.lkt:22123:18>' Cast_Result ada/nodes.lkt:22123
--# expr-start 12643 '<FieldAccess for call_name at nodes.lkt:22123:18>' Fld ada/nodes.lkt:22123
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Requeue_Stmt_F_Call_Name, Info => Ent.Info);
--# expr-done 12643
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Call_Expr_Range
   then
      Cast_Result := Create_Internal_Entity_Call_Expr
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Call_Expr;
   end if;
--# expr-done 12644
Local_Ce := Cast_Result; 
--# bind ce Local_Ce
--# expr-start 12709 '<Let at nodes.lkt:22124:9>' Let_Result_5 ada/nodes.lkt:22124
--# scope-start
Var_Expr_0 := Local_Ce;
if Var_Expr_0 /= No_Entity_Call_Expr then
   --# scope-start
   --# bind ce Var_Expr_0
--# expr-start 12645 '<FieldAccess for name at nodes.lkt:22124:34>' Fld_1 ada/nodes.lkt:22124
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Call_Expr_F_Name, Info => Var_Expr_0.Info);
--# expr-done 12645
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 12646 '<FieldAccess for call_name at nodes.lkt:22124:55>' Fld_2 ada/nodes.lkt:22124
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Name (Node => Ent.Node.Requeue_Stmt_F_Call_Name, Info => Ent.Info);
--# expr-done 12646
   Result_Var := Fld_2;
end if;
Local_Name := Result_Var; 
--# bind name Local_Name
--# expr-start 12708 '<Let at nodes.lkt:22125:9>' Let_Result_4 ada/nodes.lkt:22125
--# scope-start
--# expr-start 12674 '<Map at nodes.lkt:22126:13>' Map_Result ada/nodes.lkt:22126
   --# expr-start 12647 '<FieldAccess for all_env_elements_internal at nodes.lkt:22126:13>' Fld_3 ada/nodes.lkt:22126
      if Local_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.all_env_elements_internal
Fld_3 := Libadalang.Implementation.Name_P_All_Env_Elements_Internal (Node => Local_Name.Node, E_Info => Local_Name.Info);
--# end
--# expr-done 12647
      declare
         Map_Result_Vec : Internal_Entity_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_3;
      begin
         for Item_1 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_1
--# expr-start 12648 '<Cast to BasicDecl at nodes.lkt:22128:17>' Cast_Result_1 ada/nodes.lkt:22128
Cast_Expr := Item_1; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Basic_Decl;
   end if;
--# expr-done 12648
Var_Expr_2 := Cast_Result_1;
if Var_Expr_2 /= No_Entity_Basic_Decl then
   --# scope-start
   --# bind e Var_Expr_2
--# expr-start 12673 '<BooleanBinaryOp Or at nodes.lkt:22130:21>' If_Result_3 ada/nodes.lkt:22130
--# expr-start 12660 '<BooleanBinaryOp Or at nodes.lkt:22130:21>' If_Result_1 ada/nodes.lkt:22130
--# expr-start 12649 '<FieldAccess for subp_spec_or_null at nodes.lkt:22135:25>' Fld_4 ada/nodes.lkt:22135
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_4 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 12649
Var_Expr_3 := Fld_4;
if Var_Expr_3 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_3
--# expr-start 12654 '<BooleanBinaryOp And at nodes.lkt:22137:29>' If_Result ada/nodes.lkt:22137
--# expr-start 12651 '<Eq at nodes.lkt:22137:29>' Is_Equal ada/nodes.lkt:22137
--# expr-start 12650 '<FieldAccess for nb_max_params at nodes.lkt:22137:29>' Fld_5 ada/nodes.lkt:22137
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseFormalParamHolder.nb_max_params
Fld_5 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Nb_Max_Params (Node => Var_Expr_3.Node);
--# end
--# expr-done 12650
Is_Equal := Fld_5 = 0; 
--# expr-done 12651
if Is_Equal then
   --# expr-start 12653 '<IsNull at nodes.lkt:22137:57>' Is_Null ada/nodes.lkt:22137
--# expr-start 12652 '<FieldAccess for returns at nodes.lkt:22137:57>' Fld_6 ada/nodes.lkt:22137
      if Var_Expr_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Var_Expr_3.Node, E_Info => Var_Expr_3.Info);
--# end
--# expr-done 12652
Is_Null := Fld_6.Node = null; 
--# expr-done 12653
   If_Result := Is_Null;
else
   If_Result := False;
end if;
--# expr-done 12654
Scope_Result_1 := If_Result;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
if Result_Var_1 then
   If_Result_1 := True;
else
--# expr-start 12655 '<FieldAccess for subp_spec_or_null at nodes.lkt:22143:25>' Fld_7 ada/nodes.lkt:22143
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_7 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 12655
Var_Expr_4 := Fld_7;
if Var_Expr_4 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_4
--# expr-start 12659 '<FieldAccess for match_formal_params at nodes.lkt:22145:29>' Fld_9 ada/nodes.lkt:22145
      if Var_Expr_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12656 '<FieldAccess for innermost_entry_or_accept_stmt_params at nodes.lkt:22146:33>' Fld_8 ada/nodes.lkt:22146
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start RequeueStmt.innermost_entry_or_accept_stmt_params
Fld_8 := Libadalang.Implementation.Requeue_Stmt_P_Innermost_Entry_Or_Accept_Stmt_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12656
--# expr-start 12658 '<Not at nodes.lkt:22147:45>' Not_Val ada/nodes.lkt:22147
--# expr-start 12657 '<IsA SubpRenamingDecl at nodes.lkt:22147:49>' Is_A ada/nodes.lkt:22147
Is_A := Var_Expr_2.Node /= null 
and then Var_Expr_2.Node.Kind in Ada_Subp_Renaming_Decl_Range; 
--# expr-done 12657
Not_Val := not (Is_A); 
--# expr-done 12658
--# property-call-start BaseFormalParamHolder.match_formal_params
Fld_9 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Formal_Params (Node => Var_Expr_4.Node, Other => Fld_8, Match_Names => Not_Val, Origin => Origin, E_Info => Var_Expr_4.Info);
--# end
--# expr-done 12659
Scope_Result_2 := Fld_9;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
   If_Result_1 := Result_Var_2;
end if;
--# expr-done 12660
if If_Result_1 then
   If_Result_3 := True;
else
   --# expr-start 12672 '<If at nodes.lkt:22159:25>' If_Result_2 ada/nodes.lkt:22159
--# expr-start 12663 '<Cast to Name at nodes.lkt:22160:29>' Cast_Result_2 ada/nodes.lkt:22160
--# expr-start 12662 '<FieldAccess for get_aspect_spec_expr at nodes.lkt:22160:29>' Fld_16 ada/nodes.lkt:22160
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12661 '<Symbol Synchronization at nodes.lkt:22160:52>' Sym ada/nodes.lkt:22160
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Synchronization); 
--# expr-done 12661
--# property-call-start BasicDecl.get_aspect_spec_expr
Fld_16 := Libadalang.Implementation.Basic_Decl_P_Get_Aspect_Spec_Expr (Node => Var_Expr_2.Node, Name => Sym, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 12662
   if Fld_16.Node = null
      or else Fld_16.Node.Kind in Ada_Name
   then
      Cast_Result_2 := Create_Internal_Entity_Name
        (Node => Fld_16.Node,
         Info => Fld_16.Info);
   else
         Cast_Result_2 := No_Entity_Name;
   end if;
--# expr-done 12663
Var_Expr_283 := Cast_Result_2;
if Var_Expr_283 /= No_Entity_Name then
   --# scope-start
--# expr-start 12665 '<FieldAccess for name_is at nodes.lkt:22160:29>' Fld_17 ada/nodes.lkt:22160
      if Var_Expr_283.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12664 '<Symbol By_Entry at nodes.lkt:22162:39>' Sym_1 ada/nodes.lkt:22162
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_By_Entry); 
--# expr-done 12664
--# property-call-start Name.name_is
Fld_17 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_283.Node, Sym => Sym_1);
--# end
--# expr-done 12665
Scope_Result_4 := Fld_17;
   --# end
   Result_Var_4 := Scope_Result_4;
else
   Result_Var_4 := False;
end if;
if Result_Var_4 then
--# expr-start 12666 '<FieldAccess for subp_spec_or_null at nodes.lkt:22164:29>' Fld_10 ada/nodes.lkt:22164
      if Var_Expr_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.subp_spec_or_null
Fld_10 := Libadalang.Implementation.Basic_Decl_P_Subp_Spec_Or_Null (Node => Var_Expr_2.Node, E_Info => Var_Expr_2.Info);
--# end
--# expr-done 12666
Var_Expr_5 := Fld_10;
if Var_Expr_5 /= No_Entity_Base_Subp_Spec then
   --# scope-start
   --# bind ss Var_Expr_5
--# expr-start 12671 '<FieldAccess for match_formal_params at nodes.lkt:22166:33>' Fld_15 ada/nodes.lkt:22166
      if Var_Expr_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12667 '<FieldAccess for innermost_entry_or_accept_stmt_params at nodes.lkt:22167:37>' Fld_11 ada/nodes.lkt:22167
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start RequeueStmt.innermost_entry_or_accept_stmt_params
Fld_11 := Libadalang.Implementation.Requeue_Stmt_P_Innermost_Entry_Or_Accept_Stmt_Params (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12667
--# expr-start 12670 '<FieldAccess for dottable_subp at nodes.lkt:22170:56>' Fld_14 ada/nodes.lkt:22170
--# expr-start 12669 '<FieldAccess for md at nodes.lkt:22170:56>' Fld_13 ada/nodes.lkt:22170
--# expr-start 12668 '<FieldAccess for info at nodes.lkt:22170:56>' Fld_12 ada/nodes.lkt:22170
Fld_12 := Var_Expr_2.Info;
--# expr-done 12668
Fld_13 := Fld_12.Md;
--# expr-done 12669
Fld_14 := Fld_13.Dottable_Subp;
--# expr-done 12670
--# property-call-start BaseFormalParamHolder.match_formal_params
Fld_15 := Libadalang.Implementation.Base_Formal_Param_Holder_P_Match_Formal_Params (Node => Var_Expr_5.Node, Other => Fld_11, Match_Names => False, Ignore_First_Param => Fld_14, Origin => Origin, E_Info => Var_Expr_5.Info);
--# end
--# expr-done 12671
Scope_Result_3 := Fld_15;
   --# end
   Result_Var_3 := Scope_Result_3;
else
   Result_Var_3 := False;
end if;
   If_Result_2 := Result_Var_3;
else
   If_Result_2 := False;
end if;
--# expr-done 12672
   If_Result_3 := If_Result_2;
end if;
--# expr-done 12673
Scope_Result_5 := If_Result_3;
   --# end
   Result_Var_5 := Scope_Result_5;
else
   Result_Var_5 := False;
end if;
         if Result_Var_5 then
         declare
            Item_To_Append : constant Internal_Entity := Item_1;
         begin
            Internal_Entity_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Array
           (Items_Count => Natural (Internal_Entity_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 12674
Local_Targets := Map_Result; Inc_Ref (Local_Targets);
--# bind targets Local_Targets
--# expr-start 12707 '<LogicBinaryOp And at nodes.lkt:22178:9>' And_Pred_3 ada/nodes.lkt:22178
--# expr-start 12689 '<Match at nodes.lkt:22181:13>' Match_Result ada/nodes.lkt:22181
      if Local_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Local_Name; 
case Ada_Name (Match_Prefix.Node.Kind) is
         when Ada_Dotted_Name =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Dotted_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_3; 
--# bind dn Match_0
--# expr-start 12687 '<LogicBinaryOp And at nodes.lkt:22185:21>' And_Pred ada/nodes.lkt:22185
--# expr-start 12681 '<If at nodes.lkt:22186:25>' If_Result_4 ada/nodes.lkt:22186
--# expr-start 12676 '<IsA CallExpr at nodes.lkt:22186:28>' Is_A_1 ada/nodes.lkt:22186
--# expr-start 12675 '<FieldAccess for prefix at nodes.lkt:22186:28>' Fld_22 ada/nodes.lkt:22186
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_22 := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 12675
Is_A_1 := Fld_22.Node /= null 
and then Fld_22.Node.Kind in Ada_Call_Expr_Range; 
--# expr-done 12676
if Is_A_1 then
   --# expr-start 12678 '<FieldAccess for sub_equation at nodes.lkt:22186:55>' Fld_19 ada/nodes.lkt:22186
--# expr-start 12677 '<FieldAccess for prefix at nodes.lkt:22186:55>' Fld_18 ada/nodes.lkt:22186
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_18 := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 12677
      if Fld_18.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_19 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_18.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_18.Info);
--# end
--# expr-done 12678
   If_Result_4 := Fld_19;
else
   --# expr-start 12680 '<FieldAccess for xref_no_overloading at nodes.lkt:22187:30>' Fld_21 ada/nodes.lkt:22187
--# expr-start 12679 '<FieldAccess for prefix at nodes.lkt:22187:30>' Fld_20 ada/nodes.lkt:22187
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_20 := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 12679
      if Fld_20.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_21 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_20.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_20.Info);
--# end
--# expr-done 12680
   If_Result_4 := Fld_21;
end if;
      Inc_Ref (If_Result_4);
--# expr-done 12681
--# expr-start 12686 '<bind at nodes.lkt:22190:25>' Dyn_Var_Bind_Result ada/nodes.lkt:22190
--# expr-start 12683 '<FieldAccess for designated_env at nodes.lkt:22190:36>' Fld_24 ada/nodes.lkt:22190
--# expr-start 12682 '<FieldAccess for prefix at nodes.lkt:22190:36>' Fld_23 ada/nodes.lkt:22190
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_23 := Create_Internal_Entity_Name (Node => Match_0.Node.Dotted_Name_F_Prefix, Info => Match_0.Info);
--# expr-done 12682
      if Fld_23.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_24 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => Fld_23.Node, Env => Env, Origin => Origin, No_Visibility => False, E_Info => Fld_23.Info);
--# end
--# expr-done 12683
Bound_Env := Fld_24; Inc_Ref (Bound_Env);
--# expr-start 12685 '<FieldAccess for xref_no_overloading at nodes.lkt:22192:25>' Fld_26 ada/nodes.lkt:22192
--# expr-start 12684 '<FieldAccess for suffix at nodes.lkt:22192:25>' Fld_25 ada/nodes.lkt:22192
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_25 := Create_Internal_Entity_Base_Id (Node => Match_0.Node.Dotted_Name_F_Suffix, Info => Match_0.Info);
--# expr-done 12684
      if Fld_25.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_26 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_25.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_25.Info);
--# end
--# expr-done 12685
Dyn_Var_Bind_Result := Fld_26; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 12686
And_Pred := Create_And (If_Result_4, Dyn_Var_Bind_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22185:21") else null)); 
--# expr-done 12687
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
Scope_Result_6 := Let_Result;
   Inc_Ref (Scope_Result_6);
   --# end
      Finalizer_Scope_3567;
            Match_Result := Scope_Result_6; Inc_Ref (Match_Result);
         when Ada_Array_Subcomponent_Choice_Name .. Ada_Discrete_Subtype_Name | Ada_End_Name .. Ada_Update_Attribute_Ref =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Name
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_4; 
--# bind o Match_1
--# expr-start 12688 '<FieldAccess for xref_no_overloading at nodes.lkt:22194:27>' Fld_27 ada/nodes.lkt:22194
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_27 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Match_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_1.Info);
--# end
--# expr-done 12688
Let_Result_1 := Fld_27; Inc_Ref (Let_Result_1);
--# end
Scope_Result_7 := Let_Result_1;
   Inc_Ref (Scope_Result_7);
   --# end
      Finalizer_Scope_3568;
            Match_Result := Scope_Result_7; Inc_Ref (Match_Result);
end case;
--# expr-done 12689
--# expr-start 12706 '<LogicAny at nodes.lkt:22199:13>' Logic_Boolean_Op ada/nodes.lkt:22199
--# expr-start 12705 '<Map at nodes.lkt:22199:13>' Map_Result_1 ada/nodes.lkt:22199
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Local_Targets;
      begin
         for Item_6 of
               Collection.Items
         loop
   --# scope-start
               --# bind e Item_6
      --# expr-start 12704 '<Let at nodes.lkt:22204:21>' Let_Result_3 ada/nodes.lkt:22204
--# scope-start
--# expr-start 12693 '<Cast to SubtypeIndication at nodes.lkt:22205:25>' Cast_Result_6 ada/nodes.lkt:22205
--# expr-start 12690 '<Cast to EntryDecl at nodes.lkt:22205:25>' Cast_Result_5 ada/nodes.lkt:22205
Cast_Expr_1 := Item_6; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Entry_Decl_Range
   then
      Cast_Result_5 := Create_Internal_Entity_Entry_Decl
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_5 := No_Entity_Entry_Decl;
   end if;
--# expr-done 12690
Var_Expr_284 := Cast_Result_5;
if Var_Expr_284 /= No_Entity_Entry_Decl then
   --# scope-start
--# expr-start 12692 '<FieldAccess for family_type at nodes.lkt:22205:25>' Fld_29 ada/nodes.lkt:22205
--# expr-start 12691 '<FieldAccess for spec at nodes.lkt:22205:25>' Fld_28 ada/nodes.lkt:22205
      if Var_Expr_284.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_28 := Create_Internal_Entity_Entry_Spec (Node => Var_Expr_284.Node.Entry_Decl_F_Spec, Info => Var_Expr_284.Info);
--# expr-done 12691
      if Fld_28.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_29 := Create_Internal_Entity (Node => Fld_28.Node.Entry_Spec_F_Family_Type, Info => Fld_28.Info);
--# expr-done 12692
Scope_Result_8 := Fld_29;
   --# end
   Result_Var_6 := Scope_Result_8;
else
   Result_Var_6 := No_Entity;
end if;
   if Result_Var_6.Node = null
      or else Result_Var_6.Node.Kind in Ada_Subtype_Indication_Range
   then
      Cast_Result_6 := Create_Internal_Entity_Subtype_Indication
        (Node => Result_Var_6.Node,
         Info => Result_Var_6.Info);
   else
         Cast_Result_6 := No_Entity_Subtype_Indication;
   end if;
--# expr-done 12693
Var_Expr_285 := Cast_Result_6;
if Var_Expr_285 /= No_Entity_Subtype_Indication then
   --# scope-start
--# expr-start 12694 '<FieldAccess for designated_type at nodes.lkt:22205:25>' Fld_30 ada/nodes.lkt:22205
      if Var_Expr_285.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_30 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Var_Expr_285.Node, Origin => Origin, E_Info => Var_Expr_285.Info);
--# end
--# expr-done 12694
Scope_Result_9 := Fld_30;
   --# end
   Result_Var_7 := Scope_Result_9;
else
   Result_Var_7 := No_Entity_Base_Type_Decl;
end if;
Local_Fam_Type := Result_Var_7; 
--# bind fam_type Local_Fam_Type
--# expr-start 12703 '<Let at nodes.lkt:22211:21>' Let_Result_2 ada/nodes.lkt:22211
--# scope-start
Var_Expr_286 := Local_Ce;
if Var_Expr_286 /= No_Entity_Call_Expr then
   --# scope-start
--# expr-start 12695 '<FieldAccess for params at nodes.lkt:22211:39>' Fld_31 ada/nodes.lkt:22211
      if Var_Expr_286.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CallExpr.params
Fld_31 := Libadalang.Implementation.Call_Expr_P_Params (Node => Var_Expr_286.Node, E_Info => Var_Expr_286.Info);
--# end
--# expr-done 12695
Fld_32 := Fld_31.Node;
Get_Result := Get (Self, Fld_32, 0, True); 
Is_Null_1 := Get_Result = null; 
if Is_Null_1 then
   If_Result_5 := No_Entity_Basic_Assoc;
else
Fld_33 := Fld_31.Info;
As_Entity := (Info => Fld_33, Node => Get_Result); 
   If_Result_5 := As_Entity;
end if;
Var_Expr_287 := If_Result_5;
if Var_Expr_287 /= No_Entity_Basic_Assoc then
   --# scope-start
--# expr-start 12696 '<FieldAccess for expr at nodes.lkt:22211:39>' Fld_34 ada/nodes.lkt:22211
      if Var_Expr_287.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_34 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Var_Expr_287.Node, E_Info => Var_Expr_287.Info);
--# end
--# expr-done 12696
Scope_Result_10 := Fld_34;
   --# end
   Result_Var_8 := Scope_Result_10;
else
   Result_Var_8 := No_Entity_Expr;
end if;
Scope_Result_11 := Result_Var_8;
   --# end
   Result_Var_9 := Scope_Result_11;
else
   Result_Var_9 := No_Entity_Expr;
end if;
Local_First_Param := Result_Var_9; 
--# bind first_param Local_First_Param
Var_Expr_7 := Local_First_Param;
if Var_Expr_7 /= No_Entity_Expr then
   --# scope-start
   --# bind p Var_Expr_7
--# expr-start 12702 '<LogicBinaryOp And at nodes.lkt:22215:25>' And_Pred_2 ada/nodes.lkt:22215
--# expr-start 12697 '<FieldAccess for sub_equation at nodes.lkt:22215:25>' Fld_35 ada/nodes.lkt:22215
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_35 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_7.Info);
--# end
--# expr-done 12697
Var_Expr_8 := Local_Fam_Type;
if Var_Expr_8 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind eft Var_Expr_8
--# expr-start 12701 '<LogicBinaryOp And at nodes.lkt:22218:29>' And_Pred_1 ada/nodes.lkt:22218
--# expr-start 12699 '<Bind at nodes.lkt:22218:29>' Bind_Result ada/nodes.lkt:22218
--# expr-start 12698 '<FieldAccess for expected_type_var at nodes.lkt:22218:29>' Fld_36 ada/nodes.lkt:22218
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_36 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_7.Node);
--# expr-done 12698
Fld_36.Value := No_Entity;
Entity_Vars.Reset (Fld_36);
Cast_Expr_2 := Var_Expr_8; 
      Cast_Result_7 := Create_Internal_Entity
        (Node => Cast_Expr_2.Node,
         Info => Cast_Expr_2.Info);
Bind_Result := Solver.Create_Assign (Fld_36, Cast_Result_7, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22218:29") else null)); 
--# expr-done 12699
--# expr-start 12700 '<FieldAccess for matches_expected_type at nodes.lkt:22219:34>' Fld_37 ada/nodes.lkt:22219
      if Var_Expr_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_37 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Var_Expr_7.Node, Origin => Origin);
--# end
--# expr-done 12700
And_Pred_1 := Create_And (Bind_Result, Fld_37, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22218:29") else null)); 
--# expr-done 12701
Scope_Result_12 := And_Pred_1;
   Inc_Ref (Scope_Result_12);
   --# end
      Finalizer_Scope_3575;
   Result_Var_10 := Scope_Result_12;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22220:41") else null)); 
   Result_Var_10 := True_Rel;
end if;
      Inc_Ref (Result_Var_10);
And_Pred_2 := Create_And (Fld_35, Result_Var_10, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22215:25") else null)); 
--# expr-done 12702
Scope_Result_13 := And_Pred_2;
   Inc_Ref (Scope_Result_13);
   --# end
      Finalizer_Scope_3574;
   Result_Var_11 := Scope_Result_13;
else
   True_Rel_1 := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22222:37") else null)); 
   Result_Var_11 := True_Rel_1;
end if;
      Inc_Ref (Result_Var_11);
Let_Result_2 := Result_Var_11; Inc_Ref (Let_Result_2);
--# end
--# expr-done 12703
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 12704
         declare
            Item_To_Append : constant Logic_Equation := Let_Result_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3569;
         end loop;
      end;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 12705
Logic_Boolean_Op := Solver.Create_Any (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22199:13") else null)); 
--# expr-done 12706
And_Pred_3 := Create_And (Match_Result, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22178:9") else null)); 
--# expr-done 12707
Let_Result_4 := And_Pred_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 12708
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 12709
Let_Result_6 := Let_Result_5; Inc_Ref (Let_Result_6);
--# end
--# expr-done 12710
         Property_Result := Let_Result_6;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1411;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1411;
                     Finalizer_Scope_3567;
                     Finalizer_Scope_3568;
                     Finalizer_Scope_3569;
                     Finalizer_Scope_3574;
                     Finalizer_Scope_3575;
            raise;
      end;
   return Property_Result;
end Requeue_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Return_Stmt
   --
      procedure Initialize_Fields_For_Return_Stmt
        (Self : Bare_Return_Stmt
         ; Return_Stmt_F_Return_Expr : Bare_Expr
        ) is
      begin
            Self.Return_Stmt_F_Return_Expr := Return_Stmt_F_Return_Expr;
      end Initialize_Fields_For_Return_Stmt;
   function Return_Stmt_F_Return_Expr
     (Node : Bare_Return_Stmt) return Bare_Expr
   is
   begin
         return Node.Return_Stmt_F_Return_Expr;
   end;
--# property-start ReturnStmt.subp ada/nodes.lkt:22237
pragma Warnings (Off, "is not referenced");
 function Return_Stmt_P_Subp
  (Node : Bare_Return_Stmt
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Subp_Body
is
   Self : Bare_Return_Stmt  := Bare_Return_Stmt (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Subp_Body;
            procedure Finalizer_Scope_1412 with Inline_Always;
      Node_Parents : Bare_Ada_Node_Array_Access;
Is_A : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result : Bare_Subp_Body;
As_Entity : Internal_Entity_Subp_Body;
Is_Null : Boolean;
If_Result : Internal_Entity_Subp_Body;
            procedure Finalizer_Scope_1412 is
            begin
                     Dec_Ref (Node_Parents);
            end Finalizer_Scope_1412;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 12715 '<as_entity at nodes.lkt:22238:9>' If_Result ada/nodes.lkt:22238
--# expr-start 12714 '<Cast to SubpBody at nodes.lkt:22238:9>' Cast_Result ada/nodes.lkt:22238
--# expr-start 12713 '<Find at nodes.lkt:22238:9>' Find_Result ada/nodes.lkt:22238
   --# expr-start 12711 '<FieldAccess for parents at nodes.lkt:22238:9>' Node_Parents ada/nodes.lkt:22238
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Node_Parents := Parents (Self, True); 
--# expr-done 12711
      Find_Result := No_Bare_Ada_Node;
      declare
         Collection : constant Bare_Ada_Node_Array_Access := Node_Parents;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 12712 '<IsA SubpBody at nodes.lkt:22238:36>' Is_A ada/nodes.lkt:22238
Is_A := Item_0 /= null 
and then Item_0.Kind in Ada_Subp_Body_Range; 
--# expr-done 12712
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 12713
   if Find_Result = null
      or else Find_Result.Kind in Ada_Subp_Body_Range
   then
      Cast_Result := Find_Result;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 12714
Is_Null := Cast_Result = null; 
if Is_Null then
   If_Result := No_Entity_Subp_Body;
else
As_Entity := (Info => E_Info, Node => Cast_Result); 
   If_Result := As_Entity;
end if;
--# expr-done 12715
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_1412;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1412;
            raise;
      end;
   return Property_Result;
end Return_Stmt_P_Subp;
--# end
--# property-start ReturnStmt.xref_equation ada/nodes.lkt:22241
pragma Warnings (Off, "is not referenced");
 function Return_Stmt_P_Xref_Equation
  (Node : Bare_Return_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Return_Stmt  := Bare_Return_Stmt (Node);
     Ent : Internal_Entity_Return_Stmt :=
       Internal_Entity_Return_Stmt'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1413 with Inline_Always;
            procedure Finalizer_Scope_3577 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Expr;
Fld : Internal_Entity_Expr;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Subp_Body;
Fld_3 : Internal_Entity_Subp_Spec;
Fld_4 : Internal_Entity_Type_Expr;
Fld_5 : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_6 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_7 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
            procedure Finalizer_Scope_1413 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1413;
            procedure Finalizer_Scope_3577 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_7);
                     Dec_Ref (And_Pred_1);
            end Finalizer_Scope_3577;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12716 '<FieldAccess for return_expr at nodes.lkt:22242:9>' Fld ada/nodes.lkt:22242
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Return_Stmt_F_Return_Expr, Info => Ent.Info);
--# expr-done 12716
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Expr then
   --# scope-start
   --# bind rexpr Var_Expr_0
--# expr-start 12726 '<LogicBinaryOp And at nodes.lkt:22244:13>' And_Pred_1 ada/nodes.lkt:22244
--# expr-start 12724 '<LogicBinaryOp And at nodes.lkt:22245:17>' And_Pred ada/nodes.lkt:22245
--# expr-start 12722 '<Bind at nodes.lkt:22245:17>' Bind_Result ada/nodes.lkt:22245
--# expr-start 12717 '<FieldAccess for expected_type_var at nodes.lkt:22245:17>' Fld_1 ada/nodes.lkt:22245
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Var_Expr_0.Node);
--# expr-done 12717
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 12721 '<FieldAccess for designated_type at nodes.lkt:22246:20>' Fld_5 ada/nodes.lkt:22246
--# expr-start 12720 '<FieldAccess for returns at nodes.lkt:22246:20>' Fld_4 ada/nodes.lkt:22246
--# expr-start 12719 '<FieldAccess for subp_spec at nodes.lkt:22246:20>' Fld_3 ada/nodes.lkt:22246
--# expr-start 12718 '<FieldAccess for subp at nodes.lkt:22246:20>' Fld_2 ada/nodes.lkt:22246
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ReturnStmt.subp
Fld_2 := Libadalang.Implementation.Return_Stmt_P_Subp (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 12718
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Subp_Spec (Node => Fld_2.Node.Base_Subp_Body_F_Subp_Spec, Info => Fld_2.Info);
--# expr-done 12719
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseSubpSpec.returns'
Fld_4 := Libadalang.Implementation.Dispatcher_Base_Subp_Spec_P_Returns (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 12720
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Fld_4.Node, Origin => Origin, E_Info => Fld_4.Info);
--# end
--# expr-done 12721
      Cast_Result := Create_Internal_Entity
        (Node => Fld_5.Node,
         Info => Fld_5.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22245:17") else null)); 
--# expr-done 12722
--# expr-start 12723 '<FieldAccess for sub_equation at nodes.lkt:22247:22>' Fld_6 ada/nodes.lkt:22247
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_6 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 12723
And_Pred := Create_And (Bind_Result, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22245:17") else null)); 
--# expr-done 12724
--# expr-start 12725 '<FieldAccess for matches_expected_assign_type at nodes.lkt:22249:18>' Fld_7 ada/nodes.lkt:22249
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_assign_type
Fld_7 := Libadalang.Implementation.Expr_P_Matches_Expected_Assign_Type (Node => Var_Expr_0.Node, Origin => Origin);
--# end
--# expr-done 12725
And_Pred_1 := Create_And (And_Pred, Fld_7, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22244:13") else null)); 
--# expr-done 12726
Scope_Result := And_Pred_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3577;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22250:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1413;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1413;
                     Finalizer_Scope_3577;
            raise;
      end;
   return Property_Result;
end Return_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Simple_Decl_Stmt
   --
      procedure Initialize_Fields_For_Simple_Decl_Stmt
        (Self : Bare_Simple_Decl_Stmt
         ; Simple_Decl_Stmt_F_Decl : Bare_Object_Decl
        ) is
      begin
            Self.Simple_Decl_Stmt_F_Decl := Simple_Decl_Stmt_F_Decl;
      end Initialize_Fields_For_Simple_Decl_Stmt;
   function Simple_Decl_Stmt_F_Decl
     (Node : Bare_Simple_Decl_Stmt) return Bare_Object_Decl
   is
   begin
         return Node.Simple_Decl_Stmt_F_Decl;
   end;
--# property-start SimpleDeclStmt.xref_equation ada/nodes.lkt:22260
pragma Warnings (Off, "is not referenced");
 function Simple_Decl_Stmt_P_Xref_Equation
  (Node : Bare_Simple_Decl_Stmt
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Simple_Decl_Stmt  := Bare_Simple_Decl_Stmt (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1414 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1414 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1414;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22260:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1414;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1414;
            raise;
      end;
   return Property_Result;
end Simple_Decl_Stmt_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Terminate_Alternative
   --
--# property-start TerminateAlternative.xref_equation ada/nodes.lkt:22266
pragma Warnings (Off, "is not referenced");
 function Terminate_Alternative_P_Xref_Equation
  (Node : Bare_Terminate_Alternative
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Terminate_Alternative  := Bare_Terminate_Alternative (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1415 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1415 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1415;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22266:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1415;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1415;
            raise;
      end;
   return Property_Result;
end Terminate_Alternative_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Subp_Kind
   --
   --
   --  Primitives for Bare_Subp_Kind_Function
   --
   --
   --  Primitives for Bare_Subp_Kind_Procedure
   --
   --
   --  Primitives for Bare_Subunit
   --
      procedure Initialize_Fields_For_Subunit
        (Self : Bare_Subunit
         ; Subunit_F_Name : Bare_Name
         ; Subunit_F_Body : Bare_Body_Node
        ) is
      begin
            Self.Subunit_F_Name := Subunit_F_Name;
            Self.Subunit_F_Body := Subunit_F_Body;
      end Initialize_Fields_For_Subunit;
   function Subunit_F_Name
     (Node : Bare_Subunit) return Bare_Name
   is
   begin
         return Node.Subunit_F_Name;
   end;
   function Subunit_F_Body
     (Node : Bare_Subunit) return Bare_Body_Node
   is
   begin
         return Node.Subunit_F_Body;
   end;
--# property-start Subunit.root_unit ada/nodes.lkt:22282
pragma Warnings (Off, "is not referenced");
 function Subunit_P_Root_Unit
  (Node : Bare_Subunit
  )
   return Internal_Entity_Compilation_Unit
is
   Self : Bare_Subunit  := Bare_Subunit (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Compilation_Unit;
            procedure Finalizer_Scope_1416 with Inline_Always;
      Fld : Bare_Name;
Fld_1 : Symbol_Type_Array_Access;
Fld_2 : Bare_Compilation_Unit;
As_Entity : Internal_Entity_Compilation_Unit;
Is_Null : Boolean;
If_Result : Internal_Entity_Compilation_Unit;
            procedure Finalizer_Scope_1416 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1416;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12730 '<as_bare_entity at nodes.lkt:22283:9>' If_Result ada/nodes.lkt:22283
--# expr-start 12729 '<FieldAccess for designated_compilation_unit at nodes.lkt:22283:9>' Fld_2 ada/nodes.lkt:22283
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12728 '<FieldAccess for as_symbol_array at nodes.lkt:22284:13>' Fld_1 ada/nodes.lkt:22284
--# expr-start 12727 '<FieldAccess for name at nodes.lkt:22284:13>' Fld ada/nodes.lkt:22284
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Subunit_F_Name;
--# expr-done 12727
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Fld);
--# end
--# expr-done 12728
--# property-call-start AdaNode.designated_compilation_unit
Fld_2 := Libadalang.Implementation.Ada_Node_P_Designated_Compilation_Unit (Node => Self, Name => Fld_1, Kind => Unit_Body, Load_If_Needed => True, Not_Found_Is_Error => True);
--# end
--# expr-done 12729
Is_Null := Fld_2 = null; 
if Is_Null then
   If_Result := No_Entity_Compilation_Unit;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_2); 
   If_Result := As_Entity;
end if;
--# expr-done 12730
         Property_Result := If_Result;
   --# end
      Finalizer_Scope_1416;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1416;
            raise;
      end;
   return Property_Result;
end Subunit_P_Root_Unit;
--# end
--# property-start Subunit.env_hook_subunit ada/nodes.lkt:22292
pragma Warnings (Off, "is not referenced");
 function Subunit_P_Env_Hook_Subunit
  (Node : Bare_Subunit
  )
   return Boolean
is
   Self : Bare_Subunit  := Bare_Subunit (Node);
      --# bind self Self
   Property_Result : Boolean;
      Ignored : Internal_Entity_Compilation_Unit;
Fld : Internal_Entity_Compilation_Unit;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12732 '<Let at nodes.lkt:22295:9>' Let_Result ada/nodes.lkt:22295
--# scope-start
--# expr-start 12731 '<FieldAccess for root_unit at nodes.lkt:22295:17>' Fld ada/nodes.lkt:22295
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.root_unit
Fld := Libadalang.Implementation.Subunit_P_Root_Unit (Node => Self);
--# end
--# expr-done 12731
Ignored := Fld; 
--# bind _ Ignored
Let_Result := False; 
--# end
--# expr-done 12732
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subunit_P_Env_Hook_Subunit;
--# end
--# property-start Subunit.body_root ada/nodes.lkt:22302
pragma Warnings (Off, "is not referenced");
 function Subunit_P_Body_Root
  (Node : Bare_Subunit
  )
   return Internal_Entity_Basic_Decl
is
   Self : Bare_Subunit  := Bare_Subunit (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl;
      Fld : Internal_Entity_Compilation_Unit;
Fld_1 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 12735 '<as_bare_entity at nodes.lkt:22302:42>' If_Result ada/nodes.lkt:22302
--# expr-start 12734 '<FieldAccess for decl at nodes.lkt:22302:42>' Fld_1 ada/nodes.lkt:22302
--# expr-start 12733 '<FieldAccess for root_unit at nodes.lkt:22302:42>' Fld ada/nodes.lkt:22302
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.root_unit
Fld := Libadalang.Implementation.Subunit_P_Root_Unit (Node => Self);
--# end
--# expr-done 12733
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Fld.Node);
--# end
--# expr-done 12734
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 12735
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subunit_P_Body_Root;
--# end
--# property-start Subunit.bodies_root ada/nodes.lkt:22314
pragma Warnings (Off, "is not referenced");
 function Subunit_P_Bodies_Root
  (Node : Bare_Subunit
  )
   return Internal_Entity_Basic_Decl_Array_Access
is
   Self : Bare_Subunit  := Bare_Subunit (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_1419 with Inline_Always;
            procedure Finalizer_Scope_3578 with Inline_Always;
      Local_Br : Internal_Entity_Basic_Decl;
Var_Expr_0 : Internal_Entity_Subunit;
Fld : Internal_Entity_Compilation_Unit;
Fld_1 : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Fld_2 : Internal_Entity;
Cast_Result : Internal_Entity_Subunit;
Array_Lit : Internal_Entity_Basic_Decl_Array_Access;
Fld_3 : Internal_Entity_Basic_Decl_Array_Access;
Concat_Result : Internal_Entity_Basic_Decl_Array_Access;
Scope_Result : Internal_Entity_Basic_Decl_Array_Access;
Array_Lit_1 : Internal_Entity_Basic_Decl_Array_Access;
Result_Var : Internal_Entity_Basic_Decl_Array_Access;
Let_Result : Internal_Entity_Basic_Decl_Array_Access;
            procedure Finalizer_Scope_1419 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1419;
            procedure Finalizer_Scope_3578 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_3578;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12744 '<Let at nodes.lkt:22315:9>' Let_Result ada/nodes.lkt:22315
--# scope-start
--# expr-start 12738 '<as_bare_entity at nodes.lkt:22315:18>' If_Result ada/nodes.lkt:22315
--# expr-start 12737 '<FieldAccess for decl at nodes.lkt:22315:18>' Fld_1 ada/nodes.lkt:22315
--# expr-start 12736 '<FieldAccess for root_unit at nodes.lkt:22315:18>' Fld ada/nodes.lkt:22315
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.root_unit
Fld := Libadalang.Implementation.Subunit_P_Root_Unit (Node => Self);
--# end
--# expr-done 12736
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_1 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Fld.Node);
--# end
--# expr-done 12737
Is_Null := Fld_1 = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => No_Entity_Info, Node => Fld_1); 
   If_Result := As_Entity;
end if;
--# expr-done 12738
Local_Br := If_Result; 
--# bind br Local_Br
--# expr-start 12740 '<Cast to Subunit at nodes.lkt:22317:9>' Cast_Result ada/nodes.lkt:22317
--# expr-start 12739 '<parent at nodes.lkt:22317:9>' Fld_2 ada/nodes.lkt:22317
      if Local_Br.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Local_Br.Node, E_Info => Local_Br.Info);
--# expr-done 12739
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Subunit_Range
   then
      Cast_Result := Create_Internal_Entity_Subunit
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result := No_Entity_Subunit;
   end if;
--# expr-done 12740
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Subunit then
   --# scope-start
   --# bind su Var_Expr_0
--# expr-start 12741 '<ArrayLiteral at nodes.lkt:22318:21>' Array_Lit ada/nodes.lkt:22318
Array_Lit := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Local_Br)); 
--# expr-done 12741
--# expr-start 12742 '<FieldAccess for bodies_root at nodes.lkt:22318:28>' Fld_3 ada/nodes.lkt:22318
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.bodies_root
Fld_3 := Libadalang.Implementation.Subunit_P_Bodies_Root (Node => Var_Expr_0.Node);
--# end
--# expr-done 12742
Concat_Result := Concat (Array_Lit, Fld_3); 
Scope_Result := Concat_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3578;
   Result_Var := Scope_Result;
else
   --# expr-start 12743 '<ArrayLiteral at nodes.lkt:22319:25>' Array_Lit_1 ada/nodes.lkt:22319
Array_Lit_1 := Create_Internal_Entity_Basic_Decl_Array (Internal_Internal_Entity_Basic_Decl_Array'(1 => Local_Br)); 
--# expr-done 12743
   Result_Var := Array_Lit_1;
end if;
      Inc_Ref (Result_Var);
Let_Result := Result_Var; Inc_Ref (Let_Result);
--# end
--# expr-done 12744
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1419;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1419;
                     Finalizer_Scope_3578;
            raise;
      end;
   return Property_Result;
end Subunit_P_Bodies_Root;
--# end
--# property-start Subunit.stub ada/nodes.lkt:22332
pragma Warnings (Off, "is not referenced");
 function Subunit_P_Stub
  (Node : Bare_Subunit
  )
   return Bare_Body_Stub
is
   Self : Bare_Subunit  := Bare_Subunit (Node);
      --# bind self Self
   Property_Result : Bare_Body_Stub;
      Local_Root : Bare_Compilation_Unit;
Local_Root_Body : Bare_Body_Node;
Match_0 : Bare_Library_Item;
Match_1 : Bare_Subunit;
Match_2 : Bare_Ada_Node;
Local_Decls : Bare_Ada_Node_List;
Match_0_1 : Bare_Subp_Body;
Match_1_1 : Bare_Package_Body;
Match_2_1 : Bare_Body_Node;
Local_Stub_Name : Internal_Entity_Name;
Local_Subunit_Name : Internal_Entity_Name;
Var_Expr_288 : Internal_Entity_Body_Stub;
Var_Expr_289 : Internal_Entity_Name;
Fld : Internal_Entity_Compilation_Unit;
Fld_1 : Bare_Compilation_Unit;
Fld_2 : Bare_Ada_Node;
Fld_3 : Bare_Basic_Decl;
Cast_Result : Bare_Body_Node;
Fld_4 : Bare_Body_Node;
Match_Prefix : Bare_Ada_Node;
Cast_Result_1 : Bare_Library_Item;
Let_Result : Bare_Body_Node;
Scope_Result : Bare_Body_Node;
Cast_Result_2 : Bare_Subunit;
Let_Result_1 : Bare_Body_Node;
Scope_Result_1 : Bare_Body_Node;
Cast_Result_3 : Bare_Ada_Node;
Let_Result_2 : Bare_Body_Node;
Scope_Result_2 : Bare_Body_Node;
Match_Result : Bare_Body_Node;
Fld_5 : Bare_Declarative_Part;
Fld_6 : Bare_Ada_Node_List;
Fld_7 : Bare_Declarative_Part;
Fld_8 : Bare_Ada_Node_List;
Match_Prefix_1 : Bare_Body_Node;
Cast_Result_4 : Bare_Subp_Body;
Let_Result_3 : Bare_Ada_Node_List;
Scope_Result_3 : Bare_Ada_Node_List;
Cast_Result_5 : Bare_Package_Body;
Let_Result_4 : Bare_Ada_Node_List;
Scope_Result_4 : Bare_Ada_Node_List;
Cast_Result_6 : Bare_Body_Node;
Let_Result_5 : Bare_Ada_Node_List;
Scope_Result_5 : Bare_Ada_Node_List;
Match_Result_1 : Bare_Ada_Node_List;
Item_0 : Bare_Ada_Node;
Cast_Expr : Bare_Ada_Node;
Cast_Result_7 : Bare_Body_Stub;
As_Entity : Internal_Entity_Body_Stub;
Is_Null : Boolean;
If_Result : Internal_Entity_Body_Stub;
Fld_9 : Internal_Entity_Defining_Name;
Fld_10 : Internal_Entity_Name;
Scope_Result_6 : Internal_Entity_Name;
Result_Var : Internal_Entity_Name;
Fld_11 : Bare_Body_Node;
As_Entity_1 : Internal_Entity_Body_Node;
Is_Null_1 : Boolean;
If_Result_1 : Internal_Entity_Body_Node;
Fld_12 : Internal_Entity_Defining_Name;
Fld_13 : Internal_Entity_Name;
Fld_14 : Symbol_Type;
Fld_15 : Boolean;
Scope_Result_7 : Boolean;
Result_Var_1 : Boolean;
Let_Result_6 : Boolean;
Let_Result_7 : Boolean;
Find_Result : Bare_Ada_Node;
Cast_Result_8 : Bare_Body_Stub;
Let_Result_8 : Bare_Body_Stub;
Let_Result_9 : Bare_Body_Stub;
Let_Result_10 : Bare_Body_Stub;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12773 '<Let at nodes.lkt:22337:9>' Let_Result_10 ada/nodes.lkt:22337
--# scope-start
--# expr-start 12746 '<FieldAccess for node at nodes.lkt:22337:20>' Fld_1 ada/nodes.lkt:22337
--# expr-start 12745 '<FieldAccess for root_unit at nodes.lkt:22337:20>' Fld ada/nodes.lkt:22337
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.root_unit
Fld := Libadalang.Implementation.Subunit_P_Root_Unit (Node => Self);
--# end
--# expr-done 12745
Fld_1 := Fld.Node;
--# expr-done 12746
Local_Root := Fld_1; 
--# bind root Local_Root
--# expr-start 12772 '<Let at nodes.lkt:22338:9>' Let_Result_9 ada/nodes.lkt:22338
--# scope-start
--# expr-start 12751 '<Match at nodes.lkt:22338:25>' Match_Result ada/nodes.lkt:22338
--# expr-start 12747 '<FieldAccess for body at nodes.lkt:22338:31>' Fld_2 ada/nodes.lkt:22338
      if Local_Root = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Local_Root.Compilation_Unit_F_Body;
--# expr-done 12747
      if Fld_2 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Fld_2; 
case Ada_Ada_Node (Match_Prefix.Kind) is
         when Ada_Library_Item =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Match_Prefix;
Match_0 := Cast_Result_1; 
--# bind li Match_0
--# expr-start 12749 '<Cast to Body at nodes.lkt:22339:37>' Cast_Result ada/nodes.lkt:22339
--# expr-start 12748 '<FieldAccess for item at nodes.lkt:22339:37>' Fld_3 ada/nodes.lkt:22339
      if Match_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Match_0.Library_Item_F_Item;
--# expr-done 12748
   if Fld_3 = null
      or else Fld_3.Kind in Ada_Body_Node
   then
      Cast_Result := Fld_3;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 12749
Let_Result := Cast_Result; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Subunit =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Match_Prefix;
Match_1 := Cast_Result_2; 
--# bind su Match_1
--# expr-start 12750 '<FieldAccess for body at nodes.lkt:22340:33>' Fld_4 ada/nodes.lkt:22340
      if Match_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Match_1.Subunit_F_Body;
--# expr-done 12750
Let_Result_1 := Fld_4; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Iter_Type_Of | Ada_Limited_Absent .. Ada_Subp_Kind_Procedure | Ada_Synchronized_Absent .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Match_Prefix;
Match_2 := Cast_Result_3; 
--# bind _ Match_2
Let_Result_2 := No_Bare_Ada_Node; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 12751
Local_Root_Body := Match_Result; 
--# bind root_body Local_Root_Body
--# expr-start 12771 '<Let at nodes.lkt:22343:9>' Let_Result_8 ada/nodes.lkt:22343
--# scope-start
--# expr-start 12756 '<Match at nodes.lkt:22343:21>' Match_Result_1 ada/nodes.lkt:22343
      if Local_Root_Body = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix_1 := Local_Root_Body; 
case Ada_Body_Node (Match_Prefix_1.Kind) is
         when Ada_Subp_Body =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Match_Prefix_1;
Match_0_1 := Cast_Result_4; 
--# bind subp Match_0_1
--# expr-start 12753 '<FieldAccess for decls at nodes.lkt:22344:36>' Fld_6 ada/nodes.lkt:22344
--# expr-start 12752 '<FieldAccess for decls at nodes.lkt:22344:36>' Fld_5 ada/nodes.lkt:22344
      if Match_0_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Match_0_1.Subp_Body_F_Decls;
--# expr-done 12752
      if Fld_5 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Fld_5.Declarative_Part_F_Decls;
--# expr-done 12753
Let_Result_3 := Fld_6; 
--# end
Scope_Result_3 := Let_Result_3;
   --# end
            Match_Result_1 := Scope_Result_3; 
         when Ada_Package_Body =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Match_Prefix_1;
Match_1_1 := Cast_Result_5; 
--# bind pkg Match_1_1
--# expr-start 12755 '<FieldAccess for decls at nodes.lkt:22345:38>' Fld_8 ada/nodes.lkt:22345
--# expr-start 12754 '<FieldAccess for decls at nodes.lkt:22345:38>' Fld_7 ada/nodes.lkt:22345
      if Match_1_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Match_1_1.Package_Body_F_Decls;
--# expr-done 12754
      if Fld_7 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Fld_7.Declarative_Part_F_Decls;
--# expr-done 12755
Let_Result_4 := Fld_8; 
--# end
Scope_Result_4 := Let_Result_4;
   --# end
            Match_Result_1 := Scope_Result_4; 
         when Ada_Accept_Stmt_Body .. Ada_Null_Subp_Decl | Ada_Subp_Renaming_Decl .. Ada_Entry_Body | Ada_Protected_Body .. Ada_Task_Body =>
   --# scope-start
--# scope-start
      Cast_Result_6 := Match_Prefix_1;
Match_2_1 := Cast_Result_6; 
--# bind _ Match_2_1
Let_Result_5 := No_Bare_Ada_Node; 
--# end
Scope_Result_5 := Let_Result_5;
   --# end
            Match_Result_1 := Scope_Result_5; 
end case;
--# expr-done 12756
Local_Decls := Match_Result_1; 
--# bind decls Local_Decls
--# expr-start 12770 '<Cast to BodyStub at nodes.lkt:22351:9>' Cast_Result_8 ada/nodes.lkt:22351
--# expr-start 12769 '<Find at nodes.lkt:22351:9>' Find_Result ada/nodes.lkt:22351
      Find_Result := No_Bare_Ada_Node;
      if Local_Decls = null then
      Find_Result := No_Bare_Ada_Node;
      else
      declare
         Collection : constant Bare_Ada_Node_List := Local_Decls;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind d Item_0
      --# expr-start 12768 '<Let at nodes.lkt:22355:17>' Let_Result_7 ada/nodes.lkt:22355
--# scope-start
--# expr-start 12758 '<as_bare_entity at nodes.lkt:22356:21>' If_Result ada/nodes.lkt:22356
--# expr-start 12757 '<Cast to BodyStub at nodes.lkt:22356:21>' Cast_Result_7 ada/nodes.lkt:22356
Cast_Expr := Item_0; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Body_Stub
   then
      Cast_Result_7 := Cast_Expr;
   else
         Cast_Result_7 := No_Bare_Ada_Node;
   end if;
--# expr-done 12757
Is_Null := Cast_Result_7 = null; 
if Is_Null then
   If_Result := No_Entity_Body_Stub;
else
As_Entity := (Info => No_Entity_Info, Node => Cast_Result_7); 
   If_Result := As_Entity;
end if;
--# expr-done 12758
Var_Expr_288 := If_Result;
if Var_Expr_288 /= No_Entity_Body_Stub then
   --# scope-start
--# expr-start 12760 '<FieldAccess for name at nodes.lkt:22356:21>' Fld_10 ada/nodes.lkt:22356
--# expr-start 12759 '<FieldAccess for defining_name_or_raise at nodes.lkt:22356:21>' Fld_9 ada/nodes.lkt:22356
      if Var_Expr_288.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld_9 := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => Var_Expr_288.Node, E_Info => Var_Expr_288.Info);
--# end
--# expr-done 12759
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Name (Node => Fld_9.Node.Defining_Name_F_Name, Info => Fld_9.Info);
--# expr-done 12760
Scope_Result_6 := Fld_10;
   --# end
   Result_Var := Scope_Result_6;
else
   Result_Var := No_Entity_Name;
end if;
Local_Stub_Name := Result_Var; 
--# bind stub_name Local_Stub_Name
--# expr-start 12767 '<Let at nodes.lkt:22360:17>' Let_Result_6 ada/nodes.lkt:22360
--# scope-start
--# expr-start 12764 '<FieldAccess for name at nodes.lkt:22361:21>' Fld_13 ada/nodes.lkt:22361
--# expr-start 12763 '<FieldAccess for defining_name_or_raise at nodes.lkt:22361:21>' Fld_12 ada/nodes.lkt:22361
--# expr-start 12762 '<as_bare_entity at nodes.lkt:22361:21>' If_Result_1 ada/nodes.lkt:22361
--# expr-start 12761 '<FieldAccess for body at nodes.lkt:22361:21>' Fld_11 ada/nodes.lkt:22361
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Self.Subunit_F_Body;
--# expr-done 12761
Is_Null_1 := Fld_11 = null; 
if Is_Null_1 then
   If_Result_1 := No_Entity_Body_Node;
else
As_Entity_1 := (Info => No_Entity_Info, Node => Fld_11); 
   If_Result_1 := As_Entity_1;
end if;
--# expr-done 12762
      if If_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name_or_raise
Fld_12 := Libadalang.Implementation.Basic_Decl_P_Defining_Name_Or_Raise (Node => If_Result_1.Node, E_Info => If_Result_1.Info);
--# end
--# expr-done 12763
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Name (Node => Fld_12.Node.Defining_Name_F_Name, Info => Fld_12.Info);
--# expr-done 12764
Local_Subunit_Name := Fld_13; 
--# bind subunit_name Local_Subunit_Name
Var_Expr_289 := Local_Stub_Name;
if Var_Expr_289 /= No_Entity_Name then
   --# scope-start
--# expr-start 12766 '<FieldAccess for name_is at nodes.lkt:22363:17>' Fld_15 ada/nodes.lkt:22363
      if Var_Expr_289.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12765 '<FieldAccess for name_symbol at nodes.lkt:22363:36>' Fld_14 ada/nodes.lkt:22363
      if Local_Subunit_Name.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.name_symbol'
Fld_14 := Libadalang.Implementation.Dispatcher_Name_P_Name_Symbol (Node => Local_Subunit_Name.Node);
--# end
--# expr-done 12765
--# property-call-start Name.name_is
Fld_15 := Libadalang.Implementation.Name_P_Name_Is (Node => Var_Expr_289.Node, Sym => Fld_14);
--# end
--# expr-done 12766
Scope_Result_7 := Fld_15;
   --# end
   Result_Var_1 := Scope_Result_7;
else
   Result_Var_1 := False;
end if;
Let_Result_6 := Result_Var_1; 
--# end
--# expr-done 12767
Let_Result_7 := Let_Result_6; 
--# end
--# expr-done 12768
      if Let_Result_7 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Let_Result_7;
         end loop;
      end;
      end if;
--# expr-done 12769
   if Find_Result = null
      or else Find_Result.Kind in Ada_Body_Stub
   then
      Cast_Result_8 := Find_Result;
   else
         Cast_Result_8 := No_Bare_Ada_Node;
   end if;
--# expr-done 12770
Let_Result_8 := Cast_Result_8; 
--# end
--# expr-done 12771
Let_Result_9 := Let_Result_8; 
--# end
--# expr-done 12772
Let_Result_10 := Let_Result_9; 
--# end
--# expr-done 12773
         Property_Result := Let_Result_10;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subunit_P_Stub;
--# end
--# property-start Subunit.xref_entry_point ada/nodes.lkt:22369
pragma Warnings (Off, "is not referenced");
 function Subunit_P_Xref_Entry_Point
  (Node : Bare_Subunit
  )
   return Boolean
is
   Self : Bare_Subunit  := Bare_Subunit (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subunit_P_Xref_Entry_Point;
--# end
--# property-start Subunit.xref_equation ada/nodes.lkt:22372
pragma Warnings (Off, "is not referenced");
 function Subunit_P_Xref_Equation
  (Node : Bare_Subunit
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Subunit  := Bare_Subunit (Node);
     Ent : Internal_Entity_Subunit :=
       Internal_Entity_Subunit'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1422 with Inline_Always;
            procedure Finalizer_Scope_3588 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Dotted_Name;
Fld : Bare_Name;
Fld_1 : Logic_Var;
Fld_2 : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_3 : Internal_Entity_Name;
Cast_Result_1 : Internal_Entity_Dotted_Name;
Fld_4 : Bare_Body_Node;
Fld_5 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_6 : Internal_Entity_Name;
Fld_7 : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1422 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1422;
            procedure Finalizer_Scope_3588 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_3588;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12785 '<LogicBinaryOp And at nodes.lkt:22373:9>' And_Pred ada/nodes.lkt:22373
--# expr-start 12777 '<Bind at nodes.lkt:22373:9>' Bind_Result ada/nodes.lkt:22373
--# expr-start 12775 '<FieldAccess for ref_var at nodes.lkt:22373:9>' Fld_1 ada/nodes.lkt:22373
--# expr-start 12774 '<FieldAccess for name at nodes.lkt:22373:9>' Fld ada/nodes.lkt:22373
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Subunit_F_Name;
--# expr-done 12774
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld_1 := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Fld);
--# end
--# expr-done 12775
Fld_1.Value := No_Entity;
Entity_Vars.Reset (Fld_1);
--# expr-start 12776 '<FieldAccess for body_root at nodes.lkt:22374:12>' Fld_2 ada/nodes.lkt:22374
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Subunit.body_root
Fld_2 := Libadalang.Implementation.Subunit_P_Body_Root (Node => Ent.Node);
--# end
--# expr-done 12776
      Cast_Result := Create_Internal_Entity
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
Bind_Result := Solver.Create_Assign (Fld_1, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22373:9") else null)); 
--# expr-done 12777
--# expr-start 12779 '<Cast to DottedName at nodes.lkt:22376:14>' Cast_Result_1 ada/nodes.lkt:22376
--# expr-start 12778 '<FieldAccess for name at nodes.lkt:22376:14>' Fld_3 ada/nodes.lkt:22376
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Name (Node => Ent.Node.Subunit_F_Name, Info => Ent.Info);
--# expr-done 12778
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Dotted_Name
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result_1 := No_Entity_Dotted_Name;
   end if;
--# expr-done 12779
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Entity_Dotted_Name then
   --# scope-start
   --# bind dn Var_Expr_0
--# expr-start 12784 '<bind at nodes.lkt:22378:17>' Dyn_Var_Bind_Result ada/nodes.lkt:22378
--# expr-start 12781 '<FieldAccess for node_env at nodes.lkt:22378:28>' Fld_5 ada/nodes.lkt:22378
--# expr-start 12780 '<FieldAccess for body at nodes.lkt:22378:28>' Fld_4 ada/nodes.lkt:22378
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Subunit_F_Body;
--# expr-done 12780
      if Fld_4 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Node_Env (Node => Fld_4);
--# expr-done 12781
Bound_Env := Fld_5; Inc_Ref (Bound_Env);
--# expr-start 12783 '<FieldAccess for xref_no_overloading at nodes.lkt:22380:17>' Fld_7 ada/nodes.lkt:22380
--# expr-start 12782 '<FieldAccess for prefix at nodes.lkt:22380:17>' Fld_6 ada/nodes.lkt:22380
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Dotted_Name_F_Prefix, Info => Var_Expr_0.Info);
--# expr-done 12782
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_7 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Fld_6.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_6.Info);
--# end
--# expr-done 12783
Dyn_Var_Bind_Result := Fld_7; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 12784
Scope_Result := Dyn_Var_Bind_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3588;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22382:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred := Create_And (Bind_Result, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22373:9") else null)); 
--# expr-done 12785
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1422;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1422;
                     Finalizer_Scope_3588;
            raise;
      end;
   return Property_Result;
end Subunit_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Synchronized_Node
   --
--# property-start '[dispatcher]Synchronized.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Synchronized_Node_P_As_Bool
  (Node : Bare_Synchronized_Node
  )
   return Boolean
is
   Self : Bare_Synchronized_Node  := Bare_Synchronized_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Synchronized_Node (Self.Kind) is
               when Ada_Synchronized_Absent =>
                  --# property-call-start Synchronized.Absent.as_bool
                  Property_Result := Synchronized_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Synchronized_Present =>
                  --# property-call-start Synchronized.Present.as_bool
                  Property_Result := Synchronized_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Synchronized_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Synchronized_Absent
   --
--# property-start Synchronized.Absent.as_bool ada/nodes.lkt:22388
pragma Warnings (Off, "is not referenced");
 function Synchronized_Absent_P_As_Bool
  (Node : Bare_Synchronized_Absent
  )
   return Boolean
is
   Self : Bare_Synchronized_Absent  := Bare_Synchronized_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synchronized_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Synchronized_Present
   --
--# property-start Synchronized.Present.as_bool ada/nodes.lkt:22388
pragma Warnings (Off, "is not referenced");
 function Synchronized_Present_P_As_Bool
  (Node : Bare_Synchronized_Present
  )
   return Boolean
is
   Self : Bare_Synchronized_Present  := Bare_Synchronized_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Synchronized_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Tagged_Node
   --
--# property-start '[dispatcher]Tagged.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Tagged_Node_P_As_Bool
  (Node : Bare_Tagged_Node
  )
   return Boolean
is
   Self : Bare_Tagged_Node  := Bare_Tagged_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Tagged_Node (Self.Kind) is
               when Ada_Tagged_Absent =>
                  --# property-call-start Tagged.Absent.as_bool
                  Property_Result := Tagged_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Tagged_Present =>
                  --# property-call-start Tagged.Present.as_bool
                  Property_Result := Tagged_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Tagged_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Tagged_Absent
   --
--# property-start Tagged.Absent.as_bool ada/nodes.lkt:22393
pragma Warnings (Off, "is not referenced");
 function Tagged_Absent_P_As_Bool
  (Node : Bare_Tagged_Absent
  )
   return Boolean
is
   Self : Bare_Tagged_Absent  := Bare_Tagged_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Tagged_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Tagged_Present
   --
--# property-start Tagged.Present.as_bool ada/nodes.lkt:22393
pragma Warnings (Off, "is not referenced");
 function Tagged_Present_P_As_Bool
  (Node : Bare_Tagged_Present
  )
   return Boolean
is
   Self : Bare_Tagged_Present  := Bare_Tagged_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Tagged_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Task_Def
   --
      procedure Initialize_Fields_For_Task_Def
        (Self : Bare_Task_Def
         ; Task_Def_F_Interfaces : Bare_Parent_List
         ; Task_Def_F_Public_Part : Bare_Public_Part
         ; Task_Def_F_Private_Part : Bare_Private_Part
         ; Task_Def_F_End_Name : Bare_End_Name
        ) is
      begin
            Self.Task_Def_F_Interfaces := Task_Def_F_Interfaces;
            Self.Task_Def_F_Public_Part := Task_Def_F_Public_Part;
            Self.Task_Def_F_Private_Part := Task_Def_F_Private_Part;
            Self.Task_Def_F_End_Name := Task_Def_F_End_Name;
      end Initialize_Fields_For_Task_Def;
   function Task_Def_F_Interfaces
     (Node : Bare_Task_Def) return Bare_Parent_List
   is
   begin
         return Node.Task_Def_F_Interfaces;
   end;
   function Task_Def_F_Public_Part
     (Node : Bare_Task_Def) return Bare_Public_Part
   is
   begin
         return Node.Task_Def_F_Public_Part;
   end;
   function Task_Def_F_Private_Part
     (Node : Bare_Task_Def) return Bare_Private_Part
   is
   begin
         return Node.Task_Def_F_Private_Part;
   end;
   function Task_Def_F_End_Name
     (Node : Bare_Task_Def) return Bare_End_Name
   is
   begin
         return Node.Task_Def_F_End_Name;
   end;
--# property-start TaskDef.xref_equation ada/nodes.lkt:22410
pragma Warnings (Off, "is not referenced");
 function Task_Def_P_Xref_Equation
  (Node : Bare_Task_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Task_Def  := Bare_Task_Def (Node);
     Ent : Internal_Entity_Task_Def :=
       Internal_Entity_Task_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1429 with Inline_Always;
            procedure Finalizer_Scope_3589 with Inline_Always;
      Fld : Internal_Entity_Parent_List;
Fld_1 : Bare_Parent_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1429 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1429;
            procedure Finalizer_Scope_3589 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3589;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12789 '<LogicAll at nodes.lkt:22411:9>' Logic_Boolean_Op ada/nodes.lkt:22411
--# expr-start 12788 '<Map at nodes.lkt:22411:9>' Map_Result ada/nodes.lkt:22411
   --# expr-start 12786 '<FieldAccess for interfaces at nodes.lkt:22411:9>' Fld ada/nodes.lkt:22411
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Parent_List (Node => Ent.Node.Task_Def_F_Interfaces, Info => Ent.Info);
--# expr-done 12786
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind ifc Item_0
      --# expr-start 12787 '<FieldAccess for xref_equation at nodes.lkt:22411:44>' Fld_3 ada/nodes.lkt:22411
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 12787
         declare
            Item_To_Append : constant Logic_Equation := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3589;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 12788
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:22411:9") else null)); 
--# expr-done 12789
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1429;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1429;
                     Finalizer_Scope_3589;
            raise;
      end;
   return Property_Result;
end Task_Def_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Type_Attributes_Repository
   --
      procedure Initialize_Fields_For_Type_Attributes_Repository
        (Self : Bare_Type_Attributes_Repository
        ) is
      begin
      Self.Type_Attributes_Repository_Base_Type := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Expr := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Base_Type_Expr := null;
      Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Type_Expr := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Int_Type_Expr := null;
      Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Type_Expr := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Real_Type_Expr := null;
      Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Param := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Base_Type_Param := null;
      Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Param := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Int_Param := null;
      Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Param := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Real_Param := null;
      Self.Bare_Type_Attributes_Repository_Lf_State_Root_Stream_Param := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Root_Stream_Param := null;
      Self.Bare_Type_Attributes_Repository_Lf_State_Succ := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Succ := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Pred := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Pred := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Min := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Min := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Max := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Max := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Round := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Round := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Rounding := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Rounding := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Unbiased_Rounding := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Unbiased_Rounding := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Ceiling := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Ceiling := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Floor := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Floor := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Truncation := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Truncation := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Machine := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Machine := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Machine_Rounding := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Machine_Rounding := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Fraction := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Fraction := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Exponent := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Exponent := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Copy_Sign := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Copy_Sign := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Remainder := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Remainder := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Adjacent := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Adjacent := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Scaling := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Scaling := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Compose := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Compose := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Leading_Part := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Leading_Part := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Mod := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Mod := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Value := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Value := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Value := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Value := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Value := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Wide_Value := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Fixed_Value := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Fixed_Value := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Integer_Value := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Integer_Value := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Pos := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Pos := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Val_Attr := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Val_Attr := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Rep := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Enum_Rep := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Val := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Enum_Val := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Read := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Read := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Write := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Write := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Input := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Input := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Output := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Output := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Image := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Image := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Image := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Image := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Image := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Wide_Image := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Put_Image := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Put_Image := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Input := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Asm_Input := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Output := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Asm_Output := No_Bare_Ada_Node;
      Self.Bare_Type_Attributes_Repository_Lf_State_Model := Uninitialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Model := No_Bare_Ada_Node;
      end Initialize_Fields_For_Type_Attributes_Repository;
--# property-start TypeAttributesRepository.base_type_expr ada/nodes.lkt:22423
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Base_Type_Expr
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Synthetic_Type_Expr_Node_Builder
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Synthetic_Type_Expr_Node_Builder;
            procedure Finalizer_Scope_1430 with Inline_Always;
      Fld : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
            procedure Finalizer_Scope_1430 is
            begin
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1430;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Expr is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Base_Type_Expr;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Expr,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
         --# expr-start 12792 '<CreateSynthNodeBuilder at nodes.lkt:22424:9>' Builder_1 ada/nodes.lkt:22424
--# expr-start 12791 '<CreateCopyNodeBuilder at nodes.lkt:22424:47>' Builder ada/nodes.lkt:22424
--# expr-start 12790 '<FieldAccess for base_type at nodes.lkt:22424:47>' Fld ada/nodes.lkt:22424
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12790
Builder := Create_Copy_Node_Builder (Fld); 
--# expr-done 12791
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 12792
         Property_Result := Builder_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1430;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1430;
               Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Expr :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Expr := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Base_Type_Expr := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Type_Attributes_Repository_F_Base_Type_Expr;
--# end
--# property-start TypeAttributesRepository.universal_int_type_expr ada/nodes.lkt:22427
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Universal_Int_Type_Expr
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Synthetic_Type_Expr_Node_Builder
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Synthetic_Type_Expr_Node_Builder;
            procedure Finalizer_Scope_1431 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
            procedure Finalizer_Scope_1431 is
            begin
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1431;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Type_Expr is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Int_Type_Expr;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Type_Expr,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12796 '<CreateSynthNodeBuilder at nodes.lkt:22428:9>' Builder_1 ada/nodes.lkt:22428
--# expr-start 12795 '<CreateCopyNodeBuilder at nodes.lkt:22429:25>' Builder ada/nodes.lkt:22429
--# expr-start 12794 '<FieldAccess for node at nodes.lkt:22429:25>' Fld_1 ada/nodes.lkt:22429
--# expr-start 12793 '<FieldAccess for universal_int_type at nodes.lkt:22429:25>' Fld ada/nodes.lkt:22429
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_int_type
Fld := Libadalang.Implementation.Ada_Node_P_Universal_Int_Type (Node => Self);
--# end
--# expr-done 12793
Fld_1 := Fld.Node;
--# expr-done 12794
Builder := Create_Copy_Node_Builder (Fld_1); 
--# expr-done 12795
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 12796
         Property_Result := Builder_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1431;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1431;
               Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Type_Expr :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Type_Expr := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Int_Type_Expr := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Type_Attributes_Repository_F_Universal_Int_Type_Expr;
--# end
--# property-start TypeAttributesRepository.universal_real_type_expr ada/nodes.lkt:22433
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Universal_Real_Type_Expr
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Synthetic_Type_Expr_Node_Builder
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Synthetic_Type_Expr_Node_Builder;
            procedure Finalizer_Scope_1432 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
            procedure Finalizer_Scope_1432 is
            begin
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1432;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Type_Expr is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Real_Type_Expr;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Type_Expr,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12800 '<CreateSynthNodeBuilder at nodes.lkt:22434:9>' Builder_1 ada/nodes.lkt:22434
--# expr-start 12799 '<CreateCopyNodeBuilder at nodes.lkt:22435:25>' Builder ada/nodes.lkt:22435
--# expr-start 12798 '<FieldAccess for node at nodes.lkt:22435:25>' Fld_1 ada/nodes.lkt:22435
--# expr-start 12797 '<FieldAccess for universal_real_type at nodes.lkt:22435:25>' Fld ada/nodes.lkt:22435
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_real_type
Fld := Libadalang.Implementation.Ada_Node_P_Universal_Real_Type (Node => Self);
--# end
--# expr-done 12797
Fld_1 := Fld.Node;
--# expr-done 12798
Builder := Create_Copy_Node_Builder (Fld_1); 
--# expr-done 12799
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 12800
         Property_Result := Builder_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1432;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1432;
               Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Type_Expr :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Type_Expr := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Real_Type_Expr := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Type_Attributes_Repository_F_Universal_Real_Type_Expr;
--# end
--# property-start TypeAttributesRepository.base_type_param ada/nodes.lkt:22439
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Base_Type_Param
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Synthetic_Formal_Param_Decl_Node_Builder
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
            procedure Finalizer_Scope_1433 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
            procedure Finalizer_Scope_1433 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Builder);
            end Finalizer_Scope_1433;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Param is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Base_Type_Param;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Param,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
         --# expr-start 12803 '<CreateSynthNodeBuilder at nodes.lkt:22440:9>' Builder ada/nodes.lkt:22440
--# expr-start 12801 '<Symbol Value at nodes.lkt:22441:24>' Sym ada/nodes.lkt:22441
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Value); 
--# expr-done 12801
--# expr-start 12802 '<FieldAccess for base_type_expr at nodes.lkt:22442:24>' Fld ada/nodes.lkt:22442
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12802
Builder := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym, Fld); 
--# expr-done 12803
         Property_Result := Builder;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1433;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1433;
               Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Param :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Base_Type_Param := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Base_Type_Param := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Type_Attributes_Repository_F_Base_Type_Param;
--# end
--# property-start TypeAttributesRepository.universal_int_param ada/nodes.lkt:22446
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Universal_Int_Param
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Synthetic_Formal_Param_Decl_Node_Builder
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
            procedure Finalizer_Scope_1434 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
            procedure Finalizer_Scope_1434 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Builder);
            end Finalizer_Scope_1434;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Param is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Int_Param;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Param,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12806 '<CreateSynthNodeBuilder at nodes.lkt:22447:9>' Builder ada/nodes.lkt:22447
--# expr-start 12804 '<Symbol Value at nodes.lkt:22448:24>' Sym ada/nodes.lkt:22448
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Value); 
--# expr-done 12804
--# expr-start 12805 '<FieldAccess for universal_int_type_expr at nodes.lkt:22449:24>' Fld ada/nodes.lkt:22449
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_type_expr
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Type_Expr (Node => Self);
--# end
--# expr-done 12805
Builder := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym, Fld); 
--# expr-done 12806
         Property_Result := Builder;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1434;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1434;
               Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Param :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Int_Param := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Int_Param := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Type_Attributes_Repository_F_Universal_Int_Param;
--# end
--# property-start TypeAttributesRepository.universal_real_param ada/nodes.lkt:22453
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Universal_Real_Param
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Synthetic_Formal_Param_Decl_Node_Builder
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
            procedure Finalizer_Scope_1435 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
            procedure Finalizer_Scope_1435 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Builder);
            end Finalizer_Scope_1435;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Param is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Real_Param;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Param,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12809 '<CreateSynthNodeBuilder at nodes.lkt:22454:9>' Builder ada/nodes.lkt:22454
--# expr-start 12807 '<Symbol Value at nodes.lkt:22455:24>' Sym ada/nodes.lkt:22455
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Value); 
--# expr-done 12807
--# expr-start 12808 '<FieldAccess for universal_real_type_expr at nodes.lkt:22456:24>' Fld ada/nodes.lkt:22456
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_real_type_expr
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Real_Type_Expr (Node => Self);
--# end
--# expr-done 12808
Builder := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym, Fld); 
--# expr-done 12809
         Property_Result := Builder;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1435;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1435;
               Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Param :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Universal_Real_Param := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Real_Param := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Type_Attributes_Repository_F_Universal_Real_Param;
--# end
--# property-start TypeAttributesRepository.root_stream_param ada/nodes.lkt:22460
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Root_Stream_Param
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Synthetic_Formal_Param_Decl_Node_Builder
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
            procedure Finalizer_Scope_1436 with Inline_Always;
      Sym : Symbol_Type;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
            procedure Finalizer_Scope_1436 is
            begin
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
            end Finalizer_Scope_1436;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Root_Stream_Param is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Root_Stream_Param;
               Inc_Ref (Property_Result);
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Root_Stream_Param,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 12816 '<CreateSynthNodeBuilder at nodes.lkt:22461:9>' Builder_2 ada/nodes.lkt:22461
--# expr-start 12810 '<Symbol S at nodes.lkt:22462:24>' Sym ada/nodes.lkt:22462
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_S); 
--# expr-done 12810
--# expr-start 12815 '<CreateSynthNodeBuilder at nodes.lkt:22463:24>' Builder_1 ada/nodes.lkt:22463
--# expr-start 12814 '<CreateCopyNodeBuilder at nodes.lkt:22464:29>' Builder ada/nodes.lkt:22464
--# expr-start 12813 '<FieldAccess for node at nodes.lkt:22464:29>' Fld_2 ada/nodes.lkt:22464
--# expr-start 12812 '<FieldAccess for anonymous_access_type at nodes.lkt:22464:29>' Fld_1 ada/nodes.lkt:22464
--# expr-start 12811 '<FieldAccess for root_stream_type at nodes.lkt:22464:29>' Fld ada/nodes.lkt:22464
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_stream_type
Fld := Libadalang.Implementation.Ada_Node_P_Root_Stream_Type (Node => Self);
--# end
--# expr-done 12811
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.anonymous_access_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Anonymous_Access_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 12812
Fld_2 := Fld_1.Node;
--# expr-done 12813
Builder := Create_Copy_Node_Builder (Fld_2); 
--# expr-done 12814
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 12815
Builder_2 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym, Builder_1); 
--# expr-done 12816
         Property_Result := Builder_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1436;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1436;
               Self.Bare_Type_Attributes_Repository_Lf_State_Root_Stream_Param :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Root_Stream_Param := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Root_Stream_Param := Property_Result;
         Inc_Ref (Property_Result);
   return Property_Result;
end Type_Attributes_Repository_F_Root_Stream_Param;
--# end
--# property-start TypeAttributesRepository.succ ada/nodes.lkt:22471
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Succ
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1437 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1437 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1437;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Succ is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Succ;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Succ,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12821 '<CreateSynthNodeBuilder at nodes.lkt:22472:9>' Builder_1 ada/nodes.lkt:22472
--# expr-start 12820 '<CreateSynthNodeBuilder at nodes.lkt:22473:18>' Builder ada/nodes.lkt:22473
--# expr-start 12817 '<Symbol Succ at nodes.lkt:22474:29>' Sym ada/nodes.lkt:22474
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Succ); 
--# expr-done 12817
--# expr-start 12818 '<FieldAccess for base_type_param at nodes.lkt:22475:29>' Fld ada/nodes.lkt:22475
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12818
--# expr-start 12819 '<FieldAccess for base_type_expr at nodes.lkt:22476:34>' Fld_1 ada/nodes.lkt:22476
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12819
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12820
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12821
--# expr-start 12822 '<FieldAccess for base_type at nodes.lkt:22479:23>' Fld_2 ada/nodes.lkt:22479
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12822
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1437;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1437;
               Self.Bare_Type_Attributes_Repository_Lf_State_Succ :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Succ := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Succ := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Succ;
--# end
--# property-start TypeAttributesRepository.pred ada/nodes.lkt:22482
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Pred
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1438 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1438 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1438;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Pred is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Pred;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Pred,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12827 '<CreateSynthNodeBuilder at nodes.lkt:22483:9>' Builder_1 ada/nodes.lkt:22483
--# expr-start 12826 '<CreateSynthNodeBuilder at nodes.lkt:22484:18>' Builder ada/nodes.lkt:22484
--# expr-start 12823 '<Symbol Pred at nodes.lkt:22485:29>' Sym ada/nodes.lkt:22485
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pred); 
--# expr-done 12823
--# expr-start 12824 '<FieldAccess for base_type_param at nodes.lkt:22486:29>' Fld ada/nodes.lkt:22486
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12824
--# expr-start 12825 '<FieldAccess for base_type_expr at nodes.lkt:22487:34>' Fld_1 ada/nodes.lkt:22487
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12825
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12826
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12827
--# expr-start 12828 '<FieldAccess for base_type at nodes.lkt:22490:23>' Fld_2 ada/nodes.lkt:22490
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12828
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1438;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1438;
               Self.Bare_Type_Attributes_Repository_Lf_State_Pred :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Pred := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Pred := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Pred;
--# end
--# property-start TypeAttributesRepository.min ada/nodes.lkt:22493
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Min
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1439 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1439 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1439;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Min is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Min;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Min,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12834 '<CreateSynthNodeBuilder at nodes.lkt:22494:9>' Builder_1 ada/nodes.lkt:22494
--# expr-start 12833 '<CreateSynthNodeBuilder at nodes.lkt:22495:18>' Builder ada/nodes.lkt:22495
--# expr-start 12829 '<Symbol Min at nodes.lkt:22496:29>' Sym ada/nodes.lkt:22496
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Min); 
--# expr-done 12829
--# expr-start 12830 '<FieldAccess for base_type_param at nodes.lkt:22497:28>' Fld ada/nodes.lkt:22497
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12830
--# expr-start 12831 '<FieldAccess for base_type_param at nodes.lkt:22498:29>' Fld_1 ada/nodes.lkt:22498
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12831
--# expr-start 12832 '<FieldAccess for base_type_expr at nodes.lkt:22499:34>' Fld_2 ada/nodes.lkt:22499
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12832
Builder := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Fld_2); 
--# expr-done 12833
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12834
--# expr-start 12835 '<FieldAccess for base_type at nodes.lkt:22502:23>' Fld_3 ada/nodes.lkt:22502
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12835
      Cast_Result := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1439;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1439;
               Self.Bare_Type_Attributes_Repository_Lf_State_Min :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Min := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Min := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Min;
--# end
--# property-start TypeAttributesRepository.max ada/nodes.lkt:22505
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Max
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1440 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1440 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1440;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Max is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Max;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Max,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12841 '<CreateSynthNodeBuilder at nodes.lkt:22506:9>' Builder_1 ada/nodes.lkt:22506
--# expr-start 12840 '<CreateSynthNodeBuilder at nodes.lkt:22507:18>' Builder ada/nodes.lkt:22507
--# expr-start 12836 '<Symbol Max at nodes.lkt:22508:29>' Sym ada/nodes.lkt:22508
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Max); 
--# expr-done 12836
--# expr-start 12837 '<FieldAccess for base_type_param at nodes.lkt:22509:28>' Fld ada/nodes.lkt:22509
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12837
--# expr-start 12838 '<FieldAccess for base_type_param at nodes.lkt:22510:29>' Fld_1 ada/nodes.lkt:22510
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12838
--# expr-start 12839 '<FieldAccess for base_type_expr at nodes.lkt:22511:34>' Fld_2 ada/nodes.lkt:22511
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12839
Builder := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Fld_2); 
--# expr-done 12840
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12841
--# expr-start 12842 '<FieldAccess for base_type at nodes.lkt:22514:23>' Fld_3 ada/nodes.lkt:22514
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12842
      Cast_Result := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1440;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1440;
               Self.Bare_Type_Attributes_Repository_Lf_State_Max :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Max := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Max := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Max;
--# end
--# property-start TypeAttributesRepository.round ada/nodes.lkt:22517
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Round
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1441 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1441 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1441;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Round is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Round;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Round,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12847 '<CreateSynthNodeBuilder at nodes.lkt:22518:9>' Builder_1 ada/nodes.lkt:22518
--# expr-start 12846 '<CreateSynthNodeBuilder at nodes.lkt:22520:18>' Builder ada/nodes.lkt:22520
--# expr-start 12843 '<Symbol Round at nodes.lkt:22521:29>' Sym ada/nodes.lkt:22521
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Round); 
--# expr-done 12843
--# expr-start 12844 '<FieldAccess for universal_real_param at nodes.lkt:22522:29>' Fld ada/nodes.lkt:22522
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_real_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Real_Param (Node => Self);
--# end
--# expr-done 12844
--# expr-start 12845 '<FieldAccess for base_type_expr at nodes.lkt:22523:34>' Fld_1 ada/nodes.lkt:22523
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12845
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12846
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12847
--# expr-start 12848 '<FieldAccess for base_type at nodes.lkt:22526:23>' Fld_2 ada/nodes.lkt:22526
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12848
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1441;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1441;
               Self.Bare_Type_Attributes_Repository_Lf_State_Round :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Round := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Round := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Round;
--# end
--# property-start TypeAttributesRepository.rounding ada/nodes.lkt:22529
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Rounding
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1442 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1442 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1442;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Rounding is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Rounding;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Rounding,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12853 '<CreateSynthNodeBuilder at nodes.lkt:22530:9>' Builder_1 ada/nodes.lkt:22530
--# expr-start 12852 '<CreateSynthNodeBuilder at nodes.lkt:22531:18>' Builder ada/nodes.lkt:22531
--# expr-start 12849 '<Symbol Rounding at nodes.lkt:22532:29>' Sym ada/nodes.lkt:22532
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Rounding); 
--# expr-done 12849
--# expr-start 12850 '<FieldAccess for base_type_param at nodes.lkt:22533:29>' Fld ada/nodes.lkt:22533
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12850
--# expr-start 12851 '<FieldAccess for base_type_expr at nodes.lkt:22534:34>' Fld_1 ada/nodes.lkt:22534
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12851
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12852
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12853
--# expr-start 12854 '<FieldAccess for base_type at nodes.lkt:22537:23>' Fld_2 ada/nodes.lkt:22537
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12854
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1442;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1442;
               Self.Bare_Type_Attributes_Repository_Lf_State_Rounding :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Rounding := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Rounding := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Rounding;
--# end
--# property-start TypeAttributesRepository.unbiased_rounding ada/nodes.lkt:22540
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Unbiased_Rounding
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1443 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1443 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1443;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Unbiased_Rounding is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Unbiased_Rounding;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Unbiased_Rounding,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12859 '<CreateSynthNodeBuilder at nodes.lkt:22541:9>' Builder_1 ada/nodes.lkt:22541
--# expr-start 12858 '<CreateSynthNodeBuilder at nodes.lkt:22542:18>' Builder ada/nodes.lkt:22542
--# expr-start 12855 '<Symbol Unbiased_Rounding at nodes.lkt:22543:29>' Sym ada/nodes.lkt:22543
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Unbiased_Rounding); 
--# expr-done 12855
--# expr-start 12856 '<FieldAccess for base_type_param at nodes.lkt:22544:29>' Fld ada/nodes.lkt:22544
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12856
--# expr-start 12857 '<FieldAccess for base_type_expr at nodes.lkt:22545:34>' Fld_1 ada/nodes.lkt:22545
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12857
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12858
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12859
--# expr-start 12860 '<FieldAccess for base_type at nodes.lkt:22548:23>' Fld_2 ada/nodes.lkt:22548
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12860
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1443;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1443;
               Self.Bare_Type_Attributes_Repository_Lf_State_Unbiased_Rounding :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Unbiased_Rounding := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Unbiased_Rounding := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Unbiased_Rounding;
--# end
--# property-start TypeAttributesRepository.ceiling ada/nodes.lkt:22551
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Ceiling
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1444 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1444 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1444;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Ceiling is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Ceiling;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Ceiling,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12865 '<CreateSynthNodeBuilder at nodes.lkt:22552:9>' Builder_1 ada/nodes.lkt:22552
--# expr-start 12864 '<CreateSynthNodeBuilder at nodes.lkt:22553:18>' Builder ada/nodes.lkt:22553
--# expr-start 12861 '<Symbol Ceiling at nodes.lkt:22554:29>' Sym ada/nodes.lkt:22554
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Ceiling); 
--# expr-done 12861
--# expr-start 12862 '<FieldAccess for base_type_param at nodes.lkt:22555:29>' Fld ada/nodes.lkt:22555
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12862
--# expr-start 12863 '<FieldAccess for base_type_expr at nodes.lkt:22556:34>' Fld_1 ada/nodes.lkt:22556
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12863
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12864
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12865
--# expr-start 12866 '<FieldAccess for base_type at nodes.lkt:22559:23>' Fld_2 ada/nodes.lkt:22559
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12866
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1444;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1444;
               Self.Bare_Type_Attributes_Repository_Lf_State_Ceiling :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Ceiling := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Ceiling := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Ceiling;
--# end
--# property-start TypeAttributesRepository.floor ada/nodes.lkt:22562
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Floor
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1445 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1445 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1445;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Floor is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Floor;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Floor,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12871 '<CreateSynthNodeBuilder at nodes.lkt:22563:9>' Builder_1 ada/nodes.lkt:22563
--# expr-start 12870 '<CreateSynthNodeBuilder at nodes.lkt:22564:18>' Builder ada/nodes.lkt:22564
--# expr-start 12867 '<Symbol Floor at nodes.lkt:22565:29>' Sym ada/nodes.lkt:22565
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Floor); 
--# expr-done 12867
--# expr-start 12868 '<FieldAccess for base_type_param at nodes.lkt:22566:29>' Fld ada/nodes.lkt:22566
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12868
--# expr-start 12869 '<FieldAccess for base_type_expr at nodes.lkt:22567:34>' Fld_1 ada/nodes.lkt:22567
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12869
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12870
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12871
--# expr-start 12872 '<FieldAccess for base_type at nodes.lkt:22570:23>' Fld_2 ada/nodes.lkt:22570
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12872
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1445;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1445;
               Self.Bare_Type_Attributes_Repository_Lf_State_Floor :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Floor := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Floor := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Floor;
--# end
--# property-start TypeAttributesRepository.truncation ada/nodes.lkt:22573
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Truncation
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1446 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1446 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1446;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Truncation is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Truncation;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Truncation,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12877 '<CreateSynthNodeBuilder at nodes.lkt:22574:9>' Builder_1 ada/nodes.lkt:22574
--# expr-start 12876 '<CreateSynthNodeBuilder at nodes.lkt:22575:18>' Builder ada/nodes.lkt:22575
--# expr-start 12873 '<Symbol Truncation at nodes.lkt:22576:29>' Sym ada/nodes.lkt:22576
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Truncation); 
--# expr-done 12873
--# expr-start 12874 '<FieldAccess for base_type_param at nodes.lkt:22577:29>' Fld ada/nodes.lkt:22577
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12874
--# expr-start 12875 '<FieldAccess for base_type_expr at nodes.lkt:22578:34>' Fld_1 ada/nodes.lkt:22578
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12875
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12876
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12877
--# expr-start 12878 '<FieldAccess for base_type at nodes.lkt:22581:23>' Fld_2 ada/nodes.lkt:22581
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12878
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1446;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1446;
               Self.Bare_Type_Attributes_Repository_Lf_State_Truncation :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Truncation := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Truncation := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Truncation;
--# end
--# property-start TypeAttributesRepository.machine ada/nodes.lkt:22584
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Machine
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1447 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1447 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1447;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Machine is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Machine;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Machine,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12883 '<CreateSynthNodeBuilder at nodes.lkt:22585:9>' Builder_1 ada/nodes.lkt:22585
--# expr-start 12882 '<CreateSynthNodeBuilder at nodes.lkt:22586:18>' Builder ada/nodes.lkt:22586
--# expr-start 12879 '<Symbol Machine at nodes.lkt:22587:29>' Sym ada/nodes.lkt:22587
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine); 
--# expr-done 12879
--# expr-start 12880 '<FieldAccess for base_type_param at nodes.lkt:22588:29>' Fld ada/nodes.lkt:22588
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12880
--# expr-start 12881 '<FieldAccess for base_type_expr at nodes.lkt:22589:34>' Fld_1 ada/nodes.lkt:22589
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12881
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12882
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12883
--# expr-start 12884 '<FieldAccess for base_type at nodes.lkt:22592:23>' Fld_2 ada/nodes.lkt:22592
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12884
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1447;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1447;
               Self.Bare_Type_Attributes_Repository_Lf_State_Machine :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Machine := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Machine := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Machine;
--# end
--# property-start TypeAttributesRepository.machine_rounding ada/nodes.lkt:22595
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Machine_Rounding
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1448 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1448 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1448;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Machine_Rounding is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Machine_Rounding;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Machine_Rounding,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12889 '<CreateSynthNodeBuilder at nodes.lkt:22596:9>' Builder_1 ada/nodes.lkt:22596
--# expr-start 12888 '<CreateSynthNodeBuilder at nodes.lkt:22597:18>' Builder ada/nodes.lkt:22597
--# expr-start 12885 '<Symbol Machine_Rounding at nodes.lkt:22598:29>' Sym ada/nodes.lkt:22598
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Rounding); 
--# expr-done 12885
--# expr-start 12886 '<FieldAccess for base_type_param at nodes.lkt:22599:29>' Fld ada/nodes.lkt:22599
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12886
--# expr-start 12887 '<FieldAccess for base_type_expr at nodes.lkt:22600:34>' Fld_1 ada/nodes.lkt:22600
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12887
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12888
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12889
--# expr-start 12890 '<FieldAccess for base_type at nodes.lkt:22603:23>' Fld_2 ada/nodes.lkt:22603
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12890
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1448;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1448;
               Self.Bare_Type_Attributes_Repository_Lf_State_Machine_Rounding :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Machine_Rounding := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Machine_Rounding := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Machine_Rounding;
--# end
--# property-start TypeAttributesRepository.fraction ada/nodes.lkt:22606
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Fraction
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1449 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1449 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1449;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Fraction is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Fraction;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Fraction,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12895 '<CreateSynthNodeBuilder at nodes.lkt:22607:9>' Builder_1 ada/nodes.lkt:22607
--# expr-start 12894 '<CreateSynthNodeBuilder at nodes.lkt:22608:18>' Builder ada/nodes.lkt:22608
--# expr-start 12891 '<Symbol Fraction at nodes.lkt:22609:29>' Sym ada/nodes.lkt:22609
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Fraction); 
--# expr-done 12891
--# expr-start 12892 '<FieldAccess for base_type_param at nodes.lkt:22610:29>' Fld ada/nodes.lkt:22610
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12892
--# expr-start 12893 '<FieldAccess for base_type_expr at nodes.lkt:22611:34>' Fld_1 ada/nodes.lkt:22611
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12893
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12894
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12895
--# expr-start 12896 '<FieldAccess for base_type at nodes.lkt:22614:23>' Fld_2 ada/nodes.lkt:22614
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12896
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1449;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1449;
               Self.Bare_Type_Attributes_Repository_Lf_State_Fraction :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Fraction := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Fraction := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Fraction;
--# end
--# property-start TypeAttributesRepository.exponent ada/nodes.lkt:22617
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Exponent
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1450 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1450 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1450;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Exponent is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Exponent;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Exponent,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12901 '<CreateSynthNodeBuilder at nodes.lkt:22618:9>' Builder_1 ada/nodes.lkt:22618
--# expr-start 12900 '<CreateSynthNodeBuilder at nodes.lkt:22619:18>' Builder ada/nodes.lkt:22619
--# expr-start 12897 '<Symbol Exponent at nodes.lkt:22620:29>' Sym ada/nodes.lkt:22620
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Exponent); 
--# expr-done 12897
--# expr-start 12898 '<FieldAccess for base_type_param at nodes.lkt:22621:29>' Fld ada/nodes.lkt:22621
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12898
--# expr-start 12899 '<FieldAccess for universal_int_type_expr at nodes.lkt:22622:34>' Fld_1 ada/nodes.lkt:22622
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Type_Expr (Node => Self);
--# end
--# expr-done 12899
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12900
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12901
--# expr-start 12902 '<FieldAccess for base_type at nodes.lkt:22625:23>' Fld_2 ada/nodes.lkt:22625
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12902
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1450;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1450;
               Self.Bare_Type_Attributes_Repository_Lf_State_Exponent :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Exponent := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Exponent := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Exponent;
--# end
--# property-start TypeAttributesRepository.copy_sign ada/nodes.lkt:22628
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Copy_Sign
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1451 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1451 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1451;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Copy_Sign is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Copy_Sign;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Copy_Sign,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12908 '<CreateSynthNodeBuilder at nodes.lkt:22629:9>' Builder_1 ada/nodes.lkt:22629
--# expr-start 12907 '<CreateSynthNodeBuilder at nodes.lkt:22630:18>' Builder ada/nodes.lkt:22630
--# expr-start 12903 '<Symbol Copy_Sign at nodes.lkt:22631:29>' Sym ada/nodes.lkt:22631
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Copy_Sign); 
--# expr-done 12903
--# expr-start 12904 '<FieldAccess for base_type_param at nodes.lkt:22632:28>' Fld ada/nodes.lkt:22632
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12904
--# expr-start 12905 '<FieldAccess for base_type_param at nodes.lkt:22633:29>' Fld_1 ada/nodes.lkt:22633
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12905
--# expr-start 12906 '<FieldAccess for base_type_expr at nodes.lkt:22634:34>' Fld_2 ada/nodes.lkt:22634
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12906
Builder := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Fld_2); 
--# expr-done 12907
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12908
--# expr-start 12909 '<FieldAccess for base_type at nodes.lkt:22637:23>' Fld_3 ada/nodes.lkt:22637
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12909
      Cast_Result := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1451;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1451;
               Self.Bare_Type_Attributes_Repository_Lf_State_Copy_Sign :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Copy_Sign := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Copy_Sign := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Copy_Sign;
--# end
--# property-start TypeAttributesRepository.remainder ada/nodes.lkt:22640
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Remainder
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1452 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1452 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1452;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Remainder is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Remainder;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Remainder,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12915 '<CreateSynthNodeBuilder at nodes.lkt:22641:9>' Builder_1 ada/nodes.lkt:22641
--# expr-start 12914 '<CreateSynthNodeBuilder at nodes.lkt:22642:18>' Builder ada/nodes.lkt:22642
--# expr-start 12910 '<Symbol Remainder at nodes.lkt:22643:29>' Sym ada/nodes.lkt:22643
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Remainder); 
--# expr-done 12910
--# expr-start 12911 '<FieldAccess for base_type_param at nodes.lkt:22644:28>' Fld ada/nodes.lkt:22644
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12911
--# expr-start 12912 '<FieldAccess for base_type_param at nodes.lkt:22645:29>' Fld_1 ada/nodes.lkt:22645
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12912
--# expr-start 12913 '<FieldAccess for base_type_expr at nodes.lkt:22646:34>' Fld_2 ada/nodes.lkt:22646
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12913
Builder := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Fld_2); 
--# expr-done 12914
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12915
--# expr-start 12916 '<FieldAccess for base_type at nodes.lkt:22649:23>' Fld_3 ada/nodes.lkt:22649
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12916
      Cast_Result := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1452;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1452;
               Self.Bare_Type_Attributes_Repository_Lf_State_Remainder :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Remainder := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Remainder := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Remainder;
--# end
--# property-start TypeAttributesRepository.adjacent ada/nodes.lkt:22652
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Adjacent
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1453 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1453 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1453;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Adjacent is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Adjacent;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Adjacent,
               "lazy field memoization");
      end case;
      begin
   --# scope-start
--# expr-start 12922 '<CreateSynthNodeBuilder at nodes.lkt:22653:9>' Builder_1 ada/nodes.lkt:22653
--# expr-start 12921 '<CreateSynthNodeBuilder at nodes.lkt:22654:18>' Builder ada/nodes.lkt:22654
--# expr-start 12917 '<Symbol Adjacent at nodes.lkt:22655:29>' Sym ada/nodes.lkt:22655
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Adjacent); 
--# expr-done 12917
--# expr-start 12918 '<FieldAccess for base_type_param at nodes.lkt:22656:28>' Fld ada/nodes.lkt:22656
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12918
--# expr-start 12919 '<FieldAccess for base_type_param at nodes.lkt:22657:29>' Fld_1 ada/nodes.lkt:22657
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12919
--# expr-start 12920 '<FieldAccess for base_type_expr at nodes.lkt:22658:34>' Fld_2 ada/nodes.lkt:22658
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12920
Builder := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Fld_2); 
--# expr-done 12921
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12922
--# expr-start 12923 '<FieldAccess for base_type at nodes.lkt:22661:23>' Fld_3 ada/nodes.lkt:22661
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12923
      Cast_Result := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1453;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1453;
               Self.Bare_Type_Attributes_Repository_Lf_State_Adjacent :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Adjacent := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Adjacent := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Adjacent;
--# end
--# property-start TypeAttributesRepository.scaling ada/nodes.lkt:22664
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Scaling
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1454 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1454 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1454;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Scaling is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Scaling;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Scaling,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12929 '<CreateSynthNodeBuilder at nodes.lkt:22665:9>' Builder_1 ada/nodes.lkt:22665
--# expr-start 12928 '<CreateSynthNodeBuilder at nodes.lkt:22666:18>' Builder ada/nodes.lkt:22666
--# expr-start 12924 '<Symbol Scaling at nodes.lkt:22667:29>' Sym ada/nodes.lkt:22667
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Scaling); 
--# expr-done 12924
--# expr-start 12925 '<FieldAccess for base_type_param at nodes.lkt:22668:28>' Fld ada/nodes.lkt:22668
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12925
--# expr-start 12926 '<FieldAccess for universal_int_param at nodes.lkt:22669:29>' Fld_1 ada/nodes.lkt:22669
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Param (Node => Self);
--# end
--# expr-done 12926
--# expr-start 12927 '<FieldAccess for base_type_expr at nodes.lkt:22670:34>' Fld_2 ada/nodes.lkt:22670
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12927
Builder := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Fld_2); 
--# expr-done 12928
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12929
--# expr-start 12930 '<FieldAccess for base_type at nodes.lkt:22673:23>' Fld_3 ada/nodes.lkt:22673
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12930
      Cast_Result := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1454;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1454;
               Self.Bare_Type_Attributes_Repository_Lf_State_Scaling :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Scaling := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Scaling := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Scaling;
--# end
--# property-start TypeAttributesRepository.compose ada/nodes.lkt:22676
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Compose
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1455 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1455 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1455;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Compose is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Compose;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Compose,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12936 '<CreateSynthNodeBuilder at nodes.lkt:22677:9>' Builder_1 ada/nodes.lkt:22677
--# expr-start 12935 '<CreateSynthNodeBuilder at nodes.lkt:22678:18>' Builder ada/nodes.lkt:22678
--# expr-start 12931 '<Symbol Compose at nodes.lkt:22679:29>' Sym ada/nodes.lkt:22679
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Compose); 
--# expr-done 12931
--# expr-start 12932 '<FieldAccess for base_type_param at nodes.lkt:22680:28>' Fld ada/nodes.lkt:22680
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12932
--# expr-start 12933 '<FieldAccess for universal_int_param at nodes.lkt:22681:29>' Fld_1 ada/nodes.lkt:22681
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Param (Node => Self);
--# end
--# expr-done 12933
--# expr-start 12934 '<FieldAccess for base_type_expr at nodes.lkt:22682:34>' Fld_2 ada/nodes.lkt:22682
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12934
Builder := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Fld_2); 
--# expr-done 12935
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12936
--# expr-start 12937 '<FieldAccess for base_type at nodes.lkt:22685:23>' Fld_3 ada/nodes.lkt:22685
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12937
      Cast_Result := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1455;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1455;
               Self.Bare_Type_Attributes_Repository_Lf_State_Compose :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Compose := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Compose := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Compose;
--# end
--# property-start TypeAttributesRepository.leading_part ada/nodes.lkt:22688
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Leading_Part
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1456 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1456 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1456;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Leading_Part is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Leading_Part;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Leading_Part,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12943 '<CreateSynthNodeBuilder at nodes.lkt:22689:9>' Builder_1 ada/nodes.lkt:22689
--# expr-start 12942 '<CreateSynthNodeBuilder at nodes.lkt:22690:18>' Builder ada/nodes.lkt:22690
--# expr-start 12938 '<Symbol Leading_Part at nodes.lkt:22691:29>' Sym ada/nodes.lkt:22691
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Leading_Part); 
--# expr-done 12938
--# expr-start 12939 '<FieldAccess for base_type_param at nodes.lkt:22692:28>' Fld ada/nodes.lkt:22692
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 12939
--# expr-start 12940 '<FieldAccess for universal_int_param at nodes.lkt:22693:29>' Fld_1 ada/nodes.lkt:22693
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Param (Node => Self);
--# end
--# expr-done 12940
--# expr-start 12941 '<FieldAccess for base_type_expr at nodes.lkt:22694:34>' Fld_2 ada/nodes.lkt:22694
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12941
Builder := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Fld_2); 
--# expr-done 12942
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12943
--# expr-start 12944 '<FieldAccess for base_type at nodes.lkt:22697:23>' Fld_3 ada/nodes.lkt:22697
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12944
      Cast_Result := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1456;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1456;
               Self.Bare_Type_Attributes_Repository_Lf_State_Leading_Part :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Leading_Part := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Leading_Part := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Leading_Part;
--# end
--# property-start TypeAttributesRepository.mod ada/nodes.lkt:22700
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Mod
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1457 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1457 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1457;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Mod is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Mod;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Mod,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12949 '<CreateSynthNodeBuilder at nodes.lkt:22701:9>' Builder_1 ada/nodes.lkt:22701
--# expr-start 12948 '<CreateSynthNodeBuilder at nodes.lkt:22702:18>' Builder ada/nodes.lkt:22702
--# expr-start 12945 '<Symbol Mod at nodes.lkt:22703:29>' Sym ada/nodes.lkt:22703
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mod_170); 
--# expr-done 12945
--# expr-start 12946 '<FieldAccess for universal_int_param at nodes.lkt:22704:29>' Fld ada/nodes.lkt:22704
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Param (Node => Self);
--# end
--# expr-done 12946
--# expr-start 12947 '<FieldAccess for base_type_expr at nodes.lkt:22705:34>' Fld_1 ada/nodes.lkt:22705
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12947
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12948
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12949
--# expr-start 12950 '<FieldAccess for base_type at nodes.lkt:22708:23>' Fld_2 ada/nodes.lkt:22708
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12950
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1457;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1457;
               Self.Bare_Type_Attributes_Repository_Lf_State_Mod :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Mod := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Mod := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Mod;
--# end
--# property-start TypeAttributesRepository.value ada/nodes.lkt:22711
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Value
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1458 with Inline_Always;
      Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_3 : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_4 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_2 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1458 is
            begin
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder_3);
                     Dec_Ref (Builder_4);
            end Finalizer_Scope_1458;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Value is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Value;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Value,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12962 '<CreateSynthNodeBuilder at nodes.lkt:22712:9>' Builder_4 ada/nodes.lkt:22712
--# expr-start 12961 '<CreateSynthNodeBuilder at nodes.lkt:22713:18>' Builder_3 ada/nodes.lkt:22713
--# expr-start 12951 '<Symbol Value at nodes.lkt:22714:29>' Sym ada/nodes.lkt:22714
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Value); 
--# expr-done 12951
--# expr-start 12959 '<CreateSynthNodeBuilder at nodes.lkt:22715:29>' Builder_2 ada/nodes.lkt:22715
--# expr-start 12952 '<Symbol Val at nodes.lkt:22716:32>' Sym_1 ada/nodes.lkt:22716
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Val); 
--# expr-done 12952
--# expr-start 12958 '<CreateSynthNodeBuilder at nodes.lkt:22717:32>' Builder_1 ada/nodes.lkt:22717
--# expr-start 12957 '<CreateCopyNodeBuilder at nodes.lkt:22718:37>' Builder ada/nodes.lkt:22718
--# expr-start 12956 '<FieldAccess for node at nodes.lkt:22718:37>' Fld_1 ada/nodes.lkt:22718
--# expr-start 12955 '<Cast to BaseTypeDecl at nodes.lkt:22718:37>' Cast_Result ada/nodes.lkt:22718
--# expr-start 12954 '<FieldAccess for std_entity at nodes.lkt:22718:37>' Fld ada/nodes.lkt:22718
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12953 '<Symbol String at nodes.lkt:22718:53>' Sym_2 ada/nodes.lkt:22718
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String); 
--# expr-done 12953
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_2);
--# end
--# expr-done 12954
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 12955
Fld_1 := Cast_Result.Node;
--# expr-done 12956
Builder := Create_Copy_Node_Builder (Fld_1); 
--# expr-done 12957
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 12958
Builder_2 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym_1, Builder_1); 
--# expr-done 12959
--# expr-start 12960 '<FieldAccess for base_type_expr at nodes.lkt:22724:34>' Fld_2 ada/nodes.lkt:22724
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12960
Builder_3 := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Builder_2, Fld_2); 
--# expr-done 12961
Builder_4 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_3); 
--# expr-done 12962
--# expr-start 12963 '<FieldAccess for base_type at nodes.lkt:22727:23>' Fld_3 ada/nodes.lkt:22727
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12963
      Cast_Result_1 := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_4).all.Build (Parent => Cast_Result_1, Self_Node => Self); 
      Cast_Result_2 := Cast_Expr;
         Property_Result := Cast_Result_2;
   --# end
      Finalizer_Scope_1458;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1458;
               Self.Bare_Type_Attributes_Repository_Lf_State_Value :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Value := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Value := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Value;
--# end
--# property-start TypeAttributesRepository.wide_value ada/nodes.lkt:22730
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Wide_Value
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1459 with Inline_Always;
      Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_3 : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_4 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_2 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1459 is
            begin
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder_3);
                     Dec_Ref (Builder_4);
            end Finalizer_Scope_1459;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Value is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Value;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Value,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12975 '<CreateSynthNodeBuilder at nodes.lkt:22731:9>' Builder_4 ada/nodes.lkt:22731
--# expr-start 12974 '<CreateSynthNodeBuilder at nodes.lkt:22732:18>' Builder_3 ada/nodes.lkt:22732
--# expr-start 12964 '<Symbol Wide_Value at nodes.lkt:22733:29>' Sym ada/nodes.lkt:22733
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Value); 
--# expr-done 12964
--# expr-start 12972 '<CreateSynthNodeBuilder at nodes.lkt:22734:29>' Builder_2 ada/nodes.lkt:22734
--# expr-start 12965 '<Symbol Val at nodes.lkt:22735:32>' Sym_1 ada/nodes.lkt:22735
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Val); 
--# expr-done 12965
--# expr-start 12971 '<CreateSynthNodeBuilder at nodes.lkt:22736:32>' Builder_1 ada/nodes.lkt:22736
--# expr-start 12970 '<CreateCopyNodeBuilder at nodes.lkt:22737:37>' Builder ada/nodes.lkt:22737
--# expr-start 12969 '<FieldAccess for node at nodes.lkt:22737:37>' Fld_1 ada/nodes.lkt:22737
--# expr-start 12968 '<Cast to BaseTypeDecl at nodes.lkt:22737:37>' Cast_Result ada/nodes.lkt:22737
--# expr-start 12967 '<FieldAccess for std_entity at nodes.lkt:22737:37>' Fld ada/nodes.lkt:22737
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12966 '<Symbol Wide_String at nodes.lkt:22737:53>' Sym_2 ada/nodes.lkt:22737
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_String); 
--# expr-done 12966
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_2);
--# end
--# expr-done 12967
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 12968
Fld_1 := Cast_Result.Node;
--# expr-done 12969
Builder := Create_Copy_Node_Builder (Fld_1); 
--# expr-done 12970
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 12971
Builder_2 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym_1, Builder_1); 
--# expr-done 12972
--# expr-start 12973 '<FieldAccess for base_type_expr at nodes.lkt:22743:34>' Fld_2 ada/nodes.lkt:22743
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12973
Builder_3 := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Builder_2, Fld_2); 
--# expr-done 12974
Builder_4 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_3); 
--# expr-done 12975
--# expr-start 12976 '<FieldAccess for base_type at nodes.lkt:22746:23>' Fld_3 ada/nodes.lkt:22746
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12976
      Cast_Result_1 := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_4).all.Build (Parent => Cast_Result_1, Self_Node => Self); 
      Cast_Result_2 := Cast_Expr;
         Property_Result := Cast_Result_2;
   --# end
      Finalizer_Scope_1459;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1459;
               Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Value :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Value := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Value := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Wide_Value;
--# end
--# property-start TypeAttributesRepository.wide_wide_value ada/nodes.lkt:22749
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Wide_Wide_Value
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1460 with Inline_Always;
      Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Sym_2 : Symbol_Type;
Fld : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_1 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_2 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_3 : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_4 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_2 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1460 is
            begin
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Builder_3);
                     Dec_Ref (Builder_4);
            end Finalizer_Scope_1460;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Value is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Wide_Value;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Value,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12988 '<CreateSynthNodeBuilder at nodes.lkt:22750:9>' Builder_4 ada/nodes.lkt:22750
--# expr-start 12987 '<CreateSynthNodeBuilder at nodes.lkt:22751:18>' Builder_3 ada/nodes.lkt:22751
--# expr-start 12977 '<Symbol Wide_Wide_Value at nodes.lkt:22752:29>' Sym ada/nodes.lkt:22752
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Value); 
--# expr-done 12977
--# expr-start 12985 '<CreateSynthNodeBuilder at nodes.lkt:22753:29>' Builder_2 ada/nodes.lkt:22753
--# expr-start 12978 '<Symbol Val at nodes.lkt:22754:32>' Sym_1 ada/nodes.lkt:22754
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Val); 
--# expr-done 12978
--# expr-start 12984 '<CreateSynthNodeBuilder at nodes.lkt:22755:32>' Builder_1 ada/nodes.lkt:22755
--# expr-start 12983 '<CreateCopyNodeBuilder at nodes.lkt:22756:37>' Builder ada/nodes.lkt:22756
--# expr-start 12982 '<FieldAccess for node at nodes.lkt:22756:37>' Fld_1 ada/nodes.lkt:22756
--# expr-start 12981 '<Cast to BaseTypeDecl at nodes.lkt:22756:37>' Cast_Result ada/nodes.lkt:22756
--# expr-start 12980 '<FieldAccess for std_entity at nodes.lkt:22756:37>' Fld ada/nodes.lkt:22756
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 12979 '<Symbol Wide_Wide_String at nodes.lkt:22756:53>' Sym_2 ada/nodes.lkt:22756
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_String); 
--# expr-done 12979
--# property-call-start AdaNode.std_entity
Fld := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_2);
--# end
--# expr-done 12980
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 12981
Fld_1 := Cast_Result.Node;
--# expr-done 12982
Builder := Create_Copy_Node_Builder (Fld_1); 
--# expr-done 12983
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 12984
Builder_2 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym_1, Builder_1); 
--# expr-done 12985
--# expr-start 12986 '<FieldAccess for base_type_expr at nodes.lkt:22762:34>' Fld_2 ada/nodes.lkt:22762
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_2 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12986
Builder_3 := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Builder_2, Fld_2); 
--# expr-done 12987
Builder_4 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_3); 
--# expr-done 12988
--# expr-start 12989 '<FieldAccess for base_type at nodes.lkt:22765:23>' Fld_3 ada/nodes.lkt:22765
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12989
      Cast_Result_1 := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_4).all.Build (Parent => Cast_Result_1, Self_Node => Self); 
      Cast_Result_2 := Cast_Expr;
         Property_Result := Cast_Result_2;
   --# end
      Finalizer_Scope_1460;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1460;
               Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Value :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Value := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Wide_Value := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Wide_Wide_Value;
--# end
--# property-start TypeAttributesRepository.fixed_value ada/nodes.lkt:22768
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Fixed_Value
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1461 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1461 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1461;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Fixed_Value is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Fixed_Value;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Fixed_Value,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 12994 '<CreateSynthNodeBuilder at nodes.lkt:22769:9>' Builder_1 ada/nodes.lkt:22769
--# expr-start 12993 '<CreateSynthNodeBuilder at nodes.lkt:22770:18>' Builder ada/nodes.lkt:22770
--# expr-start 12990 '<Symbol Fixed_Value at nodes.lkt:22771:29>' Sym ada/nodes.lkt:22771
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Fixed_Value); 
--# expr-done 12990
--# expr-start 12991 '<FieldAccess for universal_int_param at nodes.lkt:22772:29>' Fld ada/nodes.lkt:22772
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Param (Node => Self);
--# end
--# expr-done 12991
--# expr-start 12992 '<FieldAccess for base_type_expr at nodes.lkt:22773:34>' Fld_1 ada/nodes.lkt:22773
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12992
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12993
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 12994
--# expr-start 12995 '<FieldAccess for base_type at nodes.lkt:22776:23>' Fld_2 ada/nodes.lkt:22776
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 12995
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1461;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1461;
               Self.Bare_Type_Attributes_Repository_Lf_State_Fixed_Value :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Fixed_Value := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Fixed_Value := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Fixed_Value;
--# end
--# property-start TypeAttributesRepository.integer_value ada/nodes.lkt:22779
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Integer_Value
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1462 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1462 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1462;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Integer_Value is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Integer_Value;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Integer_Value,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13000 '<CreateSynthNodeBuilder at nodes.lkt:22780:9>' Builder_1 ada/nodes.lkt:22780
--# expr-start 12999 '<CreateSynthNodeBuilder at nodes.lkt:22781:18>' Builder ada/nodes.lkt:22781
--# expr-start 12996 '<Symbol Integer_Value at nodes.lkt:22782:29>' Sym ada/nodes.lkt:22782
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Integer_Value); 
--# expr-done 12996
--# expr-start 12997 '<FieldAccess for universal_real_param at nodes.lkt:22783:29>' Fld ada/nodes.lkt:22783
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_real_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Real_Param (Node => Self);
--# end
--# expr-done 12997
--# expr-start 12998 '<FieldAccess for base_type_expr at nodes.lkt:22784:34>' Fld_1 ada/nodes.lkt:22784
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 12998
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 12999
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 13000
--# expr-start 13001 '<FieldAccess for base_type at nodes.lkt:22787:23>' Fld_2 ada/nodes.lkt:22787
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13001
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1462;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1462;
               Self.Bare_Type_Attributes_Repository_Lf_State_Integer_Value :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Integer_Value := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Integer_Value := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Integer_Value;
--# end
--# property-start TypeAttributesRepository.pos ada/nodes.lkt:22790
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Pos
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1463 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1463 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1463;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Pos is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Pos;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Pos,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13006 '<CreateSynthNodeBuilder at nodes.lkt:22791:9>' Builder_1 ada/nodes.lkt:22791
--# expr-start 13005 '<CreateSynthNodeBuilder at nodes.lkt:22792:18>' Builder ada/nodes.lkt:22792
--# expr-start 13002 '<Symbol Pos at nodes.lkt:22793:29>' Sym ada/nodes.lkt:22793
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Pos); 
--# expr-done 13002
--# expr-start 13003 '<FieldAccess for base_type_param at nodes.lkt:22794:29>' Fld ada/nodes.lkt:22794
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13003
--# expr-start 13004 '<FieldAccess for universal_int_type_expr at nodes.lkt:22795:34>' Fld_1 ada/nodes.lkt:22795
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Type_Expr (Node => Self);
--# end
--# expr-done 13004
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 13005
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 13006
--# expr-start 13007 '<FieldAccess for base_type at nodes.lkt:22798:23>' Fld_2 ada/nodes.lkt:22798
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13007
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1463;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1463;
               Self.Bare_Type_Attributes_Repository_Lf_State_Pos :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Pos := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Pos := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Pos;
--# end
--# property-start TypeAttributesRepository.val_attr ada/nodes.lkt:22802
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Val_Attr
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1464 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1464 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1464;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Val_Attr is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Val_Attr;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Val_Attr,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13012 '<CreateSynthNodeBuilder at nodes.lkt:22803:9>' Builder_1 ada/nodes.lkt:22803
--# expr-start 13011 '<CreateSynthNodeBuilder at nodes.lkt:22804:18>' Builder ada/nodes.lkt:22804
--# expr-start 13008 '<Symbol Val at nodes.lkt:22805:29>' Sym ada/nodes.lkt:22805
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Val); 
--# expr-done 13008
--# expr-start 13009 '<FieldAccess for universal_int_param at nodes.lkt:22806:29>' Fld ada/nodes.lkt:22806
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Param (Node => Self);
--# end
--# expr-done 13009
--# expr-start 13010 '<FieldAccess for base_type_expr at nodes.lkt:22807:34>' Fld_1 ada/nodes.lkt:22807
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 13010
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 13011
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 13012
--# expr-start 13013 '<FieldAccess for base_type at nodes.lkt:22810:23>' Fld_2 ada/nodes.lkt:22810
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13013
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1464;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1464;
               Self.Bare_Type_Attributes_Repository_Lf_State_Val_Attr :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Val_Attr := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Val_Attr := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Val_Attr;
--# end
--# property-start TypeAttributesRepository.enum_rep ada/nodes.lkt:22813
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Enum_Rep
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1465 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1465 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1465;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Rep is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Enum_Rep;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Rep,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13018 '<CreateSynthNodeBuilder at nodes.lkt:22814:9>' Builder_1 ada/nodes.lkt:22814
--# expr-start 13017 '<CreateSynthNodeBuilder at nodes.lkt:22815:18>' Builder ada/nodes.lkt:22815
--# expr-start 13014 '<Symbol Enum_Rep at nodes.lkt:22816:29>' Sym ada/nodes.lkt:22816
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Enum_Rep); 
--# expr-done 13014
--# expr-start 13015 '<FieldAccess for base_type_param at nodes.lkt:22817:29>' Fld ada/nodes.lkt:22817
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13015
--# expr-start 13016 '<FieldAccess for universal_int_type_expr at nodes.lkt:22818:34>' Fld_1 ada/nodes.lkt:22818
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Type_Expr (Node => Self);
--# end
--# expr-done 13016
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 13017
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 13018
--# expr-start 13019 '<FieldAccess for base_type at nodes.lkt:22821:23>' Fld_2 ada/nodes.lkt:22821
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13019
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1465;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1465;
               Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Rep :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Rep := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Enum_Rep := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Enum_Rep;
--# end
--# property-start TypeAttributesRepository.enum_val ada/nodes.lkt:22824
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Enum_Val
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1466 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1466 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1466;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Val is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Enum_Val;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Val,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13024 '<CreateSynthNodeBuilder at nodes.lkt:22825:9>' Builder_1 ada/nodes.lkt:22825
--# expr-start 13023 '<CreateSynthNodeBuilder at nodes.lkt:22826:18>' Builder ada/nodes.lkt:22826
--# expr-start 13020 '<Symbol Enum_Val at nodes.lkt:22827:29>' Sym ada/nodes.lkt:22827
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Enum_Val); 
--# expr-done 13020
--# expr-start 13021 '<FieldAccess for universal_int_param at nodes.lkt:22828:29>' Fld ada/nodes.lkt:22828
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_int_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Int_Param (Node => Self);
--# end
--# expr-done 13021
--# expr-start 13022 '<FieldAccess for base_type_expr at nodes.lkt:22829:34>' Fld_1 ada/nodes.lkt:22829
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 13022
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 13023
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 13024
--# expr-start 13025 '<FieldAccess for base_type at nodes.lkt:22832:23>' Fld_2 ada/nodes.lkt:22832
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13025
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1466;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1466;
               Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Val :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Enum_Val := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Enum_Val := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Enum_Val;
--# end
--# property-start TypeAttributesRepository.read ada/nodes.lkt:22835
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Read
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1467 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Builder : Bare_Type_Expr_Node_Builder;
Builder_1 : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_2 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1467 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
            end Finalizer_Scope_1467;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Read is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Read;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Read,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13031 '<CreateSynthNodeBuilder at nodes.lkt:22836:9>' Builder_2 ada/nodes.lkt:22836
--# expr-start 13030 '<CreateSynthNodeBuilder at nodes.lkt:22837:18>' Builder_1 ada/nodes.lkt:22837
--# expr-start 13026 '<Symbol Read at nodes.lkt:22838:29>' Sym ada/nodes.lkt:22838
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Read); 
--# expr-done 13026
--# expr-start 13027 '<FieldAccess for root_stream_param at nodes.lkt:22839:28>' Fld ada/nodes.lkt:22839
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.root_stream_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Root_Stream_Param (Node => Self);
--# end
--# expr-done 13027
--# expr-start 13028 '<FieldAccess for base_type_param at nodes.lkt:22840:29>' Fld_1 ada/nodes.lkt:22840
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13028
--# expr-start 13029 '<CreateCopyNodeBuilder at nodes.lkt:22841:34>' Builder ada/nodes.lkt:22841
Builder := Create_Copy_Node_Builder (No_Bare_Ada_Node); 
--# expr-done 13029
Builder_1 := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Builder); 
--# expr-done 13030
Builder_2 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_1); 
--# expr-done 13031
--# expr-start 13032 '<FieldAccess for base_type at nodes.lkt:22844:23>' Fld_2 ada/nodes.lkt:22844
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13032
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_2).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1467;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1467;
               Self.Bare_Type_Attributes_Repository_Lf_State_Read :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Read := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Read := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Read;
--# end
--# property-start TypeAttributesRepository.write ada/nodes.lkt:22847
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Write
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1468 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Builder : Bare_Type_Expr_Node_Builder;
Builder_1 : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_2 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1468 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
            end Finalizer_Scope_1468;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Write is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Write;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Write,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13038 '<CreateSynthNodeBuilder at nodes.lkt:22848:9>' Builder_2 ada/nodes.lkt:22848
--# expr-start 13037 '<CreateSynthNodeBuilder at nodes.lkt:22849:18>' Builder_1 ada/nodes.lkt:22849
--# expr-start 13033 '<Symbol Write at nodes.lkt:22850:29>' Sym ada/nodes.lkt:22850
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Write); 
--# expr-done 13033
--# expr-start 13034 '<FieldAccess for root_stream_param at nodes.lkt:22851:28>' Fld ada/nodes.lkt:22851
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.root_stream_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Root_Stream_Param (Node => Self);
--# end
--# expr-done 13034
--# expr-start 13035 '<FieldAccess for base_type_param at nodes.lkt:22852:29>' Fld_1 ada/nodes.lkt:22852
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13035
--# expr-start 13036 '<CreateCopyNodeBuilder at nodes.lkt:22853:34>' Builder ada/nodes.lkt:22853
Builder := Create_Copy_Node_Builder (No_Bare_Ada_Node); 
--# expr-done 13036
Builder_1 := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Builder); 
--# expr-done 13037
Builder_2 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_1); 
--# expr-done 13038
--# expr-start 13039 '<FieldAccess for base_type at nodes.lkt:22856:23>' Fld_2 ada/nodes.lkt:22856
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13039
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_2).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1468;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1468;
               Self.Bare_Type_Attributes_Repository_Lf_State_Write :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Write := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Write := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Write;
--# end
--# property-start TypeAttributesRepository.input ada/nodes.lkt:22859
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Input
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1469 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1469 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1469;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Input is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Input;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Input,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13044 '<CreateSynthNodeBuilder at nodes.lkt:22860:9>' Builder_1 ada/nodes.lkt:22860
--# expr-start 13043 '<CreateSynthNodeBuilder at nodes.lkt:22861:18>' Builder ada/nodes.lkt:22861
--# expr-start 13040 '<Symbol Input at nodes.lkt:22862:29>' Sym ada/nodes.lkt:22862
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Input); 
--# expr-done 13040
--# expr-start 13041 '<FieldAccess for root_stream_param at nodes.lkt:22863:29>' Fld ada/nodes.lkt:22863
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.root_stream_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Root_Stream_Param (Node => Self);
--# end
--# expr-done 13041
--# expr-start 13042 '<FieldAccess for base_type_expr at nodes.lkt:22864:34>' Fld_1 ada/nodes.lkt:22864
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 13042
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 13043
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 13044
--# expr-start 13045 '<FieldAccess for base_type at nodes.lkt:22867:23>' Fld_2 ada/nodes.lkt:22867
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13045
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1469;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1469;
               Self.Bare_Type_Attributes_Repository_Lf_State_Input :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Input := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Input := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Input;
--# end
--# property-start TypeAttributesRepository.output ada/nodes.lkt:22870
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Output
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1470 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Builder : Bare_Type_Expr_Node_Builder;
Builder_1 : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_2 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1470 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
            end Finalizer_Scope_1470;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Output is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Output;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Output,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13051 '<CreateSynthNodeBuilder at nodes.lkt:22871:9>' Builder_2 ada/nodes.lkt:22871
--# expr-start 13050 '<CreateSynthNodeBuilder at nodes.lkt:22872:18>' Builder_1 ada/nodes.lkt:22872
--# expr-start 13046 '<Symbol Output at nodes.lkt:22873:29>' Sym ada/nodes.lkt:22873
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Output); 
--# expr-done 13046
--# expr-start 13047 '<FieldAccess for root_stream_param at nodes.lkt:22874:28>' Fld ada/nodes.lkt:22874
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.root_stream_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Root_Stream_Param (Node => Self);
--# end
--# expr-done 13047
--# expr-start 13048 '<FieldAccess for base_type_param at nodes.lkt:22875:29>' Fld_1 ada/nodes.lkt:22875
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13048
--# expr-start 13049 '<CreateCopyNodeBuilder at nodes.lkt:22876:34>' Builder ada/nodes.lkt:22876
Builder := Create_Copy_Node_Builder (No_Bare_Ada_Node); 
--# expr-done 13049
Builder_1 := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Fld, Fld_1, Builder); 
--# expr-done 13050
Builder_2 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_1); 
--# expr-done 13051
--# expr-start 13052 '<FieldAccess for base_type at nodes.lkt:22879:23>' Fld_2 ada/nodes.lkt:22879
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13052
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_2).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1470;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1470;
               Self.Bare_Type_Attributes_Repository_Lf_State_Output :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Output := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Output := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Output;
--# end
--# property-start TypeAttributesRepository.image ada/nodes.lkt:22882
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Image
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1471 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Sym_1 : Symbol_Type;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_3 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_2 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1471 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Builder_3);
            end Finalizer_Scope_1471;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Image is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Image;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Image,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13062 '<CreateSynthNodeBuilder at nodes.lkt:22883:9>' Builder_3 ada/nodes.lkt:22883
--# expr-start 13061 '<CreateSynthNodeBuilder at nodes.lkt:22884:18>' Builder_2 ada/nodes.lkt:22884
--# expr-start 13053 '<Symbol Image at nodes.lkt:22885:29>' Sym ada/nodes.lkt:22885
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Image); 
--# expr-done 13053
--# expr-start 13054 '<FieldAccess for base_type_param at nodes.lkt:22886:29>' Fld ada/nodes.lkt:22886
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13054
--# expr-start 13060 '<CreateSynthNodeBuilder at nodes.lkt:22887:34>' Builder_1 ada/nodes.lkt:22887
--# expr-start 13059 '<CreateCopyNodeBuilder at nodes.lkt:22888:33>' Builder ada/nodes.lkt:22888
--# expr-start 13058 '<FieldAccess for node at nodes.lkt:22888:33>' Fld_2 ada/nodes.lkt:22888
--# expr-start 13057 '<Cast to BaseTypeDecl at nodes.lkt:22888:33>' Cast_Result ada/nodes.lkt:22888
--# expr-start 13056 '<FieldAccess for std_entity at nodes.lkt:22888:33>' Fld_1 ada/nodes.lkt:22888
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13055 '<Symbol String at nodes.lkt:22888:49>' Sym_1 ada/nodes.lkt:22888
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String); 
--# expr-done 13055
--# property-call-start AdaNode.std_entity
Fld_1 := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_1);
--# end
--# expr-done 13056
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 13057
Fld_2 := Cast_Result.Node;
--# expr-done 13058
Builder := Create_Copy_Node_Builder (Fld_2); 
--# expr-done 13059
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 13060
Builder_2 := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Builder_1); 
--# expr-done 13061
Builder_3 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_2); 
--# expr-done 13062
--# expr-start 13063 '<FieldAccess for base_type at nodes.lkt:22895:23>' Fld_3 ada/nodes.lkt:22895
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13063
      Cast_Result_1 := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_3).all.Build (Parent => Cast_Result_1, Self_Node => Self); 
      Cast_Result_2 := Cast_Expr;
         Property_Result := Cast_Result_2;
   --# end
      Finalizer_Scope_1471;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1471;
               Self.Bare_Type_Attributes_Repository_Lf_State_Image :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Image := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Image := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Image;
--# end
--# property-start TypeAttributesRepository.wide_image ada/nodes.lkt:22898
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Wide_Image
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1472 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Sym_1 : Symbol_Type;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_3 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_2 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1472 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Builder_3);
            end Finalizer_Scope_1472;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Image is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Image;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Image,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13073 '<CreateSynthNodeBuilder at nodes.lkt:22899:9>' Builder_3 ada/nodes.lkt:22899
--# expr-start 13072 '<CreateSynthNodeBuilder at nodes.lkt:22900:18>' Builder_2 ada/nodes.lkt:22900
--# expr-start 13064 '<Symbol Wide_Image at nodes.lkt:22901:29>' Sym ada/nodes.lkt:22901
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Image); 
--# expr-done 13064
--# expr-start 13065 '<FieldAccess for base_type_param at nodes.lkt:22902:29>' Fld ada/nodes.lkt:22902
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13065
--# expr-start 13071 '<CreateSynthNodeBuilder at nodes.lkt:22903:34>' Builder_1 ada/nodes.lkt:22903
--# expr-start 13070 '<CreateCopyNodeBuilder at nodes.lkt:22904:33>' Builder ada/nodes.lkt:22904
--# expr-start 13069 '<FieldAccess for node at nodes.lkt:22904:33>' Fld_2 ada/nodes.lkt:22904
--# expr-start 13068 '<Cast to BaseTypeDecl at nodes.lkt:22904:33>' Cast_Result ada/nodes.lkt:22904
--# expr-start 13067 '<FieldAccess for std_entity at nodes.lkt:22904:33>' Fld_1 ada/nodes.lkt:22904
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13066 '<Symbol Wide_String at nodes.lkt:22904:49>' Sym_1 ada/nodes.lkt:22904
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_String); 
--# expr-done 13066
--# property-call-start AdaNode.std_entity
Fld_1 := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_1);
--# end
--# expr-done 13067
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 13068
Fld_2 := Cast_Result.Node;
--# expr-done 13069
Builder := Create_Copy_Node_Builder (Fld_2); 
--# expr-done 13070
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 13071
Builder_2 := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Builder_1); 
--# expr-done 13072
Builder_3 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_2); 
--# expr-done 13073
--# expr-start 13074 '<FieldAccess for base_type at nodes.lkt:22911:23>' Fld_3 ada/nodes.lkt:22911
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13074
      Cast_Result_1 := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_3).all.Build (Parent => Cast_Result_1, Self_Node => Self); 
      Cast_Result_2 := Cast_Expr;
         Property_Result := Cast_Result_2;
   --# end
      Finalizer_Scope_1472;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1472;
               Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Image :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Image := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Image := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Wide_Image;
--# end
--# property-start TypeAttributesRepository.wide_wide_image ada/nodes.lkt:22914
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Wide_Wide_Image
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1473 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Sym_1 : Symbol_Type;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_3 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_3 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_2 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1473 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Builder_3);
            end Finalizer_Scope_1473;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Image is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Wide_Image;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Image,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13084 '<CreateSynthNodeBuilder at nodes.lkt:22915:9>' Builder_3 ada/nodes.lkt:22915
--# expr-start 13083 '<CreateSynthNodeBuilder at nodes.lkt:22916:18>' Builder_2 ada/nodes.lkt:22916
--# expr-start 13075 '<Symbol Wide_Wide_Image at nodes.lkt:22917:29>' Sym ada/nodes.lkt:22917
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_Image); 
--# expr-done 13075
--# expr-start 13076 '<FieldAccess for base_type_param at nodes.lkt:22918:29>' Fld ada/nodes.lkt:22918
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13076
--# expr-start 13082 '<CreateSynthNodeBuilder at nodes.lkt:22919:34>' Builder_1 ada/nodes.lkt:22919
--# expr-start 13081 '<CreateCopyNodeBuilder at nodes.lkt:22920:33>' Builder ada/nodes.lkt:22920
--# expr-start 13080 '<FieldAccess for node at nodes.lkt:22920:33>' Fld_2 ada/nodes.lkt:22920
--# expr-start 13079 '<Cast to BaseTypeDecl at nodes.lkt:22920:33>' Cast_Result ada/nodes.lkt:22920
--# expr-start 13078 '<FieldAccess for std_entity at nodes.lkt:22920:33>' Fld_1 ada/nodes.lkt:22920
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13077 '<Symbol Wide_Wide_String at nodes.lkt:22920:49>' Sym_1 ada/nodes.lkt:22920
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Wide_Wide_String); 
--# expr-done 13077
--# property-call-start AdaNode.std_entity
Fld_1 := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_1);
--# end
--# expr-done 13078
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 13079
Fld_2 := Cast_Result.Node;
--# expr-done 13080
Builder := Create_Copy_Node_Builder (Fld_2); 
--# expr-done 13081
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 13082
Builder_2 := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Builder_1); 
--# expr-done 13083
Builder_3 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_2); 
--# expr-done 13084
--# expr-start 13085 '<FieldAccess for base_type at nodes.lkt:22927:23>' Fld_3 ada/nodes.lkt:22927
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13085
      Cast_Result_1 := Fld_3;
Cast_Expr := Node_Builder_Type'(Builder_3).all.Build (Parent => Cast_Result_1, Self_Node => Self); 
      Cast_Result_2 := Cast_Expr;
         Property_Result := Cast_Result_2;
   --# end
      Finalizer_Scope_1473;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1473;
               Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Image :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Wide_Wide_Image := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Wide_Wide_Image := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Wide_Wide_Image;
--# end
--# property-start TypeAttributesRepository.put_image ada/nodes.lkt:22930
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Put_Image
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1474 with Inline_Always;
      Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Classwide_Type_Decl;
Fld_2 : Bare_Classwide_Type_Decl;
Builder : Bare_Classwide_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_3 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Builder_3 : Bare_Type_Expr_Node_Builder;
Builder_4 : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_5 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_4 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1474 is
            begin
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Builder_3);
                     Dec_Ref (Builder_4);
                     Dec_Ref (Builder_5);
            end Finalizer_Scope_1474;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Put_Image is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Put_Image;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Put_Image,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13097 '<CreateSynthNodeBuilder at nodes.lkt:22931:9>' Builder_5 ada/nodes.lkt:22931
--# expr-start 13096 '<CreateSynthNodeBuilder at nodes.lkt:22932:18>' Builder_4 ada/nodes.lkt:22932
--# expr-start 13086 '<Symbol Put_Image at nodes.lkt:22933:29>' Sym ada/nodes.lkt:22933
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Put_Image); 
--# expr-done 13086
--# expr-start 13093 '<CreateSynthNodeBuilder at nodes.lkt:22934:28>' Builder_2 ada/nodes.lkt:22934
--# expr-start 13087 '<Symbol Buffer at nodes.lkt:22935:32>' Sym_1 ada/nodes.lkt:22935
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Buffer); 
--# expr-done 13087
--# expr-start 13092 '<CreateSynthNodeBuilder at nodes.lkt:22936:32>' Builder_1 ada/nodes.lkt:22936
--# expr-start 13091 '<CreateCopyNodeBuilder at nodes.lkt:22937:37>' Builder ada/nodes.lkt:22937
--# expr-start 13090 '<FieldAccess for node at nodes.lkt:22937:37>' Fld_2 ada/nodes.lkt:22937
--# expr-start 13089 '<FieldAccess for classwide_type at nodes.lkt:22937:37>' Fld_1 ada/nodes.lkt:22937
--# expr-start 13088 '<FieldAccess for root_buffer_type at nodes.lkt:22937:37>' Fld ada/nodes.lkt:22937
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_buffer_type
Fld := Libadalang.Implementation.Ada_Node_P_Root_Buffer_Type (Node => Self);
--# end
--# expr-done 13088
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.classwide_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Classwide_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 13089
Fld_2 := Fld_1.Node;
--# expr-done 13090
Builder := Create_Copy_Node_Builder (Fld_2); 
--# expr-done 13091
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 13092
Builder_2 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym_1, Builder_1); 
--# expr-done 13093
--# expr-start 13094 '<FieldAccess for base_type_param at nodes.lkt:22942:29>' Fld_3 ada/nodes.lkt:22942
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_3 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13094
--# expr-start 13095 '<CreateCopyNodeBuilder at nodes.lkt:22943:34>' Builder_3 ada/nodes.lkt:22943
Builder_3 := Create_Copy_Node_Builder (No_Bare_Ada_Node); 
--# expr-done 13095
Builder_4 := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym, Builder_2, Fld_3, Builder_3); 
--# expr-done 13096
Builder_5 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_4); 
--# expr-done 13097
--# expr-start 13098 '<FieldAccess for base_type at nodes.lkt:22946:23>' Fld_4 ada/nodes.lkt:22946
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13098
      Cast_Result := Fld_4;
Cast_Expr := Node_Builder_Type'(Builder_5).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1474;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1474;
               Self.Bare_Type_Attributes_Repository_Lf_State_Put_Image :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Put_Image := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Put_Image := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Put_Image;
--# end
--# property-start TypeAttributesRepository.asm_input ada/nodes.lkt:22949
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Asm_Input
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1475 with Inline_Always;
            procedure Finalizer_Scope_3593 with Inline_Always;
      Local_Input_Type : Bare_Base_Type_Decl;
Var_Expr_290 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Fld_2 : Bare_Ada_Node;
Scope_Result : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Cast_Result : Bare_Base_Type_Decl;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Fld_3 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_5 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Builder_3 : Bare_Base_Type_Decl_Node_Builder;
Builder_4 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_5 : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_6 : Bare_Synthetic_Subp_Decl_Node_Builder;
Let_Result : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_6 : Bare_Base_Type_Decl;
Cast_Result_2 : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_3 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1475 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Builder_3);
                     Dec_Ref (Builder_4);
                     Dec_Ref (Builder_5);
                     Dec_Ref (Builder_6);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1475;
            procedure Finalizer_Scope_3593 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3593;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Input is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Asm_Input;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Input,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13122 '<Let at nodes.lkt:22951:13>' Let_Result ada/nodes.lkt:22951
--# scope-start
--# expr-start 13107 '<Cast to BaseTypeDecl at nodes.lkt:22952:17>' Cast_Result ada/nodes.lkt:22952
--# expr-start 13102 '<FieldAccess for get_unit_root_decl at nodes.lkt:22952:17>' Fld ada/nodes.lkt:22952
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13101 '<ArrayLiteral at nodes.lkt:22953:21>' Array_Lit ada/nodes.lkt:22953
--# expr-start 13099 '<Symbol System at nodes.lkt:22953:22>' Sym ada/nodes.lkt:22953
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_System); 
--# expr-done 13099
--# expr-start 13100 '<Symbol Machine_Code at nodes.lkt:22953:33>' Sym_1 ada/nodes.lkt:22953
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Code); 
--# expr-done 13100
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 13101
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 13102
Var_Expr_290 := Fld;
if Var_Expr_290 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 13106 '<FieldAccess for node at nodes.lkt:22952:17>' Fld_2 ada/nodes.lkt:22952
--# expr-start 13105 '<EnvGet at nodes.lkt:22952:17>' Env_Get_Result ada/nodes.lkt:22952
--# expr-start 13103 '<FieldAccess for children_env at nodes.lkt:22952:17>' Fld_1 ada/nodes.lkt:22952
      if Var_Expr_290 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_290);
--# expr-done 13103
--# expr-start 13104 '<Symbol Asm_Input_Operand at nodes.lkt:22957:28>' Sym_2 ada/nodes.lkt:22957
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asm_Input_Operand); 
--# expr-done 13104
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 13105
Fld_2 := Env_Get_Result.Node;
--# expr-done 13106
Scope_Result := Fld_2;
   --# end
      Finalizer_Scope_3593;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
   if Result_Var = null
      or else Result_Var.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Result_Var;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13107
Local_Input_Type := Cast_Result; 
--# bind input_type Local_Input_Type
--# expr-start 13121 '<CreateSynthNodeBuilder at nodes.lkt:22961:13>' Builder_6 ada/nodes.lkt:22961
--# expr-start 13120 '<CreateSynthNodeBuilder at nodes.lkt:22962:22>' Builder_5 ada/nodes.lkt:22962
--# expr-start 13108 '<Symbol Asm_Input at nodes.lkt:22963:33>' Sym_3 ada/nodes.lkt:22963
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asm_Input); 
--# expr-done 13108
--# expr-start 13116 '<CreateSynthNodeBuilder at nodes.lkt:22964:32>' Builder_2 ada/nodes.lkt:22964
--# expr-start 13109 '<Symbol S at nodes.lkt:22965:36>' Sym_4 ada/nodes.lkt:22965
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_S); 
--# expr-done 13109
--# expr-start 13115 '<CreateSynthNodeBuilder at nodes.lkt:22966:36>' Builder_1 ada/nodes.lkt:22966
--# expr-start 13114 '<CreateCopyNodeBuilder at nodes.lkt:22967:41>' Builder ada/nodes.lkt:22967
--# expr-start 13113 '<FieldAccess for node at nodes.lkt:22967:41>' Fld_4 ada/nodes.lkt:22967
--# expr-start 13112 '<Cast to BaseTypeDecl at nodes.lkt:22967:41>' Cast_Result_1 ada/nodes.lkt:22967
--# expr-start 13111 '<FieldAccess for std_entity at nodes.lkt:22967:41>' Fld_3 ada/nodes.lkt:22967
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13110 '<Symbol String at nodes.lkt:22967:57>' Sym_5 ada/nodes.lkt:22967
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String); 
--# expr-done 13110
--# property-call-start AdaNode.std_entity
Fld_3 := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_5);
--# end
--# expr-done 13111
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result_1 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 13112
Fld_4 := Cast_Result_1.Node;
--# expr-done 13113
Builder := Create_Copy_Node_Builder (Fld_4); 
--# expr-done 13114
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 13115
Builder_2 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym_4, Builder_1); 
--# expr-done 13116
--# expr-start 13117 '<FieldAccess for base_type_param at nodes.lkt:22973:33>' Fld_5 ada/nodes.lkt:22973
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_5 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13117
--# expr-start 13119 '<CreateSynthNodeBuilder at nodes.lkt:22974:38>' Builder_4 ada/nodes.lkt:22974
--# expr-start 13118 '<CreateCopyNodeBuilder at nodes.lkt:22975:37>' Builder_3 ada/nodes.lkt:22975
Builder_3 := Create_Copy_Node_Builder (Local_Input_Type); 
--# expr-done 13118
Builder_4 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder_3); 
--# expr-done 13119
Builder_5 := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym_3, Builder_2, Fld_5, Builder_4); 
--# expr-done 13120
Builder_6 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_5); 
--# expr-done 13121
Let_Result := Builder_6; Inc_Ref (Let_Result);
--# end
--# expr-done 13122
--# expr-start 13123 '<FieldAccess for base_type at nodes.lkt:22980:23>' Fld_6 ada/nodes.lkt:22980
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13123
      Cast_Result_2 := Fld_6;
Cast_Expr := Node_Builder_Type'(Let_Result).all.Build (Parent => Cast_Result_2, Self_Node => Self); 
      Cast_Result_3 := Cast_Expr;
         Property_Result := Cast_Result_3;
   --# end
      Finalizer_Scope_1475;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1475;
                     Finalizer_Scope_3593;
               Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Input :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Input := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Asm_Input := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Asm_Input;
--# end
--# property-start TypeAttributesRepository.asm_output ada/nodes.lkt:22983
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Asm_Output
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1476 with Inline_Always;
            procedure Finalizer_Scope_3594 with Inline_Always;
      Local_Output_Type : Bare_Base_Type_Decl;
Var_Expr_291 : Bare_Basic_Decl;
Sym : Symbol_Type;
Sym_1 : Symbol_Type;
Array_Lit : Symbol_Type_Array_Access;
Fld : Bare_Basic_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Sym_2 : Symbol_Type;
Env_Get_Result : Internal_Entity;
Fld_2 : Bare_Ada_Node;
Scope_Result : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Cast_Result : Bare_Base_Type_Decl;
Sym_3 : Symbol_Type;
Sym_4 : Symbol_Type;
Sym_5 : Symbol_Type;
Fld_3 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Base_Type_Decl;
Builder : Bare_Base_Type_Decl_Node_Builder;
Builder_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_2 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_5 : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Builder_3 : Bare_Base_Type_Decl_Node_Builder;
Builder_4 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder_5 : Bare_Synthetic_Binary_Spec_Node_Builder;
Builder_6 : Bare_Synthetic_Subp_Decl_Node_Builder;
Let_Result : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_6 : Bare_Base_Type_Decl;
Cast_Result_2 : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_3 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1476 is
            begin
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
                     Dec_Ref (Builder_2);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Builder_3);
                     Dec_Ref (Builder_4);
                     Dec_Ref (Builder_5);
                     Dec_Ref (Builder_6);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1476;
            procedure Finalizer_Scope_3594 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3594;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Output is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Asm_Output;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Output,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13147 '<Let at nodes.lkt:22985:13>' Let_Result ada/nodes.lkt:22985
--# scope-start
--# expr-start 13132 '<Cast to BaseTypeDecl at nodes.lkt:22986:17>' Cast_Result ada/nodes.lkt:22986
--# expr-start 13127 '<FieldAccess for get_unit_root_decl at nodes.lkt:22986:17>' Fld ada/nodes.lkt:22986
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13126 '<ArrayLiteral at nodes.lkt:22987:21>' Array_Lit ada/nodes.lkt:22987
--# expr-start 13124 '<Symbol System at nodes.lkt:22987:22>' Sym ada/nodes.lkt:22987
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_System); 
--# expr-done 13124
--# expr-start 13125 '<Symbol Machine_Code at nodes.lkt:22987:33>' Sym_1 ada/nodes.lkt:22987
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Machine_Code); 
--# expr-done 13125
Array_Lit := Create_Symbol_Type_Array (Internal_Symbol_Type_Array'(1 => Sym, 2 => Sym_1)); 
--# expr-done 13126
--# property-call-start AdaNode.get_unit_root_decl
Fld := Libadalang.Implementation.Ada_Node_P_Get_Unit_Root_Decl (Node => Self, Name => Array_Lit, Kind => Unit_Specification);
--# end
--# expr-done 13127
Var_Expr_291 := Fld;
if Var_Expr_291 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 13131 '<FieldAccess for node at nodes.lkt:22986:17>' Fld_2 ada/nodes.lkt:22986
--# expr-start 13130 '<EnvGet at nodes.lkt:22986:17>' Env_Get_Result ada/nodes.lkt:22986
--# expr-start 13128 '<FieldAccess for children_env at nodes.lkt:22986:17>' Fld_1 ada/nodes.lkt:22986
      if Var_Expr_291 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Children_Env (Node => Var_Expr_291);
--# expr-done 13128
--# expr-start 13129 '<Symbol Asm_Output_Operand at nodes.lkt:22991:28>' Sym_2 ada/nodes.lkt:22991
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asm_Output_Operand); 
--# expr-done 13129
Env_Get_Result := AST_Envs.Get_First (Self => Fld_1, Key => Thin (Sym_2), Lookup_Kind => To_Lookup_Kind_Type (Flat), Categories => (Inherited_Primitives => True, Nocat => True)); 
--# expr-done 13130
Fld_2 := Env_Get_Result.Node;
--# expr-done 13131
Scope_Result := Fld_2;
   --# end
      Finalizer_Scope_3594;
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
   if Result_Var = null
      or else Result_Var.Kind in Ada_Base_Type_Decl
   then
      Cast_Result := Result_Var;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13132
Local_Output_Type := Cast_Result; 
--# bind output_type Local_Output_Type
--# expr-start 13146 '<CreateSynthNodeBuilder at nodes.lkt:22995:13>' Builder_6 ada/nodes.lkt:22995
--# expr-start 13145 '<CreateSynthNodeBuilder at nodes.lkt:22996:22>' Builder_5 ada/nodes.lkt:22996
--# expr-start 13133 '<Symbol Asm_Output at nodes.lkt:22997:33>' Sym_3 ada/nodes.lkt:22997
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Asm_Output); 
--# expr-done 13133
--# expr-start 13141 '<CreateSynthNodeBuilder at nodes.lkt:22998:32>' Builder_2 ada/nodes.lkt:22998
--# expr-start 13134 '<Symbol S at nodes.lkt:22999:36>' Sym_4 ada/nodes.lkt:22999
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_S); 
--# expr-done 13134
--# expr-start 13140 '<CreateSynthNodeBuilder at nodes.lkt:23000:36>' Builder_1 ada/nodes.lkt:23000
--# expr-start 13139 '<CreateCopyNodeBuilder at nodes.lkt:23001:41>' Builder ada/nodes.lkt:23001
--# expr-start 13138 '<FieldAccess for node at nodes.lkt:23001:41>' Fld_4 ada/nodes.lkt:23001
--# expr-start 13137 '<Cast to BaseTypeDecl at nodes.lkt:23001:41>' Cast_Result_1 ada/nodes.lkt:23001
--# expr-start 13136 '<FieldAccess for std_entity at nodes.lkt:23001:41>' Fld_3 ada/nodes.lkt:23001
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13135 '<Symbol String at nodes.lkt:23001:57>' Sym_5 ada/nodes.lkt:23001
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_String); 
--# expr-done 13135
--# property-call-start AdaNode.std_entity
Fld_3 := Libadalang.Implementation.Ada_Node_P_Std_Entity (Node => Self, Sym => Sym_5);
--# end
--# expr-done 13136
   if Fld_3.Node = null
      or else Fld_3.Node.Kind in Ada_Base_Type_Decl
   then
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_3.Node,
         Info => Fld_3.Info);
   else
         Cast_Result_1 := No_Entity_Base_Type_Decl;
   end if;
--# expr-done 13137
Fld_4 := Cast_Result_1.Node;
--# expr-done 13138
Builder := Create_Copy_Node_Builder (Fld_4); 
--# expr-done 13139
Builder_1 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder); 
--# expr-done 13140
Builder_2 := Create_Bare_Synthetic_Formal_Param_Decl_Node_Builder (Sym_4, Builder_1); 
--# expr-done 13141
--# expr-start 13142 '<FieldAccess for base_type_param at nodes.lkt:23007:33>' Fld_5 ada/nodes.lkt:23007
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_param
Fld_5 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Param (Node => Self);
--# end
--# expr-done 13142
--# expr-start 13144 '<CreateSynthNodeBuilder at nodes.lkt:23008:38>' Builder_4 ada/nodes.lkt:23008
--# expr-start 13143 '<CreateCopyNodeBuilder at nodes.lkt:23009:37>' Builder_3 ada/nodes.lkt:23009
Builder_3 := Create_Copy_Node_Builder (Local_Output_Type); 
--# expr-done 13143
Builder_4 := Create_Bare_Synthetic_Type_Expr_Node_Builder (Builder_3); 
--# expr-done 13144
Builder_5 := Create_Bare_Synthetic_Binary_Spec_Node_Builder (Sym_3, Builder_2, Fld_5, Builder_4); 
--# expr-done 13145
Builder_6 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder_5); 
--# expr-done 13146
Let_Result := Builder_6; Inc_Ref (Let_Result);
--# end
--# expr-done 13147
--# expr-start 13148 '<FieldAccess for base_type at nodes.lkt:23014:23>' Fld_6 ada/nodes.lkt:23014
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13148
      Cast_Result_2 := Fld_6;
Cast_Expr := Node_Builder_Type'(Let_Result).all.Build (Parent => Cast_Result_2, Self_Node => Self); 
      Cast_Result_3 := Cast_Expr;
         Property_Result := Cast_Result_3;
   --# end
      Finalizer_Scope_1476;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1476;
                     Finalizer_Scope_3594;
               Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Output :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Asm_Output := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Asm_Output := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Asm_Output;
--# end
--# property-start TypeAttributesRepository.model ada/nodes.lkt:23017
pragma Warnings (Off, "is not referenced");
 function Type_Attributes_Repository_F_Model
  (Node : Bare_Type_Attributes_Repository
  )
   return Bare_Basic_Subp_Decl
is
   Self : Bare_Type_Attributes_Repository  := Bare_Type_Attributes_Repository (Node);
      --# bind self Self
   Property_Result : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1477 with Inline_Always;
      Sym : Symbol_Type;
Fld : Bare_Synthetic_Formal_Param_Decl_Node_Builder;
Fld_1 : Bare_Synthetic_Type_Expr_Node_Builder;
Builder : Bare_Synthetic_Unary_Spec_Node_Builder;
Builder_1 : Bare_Synthetic_Subp_Decl_Node_Builder;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result : Bare_Ada_Node;
Cast_Expr : Bare_Synthetic_Subp_Decl;
Cast_Result_1 : Bare_Basic_Subp_Decl;
            procedure Finalizer_Scope_1477 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Builder);
                     Dec_Ref (Builder_1);
            end Finalizer_Scope_1477;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      case Self.Bare_Type_Attributes_Repository_Lf_State_Model is
         when Uninitialized =>
            null;
         when Initialized =>
            Property_Result := Self.Bare_Type_Attributes_Repository_Lf_Stg_Model;
            return Property_Result;
         when Error_Initialization_State =>
            Reraise_Initialization_Error
              (Self,
               Self.Bare_Type_Attributes_Repository_Lf_State_Model,
               "lazy field memoization");
      end case;
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13153 '<CreateSynthNodeBuilder at nodes.lkt:23018:9>' Builder_1 ada/nodes.lkt:23018
--# expr-start 13152 '<CreateSynthNodeBuilder at nodes.lkt:23019:18>' Builder ada/nodes.lkt:23019
--# expr-start 13149 '<Symbol Model at nodes.lkt:23020:29>' Sym ada/nodes.lkt:23020
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Model); 
--# expr-done 13149
--# expr-start 13150 '<FieldAccess for universal_real_param at nodes.lkt:23021:29>' Fld ada/nodes.lkt:23021
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.universal_real_param
Fld := Libadalang.Implementation.Type_Attributes_Repository_F_Universal_Real_Param (Node => Self);
--# end
--# expr-done 13150
--# expr-start 13151 '<FieldAccess for base_type_expr at nodes.lkt:23022:34>' Fld_1 ada/nodes.lkt:23022
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeAttributesRepository.base_type_expr
Fld_1 := Libadalang.Implementation.Type_Attributes_Repository_F_Base_Type_Expr (Node => Self);
--# end
--# expr-done 13151
Builder := Create_Bare_Synthetic_Unary_Spec_Node_Builder (Sym, Fld, Fld_1); 
--# expr-done 13152
Builder_1 := Create_Bare_Synthetic_Subp_Decl_Node_Builder (Builder); 
--# expr-done 13153
--# expr-start 13154 '<FieldAccess for base_type at nodes.lkt:23025:23>' Fld_2 ada/nodes.lkt:23025
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Type_Attributes_Repository_Base_Type;
--# expr-done 13154
      Cast_Result := Fld_2;
Cast_Expr := Node_Builder_Type'(Builder_1).all.Build (Parent => Cast_Result, Self_Node => Self); 
      Cast_Result_1 := Cast_Expr;
         Property_Result := Cast_Result_1;
   --# end
      Finalizer_Scope_1477;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1477;
               Self.Bare_Type_Attributes_Repository_Lf_State_Model :=
                 Initialization_Error (Exc);
            raise;
      end;
      Self.Bare_Type_Attributes_Repository_Lf_State_Model := Initialized;
      Self.Bare_Type_Attributes_Repository_Lf_Stg_Model := Property_Result;
   return Property_Result;
end Type_Attributes_Repository_F_Model;
--# end
   --
   --  Primitives for Bare_Type_Def
   --
--# property-start TypeDef.is_real_type ada/nodes.lkt:23033
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Real_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Boolean;
Fld_1 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13157 '<BooleanBinaryOp Or at nodes.lkt:23033:32>' If_Result ada/nodes.lkt:23033
--# expr-start 13155 '<FieldAccess for is_float_type at nodes.lkt:23033:32>' Fld ada/nodes.lkt:23033
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_float_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Float_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13155
if Fld then
   If_Result := True;
else
   --# expr-start 13156 '<FieldAccess for is_fixed_point at nodes.lkt:23033:56>' Fld_1 ada/nodes.lkt:23033
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_fixed_point'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Fixed_Point (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13156
   If_Result := Fld_1;
end if;
--# expr-done 13157
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Real_Type;
--# end
--# property-start TypeDef.predefined_equality_operators ada/nodes.lkt:23035
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Predefined_Equality_Operators
  (Node : Bare_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1479 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Fld_3 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Fld_4 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1479 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1479;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13168 '<Let at nodes.lkt:23036:9>' Let_Result_1 ada/nodes.lkt:23036
--# scope-start
--# expr-start 13159 '<Cast to TypeDecl at nodes.lkt:23036:25>' Cast_Result ada/nodes.lkt:23036
--# expr-start 13158 '<parent at nodes.lkt:23036:25>' Fld ada/nodes.lkt:23036
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13158
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13159
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13167 '<Let at nodes.lkt:23037:9>' Let_Result ada/nodes.lkt:23037
--# scope-start
--# expr-start 13161 '<FieldAccess for node at nodes.lkt:23037:25>' Fld_2 ada/nodes.lkt:23037
--# expr-start 13160 '<FieldAccess for bool_type at nodes.lkt:23037:25>' Fld_1 ada/nodes.lkt:23037
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13160
Fld_2 := Fld_1.Node;
--# expr-done 13161
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13166 '<ArrayLiteral at nodes.lkt:23039:9>' Array_Lit ada/nodes.lkt:23039
--# expr-start 13163 '<FieldAccess for create_binop_assoc at nodes.lkt:23040:13>' Fld_3 ada/nodes.lkt:23040
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13162 '<Symbol "=" at nodes.lkt:23040:37>' Sym ada/nodes.lkt:23040
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13162
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
--# property-call-start AdaNode.create_binop_assoc
Fld_3 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Local_Bool_Type);
--# end
--# expr-done 13163
--# expr-start 13165 '<FieldAccess for create_binop_assoc at nodes.lkt:23041:13>' Fld_4 ada/nodes.lkt:23041
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13164 '<Symbol "/=" at nodes.lkt:23041:37>' Sym_1 ada/nodes.lkt:23041
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13164
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
--# property-call-start AdaNode.create_binop_assoc
Fld_4 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_3, Rhs => Cast_Result_4, Ret => Local_Bool_Type);
--# end
--# expr-done 13165
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_3, 2 => Fld_4)); 
--# expr-done 13166
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
--# expr-done 13167
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13168
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1479;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1479;
            raise;
      end;
   return Property_Result;
end Type_Def_P_Predefined_Equality_Operators;
--# end
--# property-start TypeDef.base_types ada/nodes.lkt:23047
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Base_Types
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_1480 with Inline_Always;
            procedure Finalizer_Scope_3595 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Array_Lit : Internal_Entity_Base_Type_Decl_Array_Access;
Scope_Result : Internal_Entity_Base_Type_Decl_Array_Access;
Result_Var : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_1 : Internal_Entity_Base_Type_Decl_Array_Access;
Concat_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_1480 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Concat_Result);
            end Finalizer_Scope_1480;
            procedure Finalizer_Scope_3595 is
            begin
                     Dec_Ref (Array_Lit);
            end Finalizer_Scope_3595;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13169 '<FieldAccess for base_type at nodes.lkt:23048:9>' Fld ada/nodes.lkt:23048
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13169
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 13170 '<ArrayLiteral at nodes.lkt:23048:37>' Array_Lit ada/nodes.lkt:23048
Array_Lit := Create_Internal_Entity_Base_Type_Decl_Array (Internal_Internal_Entity_Base_Type_Decl_Array'(1 => Var_Expr_0)); 
--# expr-done 13170
Scope_Result := Array_Lit;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3595;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Entity_Base_Type_Decl_Array_Type;
end if;
      Inc_Ref (Result_Var);
--# expr-start 13171 '<FieldAccess for base_interfaces at nodes.lkt:23048:45>' Fld_1 ada/nodes.lkt:23048
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_interfaces'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Interfaces (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13171
Concat_Result := Concat (Result_Var, Fld_1); 
         Property_Result := Concat_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1480;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1480;
                     Finalizer_Scope_3595;
            raise;
      end;
   return Property_Result;
end Type_Def_P_Base_Types;
--# end
--# property-start TypeDef.defining_env ada/nodes.lkt:23051
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Defining_Env
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1481 with Inline_Always;
            procedure Finalizer_Scope_3597 with Inline_Always;
            procedure Finalizer_Scope_3598 with Inline_Always;
            procedure Finalizer_Scope_3599 with Inline_Always;
      Var_Expr : Bare_Ada_Node;
Var_Expr_292 : Internal_Entity_Base_Type_Decl;
Var_Expr_293 : Internal_Entity_Base_Type_Decl;
Fld : Lexical_Env := Empty_Env;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Fld_3 : Lexical_Env := Empty_Env;
Fld_4 : Lexical_Env := Empty_Env;
Array_Lit_1 : Lexical_Env_Array_Access;
Scope_Result : Bare_Ada_Node;
Fld_5 : Bare_Ada_Node;
Result_Var : Bare_Ada_Node;
Bound_Dottable_Type : Bare_Ada_Node;
Fld_6 : Internal_Entity_Base_Type_Decl_Array_Access;
Fld_7 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Result_Var_1 : Lexical_Env := Empty_Env;
Map_Result : Lexical_Env_Array_Access;
Dyn_Var_Bind_Result : Lexical_Env_Array_Access;
Concat_Result : Lexical_Env_Array_Access;
Fld_8 : Lexical_Env := Empty_Env;
Array_Lit_2 : Lexical_Env_Array_Access;
Concat_Result_1 : Lexical_Env_Array_Access;
Group_Env_1 : Lexical_Env := Empty_Env;
Cast_Expr : Internal_Entity_Type_Def;
Cast_Result : Internal_Entity_Array_Type_Def;
Fld_9 : Internal_Entity_Base_Type_Decl;
Fld_10 : Lexical_Env := Empty_Env;
Fld_11 : Lexical_Env := Empty_Env;
Array_Lit_3 : Lexical_Env_Array_Access;
Group_Env_2 : Lexical_Env := Empty_Env;
Cast_Expr_1 : Internal_Entity_Type_Def;
Cast_Result_1 : Internal_Entity_Access_Def;
Fld_12 : Internal_Entity_Base_Type_Decl;
Fld_13 : Lexical_Env := Empty_Env;
Scope_Result_2 : Lexical_Env := Empty_Env;
Result_Var_2 : Lexical_Env := Empty_Env;
Fld_14 : Lexical_Env := Empty_Env;
Array_Lit_4 : Lexical_Env_Array_Access;
Group_Env_3 : Lexical_Env := Empty_Env;
Fld_15 : Lexical_Env := Empty_Env;
Is_A : Boolean;
If_Result : Lexical_Env := Empty_Env;
Is_A_1 : Boolean;
If_Result_1 : Lexical_Env := Empty_Env;
Is_A_2 : Boolean;
If_Result_2 : Lexical_Env := Empty_Env;
Is_A_3 : Boolean;
If_Result_3 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1481 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Array_Lit_2);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Group_Env_1);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Array_Lit_3);
                     Dec_Ref (Group_Env_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Result_Var_2);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Array_Lit_4);
                     Dec_Ref (Group_Env_3);
                     Dec_Ref (Fld_15);
                     Dec_Ref (If_Result);
                     Dec_Ref (If_Result_1);
                     Dec_Ref (If_Result_2);
                     Dec_Ref (If_Result_3);
            end Finalizer_Scope_1481;
            procedure Finalizer_Scope_3597 is
            begin
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Result_Var_1);
            end Finalizer_Scope_3597;
            procedure Finalizer_Scope_3598 is
            begin
                     Dec_Ref (Fld_7);
            end Finalizer_Scope_3598;
            procedure Finalizer_Scope_3599 is
            begin
                     Dec_Ref (Fld_13);
            end Finalizer_Scope_3599;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13208 '<If at nodes.lkt:23057:9>' If_Result_3 ada/nodes.lkt:23057
--# expr-start 13172 '<IsA RecordTypeDef, PrivateTypeDef at nodes.lkt:23057:12>' Is_A_3 ada/nodes.lkt:23057
Is_A_3 := Self /= null 
and then Self.Kind in Ada_Record_Type_Def_Range | Ada_Private_Type_Def_Range; 
--# expr-done 13172
if Is_A_3 then
   --# expr-start 13177 '<env_group at nodes.lkt:23059:13>' Group_Env ada/nodes.lkt:23059
--# expr-start 13176 '<ArrayLiteral at nodes.lkt:23059:13>' Array_Lit ada/nodes.lkt:23059
--# expr-start 13173 '<FieldAccess for children_env at nodes.lkt:23060:17>' Fld ada/nodes.lkt:23060
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13173
--# expr-start 13174 '<FieldAccess for dottable_subps_env at nodes.lkt:23061:17>' Fld_1 ada/nodes.lkt:23061
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.dottable_subps_env
Fld_1 := Libadalang.Implementation.Type_Def_P_Dottable_Subps_Env (Node => Ent.Node, Origin => Origin, Dottable_Type => Dottable_Type, E_Info => Ent.Info);
--# end
--# expr-done 13174
--# expr-start 13175 '<FieldAccess for previous_part_env at nodes.lkt:23062:17>' Fld_2 ada/nodes.lkt:23062
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.previous_part_env
Fld_2 := Libadalang.Implementation.Type_Def_P_Previous_Part_Env (Node => Ent.Node, Origin => Origin, Dottable_Type => Dottable_Type, E_Info => Ent.Info);
--# end
--# expr-done 13175
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld, 2 => Fld_1, 3 => Fld_2)); 
--# expr-done 13176
Group_Env := Group (Array_Lit, No_Metadata); 
--# expr-done 13177
   If_Result_3 := Group_Env;
else
   --# expr-start 13207 '<If at nodes.lkt:23057:9>' If_Result_2 ada/nodes.lkt:23057
--# expr-start 13178 '<IsA DerivedTypeDef, InterfaceTypeDef at nodes.lkt:23068:14>' Is_A_2 ada/nodes.lkt:23068
Is_A_2 := Self /= null 
and then Self.Kind in Ada_Derived_Type_Def_Range | Ada_Interface_Type_Def_Range; 
--# expr-done 13178
if Is_A_2 then
   --# expr-start 13189 '<env_group at nodes.lkt:23073:13>' Group_Env_1 ada/nodes.lkt:23073
--# expr-start 13181 '<ArrayLiteral at nodes.lkt:23074:17>' Array_Lit_1 ada/nodes.lkt:23074
--# expr-start 13179 '<FieldAccess for children_env at nodes.lkt:23074:18>' Fld_3 ada/nodes.lkt:23074
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13179
--# expr-start 13180 '<FieldAccess for dottable_subps_env at nodes.lkt:23074:37>' Fld_4 ada/nodes.lkt:23074
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.dottable_subps_env
Fld_4 := Libadalang.Implementation.Type_Def_P_Dottable_Subps_Env (Node => Ent.Node, Origin => Origin, Dottable_Type => Dottable_Type, E_Info => Ent.Info);
--# end
--# expr-done 13180
Array_Lit_1 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_3, 2 => Fld_4)); 
--# expr-done 13181
--# expr-start 13186 '<bind at nodes.lkt:23076:21>' Dyn_Var_Bind_Result ada/nodes.lkt:23076
Var_Expr := Dottable_Type;
if Var_Expr /= No_Bare_Ada_Node then
   --# scope-start
   --# bind e Var_Expr
Scope_Result := Var_Expr;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 13182 '<parent at nodes.lkt:23076:60>' Fld_5 ada/nodes.lkt:23076
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Self.Parent; 
--# expr-done 13182
   Result_Var := Fld_5;
end if;
Bound_Dottable_Type := Result_Var; 
--# expr-start 13185 '<Map at nodes.lkt:23078:21>' Map_Result ada/nodes.lkt:23078
   --# expr-start 13183 '<FieldAccess for base_types at nodes.lkt:23078:21>' Fld_6 ada/nodes.lkt:23078
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.base_types
Fld_6 := Libadalang.Implementation.Type_Def_P_Base_Types (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13183
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Base_Type_Decl_Array_Access := Fld_6;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind bt Item_0
Var_Expr_292 := Item_0;
if Var_Expr_292 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 13184 '<FieldAccess for defining_env at nodes.lkt:23078:51>' Fld_7 ada/nodes.lkt:23078
      if Var_Expr_292.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_7 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Var_Expr_292.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Bound_Dottable_Type, E_Info => Var_Expr_292.Info);
--# end
--# expr-done 13184
Scope_Result_1 := Fld_7;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3598;
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := Empty_Env;
end if;
      Inc_Ref (Result_Var_1);
         declare
            Item_To_Append : constant Lexical_Env := Result_Var_1;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3597;
         end loop;
      end;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13185
Dyn_Var_Bind_Result := Map_Result; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 13186
Concat_Result := Concat (Array_Lit_1, Dyn_Var_Bind_Result); 
--# expr-start 13188 '<ArrayLiteral at nodes.lkt:23080:19>' Array_Lit_2 ada/nodes.lkt:23080
--# expr-start 13187 '<FieldAccess for previous_part_env at nodes.lkt:23080:20>' Fld_8 ada/nodes.lkt:23080
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.previous_part_env
Fld_8 := Libadalang.Implementation.Type_Def_P_Previous_Part_Env (Node => Ent.Node, Origin => Origin, Dottable_Type => Dottable_Type, E_Info => Ent.Info);
--# end
--# expr-done 13187
Array_Lit_2 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_8)); 
--# expr-done 13188
Concat_Result_1 := Concat (Concat_Result, Array_Lit_2); 
Group_Env_1 := Group (Concat_Result_1, No_Metadata); 
--# expr-done 13189
   If_Result_2 := Group_Env_1;
else
   --# expr-start 13206 '<If at nodes.lkt:23057:9>' If_Result_1 ada/nodes.lkt:23057
--# expr-start 13190 '<IsA ArrayTypeDef at nodes.lkt:23087:14>' Is_A_1 ada/nodes.lkt:23087
Is_A_1 := Self /= null 
and then Self.Kind in Ada_Array_Type_Def_Range; 
--# expr-done 13190
if Is_A_1 then
   --# expr-start 13196 '<env_group at nodes.lkt:23089:13>' Group_Env_2 ada/nodes.lkt:23089
--# expr-start 13195 '<ArrayLiteral at nodes.lkt:23089:13>' Array_Lit_3 ada/nodes.lkt:23089
--# expr-start 13193 '<FieldAccess for defining_env at nodes.lkt:23090:17>' Fld_10 ada/nodes.lkt:23090
--# expr-start 13192 '<FieldAccess for comp_type at nodes.lkt:23090:17>' Fld_9 ada/nodes.lkt:23090
--# expr-start 13191 '<Cast to ArrayTypeDef at nodes.lkt:23090:17>' Cast_Result ada/nodes.lkt:23090
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Array_Type_Def_Range
   then
      Cast_Result := Create_Internal_Entity_Array_Type_Def
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Array_Type_Def;
   end if;
--# expr-done 13191
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArrayTypeDef.comp_type
Fld_9 := Libadalang.Implementation.Array_Type_Def_P_Comp_Type (Node => Cast_Result.Node, Origin => Origin, E_Info => Cast_Result.Info);
--# end
--# expr-done 13192
      if Fld_9.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld_9.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld_9.Info);
--# end
--# expr-done 13193
--# expr-start 13194 '<FieldAccess for dottable_subps_env at nodes.lkt:23091:17>' Fld_11 ada/nodes.lkt:23091
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.dottable_subps_env
Fld_11 := Libadalang.Implementation.Type_Def_P_Dottable_Subps_Env (Node => Ent.Node, Origin => Origin, Dottable_Type => Dottable_Type, E_Info => Ent.Info);
--# end
--# expr-done 13194
Array_Lit_3 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Fld_10, 2 => Fld_11)); 
--# expr-done 13195
Group_Env_2 := Group (Array_Lit_3, No_Metadata); 
--# expr-done 13196
   If_Result_1 := Group_Env_2;
else
   --# expr-start 13205 '<If at nodes.lkt:23057:9>' If_Result ada/nodes.lkt:23057
--# expr-start 13197 '<IsA AccessDef at nodes.lkt:23094:14>' Is_A ada/nodes.lkt:23094
Is_A := Self /= null 
and then Self.Kind in Ada_Access_Def; 
--# expr-done 13197
if Is_A then
   --# expr-start 13203 '<env_group at nodes.lkt:23096:13>' Group_Env_3 ada/nodes.lkt:23096
--# expr-start 13202 '<ArrayLiteral at nodes.lkt:23096:13>' Array_Lit_4 ada/nodes.lkt:23096
--# expr-start 13199 '<FieldAccess for accessed_type at nodes.lkt:23097:17>' Fld_12 ada/nodes.lkt:23097
--# expr-start 13198 '<Cast to AccessDef at nodes.lkt:23097:17>' Cast_Result_1 ada/nodes.lkt:23097
Cast_Expr_1 := Ent; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Access_Def
   then
      Cast_Result_1 := Create_Internal_Entity_Access_Def
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Access_Def;
   end if;
--# expr-done 13198
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.accessed_type'
Fld_12 := Libadalang.Implementation.Dispatcher_Type_Def_P_Accessed_Type (Node => Cast_Result_1.Node, Origin => Origin, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 13199
Var_Expr_293 := Fld_12;
if Var_Expr_293 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 13200 '<FieldAccess for defining_env at nodes.lkt:23097:17>' Fld_13 ada/nodes.lkt:23097
      if Var_Expr_293.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_13 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Var_Expr_293.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Var_Expr_293.Info);
--# end
--# expr-done 13200
Scope_Result_2 := Fld_13;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3599;
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := Empty_Env;
end if;
      Inc_Ref (Result_Var_2);
--# expr-start 13201 '<FieldAccess for dottable_subps_env at nodes.lkt:23098:17>' Fld_14 ada/nodes.lkt:23098
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.dottable_subps_env
Fld_14 := Libadalang.Implementation.Type_Def_P_Dottable_Subps_Env (Node => Ent.Node, Origin => Origin, Dottable_Type => Dottable_Type, E_Info => Ent.Info);
--# end
--# expr-done 13201
Array_Lit_4 := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Result_Var_2, 2 => Fld_14)); 
--# expr-done 13202
Group_Env_3 := Group (Array_Lit_4, No_Metadata); 
--# expr-done 13203
   If_Result := Group_Env_3;
else
   --# expr-start 13204 '<FieldAccess for dottable_subps_env at nodes.lkt:23105:14>' Fld_15 ada/nodes.lkt:23105
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.dottable_subps_env
Fld_15 := Libadalang.Implementation.Type_Def_P_Dottable_Subps_Env (Node => Ent.Node, Origin => Origin, Dottable_Type => Dottable_Type, E_Info => Ent.Info);
--# end
--# expr-done 13204
   If_Result := Fld_15;
end if;
      Inc_Ref (If_Result);
--# expr-done 13205
   If_Result_1 := If_Result;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 13206
   If_Result_2 := If_Result_1;
end if;
      Inc_Ref (If_Result_2);
--# expr-done 13207
   If_Result_3 := If_Result_2;
end if;
      Inc_Ref (If_Result_3);
--# expr-done 13208
         Property_Result := If_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1481;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1481;
                     Finalizer_Scope_3597;
                     Finalizer_Scope_3598;
                     Finalizer_Scope_3599;
            raise;
      end;
   return Property_Result;
end Type_Def_P_Defining_Env;
--# end
--# property-start TypeDef.containing_type ada/nodes.lkt:23108
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Containing_Type
  (Node : Bare_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Type_Decl
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Type_Decl;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13210 '<Cast to TypeDecl at nodes.lkt:23108:47>' Cast_Result ada/nodes.lkt:23108
--# expr-start 13209 '<parent at nodes.lkt:23108:47>' Fld ada/nodes.lkt:23108
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13209
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Type_Decl
   then
      Cast_Result := Create_Internal_Entity_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 13210
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Containing_Type;
--# end
--# property-start TypeDef.previous_part ada/nodes.lkt:23110
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Previous_Part
  (Node : Bare_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13212 '<FieldAccess for previous_part at nodes.lkt:23111:9>' Fld_1 ada/nodes.lkt:23111
--# expr-start 13211 '<FieldAccess for containing_type at nodes.lkt:23111:9>' Fld ada/nodes.lkt:23111
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.containing_type
Fld := Libadalang.Implementation.Type_Def_P_Containing_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13211
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.previous_part
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Previous_Part (Node => Fld.Node, Go_To_Incomplete => True, E_Info => Fld.Info);
--# end
--# expr-done 13212
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Previous_Part;
--# end
--# property-start TypeDef.previous_part_env ada/nodes.lkt:23114
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Previous_Part_Env
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
      ; Dottable_Type : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1484 with Inline_Always;
            procedure Finalizer_Scope_3600 with Inline_Always;
      Var_Expr_294 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Result_Var : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1484 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1484;
            procedure Finalizer_Scope_3600 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3600;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13213 '<FieldAccess for previous_part at nodes.lkt:23114:43>' Fld ada/nodes.lkt:23114
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.previous_part
Fld := Libadalang.Implementation.Type_Def_P_Previous_Part (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13213
Var_Expr_294 := Fld;
if Var_Expr_294 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 13214 '<FieldAccess for defining_env at nodes.lkt:23114:43>' Fld_1 ada/nodes.lkt:23114
      if Var_Expr_294.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Var_Expr_294.Node, Origin => Origin, Include_Ud_Indexing => False, Dottable_Type => Dottable_Type, E_Info => Var_Expr_294.Info);
--# end
--# expr-done 13214
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3600;
   Result_Var := Scope_Result;
else
   Result_Var := Empty_Env;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1484;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1484;
                     Finalizer_Scope_3600;
            raise;
      end;
   return Property_Result;
end Type_Def_P_Previous_Part_Env;
--# end
--# property-start TypeDef.dottable_subps_env ada/nodes.lkt:23117
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Dottable_Subps_Env
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
      ; Dottable_Type : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1485 with Inline_Always;
      Var_Expr_0 : Bare_Ada_Node;
Fld : Internal_Entity_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
Fld_2 : Internal_Entity_Info;
Fld_3 : Env_Rebindings;
Rebound_Env : Lexical_Env := Empty_Env;
Array_Lit : Lexical_Env_Array_Access;
Fld_4 : Bare_Ada_Node;
New_Struct : Internal_Metadata;
Scope_Result : Internal_Metadata;
Result_Var : Internal_Metadata;
Group_Env : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1485 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Rebound_Env);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_1485;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13223 '<env_group at nodes.lkt:23128:9>' Group_Env ada/nodes.lkt:23128
--# expr-start 13220 '<ArrayLiteral at nodes.lkt:23128:9>' Array_Lit ada/nodes.lkt:23128
--# expr-start 13219 '<rebind_env at nodes.lkt:23129:13>' Rebound_Env ada/nodes.lkt:23129
--# expr-start 13216 '<FieldAccess for dottable_subps_env at nodes.lkt:23129:13>' Fld_1 ada/nodes.lkt:23129
--# expr-start 13215 '<FieldAccess for containing_type at nodes.lkt:23129:13>' Fld ada/nodes.lkt:23129
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.containing_type
Fld := Libadalang.Implementation.Type_Def_P_Containing_Type (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13215
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.dottable_subps_env
Fld_1 := Libadalang.Implementation.Base_Type_Decl_F_Dottable_Subps_Env (Node => Fld.Node);
--# end
--# expr-done 13216
--# expr-start 13218 '<FieldAccess for rebindings at nodes.lkt:23130:17>' Fld_3 ada/nodes.lkt:23130
--# expr-start 13217 '<FieldAccess for info at nodes.lkt:23130:17>' Fld_2 ada/nodes.lkt:23130
Fld_2 := Ent.Info;
--# expr-done 13217
Fld_3 := Fld_2.Rebindings;
--# expr-done 13218
Rebound_Env := Rebind_Env (Fld_1, Fld_3); 
--# expr-done 13219
Array_Lit := Create_Lexical_Env_Array (Internal_Lexical_Env_Array'(1 => Rebound_Env)); 
--# expr-done 13220
Var_Expr_0 := Dottable_Type;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind t Var_Expr_0
--# expr-start 13222 '<New Metadata at nodes.lkt:23135:24>' New_Struct ada/nodes.lkt:23135
--# expr-start 13221 '<parent at nodes.lkt:23135:43>' Fld_4 ada/nodes.lkt:23135
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Parent; 
--# expr-done 13221
New_Struct := (Dottable_Subp => False, Primitive => Fld_4, Primitive_Real_Type => Var_Expr_0); 
--# expr-done 13222
Scope_Result := New_Struct;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Metadata;
end if;
Group_Env := Group (Array_Lit, Result_Var); 
--# expr-done 13223
         Property_Result := Group_Env;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1485;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1485;
            raise;
      end;
   return Property_Result;
end Type_Def_P_Dottable_Subps_Env;
--# end
--# property-start '[dispatcher]TypeDef.discrete_range' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Discrete_Range
  (Node : Bare_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Interface_Type_Def | Ada_Private_Type_Def .. Ada_Record_Type_Def =>
                  --# property-call-start TypeDef.discrete_range
                  Property_Result := Type_Def_P_Discrete_Range
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.discrete_range
                  Property_Result := Derived_Type_Def_P_Discrete_Range
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Mod_Int_Type_Def =>
                  --# property-call-start ModIntTypeDef.discrete_range
                  Property_Result := Mod_Int_Type_Def_P_Discrete_Range
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Signed_Int_Type_Def =>
                  --# property-call-start SignedIntTypeDef.discrete_range
                  Property_Result := Signed_Int_Type_Def_P_Discrete_Range
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Discrete_Range;
--# end
--# property-start '[dispatcher]TypeDef.array_ndims' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Array_Ndims
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Type_Access_Def | Ada_Enum_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.array_ndims
                  Property_Result := Type_Def_P_Array_Ndims
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Array_Type_Def =>
                  --# property-call-start ArrayTypeDef.array_ndims
                  Property_Result := Array_Type_Def_P_Array_Ndims
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.array_ndims
                  Property_Result := Derived_Type_Def_P_Array_Ndims
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Array_Ndims;
--# end
--# property-start '[dispatcher]TypeDef.is_float_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Float_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Decimal_Fixed_Point_Def | Ada_Ordinary_Fixed_Point_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_float_type
                  Property_Result := Type_Def_P_Is_Float_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_float_type
                  Property_Result := Derived_Type_Def_P_Is_Float_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Floating_Point_Def =>
                  --# property-call-start FloatingPointDef.is_float_type
                  Property_Result := Floating_Point_Def_P_Is_Float_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Float_Type;
--# end
--# property-start '[dispatcher]TypeDef.is_fixed_point' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Fixed_Point
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Private_Type_Def | Ada_Floating_Point_Def | Ada_Record_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_fixed_point
                  Property_Result := Type_Def_P_Is_Fixed_Point
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_fixed_point
                  Property_Result := Derived_Type_Def_P_Is_Fixed_Point
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Decimal_Fixed_Point_Def =>
                  --# property-call-start DecimalFixedPointDef.is_fixed_point
                  Property_Result := Decimal_Fixed_Point_Def_P_Is_Fixed_Point
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Ordinary_Fixed_Point_Def =>
                  --# property-call-start OrdinaryFixedPointDef.is_fixed_point
                  Property_Result := Ordinary_Fixed_Point_Def_P_Is_Fixed_Point
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Fixed_Point;
--# end
--# property-start '[dispatcher]TypeDef.predefined_operators' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Predefined_Operators
  (Node : Bare_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Derived_Type_Def | Ada_Interface_Type_Def =>
                  --# property-call-start TypeDef.predefined_operators
                  Property_Result := Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Access_To_Subp_Def .. Ada_Type_Access_Def =>
                  --# property-call-start AccessDef.predefined_operators
                  Property_Result := Access_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Array_Type_Def =>
                  --# property-call-start ArrayTypeDef.predefined_operators
                  Property_Result := Array_Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Enum_Type_Def =>
                  --# property-call-start EnumTypeDef.predefined_operators
                  Property_Result := Enum_Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Formal_Discrete_Type_Def =>
                  --# property-call-start FormalDiscreteTypeDef.predefined_operators
                  Property_Result := Formal_Discrete_Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Mod_Int_Type_Def =>
                  --# property-call-start ModIntTypeDef.predefined_operators
                  Property_Result := Mod_Int_Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Private_Type_Def =>
                  --# property-call-start PrivateTypeDef.predefined_operators
                  Property_Result := Private_Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Floating_Point_Def =>
                  --# property-call-start RealTypeDef.predefined_operators
                  Property_Result := Real_Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Decimal_Fixed_Point_Def =>
                  --# property-call-start DecimalFixedPointDef.predefined_operators
                  Property_Result := Decimal_Fixed_Point_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Ordinary_Fixed_Point_Def =>
                  --# property-call-start OrdinaryFixedPointDef.predefined_operators
                  Property_Result := Ordinary_Fixed_Point_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Record_Type_Def =>
                  --# property-call-start RecordTypeDef.predefined_operators
                  Property_Result := Record_Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
               when Ada_Signed_Int_Type_Def =>
                  --# property-call-start SignedIntTypeDef.predefined_operators
                  Property_Result := Signed_Int_Type_Def_P_Predefined_Operators
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Predefined_Operators;
--# end
--# property-start '[dispatcher]TypeDef.is_discrete_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Discrete_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Enum_Type_Def | Ada_Interface_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_discrete_type
                  Property_Result := Type_Def_P_Is_Discrete_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Formal_Discrete_Type_Def =>
                  --# property-call-start FormalDiscreteTypeDef.is_discrete_type
                  Property_Result := Formal_Discrete_Type_Def_P_Is_Discrete_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Discrete_Type;
--# end
--# property-start '[dispatcher]TypeDef.is_int_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Int_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Interface_Type_Def | Ada_Private_Type_Def .. Ada_Record_Type_Def =>
                  --# property-call-start TypeDef.is_int_type
                  Property_Result := Type_Def_P_Is_Int_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_int_type
                  Property_Result := Derived_Type_Def_P_Is_Int_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Mod_Int_Type_Def =>
                  --# property-call-start ModIntTypeDef.is_int_type
                  Property_Result := Mod_Int_Type_Def_P_Is_Int_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Signed_Int_Type_Def =>
                  --# property-call-start SignedIntTypeDef.is_int_type
                  Property_Result := Signed_Int_Type_Def_P_Is_Int_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Int_Type;
--# end
--# property-start '[dispatcher]TypeDef.is_access_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Access_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_access_type
                  Property_Result := Type_Def_P_Is_Access_Type
                    (Self
                        , Origin
                    );
                  --# end
               when Ada_Access_To_Subp_Def .. Ada_Type_Access_Def =>
                  --# property-call-start AccessDef.is_access_type
                  Property_Result := Access_Def_P_Is_Access_Type
                    (Self
                        , Origin
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_access_type
                  Property_Result := Derived_Type_Def_P_Is_Access_Type
                    (Self
                        , Origin
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Access_Type;
--# end
--# property-start '[dispatcher]TypeDef.is_char_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Char_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Formal_Discrete_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_char_type
                  Property_Result := Type_Def_P_Is_Char_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_char_type
                  Property_Result := Derived_Type_Def_P_Is_Char_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Type_Def =>
                  --# property-call-start EnumTypeDef.is_char_type
                  Property_Result := Enum_Type_Def_P_Is_Char_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Char_Type;
--# end
--# property-start '[dispatcher]TypeDef.is_enum_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Enum_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Formal_Discrete_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_enum_type
                  Property_Result := Type_Def_P_Is_Enum_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_enum_type
                  Property_Result := Derived_Type_Def_P_Is_Enum_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Type_Def =>
                  --# property-call-start EnumTypeDef.is_enum_type
                  Property_Result := Enum_Type_Def_P_Is_Enum_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Enum_Type;
--# end
--# property-start '[dispatcher]TypeDef.accessed_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Accessed_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.accessed_type
                  Property_Result := Type_Def_P_Accessed_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Access_To_Subp_Def =>
                  --# property-call-start AccessToSubpDef.accessed_type
                  Property_Result := Access_To_Subp_Def_P_Accessed_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Anonymous_Type_Access_Def =>
                  --# property-call-start AnonymousTypeAccessDef.accessed_type
                  Property_Result := Anonymous_Type_Access_Def_P_Accessed_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Type_Access_Def =>
                  --# property-call-start TypeAccessDef.accessed_type
                  Property_Result := Type_Access_Def_P_Accessed_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.accessed_type
                  Property_Result := Derived_Type_Def_P_Accessed_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Accessed_Type;
--# end
--# property-start '[dispatcher]TypeDef.is_tagged_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Tagged_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Formal_Discrete_Type_Def | Ada_Mod_Int_Type_Def | Ada_Decimal_Fixed_Point_Def .. Ada_Ordinary_Fixed_Point_Def | Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_tagged_type
                  Property_Result := Type_Def_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_tagged_type
                  Property_Result := Derived_Type_Def_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Interface_Type_Def =>
                  --# property-call-start InterfaceTypeDef.is_tagged_type
                  Property_Result := Interface_Type_Def_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Private_Type_Def =>
                  --# property-call-start PrivateTypeDef.is_tagged_type
                  Property_Result := Private_Type_Def_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Record_Type_Def =>
                  --# property-call-start RecordTypeDef.is_tagged_type
                  Property_Result := Record_Type_Def_P_Is_Tagged_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Tagged_Type;
--# end
--# property-start '[dispatcher]TypeDef.is_task_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Task_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Formal_Discrete_Type_Def | Ada_Mod_Int_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_task_type
                  Property_Result := Type_Def_P_Is_Task_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_task_type
                  Property_Result := Derived_Type_Def_P_Is_Task_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Interface_Type_Def =>
                  --# property-call-start InterfaceTypeDef.is_task_type
                  Property_Result := Interface_Type_Def_P_Is_Task_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Task_Type;
--# end
--# property-start '[dispatcher]TypeDef.is_limited_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Limited_Type
  (Node : Bare_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Type_Access_Def | Ada_Enum_Type_Def .. Ada_Formal_Discrete_Type_Def | Ada_Mod_Int_Type_Def | Ada_Decimal_Fixed_Point_Def .. Ada_Ordinary_Fixed_Point_Def | Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.is_limited_type
                  Property_Result := Type_Def_P_Is_Limited_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Array_Type_Def =>
                  --# property-call-start ArrayTypeDef.is_limited_type
                  Property_Result := Array_Type_Def_P_Is_Limited_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_limited_type
                  Property_Result := Derived_Type_Def_P_Is_Limited_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Interface_Type_Def =>
                  --# property-call-start InterfaceTypeDef.is_limited_type
                  Property_Result := Interface_Type_Def_P_Is_Limited_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Private_Type_Def =>
                  --# property-call-start PrivateTypeDef.is_limited_type
                  Property_Result := Private_Type_Def_P_Is_Limited_Type
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Record_Type_Def =>
                  --# property-call-start RecordTypeDef.is_limited_type
                  Property_Result := Record_Type_Def_P_Is_Limited_Type
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Limited_Type;
--# end
--# property-start '[dispatcher]TypeDef.base_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Base_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.base_type
                  Property_Result := Type_Def_P_Base_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.base_type
                  Property_Result := Derived_Type_Def_P_Base_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Base_Type;
--# end
--# property-start '[dispatcher]TypeDef.base_interfaces' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Base_Interfaces
  (Node : Bare_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Array_Type_Def | Ada_Enum_Type_Def .. Ada_Formal_Discrete_Type_Def | Ada_Mod_Int_Type_Def .. Ada_Signed_Int_Type_Def =>
                  --# property-call-start TypeDef.base_interfaces
                  Property_Result := Type_Def_P_Base_Interfaces
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.base_interfaces
                  Property_Result := Derived_Type_Def_P_Base_Interfaces
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Interface_Type_Def =>
                  --# property-call-start InterfaceTypeDef.base_interfaces
                  Property_Result := Interface_Type_Def_P_Base_Interfaces
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Base_Interfaces;
--# end
--# property-start '[dispatcher]TypeDef.is_static' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Def_P_Is_Static
  (Node : Bare_Type_Def
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Def (Self.Kind) is
               when Ada_Access_To_Subp_Def .. Ada_Type_Access_Def | Ada_Formal_Discrete_Type_Def .. Ada_Interface_Type_Def | Ada_Private_Type_Def | Ada_Record_Type_Def =>
                  --# property-call-start TypeDef.is_static
                  Property_Result := Type_Def_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Array_Type_Def =>
                  --# property-call-start ArrayTypeDef.is_static
                  Property_Result := Array_Type_Def_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Derived_Type_Def =>
                  --# property-call-start DerivedTypeDef.is_static
                  Property_Result := Derived_Type_Def_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Type_Def =>
                  --# property-call-start EnumTypeDef.is_static
                  Property_Result := Enum_Type_Def_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Mod_Int_Type_Def =>
                  --# property-call-start ModIntTypeDef.is_static
                  Property_Result := Mod_Int_Type_Def_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Decimal_Fixed_Point_Def .. Ada_Ordinary_Fixed_Point_Def =>
                  --# property-call-start RealTypeDef.is_static
                  Property_Result := Real_Type_Def_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
               when Ada_Signed_Int_Type_Def =>
                  --# property-call-start SignedIntTypeDef.is_static
                  Property_Result := Signed_Int_Type_Def_P_Is_Static
                    (Self
                        , Imprecise_Fallback
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Def_P_Is_Static;
--# end
--# property-start TypeDef.discrete_range ada/nodes.lkt:23140
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Discrete_Range
  (Node : Bare_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Discrete_Range;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Discrete_Range;
--# end
--# property-start TypeDef.array_ndims ada/nodes.lkt:23145
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Array_Ndims
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := 0;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Array_Ndims;
--# end
--# property-start TypeDef.is_float_type ada/nodes.lkt:23149
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Float_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Float_Type;
--# end
--# property-start TypeDef.is_fixed_point ada/nodes.lkt:23153
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Fixed_Point
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Fixed_Point;
--# end
--# property-start TypeDef.predefined_operators ada/nodes.lkt:23160
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Predefined_Operators
  (Node : Bare_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Env_Assoc_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Predefined_Operators;
--# end
--# property-start TypeDef.is_discrete_type ada/nodes.lkt:23163
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Discrete_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
     Ent : Internal_Entity_Type_Def :=
       Internal_Entity_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
Scope_Result : Boolean;
Fld_2 : Boolean;
Fld_3 : Boolean;
If_Result : Boolean;
Fld_4 : Boolean;
If_Result_1 : Boolean;
Result_Var : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13224 '<FieldAccess for base_type at nodes.lkt:23164:9>' Fld ada/nodes.lkt:23164
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13224
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 13225 '<FieldAccess for is_discrete_type at nodes.lkt:23165:21>' Fld_1 ada/nodes.lkt:23165
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_discrete_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Discrete_Type (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 13225
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 13230 '<BooleanBinaryOp Or at nodes.lkt:23166:25>' If_Result_1 ada/nodes.lkt:23166
--# expr-start 13228 '<BooleanBinaryOp Or at nodes.lkt:23166:25>' If_Result ada/nodes.lkt:23166
--# expr-start 13226 '<FieldAccess for is_int_type at nodes.lkt:23166:25>' Fld_2 ada/nodes.lkt:23166
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_int_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Int_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13226
if Fld_2 then
   If_Result := True;
else
   --# expr-start 13227 '<FieldAccess for is_enum_type at nodes.lkt:23166:47>' Fld_3 ada/nodes.lkt:23166
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_enum_type'
Fld_3 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Enum_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13227
   If_Result := Fld_3;
end if;
--# expr-done 13228
if If_Result then
   If_Result_1 := True;
else
   --# expr-start 13229 '<FieldAccess for is_char_type at nodes.lkt:23167:16>' Fld_4 ada/nodes.lkt:23167
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.is_char_type'
Fld_4 := Libadalang.Implementation.Dispatcher_Type_Def_P_Is_Char_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13229
   If_Result_1 := Fld_4;
end if;
--# expr-done 13230
   Result_Var := If_Result_1;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Discrete_Type;
--# end
--# property-start TypeDef.is_int_type ada/nodes.lkt:23172
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Int_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Int_Type;
--# end
--# property-start TypeDef.is_access_type ada/nodes.lkt:23176
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Access_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Access_Type;
--# end
--# property-start TypeDef.is_char_type ada/nodes.lkt:23179
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Char_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Char_Type;
--# end
--# property-start TypeDef.is_enum_type ada/nodes.lkt:23182
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Enum_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Enum_Type;
--# end
--# property-start TypeDef.accessed_type ada/nodes.lkt:23185
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Accessed_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Type_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Accessed_Type;
--# end
--# property-start TypeDef.is_tagged_type ada/nodes.lkt:23189
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Tagged_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Tagged_Type;
--# end
--# property-start TypeDef.is_task_type ada/nodes.lkt:23192
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Task_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Task_Type;
--# end
--# property-start TypeDef.is_limited_type ada/nodes.lkt:23194
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Limited_Type
  (Node : Bare_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Limited_Type;
--# end
--# property-start TypeDef.base_type ada/nodes.lkt:23198
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Base_Type
  (Node : Bare_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Entity_Base_Type_Decl;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Base_Type;
--# end
--# property-start TypeDef.base_interfaces ada/nodes.lkt:23201
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Base_Interfaces
  (Node : Bare_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := No_Internal_Entity_Base_Type_Decl_Array_Type;
            Inc_Ref (Property_Result);
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Base_Interfaces;
--# end
--# property-start TypeDef.is_static ada/nodes.lkt:23205
pragma Warnings (Off, "is not referenced");
 function Type_Def_P_Is_Static
  (Node : Bare_Type_Def
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Def  := Bare_Type_Def (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Def_P_Is_Static;
--# end
   --
   --  Primitives for Bare_Access_Def
   --
      procedure Initialize_Fields_For_Access_Def
        (Self : Bare_Access_Def
         ; Access_Def_F_Has_Not_Null : Bare_Not_Null
        ) is
      begin
            Self.Access_Def_F_Has_Not_Null := Access_Def_F_Has_Not_Null;
      end Initialize_Fields_For_Access_Def;
   function Access_Def_F_Has_Not_Null
     (Node : Bare_Access_Def) return Bare_Not_Null
   is
   begin
         return Node.Access_Def_F_Has_Not_Null;
   end;
--# property-start AccessDef.is_access_type ada/nodes.lkt:23216
pragma Warnings (Off, "is not referenced");
 function Access_Def_P_Is_Access_Type
  (Node : Bare_Access_Def
      ; Origin : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Access_Def  := Bare_Access_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Access_Def_P_Is_Access_Type;
--# end
--# property-start AccessDef.predefined_operators ada/nodes.lkt:23219
pragma Warnings (Off, "is not referenced");
 function Access_Def_P_Predefined_Operators
  (Node : Bare_Access_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Access_Def  := Bare_Access_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1504 with Inline_Always;
      Fld : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1504 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1504;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Access_Def_Access_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Access_Def,
                                As_Bare_Access_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13231 '<FieldAccess for predefined_equality_operators at nodes.lkt:23220:9>' Fld ada/nodes.lkt:23220
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.predefined_equality_operators
Fld := Libadalang.Implementation.Type_Def_P_Predefined_Equality_Operators (Node => Self);
--# end
--# expr-done 13231
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1504;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1504;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Access_Def_P_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Access_To_Subp_Def
   --
      procedure Access_To_Subp_Def_Pre_Env_Actions
        (Self            : Bare_Access_To_Subp_Def;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      if Add_To_Env_Only then
         return;
      end if;
      declare
         No_Parent         : constant Boolean :=
            False;
         Transitive_Parent : constant Boolean :=
            Libadalang.Implementation.Env_Trans_Parent_225 (Node => 
Self);
         Names             : Symbol_Type_Array_Access :=
            null;
      begin
         Add_Env (Self, State, No_Parent, Transitive_Parent, Names);
      end;
      end;
      procedure Initialize_Fields_For_Access_To_Subp_Def
        (Self : Bare_Access_To_Subp_Def
         ; Access_Def_F_Has_Not_Null : Bare_Not_Null
         ; Access_To_Subp_Def_F_Has_Protected : Bare_Protected_Node
         ; Access_To_Subp_Def_F_Subp_Spec : Bare_Subp_Spec
        ) is
      begin
            Initialize_Fields_For_Access_Def
              (Self, Access_Def_F_Has_Not_Null);
            Self.Access_To_Subp_Def_F_Has_Protected := Access_To_Subp_Def_F_Has_Protected;
            Self.Access_To_Subp_Def_F_Subp_Spec := Access_To_Subp_Def_F_Subp_Spec;
      end Initialize_Fields_For_Access_To_Subp_Def;
   function Access_To_Subp_Def_F_Has_Protected
     (Node : Bare_Access_To_Subp_Def) return Bare_Protected_Node
   is
   begin
         return Node.Access_To_Subp_Def_F_Has_Protected;
   end;
   function Access_To_Subp_Def_F_Subp_Spec
     (Node : Bare_Access_To_Subp_Def) return Bare_Subp_Spec
   is
   begin
         return Node.Access_To_Subp_Def_F_Subp_Spec;
   end;
--# property-start AccessToSubpDef.xref_equation ada/nodes.lkt:23231
pragma Warnings (Off, "is not referenced");
 function Access_To_Subp_Def_P_Xref_Equation
  (Node : Bare_Access_To_Subp_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Access_To_Subp_Def  := Bare_Access_To_Subp_Def (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1505 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1505 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1505;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23231:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1505;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1505;
            raise;
      end;
   return Property_Result;
end Access_To_Subp_Def_P_Xref_Equation;
--# end
--# property-start AccessToSubpDef.accessed_type ada/nodes.lkt:23234
pragma Warnings (Off, "is not referenced");
 function Access_To_Subp_Def_P_Accessed_Type
  (Node : Bare_Access_To_Subp_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Access_To_Subp_Def  := Bare_Access_To_Subp_Def (Node);
     Ent : Internal_Entity_Access_To_Subp_Def :=
       Internal_Entity_Access_To_Subp_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Subp_Spec;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13233 '<FieldAccess for return_type at nodes.lkt:23234:49>' Fld_1 ada/nodes.lkt:23234
--# expr-start 13232 '<FieldAccess for subp_spec at nodes.lkt:23234:49>' Fld ada/nodes.lkt:23234
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subp_Spec (Node => Ent.Node.Access_To_Subp_Def_F_Subp_Spec, Info => Ent.Info);
--# expr-done 13232
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseSubpSpec.return_type
Fld_1 := Libadalang.Implementation.Base_Subp_Spec_P_Return_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13233
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Access_To_Subp_Def_P_Accessed_Type;
--# end
--# property-start AccessToSubpDef._env_trans_parent_225 '<builtin>:0'
pragma Warnings (Off, "is not referenced");
 function Env_Trans_Parent_225
  (Node : Bare_Access_To_Subp_Def
  )
   return Boolean
is
   Self : Bare_Access_To_Subp_Def  := Bare_Access_To_Subp_Def (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Env_Trans_Parent_225;
--# end
   --
   --  Primitives for Bare_Base_Type_Access_Def
   --
      procedure Initialize_Fields_For_Base_Type_Access_Def
        (Self : Bare_Base_Type_Access_Def
         ; Access_Def_F_Has_Not_Null : Bare_Not_Null
        ) is
      begin
            Initialize_Fields_For_Access_Def
              (Self, Access_Def_F_Has_Not_Null);
      end Initialize_Fields_For_Base_Type_Access_Def;
   --
   --  Primitives for Bare_Anonymous_Type_Access_Def
   --
      procedure Initialize_Fields_For_Anonymous_Type_Access_Def
        (Self : Bare_Anonymous_Type_Access_Def
         ; Access_Def_F_Has_Not_Null : Bare_Not_Null
         ; Anonymous_Type_Access_Def_F_Type_Decl : Bare_Base_Type_Decl
        ) is
      begin
            Initialize_Fields_For_Base_Type_Access_Def
              (Self, Access_Def_F_Has_Not_Null);
            Self.Anonymous_Type_Access_Def_F_Type_Decl := Anonymous_Type_Access_Def_F_Type_Decl;
      end Initialize_Fields_For_Anonymous_Type_Access_Def;
   function Anonymous_Type_Access_Def_F_Type_Decl
     (Node : Bare_Anonymous_Type_Access_Def) return Bare_Base_Type_Decl
   is
   begin
         return Node.Anonymous_Type_Access_Def_F_Type_Decl;
   end;
--# property-start AnonymousTypeAccessDef.accessed_type ada/nodes.lkt:23256
pragma Warnings (Off, "is not referenced");
 function Anonymous_Type_Access_Def_P_Accessed_Type
  (Node : Bare_Anonymous_Type_Access_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Anonymous_Type_Access_Def  := Bare_Anonymous_Type_Access_Def (Node);
     Ent : Internal_Entity_Anonymous_Type_Access_Def :=
       Internal_Entity_Anonymous_Type_Access_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13234 '<FieldAccess for type_decl at nodes.lkt:23256:49>' Fld ada/nodes.lkt:23256
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Base_Type_Decl (Node => Ent.Node.Anonymous_Type_Access_Def_F_Type_Decl, Info => Ent.Info);
--# expr-done 13234
         Property_Result := Fld;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Anonymous_Type_Access_Def_P_Accessed_Type;
--# end
   --
   --  Primitives for Bare_Type_Access_Def
   --
      procedure Initialize_Fields_For_Type_Access_Def
        (Self : Bare_Type_Access_Def
         ; Access_Def_F_Has_Not_Null : Bare_Not_Null
         ; Type_Access_Def_F_Has_All : Bare_All_Node
         ; Type_Access_Def_F_Has_Constant : Bare_Constant_Node
         ; Type_Access_Def_F_Subtype_Indication : Bare_Subtype_Indication
        ) is
      begin
            Initialize_Fields_For_Base_Type_Access_Def
              (Self, Access_Def_F_Has_Not_Null);
            Self.Type_Access_Def_F_Has_All := Type_Access_Def_F_Has_All;
            Self.Type_Access_Def_F_Has_Constant := Type_Access_Def_F_Has_Constant;
            Self.Type_Access_Def_F_Subtype_Indication := Type_Access_Def_F_Subtype_Indication;
      end Initialize_Fields_For_Type_Access_Def;
   function Type_Access_Def_F_Has_All
     (Node : Bare_Type_Access_Def) return Bare_All_Node
   is
   begin
         return Node.Type_Access_Def_F_Has_All;
   end;
   function Type_Access_Def_F_Has_Constant
     (Node : Bare_Type_Access_Def) return Bare_Constant_Node
   is
   begin
         return Node.Type_Access_Def_F_Has_Constant;
   end;
   function Type_Access_Def_F_Subtype_Indication
     (Node : Bare_Type_Access_Def) return Bare_Subtype_Indication
   is
   begin
         return Node.Type_Access_Def_F_Subtype_Indication;
   end;
--# property-start TypeAccessDef.accessed_type ada/nodes.lkt:23269
pragma Warnings (Off, "is not referenced");
 function Type_Access_Def_P_Accessed_Type
  (Node : Bare_Type_Access_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Access_Def  := Bare_Type_Access_Def (Node);
     Ent : Internal_Entity_Type_Access_Def :=
       Internal_Entity_Type_Access_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13236 '<FieldAccess for designated_type at nodes.lkt:23270:9>' Fld_1 ada/nodes.lkt:23270
--# expr-start 13235 '<FieldAccess for subtype_indication at nodes.lkt:23270:9>' Fld ada/nodes.lkt:23270
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Type_Access_Def_F_Subtype_Indication, Info => Ent.Info);
--# expr-done 13235
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13236
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Access_Def_P_Accessed_Type;
--# end
--# property-start TypeAccessDef.xref_equation ada/nodes.lkt:23273
pragma Warnings (Off, "is not referenced");
 function Type_Access_Def_P_Xref_Equation
  (Node : Bare_Type_Access_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Type_Access_Def  := Bare_Type_Access_Def (Node);
     Ent : Internal_Entity_Type_Access_Def :=
       Internal_Entity_Type_Access_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1509 with Inline_Always;
      Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1509 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1509;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13238 '<FieldAccess for xref_equation at nodes.lkt:23273:37>' Fld_1 ada/nodes.lkt:23273
--# expr-start 13237 '<FieldAccess for subtype_indication at nodes.lkt:23273:37>' Fld ada/nodes.lkt:23273
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Type_Access_Def_F_Subtype_Indication, Info => Ent.Info);
--# expr-done 13237
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 13238
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1509;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1509;
            raise;
      end;
   return Property_Result;
end Type_Access_Def_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Array_Type_Def
   --
      procedure Initialize_Fields_For_Array_Type_Def
        (Self : Bare_Array_Type_Def
         ; Array_Type_Def_F_Indices : Bare_Array_Indices
         ; Array_Type_Def_F_Component_Type : Bare_Component_Def
        ) is
      begin
            Self.Array_Type_Def_F_Indices := Array_Type_Def_F_Indices;
            Self.Array_Type_Def_F_Component_Type := Array_Type_Def_F_Component_Type;
      end Initialize_Fields_For_Array_Type_Def;
   function Array_Type_Def_F_Indices
     (Node : Bare_Array_Type_Def) return Bare_Array_Indices
   is
   begin
         return Node.Array_Type_Def_F_Indices;
   end;
   function Array_Type_Def_F_Component_Type
     (Node : Bare_Array_Type_Def) return Bare_Component_Def
   is
   begin
         return Node.Array_Type_Def_F_Component_Type;
   end;
--# property-start ArrayTypeDef.comp_type ada/nodes.lkt:23285
pragma Warnings (Off, "is not referenced");
 function Array_Type_Def_P_Comp_Type
  (Node : Bare_Array_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Array_Type_Def  := Bare_Array_Type_Def (Node);
     Ent : Internal_Entity_Array_Type_Def :=
       Internal_Entity_Array_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Component_Def;
Fld_1 : Internal_Entity_Type_Expr;
Fld_2 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13241 '<FieldAccess for designated_type at nodes.lkt:23286:9>' Fld_2 ada/nodes.lkt:23286
--# expr-start 13240 '<FieldAccess for type_expr at nodes.lkt:23286:9>' Fld_1 ada/nodes.lkt:23286
--# expr-start 13239 '<FieldAccess for component_type at nodes.lkt:23286:9>' Fld ada/nodes.lkt:23286
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Component_Def (Node => Ent.Node.Array_Type_Def_F_Component_Type, Info => Ent.Info);
--# expr-done 13239
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Type_Expr (Node => Fld.Node.Component_Def_F_Type_Expr, Info => Fld.Info);
--# expr-done 13240
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Fld_1.Node, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 13241
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Type_Def_P_Comp_Type;
--# end
--# property-start ArrayTypeDef.index_type ada/nodes.lkt:23289
pragma Warnings (Off, "is not referenced");
 function Array_Type_Def_P_Index_Type
  (Node : Bare_Array_Type_Def
      ; Dim : Integer
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Array_Type_Def  := Bare_Array_Type_Def (Node);
     Ent : Internal_Entity_Array_Type_Def :=
       Internal_Entity_Array_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind dim Dim
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Array_Indices;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13243 '<FieldAccess for index_type at nodes.lkt:23290:9>' Fld_1 ada/nodes.lkt:23290
--# expr-start 13242 '<FieldAccess for indices at nodes.lkt:23290:9>' Fld ada/nodes.lkt:23290
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Array_Indices (Node => Ent.Node.Array_Type_Def_F_Indices, Info => Ent.Info);
--# expr-done 13242
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]ArrayIndices.index_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Index_Type (Node => Fld.Node, Dim => Dim, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13243
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Type_Def_P_Index_Type;
--# end
--# property-start ArrayTypeDef.array_ndims ada/nodes.lkt:23293
pragma Warnings (Off, "is not referenced");
 function Array_Type_Def_P_Array_Ndims
  (Node : Bare_Array_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Array_Type_Def  := Bare_Array_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Integer;
      Fld : Bare_Array_Indices;
Fld_1 : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13245 '<FieldAccess for ndims at nodes.lkt:23293:30>' Fld_1 ada/nodes.lkt:23293
--# expr-start 13244 '<FieldAccess for indices at nodes.lkt:23293:30>' Fld ada/nodes.lkt:23293
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Array_Type_Def_F_Indices;
--# expr-done 13244
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]ArrayIndices.ndims'
Fld_1 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Ndims (Node => Fld);
--# end
--# expr-done 13245
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Type_Def_P_Array_Ndims;
--# end
--# property-start ArrayTypeDef.is_limited_type ada/nodes.lkt:23295
pragma Warnings (Off, "is not referenced");
 function Array_Type_Def_P_Is_Limited_Type
  (Node : Bare_Array_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Array_Type_Def  := Bare_Array_Type_Def (Node);
     Ent : Internal_Entity_Array_Type_Def :=
       Internal_Entity_Array_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
Dyn_Var_Bind_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13248 '<bind at nodes.lkt:23296:9>' Dyn_Var_Bind_Result ada/nodes.lkt:23296
Bound_Origin := No_Bare_Ada_Node; 
--# expr-start 13247 '<FieldAccess for is_limited_type at nodes.lkt:23298:9>' Fld_1 ada/nodes.lkt:23298
--# expr-start 13246 '<FieldAccess for comp_type at nodes.lkt:23298:9>' Fld ada/nodes.lkt:23298
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ArrayTypeDef.comp_type
Fld := Libadalang.Implementation.Array_Type_Def_P_Comp_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 13246
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_limited_type
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Is_Limited_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 13247
Dyn_Var_Bind_Result := Fld_1; 
--# expr-done 13248
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Type_Def_P_Is_Limited_Type;
--# end
--# property-start ArrayTypeDef.xref_equation ada/nodes.lkt:23302
pragma Warnings (Off, "is not referenced");
 function Array_Type_Def_P_Xref_Equation
  (Node : Bare_Array_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Array_Type_Def  := Bare_Array_Type_Def (Node);
     Ent : Internal_Entity_Array_Type_Def :=
       Internal_Entity_Array_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1514 with Inline_Always;
      Fld : Internal_Entity_Array_Indices;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Component_Def;
Fld_3 : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1514 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Fld_3);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1514;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13253 '<LogicBinaryOp And at nodes.lkt:23303:9>' And_Pred ada/nodes.lkt:23303
--# expr-start 13250 '<FieldAccess for sub_equation at nodes.lkt:23303:9>' Fld_1 ada/nodes.lkt:23303
--# expr-start 13249 '<FieldAccess for indices at nodes.lkt:23303:9>' Fld ada/nodes.lkt:23303
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Array_Indices (Node => Ent.Node.Array_Type_Def_F_Indices, Info => Ent.Info);
--# expr-done 13249
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 13250
--# expr-start 13252 '<FieldAccess for sub_equation at nodes.lkt:23303:42>' Fld_3 ada/nodes.lkt:23303
--# expr-start 13251 '<FieldAccess for component_type at nodes.lkt:23303:42>' Fld_2 ada/nodes.lkt:23303
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Component_Def (Node => Ent.Node.Array_Type_Def_F_Component_Type, Info => Ent.Info);
--# expr-done 13251
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_2.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_2.Info);
--# end
--# expr-done 13252
And_Pred := Create_And (Fld_1, Fld_3, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23303:9") else null)); 
--# expr-done 13253
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1514;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1514;
            raise;
      end;
   return Property_Result;
end Array_Type_Def_P_Xref_Equation;
--# end
--# property-start ArrayTypeDef.predefined_operators ada/nodes.lkt:23306
pragma Warnings (Off, "is not referenced");
 function Array_Type_Def_P_Predefined_Operators
  (Node : Bare_Array_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Array_Type_Def  := Bare_Array_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1515 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Local_Comp_Type_Expr : Bare_Type_Expr;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Fld_3 : Bare_Component_Def;
Fld_4 : Bare_Type_Expr;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Fld_5 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Fld_6 : Internal_Env_Assoc := No_Env_Assoc;
Sym_2 : Symbol_Type;
Cast_Expr_4 : Bare_Type_Decl;
Cast_Result_5 : Bare_Base_Type_Decl;
Cast_Expr_5 : Bare_Type_Decl;
Cast_Result_6 : Bare_Base_Type_Decl;
Fld_7 : Internal_Env_Assoc := No_Env_Assoc;
Sym_3 : Symbol_Type;
Cast_Expr_6 : Bare_Type_Decl;
Cast_Result_7 : Bare_Base_Type_Decl;
Cast_Expr_7 : Bare_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Fld_8 : Internal_Env_Assoc := No_Env_Assoc;
Sym_4 : Symbol_Type;
Cast_Expr_8 : Bare_Type_Decl;
Cast_Result_9 : Bare_Base_Type_Decl;
Cast_Expr_9 : Bare_Type_Decl;
Cast_Result_10 : Bare_Base_Type_Decl;
Fld_9 : Internal_Env_Assoc := No_Env_Assoc;
Sym_5 : Symbol_Type;
Cast_Expr_10 : Bare_Type_Decl;
Cast_Result_11 : Bare_Base_Type_Decl;
Cast_Expr_11 : Bare_Type_Decl;
Cast_Result_12 : Bare_Base_Type_Decl;
Fld_10 : Internal_Env_Assoc := No_Env_Assoc;
Sym_6 : Symbol_Type;
Cast_Expr_12 : Bare_Type_Decl;
Cast_Result_13 : Bare_Base_Type_Decl;
Cast_Expr_13 : Bare_Type_Decl;
Cast_Result_14 : Bare_Base_Type_Decl;
Cast_Expr_14 : Bare_Type_Decl;
Cast_Result_15 : Bare_Base_Type_Decl;
Fld_11 : Internal_Env_Assoc := No_Env_Assoc;
Sym_7 : Symbol_Type;
Cast_Expr_15 : Bare_Type_Decl;
Cast_Result_16 : Bare_Base_Type_Decl;
Cast_Expr_16 : Bare_Type_Decl;
Cast_Result_17 : Bare_Base_Type_Decl;
Cast_Expr_17 : Bare_Type_Decl;
Cast_Result_18 : Bare_Base_Type_Decl;
Fld_12 : Internal_Env_Assoc := No_Env_Assoc;
Sym_8 : Symbol_Type;
Cast_Expr_18 : Bare_Type_Decl;
Cast_Result_19 : Bare_Base_Type_Decl;
Cast_Expr_19 : Bare_Type_Decl;
Cast_Result_20 : Bare_Base_Type_Decl;
Cast_Expr_20 : Bare_Type_Decl;
Cast_Result_21 : Bare_Base_Type_Decl;
Fld_13 : Internal_Env_Assoc := No_Env_Assoc;
Sym_9 : Symbol_Type;
Cast_Expr_21 : Bare_Type_Decl;
Cast_Result_22 : Bare_Base_Type_Decl;
Cast_Expr_22 : Bare_Type_Decl;
Cast_Result_23 : Bare_Base_Type_Decl;
Fld_14 : Internal_Env_Assoc := No_Env_Assoc;
Sym_10 : Symbol_Type;
Cast_Expr_23 : Bare_Type_Decl;
Cast_Result_24 : Bare_Base_Type_Decl;
Fld_15 : Internal_Env_Assoc := No_Env_Assoc;
Sym_11 : Symbol_Type;
Cast_Expr_24 : Bare_Type_Decl;
Cast_Result_25 : Bare_Base_Type_Decl;
Cast_Expr_25 : Bare_Type_Decl;
Cast_Result_26 : Bare_Base_Type_Decl;
Fld_16 : Internal_Env_Assoc := No_Env_Assoc;
Sym_12 : Symbol_Type;
Cast_Expr_26 : Bare_Type_Decl;
Cast_Result_27 : Bare_Base_Type_Decl;
Cast_Expr_27 : Bare_Type_Decl;
Cast_Result_28 : Bare_Base_Type_Decl;
Fld_17 : Internal_Env_Assoc := No_Env_Assoc;
Sym_13 : Symbol_Type;
Cast_Expr_28 : Bare_Type_Decl;
Cast_Result_29 : Bare_Base_Type_Decl;
Cast_Expr_29 : Bare_Type_Decl;
Cast_Result_30 : Bare_Base_Type_Decl;
Cast_Expr_30 : Bare_Type_Decl;
Cast_Result_31 : Bare_Base_Type_Decl;
Fld_18 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1515 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (Fld_18);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1515;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Array_Type_Def_Array_Type_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Array_Type_Def,
                                As_Bare_Array_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13291 '<Let at nodes.lkt:23307:9>' Let_Result_2 ada/nodes.lkt:23307
--# scope-start
--# expr-start 13255 '<Cast to TypeDecl at nodes.lkt:23307:25>' Cast_Result ada/nodes.lkt:23307
--# expr-start 13254 '<parent at nodes.lkt:23307:25>' Fld ada/nodes.lkt:23307
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13254
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13255
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13290 '<Let at nodes.lkt:23308:9>' Let_Result_1 ada/nodes.lkt:23308
--# scope-start
--# expr-start 13257 '<FieldAccess for node at nodes.lkt:23308:25>' Fld_2 ada/nodes.lkt:23308
--# expr-start 13256 '<FieldAccess for bool_type at nodes.lkt:23308:25>' Fld_1 ada/nodes.lkt:23308
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13256
Fld_2 := Fld_1.Node;
--# expr-done 13257
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13289 '<Let at nodes.lkt:23309:9>' Let_Result ada/nodes.lkt:23309
--# scope-start
--# expr-start 13259 '<FieldAccess for type_expr at nodes.lkt:23309:30>' Fld_4 ada/nodes.lkt:23309
--# expr-start 13258 '<FieldAccess for component_type at nodes.lkt:23309:30>' Fld_3 ada/nodes.lkt:23309
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Self.Array_Type_Def_F_Component_Type;
--# expr-done 13258
      if Fld_3 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Fld_3.Component_Def_F_Type_Expr;
--# expr-done 13259
Local_Comp_Type_Expr := Fld_4; 
--# bind comp_type_expr Local_Comp_Type_Expr
--# expr-start 13288 '<ArrayLiteral at nodes.lkt:23319:9>' Array_Lit ada/nodes.lkt:23319
--# expr-start 13261 '<FieldAccess for create_binop_assoc at nodes.lkt:23320:13>' Fld_5 ada/nodes.lkt:23320
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13260 '<Symbol "<" at nodes.lkt:23320:37>' Sym ada/nodes.lkt:23320
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 13260
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
--# property-call-start AdaNode.create_binop_assoc
Fld_5 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Local_Bool_Type);
--# end
--# expr-done 13261
--# expr-start 13263 '<FieldAccess for create_binop_assoc at nodes.lkt:23321:13>' Fld_6 ada/nodes.lkt:23321
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13262 '<Symbol "<=" at nodes.lkt:23322:17>' Sym_1 ada/nodes.lkt:23322
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 13262
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
--# property-call-start AdaNode.create_binop_assoc
Fld_6 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_3, Rhs => Cast_Result_4, Ret => Local_Bool_Type);
--# end
--# expr-done 13263
--# expr-start 13265 '<FieldAccess for create_binop_assoc at nodes.lkt:23327:13>' Fld_7 ada/nodes.lkt:23327
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13264 '<Symbol "=" at nodes.lkt:23327:37>' Sym_2 ada/nodes.lkt:23327
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13264
Cast_Expr_4 := Local_Self_Type; 
      Cast_Result_5 := Cast_Expr_4;
Cast_Expr_5 := Local_Self_Type; 
      Cast_Result_6 := Cast_Expr_5;
--# property-call-start AdaNode.create_binop_assoc
Fld_7 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_2, Lhs => Cast_Result_5, Rhs => Cast_Result_6, Ret => Local_Bool_Type);
--# end
--# expr-done 13265
--# expr-start 13267 '<FieldAccess for create_binop_assoc at nodes.lkt:23328:13>' Fld_8 ada/nodes.lkt:23328
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13266 '<Symbol "/=" at nodes.lkt:23329:17>' Sym_3 ada/nodes.lkt:23329
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13266
Cast_Expr_6 := Local_Self_Type; 
      Cast_Result_7 := Cast_Expr_6;
Cast_Expr_7 := Local_Self_Type; 
      Cast_Result_8 := Cast_Expr_7;
--# property-call-start AdaNode.create_binop_assoc
Fld_8 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_3, Lhs => Cast_Result_7, Rhs => Cast_Result_8, Ret => Local_Bool_Type);
--# end
--# expr-done 13267
--# expr-start 13269 '<FieldAccess for create_binop_assoc at nodes.lkt:23334:13>' Fld_9 ada/nodes.lkt:23334
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13268 '<Symbol ">" at nodes.lkt:23334:37>' Sym_4 ada/nodes.lkt:23334
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 13268
Cast_Expr_8 := Local_Self_Type; 
      Cast_Result_9 := Cast_Expr_8;
Cast_Expr_9 := Local_Self_Type; 
      Cast_Result_10 := Cast_Expr_9;
--# property-call-start AdaNode.create_binop_assoc
Fld_9 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_4, Lhs => Cast_Result_9, Rhs => Cast_Result_10, Ret => Local_Bool_Type);
--# end
--# expr-done 13269
--# expr-start 13271 '<FieldAccess for create_binop_assoc at nodes.lkt:23335:13>' Fld_10 ada/nodes.lkt:23335
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13270 '<Symbol ">=" at nodes.lkt:23336:17>' Sym_5 ada/nodes.lkt:23336
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 13270
Cast_Expr_10 := Local_Self_Type; 
      Cast_Result_11 := Cast_Expr_10;
Cast_Expr_11 := Local_Self_Type; 
      Cast_Result_12 := Cast_Expr_11;
--# property-call-start AdaNode.create_binop_assoc
Fld_10 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_5, Lhs => Cast_Result_11, Rhs => Cast_Result_12, Ret => Local_Bool_Type);
--# end
--# expr-done 13271
--# expr-start 13273 '<FieldAccess for create_binop_assoc at nodes.lkt:23341:13>' Fld_11 ada/nodes.lkt:23341
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13272 '<Symbol "and" at nodes.lkt:23342:17>' Sym_6 ada/nodes.lkt:23342
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_And); 
--# expr-done 13272
Cast_Expr_12 := Local_Self_Type; 
      Cast_Result_13 := Cast_Expr_12;
Cast_Expr_13 := Local_Self_Type; 
      Cast_Result_14 := Cast_Expr_13;
Cast_Expr_14 := Local_Self_Type; 
      Cast_Result_15 := Cast_Expr_14;
--# property-call-start AdaNode.create_binop_assoc
Fld_11 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_6, Lhs => Cast_Result_13, Rhs => Cast_Result_14, Ret => Cast_Result_15);
--# end
--# expr-done 13273
--# expr-start 13275 '<FieldAccess for create_binop_assoc at nodes.lkt:23347:13>' Fld_12 ada/nodes.lkt:23347
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13274 '<Symbol "or" at nodes.lkt:23348:17>' Sym_7 ada/nodes.lkt:23348
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Or); 
--# expr-done 13274
Cast_Expr_15 := Local_Self_Type; 
      Cast_Result_16 := Cast_Expr_15;
Cast_Expr_16 := Local_Self_Type; 
      Cast_Result_17 := Cast_Expr_16;
Cast_Expr_17 := Local_Self_Type; 
      Cast_Result_18 := Cast_Expr_17;
--# property-call-start AdaNode.create_binop_assoc
Fld_12 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_7, Lhs => Cast_Result_16, Rhs => Cast_Result_17, Ret => Cast_Result_18);
--# end
--# expr-done 13275
--# expr-start 13277 '<FieldAccess for create_binop_assoc at nodes.lkt:23353:13>' Fld_13 ada/nodes.lkt:23353
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13276 '<Symbol "xor" at nodes.lkt:23354:17>' Sym_8 ada/nodes.lkt:23354
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Xor); 
--# expr-done 13276
Cast_Expr_18 := Local_Self_Type; 
      Cast_Result_19 := Cast_Expr_18;
Cast_Expr_19 := Local_Self_Type; 
      Cast_Result_20 := Cast_Expr_19;
Cast_Expr_20 := Local_Self_Type; 
      Cast_Result_21 := Cast_Expr_20;
--# property-call-start AdaNode.create_binop_assoc
Fld_13 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_8, Lhs => Cast_Result_19, Rhs => Cast_Result_20, Ret => Cast_Result_21);
--# end
--# expr-done 13277
--# expr-start 13279 '<FieldAccess for create_unop_assoc at nodes.lkt:23359:13>' Fld_14 ada/nodes.lkt:23359
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13278 '<Symbol "not" at nodes.lkt:23360:17>' Sym_9 ada/nodes.lkt:23360
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Not); 
--# expr-done 13278
Cast_Expr_21 := Local_Self_Type; 
      Cast_Result_22 := Cast_Expr_21;
Cast_Expr_22 := Local_Self_Type; 
      Cast_Result_23 := Cast_Expr_22;
--# property-call-start AdaNode.create_unop_assoc
Fld_14 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_9, Rhs => Cast_Result_22, Ret => Cast_Result_23);
--# end
--# expr-done 13279
--# expr-start 13281 '<FieldAccess for create_binop_assoc_l_r_expr at nodes.lkt:23364:13>' Fld_15 ada/nodes.lkt:23364
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13280 '<Symbol "&" at nodes.lkt:23365:17>' Sym_10 ada/nodes.lkt:23365
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym); 
--# expr-done 13280
Cast_Expr_23 := Local_Self_Type; 
      Cast_Result_24 := Cast_Expr_23;
--# property-call-start AdaNode.create_binop_assoc_l_r_expr
Fld_15 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc_L_R_Expr (Node => Self, Op => Sym_10, Lhs => Local_Comp_Type_Expr, Rhs => Local_Comp_Type_Expr, Ret => Cast_Result_24);
--# end
--# expr-done 13281
--# expr-start 13283 '<FieldAccess for create_binop_assoc_l_expr at nodes.lkt:23370:13>' Fld_16 ada/nodes.lkt:23370
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13282 '<Symbol "&" at nodes.lkt:23371:17>' Sym_11 ada/nodes.lkt:23371
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym); 
--# expr-done 13282
Cast_Expr_24 := Local_Self_Type; 
      Cast_Result_25 := Cast_Expr_24;
Cast_Expr_25 := Local_Self_Type; 
      Cast_Result_26 := Cast_Expr_25;
--# property-call-start AdaNode.create_binop_assoc_l_expr
Fld_16 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc_L_Expr (Node => Self, Op => Sym_11, Lhs => Local_Comp_Type_Expr, Rhs => Cast_Result_25, Ret => Cast_Result_26);
--# end
--# expr-done 13283
--# expr-start 13285 '<FieldAccess for create_binop_assoc_r_expr at nodes.lkt:23376:13>' Fld_17 ada/nodes.lkt:23376
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13284 '<Symbol "&" at nodes.lkt:23377:17>' Sym_12 ada/nodes.lkt:23377
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym); 
--# expr-done 13284
Cast_Expr_26 := Local_Self_Type; 
      Cast_Result_27 := Cast_Expr_26;
Cast_Expr_27 := Local_Self_Type; 
      Cast_Result_28 := Cast_Expr_27;
--# property-call-start AdaNode.create_binop_assoc_r_expr
Fld_17 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc_R_Expr (Node => Self, Op => Sym_12, Lhs => Cast_Result_27, Rhs => Local_Comp_Type_Expr, Ret => Cast_Result_28);
--# end
--# expr-done 13285
--# expr-start 13287 '<FieldAccess for create_binop_assoc at nodes.lkt:23382:13>' Fld_18 ada/nodes.lkt:23382
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13286 '<Symbol "&" at nodes.lkt:23382:37>' Sym_13 ada/nodes.lkt:23382
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym); 
--# expr-done 13286
Cast_Expr_28 := Local_Self_Type; 
      Cast_Result_29 := Cast_Expr_28;
Cast_Expr_29 := Local_Self_Type; 
      Cast_Result_30 := Cast_Expr_29;
Cast_Expr_30 := Local_Self_Type; 
      Cast_Result_31 := Cast_Expr_30;
--# property-call-start AdaNode.create_binop_assoc
Fld_18 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_13, Lhs => Cast_Result_29, Rhs => Cast_Result_30, Ret => Cast_Result_31);
--# end
--# expr-done 13287
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_5, 2 => Fld_6, 3 => Fld_7, 4 => Fld_8, 5 => Fld_9, 6 => Fld_10, 7 => Fld_11, 8 => Fld_12, 9 => Fld_13, 10 => Fld_14, 11 => Fld_15, 12 => Fld_16, 13 => Fld_17, 14 => Fld_18)); 
--# expr-done 13288
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
--# expr-done 13289
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13290
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 13291
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1515;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1515;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Array_Type_Def_P_Predefined_Operators;
--# end
--# property-start ArrayTypeDef.is_static ada/nodes.lkt:23387
pragma Warnings (Off, "is not referenced");
 function Array_Type_Def_P_Is_Static
  (Node : Bare_Array_Type_Def
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Array_Type_Def  := Bare_Array_Type_Def (Node);
     Ent : Internal_Entity_Array_Type_Def :=
       Internal_Entity_Array_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Array_Indices;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13293 '<FieldAccess for is_static at nodes.lkt:23387:29>' Fld_1 ada/nodes.lkt:23387
--# expr-start 13292 '<FieldAccess for indices at nodes.lkt:23387:29>' Fld ada/nodes.lkt:23387
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Array_Indices (Node => Ent.Node.Array_Type_Def_F_Indices, Info => Ent.Info);
--# expr-done 13292
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]ArrayIndices.is_static'
Fld_1 := Libadalang.Implementation.Dispatcher_Array_Indices_P_Is_Static (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 13293
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Type_Def_P_Is_Static;
--# end
--# property-start ArrayTypeDef.xref_entry_point ada/nodes.lkt:23389
pragma Warnings (Off, "is not referenced");
 function Array_Type_Def_P_Xref_Entry_Point
  (Node : Bare_Array_Type_Def
  )
   return Boolean
is
   Self : Bare_Array_Type_Def  := Bare_Array_Type_Def (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Array_Type_Def_P_Xref_Entry_Point;
--# end
   --
   --  Primitives for Bare_Derived_Type_Def
   --
      procedure Initialize_Fields_For_Derived_Type_Def
        (Self : Bare_Derived_Type_Def
         ; Derived_Type_Def_F_Has_Abstract : Bare_Abstract_Node
         ; Derived_Type_Def_F_Has_Limited : Bare_Limited_Node
         ; Derived_Type_Def_F_Has_Synchronized : Bare_Synchronized_Node
         ; Derived_Type_Def_F_Subtype_Indication : Bare_Subtype_Indication
         ; Derived_Type_Def_F_Interfaces : Bare_Parent_List
         ; Derived_Type_Def_F_Record_Extension : Bare_Base_Record_Def
         ; Derived_Type_Def_F_Has_With_Private : Bare_With_Private
        ) is
      begin
            Self.Derived_Type_Def_F_Has_Abstract := Derived_Type_Def_F_Has_Abstract;
            Self.Derived_Type_Def_F_Has_Limited := Derived_Type_Def_F_Has_Limited;
            Self.Derived_Type_Def_F_Has_Synchronized := Derived_Type_Def_F_Has_Synchronized;
            Self.Derived_Type_Def_F_Subtype_Indication := Derived_Type_Def_F_Subtype_Indication;
            Self.Derived_Type_Def_F_Interfaces := Derived_Type_Def_F_Interfaces;
            Self.Derived_Type_Def_F_Record_Extension := Derived_Type_Def_F_Record_Extension;
            Self.Derived_Type_Def_F_Has_With_Private := Derived_Type_Def_F_Has_With_Private;
      end Initialize_Fields_For_Derived_Type_Def;
   function Derived_Type_Def_F_Has_Abstract
     (Node : Bare_Derived_Type_Def) return Bare_Abstract_Node
   is
   begin
         return Node.Derived_Type_Def_F_Has_Abstract;
   end;
   function Derived_Type_Def_F_Has_Limited
     (Node : Bare_Derived_Type_Def) return Bare_Limited_Node
   is
   begin
         return Node.Derived_Type_Def_F_Has_Limited;
   end;
   function Derived_Type_Def_F_Has_Synchronized
     (Node : Bare_Derived_Type_Def) return Bare_Synchronized_Node
   is
   begin
         return Node.Derived_Type_Def_F_Has_Synchronized;
   end;
   function Derived_Type_Def_F_Subtype_Indication
     (Node : Bare_Derived_Type_Def) return Bare_Subtype_Indication
   is
   begin
         return Node.Derived_Type_Def_F_Subtype_Indication;
   end;
   function Derived_Type_Def_F_Interfaces
     (Node : Bare_Derived_Type_Def) return Bare_Parent_List
   is
   begin
         return Node.Derived_Type_Def_F_Interfaces;
   end;
   function Derived_Type_Def_F_Record_Extension
     (Node : Bare_Derived_Type_Def) return Bare_Base_Record_Def
   is
   begin
         return Node.Derived_Type_Def_F_Record_Extension;
   end;
   function Derived_Type_Def_F_Has_With_Private
     (Node : Bare_Derived_Type_Def) return Bare_With_Private
   is
   begin
         return Node.Derived_Type_Def_F_Has_With_Private;
   end;
--# property-start DerivedTypeDef.array_ndims ada/nodes.lkt:23411
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Array_Ndims
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Integer;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Integer;
Scope_Result : Integer;
Fld_2 : Integer;
Result_Var : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13294 '<FieldAccess for base_type at nodes.lkt:23412:9>' Fld ada/nodes.lkt:23412
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13294
Var_Expr_0 := Fld;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 13295 '<FieldAccess for array_ndims at nodes.lkt:23412:37>' Fld_1 ada/nodes.lkt:23412
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.array_ndims'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Array_Ndims (Node => Var_Expr_0.Node, Origin => Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 13295
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 13296 '<Super at nodes.lkt:23412:67>' Fld_2 ada/nodes.lkt:23412
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.array_ndims
Fld_2 := Libadalang.Implementation.Type_Def_P_Array_Ndims (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13296
   Result_Var := Fld_2;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Array_Ndims;
--# end
--# property-start DerivedTypeDef.base_type ada/nodes.lkt:23415
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Base_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13298 '<FieldAccess for designated_type at nodes.lkt:23416:9>' Fld_1 ada/nodes.lkt:23416
--# expr-start 13297 '<FieldAccess for subtype_indication at nodes.lkt:23416:9>' Fld ada/nodes.lkt:23416
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Derived_Type_Def_F_Subtype_Indication, Info => Ent.Info);
--# expr-done 13297
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13298
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Base_Type;
--# end
--# property-start DerivedTypeDef.base_interfaces ada/nodes.lkt:23418
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Base_Interfaces
  (Node : Bare_Derived_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_1520 with Inline_Always;
      Fld : Internal_Entity_Parent_List;
Fld_1 : Bare_Parent_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_1520 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1520;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13301 '<Map at nodes.lkt:23419:9>' Map_Result ada/nodes.lkt:23419
   --# expr-start 13299 '<FieldAccess for interfaces at nodes.lkt:23419:9>' Fld ada/nodes.lkt:23419
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Parent_List (Node => Ent.Node.Derived_Type_Def_F_Interfaces, Info => Ent.Info);
--# expr-done 13299
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Base_Type_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind i Item_0
      --# expr-start 13300 '<FieldAccess for name_designated_type at nodes.lkt:23419:36>' Fld_3 ada/nodes.lkt:23419
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_3 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 13300
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Fld_3;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13301
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1520;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1520;
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Base_Interfaces;
--# end
--# property-start DerivedTypeDef.is_task_type ada/nodes.lkt:23422
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Task_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13303 '<FieldAccess for is_task_type at nodes.lkt:23422:32>' Fld_1 ada/nodes.lkt:23422
--# expr-start 13302 '<FieldAccess for base_type at nodes.lkt:23422:32>' Fld ada/nodes.lkt:23422
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13302
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_task_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Task_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 13303
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Task_Type;
--# end
--# property-start DerivedTypeDef.is_int_type ada/nodes.lkt:23425
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Int_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13305 '<FieldAccess for is_int_type at nodes.lkt:23425:31>' Fld_1 ada/nodes.lkt:23425
--# expr-start 13304 '<FieldAccess for base_type at nodes.lkt:23425:31>' Fld ada/nodes.lkt:23425
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13304
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_int_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Int_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13305
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Int_Type;
--# end
--# property-start DerivedTypeDef.is_access_type ada/nodes.lkt:23428
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Access_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
      As_Entity : Internal_Entity_Derived_Type_Def;
Is_Null : Boolean;
If_Result : Internal_Entity_Derived_Type_Def;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13308 '<FieldAccess for is_access_type at nodes.lkt:23429:9>' Fld_1 ada/nodes.lkt:23429
--# expr-start 13307 '<FieldAccess for base_type at nodes.lkt:23429:9>' Fld ada/nodes.lkt:23429
--# expr-start 13306 '<as_bare_entity at nodes.lkt:23429:9>' If_Result ada/nodes.lkt:23429
Is_Null := Self = null; 
if Is_Null then
   If_Result := No_Entity_Derived_Type_Def;
else
As_Entity := (Info => No_Entity_Info, Node => Self); 
   If_Result := As_Entity;
end if;
--# expr-done 13306
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => If_Result.Node, Origin => Origin, E_Info => If_Result.Info);
--# end
--# expr-done 13307
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_access_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Access_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13308
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Access_Type;
--# end
--# property-start DerivedTypeDef.is_char_type ada/nodes.lkt:23432
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Char_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13310 '<FieldAccess for is_char_type at nodes.lkt:23432:32>' Fld_1 ada/nodes.lkt:23432
--# expr-start 13309 '<FieldAccess for base_type at nodes.lkt:23432:32>' Fld ada/nodes.lkt:23432
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13309
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_char_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Char_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13310
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Char_Type;
--# end
--# property-start DerivedTypeDef.is_float_type ada/nodes.lkt:23435
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Float_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13312 '<FieldAccess for is_float_type at nodes.lkt:23435:33>' Fld_1 ada/nodes.lkt:23435
--# expr-start 13311 '<FieldAccess for base_type at nodes.lkt:23435:33>' Fld ada/nodes.lkt:23435
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13311
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_float_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Float_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13312
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Float_Type;
--# end
--# property-start DerivedTypeDef.is_fixed_point ada/nodes.lkt:23438
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Fixed_Point
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13314 '<FieldAccess for is_fixed_point at nodes.lkt:23438:34>' Fld_1 ada/nodes.lkt:23438
--# expr-start 13313 '<FieldAccess for base_type at nodes.lkt:23438:34>' Fld ada/nodes.lkt:23438
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13313
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_fixed_point'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Fixed_Point (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13314
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Fixed_Point;
--# end
--# property-start DerivedTypeDef.accessed_type ada/nodes.lkt:23441
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Accessed_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_295 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13315 '<FieldAccess for base_type at nodes.lkt:23442:9>' Fld ada/nodes.lkt:23442
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13315
Var_Expr_295 := Fld;
if Var_Expr_295 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 13316 '<FieldAccess for accessed_type at nodes.lkt:23442:9>' Fld_1 ada/nodes.lkt:23442
      if Var_Expr_295.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Var_Expr_295.Node, Origin => Origin, E_Info => Var_Expr_295.Info);
--# end
--# expr-done 13316
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Accessed_Type;
--# end
--# property-start DerivedTypeDef.is_tagged_type ada/nodes.lkt:23445
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Tagged_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Record_Def;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity_With_Private;
Fld_2 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13322 '<BooleanBinaryOp Or at nodes.lkt:23446:9>' If_Result ada/nodes.lkt:23446
--# expr-start 13319 '<Not at nodes.lkt:23446:9>' Not_Val ada/nodes.lkt:23446
--# expr-start 13318 '<IsNull at nodes.lkt:23446:13>' Is_Null ada/nodes.lkt:23446
--# expr-start 13317 '<FieldAccess for record_extension at nodes.lkt:23446:13>' Fld ada/nodes.lkt:23446
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Base_Record_Def (Node => Ent.Node.Derived_Type_Def_F_Record_Extension, Info => Ent.Info);
--# expr-done 13317
Is_Null := Fld.Node = null; 
--# expr-done 13318
Not_Val := not (Is_Null); 
--# expr-done 13319
if Not_Val then
   If_Result := True;
else
   --# expr-start 13321 '<FieldAccess for as_bool at nodes.lkt:23446:46>' Fld_2 ada/nodes.lkt:23446
--# expr-start 13320 '<FieldAccess for has_with_private at nodes.lkt:23446:46>' Fld_1 ada/nodes.lkt:23446
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_With_Private (Node => Ent.Node.Derived_Type_Def_F_Has_With_Private, Info => Ent.Info);
--# expr-done 13320
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]WithPrivate.as_bool'
Fld_2 := Libadalang.Implementation.Dispatcher_With_Private_P_As_Bool (Node => Fld_1.Node);
--# end
--# expr-done 13321
   If_Result := Fld_2;
end if;
--# expr-done 13322
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Tagged_Type;
--# end
--# property-start DerivedTypeDef.is_enum_type ada/nodes.lkt:23449
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Enum_Type
  (Node : Bare_Derived_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13324 '<FieldAccess for is_enum_type at nodes.lkt:23449:32>' Fld_1 ada/nodes.lkt:23449
--# expr-start 13323 '<FieldAccess for base_type at nodes.lkt:23449:32>' Fld ada/nodes.lkt:23449
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13323
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_enum_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Enum_Type (Node => Fld.Node, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13324
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Enum_Type;
--# end
--# property-start DerivedTypeDef.is_limited_type ada/nodes.lkt:23451
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Limited_Type
  (Node : Bare_Derived_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Base_Type_Decl;
Var_Expr_296 : Internal_Entity_Base_Record_Def;
Var_Expr_297 : Internal_Entity_Component_List;
Fld : Bare_Limited_Node;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Base_Record_Def;
Fld_3 : Internal_Entity_Component_List;
Fld_4 : Boolean;
Scope_Result : Boolean;
Result_Var : Boolean;
Scope_Result_1 : Boolean;
Result_Var_1 : Boolean;
If_Result : Boolean;
Bound_Origin : Bare_Ada_Node;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Boolean;
Not_Val : Boolean;
Fld_7 : Boolean;
If_Result_1 : Boolean;
Scope_Result_2 : Boolean;
Result_Var_2 : Boolean;
Dyn_Var_Bind_Result : Boolean;
If_Result_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13337 '<BooleanBinaryOp Or at nodes.lkt:23452:9>' If_Result_2 ada/nodes.lkt:23452
--# expr-start 13330 '<BooleanBinaryOp Or at nodes.lkt:23453:13>' If_Result ada/nodes.lkt:23453
--# expr-start 13326 '<FieldAccess for as_bool at nodes.lkt:23453:13>' Fld_1 ada/nodes.lkt:23453
--# expr-start 13325 '<FieldAccess for has_limited at nodes.lkt:23453:13>' Fld ada/nodes.lkt:23453
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Derived_Type_Def_F_Has_Limited;
--# expr-done 13325
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Limited.as_bool'
Fld_1 := Libadalang.Implementation.Dispatcher_Limited_Node_P_As_Bool (Node => Fld);
--# end
--# expr-done 13326
if Fld_1 then
   If_Result := True;
else
--# expr-start 13327 '<FieldAccess for record_extension at nodes.lkt:23454:16>' Fld_2 ada/nodes.lkt:23454
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Record_Def (Node => Ent.Node.Derived_Type_Def_F_Record_Extension, Info => Ent.Info);
--# expr-done 13327
Var_Expr_296 := Fld_2;
if Var_Expr_296 /= No_Entity_Base_Record_Def then
   --# scope-start
--# expr-start 13328 '<FieldAccess for comps at nodes.lkt:23454:16>' Fld_3 ada/nodes.lkt:23454
      if Var_Expr_296.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseRecordDef.comps
Fld_3 := Libadalang.Implementation.Base_Record_Def_P_Comps (Node => Var_Expr_296.Node, E_Info => Var_Expr_296.Info);
--# end
--# expr-done 13328
Var_Expr_297 := Fld_3;
if Var_Expr_297 /= No_Entity_Component_List then
   --# scope-start
--# expr-start 13329 '<FieldAccess for has_limited_component at nodes.lkt:23454:16>' Fld_4 ada/nodes.lkt:23454
      if Var_Expr_297.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.has_limited_component
Fld_4 := Libadalang.Implementation.Component_List_P_Has_Limited_Component (Node => Var_Expr_297.Node, E_Info => Var_Expr_297.Info);
--# end
--# expr-done 13329
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := False;
end if;
Scope_Result_1 := Result_Var;
   --# end
   Result_Var_1 := Scope_Result_1;
else
   Result_Var_1 := False;
end if;
   If_Result := Result_Var_1;
end if;
--# expr-done 13330
if If_Result then
   If_Result_2 := True;
else
   --# expr-start 13336 '<bind at nodes.lkt:23457:13>' Dyn_Var_Bind_Result ada/nodes.lkt:23457
Bound_Origin := No_Bare_Ada_Node; 
--# expr-start 13331 '<FieldAccess for base_type at nodes.lkt:23459:13>' Fld_5 ada/nodes.lkt:23459
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeDef.base_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Type_Def_P_Base_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 13331
Var_Expr_0 := Fld_5;
if Var_Expr_0 /= No_Entity_Base_Type_Decl then
   --# scope-start
   --# bind bt Var_Expr_0
--# expr-start 13335 '<BooleanBinaryOp And at nodes.lkt:23461:17>' If_Result_1 ada/nodes.lkt:23461
--# expr-start 13333 '<Not at nodes.lkt:23465:21>' Not_Val ada/nodes.lkt:23465
--# expr-start 13332 '<FieldAccess for is_interface_type at nodes.lkt:23465:25>' Fld_6 ada/nodes.lkt:23465
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.is_interface_type'
Fld_6 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Is_Interface_Type (Node => Var_Expr_0.Node, Origin => Bound_Origin, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 13332
Not_Val := not (Fld_6); 
--# expr-done 13333
if Not_Val then
   --# expr-start 13334 '<FieldAccess for is_limited_type at nodes.lkt:23467:21>' Fld_7 ada/nodes.lkt:23467
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_limited_type
Fld_7 := Libadalang.Implementation.Base_Type_Decl_P_Is_Limited_Type (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 13334
   If_Result_1 := Fld_7;
else
   If_Result_1 := False;
end if;
--# expr-done 13335
Scope_Result_2 := If_Result_1;
   --# end
   Result_Var_2 := Scope_Result_2;
else
   Result_Var_2 := False;
end if;
Dyn_Var_Bind_Result := Result_Var_2; 
--# expr-done 13336
   If_Result_2 := Dyn_Var_Bind_Result;
end if;
--# expr-done 13337
         Property_Result := If_Result_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Limited_Type;
--# end
--# property-start DerivedTypeDef.is_static ada/nodes.lkt:23472
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Is_Static
  (Node : Bare_Derived_Type_Def
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13339 '<FieldAccess for is_static_subtype at nodes.lkt:23472:29>' Fld_1 ada/nodes.lkt:23472
--# expr-start 13338 '<FieldAccess for subtype_indication at nodes.lkt:23472:29>' Fld ada/nodes.lkt:23472
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Derived_Type_Def_F_Subtype_Indication, Info => Ent.Info);
--# expr-done 13338
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubtypeIndication.is_static_subtype
Fld_1 := Libadalang.Implementation.Subtype_Indication_P_Is_Static_Subtype (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 13339
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Is_Static;
--# end
--# property-start DerivedTypeDef.xref_equation ada/nodes.lkt:23475
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Xref_Equation
  (Node : Bare_Derived_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1532 with Inline_Always;
            procedure Finalizer_Scope_3609 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Subtype_Indication;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Parent_List;
Fld_4 : Bare_Parent_List;
Fld_5 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_6 : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
And_Pred : Logic_Equation;
Dyn_Var_Bind_Result : Logic_Equation;
            procedure Finalizer_Scope_1532 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_2);
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_1532;
            procedure Finalizer_Scope_3609 is
            begin
                     Dec_Ref (Fld_6);
            end Finalizer_Scope_3609;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13348 '<bind at nodes.lkt:23479:9>' Dyn_Var_Bind_Result ada/nodes.lkt:23479
--# expr-start 13340 '<FieldAccess for children_env at nodes.lkt:23479:20>' Fld ada/nodes.lkt:23479
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13340
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 13347 '<LogicBinaryOp And at nodes.lkt:23481:9>' And_Pred ada/nodes.lkt:23481
--# expr-start 13342 '<FieldAccess for xref_equation at nodes.lkt:23481:9>' Fld_2 ada/nodes.lkt:23481
--# expr-start 13341 '<FieldAccess for subtype_indication at nodes.lkt:23481:9>' Fld_1 ada/nodes.lkt:23481
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Derived_Type_Def_F_Subtype_Indication, Info => Ent.Info);
--# expr-done 13341
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_2 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld_1.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_1.Info);
--# end
--# expr-done 13342
--# expr-start 13346 '<LogicAll at nodes.lkt:23482:14>' Logic_Boolean_Op ada/nodes.lkt:23482
--# expr-start 13345 '<Map at nodes.lkt:23482:14>' Map_Result ada/nodes.lkt:23482
   --# expr-start 13343 '<FieldAccess for interfaces at nodes.lkt:23482:14>' Fld_3 ada/nodes.lkt:23482
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Parent_List (Node => Ent.Node.Derived_Type_Def_F_Interfaces, Info => Ent.Info);
--# expr-done 13343
Fld_4 := Fld_3.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_4 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_4;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_5 := Fld_3.Info;
As_Entity := (Info => Fld_5, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind ifc Item_0
      --# expr-start 13344 '<FieldAccess for xref_equation at nodes.lkt:23482:49>' Fld_6 ada/nodes.lkt:23482
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_6 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Item_0.Node, Env => Bound_Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 13344
         declare
            Item_To_Append : constant Logic_Equation := Fld_6;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3609;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13345
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23482:14") else null)); 
--# expr-done 13346
And_Pred := Create_And (Fld_2, Logic_Boolean_Op, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23481:9") else null)); 
--# expr-done 13347
Dyn_Var_Bind_Result := And_Pred; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 13348
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1532;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1532;
                     Finalizer_Scope_3609;
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Xref_Equation;
--# end
--# property-start DerivedTypeDef.discrete_range ada/nodes.lkt:23485
pragma Warnings (Off, "is not referenced");
 function Derived_Type_Def_P_Discrete_Range
  (Node : Bare_Derived_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Derived_Type_Def  := Bare_Derived_Type_Def (Node);
     Ent : Internal_Entity_Derived_Type_Def :=
       Internal_Entity_Derived_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Discrete_Range;
      Fld : Internal_Entity_Subtype_Indication;
Fld_1 : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13350 '<FieldAccess for discrete_range at nodes.lkt:23486:9>' Fld_1 ada/nodes.lkt:23486
--# expr-start 13349 '<FieldAccess for subtype_indication at nodes.lkt:23486:9>' Fld ada/nodes.lkt:23486
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Subtype_Indication (Node => Ent.Node.Derived_Type_Def_F_Subtype_Indication, Info => Ent.Info);
--# expr-done 13349
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start SubtypeIndication.discrete_range
Fld_1 := Libadalang.Implementation.Subtype_Indication_P_Discrete_Range (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 13350
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Derived_Type_Def_P_Discrete_Range;
--# end
   --
   --  Primitives for Bare_Enum_Type_Def
   --
      procedure Initialize_Fields_For_Enum_Type_Def
        (Self : Bare_Enum_Type_Def
         ; Enum_Type_Def_F_Enum_Literals : Bare_Enum_Literal_Decl_List
        ) is
      begin
            Self.Enum_Type_Def_F_Enum_Literals := Enum_Type_Def_F_Enum_Literals;
      end Initialize_Fields_For_Enum_Type_Def;
   function Enum_Type_Def_F_Enum_Literals
     (Node : Bare_Enum_Type_Def) return Bare_Enum_Literal_Decl_List
   is
   begin
         return Node.Enum_Type_Def_F_Enum_Literals;
   end;
--# property-start EnumTypeDef.is_char_type ada/nodes.lkt:23495
pragma Warnings (Off, "is not referenced");
 function Enum_Type_Def_P_Is_Char_Type
  (Node : Bare_Enum_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Enum_Type_Def  := Bare_Enum_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Bare_Enum_Literal_Decl_List;
Item_0 : Bare_Enum_Literal_Decl;
Fld_1 : Bare_Defining_Name;
Fld_2 : Bare_Name;
Is_A : Boolean;
Quantifier_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13355 '<AnyQuantifier at nodes.lkt:23496:9>' Quantifier_Result ada/nodes.lkt:23496
   --# expr-start 13351 '<FieldAccess for enum_literals at nodes.lkt:23496:9>' Fld ada/nodes.lkt:23496
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Enum_Type_Def_F_Enum_Literals;
--# expr-done 13351
      Quantifier_Result := False;
      if Fld = null then
      null;
      else
      declare
         Collection : constant Bare_Enum_Literal_Decl_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind lit Item_0
      --# expr-start 13354 '<IsA CharLiteral at nodes.lkt:23496:41>' Is_A ada/nodes.lkt:23496
--# expr-start 13353 '<FieldAccess for name at nodes.lkt:23496:41>' Fld_2 ada/nodes.lkt:23496
--# expr-start 13352 '<FieldAccess for name at nodes.lkt:23496:41>' Fld_1 ada/nodes.lkt:23496
      if Item_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Item_0.Enum_Literal_Decl_F_Name;
--# expr-done 13352
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Fld_1.Defining_Name_F_Name;
--# expr-done 13353
Is_A := Fld_2 /= null 
and then Fld_2.Kind in Ada_Char_Literal_Range; 
--# expr-done 13354
      Quantifier_Result := Is_A;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 13355
         Property_Result := Quantifier_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Type_Def_P_Is_Char_Type;
--# end
--# property-start EnumTypeDef.is_enum_type ada/nodes.lkt:23499
pragma Warnings (Off, "is not referenced");
 function Enum_Type_Def_P_Is_Enum_Type
  (Node : Bare_Enum_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Enum_Type_Def  := Bare_Enum_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Type_Def_P_Is_Enum_Type;
--# end
--# property-start EnumTypeDef.xref_equation ada/nodes.lkt:23502
pragma Warnings (Off, "is not referenced");
 function Enum_Type_Def_P_Xref_Equation
  (Node : Bare_Enum_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Enum_Type_Def  := Bare_Enum_Type_Def (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1536 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1536 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1536;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23502:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1536;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1536;
            raise;
      end;
   return Property_Result;
end Enum_Type_Def_P_Xref_Equation;
--# end
--# property-start EnumTypeDef.is_static ada/nodes.lkt:23505
pragma Warnings (Off, "is not referenced");
 function Enum_Type_Def_P_Is_Static
  (Node : Bare_Enum_Type_Def
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Enum_Type_Def  := Bare_Enum_Type_Def (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Type_Def_P_Is_Static;
--# end
--# property-start EnumTypeDef.is_std_char_type ada/nodes.lkt:23507
pragma Warnings (Off, "is not referenced");
 function Enum_Type_Def_P_Is_Std_Char_Type
  (Node : Bare_Enum_Type_Def
  )
   return Boolean
is
   Self : Bare_Enum_Type_Def  := Bare_Enum_Type_Def (Node);
      --# bind self Self
   Property_Result : Boolean;
      Local_Self_Type : Bare_Type_Decl;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Cast_Result_1 : Bare_Ada_Node;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Base_Type_Decl;
Cast_Result_2 : Bare_Ada_Node;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Bare_Base_Type_Decl;
Cast_Result_3 : Bare_Ada_Node;
Is_Equal : Boolean;
Is_Equal_1 : Boolean;
If_Result : Boolean;
Is_Equal_2 : Boolean;
If_Result_1 : Boolean;
Let_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13364 '<Let at nodes.lkt:23508:9>' Let_Result ada/nodes.lkt:23508
--# scope-start
--# expr-start 13357 '<Cast to TypeDecl at nodes.lkt:23508:25>' Cast_Result ada/nodes.lkt:23508
--# expr-start 13356 '<parent at nodes.lkt:23508:25>' Fld ada/nodes.lkt:23508
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13356
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13357
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13359 '<FieldAccess for node at nodes.lkt:23510:22>' Fld_2 ada/nodes.lkt:23510
--# expr-start 13358 '<FieldAccess for std_char_type at nodes.lkt:23510:22>' Fld_1 ada/nodes.lkt:23510
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_char_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Std_Char_Type (Node => Self);
--# end
--# expr-done 13358
Fld_2 := Fld_1.Node;
--# expr-done 13359
      Cast_Result_1 := Fld_2;
Is_Equal_2 := Local_Self_Type = Cast_Result_1; 
if Is_Equal_2 then
   If_Result_1 := True;
else
--# expr-start 13361 '<FieldAccess for node at nodes.lkt:23511:15>' Fld_4 ada/nodes.lkt:23511
--# expr-start 13360 '<FieldAccess for std_wide_char_type at nodes.lkt:23511:15>' Fld_3 ada/nodes.lkt:23511
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_wide_char_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Std_Wide_Char_Type (Node => Self);
--# end
--# expr-done 13360
Fld_4 := Fld_3.Node;
--# expr-done 13361
      Cast_Result_2 := Fld_4;
Is_Equal_1 := Local_Self_Type = Cast_Result_2; 
if Is_Equal_1 then
   If_Result := True;
else
--# expr-start 13363 '<FieldAccess for node at nodes.lkt:23512:15>' Fld_6 ada/nodes.lkt:23512
--# expr-start 13362 '<FieldAccess for std_wide_wide_char_type at nodes.lkt:23512:15>' Fld_5 ada/nodes.lkt:23512
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.std_wide_wide_char_type
Fld_5 := Libadalang.Implementation.Ada_Node_P_Std_Wide_Wide_Char_Type (Node => Self);
--# end
--# expr-done 13362
Fld_6 := Fld_5.Node;
--# expr-done 13363
      Cast_Result_3 := Fld_6;
Is_Equal := Local_Self_Type = Cast_Result_3; 
   If_Result := Is_Equal;
end if;
   If_Result_1 := If_Result;
end if;
Let_Result := If_Result_1; 
--# end
--# expr-done 13364
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Type_Def_P_Is_Std_Char_Type;
--# end
--# property-start EnumTypeDef.predefined_operators ada/nodes.lkt:23516
pragma Warnings (Off, "is not referenced");
 function Enum_Type_Def_P_Predefined_Operators
  (Node : Bare_Enum_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Enum_Type_Def  := Bare_Enum_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1539 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Local_Defaults : Internal_Env_Assoc_Array_Access;
Local_Specials : Internal_Env_Assoc_Array_Access;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Fld_3 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Fld_4 : Internal_Env_Assoc := No_Env_Assoc;
Sym_2 : Symbol_Type;
Cast_Expr_4 : Bare_Type_Decl;
Cast_Result_5 : Bare_Base_Type_Decl;
Cast_Expr_5 : Bare_Type_Decl;
Cast_Result_6 : Bare_Base_Type_Decl;
Fld_5 : Internal_Env_Assoc := No_Env_Assoc;
Sym_3 : Symbol_Type;
Cast_Expr_6 : Bare_Type_Decl;
Cast_Result_7 : Bare_Base_Type_Decl;
Cast_Expr_7 : Bare_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Fld_6 : Internal_Env_Assoc := No_Env_Assoc;
Sym_4 : Symbol_Type;
Cast_Expr_8 : Bare_Type_Decl;
Cast_Result_9 : Bare_Base_Type_Decl;
Cast_Expr_9 : Bare_Type_Decl;
Cast_Result_10 : Bare_Base_Type_Decl;
Fld_7 : Internal_Env_Assoc := No_Env_Assoc;
Sym_5 : Symbol_Type;
Cast_Expr_10 : Bare_Type_Decl;
Cast_Result_11 : Bare_Base_Type_Decl;
Cast_Expr_11 : Bare_Type_Decl;
Cast_Result_12 : Bare_Base_Type_Decl;
Fld_8 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Sym_6 : Symbol_Type;
Cast_Expr_12 : Bare_Type_Decl;
Cast_Result_13 : Bare_Base_Type_Decl;
Cast_Expr_13 : Bare_Type_Decl;
Cast_Result_14 : Bare_Base_Type_Decl;
Cast_Expr_14 : Bare_Type_Decl;
Cast_Result_15 : Bare_Base_Type_Decl;
Fld_9 : Internal_Env_Assoc := No_Env_Assoc;
Sym_7 : Symbol_Type;
Cast_Expr_15 : Bare_Type_Decl;
Cast_Result_16 : Bare_Base_Type_Decl;
Cast_Expr_16 : Bare_Type_Decl;
Cast_Result_17 : Bare_Base_Type_Decl;
Cast_Expr_17 : Bare_Type_Decl;
Cast_Result_18 : Bare_Base_Type_Decl;
Fld_10 : Internal_Env_Assoc := No_Env_Assoc;
Sym_8 : Symbol_Type;
Cast_Expr_18 : Bare_Type_Decl;
Cast_Result_19 : Bare_Base_Type_Decl;
Cast_Expr_19 : Bare_Type_Decl;
Cast_Result_20 : Bare_Base_Type_Decl;
Cast_Expr_20 : Bare_Type_Decl;
Cast_Result_21 : Bare_Base_Type_Decl;
Fld_11 : Internal_Env_Assoc := No_Env_Assoc;
Sym_9 : Symbol_Type;
Cast_Expr_21 : Bare_Type_Decl;
Cast_Result_22 : Bare_Base_Type_Decl;
Cast_Expr_22 : Bare_Type_Decl;
Cast_Result_23 : Bare_Base_Type_Decl;
Fld_12 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit_1 : Internal_Env_Assoc_Array_Access;
Cast_Expr_23 : Bare_Type_Decl;
Cast_Result_24 : Bare_Base_Type_Decl;
Is_Equal : Boolean;
If_Result : Internal_Env_Assoc_Array_Access;
Concat_Result : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Env_Assoc_Array_Access;
Let_Result_3 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1539 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Local_Defaults);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Local_Specials);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_1539;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Enum_Type_Def_Enum_Type_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Enum_Type_Def,
                                As_Bare_Enum_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13396 '<Let at nodes.lkt:23517:9>' Let_Result_3 ada/nodes.lkt:23517
--# scope-start
--# expr-start 13366 '<Cast to TypeDecl at nodes.lkt:23517:25>' Cast_Result ada/nodes.lkt:23517
--# expr-start 13365 '<parent at nodes.lkt:23517:25>' Fld ada/nodes.lkt:23517
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13365
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13366
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13395 '<Let at nodes.lkt:23518:9>' Let_Result_2 ada/nodes.lkt:23518
--# scope-start
--# expr-start 13368 '<FieldAccess for node at nodes.lkt:23518:25>' Fld_2 ada/nodes.lkt:23518
--# expr-start 13367 '<FieldAccess for bool_type at nodes.lkt:23518:25>' Fld_1 ada/nodes.lkt:23518
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13367
Fld_2 := Fld_1.Node;
--# expr-done 13368
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13394 '<Let at nodes.lkt:23519:9>' Let_Result_1 ada/nodes.lkt:23519
--# scope-start
--# expr-start 13381 '<ArrayLiteral at nodes.lkt:23520:13>' Array_Lit ada/nodes.lkt:23520
--# expr-start 13370 '<FieldAccess for create_binop_assoc at nodes.lkt:23521:17>' Fld_3 ada/nodes.lkt:23521
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13369 '<Symbol "<" at nodes.lkt:23522:21>' Sym ada/nodes.lkt:23522
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 13369
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
--# property-call-start AdaNode.create_binop_assoc
Fld_3 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Local_Bool_Type);
--# end
--# expr-done 13370
--# expr-start 13372 '<FieldAccess for create_binop_assoc at nodes.lkt:23527:17>' Fld_4 ada/nodes.lkt:23527
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13371 '<Symbol "<=" at nodes.lkt:23528:21>' Sym_1 ada/nodes.lkt:23528
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 13371
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
--# property-call-start AdaNode.create_binop_assoc
Fld_4 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_3, Rhs => Cast_Result_4, Ret => Local_Bool_Type);
--# end
--# expr-done 13372
--# expr-start 13374 '<FieldAccess for create_binop_assoc at nodes.lkt:23533:17>' Fld_5 ada/nodes.lkt:23533
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13373 '<Symbol "=" at nodes.lkt:23534:21>' Sym_2 ada/nodes.lkt:23534
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13373
Cast_Expr_4 := Local_Self_Type; 
      Cast_Result_5 := Cast_Expr_4;
Cast_Expr_5 := Local_Self_Type; 
      Cast_Result_6 := Cast_Expr_5;
--# property-call-start AdaNode.create_binop_assoc
Fld_5 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_2, Lhs => Cast_Result_5, Rhs => Cast_Result_6, Ret => Local_Bool_Type);
--# end
--# expr-done 13374
--# expr-start 13376 '<FieldAccess for create_binop_assoc at nodes.lkt:23539:17>' Fld_6 ada/nodes.lkt:23539
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13375 '<Symbol "/=" at nodes.lkt:23540:21>' Sym_3 ada/nodes.lkt:23540
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13375
Cast_Expr_6 := Local_Self_Type; 
      Cast_Result_7 := Cast_Expr_6;
Cast_Expr_7 := Local_Self_Type; 
      Cast_Result_8 := Cast_Expr_7;
--# property-call-start AdaNode.create_binop_assoc
Fld_6 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_3, Lhs => Cast_Result_7, Rhs => Cast_Result_8, Ret => Local_Bool_Type);
--# end
--# expr-done 13376
--# expr-start 13378 '<FieldAccess for create_binop_assoc at nodes.lkt:23545:17>' Fld_7 ada/nodes.lkt:23545
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13377 '<Symbol ">" at nodes.lkt:23546:21>' Sym_4 ada/nodes.lkt:23546
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 13377
Cast_Expr_8 := Local_Self_Type; 
      Cast_Result_9 := Cast_Expr_8;
Cast_Expr_9 := Local_Self_Type; 
      Cast_Result_10 := Cast_Expr_9;
--# property-call-start AdaNode.create_binop_assoc
Fld_7 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_4, Lhs => Cast_Result_9, Rhs => Cast_Result_10, Ret => Local_Bool_Type);
--# end
--# expr-done 13378
--# expr-start 13380 '<FieldAccess for create_binop_assoc at nodes.lkt:23551:17>' Fld_8 ada/nodes.lkt:23551
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13379 '<Symbol ">=" at nodes.lkt:23552:21>' Sym_5 ada/nodes.lkt:23552
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 13379
Cast_Expr_10 := Local_Self_Type; 
      Cast_Result_11 := Cast_Expr_10;
Cast_Expr_11 := Local_Self_Type; 
      Cast_Result_12 := Cast_Expr_11;
--# property-call-start AdaNode.create_binop_assoc
Fld_8 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_5, Lhs => Cast_Result_11, Rhs => Cast_Result_12, Ret => Local_Bool_Type);
--# end
--# expr-done 13380
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_3, 2 => Fld_4, 3 => Fld_5, 4 => Fld_6, 5 => Fld_7, 6 => Fld_8)); 
--# expr-done 13381
Local_Defaults := Array_Lit; Inc_Ref (Local_Defaults);
--# bind defaults Local_Defaults
--# expr-start 13393 '<Let at nodes.lkt:23559:9>' Let_Result ada/nodes.lkt:23559
--# scope-start
--# expr-start 13392 '<If at nodes.lkt:23560:13>' If_Result ada/nodes.lkt:23560
--# expr-start 13382 '<Eq at nodes.lkt:23560:16>' Is_Equal ada/nodes.lkt:23560
Cast_Expr_23 := Local_Self_Type; 
      Cast_Result_24 := Cast_Expr_23;
Is_Equal := Cast_Result_24 = Local_Bool_Type; 
--# expr-done 13382
if Is_Equal then
   --# expr-start 13391 '<ArrayLiteral at nodes.lkt:23562:17>' Array_Lit_1 ada/nodes.lkt:23562
--# expr-start 13384 '<FieldAccess for create_binop_assoc at nodes.lkt:23563:21>' Fld_9 ada/nodes.lkt:23563
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13383 '<Symbol "and" at nodes.lkt:23564:25>' Sym_6 ada/nodes.lkt:23564
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_And); 
--# expr-done 13383
Cast_Expr_12 := Local_Self_Type; 
      Cast_Result_13 := Cast_Expr_12;
Cast_Expr_13 := Local_Self_Type; 
      Cast_Result_14 := Cast_Expr_13;
Cast_Expr_14 := Local_Self_Type; 
      Cast_Result_15 := Cast_Expr_14;
--# property-call-start AdaNode.create_binop_assoc
Fld_9 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_6, Lhs => Cast_Result_13, Rhs => Cast_Result_14, Ret => Cast_Result_15);
--# end
--# expr-done 13384
--# expr-start 13386 '<FieldAccess for create_binop_assoc at nodes.lkt:23569:21>' Fld_10 ada/nodes.lkt:23569
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13385 '<Symbol "or" at nodes.lkt:23570:25>' Sym_7 ada/nodes.lkt:23570
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Or); 
--# expr-done 13385
Cast_Expr_15 := Local_Self_Type; 
      Cast_Result_16 := Cast_Expr_15;
Cast_Expr_16 := Local_Self_Type; 
      Cast_Result_17 := Cast_Expr_16;
Cast_Expr_17 := Local_Self_Type; 
      Cast_Result_18 := Cast_Expr_17;
--# property-call-start AdaNode.create_binop_assoc
Fld_10 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_7, Lhs => Cast_Result_16, Rhs => Cast_Result_17, Ret => Cast_Result_18);
--# end
--# expr-done 13386
--# expr-start 13388 '<FieldAccess for create_binop_assoc at nodes.lkt:23575:21>' Fld_11 ada/nodes.lkt:23575
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13387 '<Symbol "xor" at nodes.lkt:23576:25>' Sym_8 ada/nodes.lkt:23576
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Xor); 
--# expr-done 13387
Cast_Expr_18 := Local_Self_Type; 
      Cast_Result_19 := Cast_Expr_18;
Cast_Expr_19 := Local_Self_Type; 
      Cast_Result_20 := Cast_Expr_19;
Cast_Expr_20 := Local_Self_Type; 
      Cast_Result_21 := Cast_Expr_20;
--# property-call-start AdaNode.create_binop_assoc
Fld_11 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_8, Lhs => Cast_Result_19, Rhs => Cast_Result_20, Ret => Cast_Result_21);
--# end
--# expr-done 13388
--# expr-start 13390 '<FieldAccess for create_unop_assoc at nodes.lkt:23581:21>' Fld_12 ada/nodes.lkt:23581
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13389 '<Symbol "not" at nodes.lkt:23581:44>' Sym_9 ada/nodes.lkt:23581
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Not); 
--# expr-done 13389
Cast_Expr_21 := Local_Self_Type; 
      Cast_Result_22 := Cast_Expr_21;
Cast_Expr_22 := Local_Self_Type; 
      Cast_Result_23 := Cast_Expr_22;
--# property-call-start AdaNode.create_unop_assoc
Fld_12 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_9, Rhs => Cast_Result_22, Ret => Cast_Result_23);
--# end
--# expr-done 13390
Array_Lit_1 := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_9, 2 => Fld_10, 3 => Fld_11, 4 => Fld_12)); 
--# expr-done 13391
   If_Result := Array_Lit_1;
else
   If_Result := No_Internal_Env_Assoc_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 13392
Local_Specials := If_Result; Inc_Ref (Local_Specials);
--# bind specials Local_Specials
Concat_Result := Concat (Local_Defaults, Local_Specials); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 13393
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13394
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 13395
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 13396
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1539;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1539;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Enum_Type_Def_P_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Formal_Discrete_Type_Def
   --
--# property-start FormalDiscreteTypeDef.xref_equation ada/nodes.lkt:23593
pragma Warnings (Off, "is not referenced");
 function Formal_Discrete_Type_Def_P_Xref_Equation
  (Node : Bare_Formal_Discrete_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Formal_Discrete_Type_Def  := Bare_Formal_Discrete_Type_Def (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1540 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1540 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1540;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23593:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1540;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1540;
            raise;
      end;
   return Property_Result;
end Formal_Discrete_Type_Def_P_Xref_Equation;
--# end
--# property-start FormalDiscreteTypeDef.is_discrete_type ada/nodes.lkt:23596
pragma Warnings (Off, "is not referenced");
 function Formal_Discrete_Type_Def_P_Is_Discrete_Type
  (Node : Bare_Formal_Discrete_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Formal_Discrete_Type_Def  := Bare_Formal_Discrete_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Formal_Discrete_Type_Def_P_Is_Discrete_Type;
--# end
--# property-start FormalDiscreteTypeDef.predefined_operators ada/nodes.lkt:23599
pragma Warnings (Off, "is not referenced");
 function Formal_Discrete_Type_Def_P_Predefined_Operators
  (Node : Bare_Formal_Discrete_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Formal_Discrete_Type_Def  := Bare_Formal_Discrete_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1542 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Fld_3 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Fld_4 : Internal_Env_Assoc := No_Env_Assoc;
Sym_2 : Symbol_Type;
Cast_Expr_4 : Bare_Type_Decl;
Cast_Result_5 : Bare_Base_Type_Decl;
Cast_Expr_5 : Bare_Type_Decl;
Cast_Result_6 : Bare_Base_Type_Decl;
Fld_5 : Internal_Env_Assoc := No_Env_Assoc;
Sym_3 : Symbol_Type;
Cast_Expr_6 : Bare_Type_Decl;
Cast_Result_7 : Bare_Base_Type_Decl;
Cast_Expr_7 : Bare_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Fld_6 : Internal_Env_Assoc := No_Env_Assoc;
Sym_4 : Symbol_Type;
Cast_Expr_8 : Bare_Type_Decl;
Cast_Result_9 : Bare_Base_Type_Decl;
Cast_Expr_9 : Bare_Type_Decl;
Cast_Result_10 : Bare_Base_Type_Decl;
Fld_7 : Internal_Env_Assoc := No_Env_Assoc;
Sym_5 : Symbol_Type;
Cast_Expr_10 : Bare_Type_Decl;
Cast_Result_11 : Bare_Base_Type_Decl;
Cast_Expr_11 : Bare_Type_Decl;
Cast_Result_12 : Bare_Base_Type_Decl;
Fld_8 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1542 is
            begin
                     Dec_Ref (Fld_3);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1542;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Formal_Discrete_Type_Def_Formal_Discrete_Type_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Formal_Discrete_Type_Def,
                                As_Bare_Formal_Discrete_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13415 '<Let at nodes.lkt:23600:9>' Let_Result_1 ada/nodes.lkt:23600
--# scope-start
--# expr-start 13398 '<Cast to TypeDecl at nodes.lkt:23600:25>' Cast_Result ada/nodes.lkt:23600
--# expr-start 13397 '<parent at nodes.lkt:23600:25>' Fld ada/nodes.lkt:23600
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13397
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13398
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13414 '<Let at nodes.lkt:23601:9>' Let_Result ada/nodes.lkt:23601
--# scope-start
--# expr-start 13400 '<FieldAccess for node at nodes.lkt:23601:25>' Fld_2 ada/nodes.lkt:23601
--# expr-start 13399 '<FieldAccess for bool_type at nodes.lkt:23601:25>' Fld_1 ada/nodes.lkt:23601
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13399
Fld_2 := Fld_1.Node;
--# expr-done 13400
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13413 '<ArrayLiteral at nodes.lkt:23603:9>' Array_Lit ada/nodes.lkt:23603
--# expr-start 13402 '<FieldAccess for create_binop_assoc at nodes.lkt:23604:13>' Fld_3 ada/nodes.lkt:23604
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13401 '<Symbol "<" at nodes.lkt:23604:37>' Sym ada/nodes.lkt:23604
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 13401
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
--# property-call-start AdaNode.create_binop_assoc
Fld_3 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Local_Bool_Type);
--# end
--# expr-done 13402
--# expr-start 13404 '<FieldAccess for create_binop_assoc at nodes.lkt:23605:13>' Fld_4 ada/nodes.lkt:23605
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13403 '<Symbol "<=" at nodes.lkt:23606:17>' Sym_1 ada/nodes.lkt:23606
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 13403
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
--# property-call-start AdaNode.create_binop_assoc
Fld_4 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_3, Rhs => Cast_Result_4, Ret => Local_Bool_Type);
--# end
--# expr-done 13404
--# expr-start 13406 '<FieldAccess for create_binop_assoc at nodes.lkt:23611:13>' Fld_5 ada/nodes.lkt:23611
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13405 '<Symbol "=" at nodes.lkt:23611:37>' Sym_2 ada/nodes.lkt:23611
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13405
Cast_Expr_4 := Local_Self_Type; 
      Cast_Result_5 := Cast_Expr_4;
Cast_Expr_5 := Local_Self_Type; 
      Cast_Result_6 := Cast_Expr_5;
--# property-call-start AdaNode.create_binop_assoc
Fld_5 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_2, Lhs => Cast_Result_5, Rhs => Cast_Result_6, Ret => Local_Bool_Type);
--# end
--# expr-done 13406
--# expr-start 13408 '<FieldAccess for create_binop_assoc at nodes.lkt:23612:13>' Fld_6 ada/nodes.lkt:23612
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13407 '<Symbol "/=" at nodes.lkt:23613:17>' Sym_3 ada/nodes.lkt:23613
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13407
Cast_Expr_6 := Local_Self_Type; 
      Cast_Result_7 := Cast_Expr_6;
Cast_Expr_7 := Local_Self_Type; 
      Cast_Result_8 := Cast_Expr_7;
--# property-call-start AdaNode.create_binop_assoc
Fld_6 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_3, Lhs => Cast_Result_7, Rhs => Cast_Result_8, Ret => Local_Bool_Type);
--# end
--# expr-done 13408
--# expr-start 13410 '<FieldAccess for create_binop_assoc at nodes.lkt:23618:13>' Fld_7 ada/nodes.lkt:23618
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13409 '<Symbol ">" at nodes.lkt:23618:37>' Sym_4 ada/nodes.lkt:23618
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 13409
Cast_Expr_8 := Local_Self_Type; 
      Cast_Result_9 := Cast_Expr_8;
Cast_Expr_9 := Local_Self_Type; 
      Cast_Result_10 := Cast_Expr_9;
--# property-call-start AdaNode.create_binop_assoc
Fld_7 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_4, Lhs => Cast_Result_9, Rhs => Cast_Result_10, Ret => Local_Bool_Type);
--# end
--# expr-done 13410
--# expr-start 13412 '<FieldAccess for create_binop_assoc at nodes.lkt:23619:13>' Fld_8 ada/nodes.lkt:23619
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13411 '<Symbol ">=" at nodes.lkt:23619:37>' Sym_5 ada/nodes.lkt:23619
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 13411
Cast_Expr_10 := Local_Self_Type; 
      Cast_Result_11 := Cast_Expr_10;
Cast_Expr_11 := Local_Self_Type; 
      Cast_Result_12 := Cast_Expr_11;
--# property-call-start AdaNode.create_binop_assoc
Fld_8 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_5, Lhs => Cast_Result_11, Rhs => Cast_Result_12, Ret => Local_Bool_Type);
--# end
--# expr-done 13412
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_3, 2 => Fld_4, 3 => Fld_5, 4 => Fld_6, 5 => Fld_7, 6 => Fld_8)); 
--# expr-done 13413
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
--# expr-done 13414
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13415
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1542;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1542;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Formal_Discrete_Type_Def_P_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Interface_Type_Def
   --
      procedure Initialize_Fields_For_Interface_Type_Def
        (Self : Bare_Interface_Type_Def
         ; Interface_Type_Def_F_Interface_Kind : Bare_Interface_Kind
         ; Interface_Type_Def_F_Interfaces : Bare_Parent_List
        ) is
      begin
            Self.Interface_Type_Def_F_Interface_Kind := Interface_Type_Def_F_Interface_Kind;
            Self.Interface_Type_Def_F_Interfaces := Interface_Type_Def_F_Interfaces;
      end Initialize_Fields_For_Interface_Type_Def;
   function Interface_Type_Def_F_Interface_Kind
     (Node : Bare_Interface_Type_Def) return Bare_Interface_Kind
   is
   begin
         return Node.Interface_Type_Def_F_Interface_Kind;
   end;
   function Interface_Type_Def_F_Interfaces
     (Node : Bare_Interface_Type_Def) return Bare_Parent_List
   is
   begin
         return Node.Interface_Type_Def_F_Interfaces;
   end;
--# property-start InterfaceTypeDef.is_tagged_type ada/nodes.lkt:23633
pragma Warnings (Off, "is not referenced");
 function Interface_Type_Def_P_Is_Tagged_Type
  (Node : Bare_Interface_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Interface_Type_Def  := Bare_Interface_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Interface_Type_Def_P_Is_Tagged_Type;
--# end
--# property-start InterfaceTypeDef.is_task_type ada/nodes.lkt:23636
pragma Warnings (Off, "is not referenced");
 function Interface_Type_Def_P_Is_Task_Type
  (Node : Bare_Interface_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Interface_Type_Def  := Bare_Interface_Type_Def (Node);
     Ent : Internal_Entity_Interface_Type_Def :=
       Internal_Entity_Interface_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Internal_Entity_Interface_Kind;
Is_A : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13417 '<IsA InterfaceKind.Task at nodes.lkt:23637:9>' Is_A ada/nodes.lkt:23637
--# expr-start 13416 '<FieldAccess for interface_kind at nodes.lkt:23637:9>' Fld ada/nodes.lkt:23637
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Interface_Kind (Node => Ent.Node.Interface_Type_Def_F_Interface_Kind, Info => Ent.Info);
--# expr-done 13416
Is_A := Fld.Node /= null 
and then Fld.Node.Kind in Ada_Interface_Kind_Task_Range; 
--# expr-done 13417
         Property_Result := Is_A;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Interface_Type_Def_P_Is_Task_Type;
--# end
--# property-start InterfaceTypeDef.is_limited_type ada/nodes.lkt:23641
pragma Warnings (Off, "is not referenced");
 function Interface_Type_Def_P_Is_Limited_Type
  (Node : Bare_Interface_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Interface_Type_Def  := Bare_Interface_Type_Def (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Interface_Kind;
Is_Null : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13420 '<Not at nodes.lkt:23641:35>' Not_Val ada/nodes.lkt:23641
--# expr-start 13419 '<IsNull at nodes.lkt:23641:39>' Is_Null ada/nodes.lkt:23641
--# expr-start 13418 '<FieldAccess for interface_kind at nodes.lkt:23641:39>' Fld ada/nodes.lkt:23641
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Interface_Type_Def_F_Interface_Kind;
--# expr-done 13418
Is_Null := Fld = null; 
--# expr-done 13419
Not_Val := not (Is_Null); 
--# expr-done 13420
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Interface_Type_Def_P_Is_Limited_Type;
--# end
--# property-start InterfaceTypeDef.base_interfaces ada/nodes.lkt:23643
pragma Warnings (Off, "is not referenced");
 function Interface_Type_Def_P_Base_Interfaces
  (Node : Bare_Interface_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl_Array_Access
is
   Self : Bare_Interface_Type_Def  := Bare_Interface_Type_Def (Node);
     Ent : Internal_Entity_Interface_Type_Def :=
       Internal_Entity_Interface_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_1546 with Inline_Always;
      Fld : Internal_Entity_Parent_List;
Fld_1 : Bare_Parent_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Internal_Entity_Base_Type_Decl;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Internal_Entity_Base_Type_Decl_Array_Access;
            procedure Finalizer_Scope_1546 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1546;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13423 '<Map at nodes.lkt:23644:9>' Map_Result ada/nodes.lkt:23644
   --# expr-start 13421 '<FieldAccess for interfaces at nodes.lkt:23644:9>' Fld ada/nodes.lkt:23644
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Parent_List (Node => Ent.Node.Interface_Type_Def_F_Interfaces, Info => Ent.Info);
--# expr-done 13421
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Internal_Entity_Base_Type_Decl_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Internal_Entity_Base_Type_Decl_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind i Item_0
      --# expr-start 13422 '<FieldAccess for name_designated_type at nodes.lkt:23644:36>' Fld_3 ada/nodes.lkt:23644
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_3 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 13422
         declare
            Item_To_Append : constant Internal_Entity_Base_Type_Decl := Fld_3;
         begin
            Internal_Entity_Base_Type_Decl_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Internal_Entity_Base_Type_Decl_Array
           (Items_Count => Natural (Internal_Entity_Base_Type_Decl_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Base_Type_Decl_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Base_Type_Decl_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Base_Type_Decl_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13423
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1546;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1546;
            raise;
      end;
   return Property_Result;
end Interface_Type_Def_P_Base_Interfaces;
--# end
--# property-start InterfaceTypeDef.xref_equation ada/nodes.lkt:23647
pragma Warnings (Off, "is not referenced");
 function Interface_Type_Def_P_Xref_Equation
  (Node : Bare_Interface_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Interface_Type_Def  := Bare_Interface_Type_Def (Node);
     Ent : Internal_Entity_Interface_Type_Def :=
       Internal_Entity_Interface_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1547 with Inline_Always;
            procedure Finalizer_Scope_3612 with Inline_Always;
      Fld : Internal_Entity_Parent_List;
Fld_1 : Bare_Parent_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1547 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1547;
            procedure Finalizer_Scope_3612 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3612;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13427 '<LogicAll at nodes.lkt:23648:9>' Logic_Boolean_Op ada/nodes.lkt:23648
--# expr-start 13426 '<Map at nodes.lkt:23648:9>' Map_Result ada/nodes.lkt:23648
   --# expr-start 13424 '<FieldAccess for interfaces at nodes.lkt:23648:9>' Fld ada/nodes.lkt:23648
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Parent_List (Node => Ent.Node.Interface_Type_Def_F_Interfaces, Info => Ent.Info);
--# expr-done 13424
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Parent_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind ifc Item_0
      --# expr-start 13425 '<FieldAccess for xref_equation at nodes.lkt:23648:44>' Fld_3 ada/nodes.lkt:23648
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_3 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 13425
         declare
            Item_To_Append : constant Logic_Equation := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3612;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13426
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23648:9") else null)); 
--# expr-done 13427
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1547;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1547;
                     Finalizer_Scope_3612;
            raise;
      end;
   return Property_Result;
end Interface_Type_Def_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Mod_Int_Type_Def
   --
      procedure Initialize_Fields_For_Mod_Int_Type_Def
        (Self : Bare_Mod_Int_Type_Def
         ; Mod_Int_Type_Def_F_Expr : Bare_Expr
        ) is
      begin
            Self.Mod_Int_Type_Def_F_Expr := Mod_Int_Type_Def_F_Expr;
      end Initialize_Fields_For_Mod_Int_Type_Def;
   function Mod_Int_Type_Def_F_Expr
     (Node : Bare_Mod_Int_Type_Def) return Bare_Expr
   is
   begin
         return Node.Mod_Int_Type_Def_F_Expr;
   end;
--# property-start ModIntTypeDef.is_int_type ada/nodes.lkt:23657
pragma Warnings (Off, "is not referenced");
 function Mod_Int_Type_Def_P_Is_Int_Type
  (Node : Bare_Mod_Int_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Mod_Int_Type_Def  := Bare_Mod_Int_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Mod_Int_Type_Def_P_Is_Int_Type;
--# end
--# property-start ModIntTypeDef.xref_equation ada/nodes.lkt:23660
pragma Warnings (Off, "is not referenced");
 function Mod_Int_Type_Def_P_Xref_Equation
  (Node : Bare_Mod_Int_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Mod_Int_Type_Def  := Bare_Mod_Int_Type_Def (Node);
     Ent : Internal_Entity_Mod_Int_Type_Def :=
       Internal_Entity_Mod_Int_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1549 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1549 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1549;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13429 '<FieldAccess for sub_equation at nodes.lkt:23660:37>' Fld_1 ada/nodes.lkt:23660
--# expr-start 13428 '<FieldAccess for expr at nodes.lkt:23660:37>' Fld ada/nodes.lkt:23660
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Mod_Int_Type_Def_F_Expr, Info => Ent.Info);
--# expr-done 13428
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 13429
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1549;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1549;
            raise;
      end;
   return Property_Result;
end Mod_Int_Type_Def_P_Xref_Equation;
--# end
--# property-start ModIntTypeDef.is_static ada/nodes.lkt:23663
pragma Warnings (Off, "is not referenced");
 function Mod_Int_Type_Def_P_Is_Static
  (Node : Bare_Mod_Int_Type_Def
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Mod_Int_Type_Def  := Bare_Mod_Int_Type_Def (Node);
     Ent : Internal_Entity_Mod_Int_Type_Def :=
       Internal_Entity_Mod_Int_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Expr;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13431 '<FieldAccess for is_static_expr at nodes.lkt:23663:29>' Fld_1 ada/nodes.lkt:23663
--# expr-start 13430 '<FieldAccess for expr at nodes.lkt:23663:29>' Fld ada/nodes.lkt:23663
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Mod_Int_Type_Def_F_Expr, Info => Ent.Info);
--# expr-done 13430
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_1 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld.Info);
--# end
--# expr-done 13431
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Mod_Int_Type_Def_P_Is_Static;
--# end
--# property-start ModIntTypeDef.discrete_range ada/nodes.lkt:23665
pragma Warnings (Off, "is not referenced");
 function Mod_Int_Type_Def_P_Discrete_Range
  (Node : Bare_Mod_Int_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Mod_Int_Type_Def  := Bare_Mod_Int_Type_Def (Node);
     Ent : Internal_Entity_Mod_Int_Type_Def :=
       Internal_Entity_Mod_Int_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Discrete_Range;
      Fld : Internal_Entity_Expr;
New_Struct : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13433 '<New DiscreteRange at nodes.lkt:23666:9>' New_Struct ada/nodes.lkt:23666
--# expr-start 13432 '<FieldAccess for expr at nodes.lkt:23666:64>' Fld ada/nodes.lkt:23666
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Mod_Int_Type_Def_F_Expr, Info => Ent.Info);
--# expr-done 13432
New_Struct := (High_Bound => Fld, Low_Bound => No_Entity_Expr); 
--# expr-done 13433
         Property_Result := New_Struct;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Mod_Int_Type_Def_P_Discrete_Range;
--# end
--# property-start ModIntTypeDef.predefined_operators ada/nodes.lkt:23669
pragma Warnings (Off, "is not referenced");
 function Mod_Int_Type_Def_P_Predefined_Operators
  (Node : Bare_Mod_Int_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Mod_Int_Type_Def  := Bare_Mod_Int_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1552 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Local_Int_Type : Bare_Base_Type_Decl;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Fld_5 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Cast_Expr_4 : Bare_Type_Decl;
Cast_Result_5 : Bare_Base_Type_Decl;
Cast_Expr_5 : Bare_Type_Decl;
Cast_Result_6 : Bare_Base_Type_Decl;
Fld_6 : Internal_Env_Assoc := No_Env_Assoc;
Sym_2 : Symbol_Type;
Cast_Expr_6 : Bare_Type_Decl;
Cast_Result_7 : Bare_Base_Type_Decl;
Cast_Expr_7 : Bare_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Cast_Expr_8 : Bare_Type_Decl;
Cast_Result_9 : Bare_Base_Type_Decl;
Fld_7 : Internal_Env_Assoc := No_Env_Assoc;
Sym_3 : Symbol_Type;
Cast_Expr_9 : Bare_Type_Decl;
Cast_Result_10 : Bare_Base_Type_Decl;
Cast_Expr_10 : Bare_Type_Decl;
Cast_Result_11 : Bare_Base_Type_Decl;
Cast_Expr_11 : Bare_Type_Decl;
Cast_Result_12 : Bare_Base_Type_Decl;
Fld_8 : Internal_Env_Assoc := No_Env_Assoc;
Sym_4 : Symbol_Type;
Cast_Expr_12 : Bare_Type_Decl;
Cast_Result_13 : Bare_Base_Type_Decl;
Cast_Expr_13 : Bare_Type_Decl;
Cast_Result_14 : Bare_Base_Type_Decl;
Cast_Expr_14 : Bare_Type_Decl;
Cast_Result_15 : Bare_Base_Type_Decl;
Fld_9 : Internal_Env_Assoc := No_Env_Assoc;
Sym_5 : Symbol_Type;
Cast_Expr_15 : Bare_Type_Decl;
Cast_Result_16 : Bare_Base_Type_Decl;
Cast_Expr_16 : Bare_Type_Decl;
Cast_Result_17 : Bare_Base_Type_Decl;
Cast_Expr_17 : Bare_Type_Decl;
Cast_Result_18 : Bare_Base_Type_Decl;
Fld_10 : Internal_Env_Assoc := No_Env_Assoc;
Sym_6 : Symbol_Type;
Cast_Expr_18 : Bare_Type_Decl;
Cast_Result_19 : Bare_Base_Type_Decl;
Cast_Expr_19 : Bare_Type_Decl;
Cast_Result_20 : Bare_Base_Type_Decl;
Cast_Expr_20 : Bare_Type_Decl;
Cast_Result_21 : Bare_Base_Type_Decl;
Fld_11 : Internal_Env_Assoc := No_Env_Assoc;
Sym_7 : Symbol_Type;
Cast_Expr_21 : Bare_Type_Decl;
Cast_Result_22 : Bare_Base_Type_Decl;
Cast_Expr_22 : Bare_Type_Decl;
Cast_Result_23 : Bare_Base_Type_Decl;
Cast_Expr_23 : Bare_Type_Decl;
Cast_Result_24 : Bare_Base_Type_Decl;
Fld_12 : Internal_Env_Assoc := No_Env_Assoc;
Sym_8 : Symbol_Type;
Cast_Expr_24 : Bare_Type_Decl;
Cast_Result_25 : Bare_Base_Type_Decl;
Cast_Expr_25 : Bare_Type_Decl;
Cast_Result_26 : Bare_Base_Type_Decl;
Fld_13 : Internal_Env_Assoc := No_Env_Assoc;
Sym_9 : Symbol_Type;
Cast_Expr_26 : Bare_Type_Decl;
Cast_Result_27 : Bare_Base_Type_Decl;
Cast_Expr_27 : Bare_Type_Decl;
Cast_Result_28 : Bare_Base_Type_Decl;
Fld_14 : Internal_Env_Assoc := No_Env_Assoc;
Sym_10 : Symbol_Type;
Cast_Expr_28 : Bare_Type_Decl;
Cast_Result_29 : Bare_Base_Type_Decl;
Cast_Expr_29 : Bare_Type_Decl;
Cast_Result_30 : Bare_Base_Type_Decl;
Fld_15 : Internal_Env_Assoc := No_Env_Assoc;
Sym_11 : Symbol_Type;
Cast_Expr_30 : Bare_Type_Decl;
Cast_Result_31 : Bare_Base_Type_Decl;
Cast_Expr_31 : Bare_Type_Decl;
Cast_Result_32 : Bare_Base_Type_Decl;
Fld_16 : Internal_Env_Assoc := No_Env_Assoc;
Sym_12 : Symbol_Type;
Cast_Expr_32 : Bare_Type_Decl;
Cast_Result_33 : Bare_Base_Type_Decl;
Cast_Expr_33 : Bare_Type_Decl;
Cast_Result_34 : Bare_Base_Type_Decl;
Fld_17 : Internal_Env_Assoc := No_Env_Assoc;
Sym_13 : Symbol_Type;
Cast_Expr_34 : Bare_Type_Decl;
Cast_Result_35 : Bare_Base_Type_Decl;
Cast_Expr_35 : Bare_Type_Decl;
Cast_Result_36 : Bare_Base_Type_Decl;
Fld_18 : Internal_Env_Assoc := No_Env_Assoc;
Sym_14 : Symbol_Type;
Cast_Expr_36 : Bare_Type_Decl;
Cast_Result_37 : Bare_Base_Type_Decl;
Cast_Expr_37 : Bare_Type_Decl;
Cast_Result_38 : Bare_Base_Type_Decl;
Fld_19 : Internal_Env_Assoc := No_Env_Assoc;
Sym_15 : Symbol_Type;
Cast_Expr_38 : Bare_Type_Decl;
Cast_Result_39 : Bare_Base_Type_Decl;
Cast_Expr_39 : Bare_Type_Decl;
Cast_Result_40 : Bare_Base_Type_Decl;
Fld_20 : Internal_Env_Assoc := No_Env_Assoc;
Sym_16 : Symbol_Type;
Cast_Expr_40 : Bare_Type_Decl;
Cast_Result_41 : Bare_Base_Type_Decl;
Cast_Expr_41 : Bare_Type_Decl;
Cast_Result_42 : Bare_Base_Type_Decl;
Fld_21 : Internal_Env_Assoc := No_Env_Assoc;
Sym_17 : Symbol_Type;
Cast_Expr_42 : Bare_Type_Decl;
Cast_Result_43 : Bare_Base_Type_Decl;
Cast_Expr_43 : Bare_Type_Decl;
Cast_Result_44 : Bare_Base_Type_Decl;
Fld_22 : Internal_Env_Assoc := No_Env_Assoc;
Sym_18 : Symbol_Type;
Cast_Expr_44 : Bare_Type_Decl;
Cast_Result_45 : Bare_Base_Type_Decl;
Cast_Expr_45 : Bare_Type_Decl;
Cast_Result_46 : Bare_Base_Type_Decl;
Fld_23 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1552 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (Fld_18);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Fld_20);
                     Dec_Ref (Fld_21);
                     Dec_Ref (Fld_22);
                     Dec_Ref (Fld_23);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1552;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Mod_Int_Type_Def_Mod_Int_Type_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Mod_Int_Type_Def,
                                As_Bare_Mod_Int_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13481 '<Let at nodes.lkt:23670:9>' Let_Result_2 ada/nodes.lkt:23670
--# scope-start
--# expr-start 13435 '<Cast to TypeDecl at nodes.lkt:23670:25>' Cast_Result ada/nodes.lkt:23670
--# expr-start 13434 '<parent at nodes.lkt:23670:25>' Fld ada/nodes.lkt:23670
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13434
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13435
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13480 '<Let at nodes.lkt:23671:9>' Let_Result_1 ada/nodes.lkt:23671
--# scope-start
--# expr-start 13437 '<FieldAccess for node at nodes.lkt:23671:25>' Fld_2 ada/nodes.lkt:23671
--# expr-start 13436 '<FieldAccess for bool_type at nodes.lkt:23671:25>' Fld_1 ada/nodes.lkt:23671
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13436
Fld_2 := Fld_1.Node;
--# expr-done 13437
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13479 '<Let at nodes.lkt:23672:9>' Let_Result ada/nodes.lkt:23672
--# scope-start
--# expr-start 13439 '<FieldAccess for node at nodes.lkt:23672:24>' Fld_4 ada/nodes.lkt:23672
--# expr-start 13438 '<FieldAccess for int_type at nodes.lkt:23672:24>' Fld_3 ada/nodes.lkt:23672
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 13438
Fld_4 := Fld_3.Node;
--# expr-done 13439
Local_Int_Type := Fld_4; 
--# bind int_type Local_Int_Type
--# expr-start 13478 '<ArrayLiteral at nodes.lkt:23674:9>' Array_Lit ada/nodes.lkt:23674
--# expr-start 13441 '<FieldAccess for create_binop_assoc at nodes.lkt:23675:13>' Fld_5 ada/nodes.lkt:23675
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13440 '<Symbol "+" at nodes.lkt:23675:37>' Sym ada/nodes.lkt:23675
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13440
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
--# property-call-start AdaNode.create_binop_assoc
Fld_5 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Cast_Result_3);
--# end
--# expr-done 13441
--# expr-start 13443 '<FieldAccess for create_binop_assoc at nodes.lkt:23676:13>' Fld_6 ada/nodes.lkt:23676
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13442 '<Symbol "-" at nodes.lkt:23676:37>' Sym_1 ada/nodes.lkt:23676
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13442
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
Cast_Expr_4 := Local_Self_Type; 
      Cast_Result_5 := Cast_Expr_4;
Cast_Expr_5 := Local_Self_Type; 
      Cast_Result_6 := Cast_Expr_5;
--# property-call-start AdaNode.create_binop_assoc
Fld_6 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_4, Rhs => Cast_Result_5, Ret => Cast_Result_6);
--# end
--# expr-done 13443
--# expr-start 13445 '<FieldAccess for create_binop_assoc at nodes.lkt:23677:13>' Fld_7 ada/nodes.lkt:23677
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13444 '<Symbol "*" at nodes.lkt:23677:37>' Sym_2 ada/nodes.lkt:23677
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13444
Cast_Expr_6 := Local_Self_Type; 
      Cast_Result_7 := Cast_Expr_6;
Cast_Expr_7 := Local_Self_Type; 
      Cast_Result_8 := Cast_Expr_7;
Cast_Expr_8 := Local_Self_Type; 
      Cast_Result_9 := Cast_Expr_8;
--# property-call-start AdaNode.create_binop_assoc
Fld_7 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_2, Lhs => Cast_Result_7, Rhs => Cast_Result_8, Ret => Cast_Result_9);
--# end
--# expr-done 13445
--# expr-start 13447 '<FieldAccess for create_binop_assoc at nodes.lkt:23678:13>' Fld_8 ada/nodes.lkt:23678
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13446 '<Symbol "/" at nodes.lkt:23678:37>' Sym_3 ada/nodes.lkt:23678
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13446
Cast_Expr_9 := Local_Self_Type; 
      Cast_Result_10 := Cast_Expr_9;
Cast_Expr_10 := Local_Self_Type; 
      Cast_Result_11 := Cast_Expr_10;
Cast_Expr_11 := Local_Self_Type; 
      Cast_Result_12 := Cast_Expr_11;
--# property-call-start AdaNode.create_binop_assoc
Fld_8 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_3, Lhs => Cast_Result_10, Rhs => Cast_Result_11, Ret => Cast_Result_12);
--# end
--# expr-done 13447
--# expr-start 13449 '<FieldAccess for create_binop_assoc at nodes.lkt:23679:13>' Fld_9 ada/nodes.lkt:23679
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13448 '<Symbol "mod" at nodes.lkt:23680:17>' Sym_4 ada/nodes.lkt:23680
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mod); 
--# expr-done 13448
Cast_Expr_12 := Local_Self_Type; 
      Cast_Result_13 := Cast_Expr_12;
Cast_Expr_13 := Local_Self_Type; 
      Cast_Result_14 := Cast_Expr_13;
Cast_Expr_14 := Local_Self_Type; 
      Cast_Result_15 := Cast_Expr_14;
--# property-call-start AdaNode.create_binop_assoc
Fld_9 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_4, Lhs => Cast_Result_13, Rhs => Cast_Result_14, Ret => Cast_Result_15);
--# end
--# expr-done 13449
--# expr-start 13451 '<FieldAccess for create_binop_assoc at nodes.lkt:23685:13>' Fld_10 ada/nodes.lkt:23685
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13450 '<Symbol "rem" at nodes.lkt:23686:17>' Sym_5 ada/nodes.lkt:23686
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Rem); 
--# expr-done 13450
Cast_Expr_15 := Local_Self_Type; 
      Cast_Result_16 := Cast_Expr_15;
Cast_Expr_16 := Local_Self_Type; 
      Cast_Result_17 := Cast_Expr_16;
Cast_Expr_17 := Local_Self_Type; 
      Cast_Result_18 := Cast_Expr_17;
--# property-call-start AdaNode.create_binop_assoc
Fld_10 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_5, Lhs => Cast_Result_16, Rhs => Cast_Result_17, Ret => Cast_Result_18);
--# end
--# expr-done 13451
--# expr-start 13453 '<FieldAccess for create_binop_assoc at nodes.lkt:23691:13>' Fld_11 ada/nodes.lkt:23691
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13452 '<Symbol "and" at nodes.lkt:23692:17>' Sym_6 ada/nodes.lkt:23692
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_And); 
--# expr-done 13452
Cast_Expr_18 := Local_Self_Type; 
      Cast_Result_19 := Cast_Expr_18;
Cast_Expr_19 := Local_Self_Type; 
      Cast_Result_20 := Cast_Expr_19;
Cast_Expr_20 := Local_Self_Type; 
      Cast_Result_21 := Cast_Expr_20;
--# property-call-start AdaNode.create_binop_assoc
Fld_11 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_6, Lhs => Cast_Result_19, Rhs => Cast_Result_20, Ret => Cast_Result_21);
--# end
--# expr-done 13453
--# expr-start 13455 '<FieldAccess for create_binop_assoc at nodes.lkt:23697:13>' Fld_12 ada/nodes.lkt:23697
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13454 '<Symbol "or" at nodes.lkt:23698:17>' Sym_7 ada/nodes.lkt:23698
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Or); 
--# expr-done 13454
Cast_Expr_21 := Local_Self_Type; 
      Cast_Result_22 := Cast_Expr_21;
Cast_Expr_22 := Local_Self_Type; 
      Cast_Result_23 := Cast_Expr_22;
Cast_Expr_23 := Local_Self_Type; 
      Cast_Result_24 := Cast_Expr_23;
--# property-call-start AdaNode.create_binop_assoc
Fld_12 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_7, Lhs => Cast_Result_22, Rhs => Cast_Result_23, Ret => Cast_Result_24);
--# end
--# expr-done 13455
--# expr-start 13457 '<FieldAccess for create_binop_assoc at nodes.lkt:23703:13>' Fld_13 ada/nodes.lkt:23703
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13456 '<Symbol "**" at nodes.lkt:23703:37>' Sym_8 ada/nodes.lkt:23703
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_3); 
--# expr-done 13456
Cast_Expr_24 := Local_Self_Type; 
      Cast_Result_25 := Cast_Expr_24;
Cast_Expr_25 := Local_Self_Type; 
      Cast_Result_26 := Cast_Expr_25;
--# property-call-start AdaNode.create_binop_assoc
Fld_13 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_8, Lhs => Cast_Result_25, Rhs => Local_Int_Type, Ret => Cast_Result_26);
--# end
--# expr-done 13457
--# expr-start 13459 '<FieldAccess for create_binop_assoc at nodes.lkt:23704:13>' Fld_14 ada/nodes.lkt:23704
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13458 '<Symbol "<" at nodes.lkt:23704:37>' Sym_9 ada/nodes.lkt:23704
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 13458
Cast_Expr_26 := Local_Self_Type; 
      Cast_Result_27 := Cast_Expr_26;
Cast_Expr_27 := Local_Self_Type; 
      Cast_Result_28 := Cast_Expr_27;
--# property-call-start AdaNode.create_binop_assoc
Fld_14 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_9, Lhs => Cast_Result_27, Rhs => Cast_Result_28, Ret => Local_Bool_Type);
--# end
--# expr-done 13459
--# expr-start 13461 '<FieldAccess for create_binop_assoc at nodes.lkt:23705:13>' Fld_15 ada/nodes.lkt:23705
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13460 '<Symbol "<=" at nodes.lkt:23706:17>' Sym_10 ada/nodes.lkt:23706
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 13460
Cast_Expr_28 := Local_Self_Type; 
      Cast_Result_29 := Cast_Expr_28;
Cast_Expr_29 := Local_Self_Type; 
      Cast_Result_30 := Cast_Expr_29;
--# property-call-start AdaNode.create_binop_assoc
Fld_15 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_10, Lhs => Cast_Result_29, Rhs => Cast_Result_30, Ret => Local_Bool_Type);
--# end
--# expr-done 13461
--# expr-start 13463 '<FieldAccess for create_binop_assoc at nodes.lkt:23711:13>' Fld_16 ada/nodes.lkt:23711
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13462 '<Symbol "=" at nodes.lkt:23711:37>' Sym_11 ada/nodes.lkt:23711
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13462
Cast_Expr_30 := Local_Self_Type; 
      Cast_Result_31 := Cast_Expr_30;
Cast_Expr_31 := Local_Self_Type; 
      Cast_Result_32 := Cast_Expr_31;
--# property-call-start AdaNode.create_binop_assoc
Fld_16 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_11, Lhs => Cast_Result_31, Rhs => Cast_Result_32, Ret => Local_Bool_Type);
--# end
--# expr-done 13463
--# expr-start 13465 '<FieldAccess for create_binop_assoc at nodes.lkt:23712:13>' Fld_17 ada/nodes.lkt:23712
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13464 '<Symbol "/=" at nodes.lkt:23713:17>' Sym_12 ada/nodes.lkt:23713
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13464
Cast_Expr_32 := Local_Self_Type; 
      Cast_Result_33 := Cast_Expr_32;
Cast_Expr_33 := Local_Self_Type; 
      Cast_Result_34 := Cast_Expr_33;
--# property-call-start AdaNode.create_binop_assoc
Fld_17 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_12, Lhs => Cast_Result_33, Rhs => Cast_Result_34, Ret => Local_Bool_Type);
--# end
--# expr-done 13465
--# expr-start 13467 '<FieldAccess for create_binop_assoc at nodes.lkt:23718:13>' Fld_18 ada/nodes.lkt:23718
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13466 '<Symbol ">" at nodes.lkt:23718:37>' Sym_13 ada/nodes.lkt:23718
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 13466
Cast_Expr_34 := Local_Self_Type; 
      Cast_Result_35 := Cast_Expr_34;
Cast_Expr_35 := Local_Self_Type; 
      Cast_Result_36 := Cast_Expr_35;
--# property-call-start AdaNode.create_binop_assoc
Fld_18 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_13, Lhs => Cast_Result_35, Rhs => Cast_Result_36, Ret => Local_Bool_Type);
--# end
--# expr-done 13467
--# expr-start 13469 '<FieldAccess for create_binop_assoc at nodes.lkt:23719:13>' Fld_19 ada/nodes.lkt:23719
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13468 '<Symbol ">=" at nodes.lkt:23720:17>' Sym_14 ada/nodes.lkt:23720
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 13468
Cast_Expr_36 := Local_Self_Type; 
      Cast_Result_37 := Cast_Expr_36;
Cast_Expr_37 := Local_Self_Type; 
      Cast_Result_38 := Cast_Expr_37;
--# property-call-start AdaNode.create_binop_assoc
Fld_19 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_14, Lhs => Cast_Result_37, Rhs => Cast_Result_38, Ret => Local_Bool_Type);
--# end
--# expr-done 13469
--# expr-start 13471 '<FieldAccess for create_unop_assoc at nodes.lkt:23725:13>' Fld_20 ada/nodes.lkt:23725
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13470 '<Symbol "+" at nodes.lkt:23725:36>' Sym_15 ada/nodes.lkt:23725
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13470
Cast_Expr_38 := Local_Self_Type; 
      Cast_Result_39 := Cast_Expr_38;
Cast_Expr_39 := Local_Self_Type; 
      Cast_Result_40 := Cast_Expr_39;
--# property-call-start AdaNode.create_unop_assoc
Fld_20 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_15, Rhs => Cast_Result_39, Ret => Cast_Result_40);
--# end
--# expr-done 13471
--# expr-start 13473 '<FieldAccess for create_unop_assoc at nodes.lkt:23726:13>' Fld_21 ada/nodes.lkt:23726
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13472 '<Symbol "-" at nodes.lkt:23726:36>' Sym_16 ada/nodes.lkt:23726
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13472
Cast_Expr_40 := Local_Self_Type; 
      Cast_Result_41 := Cast_Expr_40;
Cast_Expr_41 := Local_Self_Type; 
      Cast_Result_42 := Cast_Expr_41;
--# property-call-start AdaNode.create_unop_assoc
Fld_21 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_16, Rhs => Cast_Result_41, Ret => Cast_Result_42);
--# end
--# expr-done 13473
--# expr-start 13475 '<FieldAccess for create_unop_assoc at nodes.lkt:23727:13>' Fld_22 ada/nodes.lkt:23727
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13474 '<Symbol "abs" at nodes.lkt:23727:36>' Sym_17 ada/nodes.lkt:23727
Sym_17 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs); 
--# expr-done 13474
Cast_Expr_42 := Local_Self_Type; 
      Cast_Result_43 := Cast_Expr_42;
Cast_Expr_43 := Local_Self_Type; 
      Cast_Result_44 := Cast_Expr_43;
--# property-call-start AdaNode.create_unop_assoc
Fld_22 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_17, Rhs => Cast_Result_43, Ret => Cast_Result_44);
--# end
--# expr-done 13475
--# expr-start 13477 '<FieldAccess for create_unop_assoc at nodes.lkt:23728:13>' Fld_23 ada/nodes.lkt:23728
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13476 '<Symbol "not" at nodes.lkt:23728:36>' Sym_18 ada/nodes.lkt:23728
Sym_18 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Not); 
--# expr-done 13476
Cast_Expr_44 := Local_Self_Type; 
      Cast_Result_45 := Cast_Expr_44;
Cast_Expr_45 := Local_Self_Type; 
      Cast_Result_46 := Cast_Expr_45;
--# property-call-start AdaNode.create_unop_assoc
Fld_23 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_18, Rhs => Cast_Result_45, Ret => Cast_Result_46);
--# end
--# expr-done 13477
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_5, 2 => Fld_6, 3 => Fld_7, 4 => Fld_8, 5 => Fld_9, 6 => Fld_10, 7 => Fld_11, 8 => Fld_12, 9 => Fld_13, 10 => Fld_14, 11 => Fld_15, 12 => Fld_16, 13 => Fld_17, 14 => Fld_18, 15 => Fld_19, 16 => Fld_20, 17 => Fld_21, 18 => Fld_22, 19 => Fld_23)); 
--# expr-done 13478
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
--# expr-done 13479
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13480
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 13481
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1552;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1552;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Mod_Int_Type_Def_P_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Private_Type_Def
   --
      procedure Initialize_Fields_For_Private_Type_Def
        (Self : Bare_Private_Type_Def
         ; Private_Type_Def_F_Has_Abstract : Bare_Abstract_Node
         ; Private_Type_Def_F_Has_Tagged : Bare_Tagged_Node
         ; Private_Type_Def_F_Has_Limited : Bare_Limited_Node
        ) is
      begin
            Self.Private_Type_Def_F_Has_Abstract := Private_Type_Def_F_Has_Abstract;
            Self.Private_Type_Def_F_Has_Tagged := Private_Type_Def_F_Has_Tagged;
            Self.Private_Type_Def_F_Has_Limited := Private_Type_Def_F_Has_Limited;
      end Initialize_Fields_For_Private_Type_Def;
   function Private_Type_Def_F_Has_Abstract
     (Node : Bare_Private_Type_Def) return Bare_Abstract_Node
   is
   begin
         return Node.Private_Type_Def_F_Has_Abstract;
   end;
   function Private_Type_Def_F_Has_Tagged
     (Node : Bare_Private_Type_Def) return Bare_Tagged_Node
   is
   begin
         return Node.Private_Type_Def_F_Has_Tagged;
   end;
   function Private_Type_Def_F_Has_Limited
     (Node : Bare_Private_Type_Def) return Bare_Limited_Node
   is
   begin
         return Node.Private_Type_Def_F_Has_Limited;
   end;
--# property-start PrivateTypeDef.is_tagged_type ada/nodes.lkt:23747
pragma Warnings (Off, "is not referenced");
 function Private_Type_Def_P_Is_Tagged_Type
  (Node : Bare_Private_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Private_Type_Def  := Bare_Private_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Bare_Tagged_Node;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13483 '<FieldAccess for as_bool at nodes.lkt:23747:34>' Fld_1 ada/nodes.lkt:23747
--# expr-start 13482 '<FieldAccess for has_tagged at nodes.lkt:23747:34>' Fld ada/nodes.lkt:23747
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Private_Type_Def_F_Has_Tagged;
--# expr-done 13482
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Tagged.as_bool'
Fld_1 := Libadalang.Implementation.Dispatcher_Tagged_Node_P_As_Bool (Node => Fld);
--# end
--# expr-done 13483
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Private_Type_Def_P_Is_Tagged_Type;
--# end
--# property-start PrivateTypeDef.is_limited_type ada/nodes.lkt:23749
pragma Warnings (Off, "is not referenced");
 function Private_Type_Def_P_Is_Limited_Type
  (Node : Bare_Private_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Private_Type_Def  := Bare_Private_Type_Def (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Limited_Node;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13485 '<FieldAccess for as_bool at nodes.lkt:23749:35>' Fld_1 ada/nodes.lkt:23749
--# expr-start 13484 '<FieldAccess for has_limited at nodes.lkt:23749:35>' Fld ada/nodes.lkt:23749
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Private_Type_Def_F_Has_Limited;
--# expr-done 13484
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Limited.as_bool'
Fld_1 := Libadalang.Implementation.Dispatcher_Limited_Node_P_As_Bool (Node => Fld);
--# end
--# expr-done 13485
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Private_Type_Def_P_Is_Limited_Type;
--# end
--# property-start PrivateTypeDef.xref_equation ada/nodes.lkt:23752
pragma Warnings (Off, "is not referenced");
 function Private_Type_Def_P_Xref_Equation
  (Node : Bare_Private_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Private_Type_Def  := Bare_Private_Type_Def (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1555 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1555 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1555;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23752:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1555;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1555;
            raise;
      end;
   return Property_Result;
end Private_Type_Def_P_Xref_Equation;
--# end
--# property-start PrivateTypeDef.predefined_operators ada/nodes.lkt:23755
pragma Warnings (Off, "is not referenced");
 function Private_Type_Def_P_Predefined_Operators
  (Node : Bare_Private_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Private_Type_Def  := Bare_Private_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1556 with Inline_Always;
      Fld : Internal_Env_Assoc_Array_Access;
Fld_1 : Bare_Limited_Node;
Fld_2 : Boolean;
If_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1556 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_1556;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Private_Type_Def_Private_Type_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Private_Type_Def,
                                As_Bare_Private_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13489 '<If at nodes.lkt:23756:9>' If_Result ada/nodes.lkt:23756
--# expr-start 13487 '<FieldAccess for as_bool at nodes.lkt:23756:12>' Fld_2 ada/nodes.lkt:23756
--# expr-start 13486 '<FieldAccess for has_limited at nodes.lkt:23756:12>' Fld_1 ada/nodes.lkt:23756
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Private_Type_Def_F_Has_Limited;
--# expr-done 13486
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Limited.as_bool'
Fld_2 := Libadalang.Implementation.Dispatcher_Limited_Node_P_As_Bool (Node => Fld_1);
--# end
--# expr-done 13487
if Fld_2 then
   If_Result := No_Internal_Env_Assoc_Array_Type;
else
   --# expr-start 13488 '<FieldAccess for predefined_equality_operators at nodes.lkt:23757:14>' Fld ada/nodes.lkt:23757
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.predefined_equality_operators
Fld := Libadalang.Implementation.Type_Def_P_Predefined_Equality_Operators (Node => Self);
--# end
--# expr-done 13488
   If_Result := Fld;
end if;
      Inc_Ref (If_Result);
--# expr-done 13489
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1556;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1556;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Private_Type_Def_P_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Real_Type_Def
   --
--# property-start RealTypeDef.is_static ada/nodes.lkt:23764
pragma Warnings (Off, "is not referenced");
 function Real_Type_Def_P_Is_Static
  (Node : Bare_Real_Type_Def
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Real_Type_Def  := Bare_Real_Type_Def (Node);
      --# bind self Self
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Real_Type_Def_P_Is_Static;
--# end
--# property-start RealTypeDef.predefined_operators ada/nodes.lkt:23767
pragma Warnings (Off, "is not referenced");
 function Real_Type_Def_P_Predefined_Operators
  (Node : Bare_Real_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Real_Type_Def  := Bare_Real_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1558 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Local_Int_Type : Bare_Base_Type_Decl;
Local_Root_Int_Type : Bare_Base_Type_Decl;
Local_Defaults : Internal_Env_Assoc_Array_Access;
Local_Specials : Internal_Env_Assoc_Array_Access;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Base_Type_Decl;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Fld_7 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Cast_Expr_4 : Bare_Type_Decl;
Cast_Result_5 : Bare_Base_Type_Decl;
Cast_Expr_5 : Bare_Type_Decl;
Cast_Result_6 : Bare_Base_Type_Decl;
Fld_8 : Internal_Env_Assoc := No_Env_Assoc;
Sym_2 : Symbol_Type;
Cast_Expr_6 : Bare_Type_Decl;
Cast_Result_7 : Bare_Base_Type_Decl;
Cast_Expr_7 : Bare_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Cast_Expr_8 : Bare_Type_Decl;
Cast_Result_9 : Bare_Base_Type_Decl;
Fld_9 : Internal_Env_Assoc := No_Env_Assoc;
Sym_3 : Symbol_Type;
Cast_Expr_9 : Bare_Type_Decl;
Cast_Result_10 : Bare_Base_Type_Decl;
Cast_Expr_10 : Bare_Type_Decl;
Cast_Result_11 : Bare_Base_Type_Decl;
Cast_Expr_11 : Bare_Type_Decl;
Cast_Result_12 : Bare_Base_Type_Decl;
Fld_10 : Internal_Env_Assoc := No_Env_Assoc;
Sym_4 : Symbol_Type;
Cast_Expr_12 : Bare_Type_Decl;
Cast_Result_13 : Bare_Base_Type_Decl;
Cast_Expr_13 : Bare_Type_Decl;
Cast_Result_14 : Bare_Base_Type_Decl;
Fld_11 : Internal_Env_Assoc := No_Env_Assoc;
Sym_5 : Symbol_Type;
Cast_Expr_14 : Bare_Type_Decl;
Cast_Result_15 : Bare_Base_Type_Decl;
Cast_Expr_15 : Bare_Type_Decl;
Cast_Result_16 : Bare_Base_Type_Decl;
Fld_12 : Internal_Env_Assoc := No_Env_Assoc;
Sym_6 : Symbol_Type;
Cast_Expr_16 : Bare_Type_Decl;
Cast_Result_17 : Bare_Base_Type_Decl;
Cast_Expr_17 : Bare_Type_Decl;
Cast_Result_18 : Bare_Base_Type_Decl;
Fld_13 : Internal_Env_Assoc := No_Env_Assoc;
Sym_7 : Symbol_Type;
Cast_Expr_18 : Bare_Type_Decl;
Cast_Result_19 : Bare_Base_Type_Decl;
Cast_Expr_19 : Bare_Type_Decl;
Cast_Result_20 : Bare_Base_Type_Decl;
Fld_14 : Internal_Env_Assoc := No_Env_Assoc;
Sym_8 : Symbol_Type;
Cast_Expr_20 : Bare_Type_Decl;
Cast_Result_21 : Bare_Base_Type_Decl;
Cast_Expr_21 : Bare_Type_Decl;
Cast_Result_22 : Bare_Base_Type_Decl;
Fld_15 : Internal_Env_Assoc := No_Env_Assoc;
Sym_9 : Symbol_Type;
Cast_Expr_22 : Bare_Type_Decl;
Cast_Result_23 : Bare_Base_Type_Decl;
Cast_Expr_23 : Bare_Type_Decl;
Cast_Result_24 : Bare_Base_Type_Decl;
Fld_16 : Internal_Env_Assoc := No_Env_Assoc;
Sym_10 : Symbol_Type;
Cast_Expr_24 : Bare_Type_Decl;
Cast_Result_25 : Bare_Base_Type_Decl;
Cast_Expr_25 : Bare_Type_Decl;
Cast_Result_26 : Bare_Base_Type_Decl;
Fld_17 : Internal_Env_Assoc := No_Env_Assoc;
Sym_11 : Symbol_Type;
Cast_Expr_26 : Bare_Type_Decl;
Cast_Result_27 : Bare_Base_Type_Decl;
Cast_Expr_27 : Bare_Type_Decl;
Cast_Result_28 : Bare_Base_Type_Decl;
Fld_18 : Internal_Env_Assoc := No_Env_Assoc;
Sym_12 : Symbol_Type;
Cast_Expr_28 : Bare_Type_Decl;
Cast_Result_29 : Bare_Base_Type_Decl;
Cast_Expr_29 : Bare_Type_Decl;
Cast_Result_30 : Bare_Base_Type_Decl;
Fld_19 : Internal_Env_Assoc := No_Env_Assoc;
Sym_13 : Symbol_Type;
Cast_Expr_30 : Bare_Type_Decl;
Cast_Result_31 : Bare_Base_Type_Decl;
Cast_Expr_31 : Bare_Type_Decl;
Cast_Result_32 : Bare_Base_Type_Decl;
Fld_20 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Sym_14 : Symbol_Type;
Cast_Expr_32 : Bare_Type_Decl;
Cast_Result_33 : Bare_Base_Type_Decl;
Cast_Expr_33 : Bare_Type_Decl;
Cast_Result_34 : Bare_Base_Type_Decl;
Fld_21 : Internal_Env_Assoc := No_Env_Assoc;
Sym_15 : Symbol_Type;
Cast_Expr_34 : Bare_Type_Decl;
Cast_Result_35 : Bare_Base_Type_Decl;
Cast_Expr_35 : Bare_Type_Decl;
Cast_Result_36 : Bare_Base_Type_Decl;
Fld_22 : Internal_Env_Assoc := No_Env_Assoc;
Sym_16 : Symbol_Type;
Cast_Expr_36 : Bare_Type_Decl;
Cast_Result_37 : Bare_Base_Type_Decl;
Cast_Expr_37 : Bare_Type_Decl;
Cast_Result_38 : Bare_Base_Type_Decl;
Fld_23 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit_1 : Internal_Env_Assoc_Array_Access;
Fld_24 : Internal_Entity_Base_Type_Decl;
Fld_25 : Bare_Base_Type_Decl;
Cast_Expr_38 : Bare_Type_Decl;
Cast_Result_39 : Bare_Base_Type_Decl;
Is_Equal : Boolean;
If_Result : Internal_Env_Assoc_Array_Access;
Concat_Result : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Env_Assoc_Array_Access;
Let_Result_3 : Internal_Env_Assoc_Array_Access;
Let_Result_4 : Internal_Env_Assoc_Array_Access;
Let_Result_5 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1558 is
            begin
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (Fld_18);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Fld_20);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Local_Defaults);
                     Dec_Ref (Fld_21);
                     Dec_Ref (Fld_22);
                     Dec_Ref (Fld_23);
                     Dec_Ref (Array_Lit_1);
                     Dec_Ref (If_Result);
                     Dec_Ref (Local_Specials);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Let_Result_4);
                     Dec_Ref (Let_Result_5);
            end Finalizer_Scope_1558;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Real_Type_Def_Real_Type_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Real_Type_Def,
                                As_Bare_Real_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13543 '<Let at nodes.lkt:23768:9>' Let_Result_5 ada/nodes.lkt:23768
--# scope-start
--# expr-start 13491 '<Cast to TypeDecl at nodes.lkt:23768:25>' Cast_Result ada/nodes.lkt:23768
--# expr-start 13490 '<parent at nodes.lkt:23768:25>' Fld ada/nodes.lkt:23768
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13490
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13491
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13542 '<Let at nodes.lkt:23769:9>' Let_Result_4 ada/nodes.lkt:23769
--# scope-start
--# expr-start 13493 '<FieldAccess for node at nodes.lkt:23769:25>' Fld_2 ada/nodes.lkt:23769
--# expr-start 13492 '<FieldAccess for bool_type at nodes.lkt:23769:25>' Fld_1 ada/nodes.lkt:23769
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13492
Fld_2 := Fld_1.Node;
--# expr-done 13493
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13541 '<Let at nodes.lkt:23770:9>' Let_Result_3 ada/nodes.lkt:23770
--# scope-start
--# expr-start 13495 '<FieldAccess for node at nodes.lkt:23770:24>' Fld_4 ada/nodes.lkt:23770
--# expr-start 13494 '<FieldAccess for int_type at nodes.lkt:23770:24>' Fld_3 ada/nodes.lkt:23770
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 13494
Fld_4 := Fld_3.Node;
--# expr-done 13495
Local_Int_Type := Fld_4; 
--# bind int_type Local_Int_Type
--# expr-start 13540 '<Let at nodes.lkt:23771:9>' Let_Result_2 ada/nodes.lkt:23771
--# scope-start
--# expr-start 13497 '<FieldAccess for node at nodes.lkt:23771:29>' Fld_6 ada/nodes.lkt:23771
--# expr-start 13496 '<FieldAccess for root_int_type at nodes.lkt:23771:29>' Fld_5 ada/nodes.lkt:23771
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_int_type
Fld_5 := Libadalang.Implementation.Ada_Node_P_Root_Int_Type (Node => Self);
--# end
--# expr-done 13496
Fld_6 := Fld_5.Node;
--# expr-done 13497
Local_Root_Int_Type := Fld_6; 
--# bind root_int_type Local_Root_Int_Type
--# expr-start 13539 '<Let at nodes.lkt:23772:9>' Let_Result_1 ada/nodes.lkt:23772
--# scope-start
--# expr-start 13526 '<ArrayLiteral at nodes.lkt:23773:13>' Array_Lit ada/nodes.lkt:23773
--# expr-start 13499 '<FieldAccess for create_binop_assoc at nodes.lkt:23774:17>' Fld_7 ada/nodes.lkt:23774
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13498 '<Symbol "+" at nodes.lkt:23775:21>' Sym ada/nodes.lkt:23775
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13498
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
--# property-call-start AdaNode.create_binop_assoc
Fld_7 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Cast_Result_3);
--# end
--# expr-done 13499
--# expr-start 13501 '<FieldAccess for create_binop_assoc at nodes.lkt:23780:17>' Fld_8 ada/nodes.lkt:23780
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13500 '<Symbol "-" at nodes.lkt:23781:21>' Sym_1 ada/nodes.lkt:23781
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13500
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
Cast_Expr_4 := Local_Self_Type; 
      Cast_Result_5 := Cast_Expr_4;
Cast_Expr_5 := Local_Self_Type; 
      Cast_Result_6 := Cast_Expr_5;
--# property-call-start AdaNode.create_binop_assoc
Fld_8 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_4, Rhs => Cast_Result_5, Ret => Cast_Result_6);
--# end
--# expr-done 13501
--# expr-start 13503 '<FieldAccess for create_binop_assoc at nodes.lkt:23786:17>' Fld_9 ada/nodes.lkt:23786
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13502 '<Symbol "*" at nodes.lkt:23787:21>' Sym_2 ada/nodes.lkt:23787
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13502
Cast_Expr_6 := Local_Self_Type; 
      Cast_Result_7 := Cast_Expr_6;
Cast_Expr_7 := Local_Self_Type; 
      Cast_Result_8 := Cast_Expr_7;
Cast_Expr_8 := Local_Self_Type; 
      Cast_Result_9 := Cast_Expr_8;
--# property-call-start AdaNode.create_binop_assoc
Fld_9 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_2, Lhs => Cast_Result_7, Rhs => Cast_Result_8, Ret => Cast_Result_9);
--# end
--# expr-done 13503
--# expr-start 13505 '<FieldAccess for create_binop_assoc at nodes.lkt:23792:17>' Fld_10 ada/nodes.lkt:23792
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13504 '<Symbol "/" at nodes.lkt:23793:21>' Sym_3 ada/nodes.lkt:23793
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13504
Cast_Expr_9 := Local_Self_Type; 
      Cast_Result_10 := Cast_Expr_9;
Cast_Expr_10 := Local_Self_Type; 
      Cast_Result_11 := Cast_Expr_10;
Cast_Expr_11 := Local_Self_Type; 
      Cast_Result_12 := Cast_Expr_11;
--# property-call-start AdaNode.create_binop_assoc
Fld_10 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_3, Lhs => Cast_Result_10, Rhs => Cast_Result_11, Ret => Cast_Result_12);
--# end
--# expr-done 13505
--# expr-start 13507 '<FieldAccess for create_binop_assoc at nodes.lkt:23798:17>' Fld_11 ada/nodes.lkt:23798
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13506 '<Symbol "**" at nodes.lkt:23799:21>' Sym_4 ada/nodes.lkt:23799
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_3); 
--# expr-done 13506
Cast_Expr_12 := Local_Self_Type; 
      Cast_Result_13 := Cast_Expr_12;
Cast_Expr_13 := Local_Self_Type; 
      Cast_Result_14 := Cast_Expr_13;
--# property-call-start AdaNode.create_binop_assoc
Fld_11 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_4, Lhs => Cast_Result_13, Rhs => Local_Int_Type, Ret => Cast_Result_14);
--# end
--# expr-done 13507
--# expr-start 13509 '<FieldAccess for create_binop_assoc at nodes.lkt:23804:17>' Fld_12 ada/nodes.lkt:23804
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13508 '<Symbol "<" at nodes.lkt:23805:21>' Sym_5 ada/nodes.lkt:23805
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 13508
Cast_Expr_14 := Local_Self_Type; 
      Cast_Result_15 := Cast_Expr_14;
Cast_Expr_15 := Local_Self_Type; 
      Cast_Result_16 := Cast_Expr_15;
--# property-call-start AdaNode.create_binop_assoc
Fld_12 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_5, Lhs => Cast_Result_15, Rhs => Cast_Result_16, Ret => Local_Bool_Type);
--# end
--# expr-done 13509
--# expr-start 13511 '<FieldAccess for create_binop_assoc at nodes.lkt:23810:17>' Fld_13 ada/nodes.lkt:23810
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13510 '<Symbol "<=" at nodes.lkt:23811:21>' Sym_6 ada/nodes.lkt:23811
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 13510
Cast_Expr_16 := Local_Self_Type; 
      Cast_Result_17 := Cast_Expr_16;
Cast_Expr_17 := Local_Self_Type; 
      Cast_Result_18 := Cast_Expr_17;
--# property-call-start AdaNode.create_binop_assoc
Fld_13 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_6, Lhs => Cast_Result_17, Rhs => Cast_Result_18, Ret => Local_Bool_Type);
--# end
--# expr-done 13511
--# expr-start 13513 '<FieldAccess for create_binop_assoc at nodes.lkt:23816:17>' Fld_14 ada/nodes.lkt:23816
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13512 '<Symbol "=" at nodes.lkt:23817:21>' Sym_7 ada/nodes.lkt:23817
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13512
Cast_Expr_18 := Local_Self_Type; 
      Cast_Result_19 := Cast_Expr_18;
Cast_Expr_19 := Local_Self_Type; 
      Cast_Result_20 := Cast_Expr_19;
--# property-call-start AdaNode.create_binop_assoc
Fld_14 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_7, Lhs => Cast_Result_19, Rhs => Cast_Result_20, Ret => Local_Bool_Type);
--# end
--# expr-done 13513
--# expr-start 13515 '<FieldAccess for create_binop_assoc at nodes.lkt:23822:17>' Fld_15 ada/nodes.lkt:23822
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13514 '<Symbol "/=" at nodes.lkt:23823:21>' Sym_8 ada/nodes.lkt:23823
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13514
Cast_Expr_20 := Local_Self_Type; 
      Cast_Result_21 := Cast_Expr_20;
Cast_Expr_21 := Local_Self_Type; 
      Cast_Result_22 := Cast_Expr_21;
--# property-call-start AdaNode.create_binop_assoc
Fld_15 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_8, Lhs => Cast_Result_21, Rhs => Cast_Result_22, Ret => Local_Bool_Type);
--# end
--# expr-done 13515
--# expr-start 13517 '<FieldAccess for create_binop_assoc at nodes.lkt:23828:17>' Fld_16 ada/nodes.lkt:23828
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13516 '<Symbol ">" at nodes.lkt:23829:21>' Sym_9 ada/nodes.lkt:23829
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 13516
Cast_Expr_22 := Local_Self_Type; 
      Cast_Result_23 := Cast_Expr_22;
Cast_Expr_23 := Local_Self_Type; 
      Cast_Result_24 := Cast_Expr_23;
--# property-call-start AdaNode.create_binop_assoc
Fld_16 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_9, Lhs => Cast_Result_23, Rhs => Cast_Result_24, Ret => Local_Bool_Type);
--# end
--# expr-done 13517
--# expr-start 13519 '<FieldAccess for create_binop_assoc at nodes.lkt:23834:17>' Fld_17 ada/nodes.lkt:23834
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13518 '<Symbol ">=" at nodes.lkt:23835:21>' Sym_10 ada/nodes.lkt:23835
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 13518
Cast_Expr_24 := Local_Self_Type; 
      Cast_Result_25 := Cast_Expr_24;
Cast_Expr_25 := Local_Self_Type; 
      Cast_Result_26 := Cast_Expr_25;
--# property-call-start AdaNode.create_binop_assoc
Fld_17 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_10, Lhs => Cast_Result_25, Rhs => Cast_Result_26, Ret => Local_Bool_Type);
--# end
--# expr-done 13519
--# expr-start 13521 '<FieldAccess for create_unop_assoc at nodes.lkt:23840:17>' Fld_18 ada/nodes.lkt:23840
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13520 '<Symbol "+" at nodes.lkt:23840:40>' Sym_11 ada/nodes.lkt:23840
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13520
Cast_Expr_26 := Local_Self_Type; 
      Cast_Result_27 := Cast_Expr_26;
Cast_Expr_27 := Local_Self_Type; 
      Cast_Result_28 := Cast_Expr_27;
--# property-call-start AdaNode.create_unop_assoc
Fld_18 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_11, Rhs => Cast_Result_27, Ret => Cast_Result_28);
--# end
--# expr-done 13521
--# expr-start 13523 '<FieldAccess for create_unop_assoc at nodes.lkt:23841:17>' Fld_19 ada/nodes.lkt:23841
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13522 '<Symbol "-" at nodes.lkt:23841:40>' Sym_12 ada/nodes.lkt:23841
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13522
Cast_Expr_28 := Local_Self_Type; 
      Cast_Result_29 := Cast_Expr_28;
Cast_Expr_29 := Local_Self_Type; 
      Cast_Result_30 := Cast_Expr_29;
--# property-call-start AdaNode.create_unop_assoc
Fld_19 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_12, Rhs => Cast_Result_29, Ret => Cast_Result_30);
--# end
--# expr-done 13523
--# expr-start 13525 '<FieldAccess for create_unop_assoc at nodes.lkt:23842:17>' Fld_20 ada/nodes.lkt:23842
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13524 '<Symbol "abs" at nodes.lkt:23842:40>' Sym_13 ada/nodes.lkt:23842
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs); 
--# expr-done 13524
Cast_Expr_30 := Local_Self_Type; 
      Cast_Result_31 := Cast_Expr_30;
Cast_Expr_31 := Local_Self_Type; 
      Cast_Result_32 := Cast_Expr_31;
--# property-call-start AdaNode.create_unop_assoc
Fld_20 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_13, Rhs => Cast_Result_31, Ret => Cast_Result_32);
--# end
--# expr-done 13525
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_7, 2 => Fld_8, 3 => Fld_9, 4 => Fld_10, 5 => Fld_11, 6 => Fld_12, 7 => Fld_13, 8 => Fld_14, 9 => Fld_15, 10 => Fld_16, 11 => Fld_17, 12 => Fld_18, 13 => Fld_19, 14 => Fld_20)); 
--# expr-done 13526
Local_Defaults := Array_Lit; Inc_Ref (Local_Defaults);
--# bind defaults Local_Defaults
--# expr-start 13538 '<Let at nodes.lkt:23845:9>' Let_Result ada/nodes.lkt:23845
--# scope-start
--# expr-start 13537 '<If at nodes.lkt:23846:13>' If_Result ada/nodes.lkt:23846
--# expr-start 13529 '<Eq at nodes.lkt:23846:16>' Is_Equal ada/nodes.lkt:23846
Cast_Expr_38 := Local_Self_Type; 
      Cast_Result_39 := Cast_Expr_38;
--# expr-start 13528 '<FieldAccess for node at nodes.lkt:23846:29>' Fld_25 ada/nodes.lkt:23846
--# expr-start 13527 '<FieldAccess for root_real_type at nodes.lkt:23846:29>' Fld_24 ada/nodes.lkt:23846
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.root_real_type
Fld_24 := Libadalang.Implementation.Ada_Node_P_Root_Real_Type (Node => Self);
--# end
--# expr-done 13527
Fld_25 := Fld_24.Node;
--# expr-done 13528
Is_Equal := Cast_Result_39 = Fld_25; 
--# expr-done 13529
if Is_Equal then
   --# expr-start 13536 '<ArrayLiteral at nodes.lkt:23848:17>' Array_Lit_1 ada/nodes.lkt:23848
--# expr-start 13531 '<FieldAccess for create_binop_assoc at nodes.lkt:23849:21>' Fld_21 ada/nodes.lkt:23849
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13530 '<Symbol "*" at nodes.lkt:23850:25>' Sym_14 ada/nodes.lkt:23850
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13530
Cast_Expr_32 := Local_Self_Type; 
      Cast_Result_33 := Cast_Expr_32;
Cast_Expr_33 := Local_Self_Type; 
      Cast_Result_34 := Cast_Expr_33;
--# property-call-start AdaNode.create_binop_assoc
Fld_21 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_14, Lhs => Local_Root_Int_Type, Rhs => Cast_Result_33, Ret => Cast_Result_34);
--# end
--# expr-done 13531
--# expr-start 13533 '<FieldAccess for create_binop_assoc at nodes.lkt:23855:21>' Fld_22 ada/nodes.lkt:23855
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13532 '<Symbol "*" at nodes.lkt:23856:25>' Sym_15 ada/nodes.lkt:23856
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13532
Cast_Expr_34 := Local_Self_Type; 
      Cast_Result_35 := Cast_Expr_34;
Cast_Expr_35 := Local_Self_Type; 
      Cast_Result_36 := Cast_Expr_35;
--# property-call-start AdaNode.create_binop_assoc
Fld_22 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_15, Lhs => Cast_Result_35, Rhs => Local_Root_Int_Type, Ret => Cast_Result_36);
--# end
--# expr-done 13533
--# expr-start 13535 '<FieldAccess for create_binop_assoc at nodes.lkt:23861:21>' Fld_23 ada/nodes.lkt:23861
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13534 '<Symbol "/" at nodes.lkt:23862:25>' Sym_16 ada/nodes.lkt:23862
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13534
Cast_Expr_36 := Local_Self_Type; 
      Cast_Result_37 := Cast_Expr_36;
Cast_Expr_37 := Local_Self_Type; 
      Cast_Result_38 := Cast_Expr_37;
--# property-call-start AdaNode.create_binop_assoc
Fld_23 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_16, Lhs => Cast_Result_37, Rhs => Local_Root_Int_Type, Ret => Cast_Result_38);
--# end
--# expr-done 13535
Array_Lit_1 := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_21, 2 => Fld_22, 3 => Fld_23)); 
--# expr-done 13536
   If_Result := Array_Lit_1;
else
   If_Result := No_Internal_Env_Assoc_Array_Type;
end if;
      Inc_Ref (If_Result);
--# expr-done 13537
Local_Specials := If_Result; Inc_Ref (Local_Specials);
--# bind specials Local_Specials
Concat_Result := Concat (Local_Defaults, Local_Specials); 
Let_Result := Concat_Result; Inc_Ref (Let_Result);
--# end
--# expr-done 13538
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13539
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 13540
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 13541
Let_Result_4 := Let_Result_3; Inc_Ref (Let_Result_4);
--# end
--# expr-done 13542
Let_Result_5 := Let_Result_4; Inc_Ref (Let_Result_5);
--# end
--# expr-done 13543
         Property_Result := Let_Result_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1558;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1558;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Real_Type_Def_P_Predefined_Operators;
--# end
--# property-start RealTypeDef.universal_fixed_predefined_operators ada/nodes.lkt:23876
pragma Warnings (Off, "is not referenced");
 function Real_Type_Def_P_Universal_Fixed_Predefined_Operators
  (Node : Bare_Real_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Real_Type_Def  := Bare_Real_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1559 with Inline_Always;
      Local_Uf : Bare_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Fld_2 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Fld_3 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1559 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1559;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Real_Type_Def_Real_Type_Def_P_Universal_Fixed_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Real_Type_Def,
                                As_Bare_Real_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13551 '<Let at nodes.lkt:23877:9>' Let_Result ada/nodes.lkt:23877
--# scope-start
--# expr-start 13545 '<FieldAccess for node at nodes.lkt:23877:18>' Fld_1 ada/nodes.lkt:23877
--# expr-start 13544 '<FieldAccess for universal_fixed_type at nodes.lkt:23877:18>' Fld ada/nodes.lkt:23877
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.universal_fixed_type
Fld := Libadalang.Implementation.Ada_Node_P_Universal_Fixed_Type (Node => Self);
--# end
--# expr-done 13544
Fld_1 := Fld.Node;
--# expr-done 13545
Local_Uf := Fld_1; 
--# bind uf Local_Uf
--# expr-start 13550 '<ArrayLiteral at nodes.lkt:23879:9>' Array_Lit ada/nodes.lkt:23879
--# expr-start 13547 '<FieldAccess for create_binop_assoc at nodes.lkt:23880:13>' Fld_2 ada/nodes.lkt:23880
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13546 '<Symbol "*" at nodes.lkt:23880:37>' Sym ada/nodes.lkt:23880
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13546
--# property-call-start AdaNode.create_binop_assoc
Fld_2 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Local_Uf, Rhs => Local_Uf, Ret => Local_Uf);
--# end
--# expr-done 13547
--# expr-start 13549 '<FieldAccess for create_binop_assoc at nodes.lkt:23881:13>' Fld_3 ada/nodes.lkt:23881
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13548 '<Symbol "/" at nodes.lkt:23881:37>' Sym_1 ada/nodes.lkt:23881
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13548
--# property-call-start AdaNode.create_binop_assoc
Fld_3 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Local_Uf, Rhs => Local_Uf, Ret => Local_Uf);
--# end
--# expr-done 13549
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_2, 2 => Fld_3)); 
--# expr-done 13550
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
--# expr-done 13551
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1559;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1559;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Real_Type_Def_P_Universal_Fixed_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Decimal_Fixed_Point_Def
   --
      procedure Initialize_Fields_For_Decimal_Fixed_Point_Def
        (Self : Bare_Decimal_Fixed_Point_Def
         ; Decimal_Fixed_Point_Def_F_Delta : Bare_Expr
         ; Decimal_Fixed_Point_Def_F_Digits : Bare_Expr
         ; Decimal_Fixed_Point_Def_F_Range : Bare_Range_Spec
        ) is
      begin
            Self.Decimal_Fixed_Point_Def_F_Delta := Decimal_Fixed_Point_Def_F_Delta;
            Self.Decimal_Fixed_Point_Def_F_Digits := Decimal_Fixed_Point_Def_F_Digits;
            Self.Decimal_Fixed_Point_Def_F_Range := Decimal_Fixed_Point_Def_F_Range;
      end Initialize_Fields_For_Decimal_Fixed_Point_Def;
   function Decimal_Fixed_Point_Def_F_Delta
     (Node : Bare_Decimal_Fixed_Point_Def) return Bare_Expr
   is
   begin
         return Node.Decimal_Fixed_Point_Def_F_Delta;
   end;
   function Decimal_Fixed_Point_Def_F_Digits
     (Node : Bare_Decimal_Fixed_Point_Def) return Bare_Expr
   is
   begin
         return Node.Decimal_Fixed_Point_Def_F_Digits;
   end;
   function Decimal_Fixed_Point_Def_F_Range
     (Node : Bare_Decimal_Fixed_Point_Def) return Bare_Range_Spec
   is
   begin
         return Node.Decimal_Fixed_Point_Def_F_Range;
   end;
--# property-start DecimalFixedPointDef.is_fixed_point ada/nodes.lkt:23897
pragma Warnings (Off, "is not referenced");
 function Decimal_Fixed_Point_Def_P_Is_Fixed_Point
  (Node : Bare_Decimal_Fixed_Point_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Decimal_Fixed_Point_Def  := Bare_Decimal_Fixed_Point_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Decimal_Fixed_Point_Def_P_Is_Fixed_Point;
--# end
--# property-start DecimalFixedPointDef.xref_equation ada/nodes.lkt:23901
pragma Warnings (Off, "is not referenced");
 function Decimal_Fixed_Point_Def_P_Xref_Equation
  (Node : Bare_Decimal_Fixed_Point_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Decimal_Fixed_Point_Def  := Bare_Decimal_Fixed_Point_Def (Node);
     Ent : Internal_Entity_Decimal_Fixed_Point_Def :=
       Internal_Entity_Decimal_Fixed_Point_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1561 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Var;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_7 : Internal_Entity_Expr;
Fld_8 : Logic_Var;
Fld_9 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_10 : Internal_Entity_Expr;
Fld_11 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Fld_12 : Internal_Entity_Expr;
Fld_13 : Logic_Equation;
And_Pred_4 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_14 : Internal_Entity_Range_Spec;
Fld_15 : Logic_Equation;
Fld_16 : Bare_Range_Spec;
Is_Null : Boolean;
If_Result : Logic_Equation;
And_Pred_5 : Logic_Equation;
            procedure Finalizer_Scope_1561 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Fld_9);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_11);
                     Dec_Ref (And_Pred_3);
                     Dec_Ref (Fld_13);
                     Dec_Ref (And_Pred_4);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_15);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_5);
            end Finalizer_Scope_1561;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13576 '<LogicBinaryOp And at nodes.lkt:23902:9>' And_Pred_5 ada/nodes.lkt:23902
--# expr-start 13570 '<LogicBinaryOp And at nodes.lkt:23902:9>' And_Pred_4 ada/nodes.lkt:23902
--# expr-start 13567 '<LogicBinaryOp And at nodes.lkt:23902:9>' And_Pred_3 ada/nodes.lkt:23902
--# expr-start 13564 '<LogicBinaryOp And at nodes.lkt:23902:9>' And_Pred_2 ada/nodes.lkt:23902
--# expr-start 13560 '<LogicBinaryOp And at nodes.lkt:23902:9>' And_Pred_1 ada/nodes.lkt:23902
--# expr-start 13557 '<LogicBinaryOp And at nodes.lkt:23902:9>' And_Pred ada/nodes.lkt:23902
--# expr-start 13554 '<FieldAccess for universal_real_bind at nodes.lkt:23905:13>' Fld_2 ada/nodes.lkt:23905
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13553 '<FieldAccess for expected_type_var at nodes.lkt:23905:38>' Fld_1 ada/nodes.lkt:23905
--# expr-start 13552 '<FieldAccess for delta at nodes.lkt:23905:38>' Fld ada/nodes.lkt:23905
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Decimal_Fixed_Point_Def_F_Delta, Info => Ent.Info);
--# expr-done 13552
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld.Node);
--# expr-done 13553
--# property-call-start AdaNode.universal_real_bind
Fld_2 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Bind (Node => Ent.Node, Type_Var => Fld_1, Origin => Origin);
--# end
--# expr-done 13554
--# expr-start 13556 '<FieldAccess for sub_equation at nodes.lkt:23907:14>' Fld_4 ada/nodes.lkt:23907
--# expr-start 13555 '<FieldAccess for delta at nodes.lkt:23907:14>' Fld_3 ada/nodes.lkt:23907
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Decimal_Fixed_Point_Def_F_Delta, Info => Ent.Info);
--# expr-done 13555
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 13556
And_Pred := Create_And (Fld_2, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23902:9") else null)); 
--# expr-done 13557
--# expr-start 13559 '<FieldAccess for matches_expected_type at nodes.lkt:23908:14>' Fld_6 ada/nodes.lkt:23908
--# expr-start 13558 '<FieldAccess for delta at nodes.lkt:23908:14>' Fld_5 ada/nodes.lkt:23908
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Decimal_Fixed_Point_Def_F_Delta, Info => Ent.Info);
--# expr-done 13558
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 13559
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23902:9") else null)); 
--# expr-done 13560
--# expr-start 13563 '<FieldAccess for universal_int_bind at nodes.lkt:23911:13>' Fld_9 ada/nodes.lkt:23911
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13562 '<FieldAccess for expected_type_var at nodes.lkt:23911:37>' Fld_8 ada/nodes.lkt:23911
--# expr-start 13561 '<FieldAccess for digits at nodes.lkt:23911:37>' Fld_7 ada/nodes.lkt:23911
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Expr (Node => Ent.Node.Decimal_Fixed_Point_Def_F_Digits, Info => Ent.Info);
--# expr-done 13561
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_7.Node);
--# expr-done 13562
--# property-call-start AdaNode.universal_int_bind
Fld_9 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Ent.Node, Type_Var => Fld_8, Origin => Origin);
--# end
--# expr-done 13563
And_Pred_2 := Create_And (And_Pred_1, Fld_9, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23902:9") else null)); 
--# expr-done 13564
--# expr-start 13566 '<FieldAccess for sub_equation at nodes.lkt:23913:14>' Fld_11 ada/nodes.lkt:23913
--# expr-start 13565 '<FieldAccess for digits at nodes.lkt:23913:14>' Fld_10 ada/nodes.lkt:23913
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Create_Internal_Entity_Expr (Node => Ent.Node.Decimal_Fixed_Point_Def_F_Digits, Info => Ent.Info);
--# expr-done 13565
      if Fld_10.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_11 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_10.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_10.Info);
--# end
--# expr-done 13566
And_Pred_3 := Create_And (And_Pred_2, Fld_11, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23902:9") else null)); 
--# expr-done 13567
--# expr-start 13569 '<FieldAccess for matches_expected_type at nodes.lkt:23914:14>' Fld_13 ada/nodes.lkt:23914
--# expr-start 13568 '<FieldAccess for digits at nodes.lkt:23914:14>' Fld_12 ada/nodes.lkt:23914
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Create_Internal_Entity_Expr (Node => Ent.Node.Decimal_Fixed_Point_Def_F_Digits, Info => Ent.Info);
--# expr-done 13568
      if Fld_12.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_13 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_12.Node, Origin => Origin);
--# end
--# expr-done 13569
And_Pred_4 := Create_And (And_Pred_3, Fld_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23902:9") else null)); 
--# expr-done 13570
--# expr-start 13575 '<If at nodes.lkt:23915:15>' If_Result ada/nodes.lkt:23915
--# expr-start 13572 '<IsNull at nodes.lkt:23915:18>' Is_Null ada/nodes.lkt:23915
--# expr-start 13571 '<FieldAccess for range at nodes.lkt:23915:18>' Fld_16 ada/nodes.lkt:23915
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_16 := Self.Decimal_Fixed_Point_Def_F_Range;
--# expr-done 13571
Is_Null := Fld_16 = null; 
--# expr-done 13572
if Is_Null then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23915:42") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 13574 '<FieldAccess for sub_equation at nodes.lkt:23915:53>' Fld_15 ada/nodes.lkt:23915
--# expr-start 13573 '<FieldAccess for range at nodes.lkt:23915:53>' Fld_14 ada/nodes.lkt:23915
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Decimal_Fixed_Point_Def_F_Range, Info => Ent.Info);
--# expr-done 13573
      if Fld_14.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_15 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_14.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_14.Info);
--# end
--# expr-done 13574
   If_Result := Fld_15;
end if;
      Inc_Ref (If_Result);
--# expr-done 13575
And_Pred_5 := Create_And (And_Pred_4, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23902:9") else null)); 
--# expr-done 13576
         Property_Result := And_Pred_5;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1561;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1561;
            raise;
      end;
   return Property_Result;
end Decimal_Fixed_Point_Def_P_Xref_Equation;
--# end
--# property-start DecimalFixedPointDef.predefined_operators ada/nodes.lkt:23918
pragma Warnings (Off, "is not referenced");
 function Decimal_Fixed_Point_Def_P_Predefined_Operators
  (Node : Bare_Decimal_Fixed_Point_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Decimal_Fixed_Point_Def  := Bare_Decimal_Fixed_Point_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1562 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Local_Int_Type : Bare_Base_Type_Decl;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Fld_5 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Cast_Expr_4 : Bare_Type_Decl;
Cast_Result_5 : Bare_Base_Type_Decl;
Cast_Expr_5 : Bare_Type_Decl;
Cast_Result_6 : Bare_Base_Type_Decl;
Fld_6 : Internal_Env_Assoc := No_Env_Assoc;
Sym_2 : Symbol_Type;
Cast_Expr_6 : Bare_Type_Decl;
Cast_Result_7 : Bare_Base_Type_Decl;
Cast_Expr_7 : Bare_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Cast_Expr_8 : Bare_Type_Decl;
Cast_Result_9 : Bare_Base_Type_Decl;
Fld_7 : Internal_Env_Assoc := No_Env_Assoc;
Sym_3 : Symbol_Type;
Cast_Expr_9 : Bare_Type_Decl;
Cast_Result_10 : Bare_Base_Type_Decl;
Cast_Expr_10 : Bare_Type_Decl;
Cast_Result_11 : Bare_Base_Type_Decl;
Cast_Expr_11 : Bare_Type_Decl;
Cast_Result_12 : Bare_Base_Type_Decl;
Fld_8 : Internal_Env_Assoc := No_Env_Assoc;
Sym_4 : Symbol_Type;
Cast_Expr_12 : Bare_Type_Decl;
Cast_Result_13 : Bare_Base_Type_Decl;
Cast_Expr_13 : Bare_Type_Decl;
Cast_Result_14 : Bare_Base_Type_Decl;
Fld_9 : Internal_Env_Assoc := No_Env_Assoc;
Sym_5 : Symbol_Type;
Cast_Expr_14 : Bare_Type_Decl;
Cast_Result_15 : Bare_Base_Type_Decl;
Cast_Expr_15 : Bare_Type_Decl;
Cast_Result_16 : Bare_Base_Type_Decl;
Fld_10 : Internal_Env_Assoc := No_Env_Assoc;
Sym_6 : Symbol_Type;
Cast_Expr_16 : Bare_Type_Decl;
Cast_Result_17 : Bare_Base_Type_Decl;
Cast_Expr_17 : Bare_Type_Decl;
Cast_Result_18 : Bare_Base_Type_Decl;
Fld_11 : Internal_Env_Assoc := No_Env_Assoc;
Sym_7 : Symbol_Type;
Cast_Expr_18 : Bare_Type_Decl;
Cast_Result_19 : Bare_Base_Type_Decl;
Cast_Expr_19 : Bare_Type_Decl;
Cast_Result_20 : Bare_Base_Type_Decl;
Fld_12 : Internal_Env_Assoc := No_Env_Assoc;
Sym_8 : Symbol_Type;
Cast_Expr_20 : Bare_Type_Decl;
Cast_Result_21 : Bare_Base_Type_Decl;
Cast_Expr_21 : Bare_Type_Decl;
Cast_Result_22 : Bare_Base_Type_Decl;
Fld_13 : Internal_Env_Assoc := No_Env_Assoc;
Sym_9 : Symbol_Type;
Cast_Expr_22 : Bare_Type_Decl;
Cast_Result_23 : Bare_Base_Type_Decl;
Cast_Expr_23 : Bare_Type_Decl;
Cast_Result_24 : Bare_Base_Type_Decl;
Fld_14 : Internal_Env_Assoc := No_Env_Assoc;
Sym_10 : Symbol_Type;
Cast_Expr_24 : Bare_Type_Decl;
Cast_Result_25 : Bare_Base_Type_Decl;
Cast_Expr_25 : Bare_Type_Decl;
Cast_Result_26 : Bare_Base_Type_Decl;
Fld_15 : Internal_Env_Assoc := No_Env_Assoc;
Sym_11 : Symbol_Type;
Cast_Expr_26 : Bare_Type_Decl;
Cast_Result_27 : Bare_Base_Type_Decl;
Cast_Expr_27 : Bare_Type_Decl;
Cast_Result_28 : Bare_Base_Type_Decl;
Fld_16 : Internal_Env_Assoc := No_Env_Assoc;
Sym_12 : Symbol_Type;
Cast_Expr_28 : Bare_Type_Decl;
Cast_Result_29 : Bare_Base_Type_Decl;
Cast_Expr_29 : Bare_Type_Decl;
Cast_Result_30 : Bare_Base_Type_Decl;
Fld_17 : Internal_Env_Assoc := No_Env_Assoc;
Sym_13 : Symbol_Type;
Cast_Expr_30 : Bare_Type_Decl;
Cast_Result_31 : Bare_Base_Type_Decl;
Cast_Expr_31 : Bare_Type_Decl;
Cast_Result_32 : Bare_Base_Type_Decl;
Fld_18 : Internal_Env_Assoc := No_Env_Assoc;
Sym_14 : Symbol_Type;
Cast_Expr_32 : Bare_Type_Decl;
Cast_Result_33 : Bare_Base_Type_Decl;
Cast_Expr_33 : Bare_Type_Decl;
Cast_Result_34 : Bare_Base_Type_Decl;
Fld_19 : Internal_Env_Assoc := No_Env_Assoc;
Sym_15 : Symbol_Type;
Cast_Expr_34 : Bare_Type_Decl;
Cast_Result_35 : Bare_Base_Type_Decl;
Cast_Expr_35 : Bare_Type_Decl;
Cast_Result_36 : Bare_Base_Type_Decl;
Fld_20 : Internal_Env_Assoc := No_Env_Assoc;
Sym_16 : Symbol_Type;
Cast_Expr_36 : Bare_Type_Decl;
Cast_Result_37 : Bare_Base_Type_Decl;
Cast_Expr_37 : Bare_Type_Decl;
Cast_Result_38 : Bare_Base_Type_Decl;
Fld_21 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1562 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (Fld_18);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Fld_20);
                     Dec_Ref (Fld_21);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1562;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Decimal_Fixed_Point_Def_Decimal_Fixed_Point_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Decimal_Fixed_Point_Def,
                                As_Bare_Decimal_Fixed_Point_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13620 '<Let at nodes.lkt:23919:9>' Let_Result_2 ada/nodes.lkt:23919
--# scope-start
--# expr-start 13578 '<Cast to TypeDecl at nodes.lkt:23919:25>' Cast_Result ada/nodes.lkt:23919
--# expr-start 13577 '<parent at nodes.lkt:23919:25>' Fld ada/nodes.lkt:23919
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13577
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13578
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13619 '<Let at nodes.lkt:23920:9>' Let_Result_1 ada/nodes.lkt:23920
--# scope-start
--# expr-start 13580 '<FieldAccess for node at nodes.lkt:23920:25>' Fld_2 ada/nodes.lkt:23920
--# expr-start 13579 '<FieldAccess for bool_type at nodes.lkt:23920:25>' Fld_1 ada/nodes.lkt:23920
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13579
Fld_2 := Fld_1.Node;
--# expr-done 13580
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13618 '<Let at nodes.lkt:23921:9>' Let_Result ada/nodes.lkt:23921
--# scope-start
--# expr-start 13582 '<FieldAccess for node at nodes.lkt:23921:24>' Fld_4 ada/nodes.lkt:23921
--# expr-start 13581 '<FieldAccess for int_type at nodes.lkt:23921:24>' Fld_3 ada/nodes.lkt:23921
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 13581
Fld_4 := Fld_3.Node;
--# expr-done 13582
Local_Int_Type := Fld_4; 
--# bind int_type Local_Int_Type
--# expr-start 13617 '<ArrayLiteral at nodes.lkt:23923:9>' Array_Lit ada/nodes.lkt:23923
--# expr-start 13584 '<FieldAccess for create_binop_assoc at nodes.lkt:23924:13>' Fld_5 ada/nodes.lkt:23924
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13583 '<Symbol "+" at nodes.lkt:23924:37>' Sym ada/nodes.lkt:23924
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13583
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
--# property-call-start AdaNode.create_binop_assoc
Fld_5 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Cast_Result_3);
--# end
--# expr-done 13584
--# expr-start 13586 '<FieldAccess for create_binop_assoc at nodes.lkt:23925:13>' Fld_6 ada/nodes.lkt:23925
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13585 '<Symbol "-" at nodes.lkt:23925:37>' Sym_1 ada/nodes.lkt:23925
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13585
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
Cast_Expr_4 := Local_Self_Type; 
      Cast_Result_5 := Cast_Expr_4;
Cast_Expr_5 := Local_Self_Type; 
      Cast_Result_6 := Cast_Expr_5;
--# property-call-start AdaNode.create_binop_assoc
Fld_6 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_4, Rhs => Cast_Result_5, Ret => Cast_Result_6);
--# end
--# expr-done 13586
--# expr-start 13588 '<FieldAccess for create_binop_assoc at nodes.lkt:23926:13>' Fld_7 ada/nodes.lkt:23926
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13587 '<Symbol "*" at nodes.lkt:23926:37>' Sym_2 ada/nodes.lkt:23926
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13587
Cast_Expr_6 := Local_Self_Type; 
      Cast_Result_7 := Cast_Expr_6;
Cast_Expr_7 := Local_Self_Type; 
      Cast_Result_8 := Cast_Expr_7;
Cast_Expr_8 := Local_Self_Type; 
      Cast_Result_9 := Cast_Expr_8;
--# property-call-start AdaNode.create_binop_assoc
Fld_7 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_2, Lhs => Cast_Result_7, Rhs => Cast_Result_8, Ret => Cast_Result_9);
--# end
--# expr-done 13588
--# expr-start 13590 '<FieldAccess for create_binop_assoc at nodes.lkt:23927:13>' Fld_8 ada/nodes.lkt:23927
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13589 '<Symbol "/" at nodes.lkt:23927:37>' Sym_3 ada/nodes.lkt:23927
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13589
Cast_Expr_9 := Local_Self_Type; 
      Cast_Result_10 := Cast_Expr_9;
Cast_Expr_10 := Local_Self_Type; 
      Cast_Result_11 := Cast_Expr_10;
Cast_Expr_11 := Local_Self_Type; 
      Cast_Result_12 := Cast_Expr_11;
--# property-call-start AdaNode.create_binop_assoc
Fld_8 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_3, Lhs => Cast_Result_10, Rhs => Cast_Result_11, Ret => Cast_Result_12);
--# end
--# expr-done 13590
--# expr-start 13592 '<FieldAccess for create_binop_assoc at nodes.lkt:23928:13>' Fld_9 ada/nodes.lkt:23928
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13591 '<Symbol "*" at nodes.lkt:23928:37>' Sym_4 ada/nodes.lkt:23928
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13591
Cast_Expr_12 := Local_Self_Type; 
      Cast_Result_13 := Cast_Expr_12;
Cast_Expr_13 := Local_Self_Type; 
      Cast_Result_14 := Cast_Expr_13;
--# property-call-start AdaNode.create_binop_assoc
Fld_9 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_4, Lhs => Local_Int_Type, Rhs => Cast_Result_13, Ret => Cast_Result_14);
--# end
--# expr-done 13592
--# expr-start 13594 '<FieldAccess for create_binop_assoc at nodes.lkt:23929:13>' Fld_10 ada/nodes.lkt:23929
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13593 '<Symbol "*" at nodes.lkt:23929:37>' Sym_5 ada/nodes.lkt:23929
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13593
Cast_Expr_14 := Local_Self_Type; 
      Cast_Result_15 := Cast_Expr_14;
Cast_Expr_15 := Local_Self_Type; 
      Cast_Result_16 := Cast_Expr_15;
--# property-call-start AdaNode.create_binop_assoc
Fld_10 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_5, Lhs => Cast_Result_15, Rhs => Local_Int_Type, Ret => Cast_Result_16);
--# end
--# expr-done 13594
--# expr-start 13596 '<FieldAccess for create_binop_assoc at nodes.lkt:23930:13>' Fld_11 ada/nodes.lkt:23930
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13595 '<Symbol "/" at nodes.lkt:23930:37>' Sym_6 ada/nodes.lkt:23930
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13595
Cast_Expr_16 := Local_Self_Type; 
      Cast_Result_17 := Cast_Expr_16;
Cast_Expr_17 := Local_Self_Type; 
      Cast_Result_18 := Cast_Expr_17;
--# property-call-start AdaNode.create_binop_assoc
Fld_11 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_6, Lhs => Cast_Result_17, Rhs => Local_Int_Type, Ret => Cast_Result_18);
--# end
--# expr-done 13596
--# expr-start 13598 '<FieldAccess for create_binop_assoc at nodes.lkt:23931:13>' Fld_12 ada/nodes.lkt:23931
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13597 '<Symbol "**" at nodes.lkt:23931:37>' Sym_7 ada/nodes.lkt:23931
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_3); 
--# expr-done 13597
Cast_Expr_18 := Local_Self_Type; 
      Cast_Result_19 := Cast_Expr_18;
Cast_Expr_19 := Local_Self_Type; 
      Cast_Result_20 := Cast_Expr_19;
--# property-call-start AdaNode.create_binop_assoc
Fld_12 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_7, Lhs => Cast_Result_19, Rhs => Local_Int_Type, Ret => Cast_Result_20);
--# end
--# expr-done 13598
--# expr-start 13600 '<FieldAccess for create_binop_assoc at nodes.lkt:23932:13>' Fld_13 ada/nodes.lkt:23932
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13599 '<Symbol "<" at nodes.lkt:23932:37>' Sym_8 ada/nodes.lkt:23932
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 13599
Cast_Expr_20 := Local_Self_Type; 
      Cast_Result_21 := Cast_Expr_20;
Cast_Expr_21 := Local_Self_Type; 
      Cast_Result_22 := Cast_Expr_21;
--# property-call-start AdaNode.create_binop_assoc
Fld_13 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_8, Lhs => Cast_Result_21, Rhs => Cast_Result_22, Ret => Local_Bool_Type);
--# end
--# expr-done 13600
--# expr-start 13602 '<FieldAccess for create_binop_assoc at nodes.lkt:23933:13>' Fld_14 ada/nodes.lkt:23933
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13601 '<Symbol "<=" at nodes.lkt:23934:17>' Sym_9 ada/nodes.lkt:23934
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 13601
Cast_Expr_22 := Local_Self_Type; 
      Cast_Result_23 := Cast_Expr_22;
Cast_Expr_23 := Local_Self_Type; 
      Cast_Result_24 := Cast_Expr_23;
--# property-call-start AdaNode.create_binop_assoc
Fld_14 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_9, Lhs => Cast_Result_23, Rhs => Cast_Result_24, Ret => Local_Bool_Type);
--# end
--# expr-done 13602
--# expr-start 13604 '<FieldAccess for create_binop_assoc at nodes.lkt:23939:13>' Fld_15 ada/nodes.lkt:23939
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13603 '<Symbol "=" at nodes.lkt:23939:37>' Sym_10 ada/nodes.lkt:23939
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13603
Cast_Expr_24 := Local_Self_Type; 
      Cast_Result_25 := Cast_Expr_24;
Cast_Expr_25 := Local_Self_Type; 
      Cast_Result_26 := Cast_Expr_25;
--# property-call-start AdaNode.create_binop_assoc
Fld_15 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_10, Lhs => Cast_Result_25, Rhs => Cast_Result_26, Ret => Local_Bool_Type);
--# end
--# expr-done 13604
--# expr-start 13606 '<FieldAccess for create_binop_assoc at nodes.lkt:23940:13>' Fld_16 ada/nodes.lkt:23940
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13605 '<Symbol "/=" at nodes.lkt:23941:17>' Sym_11 ada/nodes.lkt:23941
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13605
Cast_Expr_26 := Local_Self_Type; 
      Cast_Result_27 := Cast_Expr_26;
Cast_Expr_27 := Local_Self_Type; 
      Cast_Result_28 := Cast_Expr_27;
--# property-call-start AdaNode.create_binop_assoc
Fld_16 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_11, Lhs => Cast_Result_27, Rhs => Cast_Result_28, Ret => Local_Bool_Type);
--# end
--# expr-done 13606
--# expr-start 13608 '<FieldAccess for create_binop_assoc at nodes.lkt:23946:13>' Fld_17 ada/nodes.lkt:23946
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13607 '<Symbol ">" at nodes.lkt:23946:37>' Sym_12 ada/nodes.lkt:23946
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 13607
Cast_Expr_28 := Local_Self_Type; 
      Cast_Result_29 := Cast_Expr_28;
Cast_Expr_29 := Local_Self_Type; 
      Cast_Result_30 := Cast_Expr_29;
--# property-call-start AdaNode.create_binop_assoc
Fld_17 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_12, Lhs => Cast_Result_29, Rhs => Cast_Result_30, Ret => Local_Bool_Type);
--# end
--# expr-done 13608
--# expr-start 13610 '<FieldAccess for create_binop_assoc at nodes.lkt:23947:13>' Fld_18 ada/nodes.lkt:23947
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13609 '<Symbol ">=" at nodes.lkt:23948:17>' Sym_13 ada/nodes.lkt:23948
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 13609
Cast_Expr_30 := Local_Self_Type; 
      Cast_Result_31 := Cast_Expr_30;
Cast_Expr_31 := Local_Self_Type; 
      Cast_Result_32 := Cast_Expr_31;
--# property-call-start AdaNode.create_binop_assoc
Fld_18 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_13, Lhs => Cast_Result_31, Rhs => Cast_Result_32, Ret => Local_Bool_Type);
--# end
--# expr-done 13610
--# expr-start 13612 '<FieldAccess for create_unop_assoc at nodes.lkt:23953:13>' Fld_19 ada/nodes.lkt:23953
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13611 '<Symbol "+" at nodes.lkt:23953:36>' Sym_14 ada/nodes.lkt:23953
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13611
Cast_Expr_32 := Local_Self_Type; 
      Cast_Result_33 := Cast_Expr_32;
Cast_Expr_33 := Local_Self_Type; 
      Cast_Result_34 := Cast_Expr_33;
--# property-call-start AdaNode.create_unop_assoc
Fld_19 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_14, Rhs => Cast_Result_33, Ret => Cast_Result_34);
--# end
--# expr-done 13612
--# expr-start 13614 '<FieldAccess for create_unop_assoc at nodes.lkt:23954:13>' Fld_20 ada/nodes.lkt:23954
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13613 '<Symbol "-" at nodes.lkt:23954:36>' Sym_15 ada/nodes.lkt:23954
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13613
Cast_Expr_34 := Local_Self_Type; 
      Cast_Result_35 := Cast_Expr_34;
Cast_Expr_35 := Local_Self_Type; 
      Cast_Result_36 := Cast_Expr_35;
--# property-call-start AdaNode.create_unop_assoc
Fld_20 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_15, Rhs => Cast_Result_35, Ret => Cast_Result_36);
--# end
--# expr-done 13614
--# expr-start 13616 '<FieldAccess for create_unop_assoc at nodes.lkt:23955:13>' Fld_21 ada/nodes.lkt:23955
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13615 '<Symbol "abs" at nodes.lkt:23955:36>' Sym_16 ada/nodes.lkt:23955
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs); 
--# expr-done 13615
Cast_Expr_36 := Local_Self_Type; 
      Cast_Result_37 := Cast_Expr_36;
Cast_Expr_37 := Local_Self_Type; 
      Cast_Result_38 := Cast_Expr_37;
--# property-call-start AdaNode.create_unop_assoc
Fld_21 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_16, Rhs => Cast_Result_37, Ret => Cast_Result_38);
--# end
--# expr-done 13616
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_5, 2 => Fld_6, 3 => Fld_7, 4 => Fld_8, 5 => Fld_9, 6 => Fld_10, 7 => Fld_11, 8 => Fld_12, 9 => Fld_13, 10 => Fld_14, 11 => Fld_15, 12 => Fld_16, 13 => Fld_17, 14 => Fld_18, 15 => Fld_19, 16 => Fld_20, 17 => Fld_21)); 
--# expr-done 13617
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
--# expr-done 13618
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13619
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 13620
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1562;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1562;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Decimal_Fixed_Point_Def_P_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Floating_Point_Def
   --
      procedure Initialize_Fields_For_Floating_Point_Def
        (Self : Bare_Floating_Point_Def
         ; Floating_Point_Def_F_Num_Digits : Bare_Expr
         ; Floating_Point_Def_F_Range : Bare_Range_Spec
        ) is
      begin
            Self.Floating_Point_Def_F_Num_Digits := Floating_Point_Def_F_Num_Digits;
            Self.Floating_Point_Def_F_Range := Floating_Point_Def_F_Range;
      end Initialize_Fields_For_Floating_Point_Def;
   function Floating_Point_Def_F_Num_Digits
     (Node : Bare_Floating_Point_Def) return Bare_Expr
   is
   begin
         return Node.Floating_Point_Def_F_Num_Digits;
   end;
   function Floating_Point_Def_F_Range
     (Node : Bare_Floating_Point_Def) return Bare_Range_Spec
   is
   begin
         return Node.Floating_Point_Def_F_Range;
   end;
--# property-start FloatingPointDef.is_float_type ada/nodes.lkt:23969
pragma Warnings (Off, "is not referenced");
 function Floating_Point_Def_P_Is_Float_Type
  (Node : Bare_Floating_Point_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Floating_Point_Def  := Bare_Floating_Point_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Floating_Point_Def_P_Is_Float_Type;
--# end
--# property-start FloatingPointDef.xref_equation ada/nodes.lkt:23973
pragma Warnings (Off, "is not referenced");
 function Floating_Point_Def_P_Xref_Equation
  (Node : Bare_Floating_Point_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Floating_Point_Def  := Bare_Floating_Point_Def (Node);
     Ent : Internal_Entity_Floating_Point_Def :=
       Internal_Entity_Floating_Point_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1564 with Inline_Always;
            procedure Finalizer_Scope_3613 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Range_Spec;
Fld : Internal_Entity_Expr;
Fld_1 : Logic_Var;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Fld_7 : Internal_Entity_Range_Spec;
Fld_8 : Internal_Entity_Expr;
Fld_9 : Logic_Var;
Fld_10 : Logic_Equation;
Fld_11 : Internal_Entity_Expr;
Fld_12 : Logic_Equation;
And_Pred_2 : Logic_Equation;
Fld_13 : Internal_Entity_Expr;
Fld_14 : Logic_Equation;
And_Pred_3 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred_4 : Logic_Equation;
            procedure Finalizer_Scope_1564 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred_4);
            end Finalizer_Scope_1564;
            procedure Finalizer_Scope_3613 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_12);
                     Dec_Ref (And_Pred_2);
                     Dec_Ref (Fld_14);
                     Dec_Ref (And_Pred_3);
            end Finalizer_Scope_3613;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13640 '<LogicBinaryOp And at nodes.lkt:23976:9>' And_Pred_4 ada/nodes.lkt:23976
--# expr-start 13629 '<LogicBinaryOp And at nodes.lkt:23976:9>' And_Pred_1 ada/nodes.lkt:23976
--# expr-start 13626 '<LogicBinaryOp And at nodes.lkt:23976:9>' And_Pred ada/nodes.lkt:23976
--# expr-start 13623 '<FieldAccess for universal_int_bind at nodes.lkt:23976:9>' Fld_2 ada/nodes.lkt:23976
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13622 '<FieldAccess for expected_type_var at nodes.lkt:23976:33>' Fld_1 ada/nodes.lkt:23976
--# expr-start 13621 '<FieldAccess for num_digits at nodes.lkt:23976:33>' Fld ada/nodes.lkt:23976
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Floating_Point_Def_F_Num_Digits, Info => Ent.Info);
--# expr-done 13621
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld.Node);
--# expr-done 13622
--# property-call-start AdaNode.universal_int_bind
Fld_2 := Libadalang.Implementation.Ada_Node_P_Universal_Int_Bind (Node => Ent.Node, Type_Var => Fld_1, Origin => Origin);
--# end
--# expr-done 13623
--# expr-start 13625 '<FieldAccess for sub_equation at nodes.lkt:23977:14>' Fld_4 ada/nodes.lkt:23977
--# expr-start 13624 '<FieldAccess for num_digits at nodes.lkt:23977:14>' Fld_3 ada/nodes.lkt:23977
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Floating_Point_Def_F_Num_Digits, Info => Ent.Info);
--# expr-done 13624
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 13625
And_Pred := Create_And (Fld_2, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23976:9") else null)); 
--# expr-done 13626
--# expr-start 13628 '<FieldAccess for matches_expected_type at nodes.lkt:23978:14>' Fld_6 ada/nodes.lkt:23978
--# expr-start 13627 '<FieldAccess for num_digits at nodes.lkt:23978:14>' Fld_5 ada/nodes.lkt:23978
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Floating_Point_Def_F_Num_Digits, Info => Ent.Info);
--# expr-done 13627
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 13628
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23976:9") else null)); 
--# expr-done 13629
--# expr-start 13630 '<FieldAccess for range at nodes.lkt:23981:14>' Fld_7 ada/nodes.lkt:23981
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Floating_Point_Def_F_Range, Info => Ent.Info);
--# expr-done 13630
Var_Expr_0 := Fld_7;
if Var_Expr_0 /= No_Entity_Range_Spec then
   --# scope-start
   --# bind r Var_Expr_0
--# expr-start 13639 '<LogicBinaryOp And at nodes.lkt:23983:13>' And_Pred_3 ada/nodes.lkt:23983
--# expr-start 13636 '<LogicBinaryOp And at nodes.lkt:23983:13>' And_Pred_2 ada/nodes.lkt:23983
--# expr-start 13633 '<FieldAccess for universal_real_bind at nodes.lkt:23983:13>' Fld_10 ada/nodes.lkt:23983
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13632 '<FieldAccess for expected_type_var at nodes.lkt:23983:38>' Fld_9 ada/nodes.lkt:23983
--# expr-start 13631 '<FieldAccess for range at nodes.lkt:23983:38>' Fld_8 ada/nodes.lkt:23983
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Expr (Node => Var_Expr_0.Node.Range_Spec_F_Range, Info => Var_Expr_0.Info);
--# expr-done 13631
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld_8.Node);
--# expr-done 13632
--# property-call-start AdaNode.universal_real_bind
Fld_10 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Bind (Node => Ent.Node, Type_Var => Fld_9, Origin => Origin);
--# end
--# expr-done 13633
--# expr-start 13635 '<FieldAccess for sub_equation at nodes.lkt:23984:18>' Fld_12 ada/nodes.lkt:23984
--# expr-start 13634 '<FieldAccess for range at nodes.lkt:23984:18>' Fld_11 ada/nodes.lkt:23984
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Expr (Node => Var_Expr_0.Node.Range_Spec_F_Range, Info => Var_Expr_0.Info);
--# expr-done 13634
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_12 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_11.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_11.Info);
--# end
--# expr-done 13635
And_Pred_2 := Create_And (Fld_10, Fld_12, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23983:13") else null)); 
--# expr-done 13636
--# expr-start 13638 '<FieldAccess for matches_expected_type at nodes.lkt:23985:18>' Fld_14 ada/nodes.lkt:23985
--# expr-start 13637 '<FieldAccess for range at nodes.lkt:23985:18>' Fld_13 ada/nodes.lkt:23985
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_13 := Create_Internal_Entity_Expr (Node => Var_Expr_0.Node.Range_Spec_F_Range, Info => Var_Expr_0.Info);
--# expr-done 13637
      if Fld_13.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_14 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_13.Node, Origin => Origin);
--# end
--# expr-done 13638
And_Pred_3 := Create_And (And_Pred_2, Fld_14, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23983:13") else null)); 
--# expr-done 13639
Scope_Result := And_Pred_3;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3613;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23986:25") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred_4 := Create_And (And_Pred_1, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:23976:9") else null)); 
--# expr-done 13640
         Property_Result := And_Pred_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1564;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1564;
                     Finalizer_Scope_3613;
            raise;
      end;
   return Property_Result;
end Floating_Point_Def_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Ordinary_Fixed_Point_Def
   --
      procedure Initialize_Fields_For_Ordinary_Fixed_Point_Def
        (Self : Bare_Ordinary_Fixed_Point_Def
         ; Ordinary_Fixed_Point_Def_F_Delta : Bare_Expr
         ; Ordinary_Fixed_Point_Def_F_Range : Bare_Range_Spec
        ) is
      begin
            Self.Ordinary_Fixed_Point_Def_F_Delta := Ordinary_Fixed_Point_Def_F_Delta;
            Self.Ordinary_Fixed_Point_Def_F_Range := Ordinary_Fixed_Point_Def_F_Range;
      end Initialize_Fields_For_Ordinary_Fixed_Point_Def;
   function Ordinary_Fixed_Point_Def_F_Delta
     (Node : Bare_Ordinary_Fixed_Point_Def) return Bare_Expr
   is
   begin
         return Node.Ordinary_Fixed_Point_Def_F_Delta;
   end;
   function Ordinary_Fixed_Point_Def_F_Range
     (Node : Bare_Ordinary_Fixed_Point_Def) return Bare_Range_Spec
   is
   begin
         return Node.Ordinary_Fixed_Point_Def_F_Range;
   end;
--# property-start OrdinaryFixedPointDef.is_fixed_point ada/nodes.lkt:23999
pragma Warnings (Off, "is not referenced");
 function Ordinary_Fixed_Point_Def_P_Is_Fixed_Point
  (Node : Bare_Ordinary_Fixed_Point_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Ordinary_Fixed_Point_Def  := Bare_Ordinary_Fixed_Point_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ordinary_Fixed_Point_Def_P_Is_Fixed_Point;
--# end
--# property-start OrdinaryFixedPointDef.xref_equation ada/nodes.lkt:24003
pragma Warnings (Off, "is not referenced");
 function Ordinary_Fixed_Point_Def_P_Xref_Equation
  (Node : Bare_Ordinary_Fixed_Point_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Ordinary_Fixed_Point_Def  := Bare_Ordinary_Fixed_Point_Def (Node);
     Ent : Internal_Entity_Ordinary_Fixed_Point_Def :=
       Internal_Entity_Ordinary_Fixed_Point_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1566 with Inline_Always;
      Fld : Internal_Entity_Expr;
Fld_1 : Logic_Var;
Fld_2 : Logic_Equation;
Fld_3 : Internal_Entity_Expr;
Fld_4 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_5 : Internal_Entity_Expr;
Fld_6 : Logic_Equation;
And_Pred_1 : Logic_Equation;
True_Rel : Logic_Equation;
Fld_7 : Internal_Entity_Range_Spec;
Fld_8 : Logic_Equation;
Fld_9 : Bare_Range_Spec;
Is_Null : Boolean;
If_Result : Logic_Equation;
And_Pred_2 : Logic_Equation;
            procedure Finalizer_Scope_1566 is
            begin
                     Dec_Ref (Fld_2);
                     Dec_Ref (Fld_4);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_6);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Fld_8);
                     Dec_Ref (If_Result);
                     Dec_Ref (And_Pred_2);
            end Finalizer_Scope_1566;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13655 '<LogicBinaryOp And at nodes.lkt:24006:9>' And_Pred_2 ada/nodes.lkt:24006
--# expr-start 13649 '<LogicBinaryOp And at nodes.lkt:24006:9>' And_Pred_1 ada/nodes.lkt:24006
--# expr-start 13646 '<LogicBinaryOp And at nodes.lkt:24006:9>' And_Pred ada/nodes.lkt:24006
--# expr-start 13643 '<FieldAccess for universal_real_bind at nodes.lkt:24006:9>' Fld_2 ada/nodes.lkt:24006
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13642 '<FieldAccess for expected_type_var at nodes.lkt:24006:34>' Fld_1 ada/nodes.lkt:24006
--# expr-start 13641 '<FieldAccess for delta at nodes.lkt:24006:34>' Fld ada/nodes.lkt:24006
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Expr (Node => Ent.Node.Ordinary_Fixed_Point_Def_F_Delta, Info => Ent.Info);
--# expr-done 13641
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Fld.Node);
--# expr-done 13642
--# property-call-start AdaNode.universal_real_bind
Fld_2 := Libadalang.Implementation.Ada_Node_P_Universal_Real_Bind (Node => Ent.Node, Type_Var => Fld_1, Origin => Origin);
--# end
--# expr-done 13643
--# expr-start 13645 '<FieldAccess for sub_equation at nodes.lkt:24007:14>' Fld_4 ada/nodes.lkt:24007
--# expr-start 13644 '<FieldAccess for delta at nodes.lkt:24007:14>' Fld_3 ada/nodes.lkt:24007
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Expr (Node => Ent.Node.Ordinary_Fixed_Point_Def_F_Delta, Info => Ent.Info);
--# expr-done 13644
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_4 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_3.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_3.Info);
--# end
--# expr-done 13645
And_Pred := Create_And (Fld_2, Fld_4, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24006:9") else null)); 
--# expr-done 13646
--# expr-start 13648 '<FieldAccess for matches_expected_type at nodes.lkt:24008:14>' Fld_6 ada/nodes.lkt:24008
--# expr-start 13647 '<FieldAccess for delta at nodes.lkt:24008:14>' Fld_5 ada/nodes.lkt:24008
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Expr (Node => Ent.Node.Ordinary_Fixed_Point_Def_F_Delta, Info => Ent.Info);
--# expr-done 13647
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_6 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Fld_5.Node, Origin => Origin);
--# end
--# expr-done 13648
And_Pred_1 := Create_And (And_Pred, Fld_6, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24006:9") else null)); 
--# expr-done 13649
--# expr-start 13654 '<If at nodes.lkt:24009:15>' If_Result ada/nodes.lkt:24009
--# expr-start 13651 '<IsNull at nodes.lkt:24009:18>' Is_Null ada/nodes.lkt:24009
--# expr-start 13650 '<FieldAccess for range at nodes.lkt:24009:18>' Fld_9 ada/nodes.lkt:24009
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Self.Ordinary_Fixed_Point_Def_F_Range;
--# expr-done 13650
Is_Null := Fld_9 = null; 
--# expr-done 13651
if Is_Null then
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24009:42") else null)); 
   If_Result := True_Rel;
else
   --# expr-start 13653 '<FieldAccess for sub_equation at nodes.lkt:24009:53>' Fld_8 ada/nodes.lkt:24009
--# expr-start 13652 '<FieldAccess for range at nodes.lkt:24009:53>' Fld_7 ada/nodes.lkt:24009
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Ordinary_Fixed_Point_Def_F_Range, Info => Ent.Info);
--# expr-done 13652
      if Fld_7.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_8 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld_7.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld_7.Info);
--# end
--# expr-done 13653
   If_Result := Fld_8;
end if;
      Inc_Ref (If_Result);
--# expr-done 13654
And_Pred_2 := Create_And (And_Pred_1, If_Result, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24006:9") else null)); 
--# expr-done 13655
         Property_Result := And_Pred_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1566;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1566;
            raise;
      end;
   return Property_Result;
end Ordinary_Fixed_Point_Def_P_Xref_Equation;
--# end
--# property-start OrdinaryFixedPointDef.predefined_operators ada/nodes.lkt:24012
pragma Warnings (Off, "is not referenced");
 function Ordinary_Fixed_Point_Def_P_Predefined_Operators
  (Node : Bare_Ordinary_Fixed_Point_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Ordinary_Fixed_Point_Def  := Bare_Ordinary_Fixed_Point_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1567 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Local_Int_Type : Bare_Base_Type_Decl;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Fld_5 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Cast_Expr_4 : Bare_Type_Decl;
Cast_Result_5 : Bare_Base_Type_Decl;
Cast_Expr_5 : Bare_Type_Decl;
Cast_Result_6 : Bare_Base_Type_Decl;
Fld_6 : Internal_Env_Assoc := No_Env_Assoc;
Sym_2 : Symbol_Type;
Cast_Expr_6 : Bare_Type_Decl;
Cast_Result_7 : Bare_Base_Type_Decl;
Cast_Expr_7 : Bare_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Cast_Expr_8 : Bare_Type_Decl;
Cast_Result_9 : Bare_Base_Type_Decl;
Fld_7 : Internal_Env_Assoc := No_Env_Assoc;
Sym_3 : Symbol_Type;
Cast_Expr_9 : Bare_Type_Decl;
Cast_Result_10 : Bare_Base_Type_Decl;
Cast_Expr_10 : Bare_Type_Decl;
Cast_Result_11 : Bare_Base_Type_Decl;
Cast_Expr_11 : Bare_Type_Decl;
Cast_Result_12 : Bare_Base_Type_Decl;
Fld_8 : Internal_Env_Assoc := No_Env_Assoc;
Sym_4 : Symbol_Type;
Cast_Expr_12 : Bare_Type_Decl;
Cast_Result_13 : Bare_Base_Type_Decl;
Cast_Expr_13 : Bare_Type_Decl;
Cast_Result_14 : Bare_Base_Type_Decl;
Fld_9 : Internal_Env_Assoc := No_Env_Assoc;
Sym_5 : Symbol_Type;
Cast_Expr_14 : Bare_Type_Decl;
Cast_Result_15 : Bare_Base_Type_Decl;
Cast_Expr_15 : Bare_Type_Decl;
Cast_Result_16 : Bare_Base_Type_Decl;
Fld_10 : Internal_Env_Assoc := No_Env_Assoc;
Sym_6 : Symbol_Type;
Cast_Expr_16 : Bare_Type_Decl;
Cast_Result_17 : Bare_Base_Type_Decl;
Cast_Expr_17 : Bare_Type_Decl;
Cast_Result_18 : Bare_Base_Type_Decl;
Fld_11 : Internal_Env_Assoc := No_Env_Assoc;
Sym_7 : Symbol_Type;
Cast_Expr_18 : Bare_Type_Decl;
Cast_Result_19 : Bare_Base_Type_Decl;
Cast_Expr_19 : Bare_Type_Decl;
Cast_Result_20 : Bare_Base_Type_Decl;
Fld_12 : Internal_Env_Assoc := No_Env_Assoc;
Sym_8 : Symbol_Type;
Cast_Expr_20 : Bare_Type_Decl;
Cast_Result_21 : Bare_Base_Type_Decl;
Cast_Expr_21 : Bare_Type_Decl;
Cast_Result_22 : Bare_Base_Type_Decl;
Fld_13 : Internal_Env_Assoc := No_Env_Assoc;
Sym_9 : Symbol_Type;
Cast_Expr_22 : Bare_Type_Decl;
Cast_Result_23 : Bare_Base_Type_Decl;
Cast_Expr_23 : Bare_Type_Decl;
Cast_Result_24 : Bare_Base_Type_Decl;
Fld_14 : Internal_Env_Assoc := No_Env_Assoc;
Sym_10 : Symbol_Type;
Cast_Expr_24 : Bare_Type_Decl;
Cast_Result_25 : Bare_Base_Type_Decl;
Cast_Expr_25 : Bare_Type_Decl;
Cast_Result_26 : Bare_Base_Type_Decl;
Fld_15 : Internal_Env_Assoc := No_Env_Assoc;
Sym_11 : Symbol_Type;
Cast_Expr_26 : Bare_Type_Decl;
Cast_Result_27 : Bare_Base_Type_Decl;
Cast_Expr_27 : Bare_Type_Decl;
Cast_Result_28 : Bare_Base_Type_Decl;
Fld_16 : Internal_Env_Assoc := No_Env_Assoc;
Sym_12 : Symbol_Type;
Cast_Expr_28 : Bare_Type_Decl;
Cast_Result_29 : Bare_Base_Type_Decl;
Cast_Expr_29 : Bare_Type_Decl;
Cast_Result_30 : Bare_Base_Type_Decl;
Fld_17 : Internal_Env_Assoc := No_Env_Assoc;
Sym_13 : Symbol_Type;
Cast_Expr_30 : Bare_Type_Decl;
Cast_Result_31 : Bare_Base_Type_Decl;
Cast_Expr_31 : Bare_Type_Decl;
Cast_Result_32 : Bare_Base_Type_Decl;
Fld_18 : Internal_Env_Assoc := No_Env_Assoc;
Sym_14 : Symbol_Type;
Cast_Expr_32 : Bare_Type_Decl;
Cast_Result_33 : Bare_Base_Type_Decl;
Cast_Expr_33 : Bare_Type_Decl;
Cast_Result_34 : Bare_Base_Type_Decl;
Fld_19 : Internal_Env_Assoc := No_Env_Assoc;
Sym_15 : Symbol_Type;
Cast_Expr_34 : Bare_Type_Decl;
Cast_Result_35 : Bare_Base_Type_Decl;
Cast_Expr_35 : Bare_Type_Decl;
Cast_Result_36 : Bare_Base_Type_Decl;
Fld_20 : Internal_Env_Assoc := No_Env_Assoc;
Sym_16 : Symbol_Type;
Cast_Expr_36 : Bare_Type_Decl;
Cast_Result_37 : Bare_Base_Type_Decl;
Cast_Expr_37 : Bare_Type_Decl;
Cast_Result_38 : Bare_Base_Type_Decl;
Fld_21 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1567 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (Fld_18);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Fld_20);
                     Dec_Ref (Fld_21);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
            end Finalizer_Scope_1567;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Ordinary_Fixed_Point_Def_Ordinary_Fixed_Point_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Ordinary_Fixed_Point_Def,
                                As_Bare_Ordinary_Fixed_Point_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13699 '<Let at nodes.lkt:24013:9>' Let_Result_2 ada/nodes.lkt:24013
--# scope-start
--# expr-start 13657 '<Cast to TypeDecl at nodes.lkt:24013:25>' Cast_Result ada/nodes.lkt:24013
--# expr-start 13656 '<parent at nodes.lkt:24013:25>' Fld ada/nodes.lkt:24013
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13656
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13657
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13698 '<Let at nodes.lkt:24014:9>' Let_Result_1 ada/nodes.lkt:24014
--# scope-start
--# expr-start 13659 '<FieldAccess for node at nodes.lkt:24014:25>' Fld_2 ada/nodes.lkt:24014
--# expr-start 13658 '<FieldAccess for bool_type at nodes.lkt:24014:25>' Fld_1 ada/nodes.lkt:24014
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13658
Fld_2 := Fld_1.Node;
--# expr-done 13659
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13697 '<Let at nodes.lkt:24015:9>' Let_Result ada/nodes.lkt:24015
--# scope-start
--# expr-start 13661 '<FieldAccess for node at nodes.lkt:24015:24>' Fld_4 ada/nodes.lkt:24015
--# expr-start 13660 '<FieldAccess for int_type at nodes.lkt:24015:24>' Fld_3 ada/nodes.lkt:24015
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 13660
Fld_4 := Fld_3.Node;
--# expr-done 13661
Local_Int_Type := Fld_4; 
--# bind int_type Local_Int_Type
--# expr-start 13696 '<ArrayLiteral at nodes.lkt:24017:9>' Array_Lit ada/nodes.lkt:24017
--# expr-start 13663 '<FieldAccess for create_binop_assoc at nodes.lkt:24018:13>' Fld_5 ada/nodes.lkt:24018
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13662 '<Symbol "+" at nodes.lkt:24018:37>' Sym ada/nodes.lkt:24018
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13662
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
--# property-call-start AdaNode.create_binop_assoc
Fld_5 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Cast_Result_3);
--# end
--# expr-done 13663
--# expr-start 13665 '<FieldAccess for create_binop_assoc at nodes.lkt:24019:13>' Fld_6 ada/nodes.lkt:24019
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13664 '<Symbol "-" at nodes.lkt:24019:37>' Sym_1 ada/nodes.lkt:24019
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13664
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
Cast_Expr_4 := Local_Self_Type; 
      Cast_Result_5 := Cast_Expr_4;
Cast_Expr_5 := Local_Self_Type; 
      Cast_Result_6 := Cast_Expr_5;
--# property-call-start AdaNode.create_binop_assoc
Fld_6 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_4, Rhs => Cast_Result_5, Ret => Cast_Result_6);
--# end
--# expr-done 13665
--# expr-start 13667 '<FieldAccess for create_binop_assoc at nodes.lkt:24020:13>' Fld_7 ada/nodes.lkt:24020
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13666 '<Symbol "*" at nodes.lkt:24020:37>' Sym_2 ada/nodes.lkt:24020
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13666
Cast_Expr_6 := Local_Self_Type; 
      Cast_Result_7 := Cast_Expr_6;
Cast_Expr_7 := Local_Self_Type; 
      Cast_Result_8 := Cast_Expr_7;
Cast_Expr_8 := Local_Self_Type; 
      Cast_Result_9 := Cast_Expr_8;
--# property-call-start AdaNode.create_binop_assoc
Fld_7 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_2, Lhs => Cast_Result_7, Rhs => Cast_Result_8, Ret => Cast_Result_9);
--# end
--# expr-done 13667
--# expr-start 13669 '<FieldAccess for create_binop_assoc at nodes.lkt:24021:13>' Fld_8 ada/nodes.lkt:24021
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13668 '<Symbol "/" at nodes.lkt:24021:37>' Sym_3 ada/nodes.lkt:24021
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13668
Cast_Expr_9 := Local_Self_Type; 
      Cast_Result_10 := Cast_Expr_9;
Cast_Expr_10 := Local_Self_Type; 
      Cast_Result_11 := Cast_Expr_10;
Cast_Expr_11 := Local_Self_Type; 
      Cast_Result_12 := Cast_Expr_11;
--# property-call-start AdaNode.create_binop_assoc
Fld_8 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_3, Lhs => Cast_Result_10, Rhs => Cast_Result_11, Ret => Cast_Result_12);
--# end
--# expr-done 13669
--# expr-start 13671 '<FieldAccess for create_binop_assoc at nodes.lkt:24022:13>' Fld_9 ada/nodes.lkt:24022
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13670 '<Symbol "*" at nodes.lkt:24022:37>' Sym_4 ada/nodes.lkt:24022
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13670
Cast_Expr_12 := Local_Self_Type; 
      Cast_Result_13 := Cast_Expr_12;
Cast_Expr_13 := Local_Self_Type; 
      Cast_Result_14 := Cast_Expr_13;
--# property-call-start AdaNode.create_binop_assoc
Fld_9 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_4, Lhs => Local_Int_Type, Rhs => Cast_Result_13, Ret => Cast_Result_14);
--# end
--# expr-done 13671
--# expr-start 13673 '<FieldAccess for create_binop_assoc at nodes.lkt:24023:13>' Fld_10 ada/nodes.lkt:24023
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13672 '<Symbol "*" at nodes.lkt:24023:37>' Sym_5 ada/nodes.lkt:24023
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13672
Cast_Expr_14 := Local_Self_Type; 
      Cast_Result_15 := Cast_Expr_14;
Cast_Expr_15 := Local_Self_Type; 
      Cast_Result_16 := Cast_Expr_15;
--# property-call-start AdaNode.create_binop_assoc
Fld_10 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_5, Lhs => Cast_Result_15, Rhs => Local_Int_Type, Ret => Cast_Result_16);
--# end
--# expr-done 13673
--# expr-start 13675 '<FieldAccess for create_binop_assoc at nodes.lkt:24024:13>' Fld_11 ada/nodes.lkt:24024
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13674 '<Symbol "/" at nodes.lkt:24024:37>' Sym_6 ada/nodes.lkt:24024
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13674
Cast_Expr_16 := Local_Self_Type; 
      Cast_Result_17 := Cast_Expr_16;
Cast_Expr_17 := Local_Self_Type; 
      Cast_Result_18 := Cast_Expr_17;
--# property-call-start AdaNode.create_binop_assoc
Fld_11 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_6, Lhs => Cast_Result_17, Rhs => Local_Int_Type, Ret => Cast_Result_18);
--# end
--# expr-done 13675
--# expr-start 13677 '<FieldAccess for create_binop_assoc at nodes.lkt:24025:13>' Fld_12 ada/nodes.lkt:24025
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13676 '<Symbol "**" at nodes.lkt:24025:37>' Sym_7 ada/nodes.lkt:24025
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_3); 
--# expr-done 13676
Cast_Expr_18 := Local_Self_Type; 
      Cast_Result_19 := Cast_Expr_18;
Cast_Expr_19 := Local_Self_Type; 
      Cast_Result_20 := Cast_Expr_19;
--# property-call-start AdaNode.create_binop_assoc
Fld_12 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_7, Lhs => Cast_Result_19, Rhs => Local_Int_Type, Ret => Cast_Result_20);
--# end
--# expr-done 13677
--# expr-start 13679 '<FieldAccess for create_binop_assoc at nodes.lkt:24026:13>' Fld_13 ada/nodes.lkt:24026
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13678 '<Symbol "<" at nodes.lkt:24026:37>' Sym_8 ada/nodes.lkt:24026
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 13678
Cast_Expr_20 := Local_Self_Type; 
      Cast_Result_21 := Cast_Expr_20;
Cast_Expr_21 := Local_Self_Type; 
      Cast_Result_22 := Cast_Expr_21;
--# property-call-start AdaNode.create_binop_assoc
Fld_13 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_8, Lhs => Cast_Result_21, Rhs => Cast_Result_22, Ret => Local_Bool_Type);
--# end
--# expr-done 13679
--# expr-start 13681 '<FieldAccess for create_binop_assoc at nodes.lkt:24027:13>' Fld_14 ada/nodes.lkt:24027
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13680 '<Symbol "<=" at nodes.lkt:24028:17>' Sym_9 ada/nodes.lkt:24028
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 13680
Cast_Expr_22 := Local_Self_Type; 
      Cast_Result_23 := Cast_Expr_22;
Cast_Expr_23 := Local_Self_Type; 
      Cast_Result_24 := Cast_Expr_23;
--# property-call-start AdaNode.create_binop_assoc
Fld_14 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_9, Lhs => Cast_Result_23, Rhs => Cast_Result_24, Ret => Local_Bool_Type);
--# end
--# expr-done 13681
--# expr-start 13683 '<FieldAccess for create_binop_assoc at nodes.lkt:24033:13>' Fld_15 ada/nodes.lkt:24033
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13682 '<Symbol "=" at nodes.lkt:24033:37>' Sym_10 ada/nodes.lkt:24033
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13682
Cast_Expr_24 := Local_Self_Type; 
      Cast_Result_25 := Cast_Expr_24;
Cast_Expr_25 := Local_Self_Type; 
      Cast_Result_26 := Cast_Expr_25;
--# property-call-start AdaNode.create_binop_assoc
Fld_15 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_10, Lhs => Cast_Result_25, Rhs => Cast_Result_26, Ret => Local_Bool_Type);
--# end
--# expr-done 13683
--# expr-start 13685 '<FieldAccess for create_binop_assoc at nodes.lkt:24034:13>' Fld_16 ada/nodes.lkt:24034
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13684 '<Symbol "/=" at nodes.lkt:24035:17>' Sym_11 ada/nodes.lkt:24035
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13684
Cast_Expr_26 := Local_Self_Type; 
      Cast_Result_27 := Cast_Expr_26;
Cast_Expr_27 := Local_Self_Type; 
      Cast_Result_28 := Cast_Expr_27;
--# property-call-start AdaNode.create_binop_assoc
Fld_16 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_11, Lhs => Cast_Result_27, Rhs => Cast_Result_28, Ret => Local_Bool_Type);
--# end
--# expr-done 13685
--# expr-start 13687 '<FieldAccess for create_binop_assoc at nodes.lkt:24040:13>' Fld_17 ada/nodes.lkt:24040
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13686 '<Symbol ">" at nodes.lkt:24040:37>' Sym_12 ada/nodes.lkt:24040
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 13686
Cast_Expr_28 := Local_Self_Type; 
      Cast_Result_29 := Cast_Expr_28;
Cast_Expr_29 := Local_Self_Type; 
      Cast_Result_30 := Cast_Expr_29;
--# property-call-start AdaNode.create_binop_assoc
Fld_17 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_12, Lhs => Cast_Result_29, Rhs => Cast_Result_30, Ret => Local_Bool_Type);
--# end
--# expr-done 13687
--# expr-start 13689 '<FieldAccess for create_binop_assoc at nodes.lkt:24041:13>' Fld_18 ada/nodes.lkt:24041
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13688 '<Symbol ">=" at nodes.lkt:24042:17>' Sym_13 ada/nodes.lkt:24042
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 13688
Cast_Expr_30 := Local_Self_Type; 
      Cast_Result_31 := Cast_Expr_30;
Cast_Expr_31 := Local_Self_Type; 
      Cast_Result_32 := Cast_Expr_31;
--# property-call-start AdaNode.create_binop_assoc
Fld_18 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_13, Lhs => Cast_Result_31, Rhs => Cast_Result_32, Ret => Local_Bool_Type);
--# end
--# expr-done 13689
--# expr-start 13691 '<FieldAccess for create_unop_assoc at nodes.lkt:24047:13>' Fld_19 ada/nodes.lkt:24047
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13690 '<Symbol "+" at nodes.lkt:24047:36>' Sym_14 ada/nodes.lkt:24047
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13690
Cast_Expr_32 := Local_Self_Type; 
      Cast_Result_33 := Cast_Expr_32;
Cast_Expr_33 := Local_Self_Type; 
      Cast_Result_34 := Cast_Expr_33;
--# property-call-start AdaNode.create_unop_assoc
Fld_19 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_14, Rhs => Cast_Result_33, Ret => Cast_Result_34);
--# end
--# expr-done 13691
--# expr-start 13693 '<FieldAccess for create_unop_assoc at nodes.lkt:24048:13>' Fld_20 ada/nodes.lkt:24048
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13692 '<Symbol "-" at nodes.lkt:24048:36>' Sym_15 ada/nodes.lkt:24048
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13692
Cast_Expr_34 := Local_Self_Type; 
      Cast_Result_35 := Cast_Expr_34;
Cast_Expr_35 := Local_Self_Type; 
      Cast_Result_36 := Cast_Expr_35;
--# property-call-start AdaNode.create_unop_assoc
Fld_20 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_15, Rhs => Cast_Result_35, Ret => Cast_Result_36);
--# end
--# expr-done 13693
--# expr-start 13695 '<FieldAccess for create_unop_assoc at nodes.lkt:24049:13>' Fld_21 ada/nodes.lkt:24049
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13694 '<Symbol "abs" at nodes.lkt:24049:36>' Sym_16 ada/nodes.lkt:24049
Sym_16 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs); 
--# expr-done 13694
Cast_Expr_36 := Local_Self_Type; 
      Cast_Result_37 := Cast_Expr_36;
Cast_Expr_37 := Local_Self_Type; 
      Cast_Result_38 := Cast_Expr_37;
--# property-call-start AdaNode.create_unop_assoc
Fld_21 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_16, Rhs => Cast_Result_37, Ret => Cast_Result_38);
--# end
--# expr-done 13695
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_5, 2 => Fld_6, 3 => Fld_7, 4 => Fld_8, 5 => Fld_9, 6 => Fld_10, 7 => Fld_11, 8 => Fld_12, 9 => Fld_13, 10 => Fld_14, 11 => Fld_15, 12 => Fld_16, 13 => Fld_17, 14 => Fld_18, 15 => Fld_19, 16 => Fld_20, 17 => Fld_21)); 
--# expr-done 13696
Let_Result := Array_Lit; Inc_Ref (Let_Result);
--# end
--# expr-done 13697
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13698
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 13699
         Property_Result := Let_Result_2;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1567;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1567;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Ordinary_Fixed_Point_Def_P_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Record_Type_Def
   --
      procedure Initialize_Fields_For_Record_Type_Def
        (Self : Bare_Record_Type_Def
         ; Record_Type_Def_F_Has_Abstract : Bare_Abstract_Node
         ; Record_Type_Def_F_Has_Tagged : Bare_Tagged_Node
         ; Record_Type_Def_F_Has_Limited : Bare_Limited_Node
         ; Record_Type_Def_F_Record_Def : Bare_Base_Record_Def
        ) is
      begin
            Self.Record_Type_Def_F_Has_Abstract := Record_Type_Def_F_Has_Abstract;
            Self.Record_Type_Def_F_Has_Tagged := Record_Type_Def_F_Has_Tagged;
            Self.Record_Type_Def_F_Has_Limited := Record_Type_Def_F_Has_Limited;
            Self.Record_Type_Def_F_Record_Def := Record_Type_Def_F_Record_Def;
      end Initialize_Fields_For_Record_Type_Def;
   function Record_Type_Def_F_Has_Abstract
     (Node : Bare_Record_Type_Def) return Bare_Abstract_Node
   is
   begin
         return Node.Record_Type_Def_F_Has_Abstract;
   end;
   function Record_Type_Def_F_Has_Tagged
     (Node : Bare_Record_Type_Def) return Bare_Tagged_Node
   is
   begin
         return Node.Record_Type_Def_F_Has_Tagged;
   end;
   function Record_Type_Def_F_Has_Limited
     (Node : Bare_Record_Type_Def) return Bare_Limited_Node
   is
   begin
         return Node.Record_Type_Def_F_Has_Limited;
   end;
   function Record_Type_Def_F_Record_Def
     (Node : Bare_Record_Type_Def) return Bare_Base_Record_Def
   is
   begin
         return Node.Record_Type_Def_F_Record_Def;
   end;
--# property-start RecordTypeDef.is_tagged_type ada/nodes.lkt:24066
pragma Warnings (Off, "is not referenced");
 function Record_Type_Def_P_Is_Tagged_Type
  (Node : Bare_Record_Type_Def
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Record_Type_Def  := Bare_Record_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
      Fld : Bare_Tagged_Node;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13701 '<FieldAccess for as_bool at nodes.lkt:24066:34>' Fld_1 ada/nodes.lkt:24066
--# expr-start 13700 '<FieldAccess for has_tagged at nodes.lkt:24066:34>' Fld ada/nodes.lkt:24066
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Record_Type_Def_F_Has_Tagged;
--# expr-done 13700
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Tagged.as_bool'
Fld_1 := Libadalang.Implementation.Dispatcher_Tagged_Node_P_As_Bool (Node => Fld);
--# end
--# expr-done 13701
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Record_Type_Def_P_Is_Tagged_Type;
--# end
--# property-start RecordTypeDef.is_limited_type ada/nodes.lkt:24068
pragma Warnings (Off, "is not referenced");
 function Record_Type_Def_P_Is_Limited_Type
  (Node : Bare_Record_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Record_Type_Def  := Bare_Record_Type_Def (Node);
     Ent : Internal_Entity_Record_Type_Def :=
       Internal_Entity_Record_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Bare_Limited_Node;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Base_Record_Def;
Fld_3 : Internal_Entity_Component_List;
Fld_4 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13707 '<BooleanBinaryOp Or at nodes.lkt:24069:9>' If_Result ada/nodes.lkt:24069
--# expr-start 13703 '<FieldAccess for as_bool at nodes.lkt:24069:9>' Fld_1 ada/nodes.lkt:24069
--# expr-start 13702 '<FieldAccess for has_limited at nodes.lkt:24069:9>' Fld ada/nodes.lkt:24069
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Record_Type_Def_F_Has_Limited;
--# expr-done 13702
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Limited.as_bool'
Fld_1 := Libadalang.Implementation.Dispatcher_Limited_Node_P_As_Bool (Node => Fld);
--# end
--# expr-done 13703
if Fld_1 then
   If_Result := True;
else
   --# expr-start 13706 '<FieldAccess for has_limited_component at nodes.lkt:24070:12>' Fld_4 ada/nodes.lkt:24070
--# expr-start 13705 '<FieldAccess for comps at nodes.lkt:24070:12>' Fld_3 ada/nodes.lkt:24070
--# expr-start 13704 '<FieldAccess for record_def at nodes.lkt:24070:12>' Fld_2 ada/nodes.lkt:24070
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Base_Record_Def (Node => Ent.Node.Record_Type_Def_F_Record_Def, Info => Ent.Info);
--# expr-done 13704
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseRecordDef.comps
Fld_3 := Libadalang.Implementation.Base_Record_Def_P_Comps (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 13705
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.has_limited_component
Fld_4 := Libadalang.Implementation.Component_List_P_Has_Limited_Component (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# end
--# expr-done 13706
   If_Result := Fld_4;
end if;
--# expr-done 13707
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Record_Type_Def_P_Is_Limited_Type;
--# end
--# property-start RecordTypeDef.xref_equation ada/nodes.lkt:24073
pragma Warnings (Off, "is not referenced");
 function Record_Type_Def_P_Xref_Equation
  (Node : Bare_Record_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Record_Type_Def  := Bare_Record_Type_Def (Node);
      --# bind self Self
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1570 with Inline_Always;
      True_Rel : Logic_Equation;
            procedure Finalizer_Scope_1570 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_1570;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24073:37") else null)); 
         Property_Result := True_Rel;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1570;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1570;
            raise;
      end;
   return Property_Result;
end Record_Type_Def_P_Xref_Equation;
--# end
--# property-start RecordTypeDef.predefined_operators ada/nodes.lkt:24076
pragma Warnings (Off, "is not referenced");
 function Record_Type_Def_P_Predefined_Operators
  (Node : Bare_Record_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Record_Type_Def  := Bare_Record_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1571 with Inline_Always;
      Fld : Internal_Env_Assoc_Array_Access;
Fld_1 : Bare_Limited_Node;
Fld_2 : Boolean;
If_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1571 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_1571;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Record_Type_Def_Record_Type_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Record_Type_Def,
                                As_Bare_Record_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13711 '<If at nodes.lkt:24077:9>' If_Result ada/nodes.lkt:24077
--# expr-start 13709 '<FieldAccess for as_bool at nodes.lkt:24077:12>' Fld_2 ada/nodes.lkt:24077
--# expr-start 13708 '<FieldAccess for has_limited at nodes.lkt:24077:12>' Fld_1 ada/nodes.lkt:24077
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Record_Type_Def_F_Has_Limited;
--# expr-done 13708
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Limited.as_bool'
Fld_2 := Libadalang.Implementation.Dispatcher_Limited_Node_P_As_Bool (Node => Fld_1);
--# end
--# expr-done 13709
if Fld_2 then
   If_Result := No_Internal_Env_Assoc_Array_Type;
else
   --# expr-start 13710 '<FieldAccess for predefined_equality_operators at nodes.lkt:24078:14>' Fld ada/nodes.lkt:24078
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeDef.predefined_equality_operators
Fld := Libadalang.Implementation.Type_Def_P_Predefined_Equality_Operators (Node => Self);
--# end
--# expr-done 13710
   If_Result := Fld;
end if;
      Inc_Ref (If_Result);
--# expr-done 13711
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1571;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1571;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Record_Type_Def_P_Predefined_Operators;
--# end
   --
   --  Primitives for Bare_Signed_Int_Type_Def
   --
      procedure Initialize_Fields_For_Signed_Int_Type_Def
        (Self : Bare_Signed_Int_Type_Def
         ; Signed_Int_Type_Def_F_Range : Bare_Range_Spec
        ) is
      begin
            Self.Signed_Int_Type_Def_F_Range := Signed_Int_Type_Def_F_Range;
      end Initialize_Fields_For_Signed_Int_Type_Def;
   function Signed_Int_Type_Def_F_Range
     (Node : Bare_Signed_Int_Type_Def) return Bare_Range_Spec
   is
   begin
         return Node.Signed_Int_Type_Def_F_Range;
   end;
--# property-start SignedIntTypeDef.is_int_type ada/nodes.lkt:24087
pragma Warnings (Off, "is not referenced");
 function Signed_Int_Type_Def_P_Is_Int_Type
  (Node : Bare_Signed_Int_Type_Def
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Signed_Int_Type_Def  := Bare_Signed_Int_Type_Def (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Signed_Int_Type_Def_P_Is_Int_Type;
--# end
--# property-start SignedIntTypeDef.xref_equation ada/nodes.lkt:24090
pragma Warnings (Off, "is not referenced");
 function Signed_Int_Type_Def_P_Xref_Equation
  (Node : Bare_Signed_Int_Type_Def
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Signed_Int_Type_Def  := Bare_Signed_Int_Type_Def (Node);
     Ent : Internal_Entity_Signed_Int_Type_Def :=
       Internal_Entity_Signed_Int_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1573 with Inline_Always;
      Fld : Internal_Entity_Range_Spec;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1573 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1573;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13713 '<FieldAccess for xref_equation at nodes.lkt:24090:37>' Fld_1 ada/nodes.lkt:24090
--# expr-start 13712 '<FieldAccess for range at nodes.lkt:24090:37>' Fld ada/nodes.lkt:24090
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Signed_Int_Type_Def_F_Range, Info => Ent.Info);
--# expr-done 13712
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_1 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 13713
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1573;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1573;
            raise;
      end;
   return Property_Result;
end Signed_Int_Type_Def_P_Xref_Equation;
--# end
--# property-start SignedIntTypeDef.discrete_range ada/nodes.lkt:24092
pragma Warnings (Off, "is not referenced");
 function Signed_Int_Type_Def_P_Discrete_Range
  (Node : Bare_Signed_Int_Type_Def
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Signed_Int_Type_Def  := Bare_Signed_Int_Type_Def (Node);
     Ent : Internal_Entity_Signed_Int_Type_Def :=
       Internal_Entity_Signed_Int_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Discrete_Range;
      Fld : Internal_Entity_Range_Spec;
Fld_1 : Internal_Entity_Expr;
Fld_2 : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13716 '<FieldAccess for discrete_range at nodes.lkt:24092:43>' Fld_2 ada/nodes.lkt:24092
--# expr-start 13715 '<FieldAccess for range at nodes.lkt:24092:43>' Fld_1 ada/nodes.lkt:24092
--# expr-start 13714 '<FieldAccess for range at nodes.lkt:24092:43>' Fld ada/nodes.lkt:24092
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Signed_Int_Type_Def_F_Range, Info => Ent.Info);
--# expr-done 13714
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Expr (Node => Fld.Node.Range_Spec_F_Range, Info => Fld.Info);
--# expr-done 13715
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.discrete_range
Fld_2 := Libadalang.Implementation.Expr_P_Discrete_Range (Node => Fld_1.Node, E_Info => Fld_1.Info);
--# end
--# expr-done 13716
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Signed_Int_Type_Def_P_Discrete_Range;
--# end
--# property-start SignedIntTypeDef.predefined_operators ada/nodes.lkt:24095
pragma Warnings (Off, "is not referenced");
 function Signed_Int_Type_Def_P_Predefined_Operators
  (Node : Bare_Signed_Int_Type_Def
  )
   return Internal_Env_Assoc_Array_Access
is
   Self : Bare_Signed_Int_Type_Def  := Bare_Signed_Int_Type_Def (Node);
      --# bind self Self
   Property_Result : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1575 with Inline_Always;
      Local_Self_Type : Bare_Type_Decl;
Local_Bool_Type : Bare_Base_Type_Decl;
Local_Int_Type : Bare_Base_Type_Decl;
Local_Defaults : Internal_Env_Assoc_Array_Access;
Fld : Bare_Ada_Node;
Cast_Result : Bare_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Bare_Base_Type_Decl;
Fld_3 : Internal_Entity_Base_Type_Decl;
Fld_4 : Bare_Base_Type_Decl;
Sym : Symbol_Type;
Cast_Expr : Bare_Type_Decl;
Cast_Result_1 : Bare_Base_Type_Decl;
Cast_Expr_1 : Bare_Type_Decl;
Cast_Result_2 : Bare_Base_Type_Decl;
Cast_Expr_2 : Bare_Type_Decl;
Cast_Result_3 : Bare_Base_Type_Decl;
Fld_5 : Internal_Env_Assoc := No_Env_Assoc;
Sym_1 : Symbol_Type;
Cast_Expr_3 : Bare_Type_Decl;
Cast_Result_4 : Bare_Base_Type_Decl;
Cast_Expr_4 : Bare_Type_Decl;
Cast_Result_5 : Bare_Base_Type_Decl;
Cast_Expr_5 : Bare_Type_Decl;
Cast_Result_6 : Bare_Base_Type_Decl;
Fld_6 : Internal_Env_Assoc := No_Env_Assoc;
Sym_2 : Symbol_Type;
Cast_Expr_6 : Bare_Type_Decl;
Cast_Result_7 : Bare_Base_Type_Decl;
Cast_Expr_7 : Bare_Type_Decl;
Cast_Result_8 : Bare_Base_Type_Decl;
Cast_Expr_8 : Bare_Type_Decl;
Cast_Result_9 : Bare_Base_Type_Decl;
Fld_7 : Internal_Env_Assoc := No_Env_Assoc;
Sym_3 : Symbol_Type;
Cast_Expr_9 : Bare_Type_Decl;
Cast_Result_10 : Bare_Base_Type_Decl;
Cast_Expr_10 : Bare_Type_Decl;
Cast_Result_11 : Bare_Base_Type_Decl;
Cast_Expr_11 : Bare_Type_Decl;
Cast_Result_12 : Bare_Base_Type_Decl;
Fld_8 : Internal_Env_Assoc := No_Env_Assoc;
Sym_4 : Symbol_Type;
Cast_Expr_12 : Bare_Type_Decl;
Cast_Result_13 : Bare_Base_Type_Decl;
Cast_Expr_13 : Bare_Type_Decl;
Cast_Result_14 : Bare_Base_Type_Decl;
Cast_Expr_14 : Bare_Type_Decl;
Cast_Result_15 : Bare_Base_Type_Decl;
Fld_9 : Internal_Env_Assoc := No_Env_Assoc;
Sym_5 : Symbol_Type;
Cast_Expr_15 : Bare_Type_Decl;
Cast_Result_16 : Bare_Base_Type_Decl;
Cast_Expr_16 : Bare_Type_Decl;
Cast_Result_17 : Bare_Base_Type_Decl;
Cast_Expr_17 : Bare_Type_Decl;
Cast_Result_18 : Bare_Base_Type_Decl;
Fld_10 : Internal_Env_Assoc := No_Env_Assoc;
Sym_6 : Symbol_Type;
Cast_Expr_18 : Bare_Type_Decl;
Cast_Result_19 : Bare_Base_Type_Decl;
Cast_Expr_19 : Bare_Type_Decl;
Cast_Result_20 : Bare_Base_Type_Decl;
Fld_11 : Internal_Env_Assoc := No_Env_Assoc;
Sym_7 : Symbol_Type;
Cast_Expr_20 : Bare_Type_Decl;
Cast_Result_21 : Bare_Base_Type_Decl;
Cast_Expr_21 : Bare_Type_Decl;
Cast_Result_22 : Bare_Base_Type_Decl;
Fld_12 : Internal_Env_Assoc := No_Env_Assoc;
Sym_8 : Symbol_Type;
Cast_Expr_22 : Bare_Type_Decl;
Cast_Result_23 : Bare_Base_Type_Decl;
Cast_Expr_23 : Bare_Type_Decl;
Cast_Result_24 : Bare_Base_Type_Decl;
Fld_13 : Internal_Env_Assoc := No_Env_Assoc;
Sym_9 : Symbol_Type;
Cast_Expr_24 : Bare_Type_Decl;
Cast_Result_25 : Bare_Base_Type_Decl;
Cast_Expr_25 : Bare_Type_Decl;
Cast_Result_26 : Bare_Base_Type_Decl;
Fld_14 : Internal_Env_Assoc := No_Env_Assoc;
Sym_10 : Symbol_Type;
Cast_Expr_26 : Bare_Type_Decl;
Cast_Result_27 : Bare_Base_Type_Decl;
Cast_Expr_27 : Bare_Type_Decl;
Cast_Result_28 : Bare_Base_Type_Decl;
Fld_15 : Internal_Env_Assoc := No_Env_Assoc;
Sym_11 : Symbol_Type;
Cast_Expr_28 : Bare_Type_Decl;
Cast_Result_29 : Bare_Base_Type_Decl;
Cast_Expr_29 : Bare_Type_Decl;
Cast_Result_30 : Bare_Base_Type_Decl;
Fld_16 : Internal_Env_Assoc := No_Env_Assoc;
Sym_12 : Symbol_Type;
Cast_Expr_30 : Bare_Type_Decl;
Cast_Result_31 : Bare_Base_Type_Decl;
Cast_Expr_31 : Bare_Type_Decl;
Cast_Result_32 : Bare_Base_Type_Decl;
Fld_17 : Internal_Env_Assoc := No_Env_Assoc;
Sym_13 : Symbol_Type;
Cast_Expr_32 : Bare_Type_Decl;
Cast_Result_33 : Bare_Base_Type_Decl;
Cast_Expr_33 : Bare_Type_Decl;
Cast_Result_34 : Bare_Base_Type_Decl;
Fld_18 : Internal_Env_Assoc := No_Env_Assoc;
Sym_14 : Symbol_Type;
Cast_Expr_34 : Bare_Type_Decl;
Cast_Result_35 : Bare_Base_Type_Decl;
Cast_Expr_35 : Bare_Type_Decl;
Cast_Result_36 : Bare_Base_Type_Decl;
Fld_19 : Internal_Env_Assoc := No_Env_Assoc;
Sym_15 : Symbol_Type;
Cast_Expr_36 : Bare_Type_Decl;
Cast_Result_37 : Bare_Base_Type_Decl;
Cast_Expr_37 : Bare_Type_Decl;
Cast_Result_38 : Bare_Base_Type_Decl;
Fld_20 : Internal_Env_Assoc := No_Env_Assoc;
Array_Lit : Internal_Env_Assoc_Array_Access;
Let_Result : Internal_Env_Assoc_Array_Access;
Let_Result_1 : Internal_Env_Assoc_Array_Access;
Let_Result_2 : Internal_Env_Assoc_Array_Access;
Let_Result_3 : Internal_Env_Assoc_Array_Access;
            procedure Finalizer_Scope_1575 is
            begin
                     Dec_Ref (Fld_5);
                     Dec_Ref (Fld_6);
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_8);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_10);
                     Dec_Ref (Fld_11);
                     Dec_Ref (Fld_12);
                     Dec_Ref (Fld_13);
                     Dec_Ref (Fld_14);
                     Dec_Ref (Fld_15);
                     Dec_Ref (Fld_16);
                     Dec_Ref (Fld_17);
                     Dec_Ref (Fld_18);
                     Dec_Ref (Fld_19);
                     Dec_Ref (Fld_20);
                     Dec_Ref (Array_Lit);
                     Dec_Ref (Local_Defaults);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Let_Result_3);
            end Finalizer_Scope_1575;
      Mmz_Handle : Memoization_Handle;
      Mmz_Val    : Mmz_Value;
      Mmz_Stored : Boolean;
      --  Whether the memoization couple was actually stored. Used to determine
      --  whether to inc-ref the memoized value.
      function Create_Mmz_Key return Mmz_Key;
      --  Create a memoization key for this property call and return it
      --------------------
      -- Create_Mmz_Key --
      --------------------
      function Create_Mmz_Key return Mmz_Key is
      begin
         return Mmz_K : Mmz_Key :=
           (Property => Mmz_Bare_Signed_Int_Type_Def_Signed_Int_Type_Def_P_Predefined_Operators,
            Items    => new Mmz_Key_Array (1 ..  1))
         do
            Mmz_K.Items (1) := (Kind => Mmz_Bare_Signed_Int_Type_Def,
                                As_Bare_Signed_Int_Type_Def => Self);
         end return;
      end Create_Mmz_Key;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            if Find_Memoized_Value
              (Self.Unit, Mmz_Handle, Mmz_Val, Create_Mmz_Key'Access)
            then
               --# memoization-lookup
               if Mmz_Val.Kind = Mmz_Evaluating then
                  --# memoization-return
                  Raise_Property_Exception
                    (Self,
                     Property_Error'Identity,
                     "Infinite recursion detected");
               elsif Mmz_Val.Kind = Mmz_Error then
                  --# memoization-return
                  Reraise_Memoized_Error (Mmz_Val);
               else
                  Property_Result := Mmz_Val.As_Internal_Env_Assoc_Array_Access;
                     Inc_Ref (Property_Result);
                  --# memoization-return
                  return Property_Result;
               end if;
               --# end
            end if;
         end if;
      end if;
      begin
   --# scope-start
         --# expr-start 13759 '<Let at nodes.lkt:24096:9>' Let_Result_3 ada/nodes.lkt:24096
--# scope-start
--# expr-start 13718 '<Cast to TypeDecl at nodes.lkt:24096:25>' Cast_Result ada/nodes.lkt:24096
--# expr-start 13717 '<parent at nodes.lkt:24096:25>' Fld ada/nodes.lkt:24096
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13717
   if Fld = null
      or else Fld.Kind in Ada_Type_Decl
   then
      Cast_Result := Fld;
   else
         Cast_Result := No_Bare_Ada_Node;
   end if;
--# expr-done 13718
Local_Self_Type := Cast_Result; 
--# bind self_type Local_Self_Type
--# expr-start 13758 '<Let at nodes.lkt:24097:9>' Let_Result_2 ada/nodes.lkt:24097
--# scope-start
--# expr-start 13720 '<FieldAccess for node at nodes.lkt:24097:25>' Fld_2 ada/nodes.lkt:24097
--# expr-start 13719 '<FieldAccess for bool_type at nodes.lkt:24097:25>' Fld_1 ada/nodes.lkt:24097
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.bool_type
Fld_1 := Libadalang.Implementation.Ada_Node_P_Bool_Type (Node => Self);
--# end
--# expr-done 13719
Fld_2 := Fld_1.Node;
--# expr-done 13720
Local_Bool_Type := Fld_2; 
--# bind bool_type Local_Bool_Type
--# expr-start 13757 '<Let at nodes.lkt:24098:9>' Let_Result_1 ada/nodes.lkt:24098
--# scope-start
--# expr-start 13722 '<FieldAccess for node at nodes.lkt:24098:24>' Fld_4 ada/nodes.lkt:24098
--# expr-start 13721 '<FieldAccess for int_type at nodes.lkt:24098:24>' Fld_3 ada/nodes.lkt:24098
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.int_type
Fld_3 := Libadalang.Implementation.Ada_Node_P_Int_Type (Node => Self);
--# end
--# expr-done 13721
Fld_4 := Fld_3.Node;
--# expr-done 13722
Local_Int_Type := Fld_4; 
--# bind int_type Local_Int_Type
--# expr-start 13756 '<Let at nodes.lkt:24099:9>' Let_Result ada/nodes.lkt:24099
--# scope-start
--# expr-start 13755 '<ArrayLiteral at nodes.lkt:24100:13>' Array_Lit ada/nodes.lkt:24100
--# expr-start 13724 '<FieldAccess for create_binop_assoc at nodes.lkt:24101:17>' Fld_5 ada/nodes.lkt:24101
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13723 '<Symbol "+" at nodes.lkt:24102:21>' Sym ada/nodes.lkt:24102
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13723
Cast_Expr := Local_Self_Type; 
      Cast_Result_1 := Cast_Expr;
Cast_Expr_1 := Local_Self_Type; 
      Cast_Result_2 := Cast_Expr_1;
Cast_Expr_2 := Local_Self_Type; 
      Cast_Result_3 := Cast_Expr_2;
--# property-call-start AdaNode.create_binop_assoc
Fld_5 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym, Lhs => Cast_Result_1, Rhs => Cast_Result_2, Ret => Cast_Result_3);
--# end
--# expr-done 13724
--# expr-start 13726 '<FieldAccess for create_binop_assoc at nodes.lkt:24107:17>' Fld_6 ada/nodes.lkt:24107
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13725 '<Symbol "-" at nodes.lkt:24108:21>' Sym_1 ada/nodes.lkt:24108
Sym_1 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13725
Cast_Expr_3 := Local_Self_Type; 
      Cast_Result_4 := Cast_Expr_3;
Cast_Expr_4 := Local_Self_Type; 
      Cast_Result_5 := Cast_Expr_4;
Cast_Expr_5 := Local_Self_Type; 
      Cast_Result_6 := Cast_Expr_5;
--# property-call-start AdaNode.create_binop_assoc
Fld_6 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_1, Lhs => Cast_Result_4, Rhs => Cast_Result_5, Ret => Cast_Result_6);
--# end
--# expr-done 13726
--# expr-start 13728 '<FieldAccess for create_binop_assoc at nodes.lkt:24113:17>' Fld_7 ada/nodes.lkt:24113
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13727 '<Symbol "*" at nodes.lkt:24114:21>' Sym_2 ada/nodes.lkt:24114
Sym_2 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_2); 
--# expr-done 13727
Cast_Expr_6 := Local_Self_Type; 
      Cast_Result_7 := Cast_Expr_6;
Cast_Expr_7 := Local_Self_Type; 
      Cast_Result_8 := Cast_Expr_7;
Cast_Expr_8 := Local_Self_Type; 
      Cast_Result_9 := Cast_Expr_8;
--# property-call-start AdaNode.create_binop_assoc
Fld_7 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_2, Lhs => Cast_Result_7, Rhs => Cast_Result_8, Ret => Cast_Result_9);
--# end
--# expr-done 13728
--# expr-start 13730 '<FieldAccess for create_binop_assoc at nodes.lkt:24119:17>' Fld_8 ada/nodes.lkt:24119
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13729 '<Symbol "/" at nodes.lkt:24120:21>' Sym_3 ada/nodes.lkt:24120
Sym_3 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_6); 
--# expr-done 13729
Cast_Expr_9 := Local_Self_Type; 
      Cast_Result_10 := Cast_Expr_9;
Cast_Expr_10 := Local_Self_Type; 
      Cast_Result_11 := Cast_Expr_10;
Cast_Expr_11 := Local_Self_Type; 
      Cast_Result_12 := Cast_Expr_11;
--# property-call-start AdaNode.create_binop_assoc
Fld_8 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_3, Lhs => Cast_Result_10, Rhs => Cast_Result_11, Ret => Cast_Result_12);
--# end
--# expr-done 13730
--# expr-start 13732 '<FieldAccess for create_binop_assoc at nodes.lkt:24125:17>' Fld_9 ada/nodes.lkt:24125
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13731 '<Symbol "mod" at nodes.lkt:24126:21>' Sym_4 ada/nodes.lkt:24126
Sym_4 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Mod); 
--# expr-done 13731
Cast_Expr_12 := Local_Self_Type; 
      Cast_Result_13 := Cast_Expr_12;
Cast_Expr_13 := Local_Self_Type; 
      Cast_Result_14 := Cast_Expr_13;
Cast_Expr_14 := Local_Self_Type; 
      Cast_Result_15 := Cast_Expr_14;
--# property-call-start AdaNode.create_binop_assoc
Fld_9 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_4, Lhs => Cast_Result_13, Rhs => Cast_Result_14, Ret => Cast_Result_15);
--# end
--# expr-done 13732
--# expr-start 13734 '<FieldAccess for create_binop_assoc at nodes.lkt:24131:17>' Fld_10 ada/nodes.lkt:24131
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13733 '<Symbol "rem" at nodes.lkt:24132:21>' Sym_5 ada/nodes.lkt:24132
Sym_5 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Rem); 
--# expr-done 13733
Cast_Expr_15 := Local_Self_Type; 
      Cast_Result_16 := Cast_Expr_15;
Cast_Expr_16 := Local_Self_Type; 
      Cast_Result_17 := Cast_Expr_16;
Cast_Expr_17 := Local_Self_Type; 
      Cast_Result_18 := Cast_Expr_17;
--# property-call-start AdaNode.create_binop_assoc
Fld_10 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_5, Lhs => Cast_Result_16, Rhs => Cast_Result_17, Ret => Cast_Result_18);
--# end
--# expr-done 13734
--# expr-start 13736 '<FieldAccess for create_binop_assoc at nodes.lkt:24137:17>' Fld_11 ada/nodes.lkt:24137
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13735 '<Symbol "**" at nodes.lkt:24138:21>' Sym_6 ada/nodes.lkt:24138
Sym_6 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_3); 
--# expr-done 13735
Cast_Expr_18 := Local_Self_Type; 
      Cast_Result_19 := Cast_Expr_18;
Cast_Expr_19 := Local_Self_Type; 
      Cast_Result_20 := Cast_Expr_19;
--# property-call-start AdaNode.create_binop_assoc
Fld_11 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_6, Lhs => Cast_Result_19, Rhs => Local_Int_Type, Ret => Cast_Result_20);
--# end
--# expr-done 13736
--# expr-start 13738 '<FieldAccess for create_binop_assoc at nodes.lkt:24143:17>' Fld_12 ada/nodes.lkt:24143
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13737 '<Symbol "<" at nodes.lkt:24144:21>' Sym_7 ada/nodes.lkt:24144
Sym_7 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_8); 
--# expr-done 13737
Cast_Expr_20 := Local_Self_Type; 
      Cast_Result_21 := Cast_Expr_20;
Cast_Expr_21 := Local_Self_Type; 
      Cast_Result_22 := Cast_Expr_21;
--# property-call-start AdaNode.create_binop_assoc
Fld_12 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_7, Lhs => Cast_Result_21, Rhs => Cast_Result_22, Ret => Local_Bool_Type);
--# end
--# expr-done 13738
--# expr-start 13740 '<FieldAccess for create_binop_assoc at nodes.lkt:24149:17>' Fld_13 ada/nodes.lkt:24149
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13739 '<Symbol "<=" at nodes.lkt:24150:21>' Sym_8 ada/nodes.lkt:24150
Sym_8 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_9); 
--# expr-done 13739
Cast_Expr_22 := Local_Self_Type; 
      Cast_Result_23 := Cast_Expr_22;
Cast_Expr_23 := Local_Self_Type; 
      Cast_Result_24 := Cast_Expr_23;
--# property-call-start AdaNode.create_binop_assoc
Fld_13 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_8, Lhs => Cast_Result_23, Rhs => Cast_Result_24, Ret => Local_Bool_Type);
--# end
--# expr-done 13740
--# expr-start 13742 '<FieldAccess for create_binop_assoc at nodes.lkt:24155:17>' Fld_14 ada/nodes.lkt:24155
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13741 '<Symbol "=" at nodes.lkt:24156:21>' Sym_9 ada/nodes.lkt:24156
Sym_9 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_10); 
--# expr-done 13741
Cast_Expr_24 := Local_Self_Type; 
      Cast_Result_25 := Cast_Expr_24;
Cast_Expr_25 := Local_Self_Type; 
      Cast_Result_26 := Cast_Expr_25;
--# property-call-start AdaNode.create_binop_assoc
Fld_14 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_9, Lhs => Cast_Result_25, Rhs => Cast_Result_26, Ret => Local_Bool_Type);
--# end
--# expr-done 13742
--# expr-start 13744 '<FieldAccess for create_binop_assoc at nodes.lkt:24161:17>' Fld_15 ada/nodes.lkt:24161
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13743 '<Symbol "/=" at nodes.lkt:24162:21>' Sym_10 ada/nodes.lkt:24162
Sym_10 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_7); 
--# expr-done 13743
Cast_Expr_26 := Local_Self_Type; 
      Cast_Result_27 := Cast_Expr_26;
Cast_Expr_27 := Local_Self_Type; 
      Cast_Result_28 := Cast_Expr_27;
--# property-call-start AdaNode.create_binop_assoc
Fld_15 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_10, Lhs => Cast_Result_27, Rhs => Cast_Result_28, Ret => Local_Bool_Type);
--# end
--# expr-done 13744
--# expr-start 13746 '<FieldAccess for create_binop_assoc at nodes.lkt:24167:17>' Fld_16 ada/nodes.lkt:24167
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13745 '<Symbol ">" at nodes.lkt:24168:21>' Sym_11 ada/nodes.lkt:24168
Sym_11 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_11); 
--# expr-done 13745
Cast_Expr_28 := Local_Self_Type; 
      Cast_Result_29 := Cast_Expr_28;
Cast_Expr_29 := Local_Self_Type; 
      Cast_Result_30 := Cast_Expr_29;
--# property-call-start AdaNode.create_binop_assoc
Fld_16 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_11, Lhs => Cast_Result_29, Rhs => Cast_Result_30, Ret => Local_Bool_Type);
--# end
--# expr-done 13746
--# expr-start 13748 '<FieldAccess for create_binop_assoc at nodes.lkt:24173:17>' Fld_17 ada/nodes.lkt:24173
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13747 '<Symbol ">=" at nodes.lkt:24174:21>' Sym_12 ada/nodes.lkt:24174
Sym_12 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_12); 
--# expr-done 13747
Cast_Expr_30 := Local_Self_Type; 
      Cast_Result_31 := Cast_Expr_30;
Cast_Expr_31 := Local_Self_Type; 
      Cast_Result_32 := Cast_Expr_31;
--# property-call-start AdaNode.create_binop_assoc
Fld_17 := Libadalang.Implementation.Ada_Node_P_Create_Binop_Assoc (Node => Self, Op => Sym_12, Lhs => Cast_Result_31, Rhs => Cast_Result_32, Ret => Local_Bool_Type);
--# end
--# expr-done 13748
--# expr-start 13750 '<FieldAccess for create_unop_assoc at nodes.lkt:24179:17>' Fld_18 ada/nodes.lkt:24179
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13749 '<Symbol "+" at nodes.lkt:24179:40>' Sym_13 ada/nodes.lkt:24179
Sym_13 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_4); 
--# expr-done 13749
Cast_Expr_32 := Local_Self_Type; 
      Cast_Result_33 := Cast_Expr_32;
Cast_Expr_33 := Local_Self_Type; 
      Cast_Result_34 := Cast_Expr_33;
--# property-call-start AdaNode.create_unop_assoc
Fld_18 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_13, Rhs => Cast_Result_33, Ret => Cast_Result_34);
--# end
--# expr-done 13750
--# expr-start 13752 '<FieldAccess for create_unop_assoc at nodes.lkt:24180:17>' Fld_19 ada/nodes.lkt:24180
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13751 '<Symbol "-" at nodes.lkt:24180:40>' Sym_14 ada/nodes.lkt:24180
Sym_14 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_5); 
--# expr-done 13751
Cast_Expr_34 := Local_Self_Type; 
      Cast_Result_35 := Cast_Expr_34;
Cast_Expr_35 := Local_Self_Type; 
      Cast_Result_36 := Cast_Expr_35;
--# property-call-start AdaNode.create_unop_assoc
Fld_19 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_14, Rhs => Cast_Result_35, Ret => Cast_Result_36);
--# end
--# expr-done 13752
--# expr-start 13754 '<FieldAccess for create_unop_assoc at nodes.lkt:24181:17>' Fld_20 ada/nodes.lkt:24181
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13753 '<Symbol "abs" at nodes.lkt:24181:40>' Sym_15 ada/nodes.lkt:24181
Sym_15 := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Abs); 
--# expr-done 13753
Cast_Expr_36 := Local_Self_Type; 
      Cast_Result_37 := Cast_Expr_36;
Cast_Expr_37 := Local_Self_Type; 
      Cast_Result_38 := Cast_Expr_37;
--# property-call-start AdaNode.create_unop_assoc
Fld_20 := Libadalang.Implementation.Ada_Node_P_Create_Unop_Assoc (Node => Self, Op => Sym_15, Rhs => Cast_Result_37, Ret => Cast_Result_38);
--# end
--# expr-done 13754
Array_Lit := Create_Internal_Env_Assoc_Array (Internal_Internal_Env_Assoc_Array'(1 => Fld_5, 2 => Fld_6, 3 => Fld_7, 4 => Fld_8, 5 => Fld_9, 6 => Fld_10, 7 => Fld_11, 8 => Fld_12, 9 => Fld_13, 10 => Fld_14, 11 => Fld_15, 12 => Fld_16, 13 => Fld_17, 14 => Fld_18, 15 => Fld_19, 16 => Fld_20)); 
--# expr-done 13755
Local_Defaults := Array_Lit; Inc_Ref (Local_Defaults);
--# bind defaults Local_Defaults
Let_Result := Local_Defaults; Inc_Ref (Let_Result);
--# end
--# expr-done 13756
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 13757
Let_Result_2 := Let_Result_1; Inc_Ref (Let_Result_2);
--# end
--# expr-done 13758
Let_Result_3 := Let_Result_2; Inc_Ref (Let_Result_3);
--# end
--# expr-done 13759
         Property_Result := Let_Result_3;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1575;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1575;
               if Self /= null then
                     if not Self.Unit.Context.In_Populate_Lexical_Env then
                        Add_Memoized_Error
                          (Self.Unit, Mmz_Handle, Exc, Mmz_Stored);
                     end if;
               end if;
            raise;
      end;
      if Self /= null then
         if not Self.Unit.Context.In_Populate_Lexical_Env then
            Mmz_Val := (Kind => Mmz_Internal_Env_Assoc_Array_Access,
                        As_Internal_Env_Assoc_Array_Access => Property_Result);
            Add_Memoized_Value (Self.Unit, Mmz_Handle, Mmz_Val, Mmz_Stored);
               if Mmz_Stored then
                  Inc_Ref (Property_Result);
               end if;
         end if;
      end if;
   return Property_Result;
end Signed_Int_Type_Def_P_Predefined_Operators;
--# end
--# property-start SignedIntTypeDef.is_static ada/nodes.lkt:24188
pragma Warnings (Off, "is not referenced");
 function Signed_Int_Type_Def_P_Is_Static
  (Node : Bare_Signed_Int_Type_Def
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Signed_Int_Type_Def  := Bare_Signed_Int_Type_Def (Node);
     Ent : Internal_Entity_Signed_Int_Type_Def :=
       Internal_Entity_Signed_Int_Type_Def'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Fld : Internal_Entity_Range_Spec;
Fld_1 : Internal_Entity_Expr;
Fld_2 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13762 '<FieldAccess for is_static_expr at nodes.lkt:24188:29>' Fld_2 ada/nodes.lkt:24188
--# expr-start 13761 '<FieldAccess for range at nodes.lkt:24188:29>' Fld_1 ada/nodes.lkt:24188
--# expr-start 13760 '<FieldAccess for range at nodes.lkt:24188:29>' Fld ada/nodes.lkt:24188
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Range_Spec (Node => Ent.Node.Signed_Int_Type_Def_F_Range, Info => Ent.Info);
--# expr-done 13760
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Expr (Node => Fld.Node.Range_Spec_F_Range, Info => Fld.Info);
--# expr-done 13761
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.is_static_expr
Fld_2 := Libadalang.Implementation.Expr_P_Is_Static_Expr (Node => Fld_1.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_1.Info);
--# end
--# expr-done 13762
         Property_Result := Fld_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Signed_Int_Type_Def_P_Is_Static;
--# end
   --
   --  Primitives for Bare_Type_Expr
   --
--# property-start TypeExpr.array_ndims ada/nodes.lkt:24200
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Array_Ndims
  (Node : Bare_Type_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Integer
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Integer;
      Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Integer;
Dyn_Var_Bind_Result : Integer;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13766 '<bind at nodes.lkt:24201:9>' Dyn_Var_Bind_Result ada/nodes.lkt:24201
--# expr-start 13763 '<FieldAccess for origin_node at nodes.lkt:24201:23>' Fld ada/nodes.lkt:24201
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 13763
Bound_Origin := Fld; 
--# expr-start 13765 '<FieldAccess for array_ndims at nodes.lkt:24203:9>' Fld_2 ada/nodes.lkt:24203
--# expr-start 13764 '<FieldAccess for designated_type at nodes.lkt:24203:9>' Fld_1 ada/nodes.lkt:24203
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 13764
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.array_ndims'
Fld_2 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Array_Ndims (Node => Fld_1.Node, Origin => Bound_Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 13765
Dyn_Var_Bind_Result := Fld_2; 
--# expr-done 13766
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Array_Ndims;
--# end
--# property-start TypeExpr.type_name ada/nodes.lkt:24208
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Type_Name
  (Node : Bare_Type_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Name
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Name;
      Var_Expr_0 : Internal_Entity_Subtype_Indication;
Cast_Expr : Internal_Entity_Type_Expr;
Cast_Result : Internal_Entity_Subtype_Indication;
Fld : Internal_Entity_Name;
Scope_Result : Internal_Entity_Name;
Result_Var : Internal_Entity_Name;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 13767 '<Cast to SubtypeIndication at nodes.lkt:24209:9>' Cast_Result ada/nodes.lkt:24209
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Subtype_Indication_Range
   then
      Cast_Result := Create_Internal_Entity_Subtype_Indication
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Subtype_Indication;
   end if;
--# expr-done 13767
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Subtype_Indication then
   --# scope-start
   --# bind sti Var_Expr_0
--# expr-start 13768 '<FieldAccess for name at nodes.lkt:24209:48>' Fld ada/nodes.lkt:24209
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Var_Expr_0.Node.Subtype_Indication_F_Name, Info => Var_Expr_0.Info);
--# expr-done 13768
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Name;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Type_Name;
--# end
--# property-start TypeExpr.defining_env ada/nodes.lkt:24212
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Defining_Env
  (Node : Bare_Type_Expr
      ; Origin : Bare_Ada_Node
      ; Include_Ud_Indexing : Boolean
      ; Dottable_Type : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   --# bind include_ud_indexing Include_Ud_Indexing
   --# bind dottable_type Dottable_Type
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1579 with Inline_Always;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1579 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1579;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13770 '<FieldAccess for defining_env at nodes.lkt:24212:38>' Fld_1 ada/nodes.lkt:24212
--# expr-start 13769 '<FieldAccess for designated_type at nodes.lkt:24212:38>' Fld ada/nodes.lkt:24212
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13769
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_env'
Fld_1 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Env (Node => Fld.Node, Origin => Origin, Include_Ud_Indexing => Include_Ud_Indexing, Dottable_Type => Dottable_Type, E_Info => Fld.Info);
--# end
--# expr-done 13770
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1579;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1579;
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Defining_Env;
--# end
--# property-start '[dispatcher]TypeExpr.designated_type' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Expr_P_Designated_Type
  (Node : Bare_Type_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
      --# bind self Self
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Expr (Self.Kind) is
               when Ada_Anonymous_Type =>
                  --# property-call-start AnonymousType.designated_type
                  Property_Result := Anonymous_Type_P_Designated_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Enum_Lit_Synth_Type_Expr =>
                  --# property-call-start EnumLitSynthTypeExpr.designated_type
                  Property_Result := Enum_Lit_Synth_Type_Expr_P_Designated_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
                  --# property-call-start SubtypeIndication.designated_type
                  Property_Result := Subtype_Indication_P_Designated_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
               when Ada_Synthetic_Type_Expr =>
                  --# property-call-start SyntheticTypeExpr.designated_type
                  Property_Result := Synthetic_Type_Expr_P_Designated_Type
                    (Self
                        , Origin
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Expr_P_Designated_Type;
--# end
--# property-start TypeExpr.designated_type_decl ada/nodes.lkt:24221
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Designated_Type_Decl
  (Node : Bare_Type_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 13773 '<bind at nodes.lkt:24222:9>' Dyn_Var_Bind_Result ada/nodes.lkt:24222
--# expr-start 13771 '<FieldAccess for origin_node at nodes.lkt:24222:23>' Fld ada/nodes.lkt:24222
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 13771
Bound_Origin := Fld; 
--# expr-start 13772 '<FieldAccess for designated_type at nodes.lkt:24224:9>' Fld_1 ada/nodes.lkt:24224
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 13772
Dyn_Var_Bind_Result := Fld_1; 
--# expr-done 13773
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Designated_Type_Decl;
--# end
--# property-start TypeExpr.designated_type_decl_from ada/nodes.lkt:24230
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Designated_Type_Decl_From
  (Node : Bare_Type_Expr
      ; Origin_Node : Internal_Entity
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin_node Origin_Node
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_2 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 13777 '<bind at nodes.lkt:24233:9>' Dyn_Var_Bind_Result ada/nodes.lkt:24233
--# expr-start 13775 '<FieldAccess for origin_node at nodes.lkt:24233:23>' Fld_1 ada/nodes.lkt:24233
--# expr-start 13774 '<FieldAccess for node at nodes.lkt:24233:23>' Fld ada/nodes.lkt:24233
Fld := Origin_Node.Node;
--# expr-done 13774
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_1 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Fld);
--# end
--# expr-done 13775
Bound_Origin := Fld_1; 
--# expr-start 13776 '<FieldAccess for designated_type at nodes.lkt:24235:9>' Fld_2 ada/nodes.lkt:24235
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_2 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 13776
Dyn_Var_Bind_Result := Fld_2; 
--# expr-done 13777
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Designated_Type_Decl_From;
--# end
--# property-start TypeExpr.element_type ada/nodes.lkt:24241
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Element_Type
  (Node : Bare_Type_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Local_D : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Is_A : Boolean;
Cast_Expr : Internal_Entity_Base_Type_Decl;
Cast_Result : Internal_Entity_Anonymous_Type_Decl;
Fld_2 : Internal_Entity_Type_Def;
Is_A_1 : Boolean;
If_Result : Boolean;
If_Result_1 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13786 '<Let at nodes.lkt:24242:9>' Let_Result ada/nodes.lkt:24242
--# scope-start
--# expr-start 13778 '<FieldAccess for designated_type at nodes.lkt:24242:17>' Fld ada/nodes.lkt:24242
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13778
Local_D := Fld; 
--# bind d Local_D
--# expr-start 13785 '<If at nodes.lkt:24244:9>' If_Result_1 ada/nodes.lkt:24244
--# expr-start 13783 '<BooleanBinaryOp And at nodes.lkt:24245:13>' If_Result ada/nodes.lkt:24245
--# expr-start 13779 '<IsA AnonymousTypeDecl at nodes.lkt:24245:13>' Is_A ada/nodes.lkt:24245
Is_A := Local_D.Node /= null 
and then Local_D.Node.Kind in Ada_Anonymous_Type_Decl_Range; 
--# expr-done 13779
if Is_A then
   --# expr-start 13782 '<IsA AccessDef at nodes.lkt:24246:17>' Is_A_1 ada/nodes.lkt:24246
--# expr-start 13781 '<FieldAccess for type_def at nodes.lkt:24246:17>' Fld_2 ada/nodes.lkt:24246
--# expr-start 13780 '<Cast to AnonymousTypeDecl at nodes.lkt:24246:17>' Cast_Result ada/nodes.lkt:24246
Cast_Expr := Local_D; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Anonymous_Type_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Anonymous_Type_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Anonymous_Type_Decl;
   end if;
--# expr-done 13780
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Type_Def (Node => Cast_Result.Node.Type_Decl_F_Type_Def, Info => Cast_Result.Info);
--# expr-done 13781
Is_A_1 := Fld_2.Node /= null 
and then Fld_2.Node.Kind in Ada_Access_Def; 
--# expr-done 13782
   If_Result := Is_A_1;
else
   If_Result := False;
end if;
--# expr-done 13783
if If_Result then
   --# expr-start 13784 '<FieldAccess for accessed_type at nodes.lkt:24247:14>' Fld_1 ada/nodes.lkt:24247
      if Local_D.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.accessed_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Accessed_Type (Node => Local_D.Node, Origin => Origin, E_Info => Local_D.Info);
--# end
--# expr-done 13784
   If_Result_1 := Fld_1;
else
   If_Result_1 := Local_D;
end if;
--# expr-done 13785
Let_Result := If_Result_1; 
--# end
--# expr-done 13786
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Element_Type;
--# end
--# property-start TypeExpr.canonical_type ada/nodes.lkt:24253
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Canonical_Type
  (Node : Bare_Type_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Var_Expr_298 : Internal_Entity_Base_Type_Decl;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Internal_Entity_Base_Type_Decl;
Scope_Result : Internal_Entity_Base_Type_Decl;
Result_Var : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
--# expr-start 13787 '<FieldAccess for designated_type at nodes.lkt:24254:9>' Fld ada/nodes.lkt:24254
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13787
Var_Expr_298 := Fld;
if Var_Expr_298 /= No_Entity_Base_Type_Decl then
   --# scope-start
--# expr-start 13788 '<FieldAccess for canonical_type at nodes.lkt:24254:9>' Fld_1 ada/nodes.lkt:24254
      if Var_Expr_298.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.canonical_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Canonical_Type (Node => Var_Expr_298.Node, Origin => Origin, E_Info => Var_Expr_298.Info);
--# end
--# expr-done 13788
Scope_Result := Fld_1;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Base_Type_Decl;
end if;
         Property_Result := Result_Var;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Canonical_Type;
--# end
--# property-start TypeExpr.subtype_constraint ada/nodes.lkt:24260
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Subtype_Constraint
  (Node : Bare_Type_Expr
      ; Origin : Bare_Ada_Node
         := No_Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Constraint
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Constraint;
      Var_Expr_0 : Internal_Entity_Subtype_Indication;
Var_Expr_1 : Internal_Entity_Subtype_Decl;
Var_Expr : Internal_Entity_Constraint;
Cast_Expr : Internal_Entity_Type_Expr;
Cast_Result : Internal_Entity_Subtype_Indication;
Fld : Internal_Entity_Constraint;
Scope_Result : Internal_Entity_Constraint;
Result_Var : Internal_Entity_Constraint;
Scope_Result_1 : Internal_Entity_Constraint;
Fld_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity_Subtype_Decl;
Fld_2 : Internal_Entity_Subtype_Indication;
Fld_3 : Internal_Entity_Constraint;
Scope_Result_2 : Internal_Entity_Constraint;
Result_Var_1 : Internal_Entity_Constraint;
Result_Var_2 : Internal_Entity_Constraint;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 13789 '<Cast to SubtypeIndication at nodes.lkt:24261:9>' Cast_Result ada/nodes.lkt:24261
Cast_Expr := Ent; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Subtype_Indication_Range
   then
      Cast_Result := Create_Internal_Entity_Subtype_Indication
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Subtype_Indication;
   end if;
--# expr-done 13789
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Subtype_Indication then
   --# scope-start
   --# bind si Var_Expr_0
--# expr-start 13790 '<FieldAccess for constraint at nodes.lkt:24261:47>' Fld ada/nodes.lkt:24261
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Constraint (Node => Var_Expr_0.Node.Subtype_Indication_F_Constraint, Info => Var_Expr_0.Info);
--# expr-done 13790
Scope_Result := Fld;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Entity_Constraint;
end if;
Var_Expr := Result_Var;
if Var_Expr /= No_Entity_Constraint then
   --# scope-start
   --# bind e Var_Expr
Scope_Result_1 := Var_Expr;
   --# end
   Result_Var_2 := Scope_Result_1;
else
--# expr-start 13792 '<Cast to SubtypeDecl at nodes.lkt:24262:13>' Cast_Result_1 ada/nodes.lkt:24262
--# expr-start 13791 '<FieldAccess for designated_type at nodes.lkt:24262:13>' Fld_1 ada/nodes.lkt:24262
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Origin, E_Info => Ent.Info);
--# end
--# expr-done 13791
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Subtype_Decl_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Subtype_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result_1 := No_Entity_Subtype_Decl;
   end if;
--# expr-done 13792
Var_Expr_1 := Cast_Result_1;
if Var_Expr_1 /= No_Entity_Subtype_Decl then
   --# scope-start
   --# bind st Var_Expr_1
--# expr-start 13794 '<FieldAccess for subtype_constraint at nodes.lkt:24263:21>' Fld_3 ada/nodes.lkt:24263
--# expr-start 13793 '<FieldAccess for subtype at nodes.lkt:24263:21>' Fld_2 ada/nodes.lkt:24263
      if Var_Expr_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Subtype_Indication (Node => Var_Expr_1.Node.Subtype_Decl_F_Subtype, Info => Var_Expr_1.Info);
--# expr-done 13793
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.subtype_constraint
Fld_3 := Libadalang.Implementation.Type_Expr_P_Subtype_Constraint (Node => Fld_2.Node, Origin => Origin, E_Info => Fld_2.Info);
--# end
--# expr-done 13794
Scope_Result_2 := Fld_3;
   --# end
   Result_Var_1 := Scope_Result_2;
else
   Result_Var_1 := No_Entity_Constraint;
end if;
   Result_Var_2 := Result_Var_1;
end if;
         Property_Result := Result_Var_2;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Subtype_Constraint;
--# end
--# property-start TypeExpr.discriminant_constraints ada/nodes.lkt:24270
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Discriminant_Constraints
  (Node : Bare_Type_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Param_Actual_Array_Access
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_1586 with Inline_Always;
            procedure Finalizer_Scope_3619 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Composite_Constraint;
Fld : Internal_Entity_Constraint;
Cast_Result : Internal_Entity_Composite_Constraint;
Fld_1 : Internal_Param_Actual_Array_Access;
Scope_Result : Internal_Param_Actual_Array_Access;
Result_Var : Internal_Param_Actual_Array_Access;
            procedure Finalizer_Scope_1586 is
            begin
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Result_Var);
            end Finalizer_Scope_1586;
            procedure Finalizer_Scope_3619 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3619;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
--# expr-start 13796 '<Cast to CompositeConstraint at nodes.lkt:24271:9>' Cast_Result ada/nodes.lkt:24271
--# expr-start 13795 '<FieldAccess for subtype_constraint at nodes.lkt:24271:9>' Fld ada/nodes.lkt:24271
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.subtype_constraint
Fld := Libadalang.Implementation.Type_Expr_P_Subtype_Constraint (Node => Ent.Node, Origin => No_Bare_Ada_Node, E_Info => Ent.Info);
--# end
--# expr-done 13795
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Composite_Constraint_Range
   then
      Cast_Result := Create_Internal_Entity_Composite_Constraint
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Composite_Constraint;
   end if;
--# expr-done 13796
Var_Expr_0 := Cast_Result;
if Var_Expr_0 /= No_Entity_Composite_Constraint then
   --# scope-start
   --# bind cc Var_Expr_0
--# expr-start 13797 '<FieldAccess for discriminant_params at nodes.lkt:24272:21>' Fld_1 ada/nodes.lkt:24272
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompositeConstraint.discriminant_params
Fld_1 := Libadalang.Implementation.Composite_Constraint_P_Discriminant_Params (Node => Var_Expr_0.Node, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 13797
Scope_Result := Fld_1;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3619;
   Result_Var := Scope_Result;
else
   Result_Var := No_Internal_Param_Actual_Array_Type;
end if;
      Inc_Ref (Result_Var);
         Property_Result := Result_Var;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1586;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1586;
                     Finalizer_Scope_3619;
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Discriminant_Constraints;
--# end
--# property-start '[dispatcher]TypeExpr.is_definite_subtype' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Type_Expr_P_Is_Definite_Subtype
  (Node : Bare_Type_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Type_Expr (Self.Kind) is
               when Ada_Anonymous_Type .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr =>
                  --# property-call-start TypeExpr.is_definite_subtype
                  Property_Result := Type_Expr_P_Is_Definite_Subtype
                    (Self
                        , E_Info
                    );
                  --# end
               when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
                  --# property-call-start SubtypeIndication.is_definite_subtype
                  Property_Result := Subtype_Indication_P_Is_Definite_Subtype
                    (Self
                        , E_Info
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Type_Expr_P_Is_Definite_Subtype;
--# end
--# property-start TypeExpr.custom_id_text ada/nodes.lkt:24280
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Custom_Id_Text
  (Node : Bare_Type_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_1588 with Inline_Always;
      Cast_Expr : Bare_Type_Expr;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : String_Type;
Dyn_Var_Bind_Result : String_Type;
            procedure Finalizer_Scope_1588 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_1588;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13800 '<bind at nodes.lkt:24281:9>' Dyn_Var_Bind_Result ada/nodes.lkt:24281
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 13799 '<FieldAccess for canonical_fully_qualified_name at nodes.lkt:24282:9>' Fld_1 ada/nodes.lkt:24282
--# expr-start 13798 '<FieldAccess for designated_type at nodes.lkt:24282:9>' Fld ada/nodes.lkt:24282
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 13798
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_fully_qualified_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Canonical_Fully_Qualified_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 13799
Dyn_Var_Bind_Result := Fld_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 13800
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1588;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1588;
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Custom_Id_Text;
--# end
--# property-start TypeExpr.is_definite_subtype ada/nodes.lkt:24277
pragma Warnings (Off, "is not referenced");
 function Type_Expr_P_Is_Definite_Subtype
  (Node : Bare_Type_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Type_Expr  := Bare_Type_Expr (Node);
     Ent : Internal_Entity_Type_Expr :=
       Internal_Entity_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13802 '<FieldAccess for is_definite_subtype at nodes.lkt:24278:9>' Fld_1 ada/nodes.lkt:24278
--# expr-start 13801 '<FieldAccess for designated_type_decl at nodes.lkt:24278:9>' Fld ada/nodes.lkt:24278
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13801
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_definite_subtype
Fld_1 := Libadalang.Implementation.Base_Type_Decl_P_Is_Definite_Subtype (Node => Fld.Node, Origin => No_Bare_Ada_Node, E_Info => Fld.Info);
--# end
--# expr-done 13802
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Type_Expr_P_Is_Definite_Subtype;
--# end
   --
   --  Primitives for Bare_Anonymous_Type
   --
      procedure Initialize_Fields_For_Anonymous_Type
        (Self : Bare_Anonymous_Type
         ; Anonymous_Type_F_Type_Decl : Bare_Anonymous_Type_Decl
        ) is
      begin
            Self.Anonymous_Type_F_Type_Decl := Anonymous_Type_F_Type_Decl;
      end Initialize_Fields_For_Anonymous_Type;
   function Anonymous_Type_F_Type_Decl
     (Node : Bare_Anonymous_Type) return Bare_Anonymous_Type_Decl
   is
   begin
         return Node.Anonymous_Type_F_Type_Decl;
   end;
--# property-start AnonymousType.designated_type ada/nodes.lkt:24292
pragma Warnings (Off, "is not referenced");
 function Anonymous_Type_P_Designated_Type
  (Node : Bare_Anonymous_Type
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Anonymous_Type  := Bare_Anonymous_Type (Node);
     Ent : Internal_Entity_Anonymous_Type :=
       Internal_Entity_Anonymous_Type'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Anonymous_Type_Decl;
Cast_Result : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 13803 '<FieldAccess for type_decl at nodes.lkt:24292:51>' Fld ada/nodes.lkt:24292
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Anonymous_Type_Decl (Node => Ent.Node.Anonymous_Type_F_Type_Decl, Info => Ent.Info);
--# expr-done 13803
      Cast_Result := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
         Property_Result := Cast_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Anonymous_Type_P_Designated_Type;
--# end
--# property-start AnonymousType.xref_equation ada/nodes.lkt:24295
pragma Warnings (Off, "is not referenced");
 function Anonymous_Type_P_Xref_Equation
  (Node : Bare_Anonymous_Type
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Anonymous_Type  := Bare_Anonymous_Type (Node);
     Ent : Internal_Entity_Anonymous_Type :=
       Internal_Entity_Anonymous_Type'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1590 with Inline_Always;
      Fld : Internal_Entity_Anonymous_Type_Decl;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1590 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1590;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13805 '<FieldAccess for sub_equation at nodes.lkt:24295:37>' Fld_1 ada/nodes.lkt:24295
--# expr-start 13804 '<FieldAccess for type_decl at nodes.lkt:24295:37>' Fld ada/nodes.lkt:24295
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Anonymous_Type_Decl (Node => Ent.Node.Anonymous_Type_F_Type_Decl, Info => Ent.Info);
--# expr-done 13804
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_1 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 13805
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1590;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1590;
            raise;
      end;
   return Property_Result;
end Anonymous_Type_P_Xref_Equation;
--# end
--# property-start AnonymousType.custom_id_text ada/nodes.lkt:24302
pragma Warnings (Off, "is not referenced");
 function Anonymous_Type_P_Custom_Id_Text
  (Node : Bare_Anonymous_Type
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Anonymous_Type  := Bare_Anonymous_Type (Node);
     Ent : Internal_Entity_Anonymous_Type :=
       Internal_Entity_Anonymous_Type'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_1591 with Inline_Always;
      Fld : Internal_Entity_Anonymous_Type_Decl;
Fld_1 : String_Type;
            procedure Finalizer_Scope_1591 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1591;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13807 '<FieldAccess for text at nodes.lkt:24302:36>' Fld_1 ada/nodes.lkt:24302
--# expr-start 13806 '<FieldAccess for type_decl at nodes.lkt:24302:36>' Fld ada/nodes.lkt:24302
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Anonymous_Type_Decl (Node => Ent.Node.Anonymous_Type_F_Type_Decl, Info => Ent.Info);
--# expr-done 13806
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Text (Node => Fld.Node);
--# expr-done 13807
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1591;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1591;
            raise;
      end;
   return Property_Result;
end Anonymous_Type_P_Custom_Id_Text;
--# end
   --
   --  Primitives for Bare_Enum_Lit_Synth_Type_Expr
   --
--# property-start EnumLitSynthTypeExpr.designated_type ada/nodes.lkt:24309
pragma Warnings (Off, "is not referenced");
 function Enum_Lit_Synth_Type_Expr_P_Designated_Type
  (Node : Bare_Enum_Lit_Synth_Type_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Enum_Lit_Synth_Type_Expr  := Bare_Enum_Lit_Synth_Type_Expr (Node);
     Ent : Internal_Entity_Enum_Lit_Synth_Type_Expr :=
       Internal_Entity_Enum_Lit_Synth_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity;
Cast_Result : Internal_Entity_Enum_Literal_Decl;
Fld_1 : Internal_Entity_Type_Decl;
Cast_Result_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
--# expr-start 13810 '<FieldAccess for enum_type at nodes.lkt:24310:9>' Fld_1 ada/nodes.lkt:24310
--# expr-start 13809 '<Cast to EnumLiteralDecl at nodes.lkt:24310:9>' Cast_Result ada/nodes.lkt:24310
--# expr-start 13808 '<parent at nodes.lkt:24310:9>' Fld ada/nodes.lkt:24310
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13808
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Enum_Literal_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Enum_Literal_Decl
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Cast_Result := No_Entity_Enum_Literal_Decl;
   end if;
--# expr-done 13809
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]EnumLiteralDecl.enum_type'
Fld_1 := Libadalang.Implementation.Dispatcher_Enum_Literal_Decl_P_Enum_Type (Node => Cast_Result.Node, E_Info => Cast_Result.Info);
--# end
--# expr-done 13810
      Cast_Result_1 := Create_Internal_Entity_Base_Type_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
         Property_Result := Cast_Result_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Enum_Lit_Synth_Type_Expr_P_Designated_Type;
--# end
--# property-start EnumLitSynthTypeExpr.custom_id_text ada/nodes.lkt:24312
pragma Warnings (Off, "is not referenced");
 function Enum_Lit_Synth_Type_Expr_P_Custom_Id_Text
  (Node : Bare_Enum_Lit_Synth_Type_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return String_Type
is
   Self : Bare_Enum_Lit_Synth_Type_Expr  := Bare_Enum_Lit_Synth_Type_Expr (Node);
     Ent : Internal_Entity_Enum_Lit_Synth_Type_Expr :=
       Internal_Entity_Enum_Lit_Synth_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : String_Type;
            procedure Finalizer_Scope_1593 with Inline_Always;
      Cast_Expr : Bare_Enum_Lit_Synth_Type_Expr;
Cast_Result : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld : Internal_Entity_Base_Type_Decl;
Fld_1 : String_Type;
Str : String_Type;
Concat_Result : String_Type;
Fld_2 : Internal_Entity;
Cast_Result_1 : Internal_Entity_Enum_Literal_Decl;
Fld_3 : Internal_Entity_Defining_Name;
Fld_4 : Symbol_Type_Array_Access;
Str_1 : String_Type;
Fld_5 : String_Type;
Concat_Result_1 : String_Type;
Dyn_Var_Bind_Result : String_Type;
            procedure Finalizer_Scope_1593 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Str);
                     Dec_Ref (Concat_Result);
                     Dec_Ref (Fld_4);
                     Dec_Ref (Str_1);
                     Dec_Ref (Fld_5);
                     Dec_Ref (Concat_Result_1);
                     Dec_Ref (Dyn_Var_Bind_Result);
            end Finalizer_Scope_1593;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13820 '<bind at nodes.lkt:24313:9>' Dyn_Var_Bind_Result ada/nodes.lkt:24313
Cast_Expr := Self; 
      Cast_Result := Cast_Expr;
Bound_Origin := Cast_Result; 
--# expr-start 13812 '<FieldAccess for canonical_fully_qualified_name at nodes.lkt:24315:9>' Fld_1 ada/nodes.lkt:24315
--# expr-start 13811 '<FieldAccess for designated_type at nodes.lkt:24315:9>' Fld ada/nodes.lkt:24315
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 13811
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.canonical_fully_qualified_name
Fld_1 := Libadalang.Implementation.Basic_Decl_P_Canonical_Fully_Qualified_Name (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 13812
--# expr-start 13813 '<String at nodes.lkt:24316:11>' Str ada/nodes.lkt:24316
Str := Create_String ("."); 
--# expr-done 13813
Concat_Result := Concat_String (Fld_1, Str); 
--# expr-start 13819 '<FieldAccess for sym_join at nodes.lkt:24319:11>' Fld_5 ada/nodes.lkt:24319
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13817 '<FieldAccess for as_symbol_array at nodes.lkt:24320:13>' Fld_4 ada/nodes.lkt:24320
--# expr-start 13816 '<FieldAccess for defining_name at nodes.lkt:24320:13>' Fld_3 ada/nodes.lkt:24320
--# expr-start 13815 '<Cast to EnumLiteralDecl at nodes.lkt:24320:13>' Cast_Result_1 ada/nodes.lkt:24320
--# expr-start 13814 '<parent at nodes.lkt:24320:13>' Fld_2 ada/nodes.lkt:24320
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13814
   if Fld_2.Node = null
      or else Fld_2.Node.Kind in Ada_Enum_Literal_Decl_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Enum_Literal_Decl
        (Node => Fld_2.Node,
         Info => Fld_2.Info);
   else
         Cast_Result_1 := No_Entity_Enum_Literal_Decl;
   end if;
--# expr-done 13815
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BasicDecl.defining_name
Fld_3 := Libadalang.Implementation.Basic_Decl_P_Defining_Name (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 13816
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.as_symbol_array'
Fld_4 := Libadalang.Implementation.Dispatcher_Name_P_As_Symbol_Array (Node => Fld_3.Node);
--# end
--# expr-done 13817
--# expr-start 13818 '<String at nodes.lkt:24321:13>' Str_1 ada/nodes.lkt:24321
Str_1 := Create_String (""); 
--# expr-done 13818
--# property-call-start AdaNode.sym_join
Fld_5 := Libadalang.Implementation.Ada_Node_P_Sym_Join (Node => Ent.Node, Syms => Fld_4, Sep => Str_1);
--# end
--# expr-done 13819
Concat_Result_1 := Concat_String (Concat_Result, Fld_5); 
Dyn_Var_Bind_Result := Concat_Result_1; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 13820
         Property_Result := Dyn_Var_Bind_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1593;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1593;
            raise;
      end;
   return Property_Result;
end Enum_Lit_Synth_Type_Expr_P_Custom_Id_Text;
--# end
   --
   --  Primitives for Bare_Subtype_Indication
   --
      procedure Initialize_Fields_For_Subtype_Indication
        (Self : Bare_Subtype_Indication
         ; Subtype_Indication_F_Has_Not_Null : Bare_Not_Null
         ; Subtype_Indication_F_Name : Bare_Name
         ; Subtype_Indication_F_Constraint : Bare_Constraint
        ) is
      begin
            Self.Subtype_Indication_F_Has_Not_Null := Subtype_Indication_F_Has_Not_Null;
            Self.Subtype_Indication_F_Name := Subtype_Indication_F_Name;
            Self.Subtype_Indication_F_Constraint := Subtype_Indication_F_Constraint;
      end Initialize_Fields_For_Subtype_Indication;
   function Subtype_Indication_F_Has_Not_Null
     (Node : Bare_Subtype_Indication) return Bare_Not_Null
   is
   begin
         return Node.Subtype_Indication_F_Has_Not_Null;
   end;
   function Subtype_Indication_F_Name
     (Node : Bare_Subtype_Indication) return Bare_Name
   is
   begin
         return Node.Subtype_Indication_F_Name;
   end;
   function Subtype_Indication_F_Constraint
     (Node : Bare_Subtype_Indication) return Bare_Constraint
   is
   begin
         return Node.Subtype_Indication_F_Constraint;
   end;
--# property-start SubtypeIndication.designated_type ada/nodes.lkt:24341
pragma Warnings (Off, "is not referenced");
 function Subtype_Indication_P_Designated_Type
  (Node : Bare_Subtype_Indication
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Subtype_Indication  := Bare_Subtype_Indication (Node);
     Ent : Internal_Entity_Subtype_Indication :=
       Internal_Entity_Subtype_Indication'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1594 with Inline_Always;
      Fld : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Name;
Fld_2 : Internal_Entity_Base_Type_Decl;
Dyn_Var_Bind_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1594 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Bound_Env);
            end Finalizer_Scope_1594;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13824 '<bind at nodes.lkt:24342:9>' Dyn_Var_Bind_Result ada/nodes.lkt:24342
--# expr-start 13821 '<FieldAccess for node_env at nodes.lkt:24342:20>' Fld ada/nodes.lkt:24342
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13821
Bound_Env := Fld; Inc_Ref (Bound_Env);
--# expr-start 13823 '<FieldAccess for designated_type_impl at nodes.lkt:24344:9>' Fld_2 ada/nodes.lkt:24344
--# expr-start 13822 '<FieldAccess for name at nodes.lkt:24344:9>' Fld_1 ada/nodes.lkt:24344
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Ent.Node.Subtype_Indication_F_Name, Info => Ent.Info);
--# expr-done 13822
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.designated_type_impl'
Fld_2 := Libadalang.Implementation.Dispatcher_Name_P_Designated_Type_Impl (Node => Fld_1.Node, Env => Bound_Env, Origin => Origin, E_Info => Fld_1.Info);
--# end
--# expr-done 13823
Dyn_Var_Bind_Result := Fld_2; 
--# expr-done 13824
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      Finalizer_Scope_1594;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1594;
            raise;
      end;
   return Property_Result;
end Subtype_Indication_P_Designated_Type;
--# end
--# property-start SubtypeIndication.is_definite_subtype ada/nodes.lkt:24347
pragma Warnings (Off, "is not referenced");
 function Subtype_Indication_P_Is_Definite_Subtype
  (Node : Bare_Subtype_Indication
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Subtype_Indication  := Bare_Subtype_Indication (Node);
     Ent : Internal_Entity_Subtype_Indication :=
       Internal_Entity_Subtype_Indication'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Boolean;
      Fld : Internal_Entity_Constraint;
Is_Null : Boolean;
Not_Val : Boolean;
Fld_1 : Internal_Entity_Base_Type_Decl;
Fld_2 : Boolean;
If_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13830 '<BooleanBinaryOp Or at nodes.lkt:24348:9>' If_Result ada/nodes.lkt:24348
--# expr-start 13827 '<Not at nodes.lkt:24348:9>' Not_Val ada/nodes.lkt:24348
--# expr-start 13826 '<IsNull at nodes.lkt:24348:13>' Is_Null ada/nodes.lkt:24348
--# expr-start 13825 '<FieldAccess for constraint at nodes.lkt:24348:13>' Fld ada/nodes.lkt:24348
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Constraint (Node => Ent.Node.Subtype_Indication_F_Constraint, Info => Ent.Info);
--# expr-done 13825
Is_Null := Fld.Node = null; 
--# expr-done 13826
Not_Val := not (Is_Null); 
--# expr-done 13827
if Not_Val then
   If_Result := True;
else
   --# expr-start 13829 '<FieldAccess for is_definite_subtype at nodes.lkt:24349:12>' Fld_2 ada/nodes.lkt:24349
--# expr-start 13828 '<FieldAccess for designated_type_decl at nodes.lkt:24349:12>' Fld_1 ada/nodes.lkt:24349
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld_1 := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13828
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start BaseTypeDecl.is_definite_subtype
Fld_2 := Libadalang.Implementation.Base_Type_Decl_P_Is_Definite_Subtype (Node => Fld_1.Node, Origin => No_Bare_Ada_Node, E_Info => Fld_1.Info);
--# end
--# expr-done 13829
   If_Result := Fld_2;
end if;
--# expr-done 13830
         Property_Result := If_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subtype_Indication_P_Is_Definite_Subtype;
--# end
--# property-start SubtypeIndication.complete_items ada/nodes.lkt:24356
pragma Warnings (Off, "is not referenced");
 function Subtype_Indication_P_Complete_Items
  (Node : Bare_Subtype_Indication
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Completion_Item_Array_Access
is
   Self : Bare_Subtype_Indication  := Bare_Subtype_Indication (Node);
     Ent : Internal_Entity_Subtype_Indication :=
       Internal_Entity_Subtype_Indication'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_1596 with Inline_Always;
      Match_0 : Internal_Entity_Base_Type_Decl;
Match_1 : Internal_Entity_Package_Decl;
Match_2 : Internal_Entity;
Fld : Lexical_Env := Empty_Env;
Env_Get_Result : Internal_Entity_Array_Access;
Cast_Expr : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Fld_1 : Internal_Entity_Info;
Fld_2 : Internal_Metadata;
Fld_3 : Boolean;
Fld_4 : Boolean;
Fld_5 : Internal_Entity;
Is_A : Boolean;
Fld_6 : Internal_Entity;
Fld_7 : Internal_Entity;
Cast_Expr_1 : Internal_Entity_Base_Type_Decl;
Cast_Result_1 : Internal_Entity;
Is_Equiv : Boolean;
If_Result : Boolean;
If_Result_1 : Integer;
Match_Prefix : Internal_Entity;
Cast_Result_2 : Internal_Entity_Base_Type_Decl;
Let_Result : Integer;
Scope_Result : Integer;
Cast_Result_3 : Internal_Entity_Package_Decl;
Let_Result_1 : Integer;
Scope_Result_1 : Integer;
Cast_Result_4 : Internal_Entity;
Let_Result_2 : Integer;
Scope_Result_2 : Integer;
Match_Result : Integer;
New_Struct : Internal_Completion_Item;
Map_Result : Internal_Completion_Item_Array_Access;
            procedure Finalizer_Scope_1596 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Env_Get_Result);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1596;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13847 '<Map at nodes.lkt:24357:9>' Map_Result ada/nodes.lkt:24357
   --# expr-start 13832 '<EnvGet at nodes.lkt:24357:9>' Env_Get_Result ada/nodes.lkt:24357
--# expr-start 13831 '<FieldAccess for children_env at nodes.lkt:24357:9>' Fld ada/nodes.lkt:24357
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Children_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13831
Env_Get_Result := Construct_Entity_Array (AST_Envs.Get (Self => Fld, Key => Thin (No_Symbol), Lookup_Kind => To_Lookup_Kind_Type (Recursive), Categories => (Inherited_Primitives => True, Nocat => True))); 
--# expr-done 13832
      declare
         Map_Result_Vec : Internal_Completion_Item_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Array_Access := Env_Get_Result;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_0
      --# expr-start 13846 '<New CompletionItem at nodes.lkt:24359:13>' New_Struct ada/nodes.lkt:24359
--# expr-start 13833 '<Cast to BasicDecl at nodes.lkt:24360:22>' Cast_Result ada/nodes.lkt:24360
Cast_Expr := Item_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 13833
--# expr-start 13836 '<FieldAccess for dottable_subp at nodes.lkt:24361:29>' Fld_3 ada/nodes.lkt:24361
--# expr-start 13835 '<FieldAccess for md at nodes.lkt:24361:29>' Fld_2 ada/nodes.lkt:24361
--# expr-start 13834 '<FieldAccess for info at nodes.lkt:24361:29>' Fld_1 ada/nodes.lkt:24361
Fld_1 := Item_0.Info;
--# expr-done 13834
Fld_2 := Fld_1.Md;
--# expr-done 13835
Fld_3 := Fld_2.Dottable_Subp;
--# expr-done 13836
--# expr-start 13837 '<FieldAccess for has_visibility at nodes.lkt:24362:28>' Fld_4 ada/nodes.lkt:24362
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.has_visibility
Fld_4 := Libadalang.Implementation.Ada_Node_P_Has_Visibility (Node => Self, Other_Entity => Item_0);
--# end
--# expr-done 13837
--# expr-start 13845 '<Match at nodes.lkt:24363:24>' Match_Result ada/nodes.lkt:24363
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_0; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Discrete_Base_Subtype_Decl .. Ada_Formal_Type_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Base_Type_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind btd Match_0
--# expr-start 13844 '<If at nodes.lkt:24370:25>' If_Result_1 ada/nodes.lkt:24370
--# expr-start 13843 '<BooleanBinaryOp And at nodes.lkt:24371:29>' If_Result ada/nodes.lkt:24371
--# expr-start 13839 '<IsA DerivedTypeDef at nodes.lkt:24371:29>' Is_A ada/nodes.lkt:24371
--# expr-start 13838 '<parent at nodes.lkt:24371:29>' Fld_5 ada/nodes.lkt:24371
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13838
Is_A := Fld_5.Node /= null 
and then Fld_5.Node.Kind in Ada_Derived_Type_Def_Range; 
--# expr-done 13839
if Is_A then
   --# expr-start 13842 '<Eq at nodes.lkt:24372:33>' Is_Equiv ada/nodes.lkt:24372
--# expr-start 13841 '<parent at nodes.lkt:24372:33>' Fld_7 ada/nodes.lkt:24372
--# expr-start 13840 '<parent at nodes.lkt:24372:33>' Fld_6 ada/nodes.lkt:24372
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_6 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13840
      if Fld_6.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Parent (Node => Fld_6.Node, E_Info => Fld_6.Info);
--# expr-done 13841
Cast_Expr_1 := Match_0; 
      Cast_Result_1 := Create_Internal_Entity
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
Is_Equiv := Equivalent (Fld_7, Cast_Result_1); 
--# expr-done 13842
   If_Result := Is_Equiv;
else
   If_Result := False;
end if;
--# expr-done 13843
if If_Result then
   If_Result_1 := 0;
else
   If_Result_1 := 100;
end if;
--# expr-done 13844
Let_Result := If_Result_1; 
--# end
Scope_Result := Let_Result;
   --# end
            Match_Result := Scope_Result; 
         when Ada_Package_Decl =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Package_Decl
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind _ Match_1
Let_Result_1 := 50; 
--# end
Scope_Result_1 := Let_Result_1;
   --# end
            Match_Result := Scope_Result_1; 
         when Ada_Abort_Absent .. Ada_Generic_Package_Internal | Ada_Abstract_Subp_Decl .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind _ Match_2
Let_Result_2 := 0; 
--# end
Scope_Result_2 := Let_Result_2;
   --# end
            Match_Result := Scope_Result_2; 
end case;
--# expr-done 13845
New_Struct := (Decl => Cast_Result, Is_Dot_Call => Fld_3, Is_Visible => Fld_4, Weight => Match_Result); 
--# expr-done 13846
         declare
            Item_To_Append : constant Internal_Completion_Item := New_Struct;
         begin
            Internal_Completion_Item_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Completion_Item_Array
           (Items_Count => Natural (Internal_Completion_Item_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Completion_Item_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Completion_Item_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Completion_Item_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13847
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1596;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1596;
            raise;
      end;
   return Property_Result;
end Subtype_Indication_P_Complete_Items;
--# end
--# property-start SubtypeIndication.xref_equation ada/nodes.lkt:24382
pragma Warnings (Off, "is not referenced");
 function Subtype_Indication_P_Xref_Equation
  (Node : Bare_Subtype_Indication
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Subtype_Indication  := Bare_Subtype_Indication (Node);
     Ent : Internal_Entity_Subtype_Indication :=
       Internal_Entity_Subtype_Indication'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1597 with Inline_Always;
            procedure Finalizer_Scope_3624 with Inline_Always;
      Var_Expr_0 : Internal_Entity_Constraint;
Fld : Internal_Entity_Name;
Fld_1 : Logic_Equation;
Fld_2 : Internal_Entity_Constraint;
Fld_3 : Logic_Equation;
Scope_Result : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var : Logic_Equation;
And_Pred : Logic_Equation;
            procedure Finalizer_Scope_1597 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var);
                     Dec_Ref (And_Pred);
            end Finalizer_Scope_1597;
            procedure Finalizer_Scope_3624 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3624;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13852 '<LogicBinaryOp And at nodes.lkt:24385:9>' And_Pred ada/nodes.lkt:24385
--# expr-start 13849 '<FieldAccess for subtype_indication_equation at nodes.lkt:24385:9>' Fld_1 ada/nodes.lkt:24385
--# expr-start 13848 '<FieldAccess for name at nodes.lkt:24385:9>' Fld ada/nodes.lkt:24385
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Subtype_Indication_F_Name, Info => Ent.Info);
--# expr-done 13848
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.subtype_indication_equation
Fld_1 := Libadalang.Implementation.Name_P_Subtype_Indication_Equation (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 13849
--# expr-start 13850 '<FieldAccess for constraint at nodes.lkt:24386:14>' Fld_2 ada/nodes.lkt:24386
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Constraint (Node => Ent.Node.Subtype_Indication_F_Constraint, Info => Ent.Info);
--# expr-done 13850
Var_Expr_0 := Fld_2;
if Var_Expr_0 /= No_Entity_Constraint then
   --# scope-start
   --# bind c Var_Expr_0
--# expr-start 13851 '<FieldAccess for sub_equation at nodes.lkt:24386:40>' Fld_3 ada/nodes.lkt:24386
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_3 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Var_Expr_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 13851
Scope_Result := Fld_3;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3624;
   Result_Var := Scope_Result;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24386:70") else null)); 
   Result_Var := True_Rel;
end if;
      Inc_Ref (Result_Var);
And_Pred := Create_And (Fld_1, Result_Var, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24385:9") else null)); 
--# expr-done 13852
         Property_Result := And_Pred;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1597;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1597;
                     Finalizer_Scope_3624;
            raise;
      end;
   return Property_Result;
end Subtype_Indication_P_Xref_Equation;
--# end
--# property-start SubtypeIndication.discrete_range ada/nodes.lkt:24388
pragma Warnings (Off, "is not referenced");
 function Subtype_Indication_P_Discrete_Range
  (Node : Bare_Subtype_Indication
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Discrete_Range
is
   Self : Bare_Subtype_Indication  := Bare_Subtype_Indication (Node);
     Ent : Internal_Entity_Subtype_Indication :=
       Internal_Entity_Subtype_Indication'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Discrete_Range;
      Local_Rc : Internal_Entity_Range_Constraint;
Var_Expr_0 : Internal_Entity_Range_Constraint;
Fld : Internal_Entity_Constraint;
Cast_Result : Internal_Entity_Range_Constraint;
Fld_1 : Internal_Entity_Range_Spec;
Fld_2 : Internal_Entity_Expr;
Fld_3 : Internal_Discrete_Range;
Scope_Result : Internal_Discrete_Range;
Fld_4 : Internal_Entity_Base_Type_Decl;
Fld_5 : Internal_Discrete_Range;
Result_Var : Internal_Discrete_Range;
Let_Result : Internal_Discrete_Range;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13860 '<Let at nodes.lkt:24389:9>' Let_Result ada/nodes.lkt:24389
--# scope-start
--# expr-start 13854 '<Cast to RangeConstraint at nodes.lkt:24389:18>' Cast_Result ada/nodes.lkt:24389
--# expr-start 13853 '<FieldAccess for constraint at nodes.lkt:24389:18>' Fld ada/nodes.lkt:24389
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Constraint (Node => Ent.Node.Subtype_Indication_F_Constraint, Info => Ent.Info);
--# expr-done 13853
   if Fld.Node = null
      or else Fld.Node.Kind in Ada_Range_Constraint_Range
   then
      Cast_Result := Create_Internal_Entity_Range_Constraint
        (Node => Fld.Node,
         Info => Fld.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 13854
Local_Rc := Cast_Result; 
--# bind rc Local_Rc
Var_Expr_0 := Local_Rc;
if Var_Expr_0 /= No_Entity_Range_Constraint then
   --# scope-start
   --# bind r Var_Expr_0
--# expr-start 13857 '<FieldAccess for discrete_range at nodes.lkt:24392:20>' Fld_3 ada/nodes.lkt:24392
--# expr-start 13856 '<FieldAccess for range at nodes.lkt:24392:20>' Fld_2 ada/nodes.lkt:24392
--# expr-start 13855 '<FieldAccess for range at nodes.lkt:24392:20>' Fld_1 ada/nodes.lkt:24392
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Range_Spec (Node => Var_Expr_0.Node.Range_Constraint_F_Range, Info => Var_Expr_0.Info);
--# expr-done 13855
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Expr (Node => Fld_1.Node.Range_Spec_F_Range, Info => Fld_1.Info);
--# expr-done 13856
      if Fld_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.discrete_range
Fld_3 := Libadalang.Implementation.Expr_P_Discrete_Range (Node => Fld_2.Node, E_Info => Fld_2.Info);
--# end
--# expr-done 13857
Scope_Result := Fld_3;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 13859 '<FieldAccess for discrete_range at nodes.lkt:24395:25>' Fld_5 ada/nodes.lkt:24395
--# expr-start 13858 '<FieldAccess for designated_type_decl at nodes.lkt:24395:25>' Fld_4 ada/nodes.lkt:24395
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start TypeExpr.designated_type_decl
Fld_4 := Libadalang.Implementation.Type_Expr_P_Designated_Type_Decl (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13858
      if Fld_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseTypeDecl.discrete_range'
Fld_5 := Libadalang.Implementation.Dispatcher_Base_Type_Decl_P_Discrete_Range (Node => Fld_4.Node, E_Info => Fld_4.Info);
--# end
--# expr-done 13859
   Result_Var := Fld_5;
end if;
Let_Result := Result_Var; 
--# end
--# expr-done 13860
         Property_Result := Let_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subtype_Indication_P_Discrete_Range;
--# end
--# property-start SubtypeIndication.is_static_subtype ada/nodes.lkt:24403
pragma Warnings (Off, "is not referenced");
 function Subtype_Indication_P_Is_Static_Subtype
  (Node : Bare_Subtype_Indication
      ; Imprecise_Fallback : Boolean
         := False
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Subtype_Indication  := Bare_Subtype_Indication (Node);
     Ent : Internal_Entity_Subtype_Indication :=
       Internal_Entity_Subtype_Indication'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind imprecise_fallback Imprecise_Fallback
   Property_Result : Boolean;
      Var_Expr_0 : Internal_Entity_Constraint;
Fld : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
Fld_1 : Internal_Entity;
Cast_Result : Internal_Entity_Basic_Decl;
Sym : Symbol_Type;
Fld_2 : Boolean;
Not_Val : Boolean;
Fld_3 : Internal_Entity_Constraint;
Fld_4 : Boolean;
Scope_Result : Boolean;
Fld_5 : Internal_Entity_Base_Type_Decl;
Fld_6 : Boolean;
Result_Var : Boolean;
If_Result : Boolean;
Dyn_Var_Bind_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
            Populate_Lexical_Env_For_Unit (Self);
      end if;
      begin
   --# scope-start
         --# expr-start 13872 '<bind at nodes.lkt:24404:9>' Dyn_Var_Bind_Result ada/nodes.lkt:24404
--# expr-start 13861 '<FieldAccess for origin_node at nodes.lkt:24404:23>' Fld ada/nodes.lkt:24404
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Self);
--# end
--# expr-done 13861
Bound_Origin := Fld; 
--# expr-start 13871 '<BooleanBinaryOp And at nodes.lkt:24406:9>' If_Result ada/nodes.lkt:24406
--# expr-start 13866 '<Not at nodes.lkt:24406:9>' Not_Val ada/nodes.lkt:24406
--# expr-start 13865 '<FieldAccess for has_aspect at nodes.lkt:24406:13>' Fld_2 ada/nodes.lkt:24406
--# expr-start 13863 '<Cast to BasicDecl at nodes.lkt:24406:13>' Cast_Result ada/nodes.lkt:24406
--# expr-start 13862 '<FieldAccess for semantic_parent at nodes.lkt:24406:13>' Fld_1 ada/nodes.lkt:24406
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.semantic_parent
Fld_1 := Libadalang.Implementation.Ada_Node_P_Semantic_Parent (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13862
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Basic_Decl
   then
      Cast_Result := Create_Internal_Entity_Basic_Decl
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Cast_Result := No_Entity_Basic_Decl;
   end if;
--# expr-done 13863
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13864 '<Symbol Dynamic_Predicate at nodes.lkt:24407:13>' Sym ada/nodes.lkt:24407
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Dynamic_Predicate); 
--# expr-done 13864
--# property-call-start BasicDecl.has_aspect
Fld_2 := Libadalang.Implementation.Basic_Decl_P_Has_Aspect (Node => Cast_Result.Node, Name => Sym, Imprecise_Fallback => Imprecise_Fallback, E_Info => Cast_Result.Info);
--# end
--# expr-done 13865
Not_Val := not (Fld_2); 
--# expr-done 13866
if Not_Val then
--# expr-start 13867 '<FieldAccess for constraint at nodes.lkt:24409:13>' Fld_3 ada/nodes.lkt:24409
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Create_Internal_Entity_Constraint (Node => Ent.Node.Subtype_Indication_F_Constraint, Info => Ent.Info);
--# expr-done 13867
Var_Expr_0 := Fld_3;
if Var_Expr_0 /= No_Entity_Constraint then
   --# scope-start
   --# bind c Var_Expr_0
--# expr-start 13868 '<FieldAccess for is_static at nodes.lkt:24410:20>' Fld_4 ada/nodes.lkt:24410
      if Var_Expr_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Constraint.is_static
Fld_4 := Libadalang.Implementation.Constraint_P_Is_Static (Node => Var_Expr_0.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Var_Expr_0.Info);
--# end
--# expr-done 13868
Scope_Result := Fld_4;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 13870 '<FieldAccess for is_static_decl at nodes.lkt:24411:25>' Fld_6 ada/nodes.lkt:24411
--# expr-start 13869 '<FieldAccess for designated_type at nodes.lkt:24411:25>' Fld_5 ada/nodes.lkt:24411
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]TypeExpr.designated_type'
Fld_5 := Libadalang.Implementation.Dispatcher_Type_Expr_P_Designated_Type (Node => Ent.Node, Origin => Bound_Origin, E_Info => Ent.Info);
--# end
--# expr-done 13869
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.is_static_decl'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Is_Static_Decl (Node => Fld_5.Node, Imprecise_Fallback => Imprecise_Fallback, E_Info => Fld_5.Info);
--# end
--# expr-done 13870
   Result_Var := Fld_6;
end if;
   If_Result := Result_Var;
else
   If_Result := False;
end if;
--# expr-done 13871
Dyn_Var_Bind_Result := If_Result; 
--# expr-done 13872
         Property_Result := Dyn_Var_Bind_Result;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Subtype_Indication_P_Is_Static_Subtype;
--# end
   --
   --  Primitives for Bare_Constrained_Subtype_Indication
   --
      procedure Initialize_Fields_For_Constrained_Subtype_Indication
        (Self : Bare_Constrained_Subtype_Indication
         ; Subtype_Indication_F_Has_Not_Null : Bare_Not_Null
         ; Subtype_Indication_F_Name : Bare_Name
         ; Subtype_Indication_F_Constraint : Bare_Constraint
        ) is
      begin
            Initialize_Fields_For_Subtype_Indication
              (Self, Subtype_Indication_F_Has_Not_Null, Subtype_Indication_F_Name, Subtype_Indication_F_Constraint);
      end Initialize_Fields_For_Constrained_Subtype_Indication;
   --
   --  Primitives for Bare_Discrete_Subtype_Indication
   --
      procedure Initialize_Fields_For_Discrete_Subtype_Indication
        (Self : Bare_Discrete_Subtype_Indication
         ; Subtype_Indication_F_Has_Not_Null : Bare_Not_Null
         ; Subtype_Indication_F_Name : Bare_Name
         ; Subtype_Indication_F_Constraint : Bare_Constraint
        ) is
      begin
            Initialize_Fields_For_Subtype_Indication
              (Self, Subtype_Indication_F_Has_Not_Null, Subtype_Indication_F_Name, Subtype_Indication_F_Constraint);
      end Initialize_Fields_For_Discrete_Subtype_Indication;
   --
   --  Primitives for Bare_Synthetic_Type_Expr
   --
      procedure Initialize_Fields_For_Synthetic_Type_Expr
        (Self : Bare_Synthetic_Type_Expr
         ; Synthetic_Type_Expr_F_Target_Type : Bare_Base_Type_Decl
        ) is
      begin
            Self.Synthetic_Type_Expr_F_Target_Type := Synthetic_Type_Expr_F_Target_Type;
      end Initialize_Fields_For_Synthetic_Type_Expr;
   function Synthetic_Type_Expr_F_Target_Type
     (Node : Bare_Synthetic_Type_Expr) return Bare_Base_Type_Decl
   is
   begin
         return Node.Synthetic_Type_Expr_F_Target_Type;
   end;
--# property-start SyntheticTypeExpr.designated_type ada/nodes.lkt:24432
pragma Warnings (Off, "is not referenced");
 function Synthetic_Type_Expr_P_Designated_Type
  (Node : Bare_Synthetic_Type_Expr
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Synthetic_Type_Expr  := Bare_Synthetic_Type_Expr (Node);
     Ent : Internal_Entity_Synthetic_Type_Expr :=
       Internal_Entity_Synthetic_Type_Expr'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1600 with Inline_Always;
      Local_Relevant_Rebindings : Env_Rebindings;
Fld : Internal_Entity_Info;
Fld_1 : Bare_Base_Type_Decl;
Fld_2 : Lexical_Env := Empty_Env;
Shed_Entity_Info : Internal_Entity_Info;
Fld_3 : Env_Rebindings;
Fld_4 : Bare_Base_Type_Decl;
Fld_5 : Internal_Entity_Info;
Fld_6 : Boolean;
New_Struct : Internal_Entity_Info;
New_Struct_1 : Internal_Entity_Base_Type_Decl;
Let_Result : Internal_Entity_Base_Type_Decl;
            procedure Finalizer_Scope_1600 is
            begin
                     Dec_Ref (Fld_2);
            end Finalizer_Scope_1600;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13883 '<Let at nodes.lkt:24441:9>' Let_Result ada/nodes.lkt:24441
--# scope-start
--# expr-start 13877 '<FieldAccess for rebindings at nodes.lkt:24442:13>' Fld_3 ada/nodes.lkt:24442
--# expr-start 13876 '<shed_rebindings at nodes.lkt:24442:13>' Shed_Entity_Info ada/nodes.lkt:24442
--# expr-start 13873 '<FieldAccess for info at nodes.lkt:24442:59>' Fld ada/nodes.lkt:24442
Fld := Ent.Info;
--# expr-done 13873
--# expr-start 13875 '<FieldAccess for children_env at nodes.lkt:24442:13>' Fld_2 ada/nodes.lkt:24442
--# expr-start 13874 '<FieldAccess for target_type at nodes.lkt:24442:13>' Fld_1 ada/nodes.lkt:24442
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Self.Synthetic_Type_Expr_F_Target_Type;
--# expr-done 13874
      if Fld_1 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Libadalang.Implementation.Children_Env (Node => Fld_1);
--# expr-done 13875
Shed_Entity_Info := AST_Envs.Shed_Rebindings (Fld, Fld_2); 
--# expr-done 13876
Fld_3 := Shed_Entity_Info.Rebindings;
--# expr-done 13877
Local_Relevant_Rebindings := Fld_3; 
--# bind relevant_rebindings Local_Relevant_Rebindings
--# expr-start 13882 '<New BaseTypeDecl.entity at nodes.lkt:24446:9>' New_Struct_1 ada/nodes.lkt:24446
--# expr-start 13880 '<New EntityInfo at nodes.lkt:24448:18>' New_Struct ada/nodes.lkt:24448
--# expr-start 13879 '<FieldAccess for from_rebound at nodes.lkt:24451:30>' Fld_6 ada/nodes.lkt:24451
--# expr-start 13878 '<FieldAccess for info at nodes.lkt:24451:30>' Fld_5 ada/nodes.lkt:24451
Fld_5 := Ent.Info;
--# expr-done 13878
Fld_6 := Fld_5.From_Rebound;
--# expr-done 13879
New_Struct := (From_Rebound => Fld_6, Md => No_Metadata, Rebindings => Local_Relevant_Rebindings); 
--# expr-done 13880
--# expr-start 13881 '<FieldAccess for target_type at nodes.lkt:24447:18>' Fld_4 ada/nodes.lkt:24447
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Self.Synthetic_Type_Expr_F_Target_Type;
--# expr-done 13881
New_Struct_1 := (Info => New_Struct, Node => Fld_4); 
--# expr-done 13882
Let_Result := New_Struct_1; 
--# end
--# expr-done 13883
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_1600;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1600;
            raise;
      end;
   return Property_Result;
end Synthetic_Type_Expr_P_Designated_Type;
--# end
   --
   --  Primitives for Bare_Unconstrained_Array_Index
   --
      procedure Initialize_Fields_For_Unconstrained_Array_Index
        (Self : Bare_Unconstrained_Array_Index
         ; Unconstrained_Array_Index_F_Subtype_Name : Bare_Name
         ; Unconstrained_Array_Index_F_Lower_Bound : Bare_Expr
        ) is
      begin
            Self.Unconstrained_Array_Index_F_Subtype_Name := Unconstrained_Array_Index_F_Subtype_Name;
            Self.Unconstrained_Array_Index_F_Lower_Bound := Unconstrained_Array_Index_F_Lower_Bound;
      end Initialize_Fields_For_Unconstrained_Array_Index;
   function Unconstrained_Array_Index_F_Subtype_Name
     (Node : Bare_Unconstrained_Array_Index) return Bare_Name
   is
   begin
         return Node.Unconstrained_Array_Index_F_Subtype_Name;
   end;
   function Unconstrained_Array_Index_F_Lower_Bound
     (Node : Bare_Unconstrained_Array_Index) return Bare_Expr
   is
   begin
         return Node.Unconstrained_Array_Index_F_Lower_Bound;
   end;
--# property-start UnconstrainedArrayIndex.designated_type ada/nodes.lkt:24466
pragma Warnings (Off, "is not referenced");
 function Unconstrained_Array_Index_P_Designated_Type
  (Node : Bare_Unconstrained_Array_Index
      ; Origin : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Type_Decl
is
   Self : Bare_Unconstrained_Array_Index  := Bare_Unconstrained_Array_Index (Node);
     Ent : Internal_Entity_Unconstrained_Array_Index :=
       Internal_Entity_Unconstrained_Array_Index'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind origin Origin
   Property_Result : Internal_Entity_Base_Type_Decl;
      Fld : Internal_Entity_Name;
Fld_1 : Internal_Entity_Base_Type_Decl;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13885 '<FieldAccess for name_designated_type at nodes.lkt:24467:9>' Fld_1 ada/nodes.lkt:24467
--# expr-start 13884 '<FieldAccess for subtype_name at nodes.lkt:24467:9>' Fld ada/nodes.lkt:24467
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name (Node => Ent.Node.Unconstrained_Array_Index_F_Subtype_Name, Info => Ent.Info);
--# expr-done 13884
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_1 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Fld.Node, E_Info => Fld.Info);
--# end
--# expr-done 13885
         Property_Result := Fld_1;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Unconstrained_Array_Index_P_Designated_Type;
--# end
   --
   --  Primitives for Bare_Until_Node
   --
--# property-start '[dispatcher]Until.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_Until_Node_P_As_Bool
  (Node : Bare_Until_Node
  )
   return Boolean
is
   Self : Bare_Until_Node  := Bare_Until_Node (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_Until_Node (Self.Kind) is
               when Ada_Until_Absent =>
                  --# property-call-start Until.Absent.as_bool
                  Property_Result := Until_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_Until_Present =>
                  --# property-call-start Until.Present.as_bool
                  Property_Result := Until_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_Until_Node_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Until_Absent
   --
--# property-start Until.Absent.as_bool ada/nodes.lkt:24472
pragma Warnings (Off, "is not referenced");
 function Until_Absent_P_As_Bool
  (Node : Bare_Until_Absent
  )
   return Boolean
is
   Self : Bare_Until_Absent  := Bare_Until_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Until_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Until_Present
   --
--# property-start Until.Present.as_bool ada/nodes.lkt:24472
pragma Warnings (Off, "is not referenced");
 function Until_Present_P_As_Bool
  (Node : Bare_Until_Present
  )
   return Boolean
is
   Self : Bare_Until_Present  := Bare_Until_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Until_Present_P_As_Bool;
--# end
   --
   --  Primitives for Bare_Use_Clause
   --
--# property-start UseClause.xref_entry_point ada/nodes.lkt:24478
pragma Warnings (Off, "is not referenced");
 function Use_Clause_P_Xref_Entry_Point
  (Node : Bare_Use_Clause
  )
   return Boolean
is
   Self : Bare_Use_Clause  := Bare_Use_Clause (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Use_Clause_P_Xref_Entry_Point;
--# end
--# property-start UseClause.used_envs ada/nodes.lkt:24482
pragma Warnings (Off, "is not referenced");
 function Use_Clause_P_Used_Envs
  (Node : Bare_Use_Clause
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Use_Clause  := Bare_Use_Clause (Node);
     Ent : Internal_Entity_Use_Clause :=
       Internal_Entity_Use_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1606 with Inline_Always;
            procedure Finalizer_Scope_3627 with Inline_Always;
            procedure Finalizer_Scope_3628 with Inline_Always;
            procedure Finalizer_Scope_3629 with Inline_Always;
      Match_0 : Internal_Entity_Use_Package_Clause;
Match_1 : Internal_Entity_Use_Type_Clause;
Fld : Lexical_Env_Array_Access;
Group_Env : Lexical_Env := Empty_Env;
Fld_1 : Internal_Entity_Name_List;
Fld_2 : Bare_Name_List;
Fld_3 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_4 : Lexical_Env := Empty_Env;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Lexical_Env_Array_Access;
Group_Env_1 : Lexical_Env := Empty_Env;
Match_Prefix : Internal_Entity_Use_Clause;
Cast_Result : Internal_Entity_Use_Package_Clause;
Let_Result : Lexical_Env := Empty_Env;
Scope_Result : Lexical_Env := Empty_Env;
Cast_Result_1 : Internal_Entity_Use_Type_Clause;
Let_Result_1 : Lexical_Env := Empty_Env;
Scope_Result_1 : Lexical_Env := Empty_Env;
Match_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1606 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_1606;
            procedure Finalizer_Scope_3627 is
            begin
                     Dec_Ref (Fld);
                     Dec_Ref (Group_Env);
            end Finalizer_Scope_3627;
            procedure Finalizer_Scope_3628 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Group_Env_1);
            end Finalizer_Scope_3628;
            procedure Finalizer_Scope_3629 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3629;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13892 '<Match at nodes.lkt:24482:35>' Match_Result ada/nodes.lkt:24482
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Ent; 
case Ada_Use_Clause (Match_Prefix.Node.Kind) is
         when Ada_Use_Package_Clause =>
   --# scope-start
--# scope-start
      Cast_Result := Create_Internal_Entity_Use_Package_Clause
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result; 
--# bind upc Match_0
--# expr-start 13887 '<env_group at nodes.lkt:24483:39>' Group_Env ada/nodes.lkt:24483
--# expr-start 13886 '<FieldAccess for designated_envs at nodes.lkt:24483:39>' Fld ada/nodes.lkt:24483
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UsePackageClause.designated_envs
Fld := Libadalang.Implementation.Use_Package_Clause_P_Designated_Envs (Node => Match_0.Node, E_Info => Match_0.Info);
--# end
--# expr-done 13886
Group_Env := Group (Fld, No_Metadata); 
--# expr-done 13887
Let_Result := Group_Env; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3627;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Use_Type_Clause =>
   --# scope-start
--# scope-start
      Cast_Result_1 := Create_Internal_Entity_Use_Type_Clause
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_1; 
--# bind utc Match_1
--# expr-start 13891 '<env_group at nodes.lkt:24485:13>' Group_Env_1 ada/nodes.lkt:24485
--# expr-start 13890 '<Map at nodes.lkt:24485:13>' Map_Result ada/nodes.lkt:24485
   --# expr-start 13888 '<FieldAccess for types at nodes.lkt:24485:13>' Fld_1 ada/nodes.lkt:24485
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name_List (Node => Match_1.Node.Use_Type_Clause_F_Types, Info => Match_1.Info);
--# expr-done 13888
Fld_2 := Fld_1.Node;
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      if Fld_2 = null then
      Map_Result := Create_Lexical_Env_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld_2;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_3 := Fld_1.Info;
As_Entity := (Info => Fld_3, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind n Item_0
      --# expr-start 13889 '<FieldAccess for name_designated_type_env at nodes.lkt:24485:34>' Fld_4 ada/nodes.lkt:24485
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type_env
Fld_4 := Libadalang.Implementation.Name_P_Name_Designated_Type_Env (Node => Item_0.Node, E_Info => Item_0.Info);
--# end
--# expr-done 13889
         declare
            Item_To_Append : constant Lexical_Env := Fld_4;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3629;
         end loop;
      end;
      end if;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13890
Group_Env_1 := Group (Map_Result, No_Metadata); 
--# expr-done 13891
Let_Result_1 := Group_Env_1; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3628;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
end case;
--# expr-done 13892
         Property_Result := Match_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1606;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1606;
                     Finalizer_Scope_3627;
                     Finalizer_Scope_3628;
                     Finalizer_Scope_3629;
            raise;
      end;
   return Property_Result;
end Use_Clause_P_Used_Envs;
--# end
--# property-start UseClause.initial_env ada/nodes.lkt:24490
pragma Warnings (Off, "is not referenced");
 function Use_Clause_P_Initial_Env
  (Node : Bare_Use_Clause
  )
   return Internal_Designated_Env
is
   Self : Bare_Use_Clause  := Bare_Use_Clause (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1607 with Inline_Always;
      Sym : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
New_Struct_1 : Internal_Designated_Env := No_Designated_Env;
Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Is_A : Boolean;
If_Result : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1607 is
            begin
                     Dec_Ref (New_Struct);
                     Dec_Ref (New_Struct_1);
                     Dec_Ref (If_Result);
            end Finalizer_Scope_1607;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13899 '<If at nodes.lkt:24491:9>' If_Result ada/nodes.lkt:24491
--# expr-start 13895 '<IsA CompilationUnit at nodes.lkt:24491:12>' Is_A ada/nodes.lkt:24491
--# expr-start 13894 '<parent at nodes.lkt:24491:12>' Fld_1 ada/nodes.lkt:24491
--# expr-start 13893 '<parent at nodes.lkt:24491:12>' Fld ada/nodes.lkt:24491
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13893
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 13894
Is_A := Fld_1 /= null 
and then Fld_1.Kind in Ada_Compilation_Unit_Range; 
--# expr-done 13895
if Is_A then
   --# expr-start 13897 '<New DesignatedEnv at nodes.lkt:24493:13>' New_Struct ada/nodes.lkt:24493
--# expr-start 13896 '<Symbol Standard at nodes.lkt:24495:26>' Sym ada/nodes.lkt:24495
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Standard); 
--# expr-done 13896
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Sym, Kind => Named_Env); 
--# expr-done 13897
   If_Result := New_Struct;
else
   --# expr-start 13898 '<New DesignatedEnv at nodes.lkt:24499:13>' New_Struct_1 ada/nodes.lkt:24499
Inc_Ref (Empty_Env);
New_Struct_1 := (Direct_Env => Empty_Env, Env_Name => No_Symbol, Kind => Current_Env); 
--# expr-done 13898
   If_Result := New_Struct_1;
end if;
      Inc_Ref (If_Result);
--# expr-done 13899
         Property_Result := If_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1607;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1607;
            raise;
      end;
   return Property_Result;
end Use_Clause_P_Initial_Env;
--# end
   --
   --  Primitives for Bare_Use_Package_Clause
   --
      procedure Use_Package_Clause_Pre_Env_Actions
        (Self            : Bare_Use_Package_Clause;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_226 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:24536:9");
      end;
      end;
      procedure Use_Package_Clause_Post_Env_Actions
        (Self : Bare_Use_Package_Clause; State : in out PLE_Node_State) is
      begin
      if Libadalang.Implementation.Ref_Cond_228 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_227 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Use_Package_Name_Designated_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Use_Package_Clause
        (Self : Bare_Use_Package_Clause
         ; Use_Package_Clause_F_Packages : Bare_Name_List
        ) is
      begin
            Self.Use_Package_Clause_F_Packages := Use_Package_Clause_F_Packages;
      end Initialize_Fields_For_Use_Package_Clause;
   function Use_Package_Clause_F_Packages
     (Node : Bare_Use_Package_Clause) return Bare_Name_List
   is
   begin
         return Node.Use_Package_Clause_F_Packages;
   end;
--# property-start UsePackageClause.designated_env ada/nodes.lkt:24513
pragma Warnings (Off, "is not referenced");
 function Use_Package_Clause_P_Designated_Env
  (Node : Bare_Use_Package_Clause
      ; Index : Integer
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env
is
   Self : Bare_Use_Package_Clause  := Bare_Use_Package_Clause (Node);
     Ent : Internal_Entity_Use_Package_Clause :=
       Internal_Entity_Use_Package_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind index Index
   Property_Result : Lexical_Env;
            procedure Finalizer_Scope_1608 with Inline_Always;
      Local_Pkg : Bare_Name;
Fld : Bare_Name_List;
Get_Result : Bare_Name;
Fld_1 : Lexical_Env := Empty_Env;
Bound_Env : Lexical_Env := Empty_Env;
Fld_2 : Bare_Ada_Node;
Bound_Origin : Bare_Ada_Node;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Fld_3 : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result : Lexical_Env := Empty_Env;
Dyn_Var_Bind_Result_1 : Lexical_Env := Empty_Env;
Let_Result : Lexical_Env := Empty_Env;
            procedure Finalizer_Scope_1608 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Bound_Env);
                     Dec_Ref (Fld_3);
                     Dec_Ref (Dyn_Var_Bind_Result);
                     Dec_Ref (Dyn_Var_Bind_Result_1);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1608;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13908 '<Let at nodes.lkt:24514:9>' Let_Result ada/nodes.lkt:24514
--# scope-start
--# expr-start 13901 '<at at nodes.lkt:24514:19>' Get_Result ada/nodes.lkt:24514
--# expr-start 13900 '<FieldAccess for packages at nodes.lkt:24514:19>' Fld ada/nodes.lkt:24514
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Use_Package_Clause_F_Packages;
--# expr-done 13900
Get_Result := Get (Self, Fld, Index, True); 
--# expr-done 13901
Local_Pkg := Get_Result; 
--# bind pkg Local_Pkg
--# expr-start 13907 '<bind at nodes.lkt:24517:13>' Dyn_Var_Bind_Result_1 ada/nodes.lkt:24517
--# expr-start 13902 '<FieldAccess for node_env at nodes.lkt:24517:24>' Fld_1 ada/nodes.lkt:24517
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Libadalang.Implementation.Node_Env (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13902
Bound_Env := Fld_1; Inc_Ref (Bound_Env);
--# expr-start 13906 '<bind at nodes.lkt:24518:13>' Dyn_Var_Bind_Result ada/nodes.lkt:24518
--# expr-start 13903 '<FieldAccess for origin_node at nodes.lkt:24518:27>' Fld_2 ada/nodes.lkt:24518
      if Local_Pkg = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.origin_node
Fld_2 := Libadalang.Implementation.Ada_Node_P_Origin_Node (Node => Local_Pkg);
--# end
--# expr-done 13903
Bound_Origin := Fld_2; 
--# expr-start 13905 '<FieldAccess for designated_env at nodes.lkt:24520:13>' Fld_3 ada/nodes.lkt:24520
--# expr-start 13904 '<as_bare_entity at nodes.lkt:24520:13>' If_Result ada/nodes.lkt:24520
Is_Null := Local_Pkg = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
As_Entity := (Info => No_Entity_Info, Node => Local_Pkg); 
   If_Result := As_Entity;
end if;
--# expr-done 13904
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Expr.designated_env'
Fld_3 := Libadalang.Implementation.Dispatcher_Expr_P_Designated_Env (Node => If_Result.Node, Env => Bound_Env, Origin => Bound_Origin, No_Visibility => False, E_Info => If_Result.Info);
--# end
--# expr-done 13905
Dyn_Var_Bind_Result := Fld_3; Inc_Ref (Dyn_Var_Bind_Result);
--# expr-done 13906
Dyn_Var_Bind_Result_1 := Dyn_Var_Bind_Result; Inc_Ref (Dyn_Var_Bind_Result_1);
--# expr-done 13907
Let_Result := Dyn_Var_Bind_Result_1; Inc_Ref (Let_Result);
--# end
--# expr-done 13908
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1608;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1608;
            raise;
      end;
   return Property_Result;
end Use_Package_Clause_P_Designated_Env;
--# end
--# property-start UsePackageClause.designated_envs ada/nodes.lkt:24528
pragma Warnings (Off, "is not referenced");
 function Use_Package_Clause_P_Designated_Envs
  (Node : Bare_Use_Package_Clause
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Lexical_Env_Array_Access
is
   Self : Bare_Use_Package_Clause  := Bare_Use_Package_Clause (Node);
     Ent : Internal_Entity_Use_Package_Clause :=
       Internal_Entity_Use_Package_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Lexical_Env_Array_Access;
            procedure Finalizer_Scope_1609 with Inline_Always;
            procedure Finalizer_Scope_3630 with Inline_Always;
      Fld : Bare_Name_List;
Item_0 : Bare_Name;
Index_1 : Integer;
Fld_1 : Lexical_Env := Empty_Env;
Map_Result : Lexical_Env_Array_Access;
            procedure Finalizer_Scope_1609 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1609;
            procedure Finalizer_Scope_3630 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3630;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13911 '<Map at nodes.lkt:24529:9>' Map_Result ada/nodes.lkt:24529
   --# expr-start 13909 '<FieldAccess for packages at nodes.lkt:24529:9>' Fld ada/nodes.lkt:24529
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Use_Package_Clause_F_Packages;
--# expr-done 13909
      declare
         Map_Result_Vec : Lexical_Env_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Lexical_Env_Array (0);
      else
         Index_1 := 0;
      declare
         Collection : constant Bare_Name_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind _ Item_0
               --# bind i Index_1
      --# expr-start 13910 '<FieldAccess for designated_env at nodes.lkt:24529:38>' Fld_1 ada/nodes.lkt:24529
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UsePackageClause.designated_env
Fld_1 := Libadalang.Implementation.Use_Package_Clause_P_Designated_Env (Node => Ent.Node, Index => Index_1, E_Info => Ent.Info);
--# end
--# expr-done 13910
         declare
            Item_To_Append : constant Lexical_Env := Fld_1;
         begin
               Inc_Ref (Item_To_Append);
            Lexical_Env_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3630;
               Index_1 := Index_1 + 1;
         end loop;
      end;
      end if;
         Map_Result := Create_Lexical_Env_Array
           (Items_Count => Natural (Lexical_Env_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Lexical_Env_Vectors.Get
              (Map_Result_Vec,
               I + Lexical_Env_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Lexical_Env_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13911
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1609;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1609;
                     Finalizer_Scope_3630;
            raise;
      end;
   return Property_Result;
end Use_Package_Clause_P_Designated_Envs;
--# end
--# property-start UsePackageClause.xref_equation ada/nodes.lkt:24532
pragma Warnings (Off, "is not referenced");
 function Use_Package_Clause_P_Xref_Equation
  (Node : Bare_Use_Package_Clause
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Use_Package_Clause  := Bare_Use_Package_Clause (Node);
     Ent : Internal_Entity_Use_Package_Clause :=
       Internal_Entity_Use_Package_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1610 with Inline_Always;
            procedure Finalizer_Scope_3631 with Inline_Always;
      Fld : Internal_Entity_Name_List;
Fld_1 : Bare_Name_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1610 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1610;
            procedure Finalizer_Scope_3631 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3631;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13915 '<LogicAll at nodes.lkt:24533:9>' Logic_Boolean_Op ada/nodes.lkt:24533
--# expr-start 13914 '<Map at nodes.lkt:24533:9>' Map_Result ada/nodes.lkt:24533
   --# expr-start 13912 '<FieldAccess for packages at nodes.lkt:24533:9>' Fld ada/nodes.lkt:24533
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name_List (Node => Ent.Node.Use_Package_Clause_F_Packages, Info => Ent.Info);
--# expr-done 13912
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind p Item_0
      --# expr-start 13913 '<FieldAccess for xref_no_overloading at nodes.lkt:24533:40>' Fld_3 ada/nodes.lkt:24533
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_no_overloading
Fld_3 := Libadalang.Implementation.Name_P_Xref_No_Overloading (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 13913
         declare
            Item_To_Append : constant Logic_Equation := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3631;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13914
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24533:9") else null)); 
--# expr-done 13915
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1610;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1610;
                     Finalizer_Scope_3631;
            raise;
      end;
   return Property_Result;
end Use_Package_Clause_P_Xref_Equation;
--# end
--# property-start UsePackageClause._env_init_226 ada/nodes.lkt:24536
pragma Warnings (Off, "is not referenced");
 function Env_Init_226
  (Node : Bare_Use_Package_Clause
  )
   return Internal_Designated_Env
is
   Self : Bare_Use_Package_Clause  := Bare_Use_Package_Clause (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1890 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1890 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1890;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13916 '<FieldAccess for initial_env at nodes.lkt:24536:25>' Fld ada/nodes.lkt:24536
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UseClause.initial_env
Fld := Libadalang.Implementation.Use_Clause_P_Initial_Env (Node => Self);
--# end
--# expr-done 13916
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1890;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1890;
            raise;
      end;
   return Property_Result;
end Env_Init_226;
--# end
--# property-start UsePackageClause._ref_env_nodes_227 ada/nodes.lkt:24541
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_227
  (Node : Bare_Use_Package_Clause
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Use_Package_Clause  := Bare_Use_Package_Clause (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1891 with Inline_Always;
      Fld : Bare_Name_List;
Item_0 : Bare_Name;
Cast_Expr : Bare_Name;
Cast_Result : Bare_Ada_Node;
Map_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1891 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1891;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13919 '<Map at nodes.lkt:24541:13>' Map_Result ada/nodes.lkt:24541
   --# expr-start 13917 '<FieldAccess for packages at nodes.lkt:24541:13>' Fld ada/nodes.lkt:24541
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Use_Package_Clause_F_Packages;
--# expr-done 13917
      declare
         Map_Result_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind n Item_0
      --# expr-start 13918 '<Cast to AdaNode at nodes.lkt:24541:38>' Cast_Result ada/nodes.lkt:24541
Cast_Expr := Item_0; 
      Cast_Result := Cast_Expr;
--# expr-done 13918
         declare
            Item_To_Append : constant Bare_Ada_Node := Cast_Result;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13919
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1891;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1891;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_227;
--# end
--# property-start UsePackageClause._ref_cond_228 ada/nodes.lkt:24543
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_228
  (Node : Bare_Use_Package_Clause
  )
   return Boolean
is
   Self : Bare_Use_Package_Clause  := Bare_Use_Package_Clause (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Is_A : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13923 '<Not at nodes.lkt:24543:18>' Not_Val ada/nodes.lkt:24543
--# expr-start 13922 '<IsA CompilationUnit at nodes.lkt:24543:22>' Is_A ada/nodes.lkt:24543
--# expr-start 13921 '<parent at nodes.lkt:24543:22>' Fld_1 ada/nodes.lkt:24543
--# expr-start 13920 '<parent at nodes.lkt:24543:22>' Fld ada/nodes.lkt:24543
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13920
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 13921
Is_A := Fld_1 /= null 
and then Fld_1.Kind in Ada_Compilation_Unit_Range; 
--# expr-done 13922
Not_Val := not (Is_A); 
--# expr-done 13923
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_228;
--# end
   --
   --  Primitives for Bare_Use_Type_Clause
   --
      procedure Use_Type_Clause_Pre_Env_Actions
        (Self            : Bare_Use_Type_Clause;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_229 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:24560:9");
      end;
      end;
      procedure Use_Type_Clause_Post_Env_Actions
        (Self : Bare_Use_Type_Clause; State : in out PLE_Node_State) is
      begin
      if Libadalang.Implementation.Ref_Cond_231 (Node => 
Self) then
         declare
            Ref_Env_Nodes : Bare_Ada_Node_Array_Access :=
               Libadalang.Implementation.Ref_Env_Nodes_230 (Node => 
Self);
            Env : Lexical_Env :=
              Self.Self_Env;
         begin
            Ref_Env
              (Self,
               Env,
               Ref_Env_Nodes,
               Name_P_Name_Designated_Type_Env'Access,
               Normal,
               All_Cats,
               False);
            Dec_Ref (Ref_Env_Nodes);
         end;
      end if;
      end;
      procedure Initialize_Fields_For_Use_Type_Clause
        (Self : Bare_Use_Type_Clause
         ; Use_Type_Clause_F_Has_All : Bare_All_Node
         ; Use_Type_Clause_F_Types : Bare_Name_List
        ) is
      begin
            Self.Use_Type_Clause_F_Has_All := Use_Type_Clause_F_Has_All;
            Self.Use_Type_Clause_F_Types := Use_Type_Clause_F_Types;
      end Initialize_Fields_For_Use_Type_Clause;
   function Use_Type_Clause_F_Has_All
     (Node : Bare_Use_Type_Clause) return Bare_All_Node
   is
   begin
         return Node.Use_Type_Clause_F_Has_All;
   end;
   function Use_Type_Clause_F_Types
     (Node : Bare_Use_Type_Clause) return Bare_Name_List
   is
   begin
         return Node.Use_Type_Clause_F_Types;
   end;
--# property-start UseTypeClause.xref_equation ada/nodes.lkt:24556
pragma Warnings (Off, "is not referenced");
 function Use_Type_Clause_P_Xref_Equation
  (Node : Bare_Use_Type_Clause
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Use_Type_Clause  := Bare_Use_Type_Clause (Node);
     Ent : Internal_Entity_Use_Type_Clause :=
       Internal_Entity_Use_Type_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1611 with Inline_Always;
            procedure Finalizer_Scope_3633 with Inline_Always;
      Fld : Internal_Entity_Name_List;
Fld_1 : Bare_Name_List;
Fld_2 : Internal_Entity_Info;
Item_0 : Internal_Entity_Name;
Bare_Item_0 : Bare_Name;
Fld_3 : Logic_Equation;
As_Entity : Internal_Entity_Name;
Is_Null : Boolean;
If_Result : Internal_Entity_Name;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1611 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1611;
            procedure Finalizer_Scope_3633 is
            begin
                     Dec_Ref (Fld_3);
            end Finalizer_Scope_3633;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13927 '<LogicAll at nodes.lkt:24557:9>' Logic_Boolean_Op ada/nodes.lkt:24557
--# expr-start 13926 '<Map at nodes.lkt:24557:9>' Map_Result ada/nodes.lkt:24557
   --# expr-start 13924 '<FieldAccess for types at nodes.lkt:24557:9>' Fld ada/nodes.lkt:24557
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Name_List (Node => Ent.Node.Use_Type_Clause_F_Types, Info => Ent.Info);
--# expr-done 13924
Fld_1 := Fld.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_1 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld_1;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result := No_Entity_Name;
else
Fld_2 := Fld.Info;
As_Entity := (Info => Fld_2, Node => Bare_Item_0); 
   If_Result := As_Entity;
end if;
                  Item_0 := If_Result; 
   --# scope-start
               --# bind p Item_0
      --# expr-start 13925 '<FieldAccess for xref_type_equation at nodes.lkt:24557:37>' Fld_3 ada/nodes.lkt:24557
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_3 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Item_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Item_0.Info);
--# end
--# expr-done 13925
         declare
            Item_To_Append : constant Logic_Equation := Fld_3;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3633;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13926
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24557:9") else null)); 
--# expr-done 13927
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1611;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1611;
                     Finalizer_Scope_3633;
            raise;
      end;
   return Property_Result;
end Use_Type_Clause_P_Xref_Equation;
--# end
--# property-start UseTypeClause._env_init_229 ada/nodes.lkt:24560
pragma Warnings (Off, "is not referenced");
 function Env_Init_229
  (Node : Bare_Use_Type_Clause
  )
   return Internal_Designated_Env
is
   Self : Bare_Use_Type_Clause  := Bare_Use_Type_Clause (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1893 with Inline_Always;
      Fld : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1893 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1893;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13928 '<FieldAccess for initial_env at nodes.lkt:24560:25>' Fld ada/nodes.lkt:24560
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start UseClause.initial_env
Fld := Libadalang.Implementation.Use_Clause_P_Initial_Env (Node => Self);
--# end
--# expr-done 13928
         Property_Result := Fld;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1893;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1893;
            raise;
      end;
   return Property_Result;
end Env_Init_229;
--# end
--# property-start UseTypeClause._ref_env_nodes_230 ada/nodes.lkt:24565
pragma Warnings (Off, "is not referenced");
 function Ref_Env_Nodes_230
  (Node : Bare_Use_Type_Clause
  )
   return Bare_Ada_Node_Array_Access
is
   Self : Bare_Use_Type_Clause  := Bare_Use_Type_Clause (Node);
      --# bind self Self
   Property_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1894 with Inline_Always;
      Fld : Bare_Name_List;
Item_0 : Bare_Name;
Cast_Expr : Bare_Name;
Cast_Result : Bare_Ada_Node;
Map_Result : Bare_Ada_Node_Array_Access;
            procedure Finalizer_Scope_1894 is
            begin
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_1894;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13931 '<Map at nodes.lkt:24565:13>' Map_Result ada/nodes.lkt:24565
   --# expr-start 13929 '<FieldAccess for types at nodes.lkt:24565:13>' Fld ada/nodes.lkt:24565
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Use_Type_Clause_F_Types;
--# expr-done 13929
      declare
         Map_Result_Vec : Bare_Ada_Node_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Bare_Ada_Node_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind n Item_0
      --# expr-start 13930 '<Cast to AdaNode at nodes.lkt:24565:35>' Cast_Result ada/nodes.lkt:24565
Cast_Expr := Item_0; 
      Cast_Result := Cast_Expr;
--# expr-done 13930
         declare
            Item_To_Append : constant Bare_Ada_Node := Cast_Result;
         begin
            Bare_Ada_Node_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
         end loop;
      end;
      end if;
         Map_Result := Create_Bare_Ada_Node_Array
           (Items_Count => Natural (Bare_Ada_Node_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Bare_Ada_Node_Vectors.Get
              (Map_Result_Vec,
               I + Bare_Ada_Node_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Bare_Ada_Node_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13931
         Property_Result := Map_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1894;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1894;
            raise;
      end;
   return Property_Result;
end Ref_Env_Nodes_230;
--# end
--# property-start UseTypeClause._ref_cond_231 ada/nodes.lkt:24567
pragma Warnings (Off, "is not referenced");
 function Ref_Cond_231
  (Node : Bare_Use_Type_Clause
  )
   return Boolean
is
   Self : Bare_Use_Type_Clause  := Bare_Use_Type_Clause (Node);
      --# bind self Self
   Property_Result : Boolean;
      Fld : Bare_Ada_Node;
Fld_1 : Bare_Ada_Node;
Is_A : Boolean;
Not_Val : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13935 '<Not at nodes.lkt:24567:18>' Not_Val ada/nodes.lkt:24567
--# expr-start 13934 '<IsA CompilationUnit at nodes.lkt:24567:22>' Is_A ada/nodes.lkt:24567
--# expr-start 13933 '<parent at nodes.lkt:24567:22>' Fld_1 ada/nodes.lkt:24567
--# expr-start 13932 '<parent at nodes.lkt:24567:22>' Fld ada/nodes.lkt:24567
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.Parent; 
--# expr-done 13932
      if Fld = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Fld.Parent; 
--# expr-done 13933
Is_A := Fld_1 /= null 
and then Fld_1.Kind in Ada_Compilation_Unit_Range; 
--# expr-done 13934
Not_Val := not (Is_A); 
--# expr-done 13935
         Property_Result := Not_Val;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Ref_Cond_231;
--# end
   --
   --  Primitives for Bare_Value_Sequence
   --
      procedure Initialize_Fields_For_Value_Sequence
        (Self : Bare_Value_Sequence
         ; Value_Sequence_F_Iter_Assoc : Bare_Iterated_Assoc
        ) is
      begin
            Self.Value_Sequence_F_Iter_Assoc := Value_Sequence_F_Iter_Assoc;
      end Initialize_Fields_For_Value_Sequence;
   function Value_Sequence_F_Iter_Assoc
     (Node : Bare_Value_Sequence) return Bare_Iterated_Assoc
   is
   begin
         return Node.Value_Sequence_F_Iter_Assoc;
   end;
--# property-start ValueSequence.xref_equation ada/nodes.lkt:24582
pragma Warnings (Off, "is not referenced");
 function Value_Sequence_P_Xref_Equation
  (Node : Bare_Value_Sequence
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Value_Sequence  := Bare_Value_Sequence (Node);
     Ent : Internal_Entity_Value_Sequence :=
       Internal_Entity_Value_Sequence'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1612 with Inline_Always;
      Fld : Internal_Entity_Iterated_Assoc;
Fld_1 : Logic_Equation;
            procedure Finalizer_Scope_1612 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_1612;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13937 '<FieldAccess for xref_equation_for_reduce at nodes.lkt:24582:37>' Fld_1 ada/nodes.lkt:24582
--# expr-start 13936 '<FieldAccess for iter_assoc at nodes.lkt:24582:37>' Fld ada/nodes.lkt:24582
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Iterated_Assoc (Node => Ent.Node.Value_Sequence_F_Iter_Assoc, Info => Ent.Info);
--# expr-done 13936
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start IteratedAssoc.xref_equation_for_reduce
Fld_1 := Libadalang.Implementation.Iterated_Assoc_P_Xref_Equation_For_Reduce (Node => Fld.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Fld.Info);
--# end
--# expr-done 13937
         Property_Result := Fld_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1612;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1612;
            raise;
      end;
   return Property_Result;
end Value_Sequence_P_Xref_Equation;
--# end
   --
   --  Primitives for Bare_Variant
   --
      procedure Initialize_Fields_For_Variant
        (Self : Bare_Variant
         ; Variant_F_Choices : Bare_Alternatives_List
         ; Variant_F_Components : Bare_Component_List
        ) is
      begin
            Self.Variant_F_Choices := Variant_F_Choices;
            Self.Variant_F_Components := Variant_F_Components;
      end Initialize_Fields_For_Variant;
   function Variant_F_Choices
     (Node : Bare_Variant) return Bare_Alternatives_List
   is
   begin
         return Node.Variant_F_Choices;
   end;
   function Variant_F_Components
     (Node : Bare_Variant) return Bare_Component_List
   is
   begin
         return Node.Variant_F_Components;
   end;
--# property-start Variant.default_discriminant_expr ada/nodes.lkt:24596
pragma Warnings (Off, "is not referenced");
 function Variant_P_Default_Discriminant_Expr
  (Node : Bare_Variant
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Expr
is
   Self : Bare_Variant  := Bare_Variant (Node);
     Ent : Internal_Entity_Variant :=
       Internal_Entity_Variant'(Node => Self, Info => E_Info);
      --# bind entity Ent
   Property_Result : Internal_Entity_Expr;
            procedure Finalizer_Scope_1613 with Inline_Always;
            procedure Finalizer_Scope_3636 with Inline_Always;
      Local_Discr_Specs : Internal_Entity_Discriminant_Spec_List;
Local_Discr_Symbol : Symbol_Type;
Fld : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result : Internal_Entity;
Cast_Result : Internal_Entity_Concrete_Type_Decl;
Fld_1 : Internal_Entity_Discriminant_Part;
Cast_Result_1 : Internal_Entity_Known_Discriminant_Part;
Fld_2 : Internal_Entity_Discriminant_Spec_List;
Fld_3 : Internal_Entity;
Fld_4 : Internal_Entity;
Cast_Result_2 : Internal_Entity_Variant_Part;
Fld_5 : Internal_Entity_Identifier;
Fld_6 : Bare_Identifier;
Sym : Symbol_Type;
Saved : Internal_Entity_Discriminant_Spec_List;
Fld_7 : Bare_Discriminant_Spec_List;
Fld_8 : Internal_Entity_Info;
Item_1 : Internal_Entity_Discriminant_Spec;
Bare_Item_1 : Bare_Discriminant_Spec;
Fld_9 : Internal_Entity_Defining_Name_Array_Access;
Fld_10 : Boolean;
Quantifier_Result : Boolean;
As_Entity : Internal_Entity_Discriminant_Spec;
Is_Null : Boolean;
If_Result : Internal_Entity_Discriminant_Spec;
Find_Result_1 : Internal_Entity_Discriminant_Spec;
Fld_11 : Internal_Entity_Expr;
Let_Result : Internal_Entity_Expr;
Let_Result_1 : Internal_Entity_Expr;
            procedure Finalizer_Scope_1613 is
            begin
                     Dec_Ref (Fld);
            end Finalizer_Scope_1613;
            procedure Finalizer_Scope_3636 is
            begin
                     Dec_Ref (Fld_9);
            end Finalizer_Scope_3636;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 13956 '<Let at nodes.lkt:24599:9>' Let_Result_1 ada/nodes.lkt:24599
--# scope-start
--# expr-start 13944 '<FieldAccess for discr_specs at nodes.lkt:24600:13>' Fld_2 ada/nodes.lkt:24600
--# expr-start 13943 '<Cast to KnownDiscriminantPart at nodes.lkt:24600:13>' Cast_Result_1 ada/nodes.lkt:24600
--# expr-start 13942 '<FieldAccess for discriminants at nodes.lkt:24600:13>' Fld_1 ada/nodes.lkt:24600
--# expr-start 13941 '<Cast to ConcreteTypeDecl at nodes.lkt:24600:13>' Cast_Result ada/nodes.lkt:24600
--# expr-start 13940 '<Find at nodes.lkt:24600:13>' Find_Result ada/nodes.lkt:24600
   --# expr-start 13938 '<FieldAccess for parents at nodes.lkt:24600:13>' Fld ada/nodes.lkt:24600
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => False, E_Info => Ent.Info);
--# expr-done 13938
      Find_Result := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind p Item_0
      --# expr-start 13939 '<IsA ConcreteTypeDecl at nodes.lkt:24600:55>' Is_A ada/nodes.lkt:24600
Is_A := Item_0.Node /= null 
and then Item_0.Node.Kind in Ada_Concrete_Type_Decl_Range; 
--# expr-done 13939
      if Is_A then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 13940
   if Find_Result.Node = null
      or else Find_Result.Node.Kind in Ada_Concrete_Type_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Concrete_Type_Decl
        (Node => Find_Result.Node,
         Info => Find_Result.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 13941
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Discriminant_Part (Node => Cast_Result.Node.Type_Decl_F_Discriminants, Info => Cast_Result.Info);
--# expr-done 13942
   if Fld_1.Node = null
      or else Fld_1.Node.Kind in Ada_Known_Discriminant_Part_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Known_Discriminant_Part
        (Node => Fld_1.Node,
         Info => Fld_1.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 13943
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Discriminant_Spec_List (Node => Cast_Result_1.Node.Known_Discriminant_Part_F_Discr_Specs, Info => Cast_Result_1.Info);
--# expr-done 13944
Local_Discr_Specs := Fld_2; 
--# bind discr_specs Local_Discr_Specs
--# expr-start 13955 '<Let at nodes.lkt:24605:9>' Let_Result ada/nodes.lkt:24605
--# scope-start
--# expr-start 13949 '<GetSymbol at nodes.lkt:24606:13>' Sym ada/nodes.lkt:24606
--# expr-start 13948 '<FieldAccess for discr_name at nodes.lkt:24606:13>' Fld_5 ada/nodes.lkt:24606
--# expr-start 13947 '<Cast to VariantPart at nodes.lkt:24606:13>' Cast_Result_2 ada/nodes.lkt:24606
--# expr-start 13946 '<parent at nodes.lkt:24606:13>' Fld_4 ada/nodes.lkt:24606
--# expr-start 13945 '<parent at nodes.lkt:24606:13>' Fld_3 ada/nodes.lkt:24606
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Libadalang.Implementation.Parent (Node => Ent.Node, E_Info => Ent.Info);
--# expr-done 13945
      if Fld_3.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_4 := Libadalang.Implementation.Parent (Node => Fld_3.Node, E_Info => Fld_3.Info);
--# expr-done 13946
   if Fld_4.Node = null
      or else Fld_4.Node.Kind in Ada_Variant_Part_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Variant_Part
        (Node => Fld_4.Node,
         Info => Fld_4.Info);
   else
         Raise_Property_Exception
           (Self, Property_Error'Identity, "invalid object cast");
   end if;
--# expr-done 13947
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Identifier (Node => Cast_Result_2.Node.Variant_Part_F_Discr_Name, Info => Cast_Result_2.Info);
--# expr-done 13948
Fld_6 := Fld_5.Node; 
Sym := Get_Symbol (Fld_6); 
--# expr-done 13949
Local_Discr_Symbol := Sym; 
--# bind discr_symbol Local_Discr_Symbol
--# expr-start 13954 '<FieldAccess for default_expr at nodes.lkt:24610:9>' Fld_11 ada/nodes.lkt:24610
--# expr-start 13953 '<Find at nodes.lkt:24610:9>' Find_Result_1 ada/nodes.lkt:24610
Saved := Local_Discr_Specs; 
Fld_7 := Saved.Node;
      Find_Result_1 := No_Entity_Discriminant_Spec;
      if Fld_7 = null then
      Find_Result_1 := No_Entity_Discriminant_Spec;
      else
      declare
         Collection : constant Bare_Discriminant_Spec_List := Fld_7;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null := Bare_Item_1 = null; 
if Is_Null then
   If_Result := No_Entity_Discriminant_Spec;
else
Fld_8 := Saved.Info;
As_Entity := (Info => Fld_8, Node => Bare_Item_1); 
   If_Result := As_Entity;
end if;
                  Item_1 := If_Result; 
   --# scope-start
               --# bind d Item_1
      --# expr-start 13952 '<AnyQuantifier at nodes.lkt:24611:20>' Quantifier_Result ada/nodes.lkt:24611
   --# expr-start 13950 '<FieldAccess for defining_names at nodes.lkt:24611:20>' Fld_9 ada/nodes.lkt:24611
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_9 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Item_1.Node, E_Info => Item_1.Info);
--# end
--# expr-done 13950
      Quantifier_Result := False;
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_9;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_2
      --# expr-start 13951 '<FieldAccess for name_is at nodes.lkt:24611:50>' Fld_10 ada/nodes.lkt:24611
      if Item_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_is
Fld_10 := Libadalang.Implementation.Name_P_Name_Is (Node => Item_2.Node, Sym => Local_Discr_Symbol);
--# end
--# expr-done 13951
      Quantifier_Result := Fld_10;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
--# expr-done 13952
      if Quantifier_Result then
         Find_Result_1 := Item_1; 
      end if;
   --# end
      Finalizer_Scope_3636;
               exit when Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 13953
      if Find_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Expr (Node => Find_Result_1.Node.Discriminant_Spec_F_Default_Expr, Info => Find_Result_1.Info);
--# expr-done 13954
Let_Result := Fld_11; 
--# end
--# expr-done 13955
Let_Result_1 := Let_Result; 
--# end
--# expr-done 13956
         Property_Result := Let_Result_1;
   --# end
      Finalizer_Scope_1613;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1613;
                     Finalizer_Scope_3636;
            raise;
      end;
   return Property_Result;
end Variant_P_Default_Discriminant_Expr;
--# end
--# property-start Variant.matches ada/nodes.lkt:24617
pragma Warnings (Off, "is not referenced");
 function Variant_P_Matches
  (Node : Bare_Variant
      ; Expr : Internal_Entity_Expr
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Boolean
is
   Self : Bare_Variant  := Bare_Variant (Node);
     Ent : Internal_Entity_Variant :=
       Internal_Entity_Variant'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind expr Expr
   Property_Result : Boolean;
            procedure Finalizer_Scope_1614 with Inline_Always;
      Local_Expr_Val : Big_Integer_Type;
Fld : Internal_Entity_Expr;
Is_A : Boolean;
If_Result : Internal_Entity_Expr;
Fld_1 : Big_Integer_Type;
Fld_2 : Internal_Entity_Alternatives_List;
Fld_3 : Bare_Alternatives_List;
Fld_4 : Internal_Entity_Info;
Item_0 : Internal_Entity;
Bare_Item_0 : Bare_Ada_Node;
Fld_5 : Boolean;
As_Entity : Internal_Entity;
Is_Null : Boolean;
If_Result_1 : Internal_Entity;
Quantifier_Result : Boolean;
Let_Result : Boolean;
            procedure Finalizer_Scope_1614 is
            begin
                     Dec_Ref (Fld_1);
                     Dec_Ref (Local_Expr_Val);
            end Finalizer_Scope_1614;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13964 '<Let at nodes.lkt:24620:9>' Let_Result ada/nodes.lkt:24620
--# scope-start
--# expr-start 13960 '<FieldAccess for eval_as_int at nodes.lkt:24621:13>' Fld_1 ada/nodes.lkt:24621
--# expr-start 13959 '<If at nodes.lkt:24624:17>' If_Result ada/nodes.lkt:24624
--# expr-start 13957 '<IsA BoxExpr at nodes.lkt:24624:20>' Is_A ada/nodes.lkt:24624
Is_A := Expr.Node /= null 
and then Expr.Node.Kind in Ada_Box_Expr_Range; 
--# expr-done 13957
if Is_A then
   --# expr-start 13958 '<FieldAccess for default_discriminant_expr at nodes.lkt:24624:41>' Fld ada/nodes.lkt:24624
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Variant.default_discriminant_expr
Fld := Libadalang.Implementation.Variant_P_Default_Discriminant_Expr (Node => Ent.Node, E_Info => Ent.Info);
--# end
--# expr-done 13958
   If_Result := Fld;
else
   If_Result := Expr;
end if;
--# expr-done 13959
      if If_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.eval_as_int
Fld_1 := Libadalang.Implementation.Expr_P_Eval_As_Int (Node => If_Result.Node, E_Info => If_Result.Info);
--# end
--# expr-done 13960
Local_Expr_Val := Fld_1; Inc_Ref (Local_Expr_Val);
--# bind expr_val Local_Expr_Val
--# expr-start 13963 '<AnyQuantifier at nodes.lkt:24629:9>' Quantifier_Result ada/nodes.lkt:24629
   --# expr-start 13961 '<FieldAccess for choices at nodes.lkt:24629:9>' Fld_2 ada/nodes.lkt:24629
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Alternatives_List (Node => Ent.Node.Variant_F_Choices, Info => Ent.Info);
--# expr-done 13961
Fld_3 := Fld_2.Node;
      Quantifier_Result := False;
      if Fld_3 = null then
      null;
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld_3;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null := Bare_Item_0 = null; 
if Is_Null then
   If_Result_1 := No_Entity;
else
Fld_4 := Fld_2.Info;
As_Entity := (Info => Fld_4, Node => Bare_Item_0); 
   If_Result_1 := As_Entity;
end if;
                  Item_0 := If_Result_1; 
   --# scope-start
               --# bind c Item_0
      --# expr-start 13962 '<FieldAccess for choice_match at nodes.lkt:24629:33>' Fld_5 ada/nodes.lkt:24629
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.choice_match
Fld_5 := Libadalang.Implementation.Ada_Node_P_Choice_Match (Node => Item_0.Node, Value => Local_Expr_Val, E_Info => Item_0.Info);
--# end
--# expr-done 13962
      Quantifier_Result := Fld_5;
   --# end
               exit when Quantifier_Result;
         end loop;
      end;
      end if;
--# expr-done 13963
Let_Result := Quantifier_Result; 
--# end
--# expr-done 13964
         Property_Result := Let_Result;
   --# end
      Finalizer_Scope_1614;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1614;
            raise;
      end;
   return Property_Result;
end Variant_P_Matches;
--# end
   --
   --  Primitives for Bare_Variant_Part
   --
      procedure Initialize_Fields_For_Variant_Part
        (Self : Bare_Variant_Part
         ; Variant_Part_F_Discr_Name : Bare_Identifier
         ; Variant_Part_F_Variant : Bare_Variant_List
        ) is
      begin
            Self.Variant_Part_F_Discr_Name := Variant_Part_F_Discr_Name;
            Self.Variant_Part_F_Variant := Variant_Part_F_Variant;
      end Initialize_Fields_For_Variant_Part;
   function Variant_Part_F_Discr_Name
     (Node : Bare_Variant_Part) return Bare_Identifier
   is
   begin
         return Node.Variant_Part_F_Discr_Name;
   end;
   function Variant_Part_F_Variant
     (Node : Bare_Variant_Part) return Bare_Variant_List
   is
   begin
         return Node.Variant_Part_F_Variant;
   end;
--# property-start VariantPart.xref_entry_point ada/nodes.lkt:24643
pragma Warnings (Off, "is not referenced");
 function Variant_Part_P_Xref_Entry_Point
  (Node : Bare_Variant_Part
  )
   return Boolean
is
   Self : Bare_Variant_Part  := Bare_Variant_Part (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end Variant_Part_P_Xref_Entry_Point;
--# end
--# property-start VariantPart.xref_equation ada/nodes.lkt:24646
pragma Warnings (Off, "is not referenced");
 function Variant_Part_P_Xref_Equation
  (Node : Bare_Variant_Part
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_Variant_Part  := Bare_Variant_Part (Node);
     Ent : Internal_Entity_Variant_Part :=
       Internal_Entity_Variant_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1616 with Inline_Always;
            procedure Finalizer_Scope_3639 with Inline_Always;
            procedure Finalizer_Scope_3640 with Inline_Always;
            procedure Finalizer_Scope_3641 with Inline_Always;
            procedure Finalizer_Scope_3642 with Inline_Always;
            procedure Finalizer_Scope_3643 with Inline_Always;
      Ignored : Boolean;
Match_0 : Internal_Entity_Expr;
Match_1 : Internal_Entity_Subtype_Indication;
Match_2 : Internal_Entity_Others_Designator;
Match_3 : Internal_Entity;
Fld : Internal_Entity_Identifier;
Fld_1 : Boolean;
Fld_2 : Internal_Entity_Variant_List;
Fld_3 : Bare_Variant_List;
Fld_4 : Internal_Entity_Info;
Item_0 : Internal_Entity_Variant;
Bare_Item_0 : Bare_Variant;
Fld_5 : Internal_Entity_Alternatives_List;
Fld_6 : Bare_Alternatives_List;
Fld_7 : Internal_Entity_Info;
Item_1 : Internal_Entity;
Bare_Item_1 : Bare_Ada_Node;
Cast_Expr : Internal_Entity_Expr;
Cast_Result : Internal_Entity_Name;
Fld_8 : Logic_Equation;
Fld_9 : Logic_Var;
Fld_10 : Bare_Identifier;
Fld_11 : Internal_Entity;
Bind_Result : Logic_Equation;
Fld_12 : Logic_Equation;
And_Pred : Logic_Equation;
Fld_13 : Logic_Equation;
And_Pred_1 : Logic_Equation;
Is_A : Boolean;
Cast_Expr_1 : Internal_Entity_Expr;
Cast_Result_1 : Internal_Entity_Name;
Fld_14 : Internal_Entity_Base_Type_Decl;
Is_Null : Boolean;
Not_Val : Boolean;
If_Result : Boolean;
If_Result_1 : Logic_Equation;
Fld_15 : Logic_Equation;
True_Rel : Logic_Equation;
Match_Prefix : Internal_Entity;
Cast_Result_2 : Internal_Entity_Expr;
Let_Result : Logic_Equation;
Scope_Result : Logic_Equation;
Cast_Result_3 : Internal_Entity_Subtype_Indication;
Let_Result_1 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
Cast_Result_4 : Internal_Entity_Others_Designator;
Let_Result_2 : Logic_Equation;
Scope_Result_2 : Logic_Equation;
Cast_Result_5 : Internal_Entity;
Let_Result_3 : Logic_Equation;
Scope_Result_3 : Logic_Equation;
Match_Result : Logic_Equation;
As_Entity : Internal_Entity;
Is_Null_1 : Boolean;
If_Result_2 : Internal_Entity;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
As_Entity_1 : Internal_Entity_Variant;
Is_Null_2 : Boolean;
If_Result_3 : Internal_Entity_Variant;
Map_Result_1 : Logic_Equation_Array_Access;
Logic_Boolean_Op_1 : Logic_Equation;
Let_Result_4 : Logic_Equation;
            procedure Finalizer_Scope_1616 is
            begin
                     Dec_Ref (Map_Result_1);
                     Dec_Ref (Logic_Boolean_Op_1);
                     Dec_Ref (Let_Result_4);
            end Finalizer_Scope_1616;
            procedure Finalizer_Scope_3639 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_3639;
            procedure Finalizer_Scope_3640 is
            begin
                     Dec_Ref (Let_Result);
                     Dec_Ref (Scope_Result);
                     Dec_Ref (Let_Result_1);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (Let_Result_2);
                     Dec_Ref (Scope_Result_2);
                     Dec_Ref (Let_Result_3);
                     Dec_Ref (Scope_Result_3);
                     Dec_Ref (Match_Result);
            end Finalizer_Scope_3640;
            procedure Finalizer_Scope_3641 is
            begin
                     Dec_Ref (Fld_8);
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Fld_12);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Fld_13);
                     Dec_Ref (And_Pred_1);
                     Dec_Ref (If_Result_1);
            end Finalizer_Scope_3641;
            procedure Finalizer_Scope_3642 is
            begin
                     Dec_Ref (Fld_15);
            end Finalizer_Scope_3642;
            procedure Finalizer_Scope_3643 is
            begin
                     Dec_Ref (True_Rel);
            end Finalizer_Scope_3643;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 13992 '<Let at nodes.lkt:24647:9>' Let_Result_4 ada/nodes.lkt:24647
--# scope-start
--# expr-start 13966 '<FieldAccess for resolve_names_internal at nodes.lkt:24647:17>' Fld_1 ada/nodes.lkt:24647
--# expr-start 13965 '<FieldAccess for discr_name at nodes.lkt:24647:17>' Fld ada/nodes.lkt:24647
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Create_Internal_Entity_Identifier (Node => Ent.Node.Variant_Part_F_Discr_Name, Info => Ent.Info);
--# expr-done 13965
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.resolve_names_internal
Fld_1 := Libadalang.Implementation.Ada_Node_P_Resolve_Names_Internal (Node => Fld.Node, Generate_Diagnostics => False, Env => Env, Origin => Origin, E_Info => Fld.Info);
--# end
--# expr-done 13966
Ignored := Fld_1; 
--# bind _ Ignored
--# expr-start 13991 '<LogicAll at nodes.lkt:24649:9>' Logic_Boolean_Op_1 ada/nodes.lkt:24649
--# expr-start 13990 '<Map at nodes.lkt:24649:9>' Map_Result_1 ada/nodes.lkt:24649
   --# expr-start 13967 '<FieldAccess for variant at nodes.lkt:24649:9>' Fld_2 ada/nodes.lkt:24649
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Create_Internal_Entity_Variant_List (Node => Ent.Node.Variant_Part_F_Variant, Info => Ent.Info);
--# expr-done 13967
Fld_3 := Fld_2.Node;
      declare
         Map_Result_1_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_3 = null then
      Map_Result_1 := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Variant_List := Fld_3;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_0 := Untyped_Item_0; 
Is_Null_2 := Bare_Item_0 = null; 
if Is_Null_2 then
   If_Result_3 := No_Entity_Variant;
else
Fld_4 := Fld_2.Info;
As_Entity_1 := (Info => Fld_4, Node => Bare_Item_0); 
   If_Result_3 := As_Entity_1;
end if;
                  Item_0 := If_Result_3; 
   --# scope-start
               --# bind var Item_0
      --# expr-start 13989 '<LogicAll at nodes.lkt:24651:13>' Logic_Boolean_Op ada/nodes.lkt:24651
--# expr-start 13988 '<Map at nodes.lkt:24651:13>' Map_Result ada/nodes.lkt:24651
   --# expr-start 13968 '<FieldAccess for choices at nodes.lkt:24651:13>' Fld_5 ada/nodes.lkt:24651
      if Item_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_5 := Create_Internal_Entity_Alternatives_List (Node => Item_0.Node.Variant_F_Choices, Info => Item_0.Info);
--# expr-done 13968
Fld_6 := Fld_5.Node;
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld_6 = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Alternatives_List := Fld_6;
      begin
         for Untyped_Item_1 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_1 := Untyped_Item_1; 
Is_Null_1 := Bare_Item_1 = null; 
if Is_Null_1 then
   If_Result_2 := No_Entity;
else
Fld_7 := Fld_5.Info;
As_Entity := (Info => Fld_7, Node => Bare_Item_1); 
   If_Result_2 := As_Entity;
end if;
                  Item_1 := If_Result_2; 
   --# scope-start
               --# bind c Item_1
      --# expr-start 13987 '<Match at nodes.lkt:24653:17>' Match_Result ada/nodes.lkt:24653
      if Item_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Match_Prefix := Item_1; 
case Ada_Ada_Node (Match_Prefix.Node.Kind) is
         when Ada_Abstract_State_Decl_Expr .. Ada_Un_Op =>
   --# scope-start
--# scope-start
      Cast_Result_2 := Create_Internal_Entity_Expr
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_0 := Cast_Result_2; 
--# bind e Match_0
--# expr-start 13985 '<If at nodes.lkt:24656:25>' If_Result_1 ada/nodes.lkt:24656
--# expr-start 13974 '<BooleanBinaryOp And at nodes.lkt:24657:29>' If_Result ada/nodes.lkt:24657
--# expr-start 13969 '<IsA Name at nodes.lkt:24657:29>' Is_A ada/nodes.lkt:24657
Is_A := Match_0.Node /= null 
and then Match_0.Node.Kind in Ada_Name; 
--# expr-done 13969
if Is_A then
   --# expr-start 13973 '<Not at nodes.lkt:24658:33>' Not_Val ada/nodes.lkt:24658
--# expr-start 13972 '<IsNull at nodes.lkt:24658:37>' Is_Null ada/nodes.lkt:24658
--# expr-start 13971 '<FieldAccess for name_designated_type at nodes.lkt:24658:37>' Fld_14 ada/nodes.lkt:24658
--# expr-start 13970 '<Cast to Name at nodes.lkt:24658:37>' Cast_Result_1 ada/nodes.lkt:24658
Cast_Expr_1 := Match_0; 
   if Cast_Expr_1.Node = null
      or else Cast_Expr_1.Node.Kind in Ada_Name
   then
      Cast_Result_1 := Create_Internal_Entity_Name
        (Node => Cast_Expr_1.Node,
         Info => Cast_Expr_1.Info);
   else
         Cast_Result_1 := No_Entity_Name;
   end if;
--# expr-done 13970
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.name_designated_type
Fld_14 := Libadalang.Implementation.Name_P_Name_Designated_Type (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 13971
Is_Null := Fld_14.Node = null; 
--# expr-done 13972
Not_Val := not (Is_Null); 
--# expr-done 13973
   If_Result := Not_Val;
else
   If_Result := False;
end if;
--# expr-done 13974
if If_Result then
   --# expr-start 13976 '<FieldAccess for xref_type_equation at nodes.lkt:24659:30>' Fld_8 ada/nodes.lkt:24659
--# expr-start 13975 '<Cast to Name at nodes.lkt:24659:30>' Cast_Result ada/nodes.lkt:24659
Cast_Expr := Match_0; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Name
   then
      Cast_Result := Create_Internal_Entity_Name
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result := No_Entity_Name;
   end if;
--# expr-done 13975
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Name.xref_type_equation
Fld_8 := Libadalang.Implementation.Name_P_Xref_Type_Equation (Node => Cast_Result.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Cast_Result.Info);
--# end
--# expr-done 13976
   If_Result_1 := Fld_8;
else
   --# expr-start 13984 '<LogicBinaryOp And at nodes.lkt:24661:29>' And_Pred_1 ada/nodes.lkt:24661
--# expr-start 13982 '<LogicBinaryOp And at nodes.lkt:24661:29>' And_Pred ada/nodes.lkt:24661
--# expr-start 13980 '<Bind at nodes.lkt:24661:29>' Bind_Result ada/nodes.lkt:24661
--# expr-start 13977 '<FieldAccess for expected_type_var at nodes.lkt:24661:29>' Fld_9 ada/nodes.lkt:24661
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_9 := Libadalang.Implementation.Extensions.Expr_P_Expected_Type_Var (Node => Match_0.Node);
--# expr-done 13977
Fld_9.Value := No_Entity;
Entity_Vars.Reset (Fld_9);
--# expr-start 13979 '<FieldAccess for type_val at nodes.lkt:24661:54>' Fld_11 ada/nodes.lkt:24661
--# expr-start 13978 '<FieldAccess for discr_name at nodes.lkt:24661:54>' Fld_10 ada/nodes.lkt:24661
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_10 := Self.Variant_Part_F_Discr_Name;
--# expr-done 13978
      if Fld_10 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.type_val
Fld_11 := Libadalang.Implementation.Expr_P_Type_Val (Node => Fld_10);
--# end
--# expr-done 13979
Bind_Result := Solver.Create_Assign (Fld_9, Fld_11, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24661:29") else null)); 
--# expr-done 13980
--# expr-start 13981 '<FieldAccess for sub_equation at nodes.lkt:24662:34>' Fld_12 ada/nodes.lkt:24662
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.sub_equation
Fld_12 := Libadalang.Implementation.Ada_Node_P_Sub_Equation (Node => Match_0.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_0.Info);
--# end
--# expr-done 13981
And_Pred := Create_And (Bind_Result, Fld_12, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24661:29") else null)); 
--# expr-done 13982
--# expr-start 13983 '<FieldAccess for matches_expected_type at nodes.lkt:24663:34>' Fld_13 ada/nodes.lkt:24663
      if Match_0.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Expr.matches_expected_type
Fld_13 := Libadalang.Implementation.Expr_P_Matches_Expected_Type (Node => Match_0.Node, Origin => Origin);
--# end
--# expr-done 13983
And_Pred_1 := Create_And (And_Pred, Fld_13, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24661:29") else null)); 
--# expr-done 13984
   If_Result_1 := And_Pred_1;
end if;
      Inc_Ref (If_Result_1);
--# expr-done 13985
Let_Result := If_Result_1; Inc_Ref (Let_Result);
--# end
Scope_Result := Let_Result;
   Inc_Ref (Scope_Result);
   --# end
      Finalizer_Scope_3641;
            Match_Result := Scope_Result; Inc_Ref (Match_Result);
         when Ada_Subtype_Indication .. Ada_Discrete_Subtype_Indication =>
   --# scope-start
--# scope-start
      Cast_Result_3 := Create_Internal_Entity_Subtype_Indication
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_1 := Cast_Result_3; 
--# bind t Match_1
--# expr-start 13986 '<FieldAccess for xref_equation at nodes.lkt:24666:50>' Fld_15 ada/nodes.lkt:24666
      if Match_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]AdaNode.xref_equation'
Fld_15 := Libadalang.Implementation.Dispatcher_Ada_Node_P_Xref_Equation (Node => Match_1.Node, Env => Env, Origin => Origin, Entry_Point => Entry_Point, E_Info => Match_1.Info);
--# end
--# expr-done 13986
Let_Result_1 := Fld_15; Inc_Ref (Let_Result_1);
--# end
Scope_Result_1 := Let_Result_1;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3642;
            Match_Result := Scope_Result_1; Inc_Ref (Match_Result);
         when Ada_Others_Designator =>
   --# scope-start
--# scope-start
      Cast_Result_4 := Create_Internal_Entity_Others_Designator
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_2 := Cast_Result_4; 
--# bind _ Match_2
True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24667:49") else null)); 
Let_Result_2 := True_Rel; Inc_Ref (Let_Result_2);
--# end
Scope_Result_2 := Let_Result_2;
   Inc_Ref (Scope_Result_2);
   --# end
      Finalizer_Scope_3643;
            Match_Result := Scope_Result_2; Inc_Ref (Match_Result);
         when Ada_Abort_Absent .. Ada_Elsif_Stmt_Part | Ada_For_Loop_Iter_Filter .. Ada_Null_Component_Decl | Ada_Overriding_Not_Overriding .. Ada_Enum_Lit_Synth_Type_Expr | Ada_Synthetic_Type_Expr .. Ada_With_Private_Present =>
   --# scope-start
--# scope-start
      Cast_Result_5 := Create_Internal_Entity
        (Node => Match_Prefix.Node,
         Info => Match_Prefix.Info);
Match_3 := Cast_Result_5; 
--# bind _ Match_3
Let_Result_3 := raise Property_Error with "Should not happen"; Inc_Ref (Let_Result_3);
--# end
Scope_Result_3 := Let_Result_3;
   Inc_Ref (Scope_Result_3);
   --# end
            Match_Result := Scope_Result_3; Inc_Ref (Match_Result);
end case;
--# expr-done 13987
         declare
            Item_To_Append : constant Logic_Equation := Match_Result;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3640;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 13988
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24651:13") else null)); 
--# expr-done 13989
         declare
            Item_To_Append : constant Logic_Equation := Logic_Boolean_Op;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_1_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3639;
         end loop;
      end;
      end if;
         Map_Result_1 := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_1_Vec)));
         for I in Map_Result_1.Items'Range loop
            Map_Result_1.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_1_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result_1.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_1_Vec);
      end;
--# expr-done 13990
Logic_Boolean_Op_1 := Solver.Create_All (Relation_Array (Map_Result_1.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24649:9") else null)); 
--# expr-done 13991
Let_Result_4 := Logic_Boolean_Op_1; Inc_Ref (Let_Result_4);
--# end
--# expr-done 13992
         Property_Result := Let_Result_4;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1616;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1616;
                     Finalizer_Scope_3639;
                     Finalizer_Scope_3640;
                     Finalizer_Scope_3641;
                     Finalizer_Scope_3642;
                     Finalizer_Scope_3643;
            raise;
      end;
   return Property_Result;
end Variant_Part_P_Xref_Equation;
--# end
--# property-start VariantPart.get_components ada/nodes.lkt:24677
pragma Warnings (Off, "is not referenced");
 function Variant_Part_P_Get_Components
  (Node : Bare_Variant_Part
      ; Discriminants : Internal_Param_Match_Array_Access
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Internal_Entity_Base_Formal_Param_Decl_Array_Access
is
   Self : Bare_Variant_Part  := Bare_Variant_Part (Node);
     Ent : Internal_Entity_Variant_Part :=
       Internal_Entity_Variant_Part'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind discriminants Discriminants
   Property_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_1617 with Inline_Always;
            procedure Finalizer_Scope_3648 with Inline_Always;
      Local_Discr : Internal_Entity_Expr;
Var_Expr_1 : Internal_Param_Match;
Local_Variant : Internal_Entity_Variant;
Fld : Internal_Entity_Defining_Name;
Fld_1 : Internal_Entity_Name;
Fld_2 : Bare_Identifier;
Sym : Symbol_Type;
Fld_3 : Boolean;
Find_Result : Internal_Param_Match;
Fld_4 : Internal_Single_Actual;
Fld_5 : Internal_Entity_Basic_Assoc;
Fld_6 : Internal_Entity_Expr;
Scope_Result : Internal_Entity_Expr;
Fld_7 : Internal_Entity_Array_Access;
Is_A : Boolean;
Find_Result_1 : Internal_Entity;
Cast_Result : Internal_Entity_Concrete_Type_Decl;
Fld_8 : Internal_Entity_Discriminant_Part;
Fld_9 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Cast_Expr : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_1 : Internal_Entity_Discriminant_Spec;
Fld_10 : Internal_Entity_Defining_Name_Array_Access;
Fld_11 : Internal_Entity_Name;
Fld_12 : Bare_Identifier;
Sym_1 : Symbol_Type;
Fld_13 : Boolean;
Map_Result : Internal_Entity_Defining_Name_Array_Access;
Is_Equal : Boolean;
Not_Val : Boolean;
Find_Result_2 : Internal_Entity_Base_Formal_Param_Decl;
Cast_Result_2 : Internal_Entity_Discriminant_Spec;
Fld_14 : Internal_Entity_Expr;
Result_Var : Internal_Entity_Expr;
Fld_15 : Internal_Entity_Variant_List;
Fld_16 : Bare_Variant_List;
Fld_17 : Internal_Entity_Info;
Item_5 : Internal_Entity_Variant;
Bare_Item_5 : Bare_Variant;
Fld_18 : Boolean;
As_Entity : Internal_Entity_Variant;
Is_Null : Boolean;
If_Result : Internal_Entity_Variant;
Find_Result_3 : Internal_Entity_Variant;
Fld_19 : Internal_Entity_Component_List;
Fld_20 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
Let_Result_1 : Internal_Entity_Base_Formal_Param_Decl_Array_Access;
            procedure Finalizer_Scope_1617 is
            begin
                     Dec_Ref (Fld_7);
                     Dec_Ref (Fld_9);
                     Dec_Ref (Fld_20);
                     Dec_Ref (Let_Result);
                     Dec_Ref (Let_Result_1);
            end Finalizer_Scope_1617;
            procedure Finalizer_Scope_3648 is
            begin
                     Dec_Ref (Fld_10);
                     Dec_Ref (Map_Result);
            end Finalizer_Scope_3648;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 14026 '<Let at nodes.lkt:24681:9>' Let_Result_1 ada/nodes.lkt:24681
--# scope-start
--# expr-start 13998 '<Find at nodes.lkt:24682:13>' Find_Result ada/nodes.lkt:24682
      Find_Result := No_Param_Match;
      declare
         Collection : constant Internal_Param_Match_Array_Access := Discriminants;
      begin
         for Item_0 of
               Collection.Items
         loop
   --# scope-start
               --# bind d Item_0
      --# expr-start 13997 '<FieldAccess for name_is at nodes.lkt:24683:24>' Fld_3 ada/nodes.lkt:24683
--# expr-start 13994 '<FieldAccess for name at nodes.lkt:24683:24>' Fld_1 ada/nodes.lkt:24683
--# expr-start 13993 '<FieldAccess for formal at nodes.lkt:24683:24>' Fld ada/nodes.lkt:24683
Fld := Item_0.Formal;
--# expr-done 13993
      if Fld.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_1 := Create_Internal_Entity_Name (Node => Fld.Node.Defining_Name_F_Name, Info => Fld.Info);
--# expr-done 13994
      if Fld_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 13996 '<GetSymbol at nodes.lkt:24683:46>' Sym ada/nodes.lkt:24683
--# expr-start 13995 '<FieldAccess for discr_name at nodes.lkt:24683:46>' Fld_2 ada/nodes.lkt:24683
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_2 := Self.Variant_Part_F_Discr_Name;
--# expr-done 13995
Sym := Get_Symbol (Fld_2); 
--# expr-done 13996
--# property-call-start Name.name_is
Fld_3 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_1.Node, Sym => Sym);
--# end
--# expr-done 13997
      if Fld_3 then
         Find_Result := Item_0; 
      end if;
   --# end
               exit when Fld_3;
         end loop;
      end;
--# expr-done 13998
Var_Expr_1 := Find_Result;
if Var_Expr_1 /= No_Param_Match then
   --# scope-start
   --# bind d Var_Expr_1
--# expr-start 14001 '<FieldAccess for expr at nodes.lkt:24686:24>' Fld_6 ada/nodes.lkt:24686
--# expr-start 14000 '<FieldAccess for assoc at nodes.lkt:24686:24>' Fld_5 ada/nodes.lkt:24686
--# expr-start 13999 '<FieldAccess for actual at nodes.lkt:24686:24>' Fld_4 ada/nodes.lkt:24686
Fld_4 := Var_Expr_1.Actual;
--# expr-done 13999
Fld_5 := Fld_4.Assoc;
--# expr-done 14000
      if Fld_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicAssoc.expr'
Fld_6 := Libadalang.Implementation.Dispatcher_Basic_Assoc_P_Expr (Node => Fld_5.Node, E_Info => Fld_5.Info);
--# end
--# expr-done 14001
Scope_Result := Fld_6;
   --# end
   Result_Var := Scope_Result;
else
   --# expr-start 14019 '<FieldAccess for default_expr at nodes.lkt:24687:29>' Fld_14 ada/nodes.lkt:24687
--# expr-start 14018 '<Cast to DiscriminantSpec at nodes.lkt:24687:29>' Cast_Result_2 ada/nodes.lkt:24687
--# expr-start 14017 '<Find at nodes.lkt:24687:29>' Find_Result_2 ada/nodes.lkt:24687
   --# expr-start 14007 '<FieldAccess for abstract_formal_params at nodes.lkt:24687:29>' Fld_9 ada/nodes.lkt:24687
--# expr-start 14006 '<FieldAccess for discriminants at nodes.lkt:24687:29>' Fld_8 ada/nodes.lkt:24687
--# expr-start 14005 '<Cast to ConcreteTypeDecl at nodes.lkt:24687:29>' Cast_Result ada/nodes.lkt:24687
--# expr-start 14004 '<Find at nodes.lkt:24687:29>' Find_Result_1 ada/nodes.lkt:24687
   --# expr-start 14002 '<FieldAccess for parents at nodes.lkt:24687:29>' Fld_7 ada/nodes.lkt:24687
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_7 := Libadalang.Implementation.Parents (Node => Ent.Node, With_Self => True, E_Info => Ent.Info);
--# expr-done 14002
      Find_Result_1 := No_Entity;
      declare
         Collection : constant Internal_Entity_Array_Access := Fld_7;
      begin
         for Item_2 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_2
      --# expr-start 14003 '<IsA ConcreteTypeDecl at nodes.lkt:24687:56>' Is_A ada/nodes.lkt:24687
Is_A := Item_2.Node /= null 
and then Item_2.Node.Kind in Ada_Concrete_Type_Decl_Range; 
--# expr-done 14003
      if Is_A then
         Find_Result_1 := Item_2; 
      end if;
   --# end
               exit when Is_A;
         end loop;
      end;
--# expr-done 14004
   if Find_Result_1.Node = null
      or else Find_Result_1.Node.Kind in Ada_Concrete_Type_Decl_Range
   then
      Cast_Result := Create_Internal_Entity_Concrete_Type_Decl
        (Node => Find_Result_1.Node,
         Info => Find_Result_1.Info);
   else
         Cast_Result := No_Entity_Concrete_Type_Decl;
   end if;
--# expr-done 14005
      if Cast_Result.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_8 := Create_Internal_Entity_Discriminant_Part (Node => Cast_Result.Node.Type_Decl_F_Discriminants, Info => Cast_Result.Info);
--# expr-done 14006
      if Fld_8.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BaseFormalParamHolder.abstract_formal_params'
Fld_9 := Libadalang.Implementation.Dispatcher_Base_Formal_Param_Holder_P_Abstract_Formal_Params (Node => Fld_8.Node, E_Info => Fld_8.Info);
--# end
--# expr-done 14007
      Find_Result_2 := No_Entity_Base_Formal_Param_Decl;
      declare
         Collection : constant Internal_Entity_Base_Formal_Param_Decl_Array_Access := Fld_9;
      begin
         for Item_3 of
               Collection.Items
         loop
   --# scope-start
               --# bind d Item_3
      --# expr-start 14016 '<Not at nodes.lkt:24693:21>' Not_Val ada/nodes.lkt:24693
--# expr-start 14015 '<IsNull at nodes.lkt:24693:25>' Is_Equal ada/nodes.lkt:24693
--# expr-start 14014 '<Map at nodes.lkt:24693:25>' Map_Result ada/nodes.lkt:24693
   --# expr-start 14009 '<FieldAccess for defining_names at nodes.lkt:24693:25>' Fld_10 ada/nodes.lkt:24693
--# expr-start 14008 '<Cast to DiscriminantSpec at nodes.lkt:24693:25>' Cast_Result_1 ada/nodes.lkt:24693
Cast_Expr := Item_3; 
   if Cast_Expr.Node = null
      or else Cast_Expr.Node.Kind in Ada_Discriminant_Spec_Range
   then
      Cast_Result_1 := Create_Internal_Entity_Discriminant_Spec
        (Node => Cast_Expr.Node,
         Info => Cast_Expr.Info);
   else
         Cast_Result_1 := No_Entity_Discriminant_Spec;
   end if;
--# expr-done 14008
      if Cast_Result_1.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]BasicDecl.defining_names'
Fld_10 := Libadalang.Implementation.Dispatcher_Basic_Decl_P_Defining_Names (Node => Cast_Result_1.Node, E_Info => Cast_Result_1.Info);
--# end
--# expr-done 14009
      declare
         Map_Result_Vec : Internal_Entity_Defining_Name_Vectors.Vector;
      begin
      declare
         Collection : constant Internal_Entity_Defining_Name_Array_Access := Fld_10;
      begin
         for Item_4 of
               Collection.Items
         loop
   --# scope-start
               --# bind n Item_4
         --# expr-start 14013 '<FieldAccess for name_is at nodes.lkt:24698:32>' Fld_13 ada/nodes.lkt:24698
--# expr-start 14010 '<FieldAccess for name at nodes.lkt:24698:32>' Fld_11 ada/nodes.lkt:24698
      if Item_4.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_11 := Create_Internal_Entity_Name (Node => Item_4.Node.Defining_Name_F_Name, Info => Item_4.Info);
--# expr-done 14010
      if Fld_11.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 14012 '<GetSymbol at nodes.lkt:24698:47>' Sym_1 ada/nodes.lkt:24698
--# expr-start 14011 '<FieldAccess for discr_name at nodes.lkt:24698:47>' Fld_12 ada/nodes.lkt:24698
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_12 := Self.Variant_Part_F_Discr_Name;
--# expr-done 14011
Sym_1 := Get_Symbol (Fld_12); 
--# expr-done 14012
--# property-call-start Name.name_is
Fld_13 := Libadalang.Implementation.Name_P_Name_Is (Node => Fld_11.Node, Sym => Sym_1);
--# end
--# expr-done 14013
         if Fld_13 then
         declare
            Item_To_Append : constant Internal_Entity_Defining_Name := Item_4;
         begin
            Internal_Entity_Defining_Name_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
         end if;
   --# end
         end loop;
      end;
         Map_Result := Create_Internal_Entity_Defining_Name_Array
           (Items_Count => Natural (Internal_Entity_Defining_Name_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Internal_Entity_Defining_Name_Vectors.Get
              (Map_Result_Vec,
               I + Internal_Entity_Defining_Name_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Internal_Entity_Defining_Name_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 14014
Is_Equal := Equivalent (Map_Result, No_Internal_Entity_Defining_Name_Array_Type); 
--# expr-done 14015
Not_Val := not (Is_Equal); 
--# expr-done 14016
      if Not_Val then
         Find_Result_2 := Item_3; 
      end if;
   --# end
      Finalizer_Scope_3648;
               exit when Not_Val;
         end loop;
      end;
--# expr-done 14017
   if Find_Result_2.Node = null
      or else Find_Result_2.Node.Kind in Ada_Discriminant_Spec_Range
   then
      Cast_Result_2 := Create_Internal_Entity_Discriminant_Spec
        (Node => Find_Result_2.Node,
         Info => Find_Result_2.Info);
   else
         Cast_Result_2 := No_Entity_Discriminant_Spec;
   end if;
--# expr-done 14018
      if Cast_Result_2.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_14 := Create_Internal_Entity_Expr (Node => Cast_Result_2.Node.Discriminant_Spec_F_Default_Expr, Info => Cast_Result_2.Info);
--# expr-done 14019
   Result_Var := Fld_14;
end if;
Local_Discr := Result_Var; 
--# bind discr Local_Discr
--# expr-start 14025 '<Let at nodes.lkt:24707:9>' Let_Result ada/nodes.lkt:24707
--# scope-start
--# expr-start 14022 '<Find at nodes.lkt:24707:23>' Find_Result_3 ada/nodes.lkt:24707
   --# expr-start 14020 '<FieldAccess for variant at nodes.lkt:24707:23>' Fld_15 ada/nodes.lkt:24707
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_15 := Create_Internal_Entity_Variant_List (Node => Ent.Node.Variant_Part_F_Variant, Info => Ent.Info);
--# expr-done 14020
Fld_16 := Fld_15.Node;
      Find_Result_3 := No_Entity_Variant;
      if Fld_16 = null then
      Find_Result_3 := No_Entity_Variant;
      else
      declare
         Collection : constant Bare_Variant_List := Fld_16;
      begin
         for Untyped_Item_5 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Bare_Item_5 := Untyped_Item_5; 
Is_Null := Bare_Item_5 = null; 
if Is_Null then
   If_Result := No_Entity_Variant;
else
Fld_17 := Fld_15.Info;
As_Entity := (Info => Fld_17, Node => Bare_Item_5); 
   If_Result := As_Entity;
end if;
                  Item_5 := If_Result; 
   --# scope-start
               --# bind v Item_5
      --# expr-start 14021 '<FieldAccess for matches at nodes.lkt:24707:48>' Fld_18 ada/nodes.lkt:24707
      if Item_5.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start Variant.matches
Fld_18 := Libadalang.Implementation.Variant_P_Matches (Node => Item_5.Node, Expr => Local_Discr, E_Info => Item_5.Info);
--# end
--# expr-done 14021
      if Fld_18 then
         Find_Result_3 := Item_5; 
      end if;
   --# end
               exit when Fld_18;
         end loop;
      end;
      end if;
--# expr-done 14022
Local_Variant := Find_Result_3; 
--# bind variant Local_Variant
--# expr-start 14024 '<FieldAccess for abstract_formal_params_impl at nodes.lkt:24712:9>' Fld_20 ada/nodes.lkt:24712
--# expr-start 14023 '<FieldAccess for components at nodes.lkt:24712:9>' Fld_19 ada/nodes.lkt:24712
      if Local_Variant.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_19 := Create_Internal_Entity_Component_List (Node => Local_Variant.Node.Variant_F_Components, Info => Local_Variant.Info);
--# expr-done 14023
      if Fld_19.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start ComponentList.abstract_formal_params_impl
Fld_20 := Libadalang.Implementation.Component_List_P_Abstract_Formal_Params_Impl (Node => Fld_19.Node, Discriminants => Discriminants, Include_Discriminants => False, Recurse => False, E_Info => Fld_19.Info);
--# end
--# expr-done 14024
Let_Result := Fld_20; Inc_Ref (Let_Result);
--# end
--# expr-done 14025
Let_Result_1 := Let_Result; Inc_Ref (Let_Result_1);
--# end
--# expr-done 14026
         Property_Result := Let_Result_1;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1617;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1617;
                     Finalizer_Scope_3648;
            raise;
      end;
   return Property_Result;
end Variant_Part_P_Get_Components;
--# end
   --
   --  Primitives for Bare_With_Clause
   --
      procedure With_Clause_Pre_Env_Actions
        (Self            : Bare_With_Clause;
         State           : in out PLE_Node_State;
         Add_To_Env_Only : Boolean := False) is
      begin
      declare
         Env : constant Internal_Designated_Env :=
           Libadalang.Implementation.Env_Init_232 (Node => 
Self);
      begin
         Set_Initial_Env
           (Self,
            State,
            Env,
            DSL_Location => "nodes.lkt:24749:9");
      end;
      end;
      procedure Initialize_Fields_For_With_Clause
        (Self : Bare_With_Clause
         ; With_Clause_F_Has_Limited : Bare_Limited_Node
         ; With_Clause_F_Has_Private : Bare_Private_Node
         ; With_Clause_F_Packages : Bare_Name_List
        ) is
      begin
            Self.With_Clause_F_Has_Limited := With_Clause_F_Has_Limited;
            Self.With_Clause_F_Has_Private := With_Clause_F_Has_Private;
            Self.With_Clause_F_Packages := With_Clause_F_Packages;
      end Initialize_Fields_For_With_Clause;
   function With_Clause_F_Has_Limited
     (Node : Bare_With_Clause) return Bare_Limited_Node
   is
   begin
         return Node.With_Clause_F_Has_Limited;
   end;
   function With_Clause_F_Has_Private
     (Node : Bare_With_Clause) return Bare_Private_Node
   is
   begin
         return Node.With_Clause_F_Has_Private;
   end;
   function With_Clause_F_Packages
     (Node : Bare_With_Clause) return Bare_Name_List
   is
   begin
         return Node.With_Clause_F_Packages;
   end;
--# property-start WithClause.child_unit_xref_equation ada/nodes.lkt:24732
pragma Warnings (Off, "is not referenced");
 function With_Clause_P_Child_Unit_Xref_Equation
  (Node : Bare_With_Clause
      ; Name : Bare_Name
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_With_Clause  := Bare_With_Clause (Node);
     Ent : Internal_Entity_With_Clause :=
       Internal_Entity_With_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind name Name
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1618 with Inline_Always;
            procedure Finalizer_Scope_3652 with Inline_Always;
      Local_Self_Eq : Logic_Equation;
Var_Expr_0 : Bare_Dotted_Name;
Var_Expr_299 : Bare_Compilation_Unit;
Fld : Logic_Var;
Fld_1 : Bare_Compilation_Unit;
Fld_2 : Bare_Basic_Decl;
Scope_Result : Bare_Basic_Decl;
Result_Var : Bare_Basic_Decl;
As_Entity : Internal_Entity_Basic_Decl;
Is_Null : Boolean;
If_Result : Internal_Entity_Basic_Decl;
Cast_Result : Internal_Entity;
Bind_Result : Logic_Equation;
Cast_Expr : Bare_Name;
Cast_Result_1 : Bare_Dotted_Name;
Fld_3 : Bare_Name;
Fld_4 : Logic_Equation;
Scope_Result_1 : Logic_Equation;
True_Rel : Logic_Equation;
Result_Var_1 : Logic_Equation;
And_Pred : Logic_Equation;
Let_Result : Logic_Equation;
            procedure Finalizer_Scope_1618 is
            begin
                     Dec_Ref (Bind_Result);
                     Dec_Ref (Local_Self_Eq);
                     Dec_Ref (Scope_Result_1);
                     Dec_Ref (True_Rel);
                     Dec_Ref (Result_Var_1);
                     Dec_Ref (And_Pred);
                     Dec_Ref (Let_Result);
            end Finalizer_Scope_1618;
            procedure Finalizer_Scope_3652 is
            begin
                     Dec_Ref (Fld_4);
            end Finalizer_Scope_3652;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 14035 '<Let at nodes.lkt:24733:9>' Let_Result ada/nodes.lkt:24733
--# scope-start
--# expr-start 14030 '<Bind at nodes.lkt:24733:23>' Bind_Result ada/nodes.lkt:24733
--# expr-start 14027 '<FieldAccess for ref_var at nodes.lkt:24733:23>' Fld ada/nodes.lkt:24733
      if Name = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start '[dispatcher]Name.ref_var'
Fld := Libadalang.Implementation.Dispatcher_Name_P_Ref_Var (Node => Name);
--# end
--# expr-done 14027
Fld.Value := No_Entity;
Entity_Vars.Reset (Fld);
--# expr-start 14028 '<FieldAccess for withed_unit_helper at nodes.lkt:24733:41>' Fld_1 ada/nodes.lkt:24733
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start AdaNode.withed_unit_helper
Fld_1 := Libadalang.Implementation.Ada_Node_P_Withed_Unit_Helper (Node => Self, Unit_Name => Name);
--# end
--# expr-done 14028
Var_Expr_299 := Fld_1;
if Var_Expr_299 /= No_Bare_Ada_Node then
   --# scope-start
--# expr-start 14029 '<FieldAccess for decl at nodes.lkt:24733:41>' Fld_2 ada/nodes.lkt:24733
      if Var_Expr_299 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start CompilationUnit.decl
Fld_2 := Libadalang.Implementation.Compilation_Unit_P_Decl (Node => Var_Expr_299);
--# end
--# expr-done 14029
Scope_Result := Fld_2;
   --# end
   Result_Var := Scope_Result;
else
   Result_Var := No_Bare_Ada_Node;
end if;
Is_Null := Result_Var = null; 
if Is_Null then
   If_Result := No_Entity_Basic_Decl;
else
As_Entity := (Info => E_Info, Node => Result_Var); 
   If_Result := As_Entity;
end if;
      Cast_Result := Create_Internal_Entity
        (Node => If_Result.Node,
         Info => If_Result.Info);
Bind_Result := Solver.Create_Assign (Fld, Cast_Result, Solver_Ifc.No_Converter, Debug_String => (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24733:23") else null)); 
--# expr-done 14030
Local_Self_Eq := Bind_Result; Inc_Ref (Local_Self_Eq);
--# bind self_eq Local_Self_Eq
--# expr-start 14034 '<LogicBinaryOp And at nodes.lkt:24735:9>' And_Pred ada/nodes.lkt:24735
--# expr-start 14031 '<Cast to DottedName at nodes.lkt:24736:14>' Cast_Result_1 ada/nodes.lkt:24736
Cast_Expr := Name; 
   if Cast_Expr = null
      or else Cast_Expr.Kind in Ada_Dotted_Name_Range
   then
      Cast_Result_1 := Cast_Expr;
   else
         Cast_Result_1 := No_Bare_Ada_Node;
   end if;
--# expr-done 14031
Var_Expr_0 := Cast_Result_1;
if Var_Expr_0 /= No_Bare_Ada_Node then
   --# scope-start
   --# bind dn Var_Expr_0
--# expr-start 14033 '<FieldAccess for child_unit_xref_equation at nodes.lkt:24737:21>' Fld_4 ada/nodes.lkt:24737
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# expr-start 14032 '<FieldAccess for prefix at nodes.lkt:24737:51>' Fld_3 ada/nodes.lkt:24737
      if Var_Expr_0 = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld_3 := Var_Expr_0.Dotted_Name_F_Prefix;
--# expr-done 14032
--# property-call-start WithClause.child_unit_xref_equation
Fld_4 := Libadalang.Implementation.With_Clause_P_Child_Unit_Xref_Equation (Node => Ent.Node, Name => Fld_3, E_Info => Ent.Info);
--# end
--# expr-done 14033
Scope_Result_1 := Fld_4;
   Inc_Ref (Scope_Result_1);
   --# end
      Finalizer_Scope_3652;
   Result_Var_1 := Scope_Result_1;
else
   True_Rel := Solver.Create_True ((if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24738:25") else null)); 
   Result_Var_1 := True_Rel;
end if;
      Inc_Ref (Result_Var_1);
And_Pred := Create_And (Local_Self_Eq, Result_Var_1, (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24735:9") else null)); 
--# expr-done 14034
Let_Result := And_Pred; Inc_Ref (Let_Result);
--# end
--# expr-done 14035
         Property_Result := Let_Result;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1618;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1618;
                     Finalizer_Scope_3652;
            raise;
      end;
   return Property_Result;
end With_Clause_P_Child_Unit_Xref_Equation;
--# end
--# property-start WithClause.xref_entry_point ada/nodes.lkt:24742
pragma Warnings (Off, "is not referenced");
 function With_Clause_P_Xref_Entry_Point
  (Node : Bare_With_Clause
  )
   return Boolean
is
   Self : Bare_With_Clause  := Bare_With_Clause (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end With_Clause_P_Xref_Entry_Point;
--# end
--# property-start WithClause.xref_equation ada/nodes.lkt:24745
pragma Warnings (Off, "is not referenced");
 function With_Clause_P_Xref_Equation
  (Node : Bare_With_Clause
      ; Env : Lexical_Env
      ; Origin : Bare_Ada_Node
      ; Entry_Point : Bare_Ada_Node
   ; E_Info : Internal_Entity_Info :=
      No_Entity_Info
  )
   return Logic_Equation
is
   Self : Bare_With_Clause  := Bare_With_Clause (Node);
     Ent : Internal_Entity_With_Clause :=
       Internal_Entity_With_Clause'(Node => Self, Info => E_Info);
      --# bind entity Ent
   --# bind env Env
   --# bind origin Origin
   --# bind entry_point Entry_Point
   Property_Result : Logic_Equation;
            procedure Finalizer_Scope_1620 with Inline_Always;
            procedure Finalizer_Scope_3653 with Inline_Always;
      Fld : Bare_Name_List;
Item_0 : Bare_Name;
Fld_1 : Logic_Equation;
Map_Result : Logic_Equation_Array_Access;
Logic_Boolean_Op : Logic_Equation;
            procedure Finalizer_Scope_1620 is
            begin
                     Dec_Ref (Map_Result);
                     Dec_Ref (Logic_Boolean_Op);
            end Finalizer_Scope_1620;
            procedure Finalizer_Scope_3653 is
            begin
                     Dec_Ref (Fld_1);
            end Finalizer_Scope_3653;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self /= null then
         Reset_Caches (Self.Unit);
      end if;
      begin
   --# scope-start
         --# expr-start 14039 '<LogicAll at nodes.lkt:24746:9>' Logic_Boolean_Op ada/nodes.lkt:24746
--# expr-start 14038 '<Map at nodes.lkt:24746:9>' Map_Result ada/nodes.lkt:24746
   --# expr-start 14036 '<FieldAccess for packages at nodes.lkt:24746:9>' Fld ada/nodes.lkt:24746
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
Fld := Self.With_Clause_F_Packages;
--# expr-done 14036
      declare
         Map_Result_Vec : Logic_Equation_Vectors.Vector;
      begin
      if Fld = null then
      Map_Result := Create_Logic_Equation_Array (0);
      else
      declare
         Collection : constant Bare_Name_List := Fld;
      begin
         for Untyped_Item_0 of
               Collection.Nodes (1 .. Children_Count (Collection))
         loop
                  Item_0 := Untyped_Item_0; 
   --# scope-start
               --# bind p Item_0
      --# expr-start 14037 '<FieldAccess for child_unit_xref_equation at nodes.lkt:24746:40>' Fld_1 ada/nodes.lkt:24746
      if Ent.Node = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dereferencing a null access");
      end if;
--# property-call-start WithClause.child_unit_xref_equation
Fld_1 := Libadalang.Implementation.With_Clause_P_Child_Unit_Xref_Equation (Node => Ent.Node, Name => Item_0, E_Info => Ent.Info);
--# end
--# expr-done 14037
         declare
            Item_To_Append : constant Logic_Equation := Fld_1;
         begin
               Inc_Ref (Item_To_Append);
            Logic_Equation_Vectors.Append (Map_Result_Vec, Item_To_Append);
         end;
   --# end
      Finalizer_Scope_3653;
         end loop;
      end;
      end if;
         Map_Result := Create_Logic_Equation_Array
           (Items_Count => Natural (Logic_Equation_Vectors.Length (Map_Result_Vec)));
         for I in Map_Result.Items'Range loop
            Map_Result.Items (I) := Logic_Equation_Vectors.Get
              (Map_Result_Vec,
               I + Logic_Equation_Vectors.Index_Type'First - Map_Result.Items'First);
         end loop;
         Logic_Equation_Vectors.Destroy (Map_Result_Vec);
      end;
--# expr-done 14038
Logic_Boolean_Op := Solver.Create_All (Relation_Array (Map_Result.Items), (if Langkit_Support.Adalog.Debug.Debug then New_Unit_String (Node.Unit, "nodes.lkt:24746:9") else null)); 
--# expr-done 14039
         Property_Result := Logic_Boolean_Op;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1620;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1620;
                     Finalizer_Scope_3653;
            raise;
      end;
   return Property_Result;
end With_Clause_P_Xref_Equation;
--# end
--# property-start WithClause._env_init_232 ada/nodes.lkt:24750
pragma Warnings (Off, "is not referenced");
 function Env_Init_232
  (Node : Bare_With_Clause
  )
   return Internal_Designated_Env
is
   Self : Bare_With_Clause  := Bare_With_Clause (Node);
      --# bind self Self
   Property_Result : Internal_Designated_Env;
            procedure Finalizer_Scope_1896 with Inline_Always;
      Sym : Symbol_Type;
New_Struct : Internal_Designated_Env := No_Designated_Env;
            procedure Finalizer_Scope_1896 is
            begin
                     Dec_Ref (New_Struct);
            end Finalizer_Scope_1896;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         --# expr-start 14041 '<New DesignatedEnv at nodes.lkt:24750:13>' New_Struct ada/nodes.lkt:24750
--# expr-start 14040 '<Symbol Standard at nodes.lkt:24752:26>' Sym ada/nodes.lkt:24752
Sym := Precomputed_Symbol (Precomputed_Symbol_Table (Self.Unit.Context.Symbols), Precomputed_Sym_Standard); 
--# expr-done 14040
Inc_Ref (Empty_Env);
New_Struct := (Direct_Env => Empty_Env, Env_Name => Sym, Kind => Named_Env); 
--# expr-done 14041
         Property_Result := New_Struct;
            Inc_Ref (Property_Result);
   --# end
      Finalizer_Scope_1896;
      exception
         when Exc : Precondition_Failure | Property_Error =>
                     Finalizer_Scope_1896;
            raise;
      end;
   return Property_Result;
end Env_Init_232;
--# end
   --
   --  Primitives for Bare_With_Private
   --
--# property-start '[dispatcher]WithPrivate.as_bool' dispatcher
pragma Warnings (Off, "is not referenced");
 function Dispatcher_With_Private_P_As_Bool
  (Node : Bare_With_Private
  )
   return Boolean
is
   Self : Bare_With_Private  := Bare_With_Private (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      if Self = null then
         Raise_Property_Exception
           (Self, Property_Error'Identity, "dispatching on null node");
      end if;
      case Ada_With_Private (Self.Kind) is
               when Ada_With_Private_Absent =>
                  --# property-call-start WithPrivate.Absent.as_bool
                  Property_Result := With_Private_Absent_P_As_Bool
                    (Self
                    );
                  --# end
               when Ada_With_Private_Present =>
                  --# property-call-start WithPrivate.Present.as_bool
                  Property_Result := With_Private_Present_P_As_Bool
                    (Self
                    );
                  --# end
      end case;
   return Property_Result;
end Dispatcher_With_Private_P_As_Bool;
--# end
   --
   --  Primitives for Bare_With_Private_Absent
   --
--# property-start WithPrivate.Absent.as_bool ada/nodes.lkt:24761
pragma Warnings (Off, "is not referenced");
 function With_Private_Absent_P_As_Bool
  (Node : Bare_With_Private_Absent
  )
   return Boolean
is
   Self : Bare_With_Private_Absent  := Bare_With_Private_Absent (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := False;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end With_Private_Absent_P_As_Bool;
--# end
   --
   --  Primitives for Bare_With_Private_Present
   --
--# property-start WithPrivate.Present.as_bool ada/nodes.lkt:24761
pragma Warnings (Off, "is not referenced");
 function With_Private_Present_P_As_Bool
  (Node : Bare_With_Private_Present
  )
   return Boolean
is
   Self : Bare_With_Private_Present  := Bare_With_Private_Present (Node);
      --# bind self Self
   Property_Result : Boolean;
begin
   --# property-body-start
   pragma Assert (Self = Node);
      begin
   --# scope-start
         Property_Result := True;
   --# end
      exception
         when Exc : Precondition_Failure | Property_Error =>
            raise;
      end;
   return Property_Result;
end With_Private_Present_P_As_Bool;
--# end
   ----------------------------
   -- Destroy_Synthetic_Node --
   ----------------------------
   procedure Destroy_Synthetic_Node (Node : in out Bare_Ada_Node) is
      procedure Free is new Ada.Unchecked_Deallocation
        (Root_Node_Record, Bare_Ada_Node);
   begin
      --  Don't call Node.Destroy, as Node's children may be gone already: they
      --  have their own destructor and there is no specified order for the
      --  call of these destructors.
      Free_User_Fields (Node);
      Free (Node);
   end Destroy_Synthetic_Node;
   -----------
   -- Image --
   -----------
   function Image (Value : Boolean) return String
   is (if Value then "True" else "False");
      -----------------
      -- Trace_Image --
      -----------------
      function Trace_Image
        (Node       : Bare_Ada_Node;
         Decoration : Boolean := True) return String is
      begin
         if Node = null then
            return "None";
         else
            declare
               Result : constant String :=
                 (Kind_Name (Node) & " "
                  & Basename (Node.Unit) & ":"
                  & Image (Sloc_Range (Node)));
            begin
               return (if Decoration then "<" & Result & ">" else Result);
            end;
         end if;
      end Trace_Image;
   Kind_Names : array (Ada_Node_Kind_Type) of Unbounded_String :=
     (Ada_Abort_Absent => To_Unbounded_String ("AbortAbsent"), 
Ada_Abort_Present => To_Unbounded_String ("AbortPresent"), 
Ada_Abstract_Absent => To_Unbounded_String ("AbstractAbsent"), 
Ada_Abstract_Present => To_Unbounded_String ("AbstractPresent"), 
Ada_Ada_Node_List => To_Unbounded_String ("AdaNodeList"), 
Ada_Abstract_State_Decl_List => To_Unbounded_String ("AbstractStateDeclList"), 
Ada_Alternatives_List => To_Unbounded_String ("AlternativesList"), 
Ada_Constraint_List => To_Unbounded_String ("ConstraintList"), 
Ada_Decl_List => To_Unbounded_String ("DeclList"), 
Ada_Stmt_List => To_Unbounded_String ("StmtList"), 
Ada_Aspect_Assoc_List => To_Unbounded_String ("AspectAssocList"), 
Ada_Base_Assoc_List => To_Unbounded_String ("BaseAssocList"), 
Ada_Assoc_List => To_Unbounded_String ("AssocList"), 
Ada_Case_Expr_Alternative_List => To_Unbounded_String ("CaseExprAlternativeList"), 
Ada_Case_Stmt_Alternative_List => To_Unbounded_String ("CaseStmtAlternativeList"), 
Ada_Compilation_Unit_List => To_Unbounded_String ("CompilationUnitList"), 
Ada_Concat_Operand_List => To_Unbounded_String ("ConcatOperandList"), 
Ada_Contract_Case_Assoc_List => To_Unbounded_String ("ContractCaseAssocList"), 
Ada_Defining_Name_List => To_Unbounded_String ("DefiningNameList"), 
Ada_Discriminant_Spec_List => To_Unbounded_String ("DiscriminantSpecList"), 
Ada_Elsif_Expr_Part_List => To_Unbounded_String ("ElsifExprPartList"), 
Ada_Elsif_Stmt_Part_List => To_Unbounded_String ("ElsifStmtPartList"), 
Ada_Enum_Literal_Decl_List => To_Unbounded_String ("EnumLiteralDeclList"), 
Ada_Expr_Alternatives_List => To_Unbounded_String ("ExprAlternativesList"), 
Ada_Format_String_Chunk_List => To_Unbounded_String ("FormatStringChunkList"), 
Ada_Discriminant_Choice_List => To_Unbounded_String ("DiscriminantChoiceList"), 
Ada_Name_List => To_Unbounded_String ("NameList"), 
Ada_Parent_List => To_Unbounded_String ("ParentList"), 
Ada_Param_Spec_List => To_Unbounded_String ("ParamSpecList"), 
Ada_Pragma_Node_List => To_Unbounded_String ("PragmaNodeList"), 
Ada_Select_When_Part_List => To_Unbounded_String ("SelectWhenPartList"), 
Ada_Unconstrained_Array_Index_List => To_Unbounded_String ("UnconstrainedArrayIndexList"), 
Ada_Variant_List => To_Unbounded_String ("VariantList"), 
Ada_Aliased_Absent => To_Unbounded_String ("AliasedAbsent"), 
Ada_Aliased_Present => To_Unbounded_String ("AliasedPresent"), 
Ada_All_Absent => To_Unbounded_String ("AllAbsent"), 
Ada_All_Present => To_Unbounded_String ("AllPresent"), 
Ada_Constrained_Array_Indices => To_Unbounded_String ("ConstrainedArrayIndices"), 
Ada_Unconstrained_Array_Indices => To_Unbounded_String ("UnconstrainedArrayIndices"), 
Ada_Aspect_Assoc => To_Unbounded_String ("AspectAssoc"), 
Ada_At_Clause => To_Unbounded_String ("AtClause"), 
Ada_Attribute_Def_Clause => To_Unbounded_String ("AttributeDefClause"), 
Ada_Enum_Rep_Clause => To_Unbounded_String ("EnumRepClause"), 
Ada_Record_Rep_Clause => To_Unbounded_String ("RecordRepClause"), 
Ada_Aspect_Spec => To_Unbounded_String ("AspectSpec"), 
Ada_Contract_Case_Assoc => To_Unbounded_String ("ContractCaseAssoc"), 
Ada_Pragma_Argument_Assoc => To_Unbounded_String ("PragmaArgumentAssoc"), 
Ada_Entry_Spec => To_Unbounded_String ("EntrySpec"), 
Ada_Enum_Subp_Spec => To_Unbounded_String ("EnumSubpSpec"), 
Ada_Subp_Spec => To_Unbounded_String ("SubpSpec"), 
Ada_Synthetic_Binary_Spec => To_Unbounded_String ("SyntheticBinarySpec"), 
Ada_Synthetic_Unary_Spec => To_Unbounded_String ("SyntheticUnarySpec"), 
Ada_Component_List => To_Unbounded_String ("ComponentList"), 
Ada_Known_Discriminant_Part => To_Unbounded_String ("KnownDiscriminantPart"), 
Ada_Unknown_Discriminant_Part => To_Unbounded_String ("UnknownDiscriminantPart"), 
Ada_Entry_Completion_Formal_Params => To_Unbounded_String ("EntryCompletionFormalParams"), 
Ada_Generic_Formal_Part => To_Unbounded_String ("GenericFormalPart"), 
Ada_Null_Record_Def => To_Unbounded_String ("NullRecordDef"), 
Ada_Record_Def => To_Unbounded_String ("RecordDef"), 
Ada_Aggregate_Assoc => To_Unbounded_String ("AggregateAssoc"), 
Ada_Multi_Dim_Array_Assoc => To_Unbounded_String ("MultiDimArrayAssoc"), 
Ada_Composite_Constraint_Assoc => To_Unbounded_String ("CompositeConstraintAssoc"), 
Ada_Iterated_Assoc => To_Unbounded_String ("IteratedAssoc"), 
Ada_Param_Assoc => To_Unbounded_String ("ParamAssoc"), 
Ada_Abstract_State_Decl => To_Unbounded_String ("AbstractStateDecl"), 
Ada_Anonymous_Expr_Decl => To_Unbounded_String ("AnonymousExprDecl"), 
Ada_Component_Decl => To_Unbounded_String ("ComponentDecl"), 
Ada_Discriminant_Spec => To_Unbounded_String ("DiscriminantSpec"), 
Ada_Generic_Formal_Obj_Decl => To_Unbounded_String ("GenericFormalObjDecl"), 
Ada_Generic_Formal_Package => To_Unbounded_String ("GenericFormalPackage"), 
Ada_Generic_Formal_Subp_Decl => To_Unbounded_String ("GenericFormalSubpDecl"), 
Ada_Generic_Formal_Type_Decl => To_Unbounded_String ("GenericFormalTypeDecl"), 
Ada_Param_Spec => To_Unbounded_String ("ParamSpec"), 
Ada_Synthetic_Formal_Param_Decl => To_Unbounded_String ("SyntheticFormalParamDecl"), 
Ada_Generic_Package_Internal => To_Unbounded_String ("GenericPackageInternal"), 
Ada_Package_Decl => To_Unbounded_String ("PackageDecl"), 
Ada_Discrete_Base_Subtype_Decl => To_Unbounded_String ("DiscreteBaseSubtypeDecl"), 
Ada_Subtype_Decl => To_Unbounded_String ("SubtypeDecl"), 
Ada_Classwide_Type_Decl => To_Unbounded_String ("ClasswideTypeDecl"), 
Ada_Incomplete_Type_Decl => To_Unbounded_String ("IncompleteTypeDecl"), 
Ada_Incomplete_Formal_Type_Decl => To_Unbounded_String ("IncompleteFormalTypeDecl"), 
Ada_Incomplete_Tagged_Type_Decl => To_Unbounded_String ("IncompleteTaggedTypeDecl"), 
Ada_Protected_Type_Decl => To_Unbounded_String ("ProtectedTypeDecl"), 
Ada_Task_Type_Decl => To_Unbounded_String ("TaskTypeDecl"), 
Ada_Single_Task_Type_Decl => To_Unbounded_String ("SingleTaskTypeDecl"), 
Ada_Anonymous_Type_Decl => To_Unbounded_String ("AnonymousTypeDecl"), 
Ada_Synth_Anonymous_Type_Decl => To_Unbounded_String ("SynthAnonymousTypeDecl"), 
Ada_Concrete_Type_Decl => To_Unbounded_String ("ConcreteTypeDecl"), 
Ada_Formal_Type_Decl => To_Unbounded_String ("FormalTypeDecl"), 
Ada_Abstract_Subp_Decl => To_Unbounded_String ("AbstractSubpDecl"), 
Ada_Abstract_Formal_Subp_Decl => To_Unbounded_String ("AbstractFormalSubpDecl"), 
Ada_Concrete_Formal_Subp_Decl => To_Unbounded_String ("ConcreteFormalSubpDecl"), 
Ada_Subp_Decl => To_Unbounded_String ("SubpDecl"), 
Ada_Entry_Decl => To_Unbounded_String ("EntryDecl"), 
Ada_Enum_Literal_Decl => To_Unbounded_String ("EnumLiteralDecl"), 
Ada_Synthetic_Char_Enum_Lit => To_Unbounded_String ("SyntheticCharEnumLit"), 
Ada_Generic_Subp_Internal => To_Unbounded_String ("GenericSubpInternal"), 
Ada_Synthetic_Subp_Decl => To_Unbounded_String ("SyntheticSubpDecl"), 
Ada_Accept_Stmt_Body => To_Unbounded_String ("AcceptStmtBody"), 
Ada_Expr_Function => To_Unbounded_String ("ExprFunction"), 
Ada_Null_Subp_Decl => To_Unbounded_String ("NullSubpDecl"), 
Ada_Subp_Body => To_Unbounded_String ("SubpBody"), 
Ada_Subp_Renaming_Decl => To_Unbounded_String ("SubpRenamingDecl"), 
Ada_Package_Body_Stub => To_Unbounded_String ("PackageBodyStub"), 
Ada_Protected_Body_Stub => To_Unbounded_String ("ProtectedBodyStub"), 
Ada_Subp_Body_Stub => To_Unbounded_String ("SubpBodyStub"), 
Ada_Task_Body_Stub => To_Unbounded_String ("TaskBodyStub"), 
Ada_Entry_Body => To_Unbounded_String ("EntryBody"), 
Ada_Package_Body => To_Unbounded_String ("PackageBody"), 
Ada_Protected_Body => To_Unbounded_String ("ProtectedBody"), 
Ada_Task_Body => To_Unbounded_String ("TaskBody"), 
Ada_Entry_Index_Spec => To_Unbounded_String ("EntryIndexSpec"), 
Ada_Error_Decl => To_Unbounded_String ("ErrorDecl"), 
Ada_Exception_Decl => To_Unbounded_String ("ExceptionDecl"), 
Ada_Exception_Handler => To_Unbounded_String ("ExceptionHandler"), 
Ada_For_Loop_Var_Decl => To_Unbounded_String ("ForLoopVarDecl"), 
Ada_Generic_Package_Decl => To_Unbounded_String ("GenericPackageDecl"), 
Ada_Generic_Subp_Decl => To_Unbounded_String ("GenericSubpDecl"), 
Ada_Generic_Package_Instantiation => To_Unbounded_String ("GenericPackageInstantiation"), 
Ada_Generic_Subp_Instantiation => To_Unbounded_String ("GenericSubpInstantiation"), 
Ada_Generic_Package_Renaming_Decl => To_Unbounded_String ("GenericPackageRenamingDecl"), 
Ada_Generic_Subp_Renaming_Decl => To_Unbounded_String ("GenericSubpRenamingDecl"), 
Ada_Label_Decl => To_Unbounded_String ("LabelDecl"), 
Ada_Named_Stmt_Decl => To_Unbounded_String ("NamedStmtDecl"), 
Ada_Number_Decl => To_Unbounded_String ("NumberDecl"), 
Ada_Object_Decl => To_Unbounded_String ("ObjectDecl"), 
Ada_Extended_Return_Stmt_Object_Decl => To_Unbounded_String ("ExtendedReturnStmtObjectDecl"), 
Ada_No_Type_Object_Renaming_Decl => To_Unbounded_String ("NoTypeObjectRenamingDecl"), 
Ada_Package_Renaming_Decl => To_Unbounded_String ("PackageRenamingDecl"), 
Ada_Single_Protected_Decl => To_Unbounded_String ("SingleProtectedDecl"), 
Ada_Single_Task_Decl => To_Unbounded_String ("SingleTaskDecl"), 
Ada_Synthetic_Object_Decl => To_Unbounded_String ("SyntheticObjectDecl"), 
Ada_Case_Stmt_Alternative => To_Unbounded_String ("CaseStmtAlternative"), 
Ada_Compilation_Unit => To_Unbounded_String ("CompilationUnit"), 
Ada_Component_Clause => To_Unbounded_String ("ComponentClause"), 
Ada_Component_Def => To_Unbounded_String ("ComponentDef"), 
Ada_Constant_Absent => To_Unbounded_String ("ConstantAbsent"), 
Ada_Constant_Present => To_Unbounded_String ("ConstantPresent"), 
Ada_Composite_Constraint => To_Unbounded_String ("CompositeConstraint"), 
Ada_Delta_Constraint => To_Unbounded_String ("DeltaConstraint"), 
Ada_Digits_Constraint => To_Unbounded_String ("DigitsConstraint"), 
Ada_Range_Constraint => To_Unbounded_String ("RangeConstraint"), 
Ada_Declarative_Part => To_Unbounded_String ("DeclarativePart"), 
Ada_Private_Part => To_Unbounded_String ("PrivatePart"), 
Ada_Public_Part => To_Unbounded_String ("PublicPart"), 
Ada_Elsif_Expr_Part => To_Unbounded_String ("ElsifExprPart"), 
Ada_Elsif_Stmt_Part => To_Unbounded_String ("ElsifStmtPart"), 
Ada_Abstract_State_Decl_Expr => To_Unbounded_String ("AbstractStateDeclExpr"), 
Ada_Allocator => To_Unbounded_String ("Allocator"), 
Ada_Aggregate => To_Unbounded_String ("Aggregate"), 
Ada_Bracket_Aggregate => To_Unbounded_String ("BracketAggregate"), 
Ada_Delta_Aggregate => To_Unbounded_String ("DeltaAggregate"), 
Ada_Bracket_Delta_Aggregate => To_Unbounded_String ("BracketDeltaAggregate"), 
Ada_Null_Record_Aggregate => To_Unbounded_String ("NullRecordAggregate"), 
Ada_Bin_Op => To_Unbounded_String ("BinOp"), 
Ada_Relation_Op => To_Unbounded_String ("RelationOp"), 
Ada_Box_Expr => To_Unbounded_String ("BoxExpr"), 
Ada_Case_Expr_Alternative => To_Unbounded_String ("CaseExprAlternative"), 
Ada_Concat_Op => To_Unbounded_String ("ConcatOp"), 
Ada_Concat_Operand => To_Unbounded_String ("ConcatOperand"), 
Ada_Case_Expr => To_Unbounded_String ("CaseExpr"), 
Ada_If_Expr => To_Unbounded_String ("IfExpr"), 
Ada_Contract_Cases => To_Unbounded_String ("ContractCases"), 
Ada_Decl_Expr => To_Unbounded_String ("DeclExpr"), 
Ada_Format_String_Literal => To_Unbounded_String ("FormatStringLiteral"), 
Ada_Membership_Expr => To_Unbounded_String ("MembershipExpr"), 
Ada_Array_Subcomponent_Choice_Name => To_Unbounded_String ("ArraySubcomponentChoiceName"), 
Ada_Attribute_Ref => To_Unbounded_String ("AttributeRef"), 
Ada_Call_Expr => To_Unbounded_String ("CallExpr"), 
Ada_Defining_Name => To_Unbounded_String ("DefiningName"), 
Ada_Synthetic_Defining_Name => To_Unbounded_String ("SyntheticDefiningName"), 
Ada_Discrete_Subtype_Name => To_Unbounded_String ("DiscreteSubtypeName"), 
Ada_Dotted_Name => To_Unbounded_String ("DottedName"), 
Ada_End_Name => To_Unbounded_String ("EndName"), 
Ada_Explicit_Deref => To_Unbounded_String ("ExplicitDeref"), 
Ada_Qual_Expr => To_Unbounded_String ("QualExpr"), 
Ada_Reduce_Attribute_Ref => To_Unbounded_String ("ReduceAttributeRef"), 
Ada_Char_Literal => To_Unbounded_String ("Chr"), 
Ada_Identifier => To_Unbounded_String ("Id"), 
Ada_Op_Abs => To_Unbounded_String ("OpAbs"), 
Ada_Op_And => To_Unbounded_String ("OpAnd"), 
Ada_Op_And_Then => To_Unbounded_String ("OpAndThen"), 
Ada_Op_Concat => To_Unbounded_String ("OpConcat"), 
Ada_Op_Div => To_Unbounded_String ("OpDiv"), 
Ada_Op_Double_Dot => To_Unbounded_String ("OpDoubleDot"), 
Ada_Op_Eq => To_Unbounded_String ("OpEq"), 
Ada_Op_Gt => To_Unbounded_String ("OpGt"), 
Ada_Op_Gte => To_Unbounded_String ("OpGte"), 
Ada_Op_In => To_Unbounded_String ("OpIn"), 
Ada_Op_Lt => To_Unbounded_String ("OpLt"), 
Ada_Op_Lte => To_Unbounded_String ("OpLte"), 
Ada_Op_Minus => To_Unbounded_String ("OpMinus"), 
Ada_Op_Mod => To_Unbounded_String ("OpMod"), 
Ada_Op_Mult => To_Unbounded_String ("OpMult"), 
Ada_Op_Neq => To_Unbounded_String ("OpNeq"), 
Ada_Op_Not => To_Unbounded_String ("OpNot"), 
Ada_Op_Not_In => To_Unbounded_String ("OpNotIn"), 
Ada_Op_Or => To_Unbounded_String ("OpOr"), 
Ada_Op_Or_Else => To_Unbounded_String ("OpOrElse"), 
Ada_Op_Plus => To_Unbounded_String ("OpPlus"), 
Ada_Op_Pow => To_Unbounded_String ("OpPow"), 
Ada_Op_Rem => To_Unbounded_String ("OpRem"), 
Ada_Op_Xor => To_Unbounded_String ("OpXor"), 
Ada_String_Literal => To_Unbounded_String ("Str"), 
Ada_Null_Literal => To_Unbounded_String ("Null"), 
Ada_Int_Literal => To_Unbounded_String ("Int"), 
Ada_Real_Literal => To_Unbounded_String ("Real"), 
Ada_Synthetic_Identifier => To_Unbounded_String ("SyntheticIdentifier"), 
Ada_Target_Name => To_Unbounded_String ("TargetName"), 
Ada_Update_Attribute_Ref => To_Unbounded_String ("UpdateAttributeRef"), 
Ada_Paren_Expr => To_Unbounded_String ("ParenExpr"), 
Ada_Quantified_Expr => To_Unbounded_String ("QuantifiedExpr"), 
Ada_Raise_Expr => To_Unbounded_String ("RaiseExpr"), 
Ada_Un_Op => To_Unbounded_String ("UnOp"), 
Ada_For_Loop_Iter_Filter => To_Unbounded_String ("ForLoopIterFilter"), 
Ada_Format_String_Chunk => To_Unbounded_String ("FormatStringChunk"), 
Ada_Format_String_Tok_End => To_Unbounded_String ("FormatStringTokEnd"), 
Ada_Format_String_Tok_Mid => To_Unbounded_String ("FormatStringTokMid"), 
Ada_Format_String_Tok_Start => To_Unbounded_String ("FormatStringTokStart"), 
Ada_Format_String_Tok_String => To_Unbounded_String ("FormatStringTokString"), 
Ada_Handled_Stmts => To_Unbounded_String ("HandledStmts"), 
Ada_Interface_Kind_Limited => To_Unbounded_String ("InterfaceKindLimited"), 
Ada_Interface_Kind_Protected => To_Unbounded_String ("InterfaceKindProtected"), 
Ada_Interface_Kind_Synchronized => To_Unbounded_String ("InterfaceKindSynchronized"), 
Ada_Interface_Kind_Task => To_Unbounded_String ("InterfaceKindTask"), 
Ada_Iter_Type_In => To_Unbounded_String ("IterTypeIn"), 
Ada_Iter_Type_Of => To_Unbounded_String ("IterTypeOf"), 
Ada_Library_Item => To_Unbounded_String ("LibraryItem"), 
Ada_Limited_Absent => To_Unbounded_String ("LimitedAbsent"), 
Ada_Limited_Present => To_Unbounded_String ("LimitedPresent"), 
Ada_For_Loop_Spec => To_Unbounded_String ("ForLoopSpec"), 
Ada_While_Loop_Spec => To_Unbounded_String ("WhileLoopSpec"), 
Ada_Mode_Default => To_Unbounded_String ("ModeDefault"), 
Ada_Mode_In => To_Unbounded_String ("ModeIn"), 
Ada_Mode_In_Out => To_Unbounded_String ("ModeInOut"), 
Ada_Mode_Out => To_Unbounded_String ("ModeOut"), 
Ada_Multi_Abstract_State_Decl => To_Unbounded_String ("MultiAbstractStateDecl"), 
Ada_Not_Null_Absent => To_Unbounded_String ("NotNullAbsent"), 
Ada_Not_Null_Present => To_Unbounded_String ("NotNullPresent"), 
Ada_Null_Component_Decl => To_Unbounded_String ("NullComponentDecl"), 
Ada_Others_Designator => To_Unbounded_String ("OthersDesignator"), 
Ada_Overriding_Not_Overriding => To_Unbounded_String ("OverridingNotOverriding"), 
Ada_Overriding_Overriding => To_Unbounded_String ("OverridingOverriding"), 
Ada_Overriding_Unspecified => To_Unbounded_String ("OverridingUnspecified"), 
Ada_Params => To_Unbounded_String ("Params"), 
Ada_Paren_Abstract_State_Decl => To_Unbounded_String ("ParenAbstractStateDecl"), 
Ada_Pp_Else_Directive => To_Unbounded_String ("PpElseDirective"), 
Ada_Pp_Elsif_Directive => To_Unbounded_String ("PpElsifDirective"), 
Ada_Pp_End_If_Directive => To_Unbounded_String ("PpEndIfDirective"), 
Ada_Pp_If_Directive => To_Unbounded_String ("PpIfDirective"), 
Ada_Pp_Then_Kw => To_Unbounded_String ("PpThenKw"), 
Ada_Pragma_Node => To_Unbounded_String ("PragmaNode"), 
Ada_Private_Absent => To_Unbounded_String ("PrivateAbsent"), 
Ada_Private_Present => To_Unbounded_String ("PrivatePresent"), 
Ada_Protected_Def => To_Unbounded_String ("ProtectedDef"), 
Ada_Protected_Absent => To_Unbounded_String ("ProtectedAbsent"), 
Ada_Protected_Present => To_Unbounded_String ("ProtectedPresent"), 
Ada_Quantifier_All => To_Unbounded_String ("QuantifierAll"), 
Ada_Quantifier_Some => To_Unbounded_String ("QuantifierSome"), 
Ada_Range_Spec => To_Unbounded_String ("RangeSpec"), 
Ada_Renaming_Clause => To_Unbounded_String ("RenamingClause"), 
Ada_Synthetic_Renaming_Clause => To_Unbounded_String ("SyntheticRenamingClause"), 
Ada_Reverse_Absent => To_Unbounded_String ("ReverseAbsent"), 
Ada_Reverse_Present => To_Unbounded_String ("ReversePresent"), 
Ada_Select_When_Part => To_Unbounded_String ("SelectWhenPart"), 
Ada_Accept_Stmt => To_Unbounded_String ("AcceptStmt"), 
Ada_Accept_Stmt_With_Stmts => To_Unbounded_String ("AcceptStmtWithStmts"), 
Ada_For_Loop_Stmt => To_Unbounded_String ("ForLoopStmt"), 
Ada_Loop_Stmt => To_Unbounded_String ("LoopStmt"), 
Ada_While_Loop_Stmt => To_Unbounded_String ("WhileLoopStmt"), 
Ada_Begin_Block => To_Unbounded_String ("BeginBlock"), 
Ada_Decl_Block => To_Unbounded_String ("DeclBlock"), 
Ada_Case_Stmt => To_Unbounded_String ("CaseStmt"), 
Ada_Extended_Return_Stmt => To_Unbounded_String ("ExtendedReturnStmt"), 
Ada_If_Stmt => To_Unbounded_String ("IfStmt"), 
Ada_Named_Stmt => To_Unbounded_String ("NamedStmt"), 
Ada_Select_Stmt => To_Unbounded_String ("SelectStmt"), 
Ada_Error_Stmt => To_Unbounded_String ("ErrorStmt"), 
Ada_Abort_Stmt => To_Unbounded_String ("AbortStmt"), 
Ada_Assign_Stmt => To_Unbounded_String ("AssignStmt"), 
Ada_Call_Stmt => To_Unbounded_String ("CallStmt"), 
Ada_Delay_Stmt => To_Unbounded_String ("DelayStmt"), 
Ada_Exit_Stmt => To_Unbounded_String ("ExitStmt"), 
Ada_Goto_Stmt => To_Unbounded_String ("GotoStmt"), 
Ada_Label => To_Unbounded_String ("Label"), 
Ada_Null_Stmt => To_Unbounded_String ("NullStmt"), 
Ada_Raise_Stmt => To_Unbounded_String ("RaiseStmt"), 
Ada_Requeue_Stmt => To_Unbounded_String ("RequeueStmt"), 
Ada_Return_Stmt => To_Unbounded_String ("ReturnStmt"), 
Ada_Simple_Decl_Stmt => To_Unbounded_String ("SimpleDeclStmt"), 
Ada_Terminate_Alternative => To_Unbounded_String ("TerminateAlternative"), 
Ada_Subp_Kind_Function => To_Unbounded_String ("SubpKindFunction"), 
Ada_Subp_Kind_Procedure => To_Unbounded_String ("SubpKindProcedure"), 
Ada_Subunit => To_Unbounded_String ("Subunit"), 
Ada_Synchronized_Absent => To_Unbounded_String ("SynchronizedAbsent"), 
Ada_Synchronized_Present => To_Unbounded_String ("SynchronizedPresent"), 
Ada_Tagged_Absent => To_Unbounded_String ("TaggedAbsent"), 
Ada_Tagged_Present => To_Unbounded_String ("TaggedPresent"), 
Ada_Task_Def => To_Unbounded_String ("TaskDef"), 
Ada_Type_Attributes_Repository => To_Unbounded_String ("TypeAttributesRepository"), 
Ada_Access_To_Subp_Def => To_Unbounded_String ("AccessToSubpDef"), 
Ada_Anonymous_Type_Access_Def => To_Unbounded_String ("AnonymousTypeAccessDef"), 
Ada_Type_Access_Def => To_Unbounded_String ("TypeAccessDef"), 
Ada_Array_Type_Def => To_Unbounded_String ("ArrayTypeDef"), 
Ada_Derived_Type_Def => To_Unbounded_String ("DerivedTypeDef"), 
Ada_Enum_Type_Def => To_Unbounded_String ("EnumTypeDef"), 
Ada_Formal_Discrete_Type_Def => To_Unbounded_String ("FormalDiscreteTypeDef"), 
Ada_Interface_Type_Def => To_Unbounded_String ("InterfaceTypeDef"), 
Ada_Mod_Int_Type_Def => To_Unbounded_String ("ModIntTypeDef"), 
Ada_Private_Type_Def => To_Unbounded_String ("PrivateTypeDef"), 
Ada_Decimal_Fixed_Point_Def => To_Unbounded_String ("DecimalFixedPointDef"), 
Ada_Floating_Point_Def => To_Unbounded_String ("FloatingPointDef"), 
Ada_Ordinary_Fixed_Point_Def => To_Unbounded_String ("OrdinaryFixedPointDef"), 
Ada_Record_Type_Def => To_Unbounded_String ("RecordTypeDef"), 
Ada_Signed_Int_Type_Def => To_Unbounded_String ("SignedIntTypeDef"), 
Ada_Anonymous_Type => To_Unbounded_String ("AnonymousType"), 
Ada_Enum_Lit_Synth_Type_Expr => To_Unbounded_String ("EnumLitSynthTypeExpr"), 
Ada_Subtype_Indication => To_Unbounded_String ("SubtypeIndication"), 
Ada_Constrained_Subtype_Indication => To_Unbounded_String ("ConstrainedSubtypeIndication"), 
Ada_Discrete_Subtype_Indication => To_Unbounded_String ("DiscreteSubtypeIndication"), 
Ada_Synthetic_Type_Expr => To_Unbounded_String ("SyntheticTypeExpr"), 
Ada_Unconstrained_Array_Index => To_Unbounded_String ("UnconstrainedArrayIndex"), 
Ada_Until_Absent => To_Unbounded_String ("UntilAbsent"), 
Ada_Until_Present => To_Unbounded_String ("UntilPresent"), 
Ada_Use_Package_Clause => To_Unbounded_String ("UsePackageClause"), 
Ada_Use_Type_Clause => To_Unbounded_String ("UseTypeClause"), 
Ada_Value_Sequence => To_Unbounded_String ("ValueSequence"), 
Ada_Variant => To_Unbounded_String ("Variant"), 
Ada_Variant_Part => To_Unbounded_String ("VariantPart"), 
Ada_With_Clause => To_Unbounded_String ("WithClause"), 
Ada_With_Private_Absent => To_Unbounded_String ("WithPrivateAbsent"), 
Ada_With_Private_Present => To_Unbounded_String ("WithPrivatePresent"));
   ---------------
   -- Kind_Name --
   ---------------
   function Kind_Name (Node : Bare_Ada_Node) return String is
   begin
      return To_String (Kind_Names (Node.Kind));
   end Kind_Name;
   --------------------
   -- Children_Count --
   --------------------
   function Children_Count (Node : Bare_Ada_Node) return Natural is
      C : Integer := Kind_To_Node_Children_Count (Node.Kind);
   begin
      if C = -1 then
         return Node.Count;
      else
         return C;
      end if;
   end Children_Count;
   ----------------------
   -- Free_User_Fields --
   ----------------------
   procedure Free_User_Fields (Node : Bare_Ada_Node) is
      procedure Reset_Logic_Var (LV : in out Logic_Var_Record);
      --  Reset the LV logic variable, clearing the value it stores
      ---------------------
      -- Reset_Logic_Var --
      ---------------------
      procedure Reset_Logic_Var (LV : in out Logic_Var_Record) is
      begin
         LV.Value := No_Entity;
         Entity_Vars.Reset (LV'Unrestricted_Access);
         Entity_Vars.Destroy (LV);
      end Reset_Logic_Var;
      K : constant Ada_Node_Kind_Type := Node.Kind;
   begin
      case Ada_Ada_Node (K) is
when Ada_Base_Type_Decl =>
declare
N_Bare_Base_Type_Decl : constant Bare_Base_Type_Decl := Node;
begin
Dec_Ref (N_Bare_Base_Type_Decl.Bare_Base_Type_Decl_Lf_Stg_Direct_Primitive_Subps);
Dec_Ref (N_Bare_Base_Type_Decl.Bare_Base_Type_Decl_Lf_Stg_Direct_Primitives_Env);
Dec_Ref (N_Bare_Base_Type_Decl.Bare_Base_Type_Decl_Lf_Stg_Synthetic_Object_Decl_Env_Assoc);
Dec_Ref (N_Bare_Base_Type_Decl.Bare_Base_Type_Decl_Lf_Stg_Dottable_Subps_Env);
end;
when Ada_Generic_Instantiation =>
declare
N_Bare_Generic_Instantiation : constant Bare_Generic_Instantiation := Node;
begin
Dec_Ref (N_Bare_Generic_Instantiation.Bare_Generic_Instantiation_Lf_Stg_Instantiation_Env);
Dec_Ref (N_Bare_Generic_Instantiation.Bare_Generic_Instantiation_Lf_Stg_Actual_Expr_Decls);
end;
when Ada_Compilation_Unit_Range =>
declare
N_Bare_Compilation_Unit : constant Bare_Compilation_Unit := Node;
begin
Dec_Ref (N_Bare_Compilation_Unit.Compilation_Unit_No_Env);
end;
when Ada_Attribute_Ref_Range =>
declare
N_Bare_Attribute_Ref : constant Bare_Attribute_Ref := Node;
begin
Reset_Logic_Var (N_Bare_Attribute_Ref.Attribute_Ref_R_Ref_Var);
end;
when Ada_Call_Expr_Range =>
declare
N_Bare_Call_Expr : constant Bare_Call_Expr := Node;
begin
Reset_Logic_Var (N_Bare_Call_Expr.Call_Expr_R_Called_Spec);
end;
when Ada_Explicit_Deref_Range =>
declare
N_Bare_Explicit_Deref : constant Bare_Explicit_Deref := Node;
begin
Reset_Logic_Var (N_Bare_Explicit_Deref.Explicit_Deref_R_Called_Spec);
end;
when Ada_Reduce_Attribute_Ref_Range =>
declare
N_Bare_Reduce_Attribute_Ref : constant Bare_Reduce_Attribute_Ref := Node;
begin
Reset_Logic_Var (N_Bare_Reduce_Attribute_Ref.Reduce_Attribute_Ref_R_Ref_Var);
end;
when Ada_Target_Name_Range =>
declare
N_Bare_Target_Name : constant Bare_Target_Name := Node;
begin
Reset_Logic_Var (N_Bare_Target_Name.Target_Name_R_Ref_Var);
end;
when Ada_Update_Attribute_Ref_Range =>
declare
N_Bare_Update_Attribute_Ref : constant Bare_Update_Attribute_Ref := Node;
begin
Reset_Logic_Var (N_Bare_Update_Attribute_Ref.Update_Attribute_Ref_R_Ref_Var);
end;
when Ada_Type_Attributes_Repository_Range =>
declare
N_Bare_Type_Attributes_Repository : constant Bare_Type_Attributes_Repository := Node;
begin
Dec_Ref (N_Bare_Type_Attributes_Repository.Bare_Type_Attributes_Repository_Lf_Stg_Base_Type_Expr);
Dec_Ref (N_Bare_Type_Attributes_Repository.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Int_Type_Expr);
Dec_Ref (N_Bare_Type_Attributes_Repository.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Real_Type_Expr);
Dec_Ref (N_Bare_Type_Attributes_Repository.Bare_Type_Attributes_Repository_Lf_Stg_Base_Type_Param);
Dec_Ref (N_Bare_Type_Attributes_Repository.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Int_Param);
Dec_Ref (N_Bare_Type_Attributes_Repository.Bare_Type_Attributes_Repository_Lf_Stg_Universal_Real_Param);
Dec_Ref (N_Bare_Type_Attributes_Repository.Bare_Type_Attributes_Repository_Lf_Stg_Root_Stream_Param);
end;
when others => null;
end case;
   end Free_User_Fields;
   ----------------
   -- Token_Data --
   ----------------
   function Token_Data (Unit : Internal_Unit) return Token_Data_Handler_Access
   is (Unit.TDH'Access);
   -------------------
   -- Lookup_Symbol --
   -------------------
   function Lookup_Symbol
     (Context : Internal_Context; Symbol : Text_Type) return Symbol_Type
   is
      Canon_Symbol : constant Symbolization_Result :=
            Libadalang.Sources.Canonicalize (Symbol)
      ;
   begin
      if Canon_Symbol.Success then
         return To_Symbol
           (Context.Symbols, Find (Context.Symbols, Canon_Symbol.Symbol));
      else
         raise Invalid_Symbol_Error with Image (Canon_Symbol.Error_Message);
      end if;
   end Lookup_Symbol;
   -------------------------
   -- Create_Special_Unit --
   -------------------------
   function Create_Special_Unit
     (Context             : Internal_Context;
      Normalized_Filename : Virtual_File;
      Charset             : String;
      Rule                : Grammar_Rule) return Internal_Unit
   is
      Unit : Internal_Unit := new Analysis_Unit_Type'
        (Context                      => Context,
         Is_Internal                  => False,
         Ast_Root                     => null,
         Filename                     => Normalized_Filename,
         Charset                      => To_Unbounded_String (Charset),
         TDH                          => <>,
         Diagnostics                  => <>,
         Rule                         => Rule,
         Ast_Mem_Pool                 => No_Pool,
         Destroyables                 => Destroyable_Vectors.Empty_Vector,
         Referenced_Units             => <>,
         Exiled_Entries               => Exiled_Entry_Vectors.Empty_Vector,
         Foreign_Nodes                =>
            Foreign_Node_Entry_Vectors.Empty_Vector,
         Exiled_Entries_In_NED        =>
            Exiled_Entry_In_NED_Vectors.Empty_Vector,
         Exiled_Envs                  => Exiled_Env_Vectors.Empty_Vector,
         Named_Envs                   => Named_Env_Vectors.Empty_Vector,
         Nodes_With_Foreign_Env       => <>,
         Rebindings                   => Env_Rebindings_Vectors.Empty_Vector,
         Cache_Version                => <>,
         Unit_Version                 => <>,
         Memoization_Map            => <>,
         others => <>
      );
   begin
      Initialize
        (Unit.TDH, Context.Symbols, Unit.all'Address, Context.Tab_Stop);
      return Unit;
   end Create_Special_Unit;
   --------------------
   -- Templates_Unit --
   --------------------
   function Templates_Unit (Context : Internal_Context) return Internal_Unit is
   begin
      if Context.Templates_Unit = No_Analysis_Unit then
         Context.Templates_Unit := Create_Special_Unit
           (Context             => Context,
            Normalized_Filename => No_File,
            Charset             => Default_Charset,
            Rule                => Compilation_Rule);
      end if;
      return Context.Templates_Unit;
   end Templates_Unit;
   --------------
   -- Set_Rule --
   --------------
   procedure Set_Rule (Unit : Internal_Unit; Rule : Grammar_Rule) is
   begin
      Unit.Rule := Rule;
   end Set_Rule;
   ------------------------------
   -- Normalized_Unit_Filename --
   ------------------------------
   function Normalized_Unit_Filename
     (Context : Internal_Context; Filename : String) return Virtual_File
   is
      use Virtual_File_Maps;
      Key : constant Unbounded_String := To_Unbounded_String (Filename);
      Cur : Cursor := Context.Filenames.Find (Key);
   begin
      if Cur = No_Element then
         declare
            F : constant Virtual_File := Create
              (Create_From_Base (+Filename).Full_Name,
               Normalize => True);
         begin
            Context.Filenames.Insert (Key, F);
            return F;
         end;
      else
         return Element (Cur);
      end if;
   end Normalized_Unit_Filename;
   --------------------------
   -- Register_Destroyable --
   --------------------------
   procedure Register_Destroyable_Helper
     (Unit    : Internal_Unit;
      Object  : System.Address;
      Destroy : Destroy_Procedure)
   is
   begin
      Destroyable_Vectors.Append (Unit.Destroyables, (Object, Destroy));
   end Register_Destroyable_Helper;
   --------------------------
   -- Register_Destroyable --
   --------------------------
   procedure Register_Destroyable
     (Unit : Internal_Unit; Node : Bare_Ada_Node)
   is
      procedure Helper is new Register_Destroyable_Gen
        (Root_Node_Record,
         Bare_Ada_Node,
         Destroy_Synthetic_Node);
   begin
      Helper (Unit, Node);
   end Register_Destroyable;
   --------------------------
   -- Register_Destroyable --
   --------------------------
   procedure Register_Destroyable
     (Unit : Internal_Unit; Env : AST_Envs.Lexical_Env_Access)
   is
      procedure Helper is new Register_Destroyable_Gen
        (AST_Envs.Lexical_Env_Record, AST_Envs.Lexical_Env_Access, Destroy);
   begin
      Helper (Unit, Env);
   end Register_Destroyable;
   -----------------------
   -- Invalidate_Caches --
   -----------------------
   procedure Invalidate_Caches
     (Context : Internal_Context; Invalidate_Envs : Boolean) is
   begin
      --  Increase Context's version number. If we are about to overflow, reset
      --  all version numbers from analysis units.
      if Context.Cache_Version = Version_Number'Last then
         Context.Cache_Version := 1;
         for Unit of Context.Units loop
            Unit.Cache_Version := 0;
         end loop;
      else
         Context.Cache_Version := Context.Cache_Version + 1;
      end if;
      if Invalidate_Envs then
         Context.Reparse_Cache_Version := Context.Cache_Version;
      end if;
   end Invalidate_Caches;
   ------------------
   --  Reset_Envs  --
   ------------------
   procedure Reset_Envs (Unit : Internal_Unit) is
      procedure Deactivate_Refd_Envs (Node : Bare_Ada_Node);
      procedure Recompute_Refd_Envs (Node : Bare_Ada_Node);
      --------------------------
      -- Deactivate_Refd_Envs --
      --------------------------
      procedure Deactivate_Refd_Envs (Node : Bare_Ada_Node) is
      begin
         if Node = null then
            return;
         end if;
         Deactivate_Referenced_Envs (Node.Self_Env);
         for I in 1 .. Children_Count (Node) loop
            Deactivate_Refd_Envs (Child (Node, I));
         end loop;
      end Deactivate_Refd_Envs;
      -------------------------
      -- Recompute_Refd_Envs --
      -------------------------
      procedure Recompute_Refd_Envs (Node : Bare_Ada_Node) is
      begin
         if Node = null then
            return;
         end if;
         Recompute_Referenced_Envs (Node.Self_Env);
         for I in 1 .. Children_Count (Node) loop
            Recompute_Refd_Envs (Child (Node, I));
         end loop;
      end Recompute_Refd_Envs;
   begin
      --  First pass will deactivate every referenced envs that Unit possesses
      Deactivate_Refd_Envs (Unit.Ast_Root);
      --  Second pass will recompute the env they are pointing to
      Recompute_Refd_Envs (Unit.Ast_Root);
   end Reset_Envs;
   -------------
   -- Destroy --
   -------------
   procedure Destroy (Reparsed : in out Reparsed_Unit) is
   begin
      Free (Reparsed.TDH);
      Reparsed.Diagnostics := Diagnostics_Vectors.Empty_Vector;
      Free (Reparsed.Ast_Mem_Pool);
      Reparsed.Ast_Root := null;
   end Destroy;
   --------------
   -- Basename --
   --------------
   function Basename (Filename : String) return String is
   begin
      return +Create (+Filename).Base_Name;
   end Basename;
   --------------
   -- Basename --
   --------------
   function Basename (Unit : Internal_Unit) return String is
   begin
      return +Unit.Filename.Base_Name;
   end Basename;
   ------------------
   -- Reset_Caches --
   ------------------
   procedure Reset_Caches (Unit : Internal_Unit) is
      Cache_Version : constant Version_Number := Unit.Cache_Version;
   begin
      if Cache_Version < Unit.Context.Reparse_Cache_Version then
         Unit.Cache_Version := Unit.Context.Reparse_Cache_Version;
         Reset_Envs (Unit);
      end if;
      if Cache_Version < Unit.Context.Cache_Version then
         Unit.Cache_Version := Unit.Context.Cache_Version;
            Destroy (Unit.Memoization_Map);
      end if;
   end Reset_Caches;
   --------------------
   -- Reference_Unit --
   --------------------
   procedure Reference_Unit (From, Referenced : Internal_Unit) is
      Dummy : Boolean;
   begin
      Dummy := Analysis_Unit_Sets.Add (From.Referenced_Units, Referenced);
   end Reference_Unit;
   ------------------------
   -- Is_Referenced_From --
   ------------------------
   function Is_Referenced_From
     (Self, Unit : Internal_Unit) return Boolean is
   begin
      if Unit = null or else Self = null then
         return False;
      elsif Unit = Self then
         return True;
      else
         return Analysis_Unit_Sets.Has (Unit.Referenced_Units, Self);
      end if;
   end Is_Referenced_From;
   ----------------
   -- Do_Parsing --
   ----------------
   procedure Do_Parsing
     (Unit   : Internal_Unit;
      Input  : Internal_Lexer_Input;
      Result : out Reparsed_Unit)
   is
      Context  : constant Internal_Context := Unit.Context;
      Unit_TDH : constant Token_Data_Handler_Access := Token_Data (Unit);
      Saved_TDH : Token_Data_Handler;
      --  Holder to save tokens data in Unit.
      --
      --  By design, parsing is required to bind the nodes it creates to an
      --  analysis unit. However, this procedure is supposed to preserve the
      --  Unit itself and return its parsing result in Result.
      --
      --  In order to implement this, we first move "old" token data in this
      --  variable, then we do parsing. Only then, we can move "new" token data
      --  from the unit to Result, and restore the "old" token data to Unit.
      --  This last step is what Rotate_TDH (see below) is above.
      procedure Rotate_TDH;
      --  Move token data from Unit to Result and restore data in Saved_TDH to
      --  Unit.
      ----------------
      -- Rotate_TDH --
      ----------------
      procedure Rotate_TDH is
      begin
         Move (Result.TDH, Unit_TDH.all);
         Move (Unit_TDH.all, Saved_TDH);
      end Rotate_TDH;
   begin
      GNATCOLL.Traces.Trace (Main_Trace, "Parsing unit " & Basename (Unit));
      Result.Ast_Root := null;
      Move (Saved_TDH, Unit_TDH.all);
      Initialize (Unit_TDH.all,
                  Saved_TDH.Symbols,
                  Unit.all'Address,
                  Unit.Context.Tab_Stop);
      --  This is where lexing occurs, so this is where we get most "setup"
      --  issues: missing input file, bad charset, etc. If we have such an
      --  error, catch it, turn it into diagnostics and abort parsing.
      --
      --  As it is quite common, first check if the file is readable: if not,
      --  don't bother opening it and directly emit a diagnostic. This avoid
      --  pointless exceptions which harm debugging. Note that this
      --  optimization is valid only when there is no file reader, which can
      --  work even when there is no real source file.
      if Context.File_Reader = null
         and then Input.Kind = File
         and then (Input.Filename.Is_Directory
                   or else (not Input.Filename.Is_Readable))
      then
         declare
            Name : constant String := Basename (Unit);
         begin
            GNATCOLL.Traces.Trace
              (Main_Trace, "WARNING: File is not readable: " & Name);
            Append
              (Result.Diagnostics,
               No_Source_Location_Range,
               "Cannot read " & To_Text (Name));
            Rotate_TDH;
            return;
         end;
      end if;
      --  Initialize the parser, which fetches the source buffer and extract
      --  all tokens.
      Init_Parser
        (Input, Context.With_Trivia, Unit, Unit_TDH, Unit.Context.Parser);
      --  If we could run the lexer, run the parser and get the root node
      if Unit_TDH.Source_Buffer /= null then
         Result.Ast_Mem_Pool := Create;
         Unit.Context.Parser.Mem_Pool := Result.Ast_Mem_Pool;
         Result.Ast_Root := Bare_Ada_Node
           (Parse (Unit.Context.Parser, Rule => Unit.Rule));
      end if;
      --  Forward token data and diagnostics to the returned unit
      Rotate_TDH;
      Result.Diagnostics.Append_Vector (Unit.Context.Parser.Diagnostics);
   end Do_Parsing;
   --------------------------
   -- Update_After_Reparse --
   --------------------------
   procedure Update_After_Reparse
     (Unit : Internal_Unit; Reparsed : in out Reparsed_Unit) is
   begin
      --  Remove the `symbol -> AST node` associations for Unit's nodes in
      --  foreign lexical environments.
      Remove_Exiled_Entries (Unit);
      --  Remove the named envs that Unit created
      declare
         Named_Envs_Needing_Update : NED_Maps.Map;
      begin
         Remove_Named_Envs (Unit, Named_Envs_Needing_Update);
         Update_Named_Envs (Unit.Context, Named_Envs_Needing_Update);
      end;
      --  Explicitly clear the env caches of this unit while it is still fully
      --  alive to make sure that ``Lexical_Env_Cache_Updated`` accesses valid
      --  data. Otherwise the env caches end up being cleared during the call
      --  to ``Destroy_Unit_Destroyables`` where the unit is already partially
      --  destroyed.
      Reset_Envs_Caches (Unit);
      --  At this point, envs and nodes that don't belong to this unit no
      --  longer reference this unit's envs and nodes. It is thus now safe to
      --  deallocate this unit's obsolete data.
      --  Replace Unit's diagnostics by Reparsed's
      Unit.Diagnostics := Reparsed.Diagnostics;
      Reparsed.Diagnostics.Clear;
      --  As (re-)loading a unit can change how any AST node property in the
      --  whole analysis context behaves, we have to invalidate caches. This
      --  is likely overkill, but kill all caches here as it's easy to do.
      --
      --  As an optimization, invalidate env caches only if PLE has run on this
      --  unit (U1) before: if it's the case, then envs in another unit (U2)
      --  may have cached env lookup results that would be different with the
      --  new version of U1.
      Invalidate_Caches
        (Context         => Unit.Context,
         Invalidate_Envs => (for some B of Unit.Env_Populated_Roots => B));
      --  Likewise for token data
      Free (Unit.TDH);
      Move (Unit.TDH, Reparsed.TDH);
      --  Reparsing will invalidate all lexical environments related to this
      --  unit, so destroy all related rebindings as well. This browses AST
      --  nodes, so we have to do this before destroying the old AST nodes
      --  pool.
      Destroy_Rebindings (Unit.Rebindings'Access);
      --  Clear the set of units referenced from that one, as it may no longer
      --  hold in the reparsed unit.
      Analysis_Unit_Sets.Destroy (Unit.Referenced_Units);
      --  Destroy the old AST node and replace it by the new one
      if Unit.Ast_Root /= null then
         Destroy (Unit.Ast_Root);
      end if;
      Unit.Ast_Root := Reparsed.Ast_Root;
      --  Likewise for memory pools
      Free (Unit.Ast_Mem_Pool);
      Unit.Ast_Mem_Pool := Reparsed.Ast_Mem_Pool;
      Reparsed.Ast_Mem_Pool := No_Pool;
      --  Increment unit version number to invalidate caches and stale node
      --  reference. Also propagate it to the TDH.
      Unit.Unit_Version := Unit.Unit_Version + 1;
      Unit.TDH.Version := Unit.Unit_Version;
      --  Compute the PLE_Roots_Starting_Token table
      Unit.PLE_Roots_Starting_Token.Clear;
         if Unit.Ast_Root /= null
            and then Unit.Ast_Root.Kind
                     = Ada_Compilation_Unit_List
         then
            for I in 1 .. Children_Count (Unit.Ast_Root) loop
               Unit.PLE_Roots_Starting_Token.Append
                 (Child (Unit.Ast_Root, I).Token_Start_Index);
            end loop;
         end if;
      --  Update all the lexical envs entries affected by the reparse
      declare
         Unit_Name     : constant String := +Unit.Filename.Base_Name;
         Context       : constant Internal_Context := Unit.Context;
         Foreign_Nodes : Bare_Ada_Node_Vectors.Vector :=
           Bare_Ada_Node_Vectors.Empty_Vector;
         Saved_In_Populate_Lexical_Env : constant Boolean :=
           Context.In_Populate_Lexical_Env;
         Saved_Env_Populated_Roots     : constant Boolean_Vectors.Vector :=
           Unit.Env_Populated_Roots;
      begin
         Context.In_Populate_Lexical_Env := True;
         if Main_Trace.Active then
            Main_Trace.Trace
              ("Updating lexical envs for " & Unit_Name & " after reparse");
            Main_Trace.Increase_Indent;
         end if;
         --  Collect all nodes that are foreign in this Unit's lexical envs.
         --  Exclude them from the corresponding lists of exiled entries.
         Extract_Foreign_Nodes (Unit, Foreign_Nodes);
         --  Temporarily reset Env_Populated_Roots so that Populate_Lexical_Env
         --  accepts to do its work on reparsed trees.
         Unit.Env_Populated_Roots := Boolean_Vectors.Empty_Vector;
         --  Now that Unit has been reparsed, we can destroy all its
         --  destroyables, which refer to the old tree (i.e. dangling
         --  pointers).
         Destroy_Unit_Destroyables (Unit);
         for FN of Foreign_Nodes loop
            declare
               Node_Image : constant String := Image (Short_Text_Image (FN));
               Unit_Name  : constant String := +FN.Unit.Filename.Base_Name;
            begin
               GNATCOLL.Traces.Trace
                 (Main_Trace, "Rerooting: " & Node_Image
                              & " (from " & Unit_Name & ")");
            end;
            Reroot_Foreign_Node (FN);
         end loop;
         Foreign_Nodes.Destroy;
         --  Re-populate all PLE roots that were requested so far for this
         --  unit. In the case where the unit has no PLE root, run PLE on the
         --  whole unit iff it was requested on at least one PLE root.
         declare
            function At_Least_One_Root_Populated return Boolean
            is (for some B of Saved_Env_Populated_Roots => B);
         begin
               if not Unit.PLE_Roots_Starting_Token.Is_Empty then
                  for I in 1 .. Children_Count (Unit.Ast_Root) loop
                     if Saved_Env_Populated_Roots.Last_Index >= I
                        and then Saved_Env_Populated_Roots.Get (I)
                     then
                        Populate_Lexical_Env (Unit, I);
                     end if;
                  end loop;
               elsif At_Least_One_Root_Populated then
                  Populate_Lexical_Env (Unit, 1);
               end if;
         end;
         --  Restore the unit's original Env_Populated_Roots flags
         Unit.Env_Populated_Roots.Destroy;
         Unit.Env_Populated_Roots := Saved_Env_Populated_Roots;
         Context.In_Populate_Lexical_Env := Saved_In_Populate_Lexical_Env;
         if Main_Trace.Is_Active then
            Main_Trace.Decrease_Indent;
         end if;
      end;
      --  Let extension potentially add new diagnostics
Extensions.Post_Parsing_Hook (Unit);
      --  Make sure they are sorted afterwards for a better user experience
      Sort (Unit.Diagnostics);
   end Update_After_Reparse;
   -------------------------------
   -- Destroy_Unit_Destroyables --
   -------------------------------
   procedure Destroy_Unit_Destroyables (Unit : Internal_Unit) is
   begin
      for D of Unit.Destroyables loop
         D.Destroy (D.Object);
      end loop;
      Destroyable_Vectors.Clear (Unit.Destroyables);
   end Destroy_Unit_Destroyables;
   ---------------------------
   -- Remove_Exiled_Entries --
   ---------------------------
   procedure Remove_Exiled_Entries (Unit : Internal_Unit) is
   begin
      for EE of Unit.Exiled_Entries loop
         AST_Envs.Remove (EE.Env, Thin (EE.Key), EE.Node);
         --  Also strip foreign nodes information from "outer" units so that it
         --  does not contain stale information (i.e. dangling pointers to
         --  nodes that belong to the units in the queue).
         if EE.Env.Owner /= No_Generic_Unit then
            declare
               Foreign_Nodes : Foreign_Node_Entry_Vectors.Vector renames
                  Convert_Unit (EE.Env.Owner).Foreign_Nodes;
               Current       : Positive := Foreign_Nodes.First_Index;
            begin
               while Current <= Foreign_Nodes.Last_Index loop
                  if Foreign_Nodes.Get (Current).Node = EE.Node then
                     Foreign_Nodes.Pop (Current);
                  else
                     Current := Current + 1;
                  end if;
               end loop;
            end;
         end if;
      end loop;
      Unit.Exiled_Entries.Clear;
   end Remove_Exiled_Entries;
   -----------------------
   -- Remove_Named_Envs --
   -----------------------
   procedure Remove_Named_Envs
     (Unit                      : Internal_Unit;
      Named_Envs_Needing_Update : in out NED_Maps.Map) is
   begin
      --  Remove nodes in this unit from the Named_Env_Descriptor.Foreign_Nodes
      --  components in which they are registered and from the foreign
      --  environments themselves.
      for EE of Unit.Exiled_Entries_In_NED loop
         Remove (EE.Named_Env.Foreign_Nodes, EE.Key, EE.Node);
         Remove (EE.Named_Env.Env_With_Precedence, Thin (EE.Key), EE.Node);
      end loop;
      Unit.Exiled_Entries_In_NED.Clear;
      --  Remove nodes in this unit from the
      --  Named_Env_Descriptor.Nodes_With_Foreign_Env components in which they
      --  are registered.
      for Cur in Unit.Nodes_With_Foreign_Env.Iterate loop
         declare
            use Node_To_Named_Env_Maps;
            Node : constant Bare_Ada_Node := Key (Cur);
            NE   : constant Named_Env_Descriptor_Access := Element (Cur);
         begin
            NE.Nodes_With_Foreign_Env.Delete (Node);
         end;
      end loop;
      Unit.Nodes_With_Foreign_Env.Clear;
      --  Remove ends in this unit from the Named_Env_Descriptor.Foreign_Envs
      --  components in which they are registered.
      for EE of Unit.Exiled_Envs loop
         EE.Named_Env.Foreign_Envs.Delete (Env_Node (EE.Env));
      end loop;
      Unit.Exiled_Envs.Clear;
      --  Remove named envs that this unit created
      for NE of Unit.Named_Envs loop
         declare
            NED_Access : constant Named_Env_Descriptor_Access :=
               Unit.Context.Named_Envs.Element (NE.Name);
            NED        : Named_Env_Descriptor renames NED_Access.all;
         begin
            NED.Envs.Delete (Env_Node (NE.Env));
            --  If this named environment had precedence, we must schedule an
            --  update for this name environment entry.
            if NE.Env = NED.Env_With_Precedence then
               Named_Envs_Needing_Update.Include (NE.Name, NED_Access);
               NED.Env_With_Precedence := Empty_Env;
            end if;
         end;
      end loop;
      Unit.Named_Envs.Clear;
   end Remove_Named_Envs;
   ---------------------------
   -- Extract_Foreign_Nodes --
   ---------------------------
   procedure Extract_Foreign_Nodes
     (Unit          : Internal_Unit;
      Foreign_Nodes : in out Bare_Ada_Node_Vectors.Vector) is
   begin
      --  Go through all foreign nodes registered in Unit's lexical
      --  environments.
      for FN of Unit.Foreign_Nodes loop
         --  Collect them
         Foreign_Nodes.Append (FN.Node);
         --  For each foreign node, remove the corresponding exiled entry in
         --  that foreign unit (each foreign node in unit A has a corresponding
         --  exiled entry in unit B).
         declare
            Exiled_Entries : Exiled_Entry_Vectors.Vector renames
               FN.Unit.Exiled_Entries;
            Current        : Positive := Exiled_Entries.First_Index;
         begin
            while Current <= Exiled_Entries.Last_Index loop
               if Exiled_Entries.Get (Current).Node = FN.Node then
                  Exiled_Entries.Pop (Current);
               else
                  Current := Current + 1;
               end if;
            end loop;
         end;
      end loop;
      Unit.Foreign_Nodes.Clear;
   end Extract_Foreign_Nodes;
   --------------------------
   -- Reroot_Foreign_Nodes --
   --------------------------
   procedure Reroot_Foreign_Node (Node : Bare_Ada_Node) is
      Unit : constant Internal_Unit := Node.Unit;
   begin
      --  First, filter the exiled entries in foreign units so that they don't
      --  contain references to this unit's lexical environments.  We need to
      --  do that before running the partial Populate_Lexical_Env pass so that
      --  we don't remove exiled entries that this pass will produce.
      declare
         Exiled_Entries : Exiled_Entry_Vectors.Vector renames
            Unit.Exiled_Entries;
         Current        : Positive := Exiled_Entries.First_Index;
      begin
         while Current <= Exiled_Entries.Last_Index loop
            if Exiled_Entries.Get (Current).Node = Node then
               Exiled_Entries.Pop (Current);
            else
               Current := Current + 1;
            end if;
         end loop;
      end;
      --  Re-do a partial Populate_Lexical_Env pass for each foreign node that
      --  this unit contains so that they are relocated in our new lexical
      --  environments.
      declare
         Unit_State : aliased PLE_Unit_State :=
           (Named_Envs_Needing_Update => <>);
         State      : PLE_Node_State :=
           (Unit_State  => Unit_State'Unchecked_Access,
            Current_Env => Node.Self_Env,
            Current_NED => null);
      begin
         Pre_Env_Actions (Node, State, Add_To_Env_Only => True);
         Post_Env_Actions (Node, State);
      end;
   end Reroot_Foreign_Node;
   ----------
   -- Text --
   ----------
   function Text (Node : Bare_Ada_Node) return String_Type is
   begin
      return Create_String (Text (Node));
   end Text;
   ------------------------
   -- Destroy_Rebindings --
   ------------------------
   procedure Destroy_Rebindings
     (Rebindings : access Env_Rebindings_Vectors.Vector)
   is
      procedure Recurse (R : in out Env_Rebindings);
      --  Destroy R's children and then destroy R. It is up to the caller to
      --  remove R from its parent's Children vector.
      procedure Unregister
        (R          : Env_Rebindings;
         Rebindings : in out Env_Rebindings_Vectors.Vector);
      --  Remove R from Rebindings
      -------------
      -- Recurse --
      -------------
      procedure Recurse (R : in out Env_Rebindings) is
      begin
         for C of R.Children loop
            declare
               C_Var : Env_Rebindings := C;
            begin
               Recurse (C_Var);
            end;
         end loop;
         R.Children.Destroy;
         Unregister (R, Convert_Unit (R.Old_Env.Owner).Rebindings);
         Unregister (R, Convert_Unit (R.New_Env.Owner).Rebindings);
         Release_Rebinding (R);
      end Recurse;
      ----------------
      -- Unregister --
      ----------------
      procedure Unregister
        (R          : Env_Rebindings;
         Rebindings : in out Env_Rebindings_Vectors.Vector) is
      begin
         for I in 1 .. Rebindings.Length loop
            if Rebindings.Get (I) = R then
               Rebindings.Pop (I);
               return;
            end if;
         end loop;
         --  We are always supposed to find R in Rebindings, so this should be
         --  unreachable.
         raise Program_Error;
      end Unregister;
   begin
      while Rebindings.Length > 0 loop
         declare
            R : Env_Rebindings := Rebindings.Get (1);
         begin
            --  Here, we basically undo what has been done in AST_Envs.Append
            --  If this rebinding has no parent, then during its creation we
            --  registered it in its Old_Env. Otherwise, it is registered
            --  in its Parent's Children list.
            if R.Parent = null then
               Unwrap (R.Old_Env).Rebindings_Pool.Delete (R.New_Env);
            else
               Unregister (R, R.Parent.Children);
            end if;
            --  In all cases it's registered in Old_Env's and New_Env's units
            Recurse (R);
         end;
      end loop;
   end Destroy_Rebindings;
   --------------------------
   -- Get_Rewriting_Handle --
   --------------------------
   function Get_Rewriting_Handle
     (Context : Internal_Context) return Rewriting_Handle_Pointer is
   begin
      return Context.Rewriting_Handle;
   end Get_Rewriting_Handle;
   --------------------------
   -- Set_Rewriting_Handle --
   --------------------------
   procedure Set_Rewriting_Handle
     (Context : Internal_Context; Handle : Rewriting_Handle_Pointer) is
   begin
      Context.Rewriting_Handle := Handle;
   end Set_Rewriting_Handle;
   -----------------------
   -- Create_Safety_Net --
   -----------------------
   function Create_Safety_Net
     (Context : Internal_Context) return Iterator_Safety_Net
   is
   begin
      return (Context         => Context,
              Context_Serial  => Context.Serial_Number,
              Context_Version => Context.Cache_Version);
   end Create_Safety_Net;
   ----------------------
   -- Check_Safety_Net --
   ----------------------
   procedure Check_Safety_Net (Self : Iterator_Safety_Net) is
   begin
      if Self.Context = null then
         return;
      end if;
      --  Check that the context is still the same (not released nor reused)
      if Self.Context.Serial_Number /= Self.Context_Serial
         or else Self.Context.Cache_Version /= Self.Context_Version
      then
         raise Stale_Reference_Error;
      end if;
   end Check_Safety_Net;
   ----------------------
   -- String_To_Symbol --
   ----------------------
   function String_To_Symbol
     (Self    : Bare_Ada_Node;
      Context : Internal_Context;
      S       : String_Type) return Symbol_Type is
   begin
      return (if S.Length > 0
              then Lookup_Symbol (Context, S.Content)
              else No_Symbol);
   exception
      when Exc : Invalid_Symbol_Error =>
         Raise_Property_Exception
           (Self,
            Property_Error'Identity,
            Ada.Exceptions.Exception_Message (Exc));
   end String_To_Symbol;
   -------------
   -- Inc_Ref --
   -------------
   procedure Inc_Ref (Self : String_Type) is
   begin
      if Self.Ref_Count >= 0 then
         Self.Ref_Count := Self.Ref_Count + 1;
      end if;
   end Inc_Ref;
   -------------
   -- Dec_Ref --
   -------------
   procedure Dec_Ref (Self : in out String_Type) is
   begin
      if Self = null or else Self.Ref_Count < 0 then
         return;
      end if;
      if Self.Ref_Count = 1 then
         Free (Self);
      else
         Self.Ref_Count := Self.Ref_Count - 1;
         Self := null;
      end if;
   end Dec_Ref;
   -------------------
   -- Create_String --
   -------------------
   function Create_String (Content : Text_Type) return String_Type is
   begin
      return Result : constant String_Type := new String_Record'
        (Length    => Content'Length,
         Ref_Count => 1,
         Content   => Content);
   end Create_String;
   -------------------
   -- Create_String --
   -------------------
   function Create_String (Content : Unbounded_Text_Type) return String_Type is
      S : Big_Wide_Wide_String_Access;
      L : Natural;
   begin
      Get_Wide_Wide_String (Content, S, L);
      return Create_String (S.all (1 .. L));
   end Create_String;
   -------------------
   -- Concat_String --
   -------------------
   function Concat_String (Left, Right : String_Type) return String_Type is
   begin
      return Result : constant String_Type :=
        new String_Record (Length => Left.Length + Right.Length)
      do
         Result.Ref_Count := 1;
         Result.Content (1 .. Left.Length) := Left.Content;
         Result.Content (Left.Length + 1 .. Result.Length) := Right.Content;
      end return;
   end Concat_String;
   ----------------
   -- Equivalent --
   ----------------
   function Equivalent (Left, Right : String_Type) return Boolean is
   begin
      return Left.Content = Right.Content;
   end Equivalent;
begin
   No_Big_Integer.Value.Set (0);
end Libadalang.Implementation;